32 #ifndef FREERDP_WTSVC_H
33 #define FREERDP_WTSVC_H
35 #include <freerdp/types.h>
36 #include <freerdp/peer.h>
38 #include <winpr/winpr.h>
39 #include <winpr/wtypes.h>
40 #include <winpr/wtsapi.h>
49 DRDYNVC_STATE_NONE = 0,
50 DRDYNVC_STATE_INITIALIZED = 1,
51 DRDYNVC_STATE_READY = 2,
52 DRDYNVC_STATE_FAILED = 3
55 typedef BOOL (*psDVCCreationStatusCallback)(
void* userdata, UINT32 channelId,
56 INT32 creationStatus);
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));
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,
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,
84 FREERDP_API BOOL WTSChannelSetHandleById(freerdp_peer* client,
const UINT16 channel_id,
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);
92 FREERDP_API UINT32 WTSChannelGetIdByHandle(HANDLE hChannelHandle);