FreeRDP
server/telemetry.h
1 
20 #ifndef FREERDP_CHANNEL_TELEMETRY_SERVER_TELEMETRY_H
21 #define FREERDP_CHANNEL_TELEMETRY_SERVER_TELEMETRY_H
22 
23 #include <freerdp/channels/telemetry.h>
24 #include <freerdp/channels/wtsvc.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31  typedef struct s_telemetry_server_context TelemetryServerContext;
32 
33  typedef UINT (*psTelemetryServerOpen)(TelemetryServerContext* context);
34  typedef UINT (*psTelemetryServerClose)(TelemetryServerContext* context);
35 
36  typedef BOOL (*psTelemetryServerChannelIdAssigned)(TelemetryServerContext* context,
37  UINT32 channelId);
38 
39  typedef UINT (*psTelemetryServerInitialize)(TelemetryServerContext* context,
40  BOOL externalThread);
41  typedef UINT (*psTelemetryServerPoll)(TelemetryServerContext* context);
42  typedef BOOL (*psTelemetryServerChannelHandle)(TelemetryServerContext* context, HANDLE* handle);
43 
44  typedef UINT (*psTelemetryServerRdpTelemetry)(TelemetryServerContext* context,
45  const TELEMETRY_RDP_TELEMETRY_PDU* rdpTelemetry);
46 
48  {
49  HANDLE vcm;
50 
51  /* Server self-defined pointer. */
52  void* userdata;
53 
54  /*** APIs called by the server. ***/
55 
63  psTelemetryServerInitialize Initialize;
64 
68  psTelemetryServerOpen Open;
69 
73  psTelemetryServerClose Close;
74 
80  psTelemetryServerPoll Poll;
81 
86  psTelemetryServerChannelHandle ChannelHandle;
87 
88  /*** Callbacks registered by the server. ***/
89 
93  psTelemetryServerChannelIdAssigned ChannelIdAssigned;
97  psTelemetryServerRdpTelemetry RdpTelemetry;
98 
99  rdpContext* rdpcontext;
100  };
101 
102  FREERDP_API void telemetry_server_context_free(TelemetryServerContext* context);
103 
104  WINPR_ATTR_MALLOC(telemetry_server_context_free, 1)
105  FREERDP_API TelemetryServerContext* telemetry_server_context_new(HANDLE vcm);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* FREERDP_CHANNEL_TELEMETRY_SERVER_TELEMETRY_H */
psTelemetryServerPoll Poll
psTelemetryServerClose Close
psTelemetryServerChannelHandle ChannelHandle
psTelemetryServerChannelIdAssigned ChannelIdAssigned
psTelemetryServerRdpTelemetry RdpTelemetry
psTelemetryServerOpen Open
psTelemetryServerInitialize Initialize