libfreerdp-client: use PubSub for OnChannelConnected/OnChannelDisconnected

This commit is contained in:
Marc-André Moreau
2013-07-11 08:53:15 -07:00
parent f5c2181218
commit 5926fa36dd
9 changed files with 49 additions and 20 deletions

View File

@@ -77,6 +77,16 @@ DEFINE_EVENT_BEGIN(ConnectionResult)
int result;
DEFINE_EVENT_END(ConnectionResult)
DEFINE_EVENT_BEGIN(ChannelConnected)
const char* name;
void* pInterface;
DEFINE_EVENT_END(ChannelConnected)
DEFINE_EVENT_BEGIN(ChannelDisconnected)
const char* name;
void* pInterface;
DEFINE_EVENT_END(ChannelDisconnected)
#ifdef __cplusplus
}
#endif

View File

@@ -66,9 +66,6 @@ typedef int (*pLogonErrorInfo)(freerdp* instance, UINT32 data, UINT32 type);
typedef int (*pSendChannelData)(freerdp* instance, int channelId, BYTE* data, int size);
typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size);
typedef int (*pOnChannelConnected)(freerdp* instance, const char* name, void* pInterface);
typedef int (*pOnChannelDisconnected)(freerdp* instance, const char* name, void* pInterface);
/**
* Defines the context for a given instance of RDP connection.
* It is embedded in the rdp_freerdp structure, and allocated by a call to freerdp_context_new().
@@ -208,9 +205,6 @@ struct rdp_freerdp
This is called by freerdp_channel_process() (if not NULL).
Clients will typically use a function that calls freerdp_channels_data() to perform the needed tasks. */
ALIGN64 pOnChannelConnected OnChannelConnected;
ALIGN64 pOnChannelDisconnected OnChannelDisconnected;
UINT64 paddingE[80 - 66]; /* 66 */
};