20 #include <freerdp/config.h>
22 #include <winpr/assert.h>
23 #include <freerdp/gdi/video.h>
24 #include "xf_channels.h"
26 #include "xf_client.h"
30 #if defined(CHANNEL_TSMF_CLIENT)
34 #include "xf_cliprdr.h"
38 void xf_OnChannelConnectedEventHandler(
void* context,
const ChannelConnectedEventArgs* e)
40 xfContext* xfc = (xfContext*)context;
41 rdpSettings* settings = NULL;
45 WINPR_ASSERT(e->name);
47 settings = xfc->common.context.settings;
48 WINPR_ASSERT(settings);
53 #if defined(CHANNEL_TSMF_CLIENT)
54 else if (strcmp(e->name, TSMF_DVC_CHANNEL_NAME) == 0)
56 xf_tsmf_init(xfc, (TsmfClientContext*)e->pInterface);
59 else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
61 xf_graphics_pipeline_init(xfc, (RdpgfxClientContext*)e->pInterface);
63 else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
65 xf_rail_init(xfc, (RailClientContext*)e->pInterface);
67 else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
69 xf_cliprdr_init(xfc, (CliprdrClientContext*)e->pInterface);
71 else if (strcmp(e->name, DISP_DVC_CHANNEL_NAME) == 0)
73 xf_disp_init(xfc->xfDisp, (DispClientContext*)e->pInterface);
75 else if (strcmp(e->name, VIDEO_CONTROL_DVC_CHANNEL_NAME) == 0)
78 gdi_video_control_init(xfc->common.context.gdi, (VideoClientContext*)e->pInterface);
80 xf_video_control_init(xfc, (VideoClientContext*)e->pInterface);
83 freerdp_client_OnChannelConnectedEventHandler(context, e);
86 void xf_OnChannelDisconnectedEventHandler(
void* context,
const ChannelDisconnectedEventArgs* e)
88 xfContext* xfc = (xfContext*)context;
89 rdpSettings* settings = NULL;
93 WINPR_ASSERT(e->name);
95 settings = xfc->common.context.settings;
96 WINPR_ASSERT(settings);
101 else if (strcmp(e->name, DISP_DVC_CHANNEL_NAME) == 0)
103 xf_disp_uninit(xfc->xfDisp, (DispClientContext*)e->pInterface);
105 #if defined(CHANNEL_TSMF_CLIENT)
106 else if (strcmp(e->name, TSMF_DVC_CHANNEL_NAME) == 0)
108 xf_tsmf_uninit(xfc, (TsmfClientContext*)e->pInterface);
111 else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
113 xf_graphics_pipeline_uninit(xfc, (RdpgfxClientContext*)e->pInterface);
115 else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
117 xf_rail_uninit(xfc, (RailClientContext*)e->pInterface);
119 else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
121 xf_cliprdr_uninit(xfc, (CliprdrClientContext*)e->pInterface);
123 else if (strcmp(e->name, VIDEO_CONTROL_DVC_CHANNEL_NAME) == 0)
126 gdi_video_control_uninit(xfc->common.context.gdi, (VideoClientContext*)e->pInterface);
128 xf_video_control_uninit(xfc, (VideoClientContext*)e->pInterface);
131 freerdp_client_OnChannelDisconnectedEventHandler(context, e);
FREERDP_API BOOL freerdp_settings_get_bool(const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
Returns a boolean settings value.