Added functions to set transport io user context
This commit is contained in:
parent
f7b6d3be73
commit
102e43baaa
@ -58,6 +58,10 @@ extern "C"
|
||||
FREERDP_API const rdpTransportIo* freerdp_get_io_callbacks(rdpContext* context);
|
||||
FREERDP_API BOOL freerdp_set_io_callbacks(rdpContext* context,
|
||||
const rdpTransportIo* io_callbacks);
|
||||
|
||||
FREERDP_API BOOL freerdp_set_io_callback_context(rdpContext* context, void* usercontext);
|
||||
FREERDP_API void* freerdp_get_io_callback_context(rdpContext* context);
|
||||
|
||||
/* PDU parser.
|
||||
* incomplete: FALSE if the whole PDU is available, TRUE otherwise
|
||||
* Return: 0 -> PDU header incomplete
|
||||
|
@ -1100,6 +1100,18 @@ BOOL freerdp_set_io_callbacks(rdpContext* context, const rdpTransportIo* io_call
|
||||
return rdp_set_io_callbacks(context->rdp, io_callbacks);
|
||||
}
|
||||
|
||||
BOOL freerdp_set_io_callback_context(rdpContext* context, void* usercontext)
|
||||
{
|
||||
WINPR_ASSERT(context);
|
||||
return rdp_set_io_callback_context(context->rdp, usercontext);
|
||||
}
|
||||
|
||||
void* freerdp_get_io_callback_context(rdpContext* context)
|
||||
{
|
||||
WINPR_ASSERT(context);
|
||||
return rdp_get_io_callback_context(context->rdp);
|
||||
}
|
||||
|
||||
CONNECTION_STATE freerdp_get_state(const rdpContext* context)
|
||||
{
|
||||
WINPR_ASSERT(context);
|
||||
|
@ -2043,3 +2043,15 @@ BOOL rdp_set_io_callbacks(rdpRdp* rdp, const rdpTransportIo* io_callbacks)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL rdp_set_io_callback_context(rdpRdp* rdp, void* usercontext)
|
||||
{
|
||||
WINPR_ASSERT(rdp);
|
||||
rdp->ioContext = usercontext;
|
||||
}
|
||||
|
||||
void* rdp_get_io_callback_context(rdpRdp* rdp)
|
||||
{
|
||||
WINPR_ASSERT(rdp);
|
||||
return rdp->ioContext;
|
||||
}
|
||||
|
@ -179,6 +179,7 @@ struct rdp_rdp
|
||||
UINT64 outPackets;
|
||||
CRITICAL_SECTION critical;
|
||||
rdpTransportIo* io;
|
||||
void* ioContext;
|
||||
};
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_read_security_header(wStream* s, UINT16* flags, UINT16* length);
|
||||
@ -228,6 +229,9 @@ FREERDP_LOCAL void rdp_free(rdpRdp* rdp);
|
||||
FREERDP_LOCAL const rdpTransportIo* rdp_get_io_callbacks(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_set_io_callbacks(rdpRdp* rdp, const rdpTransportIo* io_callbacks);
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_set_io_callback_context(rdpRdp* rdp, void* usercontext);
|
||||
FREERDP_LOCAL void* rdp_get_io_callback_context(rdpRdp* rdp);
|
||||
|
||||
#define RDP_TAG FREERDP_TAG("core.rdp")
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
#define DEBUG_RDP(...) WLog_DBG(RDP_TAG, __VA_ARGS__)
|
||||
|
Loading…
Reference in New Issue
Block a user