cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

wtsvc.h (3682B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * Server Virtual Channel Interface
      4 *
      5 * Copyright 2011-2012 Vic Lee
      6 *
      7 * Licensed under the Apache License, Version 2.0 (the "License");
      8 * you may not use this file except in compliance with the License.
      9 * You may obtain a copy of the License at
     10 *
     11 *     http://www.apache.org/licenses/LICENSE-2.0
     12 *
     13 * Unless required by applicable law or agreed to in writing, software
     14 * distributed under the License is distributed on an "AS IS" BASIS,
     15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 * See the License for the specific language governing permissions and
     17 * limitations under the License.
     18 */
     19
     20/**
     21 * The server-side virtual channel API follows the Microsoft Remote Desktop
     22 * Services API functions WTSVirtualChannel* defined in:
     23 * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383464.aspx
     24 *
     25 * Difference between the MS API are documented in this header. All functions
     26 * are implemented in and integrated with libfreerdp-channels.
     27 *
     28 * Unlike MS API, all functions except WTSVirtualChannelOpenEx in this
     29 * implementation are thread-safe.
     30 */
     31
     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
     43extern "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
     58	/**
     59	 * WTSVirtualChannelManager functions are FreeRDP extensions to the API.
     60	 */
     61
     62	FREERDP_API void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds,
     63	                                                           int* fds_count);
     64	FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer);
     65	FREERDP_API HANDLE WTSVirtualChannelManagerGetEventHandle(HANDLE hServer);
     66	FREERDP_API BOOL WTSVirtualChannelManagerIsChannelJoined(HANDLE hServer, const char* name);
     67	FREERDP_API BYTE WTSVirtualChannelManagerGetDrdynvcState(HANDLE hServer);
     68	FREERDP_API void WTSVirtualChannelManagerSetDVCCreationCallback(HANDLE hServer,
     69	                                                                psDVCCreationStatusCallback cb,
     70	                                                                void* userdata);
     71
     72	/**
     73	 * Extended FreeRDP WTS functions for channel handling
     74	 */
     75	FREERDP_API UINT16 WTSChannelGetId(freerdp_peer* client, const char* channel_name);
     76	FREERDP_API BOOL WTSIsChannelJoinedByName(freerdp_peer* client, const char* channel_name);
     77	FREERDP_API BOOL WTSIsChannelJoinedById(freerdp_peer* client, const UINT16 channel_id);
     78	FREERDP_API BOOL WTSChannelSetHandleByName(freerdp_peer* client, const char* channel_name,
     79	                                           void* handle);
     80	FREERDP_API BOOL WTSChannelSetHandleById(freerdp_peer* client, const UINT16 channel_id,
     81	                                         void* handle);
     82	FREERDP_API void* WTSChannelGetHandleByName(freerdp_peer* client, const char* channel_name);
     83	FREERDP_API void* WTSChannelGetHandleById(freerdp_peer* client, const UINT16 channel_id);
     84	FREERDP_API const char* WTSChannelGetName(freerdp_peer* client, UINT16 channel_id);
     85	FREERDP_API INT64 WTSChannelGetOptions(freerdp_peer* client, UINT16 channel_id);
     86	FREERDP_API char** WTSGetAcceptedChannelNames(freerdp_peer* client, size_t* count);
     87
     88	FREERDP_API UINT32 WTSChannelGetIdByHandle(HANDLE hChannelHandle);
     89
     90#ifdef __cplusplus
     91}
     92#endif
     93
     94#endif /* FREERDP_WTSVC_H */