19 #include <freerdp/config.h>
21 #include <winpr/assert.h>
23 #include "wf_channels.h"
26 #include "wf_cliprdr.h"
28 #include <freerdp/gdi/gfx.h>
29 #include <freerdp/gdi/video.h>
31 #include <freerdp/log.h>
32 #define TAG CLIENT_TAG("windows")
34 void wf_OnChannelConnectedEventHandler(
void* context,
const ChannelConnectedEventArgs* e)
36 wfContext* wfc = (wfContext*)context;
37 rdpSettings* settings;
42 settings = wfc->common.context.settings;
43 WINPR_ASSERT(settings);
45 if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
47 wf_rail_init(wfc, (RailClientContext*)e->pInterface);
49 else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
51 wf_cliprdr_init(wfc, (CliprdrClientContext*)e->pInterface);
53 else if (strcmp(e->name, DISP_DVC_CHANNEL_NAME) == 0)
55 wfc->disp = (DispClientContext*)e->pInterface;
58 freerdp_client_OnChannelConnectedEventHandler(context, e);
61 void wf_OnChannelDisconnectedEventHandler(
void* context,
const ChannelDisconnectedEventArgs* e)
63 wfContext* wfc = (wfContext*)context;
64 rdpSettings* settings;
69 settings = wfc->common.context.settings;
70 WINPR_ASSERT(settings);
72 if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
74 wf_rail_uninit(wfc, (RailClientContext*)e->pInterface);
76 else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
78 wf_cliprdr_uninit(wfc, (CliprdrClientContext*)e->pInterface);
80 else if (strcmp(e->name, DISP_DVC_CHANNEL_NAME) == 0)
85 freerdp_client_OnChannelDisconnectedEventHandler(context, e);