FreeRDP
server/location.h
1 
20 #ifndef FREERDP_CHANNEL_LOCATION_SERVER_LOCATION_H
21 #define FREERDP_CHANNEL_LOCATION_SERVER_LOCATION_H
22 
23 #include <freerdp/channels/location.h>
24 #include <freerdp/channels/wtsvc.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31  typedef struct s_location_server_context LocationServerContext;
32 
33  typedef UINT (*psLocationServerOpen)(LocationServerContext* context);
34  typedef UINT (*psLocationServerClose)(LocationServerContext* context);
35 
36  typedef BOOL (*psLocationServerChannelIdAssigned)(LocationServerContext* context,
37  UINT32 channelId);
38 
39  typedef UINT (*psLocationServerInitialize)(LocationServerContext* context, BOOL externalThread);
40  typedef UINT (*psLocationServerPoll)(LocationServerContext* context);
41  typedef BOOL (*psLocationServerChannelHandle)(LocationServerContext* context, HANDLE* handle);
42 
43  typedef UINT (*psLocationServerServerReady)(LocationServerContext* context,
44  const RDPLOCATION_SERVER_READY_PDU* serverReady);
45  typedef UINT (*psLocationServerClientReady)(LocationServerContext* context,
46  const RDPLOCATION_CLIENT_READY_PDU* clientReady);
47 
48  typedef UINT (*psLocationServerBaseLocation3D)(
49  LocationServerContext* context, const RDPLOCATION_BASE_LOCATION3D_PDU* baseLocation3D);
50  typedef UINT (*psLocationServerLocation2DDelta)(
51  LocationServerContext* context, const RDPLOCATION_LOCATION2D_DELTA_PDU* location2DDelta);
52  typedef UINT (*psLocationServerLocation3DDelta)(
53  LocationServerContext* context, const RDPLOCATION_LOCATION3D_DELTA_PDU* location3DDelta);
54 
56  {
57  HANDLE vcm;
58 
59  /* Server self-defined pointer. */
60  void* userdata;
61 
62  /*** APIs called by the server. ***/
63 
71  psLocationServerInitialize Initialize;
72 
76  psLocationServerOpen Open;
77 
81  psLocationServerClose Close;
82 
88  psLocationServerPoll Poll;
89 
94  psLocationServerChannelHandle ChannelHandle;
95 
96  /* All PDUs sent by the server don't require the header to be set */
97 
98  /*
99  * Send a ServerReady PDU.
100  */
101  psLocationServerServerReady ServerReady;
102 
103  /*** Callbacks registered by the server. ***/
104 
108  psLocationServerChannelIdAssigned ChannelIdAssigned;
109 
113  psLocationServerClientReady ClientReady;
114 
118  psLocationServerBaseLocation3D BaseLocation3D;
119 
123  psLocationServerLocation2DDelta Location2DDelta;
124 
128  psLocationServerLocation3DDelta Location3DDelta;
129 
130  rdpContext* rdpcontext;
131  };
132 
133  FREERDP_API void location_server_context_free(LocationServerContext* context);
134 
135  WINPR_ATTR_MALLOC(location_server_context_free, 1)
136  FREERDP_API LocationServerContext* location_server_context_new(HANDLE vcm);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* FREERDP_CHANNEL_LOCATION_SERVER_LOCATION_H */
psLocationServerClose Close
psLocationServerBaseLocation3D BaseLocation3D
psLocationServerLocation3DDelta Location3DDelta
psLocationServerLocation2DDelta Location2DDelta
psLocationServerPoll Poll
psLocationServerChannelIdAssigned ChannelIdAssigned
psLocationServerInitialize Initialize
psLocationServerOpen Open
psLocationServerClientReady ClientReady
psLocationServerChannelHandle ChannelHandle