FreeRDP
tf_channels.c
1 
21 #include <freerdp/config.h>
22 
23 #include <winpr/assert.h>
24 #include <freerdp/gdi/gfx.h>
25 
26 #include <freerdp/client/rdpei.h>
27 #include <freerdp/client/rail.h>
28 #include <freerdp/client/cliprdr.h>
29 #include <freerdp/client/rdpgfx.h>
30 #include <freerdp/client/encomsp.h>
31 
32 #include "tf_channels.h"
33 #include "tf_freerdp.h"
34 
35 static UINT tf_update_surfaces(RdpgfxClientContext* context)
36 {
37  WINPR_UNUSED(context);
38  return CHANNEL_RC_OK;
39 }
40 
41 void tf_OnChannelConnectedEventHandler(void* context, const ChannelConnectedEventArgs* e)
42 {
43  tfContext* tf = (tfContext*)context;
44 
45  WINPR_ASSERT(tf);
46  WINPR_ASSERT(e);
47 
48  if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
49  {
50  }
51  else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
52  {
53  CliprdrClientContext* clip = (CliprdrClientContext*)e->pInterface;
54  WINPR_ASSERT(clip);
55  clip->custom = context;
56  }
57  else
58  freerdp_client_OnChannelConnectedEventHandler(&tf->common, e);
59 }
60 
61 void tf_OnChannelDisconnectedEventHandler(void* context, const ChannelDisconnectedEventArgs* e)
62 {
63  tfContext* tf = (tfContext*)context;
64 
65  WINPR_ASSERT(tf);
66  WINPR_ASSERT(e);
67 
68  if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
69  {
70  }
71  else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
72  {
73  CliprdrClientContext* clip = (CliprdrClientContext*)e->pInterface;
74  WINPR_ASSERT(clip);
75  clip->custom = NULL;
76  }
77  else
78  freerdp_client_OnChannelDisconnectedEventHandler(&tf->common, e);
79 }