FreeRDP
server/rdpemsc.h
1 
20 #ifndef FREERDP_CHANNEL_RDPEMSC_SERVER_RDPEMSC_H
21 #define FREERDP_CHANNEL_RDPEMSC_SERVER_RDPEMSC_H
22 
23 #include <freerdp/channels/rdpemsc.h>
24 #include <freerdp/channels/wtsvc.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31  typedef struct s_mouse_cursor_server_context MouseCursorServerContext;
32 
33  typedef UINT (*psMouseCursorServerOpen)(MouseCursorServerContext* context);
34  typedef UINT (*psMouseCursorServerClose)(MouseCursorServerContext* context);
35 
36  typedef BOOL (*psMouseCursorServerChannelIdAssigned)(MouseCursorServerContext* context,
37  UINT32 channelId);
38 
39  typedef UINT (*psMouseCursorServerInitialize)(MouseCursorServerContext* context,
40  BOOL externalThread);
41  typedef UINT (*psMouseCursorServerPoll)(MouseCursorServerContext* context);
42  typedef BOOL (*psMouseCursorServerChannelHandle)(MouseCursorServerContext* context,
43  HANDLE* handle);
44 
45  typedef UINT (*psMouseCursorServerCapsAdvertise)(
46  MouseCursorServerContext* context,
47  const RDP_MOUSE_CURSOR_CAPS_ADVERTISE_PDU* capsAdvertise);
48  typedef UINT (*psMouseCursorServerCapsConfirm)(
49  MouseCursorServerContext* context, const RDP_MOUSE_CURSOR_CAPS_CONFIRM_PDU* capsConfirm);
50 
51  typedef UINT (*psMouseCursorServerMouseptrUpdate)(
52  MouseCursorServerContext* context,
53  const RDP_MOUSE_CURSOR_MOUSEPTR_UPDATE_PDU* mouseptrUpdate);
54 
56  {
57  HANDLE vcm;
58 
59  /* Server self-defined pointer. */
60  void* userdata;
61 
62  /*** APIs called by the server. ***/
63 
71  psMouseCursorServerInitialize Initialize;
72 
76  psMouseCursorServerOpen Open;
77 
81  psMouseCursorServerClose Close;
82 
88  psMouseCursorServerPoll Poll;
89 
94  psMouseCursorServerChannelHandle ChannelHandle;
95 
96  /* All PDUs sent by the server don't require the pduType to be set */
97 
98  /*
99  * Send a CapsConfirm PDU.
100  */
101  psMouseCursorServerCapsConfirm CapsConfirm;
102 
103  /*
104  * Send a MouseptrUpdate PDU.
105  */
106  psMouseCursorServerMouseptrUpdate MouseptrUpdate;
107 
108  /*** Callbacks registered by the server. ***/
109 
113  psMouseCursorServerChannelIdAssigned ChannelIdAssigned;
114 
118  psMouseCursorServerCapsAdvertise CapsAdvertise;
119 
120  rdpContext* rdpcontext;
121  };
122 
123  FREERDP_API void mouse_cursor_server_context_free(MouseCursorServerContext* context);
124 
125  WINPR_ATTR_MALLOC(mouse_cursor_server_context_free, 1)
126  FREERDP_API MouseCursorServerContext* mouse_cursor_server_context_new(HANDLE vcm);
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif /* FREERDP_CHANNEL_RDPEMSC_SERVER_RDPEMSC_H */
psMouseCursorServerOpen Open
psMouseCursorServerChannelHandle ChannelHandle
psMouseCursorServerClose Close
psMouseCursorServerPoll Poll
psMouseCursorServerCapsAdvertise CapsAdvertise
psMouseCursorServerChannelIdAssigned ChannelIdAssigned
psMouseCursorServerInitialize Initialize