FreeRDP
wtsvc.h
1 
32 #ifndef FREERDP_WTSVC_H
33 #define FREERDP_WTSVC_H
34 
35 #include <freerdp/types.h>
36 #include <freerdp/peer.h>
37 
38 #include <winpr/winpr.h>
39 #include <winpr/wtypes.h>
40 #include <winpr/wtsapi.h>
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47  enum
48  {
49  DRDYNVC_STATE_NONE = 0,
50  DRDYNVC_STATE_INITIALIZED = 1,
51  DRDYNVC_STATE_READY = 2,
52  DRDYNVC_STATE_FAILED = 3
53  };
54 
55  typedef BOOL (*psDVCCreationStatusCallback)(void* userdata, UINT32 channelId,
56  INT32 creationStatus);
57 
61 #if defined(WITH_FREERDP_DEPRECATED)
62  FREERDP_API WINPR_DEPRECATED_VAR(
63  "Use WTSVirtualChannelManagerGetEventHandle",
64  void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds, int* fds_count));
65 #endif
66  FREERDP_API BOOL WTSVirtualChannelManagerOpen(HANDLE hServer);
67  FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer);
68  FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptorEx(HANDLE hServer, BOOL autoOpen);
69  FREERDP_API HANDLE WTSVirtualChannelManagerGetEventHandle(HANDLE hServer);
70  FREERDP_API BOOL WTSVirtualChannelManagerIsChannelJoined(HANDLE hServer, const char* name);
71  FREERDP_API BYTE WTSVirtualChannelManagerGetDrdynvcState(HANDLE hServer);
72  FREERDP_API void WTSVirtualChannelManagerSetDVCCreationCallback(HANDLE hServer,
73  psDVCCreationStatusCallback cb,
74  void* userdata);
75 
79  FREERDP_API UINT16 WTSChannelGetId(freerdp_peer* client, const char* channel_name);
80  FREERDP_API BOOL WTSIsChannelJoinedByName(freerdp_peer* client, const char* channel_name);
81  FREERDP_API BOOL WTSIsChannelJoinedById(freerdp_peer* client, const UINT16 channel_id);
82  FREERDP_API BOOL WTSChannelSetHandleByName(freerdp_peer* client, const char* channel_name,
83  void* handle);
84  FREERDP_API BOOL WTSChannelSetHandleById(freerdp_peer* client, const UINT16 channel_id,
85  void* handle);
86  FREERDP_API void* WTSChannelGetHandleByName(freerdp_peer* client, const char* channel_name);
87  FREERDP_API void* WTSChannelGetHandleById(freerdp_peer* client, const UINT16 channel_id);
88  FREERDP_API const char* WTSChannelGetName(freerdp_peer* client, UINT16 channel_id);
89  FREERDP_API char** WTSGetAcceptedChannelNames(freerdp_peer* client, size_t* count);
90  FREERDP_API INT64 WTSChannelGetOptions(freerdp_peer* client, UINT16 channel_id);
91 
92  FREERDP_API UINT32 WTSChannelGetIdByHandle(HANDLE hChannelHandle);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* FREERDP_WTSVC_H */