[includes] improved c++ guards

This commit is contained in:
akallabeth 2023-03-14 09:27:55 +01:00 committed by akallabeth
parent e40b1614f2
commit 61779694ee
101 changed files with 4233 additions and 3892 deletions

View File

@ -38,23 +38,24 @@
#define FREERDP_ADDIN_CHANNEL_DEVICE 0x00004000 #define FREERDP_ADDIN_CHANNEL_DEVICE 0x00004000
#define FREERDP_ADDIN_CHANNEL_ENTRYEX 0x00008000 #define FREERDP_ADDIN_CHANNEL_ENTRYEX 0x00008000
typedef struct
{
DWORD dwFlags;
CHAR cName[16];
CHAR cType[16];
CHAR cSubsystem[16];
} FREERDP_ADDIN;
typedef PVIRTUALCHANNELENTRY (*FREERDP_LOAD_CHANNEL_ADDIN_ENTRY_FN)(LPCSTR pszName,
LPCSTR pszSubsystem,
LPCSTR pszType, DWORD dwFlags);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct
{
DWORD dwFlags;
CHAR cName[16];
CHAR cType[16];
CHAR cSubsystem[16];
} FREERDP_ADDIN;
typedef PVIRTUALCHANNELENTRY (*FREERDP_LOAD_CHANNEL_ADDIN_ENTRY_FN)(LPCSTR pszName,
LPCSTR pszSubsystem,
LPCSTR pszType,
DWORD dwFlags);
FREERDP_API LPSTR freerdp_get_library_install_path(void); FREERDP_API LPSTR freerdp_get_library_install_path(void);
FREERDP_API LPSTR freerdp_get_dynamic_addin_install_path(void); FREERDP_API LPSTR freerdp_get_dynamic_addin_install_path(void);

View File

@ -36,166 +36,175 @@
#define STREAM_BITMAP_COMPRESSED 0x02 #define STREAM_BITMAP_COMPRESSED 0x02
#define STREAM_BITMAP_V2 0x04 #define STREAM_BITMAP_V2 0x04
typedef struct #ifdef __cplusplus
extern "C"
{ {
UINT32 sIndices; #endif
UINT32 cIndices;
UINT16* indices;
} OFFSCREEN_DELETE_LIST;
typedef struct typedef struct
{ {
UINT32 id; UINT32 sIndices;
UINT32 cx; UINT32 cIndices;
UINT32 cy; UINT16* indices;
OFFSCREEN_DELETE_LIST deleteList; } OFFSCREEN_DELETE_LIST;
} CREATE_OFFSCREEN_BITMAP_ORDER;
typedef struct typedef struct
{ {
UINT32 bitmapId; UINT32 id;
} SWITCH_SURFACE_ORDER; UINT32 cx;
UINT32 cy;
OFFSCREEN_DELETE_LIST deleteList;
} CREATE_OFFSCREEN_BITMAP_ORDER;
typedef struct typedef struct
{ {
UINT32 flFlags; UINT32 bitmapId;
UINT32 ulLeftWidth; } SWITCH_SURFACE_ORDER;
UINT32 ulRightWidth;
UINT32 ulTopHeight;
UINT32 ulBottomHeight;
UINT32 crTransparent;
} NINE_GRID_BITMAP_INFO;
typedef struct typedef struct
{ {
UINT32 bitmapBpp; UINT32 flFlags;
UINT32 bitmapId; UINT32 ulLeftWidth;
UINT32 cx; UINT32 ulRightWidth;
UINT32 cy; UINT32 ulTopHeight;
NINE_GRID_BITMAP_INFO nineGridInfo; UINT32 ulBottomHeight;
} CREATE_NINE_GRID_BITMAP_ORDER; UINT32 crTransparent;
} NINE_GRID_BITMAP_INFO;
typedef struct typedef struct
{ {
UINT32 action; UINT32 bitmapBpp;
} FRAME_MARKER_ORDER; UINT32 bitmapId;
UINT32 cx;
UINT32 cy;
NINE_GRID_BITMAP_INFO nineGridInfo;
} CREATE_NINE_GRID_BITMAP_ORDER;
typedef struct typedef struct
{ {
UINT32 bitmapFlags; UINT32 action;
UINT32 bitmapBpp; } FRAME_MARKER_ORDER;
UINT32 bitmapType;
UINT32 bitmapWidth;
UINT32 bitmapHeight;
UINT32 bitmapSize;
UINT32 bitmapBlockSize;
BYTE* bitmapBlock;
} STREAM_BITMAP_FIRST_ORDER;
typedef struct typedef struct
{ {
UINT32 bitmapFlags; UINT32 bitmapFlags;
UINT32 bitmapType; UINT32 bitmapBpp;
UINT32 bitmapBlockSize; UINT32 bitmapType;
BYTE* bitmapBlock; UINT32 bitmapWidth;
} STREAM_BITMAP_NEXT_ORDER; UINT32 bitmapHeight;
UINT32 bitmapSize;
UINT32 bitmapBlockSize;
BYTE* bitmapBlock;
} STREAM_BITMAP_FIRST_ORDER;
typedef struct typedef struct
{ {
UINT32 cbSize; UINT32 bitmapFlags;
UINT32 cbTotalSize; UINT32 bitmapType;
UINT32 cbTotalEmfSize; UINT32 bitmapBlockSize;
BYTE* emfRecords; BYTE* bitmapBlock;
} DRAW_GDIPLUS_FIRST_ORDER; } STREAM_BITMAP_NEXT_ORDER;
typedef struct typedef struct
{ {
UINT32 cbSize; UINT32 cbSize;
BYTE* emfRecords; UINT32 cbTotalSize;
} DRAW_GDIPLUS_NEXT_ORDER; UINT32 cbTotalEmfSize;
BYTE* emfRecords;
} DRAW_GDIPLUS_FIRST_ORDER;
typedef struct typedef struct
{ {
UINT32 cbSize; UINT32 cbSize;
UINT32 cbTotalSize; BYTE* emfRecords;
UINT32 cbTotalEmfSize; } DRAW_GDIPLUS_NEXT_ORDER;
BYTE* emfRecords;
} DRAW_GDIPLUS_END_ORDER;
typedef struct typedef struct
{ {
UINT32 flags; UINT32 cbSize;
UINT32 cacheType; UINT32 cbTotalSize;
UINT32 cacheIndex; UINT32 cbTotalEmfSize;
UINT32 cbSize; BYTE* emfRecords;
UINT32 cbTotalSize; } DRAW_GDIPLUS_END_ORDER;
BYTE* emfRecords;
} DRAW_GDIPLUS_CACHE_FIRST_ORDER;
typedef struct typedef struct
{ {
UINT32 flags; UINT32 flags;
UINT32 cacheType; UINT32 cacheType;
UINT32 cacheIndex; UINT32 cacheIndex;
UINT32 cbSize; UINT32 cbSize;
BYTE* emfRecords; UINT32 cbTotalSize;
} DRAW_GDIPLUS_CACHE_NEXT_ORDER; BYTE* emfRecords;
} DRAW_GDIPLUS_CACHE_FIRST_ORDER;
typedef struct typedef struct
{ {
UINT32 flags; UINT32 flags;
UINT32 cacheType; UINT32 cacheType;
UINT32 cacheIndex; UINT32 cacheIndex;
UINT32 cbSize; UINT32 cbSize;
UINT32 cbTotalSize; BYTE* emfRecords;
BYTE* emfRecords; } DRAW_GDIPLUS_CACHE_NEXT_ORDER;
} DRAW_GDIPLUS_CACHE_END_ORDER;
typedef BOOL (*pCreateOffscreenBitmap)( typedef struct
rdpContext* context, const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap); {
typedef BOOL (*pSwitchSurface)(rdpContext* context, const SWITCH_SURFACE_ORDER* switch_surface); UINT32 flags;
typedef BOOL (*pCreateNineGridBitmap)(rdpContext* context, UINT32 cacheType;
const CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap); UINT32 cacheIndex;
typedef BOOL (*pFrameMarker)(rdpContext* context, const FRAME_MARKER_ORDER* frame_marker); UINT32 cbSize;
typedef BOOL (*pStreamBitmapFirst)(rdpContext* context, UINT32 cbTotalSize;
const STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first); BYTE* emfRecords;
typedef BOOL (*pStreamBitmapNext)(rdpContext* context, } DRAW_GDIPLUS_CACHE_END_ORDER;
const STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next);
typedef BOOL (*pDrawGdiPlusFirst)(rdpContext* context,
const DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first);
typedef BOOL (*pDrawGdiPlusNext)(rdpContext* context,
const DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next);
typedef BOOL (*pDrawGdiPlusEnd)(rdpContext* context,
const DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end);
typedef BOOL (*pDrawGdiPlusCacheFirst)(
rdpContext* context, const DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first);
typedef BOOL (*pDrawGdiPlusCacheNext)(rdpContext* context,
const DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next);
typedef BOOL (*pDrawGdiPlusCacheEnd)(rdpContext* context,
const DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end);
typedef BOOL (*pDrawOrderInfo)(rdpContext* context, UINT8 orderType, const char* orderName);
struct rdp_altsec_update typedef BOOL (*pCreateOffscreenBitmap)(
{ rdpContext* context, const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
rdpContext* context; /* 0 */ typedef BOOL (*pSwitchSurface)(rdpContext* context, const SWITCH_SURFACE_ORDER* switch_surface);
UINT32 paddingA[16 - 1]; /* 1 */ typedef BOOL (*pCreateNineGridBitmap)(
rdpContext* context, const CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap);
typedef BOOL (*pFrameMarker)(rdpContext* context, const FRAME_MARKER_ORDER* frame_marker);
typedef BOOL (*pStreamBitmapFirst)(rdpContext* context,
const STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first);
typedef BOOL (*pStreamBitmapNext)(rdpContext* context,
const STREAM_BITMAP_NEXT_ORDER* stream_bitmap_next);
typedef BOOL (*pDrawGdiPlusFirst)(rdpContext* context,
const DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first);
typedef BOOL (*pDrawGdiPlusNext)(rdpContext* context,
const DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next);
typedef BOOL (*pDrawGdiPlusEnd)(rdpContext* context,
const DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end);
typedef BOOL (*pDrawGdiPlusCacheFirst)(
rdpContext* context, const DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first);
typedef BOOL (*pDrawGdiPlusCacheNext)(
rdpContext* context, const DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next);
typedef BOOL (*pDrawGdiPlusCacheEnd)(
rdpContext* context, const DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end);
typedef BOOL (*pDrawOrderInfo)(rdpContext* context, UINT8 orderType, const char* orderName);
pCreateOffscreenBitmap CreateOffscreenBitmap; /* 16 */ struct rdp_altsec_update
pSwitchSurface SwitchSurface; /* 17 */ {
pCreateNineGridBitmap CreateNineGridBitmap; /* 18 */ rdpContext* context; /* 0 */
pFrameMarker FrameMarker; /* 19 */ UINT32 paddingA[16 - 1]; /* 1 */
pStreamBitmapFirst StreamBitmapFirst; /* 20 */
pStreamBitmapNext StreamBitmapNext; /* 21 */ pCreateOffscreenBitmap CreateOffscreenBitmap; /* 16 */
pDrawGdiPlusFirst DrawGdiPlusFirst; /* 22 */ pSwitchSurface SwitchSurface; /* 17 */
pDrawGdiPlusNext DrawGdiPlusNext; /* 23 */ pCreateNineGridBitmap CreateNineGridBitmap; /* 18 */
pDrawGdiPlusEnd DrawGdiPlusEnd; /* 24 */ pFrameMarker FrameMarker; /* 19 */
pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst; /* 25 */ pStreamBitmapFirst StreamBitmapFirst; /* 20 */
pDrawGdiPlusCacheNext DrawGdiPlusCacheNext; /* 26 */ pStreamBitmapNext StreamBitmapNext; /* 21 */
pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd; /* 27 */ pDrawGdiPlusFirst DrawGdiPlusFirst; /* 22 */
/* Statistics callback */ pDrawGdiPlusNext DrawGdiPlusNext; /* 23 */
pDrawOrderInfo DrawOrderInfo; /* 28 */ pDrawGdiPlusEnd DrawGdiPlusEnd; /* 24 */
UINT32 paddingB[32 - 29]; /* 29 */ pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst; /* 25 */
}; pDrawGdiPlusCacheNext DrawGdiPlusCacheNext; /* 26 */
typedef struct rdp_altsec_update rdpAltSecUpdate; pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd; /* 27 */
/* Statistics callback */
pDrawOrderInfo DrawOrderInfo; /* 28 */
UINT32 paddingB[32 - 29]; /* 29 */
};
typedef struct rdp_altsec_update rdpAltSecUpdate;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UPDATE_ALTSEC_H */ #endif /* FREERDP_UPDATE_ALTSEC_H */

View File

@ -23,13 +23,13 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
typedef struct rdp_assistance_file rdpAssistanceFile;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_assistance_file rdpAssistanceFile;
FREERDP_API BYTE* freerdp_assistance_hex_string_to_bin(const void* str, size_t* size); FREERDP_API BYTE* freerdp_assistance_hex_string_to_bin(const void* str, size_t* size);
FREERDP_API char* freerdp_assistance_bin_to_hex_string(const void* data, size_t size); FREERDP_API char* freerdp_assistance_bin_to_hex_string(const void* data, size_t size);

View File

@ -28,7 +28,12 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/stream.h> #include <winpr/stream.h>
typedef struct rdp_persistent_cache rdpPersistentCache; #ifdef __cplusplus
extern "C"
{
#endif
typedef struct rdp_persistent_cache rdpPersistentCache;
#pragma pack(push, 1) #pragma pack(push, 1)
@ -76,11 +81,6 @@ struct _PERSISTENT_CACHE_ENTRY
}; };
typedef struct _PERSISTENT_CACHE_ENTRY PERSISTENT_CACHE_ENTRY; typedef struct _PERSISTENT_CACHE_ENTRY PERSISTENT_CACHE_ENTRY;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API int persistent_cache_get_version(rdpPersistentCache* persistent); FREERDP_API int persistent_cache_get_version(rdpPersistentCache* persistent);
FREERDP_API int persistent_cache_get_count(rdpPersistentCache* persistent); FREERDP_API int persistent_cache_get_count(rdpPersistentCache* persistent);

View File

@ -28,34 +28,43 @@
#define AINPUT_CHANNEL_NAME "ainput" #define AINPUT_CHANNEL_NAME "ainput"
#define AINPUT_DVC_CHANNEL_NAME "FreeRDP::Advanced::Input" #define AINPUT_DVC_CHANNEL_NAME "FreeRDP::Advanced::Input"
typedef enum #ifdef __cplusplus
extern "C"
{ {
MSG_AINPUT_VERSION = 0x01, #endif
MSG_AINPUT_MOUSE = 0x02
} eAInputMsgType;
typedef enum typedef enum
{ {
AINPUT_FLAGS_WHEEL = 0x0001, MSG_AINPUT_VERSION = 0x01,
AINPUT_FLAGS_MOVE = 0x0004, MSG_AINPUT_MOUSE = 0x02
AINPUT_FLAGS_DOWN = 0x0008, } eAInputMsgType;
AINPUT_FLAGS_REL = 0x0010, typedef enum
AINPUT_FLAGS_HAVE_REL = 0x0020, {
AINPUT_FLAGS_WHEEL = 0x0001,
AINPUT_FLAGS_MOVE = 0x0004,
AINPUT_FLAGS_DOWN = 0x0008,
/* Pointer Flags */ AINPUT_FLAGS_REL = 0x0010,
AINPUT_FLAGS_BUTTON1 = 0x1000, /* left */ AINPUT_FLAGS_HAVE_REL = 0x0020,
AINPUT_FLAGS_BUTTON2 = 0x2000, /* right */
AINPUT_FLAGS_BUTTON3 = 0x4000, /* middle */
/* Extended Pointer Flags */ /* Pointer Flags */
AINPUT_XFLAGS_BUTTON1 = 0x0100, AINPUT_FLAGS_BUTTON1 = 0x1000, /* left */
AINPUT_XFLAGS_BUTTON2 = 0x0200 AINPUT_FLAGS_BUTTON2 = 0x2000, /* right */
} AInputEventFlags; AINPUT_FLAGS_BUTTON3 = 0x4000, /* middle */
typedef struct ainput_client_context AInputClientContext; /* Extended Pointer Flags */
AINPUT_XFLAGS_BUTTON1 = 0x0100,
AINPUT_XFLAGS_BUTTON2 = 0x0200
} AInputEventFlags;
typedef struct ainput_client_context AInputClientContext;
#define AINPUT_VERSION_MAJOR 1 #define AINPUT_VERSION_MAJOR 1
#define AINPUT_VERSION_MINOR 0 #define AINPUT_VERSION_MINOR 0
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_AINPUT_H */ #endif /* FREERDP_CHANNEL_AINPUT_H */

View File

@ -50,31 +50,40 @@
#define DISPLAY_CONTROL_MIN_PHYSICAL_MONITOR_HEIGHT 10 #define DISPLAY_CONTROL_MIN_PHYSICAL_MONITOR_HEIGHT 10
#define DISPLAY_CONTROL_MAX_PHYSICAL_MONITOR_HEIGHT 10000 #define DISPLAY_CONTROL_MAX_PHYSICAL_MONITOR_HEIGHT 10000
typedef struct #ifdef __cplusplus
extern "C"
{ {
UINT32 type; #endif
UINT32 length;
} DISPLAY_CONTROL_HEADER;
typedef struct typedef struct
{ {
UINT32 Flags; UINT32 type;
INT32 Left; UINT32 length;
INT32 Top; } DISPLAY_CONTROL_HEADER;
UINT32 Width;
UINT32 Height;
UINT32 PhysicalWidth;
UINT32 PhysicalHeight;
UINT32 Orientation;
UINT32 DesktopScaleFactor;
UINT32 DeviceScaleFactor;
} DISPLAY_CONTROL_MONITOR_LAYOUT;
typedef struct typedef struct
{ {
UINT32 MonitorLayoutSize; UINT32 Flags;
UINT32 NumMonitors; INT32 Left;
DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors; INT32 Top;
} DISPLAY_CONTROL_MONITOR_LAYOUT_PDU; UINT32 Width;
UINT32 Height;
UINT32 PhysicalWidth;
UINT32 PhysicalHeight;
UINT32 Orientation;
UINT32 DesktopScaleFactor;
UINT32 DeviceScaleFactor;
} DISPLAY_CONTROL_MONITOR_LAYOUT;
typedef struct
{
UINT32 MonitorLayoutSize;
UINT32 NumMonitors;
DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors;
} DISPLAY_CONTROL_MONITOR_LAYOUT_PDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_DISP_H */ #endif /* FREERDP_CHANNEL_DISP_H */

View File

@ -27,32 +27,41 @@
#define DRDYNVC_SVC_CHANNEL_NAME "drdynvc" #define DRDYNVC_SVC_CHANNEL_NAME "drdynvc"
/* defined in MS-RDPEDYC 2.2.5.1 Soft-Sync Request PDU (DYNVC_SOFT_SYNC_REQUEST) */ #ifdef __cplusplus
enum extern "C"
{ {
SOFT_SYNC_TCP_FLUSHED = 0x01, #endif
SOFT_SYNC_CHANNEL_LIST_PRESENT = 0x02
};
/* define in MS-RDPEDYC 2.2.5.1.1 Soft-Sync Channel List (DYNVC_SOFT_SYNC_CHANNEL_LIST) */ /* defined in MS-RDPEDYC 2.2.5.1 Soft-Sync Request PDU (DYNVC_SOFT_SYNC_REQUEST) */
enum enum
{ {
TUNNELTYPE_UDPFECR = 0x00000001, SOFT_SYNC_TCP_FLUSHED = 0x01,
TUNNELTYPE_UDPFECL = 0x00000003 SOFT_SYNC_CHANNEL_LIST_PRESENT = 0x02
}; };
/* @brief dynamic channel commands */ /* define in MS-RDPEDYC 2.2.5.1.1 Soft-Sync Channel List (DYNVC_SOFT_SYNC_CHANNEL_LIST) */
typedef enum enum
{ {
CREATE_REQUEST_PDU = 0x01, TUNNELTYPE_UDPFECR = 0x00000001,
DATA_FIRST_PDU = 0x02, TUNNELTYPE_UDPFECL = 0x00000003
DATA_PDU = 0x03, };
CLOSE_REQUEST_PDU = 0x04,
CAPABILITY_REQUEST_PDU = 0x05, /* @brief dynamic channel commands */
DATA_FIRST_COMPRESSED_PDU = 0x06, typedef enum
DATA_COMPRESSED_PDU = 0x07, {
SOFT_SYNC_REQUEST_PDU = 0x08, CREATE_REQUEST_PDU = 0x01,
SOFT_SYNC_RESPONSE_PDU = 0x09 DATA_FIRST_PDU = 0x02,
} DynamicChannelPDU; DATA_PDU = 0x03,
CLOSE_REQUEST_PDU = 0x04,
CAPABILITY_REQUEST_PDU = 0x05,
DATA_FIRST_COMPRESSED_PDU = 0x06,
DATA_COMPRESSED_PDU = 0x07,
SOFT_SYNC_REQUEST_PDU = 0x08,
SOFT_SYNC_RESPONSE_PDU = 0x09
} DynamicChannelPDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_DRDYNVC_H */ #endif /* FREERDP_CHANNEL_DRDYNVC_H */

View File

@ -23,6 +23,11 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define ENCOMSP_SVC_CHANNEL_NAME "encomsp" #define ENCOMSP_SVC_CHANNEL_NAME "encomsp"
typedef struct typedef struct
@ -169,4 +174,8 @@ typedef struct
DEFINE_ENCOMSP_HEADER_COMMON(); DEFINE_ENCOMSP_HEADER_COMMON();
} ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU; } ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_ENCOMSP_H */ #endif /* FREERDP_CHANNEL_ENCOMSP_H */

View File

@ -25,35 +25,44 @@
#define GEOMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Geometry::v08.01" #define GEOMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Geometry::v08.01"
enum #ifdef __cplusplus
extern "C"
{ {
GEOMETRY_UPDATE = 1, #endif
GEOMETRY_CLEAR = 2
};
enum enum
{ {
RDH_RECTANGLE = 1 GEOMETRY_UPDATE = 1,
}; GEOMETRY_CLEAR = 2
};
typedef struct enum
{ {
RDP_RECT boundingRect; RDH_RECTANGLE = 1
UINT32 nRectCount; };
RDP_RECT* rects;
} FREERDP_RGNDATA;
typedef struct typedef struct
{ {
UINT32 version; RDP_RECT boundingRect;
UINT64 mappingId; UINT32 nRectCount;
UINT32 updateType; RDP_RECT* rects;
UINT64 topLevelId; } FREERDP_RGNDATA;
INT32 left, top, right, bottom;
INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
UINT32 geometryType;
FREERDP_RGNDATA geometry; typedef struct
} MAPPED_GEOMETRY_PACKET; {
UINT32 version;
UINT64 mappingId;
UINT32 updateType;
UINT64 topLevelId;
INT32 left, top, right, bottom;
INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
UINT32 geometryType;
FREERDP_RGNDATA geometry;
} MAPPED_GEOMETRY_PACKET;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_GEOMETRY_H */ #endif /* FREERDP_CHANNEL_GEOMETRY_H */

View File

@ -23,6 +23,11 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define GFXREDIR_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::RemoteAppGraphicsRedirection" #define GFXREDIR_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::RemoteAppGraphicsRedirection"
/* GFXREDIR_LEGACY_CAPS_PDU.version */ /* GFXREDIR_LEGACY_CAPS_PDU.version */
@ -153,4 +158,8 @@ typedef struct
UINT64 presentId; UINT64 presentId;
} GFXREDIR_PRESENT_BUFFER_ACK_PDU; } GFXREDIR_PRESENT_BUFFER_ACK_PDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_GFXREDIR_H */ #endif /* FREERDP_CHANNEL_GFXREDIR_H */

View File

@ -35,6 +35,11 @@
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define RDPDR_SVC_CHANNEL_NAME "rdpdr" #define RDPDR_SVC_CHANNEL_NAME "rdpdr"
#define RDPDR_DEVICE_IO_REQUEST_LENGTH 24 #define RDPDR_DEVICE_IO_REQUEST_LENGTH 24
@ -377,4 +382,8 @@ typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS;
typedef UINT (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS); typedef UINT (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_RDPDR_H */ #endif /* FREERDP_CHANNEL_RDPDR_H */

View File

@ -24,6 +24,11 @@
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define RDPINPUT_HEADER_LENGTH 6 #define RDPINPUT_HEADER_LENGTH 6
#define RDPEI_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Input" #define RDPEI_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Input"
@ -153,4 +158,8 @@ typedef struct
RDPINPUT_PEN_FRAME* frames; RDPINPUT_PEN_FRAME* frames;
} RDPINPUT_PEN_EVENT; } RDPINPUT_PEN_EVENT;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_RDPEI_H */ #endif /* FREERDP_CHANNEL_RDPEI_H */

View File

@ -23,6 +23,11 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define REMDESK_SVC_CHANNEL_NAME "remdesk" #define REMDESK_SVC_CHANNEL_NAME "remdesk"
#define REMDESK_ERROR_NOERROR 0 #define REMDESK_ERROR_NOERROR 0
@ -148,4 +153,8 @@ typedef struct
UINT32 EncryptedPasswordLength; UINT32 EncryptedPasswordLength;
} REMDESK_CTL_EXPERT_ON_VISTA_PDU; } REMDESK_CTL_EXPERT_ON_VISTA_PDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_REMDESK_H */ #endif /* FREERDP_CHANNEL_REMDESK_H */

View File

@ -24,6 +24,11 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/smartcard.h> #include <winpr/smartcard.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define RDP_SCARD_CTL_CODE(code) \ #define RDP_SCARD_CTL_CODE(code) \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, (code), METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, (code), METHOD_BUFFERED, FILE_ANY_ACCESS)
@ -488,4 +493,8 @@ typedef struct
/* [string] */ WCHAR* szLookupName; /* [string] */ WCHAR* szLookupName;
} WriteCacheW_Call; } WriteCacheW_Call;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_SCARD_H */ #endif /* FREERDP_CHANNEL_SCARD_H */

View File

@ -26,13 +26,22 @@
#define TELEMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Telemetry" #define TELEMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Telemetry"
struct _TELEMETRY_RDP_TELEMETRY_PDU #ifdef __cplusplus
extern "C"
{ {
UINT32 PromptForCredentialsMillis; #endif
UINT32 PromptForCredentialsDoneMillis;
UINT32 GraphicsChannelOpenedMillis; struct _TELEMETRY_RDP_TELEMETRY_PDU
UINT32 FirstGraphicsReceivedMillis; {
}; UINT32 PromptForCredentialsMillis;
typedef struct _TELEMETRY_RDP_TELEMETRY_PDU TELEMETRY_RDP_TELEMETRY_PDU; UINT32 PromptForCredentialsDoneMillis;
UINT32 GraphicsChannelOpenedMillis;
UINT32 FirstGraphicsReceivedMillis;
};
typedef struct _TELEMETRY_RDP_TELEMETRY_PDU TELEMETRY_RDP_TELEMETRY_PDU;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_TELEMETRY_H */ #endif /* FREERDP_CHANNEL_TELEMETRY_H */

View File

@ -26,87 +26,96 @@
#define VIDEO_CONTROL_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Control::v08.01" #define VIDEO_CONTROL_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Control::v08.01"
#define VIDEO_DATA_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Data::v08.01" #define VIDEO_DATA_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Data::v08.01"
/** @brief TSNM packet type */ #ifdef __cplusplus
enum extern "C"
{ {
TSMM_PACKET_TYPE_PRESENTATION_REQUEST = 1, #endif
TSMM_PACKET_TYPE_PRESENTATION_RESPONSE = 2,
TSMM_PACKET_TYPE_CLIENT_NOTIFICATION = 3,
TSMM_PACKET_TYPE_VIDEO_DATA = 4
};
/** @brief TSMM_PRESENTATION_REQUEST commands */ /** @brief TSNM packet type */
enum enum
{ {
TSMM_START_PRESENTATION = 1, TSMM_PACKET_TYPE_PRESENTATION_REQUEST = 1,
TSMM_STOP_PRESENTATION = 2 TSMM_PACKET_TYPE_PRESENTATION_RESPONSE = 2,
}; TSMM_PACKET_TYPE_CLIENT_NOTIFICATION = 3,
TSMM_PACKET_TYPE_VIDEO_DATA = 4
};
/** @brief presentation request struct */ /** @brief TSMM_PRESENTATION_REQUEST commands */
typedef struct enum
{ {
BYTE PresentationId; TSMM_START_PRESENTATION = 1,
BYTE Version; TSMM_STOP_PRESENTATION = 2
BYTE Command; };
BYTE FrameRate;
UINT32 SourceWidth, SourceHeight;
UINT32 ScaledWidth, ScaledHeight;
UINT64 hnsTimestampOffset;
UINT64 GeometryMappingId;
BYTE VideoSubtypeId[16];
UINT32 cbExtra;
BYTE* pExtraData;
} TSMM_PRESENTATION_REQUEST;
/** @brief response to a TSMM_PRESENTATION_REQUEST */ /** @brief presentation request struct */
typedef struct typedef struct
{ {
BYTE PresentationId; BYTE PresentationId;
} TSMM_PRESENTATION_RESPONSE; BYTE Version;
BYTE Command;
BYTE FrameRate;
UINT32 SourceWidth, SourceHeight;
UINT32 ScaledWidth, ScaledHeight;
UINT64 hnsTimestampOffset;
UINT64 GeometryMappingId;
BYTE VideoSubtypeId[16];
UINT32 cbExtra;
BYTE* pExtraData;
} TSMM_PRESENTATION_REQUEST;
/** @brief TSMM_VIDEO_DATA flags */ /** @brief response to a TSMM_PRESENTATION_REQUEST */
enum typedef struct
{ {
TSMM_VIDEO_DATA_FLAG_HAS_TIMESTAMPS = 0x01, BYTE PresentationId;
TSMM_VIDEO_DATA_FLAG_KEYFRAME = 0x02, } TSMM_PRESENTATION_RESPONSE;
TSMM_VIDEO_DATA_FLAG_NEW_FRAMERATE = 0x04
};
/** @brief a video data packet */ /** @brief TSMM_VIDEO_DATA flags */
typedef struct enum
{ {
BYTE PresentationId; TSMM_VIDEO_DATA_FLAG_HAS_TIMESTAMPS = 0x01,
BYTE Version; TSMM_VIDEO_DATA_FLAG_KEYFRAME = 0x02,
BYTE Flags; TSMM_VIDEO_DATA_FLAG_NEW_FRAMERATE = 0x04
UINT64 hnsTimestamp; };
UINT64 hnsDuration;
UINT16 CurrentPacketIndex;
UINT16 PacketsInSample;
UINT32 SampleNumber;
UINT32 cbSample;
BYTE* pSample;
} TSMM_VIDEO_DATA;
/** @brief values for NotificationType in TSMM_CLIENT_NOTIFICATION */ /** @brief a video data packet */
enum typedef struct
{ {
TSMM_CLIENT_NOTIFICATION_TYPE_NETWORK_ERROR = 1, BYTE PresentationId;
TSMM_CLIENT_NOTIFICATION_TYPE_FRAMERATE_OVERRIDE = 2 BYTE Version;
}; BYTE Flags;
UINT64 hnsTimestamp;
UINT64 hnsDuration;
UINT16 CurrentPacketIndex;
UINT16 PacketsInSample;
UINT32 SampleNumber;
UINT32 cbSample;
BYTE* pSample;
} TSMM_VIDEO_DATA;
/** @brief struct used when NotificationType is FRAMERATE_OVERRIDE */ /** @brief values for NotificationType in TSMM_CLIENT_NOTIFICATION */
typedef struct enum
{ {
UINT32 Flags; TSMM_CLIENT_NOTIFICATION_TYPE_NETWORK_ERROR = 1,
UINT32 DesiredFrameRate; TSMM_CLIENT_NOTIFICATION_TYPE_FRAMERATE_OVERRIDE = 2
} TSMM_CLIENT_NOTIFICATION_FRAMERATE_OVERRIDE; };
/** @brief a client to server notification struct */ /** @brief struct used when NotificationType is FRAMERATE_OVERRIDE */
typedef struct typedef struct
{ {
BYTE PresentationId; UINT32 Flags;
BYTE NotificationType; UINT32 DesiredFrameRate;
TSMM_CLIENT_NOTIFICATION_FRAMERATE_OVERRIDE FramerateOverride; } TSMM_CLIENT_NOTIFICATION_FRAMERATE_OVERRIDE;
} TSMM_CLIENT_NOTIFICATION;
/** @brief a client to server notification struct */
typedef struct
{
BYTE PresentationId;
BYTE NotificationType;
TSMM_CLIENT_NOTIFICATION_FRAMERATE_OVERRIDE FramerateOverride;
} TSMM_CLIENT_NOTIFICATION;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_VIDEO_H */ #endif /* FREERDP_CHANNEL_VIDEO_H */

View File

@ -25,15 +25,24 @@
#include <winpr/assert.h> #include <winpr/assert.h>
#include <freerdp/channels/ainput.h> #include <freerdp/channels/ainput.h>
typedef UINT (*pcAInputSendInputEvent)(AInputClientContext* context, UINT64 flags, INT32 x, #ifdef __cplusplus
INT32 y); extern "C"
struct ainput_client_context
{ {
void* handle; #endif
void* custom;
pcAInputSendInputEvent AInputSendInputEvent; typedef UINT (*pcAInputSendInputEvent)(AInputClientContext* context, UINT64 flags, INT32 x,
}; INT32 y);
struct ainput_client_context
{
void* handle;
void* custom;
pcAInputSendInputEvent AInputSendInputEvent;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_AINPUT_CLIENT_AINPUT_H */ #endif /* FREERDP_CHANNEL_AINPUT_CLIENT_AINPUT_H */

View File

@ -26,22 +26,28 @@
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#include <freerdp/codec/audio.h> #include <freerdp/codec/audio.h>
/** #ifdef __cplusplus
* Subsystem Interface extern "C"
*/
typedef UINT (*AudinReceive)(const AUDIO_FORMAT* format, const BYTE* data, size_t size,
void* userData);
typedef struct s_IAudinDevice IAudinDevice;
struct s_IAudinDevice
{ {
UINT (*Open)(IAudinDevice* devplugin, AudinReceive receive, void* userData); #endif
BOOL (*FormatSupported)(IAudinDevice* devplugin, const AUDIO_FORMAT* format);
UINT (*SetFormat)(IAudinDevice* devplugin, const AUDIO_FORMAT* format, UINT32 FramesPerPacket); /**
UINT (*Close)(IAudinDevice* devplugin); * Subsystem Interface
UINT (*Free)(IAudinDevice* devplugin); */
};
typedef UINT (*AudinReceive)(const AUDIO_FORMAT* format, const BYTE* data, size_t size,
void* userData);
typedef struct s_IAudinDevice IAudinDevice;
struct s_IAudinDevice
{
UINT (*Open)(IAudinDevice* devplugin, AudinReceive receive, void* userData);
BOOL (*FormatSupported)(IAudinDevice* devplugin, const AUDIO_FORMAT* format);
UINT(*SetFormat)
(IAudinDevice* devplugin, const AUDIO_FORMAT* format, UINT32 FramesPerPacket);
UINT (*Close)(IAudinDevice* devplugin);
UINT (*Free)(IAudinDevice* devplugin);
};
#define AUDIN_DEVICE_EXPORT_FUNC_NAME "freerdp_audin_client_subsystem_entry" #define AUDIN_DEVICE_EXPORT_FUNC_NAME "freerdp_audin_client_subsystem_entry"
@ -58,4 +64,8 @@ typedef FREERDP_AUDIN_DEVICE_ENTRY_POINTS* PFREERDP_AUDIN_DEVICE_ENTRY_POINTS;
typedef UINT (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints); typedef UINT (*PFREERDP_AUDIN_DEVICE_ENTRY)(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H */ #endif /* FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H */

View File

@ -25,47 +25,47 @@
#include <freerdp/addin.h> #include <freerdp/addin.h>
#include <freerdp/channels/channels.h> #include <freerdp/channels/channels.h>
typedef struct
{
IWTSVirtualChannelCallback iface;
IWTSPlugin* plugin;
IWTSVirtualChannelManager* channel_mgr;
IWTSVirtualChannel* channel;
} GENERIC_CHANNEL_CALLBACK;
typedef struct
{
IWTSListenerCallback iface;
IWTSPlugin* plugin;
IWTSVirtualChannelManager* channel_mgr;
IWTSVirtualChannel* channel;
GENERIC_CHANNEL_CALLBACK* channel_callback;
} GENERIC_LISTENER_CALLBACK;
typedef struct GENERIC_DYNVC_PLUGIN GENERIC_DYNVC_PLUGIN;
typedef UINT (*DYNVC_PLUGIN_INIT_FN)(GENERIC_DYNVC_PLUGIN* plugin, rdpContext* context,
rdpSettings* settings);
typedef void (*DYNVC_PLUGIN_TERMINATE_FN)(GENERIC_DYNVC_PLUGIN* plugin);
struct GENERIC_DYNVC_PLUGIN
{
IWTSPlugin iface;
GENERIC_LISTENER_CALLBACK* listener_callback;
IWTSListener* listener;
BOOL attached;
BOOL initialized;
wLog* log;
char* dynvc_name;
size_t channelCallbackSize;
const IWTSVirtualChannelCallback* channel_callbacks;
DYNVC_PLUGIN_TERMINATE_FN terminatePluginFn;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct
{
IWTSVirtualChannelCallback iface;
IWTSPlugin* plugin;
IWTSVirtualChannelManager* channel_mgr;
IWTSVirtualChannel* channel;
} GENERIC_CHANNEL_CALLBACK;
typedef struct
{
IWTSListenerCallback iface;
IWTSPlugin* plugin;
IWTSVirtualChannelManager* channel_mgr;
IWTSVirtualChannel* channel;
GENERIC_CHANNEL_CALLBACK* channel_callback;
} GENERIC_LISTENER_CALLBACK;
typedef struct GENERIC_DYNVC_PLUGIN GENERIC_DYNVC_PLUGIN;
typedef UINT (*DYNVC_PLUGIN_INIT_FN)(GENERIC_DYNVC_PLUGIN* plugin, rdpContext* context,
rdpSettings* settings);
typedef void (*DYNVC_PLUGIN_TERMINATE_FN)(GENERIC_DYNVC_PLUGIN* plugin);
struct GENERIC_DYNVC_PLUGIN
{
IWTSPlugin iface;
GENERIC_LISTENER_CALLBACK* listener_callback;
IWTSListener* listener;
BOOL attached;
BOOL initialized;
wLog* log;
char* dynvc_name;
size_t channelCallbackSize;
const IWTSVirtualChannelCallback* channel_callbacks;
DYNVC_PLUGIN_TERMINATE_FN terminatePluginFn;
};
#if defined(WITH_CHANNELS) #if defined(WITH_CHANNELS)
FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name, FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name,
const char* identifier); const char* identifier);

View File

@ -28,165 +28,174 @@
#include <freerdp/channels/cliprdr.h> #include <freerdp/channels/cliprdr.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
/** #ifdef __cplusplus
* Client Interface extern "C"
*/
typedef struct s_cliprdr_client_context CliprdrClientContext;
typedef UINT (*pcCliprdrServerCapabilities)(CliprdrClientContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*pcCliprdrClientCapabilities)(CliprdrClientContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*pcCliprdrMonitorReady)(CliprdrClientContext* context,
const CLIPRDR_MONITOR_READY* monitorReady);
typedef UINT (*pcCliprdrTempDirectory)(CliprdrClientContext* context,
const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
typedef UINT (*pcCliprdrClientFormatList)(CliprdrClientContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*pcCliprdrServerFormatList)(CliprdrClientContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*pcCliprdrClientFormatListResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*pcCliprdrServerFormatListResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*pcCliprdrClientLockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*pcCliprdrServerLockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*pcCliprdrClientUnlockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*pcCliprdrServerUnlockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*pcCliprdrClientFormatDataRequest)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*pcCliprdrServerFormatDataRequest)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*pcCliprdrClientFormatDataResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*pcCliprdrServerFormatDataResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*pcCliprdrClientFileContentsRequest)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*pcCliprdrServerFileContentsRequest)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*pcCliprdrClientFileContentsResponse)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
typedef UINT (*pcCliprdrServerFileContentsResponse)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
struct s_cliprdr_client_context
{ {
void* handle; #endif
void* custom;
pcCliprdrServerCapabilities ServerCapabilities; /**
pcCliprdrClientCapabilities ClientCapabilities; * Client Interface
pcCliprdrMonitorReady MonitorReady; */
pcCliprdrTempDirectory TempDirectory;
pcCliprdrClientFormatList ClientFormatList;
pcCliprdrServerFormatList ServerFormatList;
pcCliprdrClientFormatListResponse ClientFormatListResponse;
pcCliprdrServerFormatListResponse ServerFormatListResponse;
pcCliprdrClientLockClipboardData ClientLockClipboardData;
pcCliprdrServerLockClipboardData ServerLockClipboardData;
pcCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
pcCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
pcCliprdrClientFormatDataRequest ClientFormatDataRequest;
pcCliprdrServerFormatDataRequest ServerFormatDataRequest;
pcCliprdrClientFormatDataResponse ClientFormatDataResponse;
pcCliprdrServerFormatDataResponse ServerFormatDataResponse;
pcCliprdrClientFileContentsRequest ClientFileContentsRequest;
pcCliprdrServerFileContentsRequest ServerFileContentsRequest;
pcCliprdrClientFileContentsResponse ClientFileContentsResponse;
pcCliprdrServerFileContentsResponse ServerFileContentsResponse;
UINT32 lastRequestedFormatId; typedef struct s_cliprdr_client_context CliprdrClientContext;
rdpContext* rdpcontext;
};
typedef struct typedef UINT (*pcCliprdrServerCapabilities)(CliprdrClientContext* context,
{ const CLIPRDR_CAPABILITIES* capabilities);
UINT32 id; typedef UINT (*pcCliprdrClientCapabilities)(CliprdrClientContext* context,
char* name; const CLIPRDR_CAPABILITIES* capabilities);
int length; typedef UINT (*pcCliprdrMonitorReady)(CliprdrClientContext* context,
} CLIPRDR_FORMAT_NAME; const CLIPRDR_MONITOR_READY* monitorReady);
typedef UINT (*pcCliprdrTempDirectory)(CliprdrClientContext* context,
const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
typedef UINT (*pcCliprdrClientFormatList)(CliprdrClientContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*pcCliprdrServerFormatList)(CliprdrClientContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*pcCliprdrClientFormatListResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*pcCliprdrServerFormatListResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*pcCliprdrClientLockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*pcCliprdrServerLockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*pcCliprdrClientUnlockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*pcCliprdrServerUnlockClipboardData)(
CliprdrClientContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*pcCliprdrClientFormatDataRequest)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*pcCliprdrServerFormatDataRequest)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*pcCliprdrClientFormatDataResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*pcCliprdrServerFormatDataResponse)(
CliprdrClientContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*pcCliprdrClientFileContentsRequest)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*pcCliprdrServerFileContentsRequest)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*pcCliprdrClientFileContentsResponse)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
typedef UINT (*pcCliprdrServerFileContentsResponse)(
CliprdrClientContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
/** struct s_cliprdr_client_context
* Clipboard Events {
*/ void* handle;
void* custom;
typedef struct pcCliprdrServerCapabilities ServerCapabilities;
{ pcCliprdrClientCapabilities ClientCapabilities;
wMessage event; pcCliprdrMonitorReady MonitorReady;
UINT32 capabilities; pcCliprdrTempDirectory TempDirectory;
} RDP_CB_CLIP_CAPS; pcCliprdrClientFormatList ClientFormatList;
pcCliprdrServerFormatList ServerFormatList;
pcCliprdrClientFormatListResponse ClientFormatListResponse;
pcCliprdrServerFormatListResponse ServerFormatListResponse;
pcCliprdrClientLockClipboardData ClientLockClipboardData;
pcCliprdrServerLockClipboardData ServerLockClipboardData;
pcCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
pcCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
pcCliprdrClientFormatDataRequest ClientFormatDataRequest;
pcCliprdrServerFormatDataRequest ServerFormatDataRequest;
pcCliprdrClientFormatDataResponse ClientFormatDataResponse;
pcCliprdrServerFormatDataResponse ServerFormatDataResponse;
pcCliprdrClientFileContentsRequest ClientFileContentsRequest;
pcCliprdrServerFileContentsRequest ServerFileContentsRequest;
pcCliprdrClientFileContentsResponse ClientFileContentsResponse;
pcCliprdrServerFileContentsResponse ServerFileContentsResponse;
typedef struct UINT32 lastRequestedFormatId;
{ rdpContext* rdpcontext;
wMessage event; };
UINT32 capabilities;
} RDP_CB_MONITOR_READY_EVENT;
typedef struct typedef struct
{ {
wMessage event; UINT32 id;
UINT32* formats; char* name;
UINT16 num_formats; int length;
BYTE* raw_format_data; } CLIPRDR_FORMAT_NAME;
UINT32 raw_format_data_size;
BOOL raw_format_unicode;
} RDP_CB_FORMAT_LIST_EVENT;
typedef struct /**
{ * Clipboard Events
wMessage event; */
UINT32 format;
} RDP_CB_DATA_REQUEST_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
BYTE* data; UINT32 capabilities;
UINT32 size; } RDP_CB_CLIP_CAPS;
} RDP_CB_DATA_RESPONSE_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
UINT32 streamId; UINT32 capabilities;
UINT32 lindex; } RDP_CB_MONITOR_READY_EVENT;
UINT32 dwFlags;
UINT32 nPositionLow;
UINT32 nPositionHigh;
UINT32 cbRequested;
UINT32 clipDataId;
} RDP_CB_FILECONTENTS_REQUEST_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
BYTE* data; UINT32* formats;
UINT32 size; UINT16 num_formats;
UINT32 streamId; BYTE* raw_format_data;
} RDP_CB_FILECONTENTS_RESPONSE_EVENT; UINT32 raw_format_data_size;
BOOL raw_format_unicode;
} RDP_CB_FORMAT_LIST_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
UINT32 clipDataId; UINT32 format;
} RDP_CB_LOCK_CLIPDATA_EVENT; } RDP_CB_DATA_REQUEST_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
UINT32 clipDataId; BYTE* data;
} RDP_CB_UNLOCK_CLIPDATA_EVENT; UINT32 size;
} RDP_CB_DATA_RESPONSE_EVENT;
typedef struct typedef struct
{ {
wMessage event; wMessage event;
char dirname[520]; UINT32 streamId;
} RDP_CB_TEMPDIR_EVENT; UINT32 lindex;
UINT32 dwFlags;
UINT32 nPositionLow;
UINT32 nPositionHigh;
UINT32 cbRequested;
UINT32 clipDataId;
} RDP_CB_FILECONTENTS_REQUEST_EVENT;
typedef struct
{
wMessage event;
BYTE* data;
UINT32 size;
UINT32 streamId;
} RDP_CB_FILECONTENTS_RESPONSE_EVENT;
typedef struct
{
wMessage event;
UINT32 clipDataId;
} RDP_CB_LOCK_CLIPDATA_EVENT;
typedef struct
{
wMessage event;
UINT32 clipDataId;
} RDP_CB_UNLOCK_CLIPDATA_EVENT;
typedef struct
{
wMessage event;
char dirname[520];
} RDP_CB_TEMPDIR_EVENT;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H */ #endif /* FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H */

View File

@ -24,20 +24,29 @@
#include <freerdp/channels/disp.h> #include <freerdp/channels/disp.h>
typedef struct s_disp_client_context DispClientContext; #ifdef __cplusplus
extern "C"
typedef UINT (*pcDispCaps)(DispClientContext* context, UINT32 MaxNumMonitors,
UINT32 MaxMonitorAreaFactorA, UINT32 MaxMonitorAreaFactorB);
typedef UINT (*pcDispSendMonitorLayout)(DispClientContext* context, UINT32 NumMonitors,
DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors);
struct s_disp_client_context
{ {
void* handle; #endif
void* custom;
pcDispCaps DisplayControlCaps; typedef struct s_disp_client_context DispClientContext;
pcDispSendMonitorLayout SendMonitorLayout;
}; typedef UINT (*pcDispCaps)(DispClientContext* context, UINT32 MaxNumMonitors,
UINT32 MaxMonitorAreaFactorA, UINT32 MaxMonitorAreaFactorB);
typedef UINT (*pcDispSendMonitorLayout)(DispClientContext* context, UINT32 NumMonitors,
DISPLAY_CONTROL_MONITOR_LAYOUT* Monitors);
struct s_disp_client_context
{
void* handle;
void* custom;
pcDispCaps DisplayControlCaps;
pcDispSendMonitorLayout SendMonitorLayout;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_DISP_CLIENT_DISP_H */ #endif /* FREERDP_CHANNEL_DISP_CLIENT_DISP_H */

View File

@ -22,32 +22,41 @@
#ifndef FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H #ifndef FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H
#define FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H #define FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H
/** #ifdef __cplusplus
* Client Interface extern "C"
*/
typedef struct s_drdynvc_client_context DrdynvcClientContext;
typedef int (*pcDrdynvcGetVersion)(DrdynvcClientContext* context);
typedef UINT (*pcDrdynvcOnChannelConnected)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelDisconnected)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelAttached)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelDetached)(DrdynvcClientContext* context, const char* name,
void* pInterface);
struct s_drdynvc_client_context
{ {
void* handle; #endif
void* custom;
pcDrdynvcGetVersion GetVersion; /**
pcDrdynvcOnChannelConnected OnChannelConnected; * Client Interface
pcDrdynvcOnChannelDisconnected OnChannelDisconnected; */
pcDrdynvcOnChannelAttached OnChannelAttached;
pcDrdynvcOnChannelDetached OnChannelDetached; typedef struct s_drdynvc_client_context DrdynvcClientContext;
};
typedef int (*pcDrdynvcGetVersion)(DrdynvcClientContext* context);
typedef UINT (*pcDrdynvcOnChannelConnected)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelDisconnected)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelAttached)(DrdynvcClientContext* context, const char* name,
void* pInterface);
typedef UINT (*pcDrdynvcOnChannelDetached)(DrdynvcClientContext* context, const char* name,
void* pInterface);
struct s_drdynvc_client_context
{
void* handle;
void* custom;
pcDrdynvcGetVersion GetVersion;
pcDrdynvcOnChannelConnected OnChannelConnected;
pcDrdynvcOnChannelDisconnected OnChannelDisconnected;
pcDrdynvcOnChannelAttached OnChannelAttached;
pcDrdynvcOnChannelDetached OnChannelDetached;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H */ #endif /* FREERDP_CHANNEL_DRDYNVC_CLIENT_DRDYNVC_H */

View File

@ -24,55 +24,65 @@
#include <freerdp/channels/encomsp.h> #include <freerdp/channels/encomsp.h>
/** #ifdef __cplusplus
* Client Interface extern "C"
*/
typedef struct s_encomsp_client_context EncomspClientContext;
typedef UINT (*pcEncomspFilterUpdated)(EncomspClientContext* context,
const ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
typedef UINT (*pcEncomspApplicationCreated)(
EncomspClientContext* context, const ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
typedef UINT (*pcEncomspApplicationRemoved)(
EncomspClientContext* context, const ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
typedef UINT (*pcEncomspWindowCreated)(EncomspClientContext* context,
const ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
typedef UINT (*pcEncomspWindowRemoved)(EncomspClientContext* context,
const ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
typedef UINT (*pcEncomspShowWindow)(EncomspClientContext* context,
const ENCOMSP_SHOW_WINDOW_PDU* showWindow);
typedef UINT (*pcEncomspParticipantCreated)(
EncomspClientContext* context, const ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
typedef UINT (*pcEncomspParticipantRemoved)(
EncomspClientContext* context, const ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
typedef UINT (*pcEncomspChangeParticipantControlLevel)(
EncomspClientContext* context,
const ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
typedef UINT (*pcEncomspGraphicsStreamPaused)(
EncomspClientContext* context, const ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
typedef UINT (*pcEncomspGraphicsStreamResumed)(
EncomspClientContext* context,
const ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct s_encomsp_client_context
{ {
void* handle; #endif
void* custom;
pcEncomspFilterUpdated FilterUpdated; /**
pcEncomspApplicationCreated ApplicationCreated; * Client Interface
pcEncomspApplicationRemoved ApplicationRemoved; */
pcEncomspWindowCreated WindowCreated;
pcEncomspWindowRemoved WindowRemoved;
pcEncomspShowWindow ShowWindow;
pcEncomspParticipantCreated ParticipantCreated;
pcEncomspParticipantRemoved ParticipantRemoved;
pcEncomspChangeParticipantControlLevel ChangeParticipantControlLevel;
pcEncomspGraphicsStreamPaused GraphicsStreamPaused;
pcEncomspGraphicsStreamResumed GraphicsStreamResumed;
UINT32 participantId; typedef struct s_encomsp_client_context EncomspClientContext;
};
typedef UINT (*pcEncomspFilterUpdated)(EncomspClientContext* context,
const ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
typedef UINT (*pcEncomspApplicationCreated)(
EncomspClientContext* context, const ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
typedef UINT (*pcEncomspApplicationRemoved)(
EncomspClientContext* context, const ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
typedef UINT (*pcEncomspWindowCreated)(EncomspClientContext* context,
const ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
typedef UINT (*pcEncomspWindowRemoved)(EncomspClientContext* context,
const ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
typedef UINT (*pcEncomspShowWindow)(EncomspClientContext* context,
const ENCOMSP_SHOW_WINDOW_PDU* showWindow);
typedef UINT (*pcEncomspParticipantCreated)(
EncomspClientContext* context, const ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
typedef UINT (*pcEncomspParticipantRemoved)(
EncomspClientContext* context, const ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
typedef UINT (*pcEncomspChangeParticipantControlLevel)(
EncomspClientContext* context,
const ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
typedef UINT (*pcEncomspGraphicsStreamPaused)(
EncomspClientContext* context,
const ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
typedef UINT (*pcEncomspGraphicsStreamResumed)(
EncomspClientContext* context,
const ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct s_encomsp_client_context
{
void* handle;
void* custom;
pcEncomspFilterUpdated FilterUpdated;
pcEncomspApplicationCreated ApplicationCreated;
pcEncomspApplicationRemoved ApplicationRemoved;
pcEncomspWindowCreated WindowCreated;
pcEncomspWindowRemoved WindowRemoved;
pcEncomspShowWindow ShowWindow;
pcEncomspParticipantCreated ParticipantCreated;
pcEncomspParticipantRemoved ParticipantRemoved;
pcEncomspChangeParticipantControlLevel ChangeParticipantControlLevel;
pcEncomspGraphicsStreamPaused GraphicsStreamPaused;
pcEncomspGraphicsStreamResumed GraphicsStreamResumed;
UINT32 participantId;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H */ #endif /* FREERDP_CHANNEL_ENCOMSP_CLIENT_ENCOMSP_H */

View File

@ -26,14 +26,15 @@
/* Ignore invalid integer values */ /* Ignore invalid integer values */
#define RDP_FILE_FLAG_PARSE_INT_RELAXED 1 #define RDP_FILE_FLAG_PARSE_INT_RELAXED 1
typedef struct rdp_file rdpFile;
typedef BOOL (*rdp_file_fkt_parse)(void* context, const char* key, char type, const char* value);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_file rdpFile;
typedef BOOL (*rdp_file_fkt_parse)(void* context, const char* key, char type,
const char* value);
/* When using freerdp_client_parse_rdp_file_ex or freerdp_client_parse_rdp_file_buffer_ex /* When using freerdp_client_parse_rdp_file_ex or freerdp_client_parse_rdp_file_buffer_ex
* set the context for the callback with this function. */ * set the context for the callback with this function. */
FREERDP_API void freerdp_client_rdp_file_set_callback_context(rdpFile* file, void* context); FREERDP_API void freerdp_client_rdp_file_set_callback_context(rdpFile* file, void* context);

View File

@ -24,47 +24,48 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/channels/geometry.h> #include <freerdp/channels/geometry.h>
/**
* Client Interface
*/
typedef struct s_geometry_client_context GeometryClientContext;
typedef struct S_MAPPED_GEOMETRY MAPPED_GEOMETRY;
typedef BOOL (*pcMappedGeometryAdded)(GeometryClientContext* context, MAPPED_GEOMETRY* geometry);
typedef BOOL (*pcMappedGeometryUpdate)(MAPPED_GEOMETRY* geometry);
typedef BOOL (*pcMappedGeometryClear)(MAPPED_GEOMETRY* geometry);
/** @brief a geometry record tracked by the geometry channel */
struct S_MAPPED_GEOMETRY
{
volatile LONG refCounter;
UINT64 mappingId;
UINT64 topLevelId;
INT32 left, top, right, bottom;
INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
FREERDP_RGNDATA geometry;
void* custom;
pcMappedGeometryUpdate MappedGeometryUpdate;
pcMappedGeometryClear MappedGeometryClear;
};
/** @brief the geometry context for client channel */
struct s_geometry_client_context
{
wHashTable* geometries;
void* handle;
void* custom;
pcMappedGeometryAdded MappedGeometryAdded;
UINT32 remoteVersion;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Client Interface
*/
typedef struct s_geometry_client_context GeometryClientContext;
typedef struct S_MAPPED_GEOMETRY MAPPED_GEOMETRY;
typedef BOOL (*pcMappedGeometryAdded)(GeometryClientContext* context,
MAPPED_GEOMETRY* geometry);
typedef BOOL (*pcMappedGeometryUpdate)(MAPPED_GEOMETRY* geometry);
typedef BOOL (*pcMappedGeometryClear)(MAPPED_GEOMETRY* geometry);
/** @brief a geometry record tracked by the geometry channel */
struct S_MAPPED_GEOMETRY
{
volatile LONG refCounter;
UINT64 mappingId;
UINT64 topLevelId;
INT32 left, top, right, bottom;
INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
FREERDP_RGNDATA geometry;
void* custom;
pcMappedGeometryUpdate MappedGeometryUpdate;
pcMappedGeometryClear MappedGeometryClear;
};
/** @brief the geometry context for client channel */
struct s_geometry_client_context
{
wHashTable* geometries;
void* handle;
void* custom;
pcMappedGeometryAdded MappedGeometryAdded;
UINT32 remoteVersion;
};
FREERDP_API void mappedGeometryRef(MAPPED_GEOMETRY* g); FREERDP_API void mappedGeometryRef(MAPPED_GEOMETRY* g);
FREERDP_API void mappedGeometryUnref(MAPPED_GEOMETRY* g); FREERDP_API void mappedGeometryUnref(MAPPED_GEOMETRY* g);

View File

@ -25,56 +25,65 @@
#include <freerdp/channels/rdpdr.h> #include <freerdp/channels/rdpdr.h>
typedef struct rdp_printer_driver rdpPrinterDriver; #ifdef __cplusplus
typedef struct rdp_printer rdpPrinter; extern "C"
typedef struct rdp_print_job rdpPrintJob;
typedef void (*pcReferencePrinterDriver)(rdpPrinterDriver* driver);
typedef rdpPrinter** (*pcEnumPrinters)(rdpPrinterDriver* driver);
typedef void (*pcReleaseEnumPrinters)(rdpPrinter** printers);
typedef rdpPrinter* (*pcGetPrinter)(rdpPrinterDriver* driver, const char* name,
const char* driverName, BOOL isDefault);
typedef void (*pcReferencePrinter)(rdpPrinter* printer);
struct rdp_printer_driver
{ {
pcEnumPrinters EnumPrinters; #endif
pcReleaseEnumPrinters ReleaseEnumPrinters;
pcGetPrinter GetPrinter;
pcReferencePrinterDriver AddRef; typedef struct rdp_printer_driver rdpPrinterDriver;
pcReferencePrinterDriver ReleaseRef; typedef struct rdp_printer rdpPrinter;
}; typedef struct rdp_print_job rdpPrintJob;
typedef rdpPrintJob* (*pcCreatePrintJob)(rdpPrinter* printer, UINT32 id); typedef void (*pcReferencePrinterDriver)(rdpPrinterDriver* driver);
typedef rdpPrintJob* (*pcFindPrintJob)(rdpPrinter* printer, UINT32 id); typedef rdpPrinter** (*pcEnumPrinters)(rdpPrinterDriver* driver);
typedef void (*pcReleaseEnumPrinters)(rdpPrinter** printers);
struct rdp_printer typedef rdpPrinter* (*pcGetPrinter)(rdpPrinterDriver* driver, const char* name,
{ const char* driverName, BOOL isDefault);
size_t id; typedef void (*pcReferencePrinter)(rdpPrinter* printer);
char* name;
char* driver;
BOOL is_default;
size_t references; struct rdp_printer_driver
rdpPrinterDriver* backend; {
pcCreatePrintJob CreatePrintJob; pcEnumPrinters EnumPrinters;
pcFindPrintJob FindPrintJob; pcReleaseEnumPrinters ReleaseEnumPrinters;
pcReferencePrinter AddRef; pcGetPrinter GetPrinter;
pcReferencePrinter ReleaseRef;
};
typedef UINT (*pcWritePrintJob)(rdpPrintJob* printjob, const BYTE* data, size_t size); pcReferencePrinterDriver AddRef;
typedef void (*pcClosePrintJob)(rdpPrintJob* printjob); pcReferencePrinterDriver ReleaseRef;
};
struct rdp_print_job typedef rdpPrintJob* (*pcCreatePrintJob)(rdpPrinter* printer, UINT32 id);
{ typedef rdpPrintJob* (*pcFindPrintJob)(rdpPrinter* printer, UINT32 id);
UINT32 id;
rdpPrinter* printer;
pcWritePrintJob Write; struct rdp_printer
pcClosePrintJob Close; {
}; size_t id;
char* name;
char* driver;
BOOL is_default;
size_t references;
rdpPrinterDriver* backend;
pcCreatePrintJob CreatePrintJob;
pcFindPrintJob FindPrintJob;
pcReferencePrinter AddRef;
pcReferencePrinter ReleaseRef;
};
typedef UINT (*pcWritePrintJob)(rdpPrintJob* printjob, const BYTE* data, size_t size);
typedef void (*pcClosePrintJob)(rdpPrintJob* printjob);
struct rdp_print_job
{
UINT32 id;
rdpPrinter* printer;
pcWritePrintJob Write;
pcClosePrintJob Close;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H */ #endif /* FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H */

View File

@ -24,65 +24,75 @@
#include <freerdp/channels/rdpei.h> #include <freerdp/channels/rdpei.h>
/** #ifdef __cplusplus
* Client Interface extern "C"
*/
typedef struct s_rdpei_client_context RdpeiClientContext;
typedef UINT32 (*pcRdpeiGetVersion)(RdpeiClientContext* context);
typedef UINT32 (*pcRdpeiGetFeatures)(RdpeiClientContext* context);
typedef UINT (*pcRdpeiAddContact)(RdpeiClientContext* context,
const RDPINPUT_CONTACT_DATA* contact);
typedef UINT (*pcRdpeiTouchEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x, INT32 y,
INT32* contactId);
typedef UINT (*pcRdpeiTouchRawEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x,
INT32 y, INT32* contactId, UINT32 contactFlags,
UINT32 fieldFlags, ...);
typedef UINT (*pcRdpeiAddPen)(RdpeiClientContext* context, INT32 externalId,
const RDPINPUT_PEN_CONTACT* contact);
typedef UINT (*pcRdpeiPen)(RdpeiClientContext* context, INT32 externalId, UINT32 fieldFlags,
INT32 x, INT32 y, ...);
typedef UINT (*pcRdpeiPenRawEvent)(RdpeiClientContext* context, INT32 externalId,
UINT32 contactFlags, UINT32 fieldFlags, INT32 x, INT32 y, ...);
typedef UINT (*pcRdpeiSuspendTouch)(RdpeiClientContext* context);
typedef UINT (*pcRdpeiResumeTouch)(RdpeiClientContext* context);
struct s_rdpei_client_context
{ {
void* handle; #endif
void* custom;
pcRdpeiGetVersion GetVersion; /**
pcRdpeiGetFeatures GetFeatures; * Client Interface
*/
pcRdpeiAddContact AddContact; typedef struct s_rdpei_client_context RdpeiClientContext;
pcRdpeiTouchEvent TouchBegin; typedef UINT32 (*pcRdpeiGetVersion)(RdpeiClientContext* context);
pcRdpeiTouchEvent TouchUpdate; typedef UINT32 (*pcRdpeiGetFeatures)(RdpeiClientContext* context);
pcRdpeiTouchEvent TouchEnd;
pcRdpeiAddPen AddPen; typedef UINT (*pcRdpeiAddContact)(RdpeiClientContext* context,
const RDPINPUT_CONTACT_DATA* contact);
pcRdpeiPen PenBegin; typedef UINT (*pcRdpeiTouchEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x,
pcRdpeiPen PenUpdate; INT32 y, INT32* contactId);
pcRdpeiPen PenEnd; typedef UINT (*pcRdpeiTouchRawEvent)(RdpeiClientContext* context, INT32 externalId, INT32 x,
INT32 y, INT32* contactId, UINT32 contactFlags,
UINT32 fieldFlags, ...);
pcRdpeiSuspendTouch SuspendTouch; typedef UINT (*pcRdpeiAddPen)(RdpeiClientContext* context, INT32 externalId,
pcRdpeiResumeTouch ResumeTouch; const RDPINPUT_PEN_CONTACT* contact);
pcRdpeiTouchEvent TouchCancel; typedef UINT (*pcRdpeiPen)(RdpeiClientContext* context, INT32 externalId, UINT32 fieldFlags,
pcRdpeiTouchRawEvent TouchRawEvent; INT32 x, INT32 y, ...);
typedef UINT (*pcRdpeiPenRawEvent)(RdpeiClientContext* context, INT32 externalId,
UINT32 contactFlags, UINT32 fieldFlags, INT32 x, INT32 y,
...);
pcRdpeiPen PenCancel; typedef UINT (*pcRdpeiSuspendTouch)(RdpeiClientContext* context);
pcRdpeiPenRawEvent PenRawEvent; typedef UINT (*pcRdpeiResumeTouch)(RdpeiClientContext* context);
UINT32 clientFeaturesMask; struct s_rdpei_client_context
}; {
void* handle;
void* custom;
pcRdpeiGetVersion GetVersion;
pcRdpeiGetFeatures GetFeatures;
pcRdpeiAddContact AddContact;
pcRdpeiTouchEvent TouchBegin;
pcRdpeiTouchEvent TouchUpdate;
pcRdpeiTouchEvent TouchEnd;
pcRdpeiAddPen AddPen;
pcRdpeiPen PenBegin;
pcRdpeiPen PenUpdate;
pcRdpeiPen PenEnd;
pcRdpeiSuspendTouch SuspendTouch;
pcRdpeiResumeTouch ResumeTouch;
pcRdpeiTouchEvent TouchCancel;
pcRdpeiTouchRawEvent TouchRawEvent;
pcRdpeiPen PenCancel;
pcRdpeiPenRawEvent PenRawEvent;
UINT32 clientFeaturesMask;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H */ #endif /* FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H */

View File

@ -28,147 +28,151 @@
#include <freerdp/cache/persistent.h> #include <freerdp/cache/persistent.h>
/**
* Client Interface
*/
typedef struct gdi_gfx_surface gdiGfxSurface;
typedef struct s_rdpgfx_client_context RdpgfxClientContext;
typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context,
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context,
const RDPGFX_START_FRAME_PDU* startFrame);
typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_COMMAND* cmd);
typedef UINT (*pcRdpgfxDeleteEncodingContext)(
RdpgfxClientContext* context, const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context,
const RDPGFX_CREATE_SURFACE_PDU* createSurface);
typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context,
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context,
const RDPGFX_SOLID_FILL_PDU* solidFill);
typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context,
const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context,
const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context,
const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
typedef UINT (*pcRdpgfxImportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry);
typedef UINT (*pcRdpgfxExportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry);
typedef UINT (*pcRdpgfxMapSurfaceToOutput)(RdpgfxClientContext* context,
const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*pcRdpgfxMapSurfaceToScaledOutput)(
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*pcRdpgfxMapSurfaceToWindow)(RdpgfxClientContext* context,
const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
typedef UINT (*pcRdpgfxMapSurfaceToScaledWindow)(
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId, void* pData);
typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds,
UINT16* count);
typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot,
void* pData);
typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
typedef UINT (*pcRdpgfxUpdateSurfaces)(RdpgfxClientContext* context);
typedef UINT (*pcRdpgfxUpdateWindowFromSurface)(RdpgfxClientContext* context,
gdiGfxSurface* surface);
typedef UINT (*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
UINT32 nrRects, const RECTANGLE_16* rects);
typedef UINT (*pcRdpgfxOnOpen)(RdpgfxClientContext* context, BOOL* do_caps_advertise,
BOOL* do_frame_acks);
typedef UINT (*pcRdpgfxOnClose)(RdpgfxClientContext* context);
typedef UINT (*pcRdpgfxCapsAdvertise)(RdpgfxClientContext* context,
const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
typedef UINT (*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
typedef UINT (*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
typedef UINT (*pcRdpgfxQoeFrameAcknowledge)(
RdpgfxClientContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
typedef UINT (*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
UINT64 windowID);
typedef UINT (*pcRdpgfxUnmapWindowForSurface)(RdpgfxClientContext* context, UINT64 windowID);
struct s_rdpgfx_client_context
{
void* handle;
void* custom;
/* Implementations require locking */
pcRdpgfxResetGraphics ResetGraphics;
pcRdpgfxStartFrame StartFrame;
pcRdpgfxEndFrame EndFrame;
pcRdpgfxSurfaceCommand SurfaceCommand;
pcRdpgfxDeleteEncodingContext DeleteEncodingContext;
pcRdpgfxCreateSurface CreateSurface;
pcRdpgfxDeleteSurface DeleteSurface;
pcRdpgfxSolidFill SolidFill;
pcRdpgfxSurfaceToSurface SurfaceToSurface;
pcRdpgfxSurfaceToCache SurfaceToCache;
pcRdpgfxCacheToSurface CacheToSurface;
pcRdpgfxCacheImportOffer CacheImportOffer;
pcRdpgfxCacheImportReply CacheImportReply;
pcRdpgfxImportCacheEntry ImportCacheEntry;
pcRdpgfxExportCacheEntry ExportCacheEntry;
pcRdpgfxEvictCacheEntry EvictCacheEntry;
pcRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
pcRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
pcRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
pcRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
pcRdpgfxGetSurfaceIds GetSurfaceIds;
pcRdpgfxSetSurfaceData SetSurfaceData;
pcRdpgfxGetSurfaceData GetSurfaceData;
pcRdpgfxSetCacheSlotData SetCacheSlotData;
pcRdpgfxGetCacheSlotData GetCacheSlotData;
/* Proxy callbacks */
pcRdpgfxOnOpen OnOpen;
pcRdpgfxOnClose OnClose;
pcRdpgfxCapsAdvertise CapsAdvertise;
pcRdpgfxCapsConfirm CapsConfirm;
pcRdpgfxFrameAcknowledge FrameAcknowledge;
pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
/* No locking required */
pcRdpgfxUpdateSurfaces UpdateSurfaces;
pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
pcRdpgfxUpdateWindowFromSurface UpdateWindowFromSurface;
/* These callbacks allow creating/destroying a window directly
* mapped to a surface.
* NOTE: The surface is already locked.
*/
pcRdpgfxMapWindowForSurface MapWindowForSurface;
pcRdpgfxUnmapWindowForSurface UnmapWindowForSurface;
CRITICAL_SECTION mux;
rdpCodecs* codecs;
PROFILER_DEFINE(SurfaceProfiler)
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Client Interface
*/
typedef struct gdi_gfx_surface gdiGfxSurface;
typedef struct s_rdpgfx_client_context RdpgfxClientContext;
typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context,
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context,
const RDPGFX_START_FRAME_PDU* startFrame);
typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_COMMAND* cmd);
typedef UINT (*pcRdpgfxDeleteEncodingContext)(
RdpgfxClientContext* context,
const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context,
const RDPGFX_CREATE_SURFACE_PDU* createSurface);
typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context,
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context,
const RDPGFX_SOLID_FILL_PDU* solidFill);
typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context,
const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context,
const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context,
const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context,
const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
typedef UINT (*pcRdpgfxImportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry);
typedef UINT (*pcRdpgfxExportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
PERSISTENT_CACHE_ENTRY* importCacheEntry);
typedef UINT (*pcRdpgfxMapSurfaceToOutput)(
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*pcRdpgfxMapSurfaceToScaledOutput)(
RdpgfxClientContext* context,
const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*pcRdpgfxMapSurfaceToWindow)(
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
typedef UINT (*pcRdpgfxMapSurfaceToScaledWindow)(
RdpgfxClientContext* context,
const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId,
void* pData);
typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds,
UINT16* count);
typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot,
void* pData);
typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
typedef UINT (*pcRdpgfxUpdateSurfaces)(RdpgfxClientContext* context);
typedef UINT (*pcRdpgfxUpdateWindowFromSurface)(RdpgfxClientContext* context,
gdiGfxSurface* surface);
typedef UINT (*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
UINT32 nrRects, const RECTANGLE_16* rects);
typedef UINT (*pcRdpgfxOnOpen)(RdpgfxClientContext* context, BOOL* do_caps_advertise,
BOOL* do_frame_acks);
typedef UINT (*pcRdpgfxOnClose)(RdpgfxClientContext* context);
typedef UINT (*pcRdpgfxCapsAdvertise)(RdpgfxClientContext* context,
const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
typedef UINT (*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
typedef UINT (*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
typedef UINT (*pcRdpgfxQoeFrameAcknowledge)(
RdpgfxClientContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
typedef UINT (*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
UINT64 windowID);
typedef UINT (*pcRdpgfxUnmapWindowForSurface)(RdpgfxClientContext* context, UINT64 windowID);
struct s_rdpgfx_client_context
{
void* handle;
void* custom;
/* Implementations require locking */
pcRdpgfxResetGraphics ResetGraphics;
pcRdpgfxStartFrame StartFrame;
pcRdpgfxEndFrame EndFrame;
pcRdpgfxSurfaceCommand SurfaceCommand;
pcRdpgfxDeleteEncodingContext DeleteEncodingContext;
pcRdpgfxCreateSurface CreateSurface;
pcRdpgfxDeleteSurface DeleteSurface;
pcRdpgfxSolidFill SolidFill;
pcRdpgfxSurfaceToSurface SurfaceToSurface;
pcRdpgfxSurfaceToCache SurfaceToCache;
pcRdpgfxCacheToSurface CacheToSurface;
pcRdpgfxCacheImportOffer CacheImportOffer;
pcRdpgfxCacheImportReply CacheImportReply;
pcRdpgfxImportCacheEntry ImportCacheEntry;
pcRdpgfxExportCacheEntry ExportCacheEntry;
pcRdpgfxEvictCacheEntry EvictCacheEntry;
pcRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
pcRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
pcRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
pcRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
pcRdpgfxGetSurfaceIds GetSurfaceIds;
pcRdpgfxSetSurfaceData SetSurfaceData;
pcRdpgfxGetSurfaceData GetSurfaceData;
pcRdpgfxSetCacheSlotData SetCacheSlotData;
pcRdpgfxGetCacheSlotData GetCacheSlotData;
/* Proxy callbacks */
pcRdpgfxOnOpen OnOpen;
pcRdpgfxOnClose OnClose;
pcRdpgfxCapsAdvertise CapsAdvertise;
pcRdpgfxCapsConfirm CapsConfirm;
pcRdpgfxFrameAcknowledge FrameAcknowledge;
pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
/* No locking required */
pcRdpgfxUpdateSurfaces UpdateSurfaces;
pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
pcRdpgfxUpdateWindowFromSurface UpdateWindowFromSurface;
/* These callbacks allow creating/destroying a window directly
* mapped to a surface.
* NOTE: The surface is already locked.
*/
pcRdpgfxMapWindowForSurface MapWindowForSurface;
pcRdpgfxUnmapWindowForSurface UnmapWindowForSurface;
CRITICAL_SECTION mux;
rdpCodecs* codecs;
PROFILER_DEFINE(SurfaceProfiler)
};
FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context); FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context);
FREERDP_API void rdpgfx_client_context_free(RdpgfxClientContext* context); FREERDP_API void rdpgfx_client_context_free(RdpgfxClientContext* context);

View File

@ -22,14 +22,23 @@
#include <freerdp/channels/remdesk.h> #include <freerdp/channels/remdesk.h>
/** #ifdef __cplusplus
* Client Interface extern "C"
*/
typedef struct
{ {
void* handle; #endif
void* custom;
} RemdeskClientContext; /**
* Client Interface
*/
typedef struct
{
void* handle;
void* custom;
} RemdeskClientContext;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_REMDESK_CLIENT_REMDESK_H */ #endif /* FREERDP_CHANNEL_REMDESK_CLIENT_REMDESK_H */

View File

@ -26,61 +26,70 @@
#include <freerdp/channels/cliprdr.h> #include <freerdp/channels/cliprdr.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
typedef struct #ifdef __cplusplus
extern "C"
{ {
int ProtocolVersion; #endif
int MaxConnections;
} SSHAgentClientContext;
/* typedef struct
* The channel is defined by the sshagent channel in xrdp as follows. {
* int ProtocolVersion;
* Server to client commands int MaxConnections;
* ------------------------- } SSHAgentClientContext;
*
* Capabilities (at start of channel stream): /*
* * The channel is defined by the sshagent channel in xrdp as follows.
* INT32 SA_TAG_CAPABILITY *
* INT32 SSHAGENT_CHAN_PROT_VERSION := 1 * Server to client commands
* INT32 SSHAGENT_MAX_CONNECTIONS * -------------------------
* *
* Open connection: * Capabilities (at start of channel stream):
* *
* INT32 SA_TAG_OPEN * INT32 SA_TAG_CAPABILITY
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1) * INT32 SSHAGENT_CHAN_PROT_VERSION := 1
* * INT32 SSHAGENT_MAX_CONNECTIONS
* Send data: *
* * Open connection:
* INT32 SA_TAG_WRITE *
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1) * INT32 SA_TAG_OPEN
* INT32 Data length * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
* DATA ... *
* * Send data:
* Close connection: *
* * INT32 SA_TAG_WRITE
* INT32 SA_TAG_CLOSE * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1) * INT32 Data length
* * DATA ...
* Client to server commands *
* ------------------------- * Close connection:
* *
* Capabilities (in reply to server capabilities): * INT32 SA_TAG_CLOSE
* * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
* INT32 SA_TAG_CAPABILITY *
* INT32 SSHAGENT_CHAN_PROT_VERSION := 1 * Client to server commands
* INT32 SSHAGENT_MAX_CONNECTIONS * -------------------------
* *
* Send data: * Capabilities (in reply to server capabilities):
* *
* INT32 SA_TAG_WRITE * INT32 SA_TAG_CAPABILITY
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1) * INT32 SSHAGENT_CHAN_PROT_VERSION := 1
* INT32 Data length * INT32 SSHAGENT_MAX_CONNECTIONS
* DATA ... *
* * Send data:
* Close connection (abnormal): *
* * INT32 SA_TAG_WRITE
* INT32 SA_TAG_CLOSE * INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1) * INT32 Data length
*/ * DATA ...
*
* Close connection (abnormal):
*
* INT32 SA_TAG_CLOSE
* INT32 Connection id (0, ..., SSHAGENT_MAX_CONNECTIONS - 1)
*/
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_CLIENT_SSHAGENT_H */ #endif /* FREERDP_CHANNEL_CLIENT_SSHAGENT_H */

View File

@ -36,35 +36,44 @@
#define RDP_PIXFMT_I420 0x30323449 #define RDP_PIXFMT_I420 0x30323449
#define RDP_PIXFMT_YV12 0x32315659 #define RDP_PIXFMT_YV12 0x32315659
typedef struct #ifdef __cplusplus
extern "C"
{ {
BYTE* frameData; #endif
UINT32 frameSize;
UINT32 framePixFmt;
INT16 frameWidth;
INT16 frameHeight;
INT16 x;
INT16 y;
INT16 width;
INT16 height;
UINT16 numVisibleRects;
RECTANGLE_16* visibleRects;
} TSMF_VIDEO_FRAME_EVENT;
/** typedef struct
* Client Interface {
*/ BYTE* frameData;
UINT32 frameSize;
UINT32 framePixFmt;
INT16 frameWidth;
INT16 frameHeight;
INT16 x;
INT16 y;
INT16 width;
INT16 height;
UINT16 numVisibleRects;
RECTANGLE_16* visibleRects;
} TSMF_VIDEO_FRAME_EVENT;
typedef struct s_tsmf_client_context TsmfClientContext; /**
* Client Interface
*/
typedef int (*pcTsmfFrameEvent)(TsmfClientContext* context, TSMF_VIDEO_FRAME_EVENT* event); typedef struct s_tsmf_client_context TsmfClientContext;
struct s_tsmf_client_context typedef int (*pcTsmfFrameEvent)(TsmfClientContext* context, TSMF_VIDEO_FRAME_EVENT* event);
{
void* handle;
void* custom;
pcTsmfFrameEvent FrameEvent; struct s_tsmf_client_context
}; {
void* handle;
void* custom;
pcTsmfFrameEvent FrameEvent;
};
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_TSMF_H */ #endif /* FREERDP_CHANNEL_TSMF_CLIENT_TSMF_H */

View File

@ -25,8 +25,9 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#ifdef _WIN32 #ifdef __cplusplus
#include <mmreg.h> extern "C"
{
#endif #endif
struct AUDIO_FORMAT struct AUDIO_FORMAT
@ -191,11 +192,6 @@ typedef struct AUDIO_FORMAT AUDIO_FORMAT;
* Audio Format Functions * Audio Format Functions
*/ */
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API UINT32 audio_format_compute_time_length(const AUDIO_FORMAT* format, size_t size); FREERDP_API UINT32 audio_format_compute_time_length(const AUDIO_FORMAT* format, size_t size);
FREERDP_API char* audio_format_get_tag_string(UINT16 wFormatTag); FREERDP_API char* audio_format_get_tag_string(UINT16 wFormatTag);

View File

@ -26,13 +26,13 @@
#include <freerdp/codec/nsc.h> #include <freerdp/codec/nsc.h>
#include <freerdp/codec/color.h> #include <freerdp/codec/color.h>
typedef struct S_CLEAR_CONTEXT CLEAR_CONTEXT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_CLEAR_CONTEXT CLEAR_CONTEXT;
FREERDP_API int clear_compress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize, FREERDP_API int clear_compress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, UINT32* pDstSize); BYTE** ppDstData, UINT32* pDstSize);

View File

@ -24,6 +24,11 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define FREERDP_PIXEL_FORMAT_TYPE_A 0 #define FREERDP_PIXEL_FORMAT_TYPE_A 0
#define FREERDP_PIXEL_FORMAT_TYPE_ARGB 1 #define FREERDP_PIXEL_FORMAT_TYPE_ARGB 1
#define FREERDP_PIXEL_FORMAT_TYPE_ABGR 2 #define FREERDP_PIXEL_FORMAT_TYPE_ABGR 2
@ -102,11 +107,6 @@ struct gdi_palette
}; };
typedef struct gdi_palette gdiPalette; typedef struct gdi_palette gdiPalette;
#ifdef __cplusplus
extern "C"
{
#endif
/* Compare two color formats but ignore differences in alpha channel. /* Compare two color formats but ignore differences in alpha channel.
*/ */
FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second); FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second);

View File

@ -25,13 +25,13 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/codec/audio.h> #include <freerdp/codec/audio.h>
typedef struct S_FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT;
FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(BOOL encoder); FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(BOOL encoder);
FREERDP_API BOOL freerdp_dsp_supports_format(const AUDIO_FORMAT* format, BOOL encode); FREERDP_API BOOL freerdp_dsp_supports_format(const AUDIO_FORMAT* format, BOOL encode);
FREERDP_API BOOL freerdp_dsp_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* srcFormat, FREERDP_API BOOL freerdp_dsp_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* srcFormat,

View File

@ -26,55 +26,55 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/channels/rdpgfx.h> #include <freerdp/channels/rdpgfx.h>
typedef struct S_H264_CONTEXT_SUBSYSTEM H264_CONTEXT_SUBSYSTEM;
typedef struct S_YUV_CONTEXT YUV_CONTEXT;
typedef enum
{
H264_RATECONTROL_VBR = 0,
H264_RATECONTROL_CQP
} H264_RATECONTROL_MODE;
typedef struct
{
BOOL Compressor;
UINT32 width;
UINT32 height;
H264_RATECONTROL_MODE RateControlMode;
UINT32 BitRate;
UINT32 FrameRate;
UINT32 QP;
UINT32 NumberOfThreads;
UINT32 iStride[3];
BYTE* pOldYUVData[3];
BYTE* pYUVData[3];
UINT32 iYUV444Size[3];
UINT32 iYUV444Stride[3];
BYTE* pOldYUV444Data[3];
BYTE* pYUV444Data[3];
UINT32 numSystemData;
void* pSystemData;
const H264_CONTEXT_SUBSYSTEM* subsystem;
YUV_CONTEXT* yuv;
BOOL encodingBuffer;
BOOL firstLumaFrameDone;
BOOL firstChromaFrameDone;
void* lumaData;
wLog* log;
} H264_CONTEXT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_H264_CONTEXT_SUBSYSTEM H264_CONTEXT_SUBSYSTEM;
typedef struct S_YUV_CONTEXT YUV_CONTEXT;
typedef enum
{
H264_RATECONTROL_VBR = 0,
H264_RATECONTROL_CQP
} H264_RATECONTROL_MODE;
typedef struct
{
BOOL Compressor;
UINT32 width;
UINT32 height;
H264_RATECONTROL_MODE RateControlMode;
UINT32 BitRate;
UINT32 FrameRate;
UINT32 QP;
UINT32 NumberOfThreads;
UINT32 iStride[3];
BYTE* pOldYUVData[3];
BYTE* pYUVData[3];
UINT32 iYUV444Size[3];
UINT32 iYUV444Stride[3];
BYTE* pOldYUV444Data[3];
BYTE* pYUV444Data[3];
UINT32 numSystemData;
void* pSystemData;
const H264_CONTEXT_SUBSYSTEM* subsystem;
YUV_CONTEXT* yuv;
BOOL encodingBuffer;
BOOL firstLumaFrameDone;
BOOL firstChromaFrameDone;
void* lumaData;
wLog* log;
} H264_CONTEXT;
static INLINE void free_h264_metablock(RDPGFX_H264_METABLOCK* meta) static INLINE void free_h264_metablock(RDPGFX_H264_METABLOCK* meta)
{ {
RDPGFX_H264_METABLOCK m = { 0 }; RDPGFX_H264_METABLOCK m = { 0 };

View File

@ -26,13 +26,13 @@
#include <freerdp/codec/color.h> #include <freerdp/codec/color.h>
#include <freerdp/codec/bitmap.h> #include <freerdp/codec/bitmap.h>
typedef struct S_BITMAP_INTERLEAVED_CONTEXT BITMAP_INTERLEAVED_CONTEXT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_BITMAP_INTERLEAVED_CONTEXT BITMAP_INTERLEAVED_CONTEXT;
FREERDP_API BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved, FREERDP_API BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
const BYTE* pSrcData, UINT32 SrcSize, UINT32 nSrcWidth, const BYTE* pSrcData, UINT32 SrcSize, UINT32 nSrcWidth,
UINT32 nSrcHeight, UINT32 bpp, BYTE* pDstData, UINT32 nSrcHeight, UINT32 bpp, BYTE* pDstData,

View File

@ -24,8 +24,6 @@
#include <winpr/crt.h> #include <winpr/crt.h>
typedef struct S_BITMAP_PLANAR_CONTEXT BITMAP_PLANAR_CONTEXT;
#include <freerdp/codec/color.h> #include <freerdp/codec/color.h>
#include <freerdp/codec/bitmap.h> #include <freerdp/codec/bitmap.h>
@ -40,70 +38,72 @@ typedef struct S_BITMAP_PLANAR_CONTEXT BITMAP_PLANAR_CONTEXT;
#define PLANAR_CONTROL_BYTE_RUN_LENGTH(_controlByte) (_controlByte & 0x0F) #define PLANAR_CONTROL_BYTE_RUN_LENGTH(_controlByte) (_controlByte & 0x0F)
#define PLANAR_CONTROL_BYTE_RAW_BYTES(_controlByte) ((_controlByte >> 4) & 0x0F) #define PLANAR_CONTROL_BYTE_RAW_BYTES(_controlByte) ((_controlByte >> 4) & 0x0F)
typedef struct
{
/**
* controlByte:
* [0-3]: nRunLength
* [4-7]: cRawBytes
*/
BYTE controlByte;
BYTE* rawValues;
} RDP6_RLE_SEGMENT;
typedef struct
{
UINT32 cSegments;
RDP6_RLE_SEGMENT* segments;
} RDP6_RLE_SEGMENTS;
typedef struct
{
/**
* formatHeader:
* [0-2]: Color Loss Level (CLL)
* [3] : Chroma Subsampling (CS)
* [4] : Run Length Encoding (RLE)
* [5] : No Alpha (NA)
* [6-7]: Reserved
*/
BYTE formatHeader;
} RDP6_BITMAP_STREAM;
struct S_BITMAP_PLANAR_CONTEXT
{
UINT32 maxWidth;
UINT32 maxHeight;
UINT32 maxPlaneSize;
BOOL AllowSkipAlpha;
BOOL AllowRunLengthEncoding;
BOOL AllowColorSubsampling;
BOOL AllowDynamicColorFidelity;
UINT32 ColorLossLevel;
BYTE* planes[4];
BYTE* planesBuffer;
BYTE* deltaPlanes[4];
BYTE* deltaPlanesBuffer;
BYTE* rlePlanes[4];
BYTE* rlePlanesBuffer;
BYTE* pTempData;
UINT32 nTempStep;
BOOL bgr;
BOOL topdown;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_BITMAP_PLANAR_CONTEXT BITMAP_PLANAR_CONTEXT;
typedef struct
{
/**
* controlByte:
* [0-3]: nRunLength
* [4-7]: cRawBytes
*/
BYTE controlByte;
BYTE* rawValues;
} RDP6_RLE_SEGMENT;
typedef struct
{
UINT32 cSegments;
RDP6_RLE_SEGMENT* segments;
} RDP6_RLE_SEGMENTS;
typedef struct
{
/**
* formatHeader:
* [0-2]: Color Loss Level (CLL)
* [3] : Chroma Subsampling (CS)
* [4] : Run Length Encoding (RLE)
* [5] : No Alpha (NA)
* [6-7]: Reserved
*/
BYTE formatHeader;
} RDP6_BITMAP_STREAM;
struct S_BITMAP_PLANAR_CONTEXT
{
UINT32 maxWidth;
UINT32 maxHeight;
UINT32 maxPlaneSize;
BOOL AllowSkipAlpha;
BOOL AllowRunLengthEncoding;
BOOL AllowColorSubsampling;
BOOL AllowDynamicColorFidelity;
UINT32 ColorLossLevel;
BYTE* planes[4];
BYTE* planesBuffer;
BYTE* deltaPlanes[4];
BYTE* deltaPlanesBuffer;
BYTE* rlePlanes[4];
BYTE* rlePlanesBuffer;
BYTE* pTempData;
UINT32 nTempStep;
BOOL bgr;
BOOL topdown;
};
FREERDP_API BYTE* freerdp_bitmap_compress_planar(BITMAP_PLANAR_CONTEXT* context, FREERDP_API BYTE* freerdp_bitmap_compress_planar(BITMAP_PLANAR_CONTEXT* context,
const BYTE* data, UINT32 format, UINT32 width, const BYTE* data, UINT32 format, UINT32 width,
UINT32 height, UINT32 scanline, BYTE* dstData, UINT32 height, UINT32 scanline, BYTE* dstData,

View File

@ -20,8 +20,6 @@
#ifndef FREERDP_CODEC_PROGRESSIVE_H #ifndef FREERDP_CODEC_PROGRESSIVE_H
#define FREERDP_CODEC_PROGRESSIVE_H #define FREERDP_CODEC_PROGRESSIVE_H
typedef struct S_PROGRESSIVE_CONTEXT PROGRESSIVE_CONTEXT;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
@ -37,6 +35,8 @@ extern "C"
{ {
#endif #endif
typedef struct S_PROGRESSIVE_CONTEXT PROGRESSIVE_CONTEXT;
FREERDP_API int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, FREERDP_API int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
UINT32 SrcSize, UINT32 SrcFormat, UINT32 Width, UINT32 SrcSize, UINT32 SrcFormat, UINT32 Width,
UINT32 Height, UINT32 ScanLine, UINT32 Height, UINT32 ScanLine,

View File

@ -20,8 +20,6 @@
#ifndef FREERDP_CODEC_YUV_H #ifndef FREERDP_CODEC_YUV_H
#define FREERDP_CODEC_YUV_H #define FREERDP_CODEC_YUV_H
typedef struct S_YUV_CONTEXT YUV_CONTEXT;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
@ -32,6 +30,8 @@ extern "C"
{ {
#endif #endif
typedef struct S_YUV_CONTEXT YUV_CONTEXT;
FREERDP_API BOOL yuv420_context_decode(YUV_CONTEXT* context, const BYTE* pYUVData[3], FREERDP_API BOOL yuv420_context_decode(YUV_CONTEXT* context, const BYTE* pYUVData[3],
const UINT32 iStride[3], UINT32 yuvHeight, const UINT32 iStride[3], UINT32 yuvHeight,
DWORD DstFormat, BYTE* dest, UINT32 nDstStep, DWORD DstFormat, BYTE* dest, UINT32 nDstStep,

View File

@ -32,13 +32,13 @@
#define ZGFX_SEGMENTED_MAXSIZE 65535 #define ZGFX_SEGMENTED_MAXSIZE 65535
typedef struct S_ZGFX_CONTEXT ZGFX_CONTEXT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_ZGFX_CONTEXT ZGFX_CONTEXT;
FREERDP_API int zgfx_decompress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize, FREERDP_API int zgfx_decompress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, UINT32* pDstSize, UINT32 flags); BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
FREERDP_API int zgfx_compress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize, FREERDP_API int zgfx_compress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize,

View File

@ -45,24 +45,24 @@
#define FREERDP_CODEC_AVC444 0x00000100 #define FREERDP_CODEC_AVC444 0x00000100
#define FREERDP_CODEC_ALL 0xFFFFFFFF #define FREERDP_CODEC_ALL 0xFFFFFFFF
struct rdp_codecs
{
rdpContext* context;
RFX_CONTEXT* rfx;
NSC_CONTEXT* nsc;
H264_CONTEXT* h264;
CLEAR_CONTEXT* clear;
PROGRESSIVE_CONTEXT* progressive;
BITMAP_PLANAR_CONTEXT* planar;
BITMAP_INTERLEAVED_CONTEXT* interleaved;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
struct rdp_codecs
{
rdpContext* context;
RFX_CONTEXT* rfx;
NSC_CONTEXT* nsc;
H264_CONTEXT* h264;
CLEAR_CONTEXT* clear;
PROGRESSIVE_CONTEXT* progressive;
BITMAP_PLANAR_CONTEXT* planar;
BITMAP_INTERLEAVED_CONTEXT* interleaved;
};
FREERDP_API BOOL freerdp_client_codecs_prepare(rdpCodecs* codecs, UINT32 flags, UINT32 width, FREERDP_API BOOL freerdp_client_codecs_prepare(rdpCodecs* codecs, UINT32 flags, UINT32 width,
UINT32 height); UINT32 height);
FREERDP_API BOOL freerdp_client_codecs_reset(rdpCodecs* codecs, UINT32 flags, UINT32 width, FREERDP_API BOOL freerdp_client_codecs_reset(rdpCodecs* codecs, UINT32 flags, UINT32 width,

View File

@ -22,8 +22,6 @@
#ifndef FREERDP_CRYPTO_CERTIFICATE_DATA_H #ifndef FREERDP_CRYPTO_CERTIFICATE_DATA_H
#define FREERDP_CRYPTO_CERTIFICATE_DATA_H #define FREERDP_CRYPTO_CERTIFICATE_DATA_H
typedef struct rdp_certificate_data rdpCertificateData;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/settings.h> #include <freerdp/settings.h>
#include <freerdp/crypto/certificate.h> #include <freerdp/crypto/certificate.h>
@ -32,6 +30,9 @@ typedef struct rdp_certificate_data rdpCertificateData;
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_certificate_data rdpCertificateData;
FREERDP_API char* freerdp_certificate_data_hash(const char* hostname, UINT16 port); FREERDP_API char* freerdp_certificate_data_hash(const char* hostname, UINT16 port);
FREERDP_API rdpCertificateData* freerdp_certificate_data_new(const char* hostname, UINT16 port, FREERDP_API rdpCertificateData* freerdp_certificate_data_new(const char* hostname, UINT16 port,

View File

@ -22,8 +22,6 @@
#ifndef FREERDP_CRYPTO_CERTIFICATE_STORE_H #ifndef FREERDP_CRYPTO_CERTIFICATE_STORE_H
#define FREERDP_CRYPTO_CERTIFICATE_STORE_H #define FREERDP_CRYPTO_CERTIFICATE_STORE_H
typedef struct rdp_certificate_store rdpCertificateStore;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/settings.h> #include <freerdp/settings.h>
#include <freerdp/crypto/certificate_data.h> #include <freerdp/crypto/certificate_data.h>
@ -33,6 +31,8 @@ extern "C"
{ {
#endif #endif
typedef struct rdp_certificate_store rdpCertificateStore;
typedef enum typedef enum
{ {
CERT_STORE_NOT_FOUND = 1, CERT_STORE_NOT_FOUND = 1,

View File

@ -56,110 +56,120 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/addin.h> #include <freerdp/addin.h>
typedef struct s_IWTSVirtualChannelManager IWTSVirtualChannelManager; #ifdef __cplusplus
typedef struct s_IWTSListener IWTSListener; extern "C"
typedef struct s_IWTSVirtualChannel IWTSVirtualChannel;
typedef struct s_IWTSPlugin IWTSPlugin;
typedef struct s_IWTSListenerCallback IWTSListenerCallback;
typedef struct s_IWTSVirtualChannelCallback IWTSVirtualChannelCallback;
struct s_IWTSListener
{ {
/* Retrieves the listener-specific configuration. */ #endif
UINT (*GetConfiguration)(IWTSListener* pListener, void** ppPropertyBag);
void* pInterface; typedef struct s_IWTSVirtualChannelManager IWTSVirtualChannelManager;
}; typedef struct s_IWTSListener IWTSListener;
typedef struct s_IWTSVirtualChannel IWTSVirtualChannel;
struct s_IWTSVirtualChannel typedef struct s_IWTSPlugin IWTSPlugin;
{ typedef struct s_IWTSListenerCallback IWTSListenerCallback;
/* Starts a write request on the channel. */ typedef struct s_IWTSVirtualChannelCallback IWTSVirtualChannelCallback;
UINT (*Write)(IWTSVirtualChannel* pChannel, ULONG cbSize, const BYTE* pBuffer, void* pReserved);
/* Closes the channel. */
UINT (*Close)(IWTSVirtualChannel* pChannel);
};
struct s_IWTSVirtualChannelManager struct s_IWTSListener
{ {
/* Returns an instance of a listener object that listens on a specific /* Retrieves the listener-specific configuration. */
endpoint, or creates a static channel. */ UINT (*GetConfiguration)(IWTSListener* pListener, void** ppPropertyBag);
UINT(*CreateListener)
(IWTSVirtualChannelManager* pChannelMgr, const char* pszChannelName, ULONG ulFlags,
IWTSListenerCallback* pListenerCallback, IWTSListener** ppListener);
/* Find the channel or ID to send data to a specific endpoint. */
UINT32 (*GetChannelId)(IWTSVirtualChannel* channel);
IWTSVirtualChannel* (*FindChannelById)(IWTSVirtualChannelManager* pChannelMgr,
UINT32 ChannelId);
const char* (*GetChannelName)(IWTSVirtualChannel* channel);
UINT (*DestroyListener)(IWTSVirtualChannelManager* pChannelMgr, IWTSListener* ppListener);
};
struct s_IWTSPlugin void* pInterface;
{ };
/* Used for the first call that is made from the client to the plug-in. */
UINT (*Initialize)(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has successfully connected to the Remote Desktop Session Host (RD
Session Host) server. */
UINT (*Connected)(IWTSPlugin* pPlugin);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has disconnected from the RD Session Host server. */
UINT (*Disconnected)(IWTSPlugin* pPlugin, DWORD dwDisconnectCode);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has terminated. */
UINT (*Terminated)(IWTSPlugin* pPlugin);
UINT (*Attached)(IWTSPlugin* pPlugin); struct s_IWTSVirtualChannel
{
/* Starts a write request on the channel. */
UINT(*Write)
(IWTSVirtualChannel* pChannel, ULONG cbSize, const BYTE* pBuffer, void* pReserved);
/* Closes the channel. */
UINT (*Close)(IWTSVirtualChannel* pChannel);
};
UINT (*Detached)(IWTSPlugin* pPlugin); struct s_IWTSVirtualChannelManager
{
/* Returns an instance of a listener object that listens on a specific
endpoint, or creates a static channel. */
UINT(*CreateListener)
(IWTSVirtualChannelManager* pChannelMgr, const char* pszChannelName, ULONG ulFlags,
IWTSListenerCallback* pListenerCallback, IWTSListener** ppListener);
/* Find the channel or ID to send data to a specific endpoint. */
UINT32 (*GetChannelId)(IWTSVirtualChannel* channel);
IWTSVirtualChannel* (*FindChannelById)(IWTSVirtualChannelManager* pChannelMgr,
UINT32 ChannelId);
const char* (*GetChannelName)(IWTSVirtualChannel* channel);
UINT (*DestroyListener)(IWTSVirtualChannelManager* pChannelMgr, IWTSListener* ppListener);
};
/* Extended */ struct s_IWTSPlugin
{
/* Used for the first call that is made from the client to the plug-in. */
UINT (*Initialize)(IWTSPlugin* pPlugin, IWTSVirtualChannelManager* pChannelMgr);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has successfully connected to the Remote Desktop Session Host (RD
Session Host) server. */
UINT (*Connected)(IWTSPlugin* pPlugin);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has disconnected from the RD Session Host server. */
UINT (*Disconnected)(IWTSPlugin* pPlugin, DWORD dwDisconnectCode);
/* Notifies the plug-in that the Remote Desktop Connection (RDC) client
has terminated. */
UINT (*Terminated)(IWTSPlugin* pPlugin);
void* pInterface; UINT (*Attached)(IWTSPlugin* pPlugin);
};
struct s_IWTSListenerCallback UINT (*Detached)(IWTSPlugin* pPlugin);
{
/* Accepts or denies a connection request for an incoming connection to
the associated listener. */
UINT(*OnNewChannelConnection)
(IWTSListenerCallback* pListenerCallback, IWTSVirtualChannel* pChannel, BYTE* Data,
BOOL* pbAccept, IWTSVirtualChannelCallback** ppCallback);
};
struct s_IWTSVirtualChannelCallback /* Extended */
{
UINT(*OnDataReceived)
(IWTSVirtualChannelCallback* pChannelCallback,
wStream* data); /**< Notifies the user about data that is being received. */
UINT(*OnOpen)
(IWTSVirtualChannelCallback*
pChannelCallback); /**< Notifies the user that the channel has been opened. */
UINT(*OnClose)
(IWTSVirtualChannelCallback*
pChannelCallback); /**< Notifies the user that the channel has been closed. */
};
/* The DVC Plugin entry points */ void* pInterface;
typedef struct rdp_context rdpContext; /* forward declaration, necessary to avoid };
* circular includes */
typedef struct S_IDRDYNVC_ENTRY_POINTS IDRDYNVC_ENTRY_POINTS; struct s_IWTSListenerCallback
struct S_IDRDYNVC_ENTRY_POINTS {
{ /* Accepts or denies a connection request for an incoming connection to
UINT(*RegisterPlugin) the associated listener. */
(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name, IWTSPlugin* pPlugin); UINT(*OnNewChannelConnection)
IWTSPlugin* (*GetPlugin)(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name); (IWTSListenerCallback* pListenerCallback, IWTSVirtualChannel* pChannel, BYTE* Data,
const ADDIN_ARGV* (*GetPluginData)(IDRDYNVC_ENTRY_POINTS* pEntryPoints); BOOL* pbAccept, IWTSVirtualChannelCallback** ppCallback);
rdpSettings* (*GetRdpSettings)(IDRDYNVC_ENTRY_POINTS* pEntryPoints); };
rdpContext* (*GetRdpContext)(IDRDYNVC_ENTRY_POINTS* pEntryPoints);
};
typedef UINT (*PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS*); struct s_IWTSVirtualChannelCallback
{
UINT(*OnDataReceived)
(IWTSVirtualChannelCallback* pChannelCallback,
wStream* data); /**< Notifies the user about data that is being received. */
UINT(*OnOpen)
(IWTSVirtualChannelCallback*
pChannelCallback); /**< Notifies the user that the channel has been opened. */
UINT(*OnClose)
(IWTSVirtualChannelCallback*
pChannelCallback); /**< Notifies the user that the channel has been closed. */
};
void* get_callback_by_name(const char* name, void** context); /* The DVC Plugin entry points */
void add_callback_by_name(const char* name, void* fkt, void* context); typedef struct rdp_context rdpContext; /* forward declaration, necessary to avoid
void remove_callback_by_name(const char* name, void* context); * circular includes */
typedef struct S_IDRDYNVC_ENTRY_POINTS IDRDYNVC_ENTRY_POINTS;
struct S_IDRDYNVC_ENTRY_POINTS
{
UINT(*RegisterPlugin)
(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name, IWTSPlugin* pPlugin);
IWTSPlugin* (*GetPlugin)(IDRDYNVC_ENTRY_POINTS* pEntryPoints, const char* name);
const ADDIN_ARGV* (*GetPluginData)(IDRDYNVC_ENTRY_POINTS* pEntryPoints);
rdpSettings* (*GetRdpSettings)(IDRDYNVC_ENTRY_POINTS* pEntryPoints);
rdpContext* (*GetRdpContext)(IDRDYNVC_ENTRY_POINTS* pEntryPoints);
};
typedef UINT (*PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS*);
void* get_callback_by_name(const char* name, void** context);
void add_callback_by_name(const char* name, void* fkt, void* context);
void remove_callback_by_name(const char* name, void* context);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_DVC_H */ #endif /* FREERDP_DVC_H */

View File

@ -27,326 +27,335 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/settings.h> #include <freerdp/settings.h>
typedef struct smartcard_emulation_context SmartcardEmulationContext; #ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API SmartcardEmulationContext* Emulate_New(const rdpSettings* settings); typedef struct smartcard_emulation_context SmartcardEmulationContext;
FREERDP_API void Emulate_Free(SmartcardEmulationContext* context);
FREERDP_API BOOL Emulate_IsConfigured(SmartcardEmulationContext* context); FREERDP_API SmartcardEmulationContext* Emulate_New(const rdpSettings* settings);
FREERDP_API void Emulate_Free(SmartcardEmulationContext* context);
FREERDP_API LONG WINAPI Emulate_SCardEstablishContext(SmartcardEmulationContext* smartcard, FREERDP_API BOOL Emulate_IsConfigured(SmartcardEmulationContext* context);
DWORD dwScope, LPCVOID pvReserved1,
LPCVOID pvReserved2,
LPSCARDCONTEXT phContext);
FREERDP_API LONG WINAPI Emulate_SCardReleaseContext(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardEstablishContext(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext); DWORD dwScope, LPCVOID pvReserved1,
LPCVOID pvReserved2,
LPSCARDCONTEXT phContext);
FREERDP_API LONG WINAPI Emulate_SCardIsValidContext(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardReleaseContext(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext); SCARDCONTEXT hContext);
FREERDP_API LONG WINAPI Emulate_SCardIsValidContext(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext);
FREERDP_API LONG WINAPI Emulate_SCardListReaderGroupsA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardListReaderGroupsA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPSTR mszGroups, SCARDCONTEXT hContext, LPSTR mszGroups,
LPDWORD pcchGroups); LPDWORD pcchGroups);
FREERDP_API LONG WINAPI Emulate_SCardListReaderGroupsW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardListReaderGroupsW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPWSTR mszGroups, SCARDCONTEXT hContext, LPWSTR mszGroups,
LPDWORD pcchGroups); LPDWORD pcchGroups);
FREERDP_API LONG WINAPI Emulate_SCardListReadersA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR mszGroups,
LPSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardListReadersW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR mszGroups,
LPWSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardListCardsA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCBYTE pbAtr,
LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
CHAR* mszCards, LPDWORD pcchCards);
FREERDP_API LONG WINAPI Emulate_SCardListCardsW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCBYTE pbAtr,
LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
WCHAR* mszCards, LPDWORD pcchCards);
FREERDP_API LONG WINAPI Emulate_SCardListInterfacesA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szCard,
LPGUID pguidInterfaces,
LPDWORD pcguidInterfaces);
FREERDP_API LONG WINAPI Emulate_SCardListInterfacesW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szCard,
LPGUID pguidInterfaces,
LPDWORD pcguidInterfaces);
FREERDP_API LONG WINAPI Emulate_SCardGetProviderIdA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szCard,
LPGUID pguidProviderId);
FREERDP_API LONG WINAPI Emulate_SCardGetProviderIdW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardListReadersA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szCard, SCARDCONTEXT hContext, LPCSTR mszGroups,
LPGUID pguidProviderId); LPSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardGetCardTypeProviderNameA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardListReadersW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, SCARDCONTEXT hContext, LPCWSTR mszGroups,
LPCSTR szCardName, DWORD dwProviderId, LPWSTR mszReaders, LPDWORD pcchReaders);
CHAR* szProvider,
LPDWORD pcchProvider); FREERDP_API LONG WINAPI Emulate_SCardListCardsA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCBYTE pbAtr,
FREERDP_API LONG WINAPI Emulate_SCardGetCardTypeProviderNameW(SmartcardEmulationContext* smartcard, LPCGUID rgquidInterfaces,
SCARDCONTEXT hContext, DWORD cguidInterfaceCount, CHAR* mszCards,
LPCWSTR szCardName, LPDWORD pcchCards);
DWORD dwProviderId, WCHAR* szProvider,
LPDWORD pcchProvider); FREERDP_API LONG WINAPI Emulate_SCardListCardsW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCBYTE pbAtr,
FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderGroupA(SmartcardEmulationContext* smartcard, LPCGUID rgquidInterfaces,
SCARDCONTEXT hContext, DWORD cguidInterfaceCount, WCHAR* mszCards,
LPCSTR szGroupName); LPDWORD pcchCards);
FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderGroupW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardListInterfacesA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, SCARDCONTEXT hContext, LPCSTR szCard,
LPCWSTR szGroupName); LPGUID pguidInterfaces,
LPDWORD pcguidInterfaces);
FREERDP_API LONG WINAPI Emulate_SCardForgetReaderGroupA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szGroupName); FREERDP_API LONG WINAPI Emulate_SCardListInterfacesW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szCard,
FREERDP_API LONG WINAPI Emulate_SCardForgetReaderGroupW(SmartcardEmulationContext* smartcard, LPGUID pguidInterfaces,
SCARDCONTEXT hContext, LPCWSTR szGroupName); LPDWORD pcguidInterfaces);
FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardGetProviderIdA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szReaderName, SCARDCONTEXT hContext, LPCSTR szCard,
LPCSTR szDeviceName); LPGUID pguidProviderId);
FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardGetProviderIdW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReaderName, SCARDCONTEXT hContext, LPCWSTR szCard,
LPCWSTR szDeviceName); LPGUID pguidProviderId);
FREERDP_API LONG WINAPI Emulate_SCardForgetReaderA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardGetCardTypeProviderNameA(
SCARDCONTEXT hContext, LPCSTR szReaderName); SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szCardName,
DWORD dwProviderId, CHAR* szProvider, LPDWORD pcchProvider);
FREERDP_API LONG WINAPI Emulate_SCardForgetReaderW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReaderName); FREERDP_API LONG WINAPI Emulate_SCardGetCardTypeProviderNameW(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szCardName,
FREERDP_API LONG WINAPI Emulate_SCardAddReaderToGroupA(SmartcardEmulationContext* smartcard, DWORD dwProviderId, WCHAR* szProvider, LPDWORD pcchProvider);
SCARDCONTEXT hContext, LPCSTR szReaderName,
LPCSTR szGroupName); FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderGroupA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext,
FREERDP_API LONG WINAPI Emulate_SCardAddReaderToGroupW(SmartcardEmulationContext* smartcard, LPCSTR szGroupName);
SCARDCONTEXT hContext, LPCWSTR szReaderName,
LPCWSTR szGroupName); FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderGroupW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext,
FREERDP_API LONG WINAPI Emulate_SCardRemoveReaderFromGroupA(SmartcardEmulationContext* smartcard, LPCWSTR szGroupName);
SCARDCONTEXT hContext,
LPCSTR szReaderName, FREERDP_API LONG WINAPI Emulate_SCardForgetReaderGroupA(SmartcardEmulationContext* smartcard,
LPCSTR szGroupName); SCARDCONTEXT hContext,
LPCSTR szGroupName);
FREERDP_API LONG WINAPI Emulate_SCardRemoveReaderFromGroupW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, FREERDP_API LONG WINAPI Emulate_SCardForgetReaderGroupW(SmartcardEmulationContext* smartcard,
LPCWSTR szReaderName, SCARDCONTEXT hContext,
LPCWSTR szGroupName); LPCWSTR szGroupName);
FREERDP_API LONG WINAPI Emulate_SCardIntroduceCardTypeA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szCardName, SCARDCONTEXT hContext,
LPCGUID pguidPrimaryProvider, LPCSTR szReaderName, LPCSTR szDeviceName);
LPCGUID rgguidInterfaces,
DWORD dwInterfaceCount, LPCBYTE pbAtr, FREERDP_API LONG WINAPI Emulate_SCardIntroduceReaderW(SmartcardEmulationContext* smartcard,
LPCBYTE pbAtrMask, DWORD cbAtrLen); SCARDCONTEXT hContext,
LPCWSTR szReaderName,
FREERDP_API LONG WINAPI Emulate_SCardIntroduceCardTypeW(SmartcardEmulationContext* smartcard, LPCWSTR szDeviceName);
SCARDCONTEXT hContext, LPCWSTR szCardName,
LPCGUID pguidPrimaryProvider, FREERDP_API LONG WINAPI Emulate_SCardForgetReaderA(SmartcardEmulationContext* smartcard,
LPCGUID rgguidInterfaces, SCARDCONTEXT hContext, LPCSTR szReaderName);
DWORD dwInterfaceCount, LPCBYTE pbAtr,
LPCBYTE pbAtrMask, DWORD cbAtrLen); FREERDP_API LONG WINAPI Emulate_SCardForgetReaderW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReaderName);
FREERDP_API LONG WINAPI Emulate_SCardSetCardTypeProviderNameA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, FREERDP_API LONG WINAPI Emulate_SCardAddReaderToGroupA(SmartcardEmulationContext* smartcard,
LPCSTR szCardName, DWORD dwProviderId, SCARDCONTEXT hContext,
LPCSTR szProvider); LPCSTR szReaderName, LPCSTR szGroupName);
FREERDP_API LONG WINAPI Emulate_SCardSetCardTypeProviderNameW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardAddReaderToGroupW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, SCARDCONTEXT hContext,
LPCWSTR szCardName, LPCWSTR szReaderName,
DWORD dwProviderId, LPCWSTR szGroupName);
LPCWSTR szProvider);
FREERDP_API LONG WINAPI
FREERDP_API LONG WINAPI Emulate_SCardForgetCardTypeA(SmartcardEmulationContext* smartcard, Emulate_SCardRemoveReaderFromGroupA(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext,
SCARDCONTEXT hContext, LPCSTR szCardName); LPCSTR szReaderName, LPCSTR szGroupName);
FREERDP_API LONG WINAPI Emulate_SCardForgetCardTypeW(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI
SCARDCONTEXT hContext, LPCWSTR szCardName); Emulate_SCardRemoveReaderFromGroupW(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext,
LPCWSTR szReaderName, LPCWSTR szGroupName);
FREERDP_API LONG WINAPI Emulate_SCardFreeMemory(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPVOID pvMem); FREERDP_API LONG WINAPI Emulate_SCardIntroduceCardTypeA(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szCardName,
FREERDP_API HANDLE WINAPI Emulate_SCardAccessStartedEvent(SmartcardEmulationContext* smartcard); LPCGUID pguidPrimaryProvider, LPCGUID rgguidInterfaces, DWORD dwInterfaceCount,
LPCBYTE pbAtr, LPCBYTE pbAtrMask, DWORD cbAtrLen);
FREERDP_API void WINAPI Emulate_SCardReleaseStartedEvent(SmartcardEmulationContext* smartcard);
FREERDP_API LONG WINAPI Emulate_SCardIntroduceCardTypeW(
FREERDP_API LONG WINAPI Emulate_SCardLocateCardsA(SmartcardEmulationContext* smartcard, SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szCardName,
SCARDCONTEXT hContext, LPCSTR mszCards, LPCGUID pguidPrimaryProvider, LPCGUID rgguidInterfaces, DWORD dwInterfaceCount,
LPSCARD_READERSTATEA rgReaderStates, LPCBYTE pbAtr, LPCBYTE pbAtrMask, DWORD cbAtrLen);
DWORD cReaders);
FREERDP_API LONG WINAPI Emulate_SCardSetCardTypeProviderNameA(
FREERDP_API LONG WINAPI Emulate_SCardLocateCardsW(SmartcardEmulationContext* smartcard, SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szCardName,
SCARDCONTEXT hContext, LPCWSTR mszCards, DWORD dwProviderId, LPCSTR szProvider);
LPSCARD_READERSTATEW rgReaderStates,
DWORD cReaders); FREERDP_API LONG WINAPI Emulate_SCardSetCardTypeProviderNameW(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szCardName,
FREERDP_API LONG WINAPI Emulate_SCardLocateCardsByATRA(SmartcardEmulationContext* smartcard, DWORD dwProviderId, LPCWSTR szProvider);
SCARDCONTEXT hContext,
LPSCARD_ATRMASK rgAtrMasks, DWORD cAtrs, FREERDP_API LONG WINAPI Emulate_SCardForgetCardTypeA(SmartcardEmulationContext* smartcard,
LPSCARD_READERSTATEA rgReaderStates, SCARDCONTEXT hContext, LPCSTR szCardName);
DWORD cReaders);
FREERDP_API LONG WINAPI Emulate_SCardForgetCardTypeW(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardLocateCardsByATRW(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szCardName);
SCARDCONTEXT hContext,
LPSCARD_ATRMASK rgAtrMasks, DWORD cAtrs, FREERDP_API LONG WINAPI Emulate_SCardFreeMemory(SmartcardEmulationContext* smartcard,
LPSCARD_READERSTATEW rgReaderStates, SCARDCONTEXT hContext, LPVOID pvMem);
DWORD cReaders);
FREERDP_API HANDLE WINAPI Emulate_SCardAccessStartedEvent(SmartcardEmulationContext* smartcard);
FREERDP_API LONG WINAPI Emulate_SCardGetStatusChangeA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, DWORD dwTimeout, FREERDP_API void WINAPI Emulate_SCardReleaseStartedEvent(SmartcardEmulationContext* smartcard);
LPSCARD_READERSTATEA rgReaderStates,
DWORD cReaders); FREERDP_API LONG WINAPI Emulate_SCardLocateCardsA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR mszCards,
FREERDP_API LONG WINAPI Emulate_SCardGetStatusChangeW(SmartcardEmulationContext* smartcard, LPSCARD_READERSTATEA rgReaderStates,
SCARDCONTEXT hContext, DWORD dwTimeout, DWORD cReaders);
LPSCARD_READERSTATEW rgReaderStates,
DWORD cReaders); FREERDP_API LONG WINAPI Emulate_SCardLocateCardsW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR mszCards,
FREERDP_API LONG WINAPI Emulate_SCardCancel(SmartcardEmulationContext* smartcard, LPSCARD_READERSTATEW rgReaderStates,
SCARDCONTEXT hContext); DWORD cReaders);
FREERDP_API LONG WINAPI Emulate_SCardConnectA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardLocateCardsByATRA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szReader, SCARDCONTEXT hContext,
DWORD dwShareMode, DWORD dwPreferredProtocols, LPSCARD_ATRMASK rgAtrMasks, DWORD cAtrs,
LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol); LPSCARD_READERSTATEA rgReaderStates,
DWORD cReaders);
FREERDP_API LONG WINAPI Emulate_SCardConnectW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReader, FREERDP_API LONG WINAPI Emulate_SCardLocateCardsByATRW(SmartcardEmulationContext* smartcard,
DWORD dwShareMode, DWORD dwPreferredProtocols, SCARDCONTEXT hContext,
LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol); LPSCARD_ATRMASK rgAtrMasks, DWORD cAtrs,
LPSCARD_READERSTATEW rgReaderStates,
FREERDP_API LONG WINAPI Emulate_SCardReconnect(SmartcardEmulationContext* smartcard, DWORD cReaders);
SCARDHANDLE hCard, DWORD dwShareMode,
DWORD dwPreferredProtocols, DWORD dwInitialization, FREERDP_API LONG WINAPI Emulate_SCardGetStatusChangeA(SmartcardEmulationContext* smartcard,
LPDWORD pdwActiveProtocol); SCARDCONTEXT hContext, DWORD dwTimeout,
LPSCARD_READERSTATEA rgReaderStates,
FREERDP_API LONG WINAPI Emulate_SCardDisconnect(SmartcardEmulationContext* smartcard, DWORD cReaders);
SCARDHANDLE hCard, DWORD dwDisposition);
FREERDP_API LONG WINAPI Emulate_SCardGetStatusChangeW(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardBeginTransaction(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, DWORD dwTimeout,
SCARDHANDLE hCard); LPSCARD_READERSTATEW rgReaderStates,
DWORD cReaders);
FREERDP_API LONG WINAPI Emulate_SCardEndTransaction(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, DWORD dwDisposition); FREERDP_API LONG WINAPI Emulate_SCardCancel(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext);
FREERDP_API LONG WINAPI Emulate_SCardCancelTransaction(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard); FREERDP_API LONG WINAPI Emulate_SCardConnectA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szReader,
FREERDP_API LONG WINAPI Emulate_SCardState(SmartcardEmulationContext* smartcard, SCARDHANDLE hCard, DWORD dwShareMode, DWORD dwPreferredProtocols,
LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
LPDWORD pcbAtrLen);
FREERDP_API LONG WINAPI Emulate_SCardConnectW(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardStatusA(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szReader,
SCARDHANDLE hCard, LPSTR mszReaderNames, DWORD dwShareMode, DWORD dwPreferredProtocols,
LPDWORD pcchReaderLen, LPDWORD pdwState, LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen);
FREERDP_API LONG WINAPI Emulate_SCardReconnect(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardStatusW(SmartcardEmulationContext* smartcard, SCARDHANDLE hCard, DWORD dwShareMode,
SCARDHANDLE hCard, LPWSTR mszReaderNames, DWORD dwPreferredProtocols,
LPDWORD pcchReaderLen, LPDWORD pdwState, DWORD dwInitialization,
LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen); LPDWORD pdwActiveProtocol);
FREERDP_API LONG WINAPI Emulate_SCardTransmit(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardDisconnect(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci, SCARDHANDLE hCard, DWORD dwDisposition);
LPCBYTE pbSendBuffer, DWORD cbSendLength,
LPSCARD_IO_REQUEST pioRecvPci, LPBYTE pbRecvBuffer, FREERDP_API LONG WINAPI Emulate_SCardBeginTransaction(SmartcardEmulationContext* smartcard,
LPDWORD pcbRecvLength); SCARDHANDLE hCard);
FREERDP_API LONG WINAPI Emulate_SCardGetTransmitCount(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardEndTransaction(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, LPDWORD pcTransmitCount); SCARDHANDLE hCard, DWORD dwDisposition);
FREERDP_API LONG WINAPI Emulate_SCardControl(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardCancelTransaction(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, DWORD dwControlCode, SCARDHANDLE hCard);
LPCVOID lpInBuffer, DWORD cbInBufferSize,
LPVOID lpOutBuffer, DWORD cbOutBufferSize, FREERDP_API LONG WINAPI Emulate_SCardState(SmartcardEmulationContext* smartcard,
LPDWORD lpBytesReturned); SCARDHANDLE hCard, LPDWORD pdwState,
LPDWORD pdwProtocol, LPBYTE pbAtr,
FREERDP_API LONG WINAPI Emulate_SCardGetAttrib(SmartcardEmulationContext* smartcard, LPDWORD pcbAtrLen);
SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr,
LPDWORD pcbAttrLen); FREERDP_API LONG WINAPI Emulate_SCardStatusA(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, LPSTR mszReaderNames,
FREERDP_API LONG WINAPI Emulate_SCardSetAttrib(SmartcardEmulationContext* smartcard, LPDWORD pcchReaderLen, LPDWORD pdwState,
SCARDHANDLE hCard, DWORD dwAttrId, LPCBYTE pbAttr, LPDWORD pdwProtocol, LPBYTE pbAtr,
DWORD cbAttrLen); LPDWORD pcbAtrLen);
FREERDP_API LONG WINAPI Emulate_SCardUIDlgSelectCardA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardStatusW(SmartcardEmulationContext* smartcard,
LPOPENCARDNAMEA_EX pDlgStruc); SCARDHANDLE hCard, LPWSTR mszReaderNames,
LPDWORD pcchReaderLen, LPDWORD pdwState,
FREERDP_API LONG WINAPI Emulate_SCardUIDlgSelectCardW(SmartcardEmulationContext* smartcard, LPDWORD pdwProtocol, LPBYTE pbAtr,
LPOPENCARDNAMEW_EX pDlgStruc); LPDWORD pcbAtrLen);
FREERDP_API LONG WINAPI Emulate_GetOpenCardNameA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardTransmit(SmartcardEmulationContext* smartcard,
LPOPENCARDNAMEA pDlgStruc); SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci,
LPCBYTE pbSendBuffer, DWORD cbSendLength,
FREERDP_API LONG WINAPI Emulate_GetOpenCardNameW(SmartcardEmulationContext* smartcard, LPSCARD_IO_REQUEST pioRecvPci,
LPOPENCARDNAMEW pDlgStruc); LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength);
FREERDP_API LONG WINAPI Emulate_SCardDlgExtendedError(SmartcardEmulationContext* smartcard); FREERDP_API LONG WINAPI Emulate_SCardGetTransmitCount(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard,
FREERDP_API LONG WINAPI Emulate_SCardReadCacheA(SmartcardEmulationContext* smartcard, LPDWORD pcTransmitCount);
SCARDCONTEXT hContext, UUID* CardIdentifier,
DWORD FreshnessCounter, LPSTR LookupName, FREERDP_API LONG WINAPI Emulate_SCardControl(SmartcardEmulationContext* smartcard,
PBYTE Data, DWORD* DataLen); SCARDHANDLE hCard, DWORD dwControlCode,
LPCVOID lpInBuffer, DWORD cbInBufferSize,
FREERDP_API LONG WINAPI Emulate_SCardReadCacheW(SmartcardEmulationContext* smartcard, LPVOID lpOutBuffer, DWORD cbOutBufferSize,
SCARDCONTEXT hContext, UUID* CardIdentifier, LPDWORD lpBytesReturned);
DWORD FreshnessCounter, LPWSTR LookupName,
PBYTE Data, DWORD* DataLen); FREERDP_API LONG WINAPI Emulate_SCardGetAttrib(SmartcardEmulationContext* smartcard,
SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr,
FREERDP_API LONG WINAPI Emulate_SCardWriteCacheA(SmartcardEmulationContext* smartcard, LPDWORD pcbAttrLen);
SCARDCONTEXT hContext, UUID* CardIdentifier,
DWORD FreshnessCounter, LPSTR LookupName, FREERDP_API LONG WINAPI Emulate_SCardSetAttrib(SmartcardEmulationContext* smartcard,
PBYTE Data, DWORD DataLen); SCARDHANDLE hCard, DWORD dwAttrId,
LPCBYTE pbAttr, DWORD cbAttrLen);
FREERDP_API LONG WINAPI Emulate_SCardWriteCacheW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, UUID* CardIdentifier, FREERDP_API LONG WINAPI Emulate_SCardUIDlgSelectCardA(SmartcardEmulationContext* smartcard,
DWORD FreshnessCounter, LPWSTR LookupName, LPOPENCARDNAMEA_EX pDlgStruc);
PBYTE Data, DWORD DataLen);
FREERDP_API LONG WINAPI Emulate_SCardUIDlgSelectCardW(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardGetReaderIconA(SmartcardEmulationContext* smartcard, LPOPENCARDNAMEW_EX pDlgStruc);
SCARDCONTEXT hContext, LPCSTR szReaderName,
LPBYTE pbIcon, LPDWORD pcbIcon); FREERDP_API LONG WINAPI Emulate_GetOpenCardNameA(SmartcardEmulationContext* smartcard,
LPOPENCARDNAMEA pDlgStruc);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderIconW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReaderName, FREERDP_API LONG WINAPI Emulate_GetOpenCardNameW(SmartcardEmulationContext* smartcard,
LPBYTE pbIcon, LPDWORD pcbIcon); LPOPENCARDNAMEW pDlgStruc);
FREERDP_API LONG WINAPI Emulate_SCardGetDeviceTypeIdA(SmartcardEmulationContext* smartcard, FREERDP_API LONG WINAPI Emulate_SCardDlgExtendedError(SmartcardEmulationContext* smartcard);
SCARDCONTEXT hContext, LPCSTR szReaderName,
LPDWORD pdwDeviceTypeId); FREERDP_API LONG WINAPI Emulate_SCardReadCacheA(SmartcardEmulationContext* smartcard,
FREERDP_API LONG WINAPI Emulate_SCardGetDeviceTypeIdW(SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, UUID* CardIdentifier,
SCARDCONTEXT hContext, LPCWSTR szReaderName, DWORD FreshnessCounter, LPSTR LookupName,
LPDWORD pdwDeviceTypeId); PBYTE Data, DWORD* DataLen);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderDeviceInstanceIdA( FREERDP_API LONG WINAPI Emulate_SCardReadCacheW(SmartcardEmulationContext* smartcard,
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szReaderName, SCARDCONTEXT hContext, UUID* CardIdentifier,
LPSTR szDeviceInstanceId, LPDWORD pcchDeviceInstanceId); DWORD FreshnessCounter, LPWSTR LookupName,
PBYTE Data, DWORD* DataLen);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderDeviceInstanceIdW(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szReaderName, FREERDP_API LONG WINAPI Emulate_SCardWriteCacheA(SmartcardEmulationContext* smartcard,
LPWSTR szDeviceInstanceId, LPDWORD pcchDeviceInstanceId); SCARDCONTEXT hContext, UUID* CardIdentifier,
FREERDP_API LONG WINAPI Emulate_SCardListReadersWithDeviceInstanceIdA( DWORD FreshnessCounter, LPSTR LookupName,
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szDeviceInstanceId, PBYTE Data, DWORD DataLen);
LPSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardListReadersWithDeviceInstanceIdW( FREERDP_API LONG WINAPI Emulate_SCardWriteCacheW(SmartcardEmulationContext* smartcard,
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szDeviceInstanceId, SCARDCONTEXT hContext, UUID* CardIdentifier,
LPWSTR mszReaders, LPDWORD pcchReaders); DWORD FreshnessCounter, LPWSTR LookupName,
FREERDP_API LONG WINAPI Emulate_SCardAudit(SmartcardEmulationContext* smartcard, PBYTE Data, DWORD DataLen);
SCARDCONTEXT hContext, DWORD dwEvent);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderIconA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCSTR szReaderName,
LPBYTE pbIcon, LPDWORD pcbIcon);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderIconW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, LPCWSTR szReaderName,
LPBYTE pbIcon, LPDWORD pcbIcon);
FREERDP_API LONG WINAPI Emulate_SCardGetDeviceTypeIdA(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext,
LPCSTR szReaderName,
LPDWORD pdwDeviceTypeId);
FREERDP_API LONG WINAPI Emulate_SCardGetDeviceTypeIdW(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext,
LPCWSTR szReaderName,
LPDWORD pdwDeviceTypeId);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderDeviceInstanceIdA(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szReaderName,
LPSTR szDeviceInstanceId, LPDWORD pcchDeviceInstanceId);
FREERDP_API LONG WINAPI Emulate_SCardGetReaderDeviceInstanceIdW(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szReaderName,
LPWSTR szDeviceInstanceId, LPDWORD pcchDeviceInstanceId);
FREERDP_API LONG WINAPI Emulate_SCardListReadersWithDeviceInstanceIdA(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCSTR szDeviceInstanceId,
LPSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardListReadersWithDeviceInstanceIdW(
SmartcardEmulationContext* smartcard, SCARDCONTEXT hContext, LPCWSTR szDeviceInstanceId,
LPWSTR mszReaders, LPDWORD pcchReaders);
FREERDP_API LONG WINAPI Emulate_SCardAudit(SmartcardEmulationContext* smartcard,
SCARDCONTEXT hContext, DWORD dwEvent);
#ifdef __cplusplus
}
#endif
#endif /* WINPR_SMARTCARD_EMULATE_PRIVATE_H */ #endif /* WINPR_SMARTCARD_EMULATE_PRIVATE_H */

View File

@ -26,33 +26,42 @@
#define FREERDP_EXT_EXPORT_FUNC_NAME "FreeRDPExtensionEntry" #define FREERDP_EXT_EXPORT_FUNC_NAME "FreeRDPExtensionEntry"
typedef struct rdp_ext_plugin rdpExtPlugin; #ifdef __cplusplus
extern "C"
struct rdp_ext_plugin
{ {
void* ext; #endif
int (*init)(rdpExtPlugin* plugin, freerdp* instance);
int (*uninit)(rdpExtPlugin* plugin, freerdp* instance);
};
typedef UINT32(FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, freerdp* instance); typedef struct rdp_ext_plugin rdpExtPlugin;
typedef UINT32(FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin); struct rdp_ext_plugin
typedef UINT32(FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin, {
PFREERDP_EXTENSION_HOOK hook); void* ext;
typedef UINT32(FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin, int (*init)(rdpExtPlugin* plugin, freerdp* instance);
PFREERDP_EXTENSION_HOOK hook); int (*uninit)(rdpExtPlugin* plugin, freerdp* instance);
};
typedef struct typedef UINT32(FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, freerdp* instance);
{
void* ext; /* Reference to internal instance */
PREGISTEREXTENSION pRegisterExtension;
PREGISTERPRECONNECTHOOK pRegisterPreConnectHook;
PREGISTERPOSTCONNECTHOOK pRegisterPostConnectHook;
void* data;
} FREERDP_EXTENSION_ENTRY_POINTS;
typedef FREERDP_EXTENSION_ENTRY_POINTS* PFREERDP_EXTENSION_ENTRY_POINTS;
typedef int(FREERDP_CC* PFREERDP_EXTENSION_ENTRY)(PFREERDP_EXTENSION_ENTRY_POINTS pEntryPoints); typedef UINT32(FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin);
typedef UINT32(FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin,
PFREERDP_EXTENSION_HOOK hook);
typedef UINT32(FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin,
PFREERDP_EXTENSION_HOOK hook);
typedef struct
{
void* ext; /* Reference to internal instance */
PREGISTEREXTENSION pRegisterExtension;
PREGISTERPRECONNECTHOOK pRegisterPreConnectHook;
PREGISTERPOSTCONNECTHOOK pRegisterPostConnectHook;
void* data;
} FREERDP_EXTENSION_ENTRY_POINTS;
typedef FREERDP_EXTENSION_ENTRY_POINTS* PFREERDP_EXTENSION_ENTRY_POINTS;
typedef int(FREERDP_CC* PFREERDP_EXTENSION_ENTRY)(PFREERDP_EXTENSION_ENTRY_POINTS pEntryPoints);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_EXTENSION_H */ #endif /* FREERDP_EXTENSION_H */

View File

@ -22,24 +22,6 @@
#ifndef FREERDP_H #ifndef FREERDP_H
#define FREERDP_H #define FREERDP_H
typedef struct rdp_rdp rdpRdp;
typedef struct rdp_gdi rdpGdi;
typedef struct rdp_rail rdpRail;
typedef struct rdp_cache rdpCache;
typedef struct rdp_channels rdpChannels;
typedef struct rdp_graphics rdpGraphics;
typedef struct rdp_metrics rdpMetrics;
typedef struct rdp_codecs rdpCodecs;
typedef struct rdp_transport rdpTransport; /* Opaque */
typedef struct rdp_freerdp freerdp;
typedef struct rdp_context rdpContext;
typedef struct rdp_freerdp_peer freerdp_peer;
typedef struct rdp_client_context rdpClientContext;
typedef struct rdp_client_entry_points_v1 RDP_CLIENT_ENTRY_POINTS_V1;
typedef RDP_CLIENT_ENTRY_POINTS_V1 RDP_CLIENT_ENTRY_POINTS;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/error.h> #include <freerdp/error.h>
@ -57,14 +39,32 @@ typedef RDP_CLIENT_ENTRY_POINTS_V1 RDP_CLIENT_ENTRY_POINTS;
#include <freerdp/autodetect.h> #include <freerdp/autodetect.h>
#include <freerdp/heartbeat.h> #include <freerdp/heartbeat.h>
typedef struct stream_dump_context rdpStreamDumpContext;
typedef struct SmartcardCertInfo_st SmartcardCertInfo;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct stream_dump_context rdpStreamDumpContext;
typedef struct SmartcardCertInfo_st SmartcardCertInfo;
typedef struct rdp_rdp rdpRdp;
typedef struct rdp_gdi rdpGdi;
typedef struct rdp_rail rdpRail;
typedef struct rdp_cache rdpCache;
typedef struct rdp_channels rdpChannels;
typedef struct rdp_graphics rdpGraphics;
typedef struct rdp_metrics rdpMetrics;
typedef struct rdp_codecs rdpCodecs;
typedef struct rdp_transport rdpTransport; /* Opaque */
typedef struct rdp_freerdp freerdp;
typedef struct rdp_context rdpContext;
typedef struct rdp_freerdp_peer freerdp_peer;
typedef struct rdp_client_context rdpClientContext;
typedef struct rdp_client_entry_points_v1 RDP_CLIENT_ENTRY_POINTS_V1;
typedef RDP_CLIENT_ENTRY_POINTS_V1 RDP_CLIENT_ENTRY_POINTS;
#define MCS_BASE_CHANNEL_ID 1001 #define MCS_BASE_CHANNEL_ID 1001
#define MCS_GLOBAL_CHANNEL_ID 1003 #define MCS_GLOBAL_CHANNEL_ID 1003

View File

@ -355,172 +355,172 @@
#define COMPLEXREGION 0x03 #define COMPLEXREGION 0x03
#endif #endif
typedef struct
{
BYTE objectType;
} GDIOBJECT;
typedef GDIOBJECT* HGDIOBJECT;
typedef struct
{
BYTE objectType;
INT32 left;
INT32 top;
INT32 right;
INT32 bottom;
} GDI_RECT;
typedef GDI_RECT* HGDI_RECT;
typedef struct
{
BYTE objectType;
INT32 x; /* left */
INT32 y; /* top */
INT32 w; /* width */
INT32 h; /* height */
BOOL null; /* null region */
} GDI_RGN;
typedef GDI_RGN* HGDI_RGN;
typedef struct
{
BYTE objectType;
UINT32 format;
INT32 width;
INT32 height;
UINT32 scanline;
BYTE* data;
void (*free)(void*);
} GDI_BITMAP;
typedef GDI_BITMAP* HGDI_BITMAP;
typedef struct
{
BYTE objectType;
UINT32 style;
INT32 width;
INT32 posX;
INT32 posY;
UINT32 color;
UINT32 format;
const gdiPalette* palette;
} GDI_PEN;
typedef GDI_PEN* HGDI_PEN;
typedef struct
{
BYTE red;
BYTE green;
BYTE blue;
} GDI_PALETTEENTRY;
typedef struct
{
UINT16 count;
GDI_PALETTEENTRY* entries;
} GDI_PALETTE;
typedef GDI_PALETTE* HGDI_PALETTE;
typedef struct
{
INT32 x;
INT32 y;
} GDI_POINT;
typedef GDI_POINT* HGDI_POINT;
typedef struct
{
BYTE objectType;
int style;
HGDI_BITMAP pattern;
UINT32 color;
INT32 nXOrg;
INT32 nYOrg;
} GDI_BRUSH;
typedef GDI_BRUSH* HGDI_BRUSH;
typedef struct
{
UINT32 count;
INT32 ninvalid;
HGDI_RGN invalid;
HGDI_RGN cinvalid;
} GDI_WND;
typedef GDI_WND* HGDI_WND;
typedef struct
{
HGDIOBJECT selectedObject;
UINT32 format;
UINT32 bkColor;
UINT32 textColor;
HGDI_BRUSH brush;
HGDI_RGN clip;
HGDI_PEN pen;
HGDI_WND hwnd;
INT32 drawMode;
INT32 bkMode;
} GDI_DC;
typedef GDI_DC* HGDI_DC;
struct gdi_bitmap
{
rdpBitmap _p;
HGDI_DC hdc;
HGDI_BITMAP bitmap;
HGDI_BITMAP org_bitmap;
};
typedef struct gdi_bitmap gdiBitmap;
struct gdi_glyph
{
rdpBitmap _p;
HGDI_DC hdc;
HGDI_BITMAP bitmap;
HGDI_BITMAP org_bitmap;
};
typedef struct gdi_glyph gdiGlyph;
struct rdp_gdi
{
rdpContext* context;
INT32 width;
INT32 height;
UINT32 stride;
UINT32 dstFormat;
UINT32 cursor_x;
UINT32 cursor_y;
HGDI_DC hdc;
gdiBitmap* primary;
gdiBitmap* drawing;
UINT32 bitmap_size;
UINT32 bitmap_stride;
BYTE* primary_buffer;
gdiPalette palette;
gdiBitmap* image;
void (*free)(void*);
BOOL inGfxFrame;
BOOL graphicsReset; /* deprecated, remove with FreeRDP v3 */
BOOL suppressOutput;
UINT16 outputSurfaceId;
UINT32 frameId;
RdpgfxClientContext* gfx;
VideoClientContext* video;
GeometryClientContext* geometry;
wLog* log;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct
{
BYTE objectType;
} GDIOBJECT;
typedef GDIOBJECT* HGDIOBJECT;
typedef struct
{
BYTE objectType;
INT32 left;
INT32 top;
INT32 right;
INT32 bottom;
} GDI_RECT;
typedef GDI_RECT* HGDI_RECT;
typedef struct
{
BYTE objectType;
INT32 x; /* left */
INT32 y; /* top */
INT32 w; /* width */
INT32 h; /* height */
BOOL null; /* null region */
} GDI_RGN;
typedef GDI_RGN* HGDI_RGN;
typedef struct
{
BYTE objectType;
UINT32 format;
INT32 width;
INT32 height;
UINT32 scanline;
BYTE* data;
void (*free)(void*);
} GDI_BITMAP;
typedef GDI_BITMAP* HGDI_BITMAP;
typedef struct
{
BYTE objectType;
UINT32 style;
INT32 width;
INT32 posX;
INT32 posY;
UINT32 color;
UINT32 format;
const gdiPalette* palette;
} GDI_PEN;
typedef GDI_PEN* HGDI_PEN;
typedef struct
{
BYTE red;
BYTE green;
BYTE blue;
} GDI_PALETTEENTRY;
typedef struct
{
UINT16 count;
GDI_PALETTEENTRY* entries;
} GDI_PALETTE;
typedef GDI_PALETTE* HGDI_PALETTE;
typedef struct
{
INT32 x;
INT32 y;
} GDI_POINT;
typedef GDI_POINT* HGDI_POINT;
typedef struct
{
BYTE objectType;
int style;
HGDI_BITMAP pattern;
UINT32 color;
INT32 nXOrg;
INT32 nYOrg;
} GDI_BRUSH;
typedef GDI_BRUSH* HGDI_BRUSH;
typedef struct
{
UINT32 count;
INT32 ninvalid;
HGDI_RGN invalid;
HGDI_RGN cinvalid;
} GDI_WND;
typedef GDI_WND* HGDI_WND;
typedef struct
{
HGDIOBJECT selectedObject;
UINT32 format;
UINT32 bkColor;
UINT32 textColor;
HGDI_BRUSH brush;
HGDI_RGN clip;
HGDI_PEN pen;
HGDI_WND hwnd;
INT32 drawMode;
INT32 bkMode;
} GDI_DC;
typedef GDI_DC* HGDI_DC;
struct gdi_bitmap
{
rdpBitmap _p;
HGDI_DC hdc;
HGDI_BITMAP bitmap;
HGDI_BITMAP org_bitmap;
};
typedef struct gdi_bitmap gdiBitmap;
struct gdi_glyph
{
rdpBitmap _p;
HGDI_DC hdc;
HGDI_BITMAP bitmap;
HGDI_BITMAP org_bitmap;
};
typedef struct gdi_glyph gdiGlyph;
struct rdp_gdi
{
rdpContext* context;
INT32 width;
INT32 height;
UINT32 stride;
UINT32 dstFormat;
UINT32 cursor_x;
UINT32 cursor_y;
HGDI_DC hdc;
gdiBitmap* primary;
gdiBitmap* drawing;
UINT32 bitmap_size;
UINT32 bitmap_stride;
BYTE* primary_buffer;
gdiPalette palette;
gdiBitmap* image;
void (*free)(void*);
BOOL inGfxFrame;
BOOL graphicsReset; /* deprecated, remove with FreeRDP v3 */
BOOL suppressOutput;
UINT16 outputSurfaceId;
UINT32 frameId;
RdpgfxClientContext* gfx;
VideoClientContext* video;
GeometryClientContext* geometry;
wLog* log;
};
FREERDP_API DWORD gdi_rop3_code(BYTE code); FREERDP_API DWORD gdi_rop3_code(BYTE code);
FREERDP_API const char* gdi_rop3_code_string(BYTE code); FREERDP_API const char* gdi_rop3_code_string(BYTE code);
FREERDP_API const char* gdi_rop3_string(DWORD rop); FREERDP_API const char* gdi_rop3_string(DWORD rop);

View File

@ -23,46 +23,46 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/gdi/gdi.h> #include <freerdp/gdi/gdi.h>
struct gdi_gfx_surface
{
UINT16 surfaceId;
rdpCodecs* codecs;
H264_CONTEXT* h264;
UINT32 width;
UINT32 height;
UINT32 mappedWidth;
UINT32 mappedHeight;
BYTE* data;
UINT32 scanline;
UINT32 format;
BOOL outputMapped;
UINT32 outputOriginX;
UINT32 outputOriginY;
REGION16 invalidRegion;
UINT64 windowId;
UINT32 outputTargetWidth;
UINT32 outputTargetHeight;
BOOL windowMapped;
BOOL handleInUpdateSurfaceArea;
};
typedef struct gdi_gfx_surface gdiGfxSurface;
struct gdi_gfx_cache_entry
{
UINT64 cacheKey;
UINT32 width;
UINT32 height;
BYTE* data;
UINT32 scanline;
UINT32 format;
};
typedef struct gdi_gfx_cache_entry gdiGfxCacheEntry;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
struct gdi_gfx_surface
{
UINT16 surfaceId;
rdpCodecs* codecs;
H264_CONTEXT* h264;
UINT32 width;
UINT32 height;
UINT32 mappedWidth;
UINT32 mappedHeight;
BYTE* data;
UINT32 scanline;
UINT32 format;
BOOL outputMapped;
UINT32 outputOriginX;
UINT32 outputOriginY;
REGION16 invalidRegion;
UINT64 windowId;
UINT32 outputTargetWidth;
UINT32 outputTargetHeight;
BOOL windowMapped;
BOOL handleInUpdateSurfaceArea;
};
typedef struct gdi_gfx_surface gdiGfxSurface;
struct gdi_gfx_cache_entry
{
UINT64 cacheKey;
UINT32 width;
UINT32 height;
BYTE* data;
UINT32 scanline;
UINT32 format;
};
typedef struct gdi_gfx_cache_entry gdiGfxCacheEntry;
FREERDP_API BOOL gdi_graphics_pipeline_init(rdpGdi* gdi, RdpgfxClientContext* gfx); FREERDP_API BOOL gdi_graphics_pipeline_init(rdpGdi* gdi, RdpgfxClientContext* gfx);
FREERDP_API BOOL gdi_graphics_pipeline_init_ex(rdpGdi* gdi, RdpgfxClientContext* gfx, FREERDP_API BOOL gdi_graphics_pipeline_init_ex(rdpGdi* gdi, RdpgfxClientContext* gfx,
pcRdpgfxMapWindowForSurface map, pcRdpgfxMapWindowForSurface map,

View File

@ -22,10 +22,6 @@
#ifndef FREERDP_GRAPHICS_H #ifndef FREERDP_GRAPHICS_H
#define FREERDP_GRAPHICS_H #define FREERDP_GRAPHICS_H
typedef struct rdp_bitmap rdpBitmap;
typedef struct rdp_pointer rdpPointer;
typedef struct rdp_glyph rdpGlyph;
#include <stdlib.h> #include <stdlib.h>
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
@ -36,6 +32,10 @@ extern "C"
{ {
#endif #endif
typedef struct rdp_bitmap rdpBitmap;
typedef struct rdp_pointer rdpPointer;
typedef struct rdp_glyph rdpGlyph;
/* Bitmap Class */ /* Bitmap Class */
typedef BOOL (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap); typedef BOOL (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap);
typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap);

View File

@ -22,20 +22,20 @@
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct rdp_heartbeat rdpHeartbeat;
typedef BOOL (*pServerHeartbeat)(freerdp* instance, BYTE period, BYTE count1, BYTE count2);
struct rdp_heartbeat
{
pServerHeartbeat ServerHeartbeat;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_heartbeat rdpHeartbeat;
typedef BOOL (*pServerHeartbeat)(freerdp* instance, BYTE period, BYTE count1, BYTE count2);
struct rdp_heartbeat
{
pServerHeartbeat ServerHeartbeat;
};
FREERDP_API BOOL freerdp_heartbeat_send_heartbeat_pdu(freerdp_peer* peer, BYTE period, FREERDP_API BOOL freerdp_heartbeat_send_heartbeat_pdu(freerdp_peer* peer, BYTE period,
BYTE count1, BYTE count2); BYTE count1, BYTE count2);

View File

@ -20,8 +20,6 @@
#ifndef FREERDP_INPUT_H #ifndef FREERDP_INPUT_H
#define FREERDP_INPUT_H #define FREERDP_INPUT_H
typedef struct rdp_input rdpInput;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#include <freerdp/scancode.h> #include <freerdp/scancode.h>
@ -61,41 +59,43 @@ typedef struct rdp_input rdpInput;
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
/* defined inside libfreerdp-core */
typedef struct rdp_input_proxy rdpInputProxy;
/* Input Interface */
typedef BOOL (*pSynchronizeEvent)(rdpInput* input, UINT32 flags);
typedef BOOL (*pKeyboardEvent)(rdpInput* input, UINT16 flags, UINT8 code);
typedef BOOL (*pUnicodeKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code);
typedef BOOL (*pMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pExtendedMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pFocusInEvent)(rdpInput* input, UINT16 toggleStates);
typedef BOOL (*pKeyboardPauseEvent)(rdpInput* input);
struct rdp_input
{
rdpContext* context; /* 0 */
void* param1; /* 1 */
UINT32 paddingA[16 - 2]; /* 2 */
pSynchronizeEvent SynchronizeEvent; /* 16 */
pKeyboardEvent KeyboardEvent; /* 17 */
pUnicodeKeyboardEvent UnicodeKeyboardEvent; /* 18 */
pMouseEvent MouseEvent; /* 19 */
pExtendedMouseEvent ExtendedMouseEvent; /* 20 */
pFocusInEvent FocusInEvent; /*21 */
pKeyboardPauseEvent KeyboardPauseEvent; /* 22 */
UINT32 paddingB[32 - 23]; /* 23 */
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_input rdpInput;
/* defined inside libfreerdp-core */
typedef struct rdp_input_proxy rdpInputProxy;
/* Input Interface */
typedef BOOL (*pSynchronizeEvent)(rdpInput* input, UINT32 flags);
typedef BOOL (*pKeyboardEvent)(rdpInput* input, UINT16 flags, UINT8 code);
typedef BOOL (*pUnicodeKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code);
typedef BOOL (*pMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pExtendedMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pFocusInEvent)(rdpInput* input, UINT16 toggleStates);
typedef BOOL (*pKeyboardPauseEvent)(rdpInput* input);
struct rdp_input
{
rdpContext* context; /* 0 */
void* param1; /* 1 */
UINT32 paddingA[16 - 2]; /* 2 */
pSynchronizeEvent SynchronizeEvent; /* 16 */
pKeyboardEvent KeyboardEvent; /* 17 */
pUnicodeKeyboardEvent UnicodeKeyboardEvent; /* 18 */
pMouseEvent MouseEvent; /* 19 */
pExtendedMouseEvent ExtendedMouseEvent; /* 20 */
pFocusInEvent FocusInEvent; /*21 */
pKeyboardPauseEvent KeyboardPauseEvent; /* 22 */
UINT32 paddingB[32 - 23]; /* 23 */
};
FREERDP_API BOOL freerdp_input_send_synchronize_event(rdpInput* input, UINT32 flags); FREERDP_API BOOL freerdp_input_send_synchronize_event(rdpInput* input, UINT32 flags);
FREERDP_API BOOL freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT8 code); FREERDP_API BOOL freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT8 code);
FREERDP_API BOOL freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, BOOL repeat, FREERDP_API BOOL freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, BOOL repeat,

View File

@ -20,8 +20,6 @@
#ifndef FREERDP_LISTENER_H #ifndef FREERDP_LISTENER_H
#define FREERDP_LISTENER_H #define FREERDP_LISTENER_H
typedef struct rdp_freerdp_listener freerdp_listener;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/settings.h> #include <freerdp/settings.h>
@ -32,6 +30,8 @@ extern "C"
{ {
#endif #endif
typedef struct rdp_freerdp_listener freerdp_listener;
typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address,
UINT16 port); UINT16 port);
typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance, const char* path); typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance, const char* path);

View File

@ -26,6 +26,11 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/scancode.h> #include <freerdp/scancode.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define RDP_KEYBOARD_LAYOUT_TYPE_STANDARD 1 #define RDP_KEYBOARD_LAYOUT_TYPE_STANDARD 1
#define RDP_KEYBOARD_LAYOUT_TYPE_VARIANT 2 #define RDP_KEYBOARD_LAYOUT_TYPE_VARIANT 2
#define RDP_KEYBOARD_LAYOUT_TYPE_IME 4 #define RDP_KEYBOARD_LAYOUT_TYPE_IME 4
@ -219,11 +224,6 @@ typedef struct
#define KBD_TYPE_NOKIA_9140 0x00000006 /* Nokia 9140 and similar keyboards */ #define KBD_TYPE_NOKIA_9140 0x00000006 /* Nokia 9140 and similar keyboards */
#define KBD_TYPE_JAPANESE 0x00000007 /* Japanese keyboard */ #define KBD_TYPE_JAPANESE 0x00000007 /* Japanese keyboard */
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API DWORD freerdp_keyboard_init(DWORD keyboardLayoutId); FREERDP_API DWORD freerdp_keyboard_init(DWORD keyboardLayoutId);
FREERDP_API DWORD freerdp_keyboard_init_ex(DWORD keyboardLayoutId, FREERDP_API DWORD freerdp_keyboard_init_ex(DWORD keyboardLayoutId,
const char* keyboardRemappingList); const char* keyboardRemappingList);

View File

@ -17,8 +17,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef FREERDP_CORE_MESSAGE_H #ifndef FREERDP_MESSAGE_H
#define FREERDP_CORE_MESSAGE_H #define FREERDP_MESSAGE_H
#define GetMessageType(_id) (_id & 0xFF) #define GetMessageType(_id) (_id & 0xFF)
#define GetMessageClass(_id) ((_id >> 16) & 0xFF) #define GetMessageClass(_id) ((_id >> 16) & 0xFF)
@ -373,4 +373,4 @@
#define FREERDP_RDPEI_CHANNEL_DISMISS_HOVERING_CONTACT \ #define FREERDP_RDPEI_CHANNEL_DISMISS_HOVERING_CONTACT \
MakeMessageId(RdpeiChannel, DismissHoveringContact) MakeMessageId(RdpeiChannel, DismissHoveringContact)
#endif /* FREERDP_CORE_MESSAGE_H */ #endif /* FREERDP_MESSAGE_H */

View File

@ -22,20 +22,20 @@
#include <freerdp/api.h> #include <freerdp/api.h>
struct rdp_metrics
{
rdpContext* context;
UINT64 TotalCompressedBytes;
UINT64 TotalUncompressedBytes;
double TotalCompressionRatio;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
struct rdp_metrics
{
rdpContext* context;
UINT64 TotalCompressedBytes;
UINT64 TotalUncompressedBytes;
double TotalCompressionRatio;
};
FREERDP_API double metrics_write_bytes(rdpMetrics* metrics, UINT32 UncompressedBytes, FREERDP_API double metrics_write_bytes(rdpMetrics* metrics, UINT32 UncompressedBytes,
UINT32 CompressedBytes); UINT32 CompressedBytes);

View File

@ -32,10 +32,15 @@
#include <winpr/ntlm.h> #include <winpr/ntlm.h>
#include <winpr/winsock.h> #include <winpr/winsock.h>
typedef BOOL (*psPeerContextNew)(freerdp_peer* peer, rdpContext* context); #ifdef __cplusplus
typedef void (*psPeerContextFree)(freerdp_peer* peer, rdpContext* context); extern "C"
{
#endif
typedef BOOL (*psPeerInitialize)(freerdp_peer* peer); typedef BOOL (*psPeerContextNew)(freerdp_peer* peer, rdpContext* context);
typedef void (*psPeerContextFree)(freerdp_peer* peer, rdpContext* context);
typedef BOOL (*psPeerInitialize)(freerdp_peer* peer);
#if defined(WITH_FREERDP_DEPRECATED) #if defined(WITH_FREERDP_DEPRECATED)
WINPR_DEPRECATED_VAR("Use psPeerGetEventHandle instead", WINPR_DEPRECATED_VAR("Use psPeerGetEventHandle instead",
typedef BOOL (*psPeerGetFileDescriptor)(freerdp_peer* peer, void** rfds, typedef BOOL (*psPeerGetFileDescriptor)(freerdp_peer* peer, void** rfds,
@ -178,11 +183,6 @@ struct rdp_freerdp_peer
ALIGN64 psSspiNtlmHashCallback SspiNtlmHashCallback; ALIGN64 psSspiNtlmHashCallback SspiNtlmHashCallback;
}; };
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API BOOL freerdp_peer_context_new(freerdp_peer* client); FREERDP_API BOOL freerdp_peer_context_new(freerdp_peer* client);
FREERDP_API BOOL freerdp_peer_context_new_ex(freerdp_peer* client, const rdpSettings* settings); FREERDP_API BOOL freerdp_peer_context_new_ex(freerdp_peer* client, const rdpSettings* settings);
FREERDP_API void freerdp_peer_context_free(freerdp_peer* client); FREERDP_API void freerdp_peer_context_free(freerdp_peer* client);

View File

@ -32,76 +32,87 @@
#define SYSPTR_NULL 0x00000000 #define SYSPTR_NULL 0x00000000
#define SYSPTR_DEFAULT 0x00007F00 #define SYSPTR_DEFAULT 0x00007F00
typedef struct #ifdef __cplusplus
extern "C"
{ {
UINT32 xPos; #endif
UINT32 yPos;
} POINTER_POSITION_UPDATE;
typedef struct typedef struct
{ {
UINT32 type; UINT32 xPos;
} POINTER_SYSTEM_UPDATE; UINT32 yPos;
} POINTER_POSITION_UPDATE;
typedef struct typedef struct
{ {
UINT32 cacheIndex; UINT32 type;
UINT32 xPos; } POINTER_SYSTEM_UPDATE;
UINT32 yPos;
UINT32 width;
UINT32 height;
UINT32 lengthAndMask;
UINT32 lengthXorMask;
BYTE* xorMaskData;
BYTE* andMaskData;
} POINTER_COLOR_UPDATE;
typedef struct typedef struct
{ {
UINT16 xorBpp; UINT32 cacheIndex;
UINT16 cacheIndex; UINT32 xPos;
UINT16 hotSpotX; UINT32 yPos;
UINT16 hotSpotY; UINT32 width;
UINT16 width; UINT32 height;
UINT16 height; UINT32 lengthAndMask;
UINT32 lengthAndMask; UINT32 lengthXorMask;
UINT32 lengthXorMask; BYTE* xorMaskData;
BYTE* xorMaskData; BYTE* andMaskData;
BYTE* andMaskData; } POINTER_COLOR_UPDATE;
} POINTER_LARGE_UPDATE;
typedef struct typedef struct
{ {
UINT32 xorBpp; UINT16 xorBpp;
POINTER_COLOR_UPDATE colorPtrAttr; UINT16 cacheIndex;
} POINTER_NEW_UPDATE; UINT16 hotSpotX;
UINT16 hotSpotY;
UINT16 width;
UINT16 height;
UINT32 lengthAndMask;
UINT32 lengthXorMask;
BYTE* xorMaskData;
BYTE* andMaskData;
} POINTER_LARGE_UPDATE;
typedef struct typedef struct
{ {
UINT32 cacheIndex; UINT32 xorBpp;
} POINTER_CACHED_UPDATE; POINTER_COLOR_UPDATE colorPtrAttr;
} POINTER_NEW_UPDATE;
typedef BOOL (*pPointerPosition)(rdpContext* context, typedef struct
const POINTER_POSITION_UPDATE* pointer_position); {
typedef BOOL (*pPointerSystem)(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer_system); UINT32 cacheIndex;
typedef BOOL (*pPointerColor)(rdpContext* context, const POINTER_COLOR_UPDATE* pointer_color); } POINTER_CACHED_UPDATE;
typedef BOOL (*pPointerNew)(rdpContext* context, const POINTER_NEW_UPDATE* pointer_new);
typedef BOOL (*pPointerCached)(rdpContext* context, const POINTER_CACHED_UPDATE* pointer_cached);
typedef BOOL (*pPointerLarge)(rdpContext* context, const POINTER_LARGE_UPDATE* pointer_large);
struct rdp_pointer_update typedef BOOL (*pPointerPosition)(rdpContext* context,
{ const POINTER_POSITION_UPDATE* pointer_position);
rdpContext* context; /* 0 */ typedef BOOL (*pPointerSystem)(rdpContext* context,
UINT32 paddingA[16 - 1]; /* 1 */ const POINTER_SYSTEM_UPDATE* pointer_system);
typedef BOOL (*pPointerColor)(rdpContext* context, const POINTER_COLOR_UPDATE* pointer_color);
typedef BOOL (*pPointerNew)(rdpContext* context, const POINTER_NEW_UPDATE* pointer_new);
typedef BOOL (*pPointerCached)(rdpContext* context,
const POINTER_CACHED_UPDATE* pointer_cached);
typedef BOOL (*pPointerLarge)(rdpContext* context, const POINTER_LARGE_UPDATE* pointer_large);
pPointerPosition PointerPosition; /* 16 */ struct rdp_pointer_update
pPointerSystem PointerSystem; /* 17 */ {
pPointerColor PointerColor; /* 18 */ rdpContext* context; /* 0 */
pPointerNew PointerNew; /* 19 */ UINT32 paddingA[16 - 1]; /* 1 */
pPointerCached PointerCached; /* 20 */
pPointerLarge PointerLarge; /* 21 */ pPointerPosition PointerPosition; /* 16 */
UINT32 paddingB[32 - 22]; /* 22 */ pPointerSystem PointerSystem; /* 17 */
}; pPointerColor PointerColor; /* 18 */
typedef struct rdp_pointer_update rdpPointerUpdate; pPointerNew PointerNew; /* 19 */
pPointerCached PointerCached; /* 20 */
pPointerLarge PointerLarge; /* 21 */
UINT32 paddingB[32 - 22]; /* 22 */
};
typedef struct rdp_pointer_update rdpPointerUpdate;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UPDATE_POINTER_H */ #endif /* FREERDP_UPDATE_POINTER_H */

View File

@ -22,27 +22,32 @@
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct #ifdef __cplusplus
extern "C"
{ {
UINT32 cacheIndex; #endif
INT16 x;
INT16 y;
UINT32 cx;
UINT32 cy;
UINT32 cb;
BYTE* aj;
} GLYPH_DATA;
typedef struct typedef struct
{ {
UINT32 cacheIndex; UINT32 cacheIndex;
INT32 x; INT16 x;
INT32 y; INT16 y;
UINT32 cx; UINT32 cx;
UINT32 cy; UINT32 cy;
UINT32 cb; UINT32 cb;
BYTE* aj; BYTE* aj;
} GLYPH_DATA_V2; } GLYPH_DATA;
typedef struct
{
UINT32 cacheIndex;
INT32 x;
INT32 y;
UINT32 cx;
UINT32 cy;
UINT32 cb;
BYTE* aj;
} GLYPH_DATA_V2;
#define BACKMODE_TRANSPARENT 0x0001 #define BACKMODE_TRANSPARENT 0x0001
#define BACKMODE_OPAQUE 0x0002 #define BACKMODE_OPAQUE 0x0002
@ -469,4 +474,8 @@ struct rdp_primary_update
}; };
typedef struct rdp_primary_update rdpPrimaryUpdate; typedef struct rdp_primary_update rdpPrimaryUpdate;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UPDATE_PRIMARY_H */ #endif /* FREERDP_UPDATE_PRIMARY_H */

View File

@ -26,7 +26,12 @@
#include <winpr/platform.h> #include <winpr/platform.h>
typedef INT32 pstatus_t; /* match IppStatus. */ #ifdef __cplusplus
extern "C"
{
#endif
typedef INT32 pstatus_t; /* match IppStatus. */
#define PRIMITIVES_SUCCESS (0) /* match ippStsNoErr */ #define PRIMITIVES_SUCCESS (0) /* match ippStsNoErr */
/* Simple macro for address of an x,y location in 2d 4-byte memory block */ /* Simple macro for address of an x,y location in 2d 4-byte memory block */
@ -198,11 +203,6 @@ typedef enum
PRIMITIVES_AUTODETECT /** detect the best routines */ PRIMITIVES_AUTODETECT /** detect the best routines */
} primitive_hints; } primitive_hints;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API primitives_t* primitives_get(void); FREERDP_API primitives_t* primitives_get(void);
FREERDP_API void primitives_set_hints(primitive_hints hints); FREERDP_API void primitives_set_hints(primitive_hints hints);
FREERDP_API primitive_hints primitives_get_hints(void); FREERDP_API primitive_hints primitives_get_hints(void);

View File

@ -25,6 +25,11 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define RAIL_SVC_CHANNEL_NAME "rail" #define RAIL_SVC_CHANNEL_NAME "rail"
/* DEPRECATED: RAIL PDU flags use the spec conformant naming with TS_ prefix */ /* DEPRECATED: RAIL PDU flags use the spec conformant naming with TS_ prefix */
@ -573,11 +578,6 @@ typedef enum
TS_RAIL_ORDER_EXEC_RESULT = 0x0080 TS_RAIL_ORDER_EXEC_RESULT = 0x0080
} ORDER_TYPE; } ORDER_TYPE;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API BOOL rail_read_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string); FREERDP_API BOOL rail_read_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_string);
FREERDP_API BOOL utf8_string_to_rail_string(const char* string, FREERDP_API BOOL utf8_string_to_rail_string(const char* string,
RAIL_UNICODE_STRING* unicode_string); RAIL_UNICODE_STRING* unicode_string);

View File

@ -23,6 +23,11 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/primary.h> #include <freerdp/primary.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define GLYPH_FRAGMENT_NOP 0x00 #define GLYPH_FRAGMENT_NOP 0x00
#define GLYPH_FRAGMENT_USE 0xFE #define GLYPH_FRAGMENT_USE 0xFE
#define GLYPH_FRAGMENT_ADD 0xFF #define GLYPH_FRAGMENT_ADD 0xFF
@ -185,4 +190,8 @@ struct rdp_secondary_update
}; };
typedef struct rdp_secondary_update rdpSecondaryUpdate; typedef struct rdp_secondary_update rdpSecondaryUpdate;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UPDATE_SECONDARY_H */ #endif /* FREERDP_UPDATE_SECONDARY_H */

View File

@ -24,94 +24,94 @@
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/ainput.h> #include <freerdp/channels/ainput.h>
typedef enum AINPUT_SERVER_OPEN_RESULT
{
AINPUT_SERVER_OPEN_RESULT_OK = 0,
AINPUT_SERVER_OPEN_RESULT_CLOSED = 1,
AINPUT_SERVER_OPEN_RESULT_NOTSUPPORTED = 2,
AINPUT_SERVER_OPEN_RESULT_ERROR = 3
} AINPUT_SERVER_OPEN_RESULT;
typedef struct _ainput_server_context ainput_server_context;
typedef BOOL (*psAInputChannelIdAssigned)(ainput_server_context* context, UINT32 channelId);
typedef UINT (*psAInputServerInitialize)(ainput_server_context* context, BOOL externalThread);
typedef UINT (*psAInputServerPoll)(ainput_server_context* context);
typedef BOOL (*psAInputServerChannelHandle)(ainput_server_context* context, HANDLE* handle);
typedef UINT (*psAInputServerOpen)(ainput_server_context* context);
typedef UINT (*psAInputServerClose)(ainput_server_context* context);
typedef BOOL (*psAInputServerIsOpen)(ainput_server_context* context);
typedef UINT (*psAInputServerOpenResult)(ainput_server_context* context,
AINPUT_SERVER_OPEN_RESULT result);
typedef UINT (*psAInputServerMouseEvent)(ainput_server_context* context, UINT64 timestamp,
UINT64 flags, INT32 x, INT32 y);
struct _ainput_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/*** APIs called by the server. ***/
/**
* Open the ainput channel.
*/
psAInputServerOpen Open;
/**
* Optional: Set thread handling.
* When externalThread=TRUE the application is responsible to call
* ainput_server_context_poll periodically to process input events.
*
* Defaults to externalThread=FALSE
*/
psAInputServerInitialize Initialize;
/**
* @brief Poll When externalThread=TRUE call periodically from your main loop.
* if externalThread=FALSE do not call.
*/
psAInputServerPoll Poll;
/**
* @brief Poll When externalThread=TRUE call to get a handle to wait for events.
* Will return FALSE until the handle is available.
*/
psAInputServerChannelHandle ChannelHandle;
/**
* Close the ainput channel.
*/
psAInputServerClose Close;
/**
* Status of the ainput channel.
*/
psAInputServerIsOpen IsOpen;
/*** Callbacks registered by the server. ***/
/**
* Receive ainput mouse event PDU.
*/
psAInputServerMouseEvent MouseEvent;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psAInputChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef enum AINPUT_SERVER_OPEN_RESULT
{
AINPUT_SERVER_OPEN_RESULT_OK = 0,
AINPUT_SERVER_OPEN_RESULT_CLOSED = 1,
AINPUT_SERVER_OPEN_RESULT_NOTSUPPORTED = 2,
AINPUT_SERVER_OPEN_RESULT_ERROR = 3
} AINPUT_SERVER_OPEN_RESULT;
typedef struct _ainput_server_context ainput_server_context;
typedef BOOL (*psAInputChannelIdAssigned)(ainput_server_context* context, UINT32 channelId);
typedef UINT (*psAInputServerInitialize)(ainput_server_context* context, BOOL externalThread);
typedef UINT (*psAInputServerPoll)(ainput_server_context* context);
typedef BOOL (*psAInputServerChannelHandle)(ainput_server_context* context, HANDLE* handle);
typedef UINT (*psAInputServerOpen)(ainput_server_context* context);
typedef UINT (*psAInputServerClose)(ainput_server_context* context);
typedef BOOL (*psAInputServerIsOpen)(ainput_server_context* context);
typedef UINT (*psAInputServerOpenResult)(ainput_server_context* context,
AINPUT_SERVER_OPEN_RESULT result);
typedef UINT (*psAInputServerMouseEvent)(ainput_server_context* context, UINT64 timestamp,
UINT64 flags, INT32 x, INT32 y);
struct _ainput_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/*** APIs called by the server. ***/
/**
* Open the ainput channel.
*/
psAInputServerOpen Open;
/**
* Optional: Set thread handling.
* When externalThread=TRUE the application is responsible to call
* ainput_server_context_poll periodically to process input events.
*
* Defaults to externalThread=FALSE
*/
psAInputServerInitialize Initialize;
/**
* @brief Poll When externalThread=TRUE call periodically from your main loop.
* if externalThread=FALSE do not call.
*/
psAInputServerPoll Poll;
/**
* @brief Poll When externalThread=TRUE call to get a handle to wait for events.
* Will return FALSE until the handle is available.
*/
psAInputServerChannelHandle ChannelHandle;
/**
* Close the ainput channel.
*/
psAInputServerClose Close;
/**
* Status of the ainput channel.
*/
psAInputServerIsOpen IsOpen;
/*** Callbacks registered by the server. ***/
/**
* Receive ainput mouse event PDU.
*/
psAInputServerMouseEvent MouseEvent;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psAInputChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API ainput_server_context* ainput_server_context_new(HANDLE vcm); FREERDP_API ainput_server_context* ainput_server_context_new(HANDLE vcm);
FREERDP_API void ainput_server_context_free(ainput_server_context* context); FREERDP_API void ainput_server_context_free(ainput_server_context* context);

View File

@ -30,93 +30,93 @@
#error "This header must not be included if CHANNEL_AUDIN_SERVER is not defined" #error "This header must not be included if CHANNEL_AUDIN_SERVER is not defined"
#endif #endif
typedef struct s_audin_server_context audin_server_context;
typedef BOOL (*psAudinServerChannelIdAssigned)(audin_server_context* context, UINT32 channelId);
typedef UINT (*psAudinServerSelectFormat)(audin_server_context* context,
size_t client_format_index);
typedef BOOL (*psAudinServerOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerIsOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerClose)(audin_server_context* context);
typedef UINT (*psAudinServerOpening)(audin_server_context* context);
typedef UINT (*psAudinServerOpenResult)(audin_server_context* context, UINT32 result);
typedef UINT (*psAudinServerReceiveSamples)(audin_server_context* context,
const AUDIO_FORMAT* format, wStream* buf,
size_t nframes);
struct s_audin_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/* Server supported formats. Set by server. */
AUDIO_FORMAT* server_formats;
size_t num_server_formats;
/* Server destination PCM audio format. Set by server. */
AUDIO_FORMAT* dst_format;
/* Server preferred frames per packet. */
int frames_per_packet;
/* Client supported formats. */
AUDIO_FORMAT* client_formats;
size_t num_client_formats;
SSIZE_T selected_client_format;
/*** APIs called by the server. ***/
/**
* Choose the audio format to be received. The index argument is an index into
* the client_formats array and must be smaller than num_client_formats.
*/
psAudinServerSelectFormat SelectFormat;
/**
* Open the audio input stream.
*/
psAudinServerOpen Open;
psAudinServerIsOpen IsOpen;
/**
* Close the audio stream.
*/
psAudinServerClose Close;
/*** Callbacks registered by the server. ***/
/**
* It's ready to open the audio input stream. The server should examine client
* formats and call SelectFormat to choose the desired one in this callback.
*/
psAudinServerOpening Opening;
/**
* Client replied HRESULT of the open operation.
*/
psAudinServerOpenResult OpenResult;
/**
* Receive audio samples. Actual bytes in the buffer is:
* nframes * dst_format.nBitsPerSample * dst_format.nChannels / 8
* Note that this callback is called from a different thread context so the
* server must be careful of thread synchronization.
*/
psAudinServerReceiveSamples ReceiveSamples;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psAudinServerChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_audin_server_context audin_server_context;
typedef BOOL (*psAudinServerChannelIdAssigned)(audin_server_context* context, UINT32 channelId);
typedef UINT (*psAudinServerSelectFormat)(audin_server_context* context,
size_t client_format_index);
typedef BOOL (*psAudinServerOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerIsOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerClose)(audin_server_context* context);
typedef UINT (*psAudinServerOpening)(audin_server_context* context);
typedef UINT (*psAudinServerOpenResult)(audin_server_context* context, UINT32 result);
typedef UINT (*psAudinServerReceiveSamples)(audin_server_context* context,
const AUDIO_FORMAT* format, wStream* buf,
size_t nframes);
struct s_audin_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/* Server supported formats. Set by server. */
AUDIO_FORMAT* server_formats;
size_t num_server_formats;
/* Server destination PCM audio format. Set by server. */
AUDIO_FORMAT* dst_format;
/* Server preferred frames per packet. */
int frames_per_packet;
/* Client supported formats. */
AUDIO_FORMAT* client_formats;
size_t num_client_formats;
SSIZE_T selected_client_format;
/*** APIs called by the server. ***/
/**
* Choose the audio format to be received. The index argument is an index into
* the client_formats array and must be smaller than num_client_formats.
*/
psAudinServerSelectFormat SelectFormat;
/**
* Open the audio input stream.
*/
psAudinServerOpen Open;
psAudinServerIsOpen IsOpen;
/**
* Close the audio stream.
*/
psAudinServerClose Close;
/*** Callbacks registered by the server. ***/
/**
* It's ready to open the audio input stream. The server should examine client
* formats and call SelectFormat to choose the desired one in this callback.
*/
psAudinServerOpening Opening;
/**
* Client replied HRESULT of the open operation.
*/
psAudinServerOpenResult OpenResult;
/**
* Receive audio samples. Actual bytes in the buffer is:
* nframes * dst_format.nBitsPerSample * dst_format.nChannels / 8
* Note that this callback is called from a different thread context so the
* server must be careful of thread synchronization.
*/
psAudinServerReceiveSamples ReceiveSamples;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psAudinServerChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API audin_server_context* audin_server_context_new(HANDLE vcm); FREERDP_API audin_server_context* audin_server_context_new(HANDLE vcm);
FREERDP_API void audin_server_context_free(audin_server_context* context); FREERDP_API void audin_server_context_free(audin_server_context* context);

View File

@ -29,111 +29,111 @@
#include <freerdp/channels/cliprdr.h> #include <freerdp/channels/cliprdr.h>
#include <freerdp/client/cliprdr.h> #include <freerdp/client/cliprdr.h>
/**
* Server Interface
*/
typedef struct s_cliprdr_server_context CliprdrServerContext;
typedef UINT (*psCliprdrOpen)(CliprdrServerContext* context);
typedef UINT (*psCliprdrClose)(CliprdrServerContext* context);
typedef UINT (*psCliprdrStart)(CliprdrServerContext* context);
typedef UINT (*psCliprdrStop)(CliprdrServerContext* context);
typedef HANDLE (*psCliprdrGetEventHandle)(CliprdrServerContext* context);
typedef UINT (*psCliprdrCheckEventHandle)(CliprdrServerContext* context);
typedef UINT (*psCliprdrServerCapabilities)(CliprdrServerContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*psCliprdrClientCapabilities)(CliprdrServerContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*psCliprdrMonitorReady)(CliprdrServerContext* context,
const CLIPRDR_MONITOR_READY* monitorReady);
typedef UINT (*psCliprdrTempDirectory)(CliprdrServerContext* context,
const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
typedef UINT (*psCliprdrClientFormatList)(CliprdrServerContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*psCliprdrServerFormatList)(CliprdrServerContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*psCliprdrClientFormatListResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*psCliprdrServerFormatListResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*psCliprdrClientLockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*psCliprdrServerLockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*psCliprdrClientUnlockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*psCliprdrServerUnlockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*psCliprdrClientFormatDataRequest)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*psCliprdrServerFormatDataRequest)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*psCliprdrClientFormatDataResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*psCliprdrServerFormatDataResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*psCliprdrClientFileContentsRequest)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*psCliprdrServerFileContentsRequest)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*psCliprdrClientFileContentsResponse)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
typedef UINT (*psCliprdrServerFileContentsResponse)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
struct s_cliprdr_server_context
{
void* handle;
void* custom;
/* server clipboard capabilities - set by server - updated by the channel after client
* capability exchange */
BOOL useLongFormatNames;
BOOL streamFileClipEnabled;
BOOL fileClipNoFilePaths;
BOOL canLockClipData;
psCliprdrOpen Open;
psCliprdrClose Close;
psCliprdrStart Start;
psCliprdrStop Stop;
psCliprdrGetEventHandle GetEventHandle;
psCliprdrCheckEventHandle CheckEventHandle;
psCliprdrServerCapabilities ServerCapabilities;
psCliprdrClientCapabilities ClientCapabilities;
psCliprdrMonitorReady MonitorReady;
psCliprdrTempDirectory TempDirectory;
psCliprdrClientFormatList ClientFormatList;
psCliprdrServerFormatList ServerFormatList;
psCliprdrClientFormatListResponse ClientFormatListResponse;
psCliprdrServerFormatListResponse ServerFormatListResponse;
psCliprdrClientLockClipboardData ClientLockClipboardData;
psCliprdrServerLockClipboardData ServerLockClipboardData;
psCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
psCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
psCliprdrClientFormatDataRequest ClientFormatDataRequest;
psCliprdrServerFormatDataRequest ServerFormatDataRequest;
psCliprdrClientFormatDataResponse ClientFormatDataResponse;
psCliprdrServerFormatDataResponse ServerFormatDataResponse;
psCliprdrClientFileContentsRequest ClientFileContentsRequest;
psCliprdrServerFileContentsRequest ServerFileContentsRequest;
psCliprdrClientFileContentsResponse ClientFileContentsResponse;
psCliprdrServerFileContentsResponse ServerFileContentsResponse;
rdpContext* rdpcontext;
BOOL autoInitializationSequence;
UINT32 lastRequestedFormatId;
BOOL hasHugeFileSupport;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Server Interface
*/
typedef struct s_cliprdr_server_context CliprdrServerContext;
typedef UINT (*psCliprdrOpen)(CliprdrServerContext* context);
typedef UINT (*psCliprdrClose)(CliprdrServerContext* context);
typedef UINT (*psCliprdrStart)(CliprdrServerContext* context);
typedef UINT (*psCliprdrStop)(CliprdrServerContext* context);
typedef HANDLE (*psCliprdrGetEventHandle)(CliprdrServerContext* context);
typedef UINT (*psCliprdrCheckEventHandle)(CliprdrServerContext* context);
typedef UINT (*psCliprdrServerCapabilities)(CliprdrServerContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*psCliprdrClientCapabilities)(CliprdrServerContext* context,
const CLIPRDR_CAPABILITIES* capabilities);
typedef UINT (*psCliprdrMonitorReady)(CliprdrServerContext* context,
const CLIPRDR_MONITOR_READY* monitorReady);
typedef UINT (*psCliprdrTempDirectory)(CliprdrServerContext* context,
const CLIPRDR_TEMP_DIRECTORY* tempDirectory);
typedef UINT (*psCliprdrClientFormatList)(CliprdrServerContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*psCliprdrServerFormatList)(CliprdrServerContext* context,
const CLIPRDR_FORMAT_LIST* formatList);
typedef UINT (*psCliprdrClientFormatListResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*psCliprdrServerFormatListResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST_RESPONSE* formatListResponse);
typedef UINT (*psCliprdrClientLockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*psCliprdrServerLockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_LOCK_CLIPBOARD_DATA* lockClipboardData);
typedef UINT (*psCliprdrClientUnlockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*psCliprdrServerUnlockClipboardData)(
CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData);
typedef UINT (*psCliprdrClientFormatDataRequest)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*psCliprdrServerFormatDataRequest)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_REQUEST* formatDataRequest);
typedef UINT (*psCliprdrClientFormatDataResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*psCliprdrServerFormatDataResponse)(
CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* formatDataResponse);
typedef UINT (*psCliprdrClientFileContentsRequest)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*psCliprdrServerFileContentsRequest)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest);
typedef UINT (*psCliprdrClientFileContentsResponse)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
typedef UINT (*psCliprdrServerFileContentsResponse)(
CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse);
struct s_cliprdr_server_context
{
void* handle;
void* custom;
/* server clipboard capabilities - set by server - updated by the channel after client
* capability exchange */
BOOL useLongFormatNames;
BOOL streamFileClipEnabled;
BOOL fileClipNoFilePaths;
BOOL canLockClipData;
psCliprdrOpen Open;
psCliprdrClose Close;
psCliprdrStart Start;
psCliprdrStop Stop;
psCliprdrGetEventHandle GetEventHandle;
psCliprdrCheckEventHandle CheckEventHandle;
psCliprdrServerCapabilities ServerCapabilities;
psCliprdrClientCapabilities ClientCapabilities;
psCliprdrMonitorReady MonitorReady;
psCliprdrTempDirectory TempDirectory;
psCliprdrClientFormatList ClientFormatList;
psCliprdrServerFormatList ServerFormatList;
psCliprdrClientFormatListResponse ClientFormatListResponse;
psCliprdrServerFormatListResponse ServerFormatListResponse;
psCliprdrClientLockClipboardData ClientLockClipboardData;
psCliprdrServerLockClipboardData ServerLockClipboardData;
psCliprdrClientUnlockClipboardData ClientUnlockClipboardData;
psCliprdrServerUnlockClipboardData ServerUnlockClipboardData;
psCliprdrClientFormatDataRequest ClientFormatDataRequest;
psCliprdrServerFormatDataRequest ServerFormatDataRequest;
psCliprdrClientFormatDataResponse ClientFormatDataResponse;
psCliprdrServerFormatDataResponse ServerFormatDataResponse;
psCliprdrClientFileContentsRequest ClientFileContentsRequest;
psCliprdrServerFileContentsRequest ServerFileContentsRequest;
psCliprdrClientFileContentsResponse ClientFileContentsResponse;
psCliprdrServerFileContentsResponse ServerFileContentsResponse;
rdpContext* rdpcontext;
BOOL autoInitializationSequence;
UINT32 lastRequestedFormatId;
BOOL hasHugeFileSupport;
};
FREERDP_API CliprdrServerContext* cliprdr_server_context_new(HANDLE vcm); FREERDP_API CliprdrServerContext* cliprdr_server_context_new(HANDLE vcm);
FREERDP_API void cliprdr_server_context_free(CliprdrServerContext* context); FREERDP_API void cliprdr_server_context_free(CliprdrServerContext* context);

View File

@ -26,47 +26,47 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct s_disp_server_private DispServerPrivate;
typedef struct s_disp_server_context DispServerContext;
typedef BOOL (*psDispChannelIdAssigned)(DispServerContext* context, UINT32 channelId);
typedef UINT (*psDispMonitorLayout)(DispServerContext* context,
const DISPLAY_CONTROL_MONITOR_LAYOUT_PDU* pdu);
typedef UINT (*psDispCaps)(DispServerContext* context);
typedef UINT (*psDispOpen)(DispServerContext* context);
typedef UINT (*psDispClose)(DispServerContext* context);
struct s_disp_server_context
{
void* custom;
HANDLE vcm;
/* Server capabilities */
UINT32 MaxNumMonitors;
UINT32 MaxMonitorAreaFactorA;
UINT32 MaxMonitorAreaFactorB;
psDispOpen Open;
psDispClose Close;
psDispMonitorLayout DispMonitorLayout;
psDispCaps DisplayControlCaps;
DispServerPrivate* priv;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psDispChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_disp_server_private DispServerPrivate;
typedef struct s_disp_server_context DispServerContext;
typedef BOOL (*psDispChannelIdAssigned)(DispServerContext* context, UINT32 channelId);
typedef UINT (*psDispMonitorLayout)(DispServerContext* context,
const DISPLAY_CONTROL_MONITOR_LAYOUT_PDU* pdu);
typedef UINT (*psDispCaps)(DispServerContext* context);
typedef UINT (*psDispOpen)(DispServerContext* context);
typedef UINT (*psDispClose)(DispServerContext* context);
struct s_disp_server_context
{
void* custom;
HANDLE vcm;
/* Server capabilities */
UINT32 MaxNumMonitors;
UINT32 MaxMonitorAreaFactorA;
UINT32 MaxMonitorAreaFactorB;
psDispOpen Open;
psDispClose Close;
psDispMonitorLayout DispMonitorLayout;
psDispCaps DisplayControlCaps;
DispServerPrivate* priv;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psDispChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API DispServerContext* disp_server_context_new(HANDLE vcm); FREERDP_API DispServerContext* disp_server_context_new(HANDLE vcm);
FREERDP_API void disp_server_context_free(DispServerContext* context); FREERDP_API void disp_server_context_free(DispServerContext* context);

View File

@ -26,31 +26,31 @@
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
/**
* Server Interface
*/
typedef struct s_drdynvc_server_context DrdynvcServerContext;
typedef struct s_drdynvc_server_private DrdynvcServerPrivate;
typedef UINT (*psDrdynvcStart)(DrdynvcServerContext* context);
typedef UINT (*psDrdynvcStop)(DrdynvcServerContext* context);
struct s_drdynvc_server_context
{
HANDLE vcm;
psDrdynvcStart Start;
psDrdynvcStop Stop;
DrdynvcServerPrivate* priv;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Server Interface
*/
typedef struct s_drdynvc_server_context DrdynvcServerContext;
typedef struct s_drdynvc_server_private DrdynvcServerPrivate;
typedef UINT (*psDrdynvcStart)(DrdynvcServerContext* context);
typedef UINT (*psDrdynvcStop)(DrdynvcServerContext* context);
struct s_drdynvc_server_context
{
HANDLE vcm;
psDrdynvcStart Start;
psDrdynvcStop Stop;
DrdynvcServerPrivate* priv;
};
FREERDP_API DrdynvcServerContext* drdynvc_server_context_new(HANDLE vcm); FREERDP_API DrdynvcServerContext* drdynvc_server_context_new(HANDLE vcm);
FREERDP_API void drdynvc_server_context_free(DrdynvcServerContext* context); FREERDP_API void drdynvc_server_context_free(DrdynvcServerContext* context);

View File

@ -24,72 +24,72 @@
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
typedef enum ECHO_SERVER_OPEN_RESULT
{
ECHO_SERVER_OPEN_RESULT_OK = 0,
ECHO_SERVER_OPEN_RESULT_CLOSED = 1,
ECHO_SERVER_OPEN_RESULT_NOTSUPPORTED = 2,
ECHO_SERVER_OPEN_RESULT_ERROR = 3
} ECHO_SERVER_OPEN_RESULT;
typedef struct s_echo_server_context echo_server_context;
typedef BOOL (*psEchoServerChannelIdAssigned)(echo_server_context* context, UINT32 channelId);
typedef UINT (*psEchoServerOpen)(echo_server_context* context);
typedef UINT (*psEchoServerClose)(echo_server_context* context);
typedef BOOL (*psEchoServerRequest)(echo_server_context* context, const BYTE* buffer,
UINT32 length);
typedef UINT (*psEchoServerOpenResult)(echo_server_context* context,
ECHO_SERVER_OPEN_RESULT result);
typedef UINT (*psEchoServerResponse)(echo_server_context* context, const BYTE* buffer,
UINT32 length);
struct s_echo_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/*** APIs called by the server. ***/
/**
* Open the echo channel.
*/
psEchoServerOpen Open;
/**
* Close the echo channel.
*/
psEchoServerClose Close;
/**
* Send echo request PDU.
*/
psEchoServerRequest Request;
/*** Callbacks registered by the server. ***/
/**
* Indicate whether the channel is opened successfully.
*/
psEchoServerOpenResult OpenResult;
/**
* Receive echo response PDU.
*/
psEchoServerResponse Response;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psEchoServerChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef enum ECHO_SERVER_OPEN_RESULT
{
ECHO_SERVER_OPEN_RESULT_OK = 0,
ECHO_SERVER_OPEN_RESULT_CLOSED = 1,
ECHO_SERVER_OPEN_RESULT_NOTSUPPORTED = 2,
ECHO_SERVER_OPEN_RESULT_ERROR = 3
} ECHO_SERVER_OPEN_RESULT;
typedef struct s_echo_server_context echo_server_context;
typedef BOOL (*psEchoServerChannelIdAssigned)(echo_server_context* context, UINT32 channelId);
typedef UINT (*psEchoServerOpen)(echo_server_context* context);
typedef UINT (*psEchoServerClose)(echo_server_context* context);
typedef BOOL (*psEchoServerRequest)(echo_server_context* context, const BYTE* buffer,
UINT32 length);
typedef UINT (*psEchoServerOpenResult)(echo_server_context* context,
ECHO_SERVER_OPEN_RESULT result);
typedef UINT (*psEchoServerResponse)(echo_server_context* context, const BYTE* buffer,
UINT32 length);
struct s_echo_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* data;
/*** APIs called by the server. ***/
/**
* Open the echo channel.
*/
psEchoServerOpen Open;
/**
* Close the echo channel.
*/
psEchoServerClose Close;
/**
* Send echo request PDU.
*/
psEchoServerRequest Request;
/*** Callbacks registered by the server. ***/
/**
* Indicate whether the channel is opened successfully.
*/
psEchoServerOpenResult OpenResult;
/**
* Receive echo response PDU.
*/
psEchoServerResponse Response;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psEchoServerChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API echo_server_context* echo_server_context_new(HANDLE vcm); FREERDP_API echo_server_context* echo_server_context_new(HANDLE vcm);
FREERDP_API void echo_server_context_free(echo_server_context* context); FREERDP_API void echo_server_context_free(echo_server_context* context);

View File

@ -28,70 +28,70 @@
#include <freerdp/channels/encomsp.h> #include <freerdp/channels/encomsp.h>
/**
* Server Interface
*/
typedef struct s_encomsp_server_context EncomspServerContext;
typedef struct s_encomsp_server_private EncomspServerPrivate;
typedef UINT (*psEncomspStart)(EncomspServerContext* context);
typedef UINT (*psEncomspStop)(EncomspServerContext* context);
typedef UINT (*psEncomspFilterUpdated)(EncomspServerContext* context,
ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
typedef UINT (*psEncomspApplicationCreated)(EncomspServerContext* context,
ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
typedef UINT (*psEncomspApplicationRemoved)(EncomspServerContext* context,
ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
typedef UINT (*psEncomspWindowCreated)(EncomspServerContext* context,
ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
typedef UINT (*psEncomspWindowRemoved)(EncomspServerContext* context,
ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
typedef UINT (*psEncomspShowWindow)(EncomspServerContext* context,
ENCOMSP_SHOW_WINDOW_PDU* showWindow);
typedef UINT (*psEncomspParticipantCreated)(EncomspServerContext* context,
ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
typedef UINT (*psEncomspParticipantRemoved)(EncomspServerContext* context,
ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
typedef UINT (*psEncomspChangeParticipantControlLevel)(
EncomspServerContext* context,
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
typedef UINT (*psEncomspGraphicsStreamPaused)(
EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
typedef UINT (*psEncomspGraphicsStreamResumed)(
EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct s_encomsp_server_context
{
HANDLE vcm;
void* custom;
psEncomspStart Start;
psEncomspStop Stop;
psEncomspFilterUpdated FilterUpdated;
psEncomspApplicationCreated ApplicationCreated;
psEncomspApplicationRemoved ApplicationRemoved;
psEncomspWindowCreated WindowCreated;
psEncomspWindowRemoved WindowRemoved;
psEncomspShowWindow ShowWindow;
psEncomspParticipantCreated ParticipantCreated;
psEncomspParticipantRemoved ParticipantRemoved;
psEncomspChangeParticipantControlLevel ChangeParticipantControlLevel;
psEncomspGraphicsStreamPaused GraphicsStreamPaused;
psEncomspGraphicsStreamResumed GraphicsStreamResumed;
EncomspServerPrivate* priv;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Server Interface
*/
typedef struct s_encomsp_server_context EncomspServerContext;
typedef struct s_encomsp_server_private EncomspServerPrivate;
typedef UINT (*psEncomspStart)(EncomspServerContext* context);
typedef UINT (*psEncomspStop)(EncomspServerContext* context);
typedef UINT (*psEncomspFilterUpdated)(EncomspServerContext* context,
ENCOMSP_FILTER_UPDATED_PDU* filterUpdated);
typedef UINT (*psEncomspApplicationCreated)(
EncomspServerContext* context, ENCOMSP_APPLICATION_CREATED_PDU* applicationCreated);
typedef UINT (*psEncomspApplicationRemoved)(
EncomspServerContext* context, ENCOMSP_APPLICATION_REMOVED_PDU* applicationRemoved);
typedef UINT (*psEncomspWindowCreated)(EncomspServerContext* context,
ENCOMSP_WINDOW_CREATED_PDU* windowCreated);
typedef UINT (*psEncomspWindowRemoved)(EncomspServerContext* context,
ENCOMSP_WINDOW_REMOVED_PDU* windowRemoved);
typedef UINT (*psEncomspShowWindow)(EncomspServerContext* context,
ENCOMSP_SHOW_WINDOW_PDU* showWindow);
typedef UINT (*psEncomspParticipantCreated)(
EncomspServerContext* context, ENCOMSP_PARTICIPANT_CREATED_PDU* participantCreated);
typedef UINT (*psEncomspParticipantRemoved)(
EncomspServerContext* context, ENCOMSP_PARTICIPANT_REMOVED_PDU* participantRemoved);
typedef UINT (*psEncomspChangeParticipantControlLevel)(
EncomspServerContext* context,
ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU* changeParticipantControlLevel);
typedef UINT (*psEncomspGraphicsStreamPaused)(
EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU* graphicsStreamPaused);
typedef UINT (*psEncomspGraphicsStreamResumed)(
EncomspServerContext* context, ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU* graphicsStreamResumed);
struct s_encomsp_server_context
{
HANDLE vcm;
void* custom;
psEncomspStart Start;
psEncomspStop Stop;
psEncomspFilterUpdated FilterUpdated;
psEncomspApplicationCreated ApplicationCreated;
psEncomspApplicationRemoved ApplicationRemoved;
psEncomspWindowCreated WindowCreated;
psEncomspWindowRemoved WindowRemoved;
psEncomspShowWindow ShowWindow;
psEncomspParticipantCreated ParticipantCreated;
psEncomspParticipantRemoved ParticipantRemoved;
psEncomspChangeParticipantControlLevel ChangeParticipantControlLevel;
psEncomspGraphicsStreamPaused GraphicsStreamPaused;
psEncomspGraphicsStreamResumed GraphicsStreamResumed;
EncomspServerPrivate* priv;
rdpContext* rdpcontext;
};
FREERDP_API EncomspServerContext* encomsp_server_context_new(HANDLE vcm); FREERDP_API EncomspServerContext* encomsp_server_context_new(HANDLE vcm);
FREERDP_API void encomsp_server_context_free(EncomspServerContext* context); FREERDP_API void encomsp_server_context_free(EncomspServerContext* context);

View File

@ -26,72 +26,73 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct s_gfxredir_server_private GfxRedirServerPrivate;
typedef struct s_gfxredir_server_context GfxRedirServerContext;
typedef UINT (*psGfxRedirOpen)(GfxRedirServerContext* context);
typedef UINT (*psGfxRedirClose)(GfxRedirServerContext* context);
typedef UINT (*psGfxRedirError)(GfxRedirServerContext* context, const GFXREDIR_ERROR_PDU* error);
typedef UINT (*psGfxRedirGraphicsRedirectionLegacyCaps)(
GfxRedirServerContext* context, const GFXREDIR_LEGACY_CAPS_PDU* graphicsCaps);
typedef UINT (*psGfxRedirGraphicsRedirectionCapsAdvertise)(
GfxRedirServerContext* context, const GFXREDIR_CAPS_ADVERTISE_PDU* graphicsCapsAdvertise);
typedef UINT (*psGfxRedirGraphicsRedirectionCapsConfirm)(
GfxRedirServerContext* context, const GFXREDIR_CAPS_CONFIRM_PDU* graphicsCapsConfirm);
typedef UINT (*psGfxRedirOpenPool)(GfxRedirServerContext* context,
const GFXREDIR_OPEN_POOL_PDU* openPool);
typedef UINT (*psGfxRedirClosePool)(GfxRedirServerContext* context,
const GFXREDIR_CLOSE_POOL_PDU* closePool);
typedef UINT (*psGfxRedirCreateBuffer)(GfxRedirServerContext* context,
const GFXREDIR_CREATE_BUFFER_PDU* createBuffer);
typedef UINT (*psGfxRedirDestroyBuffer)(GfxRedirServerContext* context,
const GFXREDIR_DESTROY_BUFFER_PDU* destroyBuffer);
typedef UINT (*psGfxRedirPresentBuffer)(GfxRedirServerContext* context,
const GFXREDIR_PRESENT_BUFFER_PDU* presentBuffer);
typedef UINT (*psGfxRedirPresentBufferAck)(GfxRedirServerContext* context,
const GFXREDIR_PRESENT_BUFFER_ACK_PDU* presentBufferAck);
struct s_gfxredir_server_context
{
void* custom;
HANDLE vcm;
psGfxRedirOpen Open;
psGfxRedirClose Close;
psGfxRedirError Error;
psGfxRedirGraphicsRedirectionLegacyCaps GraphicsRedirectionLegacyCaps;
psGfxRedirGraphicsRedirectionCapsAdvertise GraphicsRedirectionCapsAdvertise;
psGfxRedirGraphicsRedirectionCapsConfirm GraphicsRedirectionCapsConfirm;
psGfxRedirOpenPool OpenPool;
psGfxRedirClosePool ClosePool;
psGfxRedirCreateBuffer CreateBuffer;
psGfxRedirDestroyBuffer DestroyBuffer;
psGfxRedirPresentBuffer PresentBuffer;
psGfxRedirPresentBufferAck PresentBufferAck;
GfxRedirServerPrivate* priv;
rdpContext* rdpcontext;
UINT32 confirmedCapsVersion;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_gfxredir_server_private GfxRedirServerPrivate;
typedef struct s_gfxredir_server_context GfxRedirServerContext;
typedef UINT (*psGfxRedirOpen)(GfxRedirServerContext* context);
typedef UINT (*psGfxRedirClose)(GfxRedirServerContext* context);
typedef UINT (*psGfxRedirError)(GfxRedirServerContext* context,
const GFXREDIR_ERROR_PDU* error);
typedef UINT (*psGfxRedirGraphicsRedirectionLegacyCaps)(
GfxRedirServerContext* context, const GFXREDIR_LEGACY_CAPS_PDU* graphicsCaps);
typedef UINT (*psGfxRedirGraphicsRedirectionCapsAdvertise)(
GfxRedirServerContext* context, const GFXREDIR_CAPS_ADVERTISE_PDU* graphicsCapsAdvertise);
typedef UINT (*psGfxRedirGraphicsRedirectionCapsConfirm)(
GfxRedirServerContext* context, const GFXREDIR_CAPS_CONFIRM_PDU* graphicsCapsConfirm);
typedef UINT (*psGfxRedirOpenPool)(GfxRedirServerContext* context,
const GFXREDIR_OPEN_POOL_PDU* openPool);
typedef UINT (*psGfxRedirClosePool)(GfxRedirServerContext* context,
const GFXREDIR_CLOSE_POOL_PDU* closePool);
typedef UINT (*psGfxRedirCreateBuffer)(GfxRedirServerContext* context,
const GFXREDIR_CREATE_BUFFER_PDU* createBuffer);
typedef UINT (*psGfxRedirDestroyBuffer)(GfxRedirServerContext* context,
const GFXREDIR_DESTROY_BUFFER_PDU* destroyBuffer);
typedef UINT (*psGfxRedirPresentBuffer)(GfxRedirServerContext* context,
const GFXREDIR_PRESENT_BUFFER_PDU* presentBuffer);
typedef UINT (*psGfxRedirPresentBufferAck)(
GfxRedirServerContext* context, const GFXREDIR_PRESENT_BUFFER_ACK_PDU* presentBufferAck);
struct s_gfxredir_server_context
{
void* custom;
HANDLE vcm;
psGfxRedirOpen Open;
psGfxRedirClose Close;
psGfxRedirError Error;
psGfxRedirGraphicsRedirectionLegacyCaps GraphicsRedirectionLegacyCaps;
psGfxRedirGraphicsRedirectionCapsAdvertise GraphicsRedirectionCapsAdvertise;
psGfxRedirGraphicsRedirectionCapsConfirm GraphicsRedirectionCapsConfirm;
psGfxRedirOpenPool OpenPool;
psGfxRedirClosePool ClosePool;
psGfxRedirCreateBuffer CreateBuffer;
psGfxRedirDestroyBuffer DestroyBuffer;
psGfxRedirPresentBuffer PresentBuffer;
psGfxRedirPresentBufferAck PresentBufferAck;
GfxRedirServerPrivate* priv;
rdpContext* rdpcontext;
UINT32 confirmedCapsVersion;
};
FREERDP_API GfxRedirServerContext* gfxredir_server_context_new(HANDLE vcm); FREERDP_API GfxRedirServerContext* gfxredir_server_context_new(HANDLE vcm);
FREERDP_API void gfxredir_server_context_free(GfxRedirServerContext* context); FREERDP_API void gfxredir_server_context_free(GfxRedirServerContext* context);

View File

@ -26,89 +26,89 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/server/proxy/proxy_modules_api.h> #include <freerdp/server/proxy/proxy_modules_api.h>
typedef struct proxy_config proxyConfig;
struct proxy_config
{
/* server */
char* Host;
UINT16 Port;
/* target */
BOOL FixedTarget;
char* TargetHost;
UINT16 TargetPort;
char* TargetUser;
char* TargetDomain;
char* TargetPassword;
/* input */
BOOL Keyboard;
BOOL Mouse;
BOOL Multitouch;
/* server security */
BOOL ServerTlsSecurity;
BOOL ServerRdpSecurity;
BOOL ServerNlaSecurity;
/* client security */
BOOL ClientNlaSecurity;
BOOL ClientTlsSecurity;
BOOL ClientRdpSecurity;
BOOL ClientAllowFallbackToTls;
/* channels */
BOOL GFX;
BOOL DisplayControl;
BOOL Clipboard;
BOOL AudioOutput;
BOOL AudioInput;
BOOL RemoteApp;
BOOL DeviceRedirection;
BOOL VideoRedirection;
BOOL CameraRedirection;
BOOL PassthroughIsBlacklist;
char** Passthrough;
size_t PassthroughCount;
char** Intercept;
size_t InterceptCount;
/* clipboard specific settings */
BOOL TextOnly;
UINT32 MaxTextLength;
/* gfx settings */
BOOL DecodeGFX;
/* modules */
char** Modules; /* module file names to load */
size_t ModulesCount;
char** RequiredPlugins; /* required plugin names */
size_t RequiredPluginsCount;
char* CertificateFile;
char* CertificateContent;
char* PrivateKeyFile;
char* PrivateKeyContent;
/* Data extracted from CertificateContent or CertificateFile (evaluation in this order) */
char* CertificatePEM;
size_t CertificatePEMLength;
/* Data extracted from PrivateKeyContent or PrivateKeyFile (evaluation in this order) */
char* PrivateKeyPEM;
size_t PrivateKeyPEMLength;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct proxy_config proxyConfig;
struct proxy_config
{
/* server */
char* Host;
UINT16 Port;
/* target */
BOOL FixedTarget;
char* TargetHost;
UINT16 TargetPort;
char* TargetUser;
char* TargetDomain;
char* TargetPassword;
/* input */
BOOL Keyboard;
BOOL Mouse;
BOOL Multitouch;
/* server security */
BOOL ServerTlsSecurity;
BOOL ServerRdpSecurity;
BOOL ServerNlaSecurity;
/* client security */
BOOL ClientNlaSecurity;
BOOL ClientTlsSecurity;
BOOL ClientRdpSecurity;
BOOL ClientAllowFallbackToTls;
/* channels */
BOOL GFX;
BOOL DisplayControl;
BOOL Clipboard;
BOOL AudioOutput;
BOOL AudioInput;
BOOL RemoteApp;
BOOL DeviceRedirection;
BOOL VideoRedirection;
BOOL CameraRedirection;
BOOL PassthroughIsBlacklist;
char** Passthrough;
size_t PassthroughCount;
char** Intercept;
size_t InterceptCount;
/* clipboard specific settings */
BOOL TextOnly;
UINT32 MaxTextLength;
/* gfx settings */
BOOL DecodeGFX;
/* modules */
char** Modules; /* module file names to load */
size_t ModulesCount;
char** RequiredPlugins; /* required plugin names */
size_t RequiredPluginsCount;
char* CertificateFile;
char* CertificateContent;
char* PrivateKeyFile;
char* PrivateKeyContent;
/* Data extracted from CertificateContent or CertificateFile (evaluation in this order) */
char* CertificatePEM;
size_t CertificatePEMLength;
/* Data extracted from PrivateKeyContent or PrivateKeyFile (evaluation in this order) */
char* PrivateKeyPEM;
size_t PrivateKeyPEMLength;
};
/** /**
* @brief pf_server_config_dump Dumps a default INI configuration file * @brief pf_server_config_dump Dumps a default INI configuration file
* @param file The file to write to. Existing files are truncated. * @param file The file to write to. Existing files are truncated.

View File

@ -24,13 +24,13 @@
#include <freerdp/server/proxy/proxy_config.h> #include <freerdp/server/proxy/proxy_config.h>
#include <freerdp/server/proxy/proxy_modules_api.h> #include <freerdp/server/proxy/proxy_modules_api.h>
typedef struct proxy_server proxyServer;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct proxy_server proxyServer;
/** /**
* @brief pf_server_new Creates a new proxy server instance * @brief pf_server_new Creates a new proxy server instance
* *

View File

@ -21,28 +21,37 @@
#ifndef FREERDP_SERVER_PROXY_TYPES_H #ifndef FREERDP_SERVER_PROXY_TYPES_H
#define FREERDP_SERVER_PROXY_TYPES_H #define FREERDP_SERVER_PROXY_TYPES_H
/** @brief how is handled a channel */ #ifdef __cplusplus
typedef enum extern "C"
{ {
PF_UTILS_CHANNEL_NOT_HANDLED, /*!< channel not handled */ #endif
PF_UTILS_CHANNEL_BLOCK, /*!< block and drop traffic on this channel */
PF_UTILS_CHANNEL_PASSTHROUGH, /*!< pass traffic from this channel */
PF_UTILS_CHANNEL_INTERCEPT /*!< inspect traffic from this channel */
} pf_utils_channel_mode;
/** @brief result of a channel treatment */ /** @brief how is handled a channel */
typedef enum typedef enum
{ {
PF_CHANNEL_RESULT_PASS, /*!< pass the packet as is */ PF_UTILS_CHANNEL_NOT_HANDLED, /*!< channel not handled */
PF_CHANNEL_RESULT_DROP, /*!< drop the packet */ PF_UTILS_CHANNEL_BLOCK, /*!< block and drop traffic on this channel */
PF_CHANNEL_RESULT_ERROR /*!< error during packet treatment */ PF_UTILS_CHANNEL_PASSTHROUGH, /*!< pass traffic from this channel */
} PfChannelResult; PF_UTILS_CHANNEL_INTERCEPT /*!< inspect traffic from this channel */
typedef enum } pf_utils_channel_mode;
{
PROXY_FETCH_TARGET_METHOD_DEFAULT, /** @brief result of a channel treatment */
PROXY_FETCH_TARGET_METHOD_CONFIG, typedef enum
PROXY_FETCH_TARGET_METHOD_LOAD_BALANCE_INFO, {
PROXY_FETCH_TARGET_USE_CUSTOM_ADDR PF_CHANNEL_RESULT_PASS, /*!< pass the packet as is */
} ProxyFetchTargetMethod; PF_CHANNEL_RESULT_DROP, /*!< drop the packet */
PF_CHANNEL_RESULT_ERROR /*!< error during packet treatment */
} PfChannelResult;
typedef enum
{
PROXY_FETCH_TARGET_METHOD_DEFAULT,
PROXY_FETCH_TARGET_METHOD_CONFIG,
PROXY_FETCH_TARGET_METHOD_LOAD_BALANCE_INFO,
PROXY_FETCH_TARGET_USE_CUSTOM_ADDR
} ProxyFetchTargetMethod;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_SERVER_PROXY_TYPES_H */ #endif /* FREERDP_SERVER_PROXY_TYPES_H */

View File

@ -27,117 +27,118 @@
#include <freerdp/rail.h> #include <freerdp/rail.h>
#include <freerdp/channels/rail.h> #include <freerdp/channels/rail.h>
typedef struct s_rail_server_context RailServerContext;
typedef struct s_rail_server_private RailServerPrivate;
typedef UINT (*psRailStart)(RailServerContext* context);
typedef BOOL (*psRailStop)(RailServerContext* context);
/* Client side callback types */
typedef UINT (*psRailClientHandshake)(RailServerContext* context,
const RAIL_HANDSHAKE_ORDER* handshake);
typedef UINT (*psRailClientClientStatus)(RailServerContext* context,
const RAIL_CLIENT_STATUS_ORDER* clientStatus);
typedef UINT (*psRailClientExec)(RailServerContext* context, const RAIL_EXEC_ORDER* exec);
typedef UINT (*psRailClientSysparam)(RailServerContext* context,
const RAIL_SYSPARAM_ORDER* sysparam);
typedef UINT (*psRailClientActivate)(RailServerContext* context,
const RAIL_ACTIVATE_ORDER* activate);
typedef UINT (*psRailClientSysmenu)(RailServerContext* context, const RAIL_SYSMENU_ORDER* sysmenu);
typedef UINT (*psRailClientSyscommand)(RailServerContext* context,
const RAIL_SYSCOMMAND_ORDER* syscommand);
typedef UINT (*psRailClientNotifyEvent)(RailServerContext* context,
const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
typedef UINT (*psRailClientGetAppidReq)(RailServerContext* context,
const RAIL_GET_APPID_REQ_ORDER* getAppidReq);
typedef UINT (*psRailClientWindowMove)(RailServerContext* context,
const RAIL_WINDOW_MOVE_ORDER* windowMove);
typedef UINT (*psRailClientSnapArrange)(RailServerContext* context,
const RAIL_SNAP_ARRANGE* snapArrange);
typedef UINT (*psRailClientLangbarInfo)(RailServerContext* context,
const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
typedef UINT (*psRailClientLanguageImeInfo)(RailServerContext* context,
const RAIL_LANGUAGEIME_INFO_ORDER* languageImeInfo);
typedef UINT (*psRailClientCompartmentInfo)(RailServerContext* context,
const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
typedef UINT (*psRailClientCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
/* Server side messages sending methods */
typedef UINT (*psRailServerHandshake)(RailServerContext* context,
const RAIL_HANDSHAKE_ORDER* handshake);
typedef UINT (*psRailServerHandshakeEx)(RailServerContext* context,
const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
typedef UINT (*psRailServerSysparam)(RailServerContext* context,
const RAIL_SYSPARAM_ORDER* sysparam);
typedef UINT (*psRailServerLocalMoveSize)(RailServerContext* context,
const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
typedef UINT (*psRailServerMinMaxInfo)(RailServerContext* context,
const RAIL_MINMAXINFO_ORDER* minMaxInfo);
typedef UINT (*psRailServerTaskbarInfo)(RailServerContext* context,
const RAIL_TASKBAR_INFO_ORDER* taskbarInfo);
typedef UINT (*psRailServerLangbarInfo)(RailServerContext* context,
const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
typedef UINT (*psRailServerExecResult)(RailServerContext* context,
const RAIL_EXEC_RESULT_ORDER* execResult);
typedef UINT (*psRailServerGetAppidResp)(RailServerContext* context,
const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
typedef UINT (*psRailServerZOrderSync)(RailServerContext* context,
const RAIL_ZORDER_SYNC* zOrderSync);
typedef UINT (*psRailServerCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
typedef UINT (*psRailServerPowerDisplayRequest)(
RailServerContext* context, const RAIL_POWER_DISPLAY_REQUEST* PowerDisplayRequest);
typedef UINT (*psRailServerGetAppidRespEx)(RailServerContext* context,
const RAIL_GET_APPID_RESP_EX* GetAppidRespEx);
struct s_rail_server_context
{
HANDLE vcm;
void* custom;
psRailStart Start;
psRailStop Stop;
/* Callbacks from client */
psRailClientHandshake ClientHandshake;
psRailClientClientStatus ClientClientStatus;
psRailClientExec ClientExec;
psRailClientSysparam ClientSysparam;
psRailClientActivate ClientActivate;
psRailClientSysmenu ClientSysmenu;
psRailClientSyscommand ClientSyscommand;
psRailClientNotifyEvent ClientNotifyEvent;
psRailClientGetAppidReq ClientGetAppidReq;
psRailClientWindowMove ClientWindowMove;
psRailClientSnapArrange ClientSnapArrange;
psRailClientLangbarInfo ClientLangbarInfo;
psRailClientLanguageImeInfo ClientLanguageImeInfo;
psRailClientCompartmentInfo ClientCompartmentInfo;
psRailClientCloak ClientCloak;
/* Methods for sending server side messages */
psRailServerHandshake ServerHandshake;
psRailServerHandshakeEx ServerHandshakeEx;
psRailServerSysparam ServerSysparam;
psRailServerLocalMoveSize ServerLocalMoveSize;
psRailServerMinMaxInfo ServerMinMaxInfo;
psRailServerTaskbarInfo ServerTaskbarInfo;
psRailServerLangbarInfo ServerLangbarInfo;
psRailServerExecResult ServerExecResult;
psRailServerZOrderSync ServerZOrderSync;
psRailServerCloak ServerCloak;
psRailServerPowerDisplayRequest ServerPowerDisplayRequest;
psRailServerGetAppidResp ServerGetAppidResp;
psRailServerGetAppidRespEx ServerGetAppidRespEx;
RailServerPrivate* priv;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_rail_server_context RailServerContext;
typedef struct s_rail_server_private RailServerPrivate;
typedef UINT (*psRailStart)(RailServerContext* context);
typedef BOOL (*psRailStop)(RailServerContext* context);
/* Client side callback types */
typedef UINT (*psRailClientHandshake)(RailServerContext* context,
const RAIL_HANDSHAKE_ORDER* handshake);
typedef UINT (*psRailClientClientStatus)(RailServerContext* context,
const RAIL_CLIENT_STATUS_ORDER* clientStatus);
typedef UINT (*psRailClientExec)(RailServerContext* context, const RAIL_EXEC_ORDER* exec);
typedef UINT (*psRailClientSysparam)(RailServerContext* context,
const RAIL_SYSPARAM_ORDER* sysparam);
typedef UINT (*psRailClientActivate)(RailServerContext* context,
const RAIL_ACTIVATE_ORDER* activate);
typedef UINT (*psRailClientSysmenu)(RailServerContext* context,
const RAIL_SYSMENU_ORDER* sysmenu);
typedef UINT (*psRailClientSyscommand)(RailServerContext* context,
const RAIL_SYSCOMMAND_ORDER* syscommand);
typedef UINT (*psRailClientNotifyEvent)(RailServerContext* context,
const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
typedef UINT (*psRailClientGetAppidReq)(RailServerContext* context,
const RAIL_GET_APPID_REQ_ORDER* getAppidReq);
typedef UINT (*psRailClientWindowMove)(RailServerContext* context,
const RAIL_WINDOW_MOVE_ORDER* windowMove);
typedef UINT (*psRailClientSnapArrange)(RailServerContext* context,
const RAIL_SNAP_ARRANGE* snapArrange);
typedef UINT (*psRailClientLangbarInfo)(RailServerContext* context,
const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
typedef UINT (*psRailClientLanguageImeInfo)(RailServerContext* context,
const RAIL_LANGUAGEIME_INFO_ORDER* languageImeInfo);
typedef UINT (*psRailClientCompartmentInfo)(RailServerContext* context,
const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
typedef UINT (*psRailClientCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
/* Server side messages sending methods */
typedef UINT (*psRailServerHandshake)(RailServerContext* context,
const RAIL_HANDSHAKE_ORDER* handshake);
typedef UINT (*psRailServerHandshakeEx)(RailServerContext* context,
const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
typedef UINT (*psRailServerSysparam)(RailServerContext* context,
const RAIL_SYSPARAM_ORDER* sysparam);
typedef UINT (*psRailServerLocalMoveSize)(RailServerContext* context,
const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
typedef UINT (*psRailServerMinMaxInfo)(RailServerContext* context,
const RAIL_MINMAXINFO_ORDER* minMaxInfo);
typedef UINT (*psRailServerTaskbarInfo)(RailServerContext* context,
const RAIL_TASKBAR_INFO_ORDER* taskbarInfo);
typedef UINT (*psRailServerLangbarInfo)(RailServerContext* context,
const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
typedef UINT (*psRailServerExecResult)(RailServerContext* context,
const RAIL_EXEC_RESULT_ORDER* execResult);
typedef UINT (*psRailServerGetAppidResp)(RailServerContext* context,
const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
typedef UINT (*psRailServerZOrderSync)(RailServerContext* context,
const RAIL_ZORDER_SYNC* zOrderSync);
typedef UINT (*psRailServerCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
typedef UINT (*psRailServerPowerDisplayRequest)(
RailServerContext* context, const RAIL_POWER_DISPLAY_REQUEST* PowerDisplayRequest);
typedef UINT (*psRailServerGetAppidRespEx)(RailServerContext* context,
const RAIL_GET_APPID_RESP_EX* GetAppidRespEx);
struct s_rail_server_context
{
HANDLE vcm;
void* custom;
psRailStart Start;
psRailStop Stop;
/* Callbacks from client */
psRailClientHandshake ClientHandshake;
psRailClientClientStatus ClientClientStatus;
psRailClientExec ClientExec;
psRailClientSysparam ClientSysparam;
psRailClientActivate ClientActivate;
psRailClientSysmenu ClientSysmenu;
psRailClientSyscommand ClientSyscommand;
psRailClientNotifyEvent ClientNotifyEvent;
psRailClientGetAppidReq ClientGetAppidReq;
psRailClientWindowMove ClientWindowMove;
psRailClientSnapArrange ClientSnapArrange;
psRailClientLangbarInfo ClientLangbarInfo;
psRailClientLanguageImeInfo ClientLanguageImeInfo;
psRailClientCompartmentInfo ClientCompartmentInfo;
psRailClientCloak ClientCloak;
/* Methods for sending server side messages */
psRailServerHandshake ServerHandshake;
psRailServerHandshakeEx ServerHandshakeEx;
psRailServerSysparam ServerSysparam;
psRailServerLocalMoveSize ServerLocalMoveSize;
psRailServerMinMaxInfo ServerMinMaxInfo;
psRailServerTaskbarInfo ServerTaskbarInfo;
psRailServerLangbarInfo ServerLangbarInfo;
psRailServerExecResult ServerExecResult;
psRailServerZOrderSync ServerZOrderSync;
psRailServerCloak ServerCloak;
psRailServerPowerDisplayRequest ServerPowerDisplayRequest;
psRailServerGetAppidResp ServerGetAppidResp;
psRailServerGetAppidRespEx ServerGetAppidRespEx;
RailServerPrivate* priv;
rdpContext* rdpcontext;
};
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm); FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
FREERDP_API void rail_server_context_free(RailServerContext* context); FREERDP_API void rail_server_context_free(RailServerContext* context);
FREERDP_API UINT rail_server_handle_messages(RailServerContext* context); FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);

View File

@ -29,18 +29,23 @@
#include <freerdp/channels/rdpdr.h> #include <freerdp/channels/rdpdr.h>
#include <freerdp/utils/rdpdr_utils.h> #include <freerdp/utils/rdpdr_utils.h>
/** #ifdef __cplusplus
* Server Interface extern "C"
*/
typedef struct s_rdpdr_server_context RdpdrServerContext;
typedef struct s_rdpdr_server_private RdpdrServerPrivate;
typedef struct
{ {
UINT16 Component; #endif
UINT16 PacketId;
} RDPDR_HEADER; /**
* Server Interface
*/
typedef struct s_rdpdr_server_context RdpdrServerContext;
typedef struct s_rdpdr_server_private RdpdrServerPrivate;
typedef struct
{
UINT16 Component;
UINT16 PacketId;
} RDPDR_HEADER;
#ifndef __MINGW32__ #ifndef __MINGW32__
typedef struct typedef struct
@ -210,11 +215,6 @@ struct s_rdpdr_server_context
rdpContext* rdpcontext; rdpContext* rdpcontext;
}; };
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API RdpdrServerContext* rdpdr_server_context_new(HANDLE vcm); FREERDP_API RdpdrServerContext* rdpdr_server_context_new(HANDLE vcm);
FREERDP_API void rdpdr_server_context_free(RdpdrServerContext* context); FREERDP_API void rdpdr_server_context_free(RdpdrServerContext* context);

View File

@ -23,107 +23,108 @@
#include <freerdp/channels/rdpecam.h> #include <freerdp/channels/rdpecam.h>
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
typedef struct _cam_dev_enum_server_context CamDevEnumServerContext;
typedef UINT (*psCamDevEnumServerServerOpen)(CamDevEnumServerContext* context);
typedef UINT (*psCamDevEnumServerServerClose)(CamDevEnumServerContext* context);
typedef BOOL (*psCamDevEnumServerServerChannelIdAssigned)(CamDevEnumServerContext* context,
UINT32 channelId);
typedef UINT (*psCamDevEnumServerServerInitialize)(CamDevEnumServerContext* context,
BOOL externalThread);
typedef UINT (*psCamDevEnumServerServerPoll)(CamDevEnumServerContext* context);
typedef BOOL (*psCamDevEnumServerServerChannelHandle)(CamDevEnumServerContext* context,
HANDLE* handle);
typedef UINT (*psCamDevEnumServerServerSelectVersionRequest)(
CamDevEnumServerContext* context, const CAM_SELECT_VERSION_REQUEST* selectVersionRequest);
typedef UINT (*psCamDevEnumServerServerSelectVersionResponse)(
CamDevEnumServerContext* context, const CAM_SELECT_VERSION_RESPONSE* selectVersionResponse);
typedef UINT (*psCamDevEnumServerServerDeviceAddedNotification)(
CamDevEnumServerContext* context, const CAM_DEVICE_ADDED_NOTIFICATION* deviceAddedNotification);
typedef UINT (*psCamDevEnumServerServerDeviceRemovedNotification)(
CamDevEnumServerContext* context,
const CAM_DEVICE_REMOVED_NOTIFICATION* deviceRemovedNotification);
struct _cam_dev_enum_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psCamDevEnumServerServerInitialize Initialize;
/**
* Open the camera device enumerator channel.
*/
psCamDevEnumServerServerOpen Open;
/**
* Close the camera device enumerator channel.
*/
psCamDevEnumServerServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psCamDevEnumServerServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psCamDevEnumServerServerChannelHandle ChannelHandle;
/*
* Send a Select Version Response PDU.
*/
psCamDevEnumServerServerSelectVersionResponse SelectVersionResponse;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned.
*/
psCamDevEnumServerServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the Select Version Request PDU.
*/
psCamDevEnumServerServerSelectVersionRequest SelectVersionRequest;
/**
* Callback for the Device Added Notification PDU.
*/
psCamDevEnumServerServerDeviceAddedNotification DeviceAddedNotification;
/**
* Callback for the Device Removed Notification PDU.
*/
psCamDevEnumServerServerDeviceRemovedNotification DeviceRemovedNotification;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct _cam_dev_enum_server_context CamDevEnumServerContext;
typedef UINT (*psCamDevEnumServerServerOpen)(CamDevEnumServerContext* context);
typedef UINT (*psCamDevEnumServerServerClose)(CamDevEnumServerContext* context);
typedef BOOL (*psCamDevEnumServerServerChannelIdAssigned)(CamDevEnumServerContext* context,
UINT32 channelId);
typedef UINT (*psCamDevEnumServerServerInitialize)(CamDevEnumServerContext* context,
BOOL externalThread);
typedef UINT (*psCamDevEnumServerServerPoll)(CamDevEnumServerContext* context);
typedef BOOL (*psCamDevEnumServerServerChannelHandle)(CamDevEnumServerContext* context,
HANDLE* handle);
typedef UINT (*psCamDevEnumServerServerSelectVersionRequest)(
CamDevEnumServerContext* context, const CAM_SELECT_VERSION_REQUEST* selectVersionRequest);
typedef UINT (*psCamDevEnumServerServerSelectVersionResponse)(
CamDevEnumServerContext* context, const CAM_SELECT_VERSION_RESPONSE* selectVersionResponse);
typedef UINT (*psCamDevEnumServerServerDeviceAddedNotification)(
CamDevEnumServerContext* context,
const CAM_DEVICE_ADDED_NOTIFICATION* deviceAddedNotification);
typedef UINT (*psCamDevEnumServerServerDeviceRemovedNotification)(
CamDevEnumServerContext* context,
const CAM_DEVICE_REMOVED_NOTIFICATION* deviceRemovedNotification);
struct _cam_dev_enum_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psCamDevEnumServerServerInitialize Initialize;
/**
* Open the camera device enumerator channel.
*/
psCamDevEnumServerServerOpen Open;
/**
* Close the camera device enumerator channel.
*/
psCamDevEnumServerServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psCamDevEnumServerServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psCamDevEnumServerServerChannelHandle ChannelHandle;
/*
* Send a Select Version Response PDU.
*/
psCamDevEnumServerServerSelectVersionResponse SelectVersionResponse;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned.
*/
psCamDevEnumServerServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the Select Version Request PDU.
*/
psCamDevEnumServerServerSelectVersionRequest SelectVersionRequest;
/**
* Callback for the Device Added Notification PDU.
*/
psCamDevEnumServerServerDeviceAddedNotification DeviceAddedNotification;
/**
* Callback for the Device Removed Notification PDU.
*/
psCamDevEnumServerServerDeviceRemovedNotification DeviceRemovedNotification;
rdpContext* rdpcontext;
};
FREERDP_API CamDevEnumServerContext* cam_dev_enum_server_context_new(HANDLE vcm); FREERDP_API CamDevEnumServerContext* cam_dev_enum_server_context_new(HANDLE vcm);
FREERDP_API void cam_dev_enum_server_context_free(CamDevEnumServerContext* context); FREERDP_API void cam_dev_enum_server_context_free(CamDevEnumServerContext* context);

View File

@ -23,251 +23,255 @@
#include <freerdp/channels/rdpecam.h> #include <freerdp/channels/rdpecam.h>
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
typedef struct camera_device_server_context CameraDeviceServerContext;
typedef UINT (*psCameraDeviceServerOpen)(CameraDeviceServerContext* context);
typedef UINT (*psCameraDeviceServerClose)(CameraDeviceServerContext* context);
typedef BOOL (*psCameraDeviceServerChannelIdAssigned)(CameraDeviceServerContext* context,
UINT32 channelId);
typedef UINT (*psCameraDeviceServerInitialize)(CameraDeviceServerContext* context,
BOOL externalThread);
typedef UINT (*psCameraDeviceServerPoll)(CameraDeviceServerContext* context);
typedef BOOL (*psCameraDeviceServerChannelHandle)(CameraDeviceServerContext* context,
HANDLE* handle);
typedef UINT (*psCameraDeviceServerSuccessResponse)(CameraDeviceServerContext* context,
const CAM_SUCCESS_RESPONSE* successResponse);
typedef UINT (*psCameraDeviceServerErrorResponse)(CameraDeviceServerContext* context,
const CAM_ERROR_RESPONSE* errorResponse);
typedef UINT (*psCameraDeviceServerActivateDeviceRequest)(
CameraDeviceServerContext* context, const CAM_ACTIVATE_DEVICE_REQUEST* activateDeviceRequest);
typedef UINT (*psCameraDeviceServerDeactivateDeviceRequest)(
CameraDeviceServerContext* context,
const CAM_DEACTIVATE_DEVICE_REQUEST* deactivateDeviceRequest);
typedef UINT (*psCameraDeviceServerStreamListRequest)(
CameraDeviceServerContext* context, const CAM_STREAM_LIST_REQUEST* streamListRequest);
typedef UINT (*psCameraDeviceServerStreamListResponse)(
CameraDeviceServerContext* context, const CAM_STREAM_LIST_RESPONSE* streamListResponse);
typedef UINT (*psCameraDeviceServerMediaTypeListRequest)(
CameraDeviceServerContext* context, const CAM_MEDIA_TYPE_LIST_REQUEST* mediaTypeListRequest);
typedef UINT (*psCameraDeviceServerMediaTypeListResponse)(
CameraDeviceServerContext* context, const CAM_MEDIA_TYPE_LIST_RESPONSE* mediaTypeListResponse);
typedef UINT (*psCameraDeviceServerCurrentMediaTypeRequest)(
CameraDeviceServerContext* context,
const CAM_CURRENT_MEDIA_TYPE_REQUEST* currentMediaTypeRequest);
typedef UINT (*psCameraDeviceServerCurrentMediaTypeResponse)(
CameraDeviceServerContext* context,
const CAM_CURRENT_MEDIA_TYPE_RESPONSE* currentMediaTypeResponse);
typedef UINT (*psCameraDeviceServerStartStreamsRequest)(
CameraDeviceServerContext* context, const CAM_START_STREAMS_REQUEST* startStreamsRequest);
typedef UINT (*psCameraDeviceServerStopStreamsRequest)(
CameraDeviceServerContext* context, const CAM_STOP_STREAMS_REQUEST* stopStreamsRequest);
typedef UINT (*psCameraDeviceServerSampleRequest)(CameraDeviceServerContext* context,
const CAM_SAMPLE_REQUEST* sampleRequest);
typedef UINT (*psCameraDeviceServerSampleResponse)(CameraDeviceServerContext* context,
const CAM_SAMPLE_RESPONSE* sampleResponse);
typedef UINT (*psCameraDeviceServerSampleErrorResponse)(
CameraDeviceServerContext* context, const CAM_SAMPLE_ERROR_RESPONSE* sampleErrorResponse);
typedef UINT (*psCameraDeviceServerPropertyListRequest)(
CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_REQUEST* propertyListRequest);
typedef UINT (*psCameraDeviceServerPropertyListResponse)(
CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_RESPONSE* propertyListResponse);
typedef UINT (*psCameraDeviceServerPropertyValueRequest)(
CameraDeviceServerContext* context, const CAM_PROPERTY_VALUE_REQUEST* propertyValueRequest);
typedef UINT (*psCameraDeviceServerPropertyValueResponse)(
CameraDeviceServerContext* context, const CAM_PROPERTY_VALUE_RESPONSE* propertyValueResponse);
typedef UINT (*psCameraDeviceServerSetPropertyValueRequest)(
CameraDeviceServerContext* context,
const CAM_SET_PROPERTY_VALUE_REQUEST* setPropertyValueRequest);
struct camera_device_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/**
* Name of the virtual channel. Pointer owned by the CameraDeviceServerContext,
* meaning camera_device_server_context_free() takes care of freeing the pointer.
*
* Server implementations should sanitize the virtual channel name for invalid
* names, like names for other known channels
* ("ECHO", "AUDIO_PLAYBACK_DVC", etc.)
*/
char* virtualChannelName;
/**
* Protocol version to be used. Every sent server to client PDU has the
* version value in the Header set to the following value.
*/
BYTE protocolVersion;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psCameraDeviceServerInitialize Initialize;
/**
* Open the camera device channel.
*/
psCameraDeviceServerOpen Open;
/**
* Close the camera device channel.
*/
psCameraDeviceServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psCameraDeviceServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psCameraDeviceServerChannelHandle ChannelHandle;
/**
* For the following server to client PDUs,
* the message header does not have to be set.
*/
/**
* Send a Activate Device Request PDU.
*/
psCameraDeviceServerActivateDeviceRequest ActivateDeviceRequest;
/**
* Send a Deactivate Device Request PDU.
*/
psCameraDeviceServerDeactivateDeviceRequest DeactivateDeviceRequest;
/**
* Send a Stream List Request PDU.
*/
psCameraDeviceServerStreamListRequest StreamListRequest;
/**
* Send a Media Type List Request PDU.
*/
psCameraDeviceServerMediaTypeListRequest MediaTypeListRequest;
/**
* Send a Current Media Type Request PDU.
*/
psCameraDeviceServerCurrentMediaTypeRequest CurrentMediaTypeRequest;
/**
* Send a Start Streams Request PDU.
*/
psCameraDeviceServerStartStreamsRequest StartStreamsRequest;
/**
* Send a Stop Streams Request PDU.
*/
psCameraDeviceServerStopStreamsRequest StopStreamsRequest;
/**
* Send a Sample Request PDU.
*/
psCameraDeviceServerSampleRequest SampleRequest;
/**
* Send a Property List Request PDU.
*/
psCameraDeviceServerPropertyListRequest PropertyListRequest;
/**
* Send a Property Value Request PDU.
*/
psCameraDeviceServerPropertyValueRequest PropertyValueRequest;
/**
* Send a Set Property Value Request PDU.
*/
psCameraDeviceServerSetPropertyValueRequest SetPropertyValueRequest;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned.
*/
psCameraDeviceServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the Success Response PDU.
*/
psCameraDeviceServerSuccessResponse SuccessResponse;
/**
* Callback for the Error Response PDU.
*/
psCameraDeviceServerErrorResponse ErrorResponse;
/**
* Callback for the Stream List Response PDU.
*/
psCameraDeviceServerStreamListResponse StreamListResponse;
/**
* Callback for the Media Type List Response PDU.
*/
psCameraDeviceServerMediaTypeListResponse MediaTypeListResponse;
/**
* Callback for the Current Media Type Response PDU.
*/
psCameraDeviceServerCurrentMediaTypeResponse CurrentMediaTypeResponse;
/**
* Callback for the Sample Response PDU.
*/
psCameraDeviceServerSampleResponse SampleResponse;
/**
* Callback for the Sample Error Response PDU.
*/
psCameraDeviceServerSampleErrorResponse SampleErrorResponse;
/**
* Callback for the Property List Response PDU.
*/
psCameraDeviceServerPropertyListResponse PropertyListResponse;
/**
* Callback for the Property Value Response PDU.
*/
psCameraDeviceServerPropertyValueResponse PropertyValueResponse;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct camera_device_server_context CameraDeviceServerContext;
typedef UINT (*psCameraDeviceServerOpen)(CameraDeviceServerContext* context);
typedef UINT (*psCameraDeviceServerClose)(CameraDeviceServerContext* context);
typedef BOOL (*psCameraDeviceServerChannelIdAssigned)(CameraDeviceServerContext* context,
UINT32 channelId);
typedef UINT (*psCameraDeviceServerInitialize)(CameraDeviceServerContext* context,
BOOL externalThread);
typedef UINT (*psCameraDeviceServerPoll)(CameraDeviceServerContext* context);
typedef BOOL (*psCameraDeviceServerChannelHandle)(CameraDeviceServerContext* context,
HANDLE* handle);
typedef UINT (*psCameraDeviceServerSuccessResponse)(
CameraDeviceServerContext* context, const CAM_SUCCESS_RESPONSE* successResponse);
typedef UINT (*psCameraDeviceServerErrorResponse)(CameraDeviceServerContext* context,
const CAM_ERROR_RESPONSE* errorResponse);
typedef UINT (*psCameraDeviceServerActivateDeviceRequest)(
CameraDeviceServerContext* context,
const CAM_ACTIVATE_DEVICE_REQUEST* activateDeviceRequest);
typedef UINT (*psCameraDeviceServerDeactivateDeviceRequest)(
CameraDeviceServerContext* context,
const CAM_DEACTIVATE_DEVICE_REQUEST* deactivateDeviceRequest);
typedef UINT (*psCameraDeviceServerStreamListRequest)(
CameraDeviceServerContext* context, const CAM_STREAM_LIST_REQUEST* streamListRequest);
typedef UINT (*psCameraDeviceServerStreamListResponse)(
CameraDeviceServerContext* context, const CAM_STREAM_LIST_RESPONSE* streamListResponse);
typedef UINT (*psCameraDeviceServerMediaTypeListRequest)(
CameraDeviceServerContext* context,
const CAM_MEDIA_TYPE_LIST_REQUEST* mediaTypeListRequest);
typedef UINT (*psCameraDeviceServerMediaTypeListResponse)(
CameraDeviceServerContext* context,
const CAM_MEDIA_TYPE_LIST_RESPONSE* mediaTypeListResponse);
typedef UINT (*psCameraDeviceServerCurrentMediaTypeRequest)(
CameraDeviceServerContext* context,
const CAM_CURRENT_MEDIA_TYPE_REQUEST* currentMediaTypeRequest);
typedef UINT (*psCameraDeviceServerCurrentMediaTypeResponse)(
CameraDeviceServerContext* context,
const CAM_CURRENT_MEDIA_TYPE_RESPONSE* currentMediaTypeResponse);
typedef UINT (*psCameraDeviceServerStartStreamsRequest)(
CameraDeviceServerContext* context, const CAM_START_STREAMS_REQUEST* startStreamsRequest);
typedef UINT (*psCameraDeviceServerStopStreamsRequest)(
CameraDeviceServerContext* context, const CAM_STOP_STREAMS_REQUEST* stopStreamsRequest);
typedef UINT (*psCameraDeviceServerSampleRequest)(CameraDeviceServerContext* context,
const CAM_SAMPLE_REQUEST* sampleRequest);
typedef UINT (*psCameraDeviceServerSampleResponse)(CameraDeviceServerContext* context,
const CAM_SAMPLE_RESPONSE* sampleResponse);
typedef UINT (*psCameraDeviceServerSampleErrorResponse)(
CameraDeviceServerContext* context, const CAM_SAMPLE_ERROR_RESPONSE* sampleErrorResponse);
typedef UINT (*psCameraDeviceServerPropertyListRequest)(
CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_REQUEST* propertyListRequest);
typedef UINT (*psCameraDeviceServerPropertyListResponse)(
CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_RESPONSE* propertyListResponse);
typedef UINT (*psCameraDeviceServerPropertyValueRequest)(
CameraDeviceServerContext* context, const CAM_PROPERTY_VALUE_REQUEST* propertyValueRequest);
typedef UINT (*psCameraDeviceServerPropertyValueResponse)(
CameraDeviceServerContext* context,
const CAM_PROPERTY_VALUE_RESPONSE* propertyValueResponse);
typedef UINT (*psCameraDeviceServerSetPropertyValueRequest)(
CameraDeviceServerContext* context,
const CAM_SET_PROPERTY_VALUE_REQUEST* setPropertyValueRequest);
struct camera_device_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/**
* Name of the virtual channel. Pointer owned by the CameraDeviceServerContext,
* meaning camera_device_server_context_free() takes care of freeing the pointer.
*
* Server implementations should sanitize the virtual channel name for invalid
* names, like names for other known channels
* ("ECHO", "AUDIO_PLAYBACK_DVC", etc.)
*/
char* virtualChannelName;
/**
* Protocol version to be used. Every sent server to client PDU has the
* version value in the Header set to the following value.
*/
BYTE protocolVersion;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psCameraDeviceServerInitialize Initialize;
/**
* Open the camera device channel.
*/
psCameraDeviceServerOpen Open;
/**
* Close the camera device channel.
*/
psCameraDeviceServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psCameraDeviceServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psCameraDeviceServerChannelHandle ChannelHandle;
/**
* For the following server to client PDUs,
* the message header does not have to be set.
*/
/**
* Send a Activate Device Request PDU.
*/
psCameraDeviceServerActivateDeviceRequest ActivateDeviceRequest;
/**
* Send a Deactivate Device Request PDU.
*/
psCameraDeviceServerDeactivateDeviceRequest DeactivateDeviceRequest;
/**
* Send a Stream List Request PDU.
*/
psCameraDeviceServerStreamListRequest StreamListRequest;
/**
* Send a Media Type List Request PDU.
*/
psCameraDeviceServerMediaTypeListRequest MediaTypeListRequest;
/**
* Send a Current Media Type Request PDU.
*/
psCameraDeviceServerCurrentMediaTypeRequest CurrentMediaTypeRequest;
/**
* Send a Start Streams Request PDU.
*/
psCameraDeviceServerStartStreamsRequest StartStreamsRequest;
/**
* Send a Stop Streams Request PDU.
*/
psCameraDeviceServerStopStreamsRequest StopStreamsRequest;
/**
* Send a Sample Request PDU.
*/
psCameraDeviceServerSampleRequest SampleRequest;
/**
* Send a Property List Request PDU.
*/
psCameraDeviceServerPropertyListRequest PropertyListRequest;
/**
* Send a Property Value Request PDU.
*/
psCameraDeviceServerPropertyValueRequest PropertyValueRequest;
/**
* Send a Set Property Value Request PDU.
*/
psCameraDeviceServerSetPropertyValueRequest SetPropertyValueRequest;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned.
*/
psCameraDeviceServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the Success Response PDU.
*/
psCameraDeviceServerSuccessResponse SuccessResponse;
/**
* Callback for the Error Response PDU.
*/
psCameraDeviceServerErrorResponse ErrorResponse;
/**
* Callback for the Stream List Response PDU.
*/
psCameraDeviceServerStreamListResponse StreamListResponse;
/**
* Callback for the Media Type List Response PDU.
*/
psCameraDeviceServerMediaTypeListResponse MediaTypeListResponse;
/**
* Callback for the Current Media Type Response PDU.
*/
psCameraDeviceServerCurrentMediaTypeResponse CurrentMediaTypeResponse;
/**
* Callback for the Sample Response PDU.
*/
psCameraDeviceServerSampleResponse SampleResponse;
/**
* Callback for the Sample Error Response PDU.
*/
psCameraDeviceServerSampleErrorResponse SampleErrorResponse;
/**
* Callback for the Property List Response PDU.
*/
psCameraDeviceServerPropertyListResponse PropertyListResponse;
/**
* Callback for the Property Value Response PDU.
*/
psCameraDeviceServerPropertyValueResponse PropertyValueResponse;
rdpContext* rdpcontext;
};
FREERDP_API CameraDeviceServerContext* camera_device_server_context_new(HANDLE vcm); FREERDP_API CameraDeviceServerContext* camera_device_server_context_new(HANDLE vcm);
FREERDP_API void camera_device_server_context_free(CameraDeviceServerContext* context); FREERDP_API void camera_device_server_context_free(CameraDeviceServerContext* context);

View File

@ -26,38 +26,38 @@
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/rdpei.h> #include <freerdp/channels/rdpei.h>
typedef struct s_rdpei_server_context RdpeiServerContext;
typedef struct s_rdpei_server_private RdpeiServerPrivate;
struct s_rdpei_server_context
{
HANDLE vcm;
RdpeiServerPrivate* priv;
UINT32 clientVersion;
UINT16 maxTouchPoints;
UINT32 protocolFlags;
/** callbacks that can be set by the user */
UINT (*onClientReady)(RdpeiServerContext* context);
UINT (*onTouchEvent)(RdpeiServerContext* context, const RDPINPUT_TOUCH_EVENT* touchEvent);
UINT (*onPenEvent)(RdpeiServerContext* context, const RDPINPUT_PEN_EVENT* penEvent);
UINT (*onTouchReleased)(RdpeiServerContext* context, BYTE contactId);
void* user_data; /* user data, useful for callbacks */
/**
* Callback, when the channel got its id assigned.
*/
BOOL (*onChannelIdAssigned)(RdpeiServerContext* context, UINT32 channelId);
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_rdpei_server_context RdpeiServerContext;
typedef struct s_rdpei_server_private RdpeiServerPrivate;
struct s_rdpei_server_context
{
HANDLE vcm;
RdpeiServerPrivate* priv;
UINT32 clientVersion;
UINT16 maxTouchPoints;
UINT32 protocolFlags;
/** callbacks that can be set by the user */
UINT (*onClientReady)(RdpeiServerContext* context);
UINT (*onTouchEvent)(RdpeiServerContext* context, const RDPINPUT_TOUCH_EVENT* touchEvent);
UINT (*onPenEvent)(RdpeiServerContext* context, const RDPINPUT_PEN_EVENT* penEvent);
UINT (*onTouchReleased)(RdpeiServerContext* context, BYTE contactId);
void* user_data; /* user data, useful for callbacks */
/**
* Callback, when the channel got its id assigned.
*/
BOOL (*onChannelIdAssigned)(RdpeiServerContext* context, UINT32 channelId);
};
FREERDP_API RdpeiServerContext* rdpei_server_context_new(HANDLE vcm); FREERDP_API RdpeiServerContext* rdpei_server_context_new(HANDLE vcm);
FREERDP_API void rdpei_server_context_reset(RdpeiServerContext* context); FREERDP_API void rdpei_server_context_reset(RdpeiServerContext* context);
FREERDP_API void rdpei_server_context_free(RdpeiServerContext* context); FREERDP_API void rdpei_server_context_free(RdpeiServerContext* context);

View File

@ -23,109 +23,112 @@
#include <freerdp/channels/rdpgfx.h> #include <freerdp/channels/rdpgfx.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
typedef struct s_rdpgfx_server_context RdpgfxServerContext;
typedef struct s_rdpgfx_server_private RdpgfxServerPrivate;
typedef BOOL (*psRdpgfxServerOpen)(RdpgfxServerContext* context);
typedef BOOL (*psRdpgfxServerClose)(RdpgfxServerContext* context);
typedef BOOL (*psRdpgfxServerChannelIdAssigned)(RdpgfxServerContext* context, UINT32 channelId);
typedef UINT (*psRdpgfxResetGraphics)(RdpgfxServerContext* context,
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
typedef UINT (*psRdpgfxStartFrame)(RdpgfxServerContext* context,
const RDPGFX_START_FRAME_PDU* startFrame);
typedef UINT (*psRdpgfxEndFrame)(RdpgfxServerContext* context,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*psRdpgfxSurfaceCommand)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_COMMAND* cmd);
typedef UINT (*psRdpgfxSurfaceFrameCommand)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_COMMAND* cmd,
const RDPGFX_START_FRAME_PDU* startFrame,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*psRdpgfxDeleteEncodingContext)(
RdpgfxServerContext* context, const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
typedef UINT (*psRdpgfxCreateSurface)(RdpgfxServerContext* context,
const RDPGFX_CREATE_SURFACE_PDU* createSurface);
typedef UINT (*psRdpgfxDeleteSurface)(RdpgfxServerContext* context,
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
typedef UINT (*psRdpgfxSolidFill)(RdpgfxServerContext* context,
const RDPGFX_SOLID_FILL_PDU* solidFill);
typedef UINT (*psRdpgfxSurfaceToSurface)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
typedef UINT (*psRdpgfxSurfaceToCache)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
typedef UINT (*psRdpgfxCacheToSurface)(RdpgfxServerContext* context,
const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
typedef UINT (*psRdpgfxCacheImportOffer)(RdpgfxServerContext* context,
const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
typedef UINT (*psRdpgfxCacheImportReply)(RdpgfxServerContext* context,
const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
typedef UINT (*psRdpgfxEvictCacheEntry)(RdpgfxServerContext* context,
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
typedef UINT (*psRdpgfxMapSurfaceToOutput)(RdpgfxServerContext* context,
const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*psRdpgfxMapSurfaceToWindow)(RdpgfxServerContext* context,
const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
typedef UINT (*psRdpgfxMapSurfaceToScaledOutput)(
RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*psRdpgfxMapSurfaceToScaledWindow)(
RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
typedef UINT (*psRdpgfxCapsAdvertise)(RdpgfxServerContext* context,
const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
typedef UINT (*psRdpgfxCapsConfirm)(RdpgfxServerContext* context,
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
typedef UINT (*psRdpgfxFrameAcknowledge)(RdpgfxServerContext* context,
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
typedef UINT (*psRdpgfxQoeFrameAcknowledge)(
RdpgfxServerContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
struct s_rdpgfx_server_context
{
HANDLE vcm;
void* custom;
psRdpgfxServerOpen Open;
psRdpgfxServerClose Close;
psRdpgfxResetGraphics ResetGraphics;
psRdpgfxStartFrame StartFrame;
psRdpgfxEndFrame EndFrame;
psRdpgfxSurfaceCommand SurfaceCommand;
psRdpgfxSurfaceFrameCommand SurfaceFrameCommand;
psRdpgfxDeleteEncodingContext DeleteEncodingContext;
psRdpgfxCreateSurface CreateSurface;
psRdpgfxDeleteSurface DeleteSurface;
psRdpgfxSolidFill SolidFill;
psRdpgfxSurfaceToSurface SurfaceToSurface;
psRdpgfxSurfaceToCache SurfaceToCache;
psRdpgfxCacheToSurface CacheToSurface;
psRdpgfxCacheImportOffer CacheImportOffer;
psRdpgfxCacheImportReply CacheImportReply;
psRdpgfxEvictCacheEntry EvictCacheEntry;
psRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
psRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
psRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
psRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
psRdpgfxCapsAdvertise CapsAdvertise;
psRdpgfxCapsConfirm CapsConfirm;
psRdpgfxFrameAcknowledge FrameAcknowledge;
psRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
RdpgfxServerPrivate* priv;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psRdpgfxServerChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_rdpgfx_server_context RdpgfxServerContext;
typedef struct s_rdpgfx_server_private RdpgfxServerPrivate;
typedef BOOL (*psRdpgfxServerOpen)(RdpgfxServerContext* context);
typedef BOOL (*psRdpgfxServerClose)(RdpgfxServerContext* context);
typedef BOOL (*psRdpgfxServerChannelIdAssigned)(RdpgfxServerContext* context, UINT32 channelId);
typedef UINT (*psRdpgfxResetGraphics)(RdpgfxServerContext* context,
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
typedef UINT (*psRdpgfxStartFrame)(RdpgfxServerContext* context,
const RDPGFX_START_FRAME_PDU* startFrame);
typedef UINT (*psRdpgfxEndFrame)(RdpgfxServerContext* context,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*psRdpgfxSurfaceCommand)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_COMMAND* cmd);
typedef UINT (*psRdpgfxSurfaceFrameCommand)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_COMMAND* cmd,
const RDPGFX_START_FRAME_PDU* startFrame,
const RDPGFX_END_FRAME_PDU* endFrame);
typedef UINT (*psRdpgfxDeleteEncodingContext)(
RdpgfxServerContext* context,
const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
typedef UINT (*psRdpgfxCreateSurface)(RdpgfxServerContext* context,
const RDPGFX_CREATE_SURFACE_PDU* createSurface);
typedef UINT (*psRdpgfxDeleteSurface)(RdpgfxServerContext* context,
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
typedef UINT (*psRdpgfxSolidFill)(RdpgfxServerContext* context,
const RDPGFX_SOLID_FILL_PDU* solidFill);
typedef UINT (*psRdpgfxSurfaceToSurface)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
typedef UINT (*psRdpgfxSurfaceToCache)(RdpgfxServerContext* context,
const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
typedef UINT (*psRdpgfxCacheToSurface)(RdpgfxServerContext* context,
const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
typedef UINT (*psRdpgfxCacheImportOffer)(RdpgfxServerContext* context,
const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
typedef UINT (*psRdpgfxCacheImportReply)(RdpgfxServerContext* context,
const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
typedef UINT (*psRdpgfxEvictCacheEntry)(RdpgfxServerContext* context,
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
typedef UINT (*psRdpgfxMapSurfaceToOutput)(
RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*psRdpgfxMapSurfaceToWindow)(
RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
typedef UINT (*psRdpgfxMapSurfaceToScaledOutput)(
RdpgfxServerContext* context,
const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
typedef UINT (*psRdpgfxMapSurfaceToScaledWindow)(
RdpgfxServerContext* context,
const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
typedef UINT (*psRdpgfxCapsAdvertise)(RdpgfxServerContext* context,
const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
typedef UINT (*psRdpgfxCapsConfirm)(RdpgfxServerContext* context,
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
typedef UINT (*psRdpgfxFrameAcknowledge)(RdpgfxServerContext* context,
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
typedef UINT (*psRdpgfxQoeFrameAcknowledge)(
RdpgfxServerContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
struct s_rdpgfx_server_context
{
HANDLE vcm;
void* custom;
psRdpgfxServerOpen Open;
psRdpgfxServerClose Close;
psRdpgfxResetGraphics ResetGraphics;
psRdpgfxStartFrame StartFrame;
psRdpgfxEndFrame EndFrame;
psRdpgfxSurfaceCommand SurfaceCommand;
psRdpgfxSurfaceFrameCommand SurfaceFrameCommand;
psRdpgfxDeleteEncodingContext DeleteEncodingContext;
psRdpgfxCreateSurface CreateSurface;
psRdpgfxDeleteSurface DeleteSurface;
psRdpgfxSolidFill SolidFill;
psRdpgfxSurfaceToSurface SurfaceToSurface;
psRdpgfxSurfaceToCache SurfaceToCache;
psRdpgfxCacheToSurface CacheToSurface;
psRdpgfxCacheImportOffer CacheImportOffer;
psRdpgfxCacheImportReply CacheImportReply;
psRdpgfxEvictCacheEntry EvictCacheEntry;
psRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
psRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
psRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
psRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
psRdpgfxCapsAdvertise CapsAdvertise;
psRdpgfxCapsConfirm CapsConfirm;
psRdpgfxFrameAcknowledge FrameAcknowledge;
psRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
RdpgfxServerPrivate* priv;
rdpContext* rdpcontext;
/**
* Callback, when the channel got its id assigned.
*/
psRdpgfxServerChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API RdpgfxServerContext* rdpgfx_server_context_new(HANDLE vcm); FREERDP_API RdpgfxServerContext* rdpgfx_server_context_new(HANDLE vcm);
FREERDP_API void rdpgfx_server_context_free(RdpgfxServerContext* context); FREERDP_API void rdpgfx_server_context_free(RdpgfxServerContext* context);
FREERDP_API HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context); FREERDP_API HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context);

View File

@ -25,159 +25,160 @@
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/rdpsnd.h> #include <freerdp/channels/rdpsnd.h>
typedef struct s_rdpsnd_server_context RdpsndServerContext;
typedef struct s_rdpsnd_server_context rdpsnd_server_context;
typedef struct s_rdpsnd_server_private RdpsndServerPrivate;
typedef UINT (*psRdpsndStart)(RdpsndServerContext* context);
typedef UINT (*psRdpsndStop)(RdpsndServerContext* context);
typedef BOOL (*psRdpsndChannelIdAssigned)(RdpsndServerContext* context, UINT32 channelId);
typedef UINT (*psRdpsndServerInitialize)(RdpsndServerContext* context, BOOL ownThread);
typedef UINT (*psRdpsndServerSendFormats)(RdpsndServerContext* context);
typedef UINT (*psRdpsndServerSelectFormat)(RdpsndServerContext* context,
UINT16 client_format_index);
typedef UINT (*psRdpsndServerTraining)(RdpsndServerContext* context, UINT16 timestamp,
UINT16 packsize, BYTE* data);
typedef UINT (*psRdpsndServerTrainingConfirm)(RdpsndServerContext* context, UINT16 timestamp,
UINT16 packsize);
typedef UINT (*psRdpsndServerSendSamples)(RdpsndServerContext* context, const void* buf,
size_t nframes, UINT16 wTimestamp);
typedef UINT (*psRdpsndServerSendSamples2)(RdpsndServerContext* context, UINT16 formatNo,
const void* buf, size_t size, UINT16 timestamp,
UINT32 audioTimeStamp);
typedef UINT (*psRdpsndServerConfirmBlock)(RdpsndServerContext* context, BYTE confirmBlockNum,
UINT16 wtimestamp);
typedef UINT (*psRdpsndServerSetVolume)(RdpsndServerContext* context, UINT16 left, UINT16 right);
typedef UINT (*psRdpsndServerClose)(RdpsndServerContext* context);
typedef void (*psRdpsndServerActivated)(RdpsndServerContext* context);
struct s_rdpsnd_server_context
{
HANDLE vcm;
psRdpsndStart Start;
psRdpsndStop Stop;
RdpsndServerPrivate* priv;
/* Server self-defined pointer. */
void* data;
/* Server to request to use dynamic virtual channel. */
BOOL use_dynamic_virtual_channel;
/* Server supported formats. Set by server. */
AUDIO_FORMAT* server_formats;
size_t num_server_formats;
/* Server source PCM audio format. Set by server. */
AUDIO_FORMAT* src_format;
/* Server audio latency, or buffer size, in milli-seconds. Set by server. */
UINT32 latency;
/* Client supported formats. */
AUDIO_FORMAT* client_formats;
UINT16 num_client_formats;
UINT16 selected_client_format;
/* Last sent audio block number. */
UINT8 block_no;
/*** APIs called by the server. ***/
/**
* Initialize the channel. The caller should check the return value to see
* whether the initialization succeed. If not, the "Activated" callback
* will not be called and the server must not call any API on this context.
*/
psRdpsndServerInitialize Initialize;
/**
* Choose the audio format to be sent. The index argument is an index into
* the client_formats array and must be smaller than num_client_formats.
*/
psRdpsndServerSelectFormat SelectFormat;
/**
* Send audio samples. Actually bytes in the buffer must be:
* nframes * src_format.nBitsPerSample * src_format.nChannels / 8
*/
psRdpsndServerSendSamples SendSamples;
/**
* Called when block confirm is received from the client
*/
psRdpsndServerConfirmBlock ConfirmBlock;
/**
* Set the volume level of the client. Valid range is between 0 and 0xFFFF.
*/
psRdpsndServerSetVolume SetVolume;
/**
* Close the audio stream.
*/
psRdpsndServerClose Close;
/*** Callbacks registered by the server. ***/
/**
* The channel has been activated. The server maybe choose audio format and
* start audio stream from this point. Note that this callback is called
* from a different thread context so the server must be careful of thread
* synchronization.
*/
psRdpsndServerActivated Activated;
/**
* MS-RDPEA channel version the client announces
*/
UINT16 clientVersion;
rdpContext* rdpcontext;
/* dwFlags in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 capsFlags;
/* dwVolume in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 initialVolume;
/* dwPitch in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 initialPitch;
UINT16 qualityMode;
/**
* Send server formats and version to the client. Automatically sent, when
* opening the channel.
* Also used to restart the protocol after sending the Close PDU.
*/
psRdpsndServerSendFormats SendFormats;
/**
* Send Training PDU.
*/
psRdpsndServerTraining Training;
/**
* Send encoded audio samples using a Wave2 PDU.
* When successful, the block_no member is incremented.
*/
psRdpsndServerSendSamples2 SendSamples2;
/**
* Called when a TrainingConfirm PDU is received from the client.
*/
psRdpsndServerTrainingConfirm TrainingConfirm;
/**
* Callback, when the channel got its id assigned.
* Only called, when use_dynamic_virtual_channel=TRUE.
*/
psRdpsndChannelIdAssigned ChannelIdAssigned;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_rdpsnd_server_context RdpsndServerContext;
typedef struct s_rdpsnd_server_context rdpsnd_server_context;
typedef struct s_rdpsnd_server_private RdpsndServerPrivate;
typedef UINT (*psRdpsndStart)(RdpsndServerContext* context);
typedef UINT (*psRdpsndStop)(RdpsndServerContext* context);
typedef BOOL (*psRdpsndChannelIdAssigned)(RdpsndServerContext* context, UINT32 channelId);
typedef UINT (*psRdpsndServerInitialize)(RdpsndServerContext* context, BOOL ownThread);
typedef UINT (*psRdpsndServerSendFormats)(RdpsndServerContext* context);
typedef UINT (*psRdpsndServerSelectFormat)(RdpsndServerContext* context,
UINT16 client_format_index);
typedef UINT (*psRdpsndServerTraining)(RdpsndServerContext* context, UINT16 timestamp,
UINT16 packsize, BYTE* data);
typedef UINT (*psRdpsndServerTrainingConfirm)(RdpsndServerContext* context, UINT16 timestamp,
UINT16 packsize);
typedef UINT (*psRdpsndServerSendSamples)(RdpsndServerContext* context, const void* buf,
size_t nframes, UINT16 wTimestamp);
typedef UINT (*psRdpsndServerSendSamples2)(RdpsndServerContext* context, UINT16 formatNo,
const void* buf, size_t size, UINT16 timestamp,
UINT32 audioTimeStamp);
typedef UINT (*psRdpsndServerConfirmBlock)(RdpsndServerContext* context, BYTE confirmBlockNum,
UINT16 wtimestamp);
typedef UINT (*psRdpsndServerSetVolume)(RdpsndServerContext* context, UINT16 left,
UINT16 right);
typedef UINT (*psRdpsndServerClose)(RdpsndServerContext* context);
typedef void (*psRdpsndServerActivated)(RdpsndServerContext* context);
struct s_rdpsnd_server_context
{
HANDLE vcm;
psRdpsndStart Start;
psRdpsndStop Stop;
RdpsndServerPrivate* priv;
/* Server self-defined pointer. */
void* data;
/* Server to request to use dynamic virtual channel. */
BOOL use_dynamic_virtual_channel;
/* Server supported formats. Set by server. */
AUDIO_FORMAT* server_formats;
size_t num_server_formats;
/* Server source PCM audio format. Set by server. */
AUDIO_FORMAT* src_format;
/* Server audio latency, or buffer size, in milli-seconds. Set by server. */
UINT32 latency;
/* Client supported formats. */
AUDIO_FORMAT* client_formats;
UINT16 num_client_formats;
UINT16 selected_client_format;
/* Last sent audio block number. */
UINT8 block_no;
/*** APIs called by the server. ***/
/**
* Initialize the channel. The caller should check the return value to see
* whether the initialization succeed. If not, the "Activated" callback
* will not be called and the server must not call any API on this context.
*/
psRdpsndServerInitialize Initialize;
/**
* Choose the audio format to be sent. The index argument is an index into
* the client_formats array and must be smaller than num_client_formats.
*/
psRdpsndServerSelectFormat SelectFormat;
/**
* Send audio samples. Actually bytes in the buffer must be:
* nframes * src_format.nBitsPerSample * src_format.nChannels / 8
*/
psRdpsndServerSendSamples SendSamples;
/**
* Called when block confirm is received from the client
*/
psRdpsndServerConfirmBlock ConfirmBlock;
/**
* Set the volume level of the client. Valid range is between 0 and 0xFFFF.
*/
psRdpsndServerSetVolume SetVolume;
/**
* Close the audio stream.
*/
psRdpsndServerClose Close;
/*** Callbacks registered by the server. ***/
/**
* The channel has been activated. The server maybe choose audio format and
* start audio stream from this point. Note that this callback is called
* from a different thread context so the server must be careful of thread
* synchronization.
*/
psRdpsndServerActivated Activated;
/**
* MS-RDPEA channel version the client announces
*/
UINT16 clientVersion;
rdpContext* rdpcontext;
/* dwFlags in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 capsFlags;
/* dwVolume in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 initialVolume;
/* dwPitch in CLIENT_AUDIO_VERSION_AND_FORMATS */
UINT32 initialPitch;
UINT16 qualityMode;
/**
* Send server formats and version to the client. Automatically sent, when
* opening the channel.
* Also used to restart the protocol after sending the Close PDU.
*/
psRdpsndServerSendFormats SendFormats;
/**
* Send Training PDU.
*/
psRdpsndServerTraining Training;
/**
* Send encoded audio samples using a Wave2 PDU.
* When successful, the block_no member is incremented.
*/
psRdpsndServerSendSamples2 SendSamples2;
/**
* Called when a TrainingConfirm PDU is received from the client.
*/
psRdpsndServerTrainingConfirm TrainingConfirm;
/**
* Callback, when the channel got its id assigned.
* Only called, when use_dynamic_virtual_channel=TRUE.
*/
psRdpsndChannelIdAssigned ChannelIdAssigned;
};
FREERDP_API RdpsndServerContext* rdpsnd_server_context_new(HANDLE vcm); FREERDP_API RdpsndServerContext* rdpsnd_server_context_new(HANDLE vcm);
FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext*); FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext*);
FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context); FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context);

View File

@ -28,33 +28,33 @@
#include <freerdp/client/remdesk.h> #include <freerdp/client/remdesk.h>
/**
* Server Interface
*/
typedef struct s_remdesk_server_context RemdeskServerContext;
typedef struct s_remdesk_server_private RemdeskServerPrivate;
typedef UINT (*psRemdeskStart)(RemdeskServerContext* context);
typedef UINT (*psRemdeskStop)(RemdeskServerContext* context);
struct s_remdesk_server_context
{
HANDLE vcm;
void* custom;
psRemdeskStart Start;
psRemdeskStop Stop;
RemdeskServerPrivate* priv;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/**
* Server Interface
*/
typedef struct s_remdesk_server_context RemdeskServerContext;
typedef struct s_remdesk_server_private RemdeskServerPrivate;
typedef UINT (*psRemdeskStart)(RemdeskServerContext* context);
typedef UINT (*psRemdeskStop)(RemdeskServerContext* context);
struct s_remdesk_server_context
{
HANDLE vcm;
void* custom;
psRemdeskStart Start;
psRemdeskStop Stop;
RemdeskServerPrivate* priv;
rdpContext* rdpcontext;
};
FREERDP_API RemdeskServerContext* remdesk_server_context_new(HANDLE vcm); FREERDP_API RemdeskServerContext* remdesk_server_context_new(HANDLE vcm);
FREERDP_API void remdesk_server_context_free(RemdeskServerContext* context); FREERDP_API void remdesk_server_context_free(RemdeskServerContext* context);

View File

@ -29,8 +29,10 @@
extern "C" extern "C"
{ {
#endif #endif
FREERDP_API size_t server_audin_get_formats(AUDIO_FORMAT** dst_formats); FREERDP_API size_t server_audin_get_formats(AUDIO_FORMAT** dst_formats);
FREERDP_API size_t server_rdpsnd_get_formats(AUDIO_FORMAT** dst_formats); FREERDP_API size_t server_rdpsnd_get_formats(AUDIO_FORMAT** dst_formats);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -45,77 +45,87 @@
#include <winpr/collections.h> #include <winpr/collections.h>
#include <winpr/cmdline.h> #include <winpr/cmdline.h>
typedef struct rdp_shadow_client rdpShadowClient; #ifdef __cplusplus
typedef struct rdp_shadow_server rdpShadowServer; extern "C"
typedef struct rdp_shadow_screen rdpShadowScreen;
typedef struct rdp_shadow_surface rdpShadowSurface;
typedef struct rdp_shadow_encoder rdpShadowEncoder;
typedef struct rdp_shadow_capture rdpShadowCapture;
typedef struct rdp_shadow_subsystem rdpShadowSubsystem;
typedef struct rdp_shadow_multiclient_event rdpShadowMultiClientEvent;
typedef struct S_RDP_SHADOW_ENTRY_POINTS RDP_SHADOW_ENTRY_POINTS;
typedef int (*pfnShadowSubsystemEntry)(RDP_SHADOW_ENTRY_POINTS* pEntryPoints);
typedef rdpShadowSubsystem* (*pfnShadowSubsystemNew)(void);
typedef void (*pfnShadowSubsystemFree)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemInit)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemUninit)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemStart)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemStop)(rdpShadowSubsystem* subsystem);
typedef UINT32 (*pfnShadowEnumMonitors)(MONITOR_DEF* monitors, UINT32 maxMonitors);
typedef int (*pfnShadowAuthenticate)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
const char* user, const char* domain, const char* password);
typedef BOOL (*pfnShadowClientConnect)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
typedef void (*pfnShadowClientDisconnect)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
typedef BOOL (*pfnShadowClientCapabilities)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
typedef BOOL (*pfnShadowSynchronizeEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT32 flags);
typedef BOOL (*pfnShadowKeyboardEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT16 flags, UINT8 code);
typedef BOOL (*pfnShadowUnicodeKeyboardEvent)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client, UINT16 flags, UINT16 code);
typedef BOOL (*pfnShadowMouseEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pfnShadowExtendedMouseEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pfnShadowChannelAudinServerReceiveSamples)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client,
const AUDIO_FORMAT* format, wStream* buf,
size_t nframes);
struct rdp_shadow_client
{ {
rdpContext context; #endif
HANDLE thread; typedef struct rdp_shadow_client rdpShadowClient;
BOOL activated; typedef struct rdp_shadow_server rdpShadowServer;
BOOL first_frame; typedef struct rdp_shadow_screen rdpShadowScreen;
BOOL inLobby; typedef struct rdp_shadow_surface rdpShadowSurface;
BOOL mayView; typedef struct rdp_shadow_encoder rdpShadowEncoder;
BOOL mayInteract; typedef struct rdp_shadow_capture rdpShadowCapture;
BOOL suppressOutput; typedef struct rdp_shadow_subsystem rdpShadowSubsystem;
UINT16 surfaceId; typedef struct rdp_shadow_multiclient_event rdpShadowMultiClientEvent;
wMessageQueue* MsgQueue;
CRITICAL_SECTION lock;
REGION16 invalidRegion;
rdpShadowServer* server;
rdpShadowEncoder* encoder;
rdpShadowSubsystem* subsystem;
UINT32 pointerX; typedef struct S_RDP_SHADOW_ENTRY_POINTS RDP_SHADOW_ENTRY_POINTS;
UINT32 pointerY; typedef int (*pfnShadowSubsystemEntry)(RDP_SHADOW_ENTRY_POINTS* pEntryPoints);
HANDLE vcm; typedef rdpShadowSubsystem* (*pfnShadowSubsystemNew)(void);
EncomspServerContext* encomsp; typedef void (*pfnShadowSubsystemFree)(rdpShadowSubsystem* subsystem);
RemdeskServerContext* remdesk;
RdpsndServerContext* rdpsnd; typedef int (*pfnShadowSubsystemInit)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemUninit)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemStart)(rdpShadowSubsystem* subsystem);
typedef int (*pfnShadowSubsystemStop)(rdpShadowSubsystem* subsystem);
typedef UINT32 (*pfnShadowEnumMonitors)(MONITOR_DEF* monitors, UINT32 maxMonitors);
typedef int (*pfnShadowAuthenticate)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
const char* user, const char* domain,
const char* password);
typedef BOOL (*pfnShadowClientConnect)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
typedef void (*pfnShadowClientDisconnect)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client);
typedef BOOL (*pfnShadowClientCapabilities)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client);
typedef BOOL (*pfnShadowSynchronizeEvent)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client, UINT32 flags);
typedef BOOL (*pfnShadowKeyboardEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT16 flags, UINT8 code);
typedef BOOL (*pfnShadowUnicodeKeyboardEvent)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client, UINT16 flags,
UINT16 code);
typedef BOOL (*pfnShadowMouseEvent)(rdpShadowSubsystem* subsystem, rdpShadowClient* client,
UINT16 flags, UINT16 x, UINT16 y);
typedef BOOL (*pfnShadowExtendedMouseEvent)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client, UINT16 flags, UINT16 x,
UINT16 y);
typedef BOOL (*pfnShadowChannelAudinServerReceiveSamples)(rdpShadowSubsystem* subsystem,
rdpShadowClient* client,
const AUDIO_FORMAT* format,
wStream* buf, size_t nframes);
struct rdp_shadow_client
{
rdpContext context;
HANDLE thread;
BOOL activated;
BOOL first_frame;
BOOL inLobby;
BOOL mayView;
BOOL mayInteract;
BOOL suppressOutput;
UINT16 surfaceId;
wMessageQueue* MsgQueue;
CRITICAL_SECTION lock;
REGION16 invalidRegion;
rdpShadowServer* server;
rdpShadowEncoder* encoder;
rdpShadowSubsystem* subsystem;
UINT32 pointerX;
UINT32 pointerY;
HANDLE vcm;
EncomspServerContext* encomsp;
RemdeskServerContext* remdesk;
RdpsndServerContext* rdpsnd;
#if defined(CHANNEL_AUDIN_SERVER) #if defined(CHANNEL_AUDIN_SERVER)
audin_server_context* audin; audin_server_context* audin;
#endif #endif
@ -124,7 +134,7 @@ struct rdp_shadow_client
BOOL resizeRequested; BOOL resizeRequested;
UINT32 resizeWidth; UINT32 resizeWidth;
UINT32 resizeHeight; UINT32 resizeHeight;
}; };
struct rdp_shadow_server struct rdp_shadow_server
{ {
@ -285,11 +295,6 @@ typedef struct
UINT16 right; UINT16 right;
} SHADOW_MSG_OUT_AUDIO_OUT_VOLUME; } SHADOW_MSG_OUT_AUDIO_OUT_VOLUME;
#ifdef __cplusplus
extern "C"
{
#endif
FREERDP_API void shadow_subsystem_set_entry_builtin(const char* name); FREERDP_API void shadow_subsystem_set_entry_builtin(const char* name);
FREERDP_API void shadow_subsystem_set_entry(pfnShadowSubsystemEntry pEntry); FREERDP_API void shadow_subsystem_set_entry(pfnShadowSubsystemEntry pEntry);

View File

@ -23,81 +23,82 @@
#include <freerdp/channels/telemetry.h> #include <freerdp/channels/telemetry.h>
#include <freerdp/channels/wtsvc.h> #include <freerdp/channels/wtsvc.h>
typedef struct _telemetry_server_context TelemetryServerContext;
typedef UINT (*psTelemetryServerOpen)(TelemetryServerContext* context);
typedef UINT (*psTelemetryServerClose)(TelemetryServerContext* context);
typedef BOOL (*psTelemetryServerChannelIdAssigned)(TelemetryServerContext* context,
UINT32 channelId);
typedef UINT (*psTelemetryServerInitialize)(TelemetryServerContext* context, BOOL externalThread);
typedef UINT (*psTelemetryServerPoll)(TelemetryServerContext* context);
typedef BOOL (*psTelemetryServerChannelHandle)(TelemetryServerContext* context, HANDLE* handle);
typedef UINT (*psTelemetryServerRdpTelemetry)(TelemetryServerContext* context,
const TELEMETRY_RDP_TELEMETRY_PDU* rdpTelemetry);
struct _telemetry_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psTelemetryServerInitialize Initialize;
/**
* Open the telemetry channel.
*/
psTelemetryServerOpen Open;
/**
* Close the telemetry channel.
*/
psTelemetryServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psTelemetryServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psTelemetryServerChannelHandle ChannelHandle;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned
*/
psTelemetryServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the RDP Telemetry PDU.
*/
psTelemetryServerRdpTelemetry RdpTelemetry;
rdpContext* rdpcontext;
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct _telemetry_server_context TelemetryServerContext;
typedef UINT (*psTelemetryServerOpen)(TelemetryServerContext* context);
typedef UINT (*psTelemetryServerClose)(TelemetryServerContext* context);
typedef BOOL (*psTelemetryServerChannelIdAssigned)(TelemetryServerContext* context,
UINT32 channelId);
typedef UINT (*psTelemetryServerInitialize)(TelemetryServerContext* context,
BOOL externalThread);
typedef UINT (*psTelemetryServerPoll)(TelemetryServerContext* context);
typedef BOOL (*psTelemetryServerChannelHandle)(TelemetryServerContext* context, HANDLE* handle);
typedef UINT (*psTelemetryServerRdpTelemetry)(TelemetryServerContext* context,
const TELEMETRY_RDP_TELEMETRY_PDU* rdpTelemetry);
struct _telemetry_server_context
{
HANDLE vcm;
/* Server self-defined pointer. */
void* userdata;
/*** APIs called by the server. ***/
/**
* Optional: Set thread handling.
* When externalThread=TRUE, the application is responsible to call
* Poll() periodically to process channel events.
*
* Defaults to externalThread=FALSE
*/
psTelemetryServerInitialize Initialize;
/**
* Open the telemetry channel.
*/
psTelemetryServerOpen Open;
/**
* Close the telemetry channel.
*/
psTelemetryServerClose Close;
/**
* Poll
* When externalThread=TRUE, call Poll() periodically from your main loop.
* If externalThread=FALSE do not call.
*/
psTelemetryServerPoll Poll;
/**
* Retrieve the channel handle for use in conjunction with Poll().
* If externalThread=FALSE do not call.
*/
psTelemetryServerChannelHandle ChannelHandle;
/*** Callbacks registered by the server. ***/
/**
* Callback, when the channel got its id assigned
*/
psTelemetryServerChannelIdAssigned ChannelIdAssigned;
/**
* Callback for the RDP Telemetry PDU.
*/
psTelemetryServerRdpTelemetry RdpTelemetry;
rdpContext* rdpcontext;
};
FREERDP_API TelemetryServerContext* telemetry_server_context_new(HANDLE vcm); FREERDP_API TelemetryServerContext* telemetry_server_context_new(HANDLE vcm);
FREERDP_API void telemetry_server_context_free(TelemetryServerContext* context); FREERDP_API void telemetry_server_context_free(TelemetryServerContext* context);

View File

@ -27,24 +27,33 @@
#define INFO_TYPE_LOGON_PLAIN_NOTIFY 0x00000002 #define INFO_TYPE_LOGON_PLAIN_NOTIFY 0x00000002
#define INFO_TYPE_LOGON_EXTENDED_INF 0x00000003 #define INFO_TYPE_LOGON_EXTENDED_INF 0x00000003
struct rdp_logon_info #ifdef __cplusplus
extern "C"
{ {
UINT32 sessionId; #endif
char* username;
char* domain;
};
typedef struct rdp_logon_info logon_info;
struct rdp_logon_info_ex struct rdp_logon_info
{ {
BOOL haveCookie; UINT32 sessionId;
UINT32 LogonId; char* username;
BYTE ArcRandomBits[16]; char* domain;
};
typedef struct rdp_logon_info logon_info;
BOOL haveErrorInfo; struct rdp_logon_info_ex
UINT32 ErrorNotificationType; {
UINT32 ErrorNotificationData; BOOL haveCookie;
}; UINT32 LogonId;
typedef struct rdp_logon_info_ex logon_info_ex; BYTE ArcRandomBits[16];
BOOL haveErrorInfo;
UINT32 ErrorNotificationType;
UINT32 ErrorNotificationData;
};
typedef struct rdp_logon_info_ex logon_info_ex;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_SESSION_H */ #endif /* FREERDP_SESSION_H */

View File

@ -34,6 +34,11 @@
#include <freerdp/crypto/certificate.h> #include <freerdp/crypto/certificate.h>
#include <freerdp/crypto/privatekey.h> #include <freerdp/crypto/privatekey.h>
#ifdef __cplusplus
extern "C"
{
#endif
/** \file /** \file
* \brief This is the FreeRDP settings module. * \brief This is the FreeRDP settings module.
* *
@ -1671,11 +1676,6 @@ enum rdp_settings_type
RDP_SETTINGS_TYPE_POINTER RDP_SETTINGS_TYPE_POINTER
}; };
#ifdef __cplusplus
extern "C"
{
#endif
/** /**
* rdpSettings creation flags * rdpSettings creation flags
*/ */

View File

@ -27,13 +27,13 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
typedef struct stream_dump_context rdpStreamDumpContext;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct stream_dump_context rdpStreamDumpContext;
typedef enum typedef enum
{ {
STREAM_MSG_SRV_RX = 1, STREAM_MSG_SRV_RX = 1,

View File

@ -35,38 +35,47 @@
#define FREERDP_CHANNEL_MAGIC_NUMBER 0x46524450 #define FREERDP_CHANNEL_MAGIC_NUMBER 0x46524450
typedef struct #ifdef __cplusplus
extern "C"
{ {
UINT32 cbSize; #endif
UINT32 protocolVersion;
PVIRTUALCHANNELINIT pVirtualChannelInit;
PVIRTUALCHANNELOPEN pVirtualChannelOpen;
PVIRTUALCHANNELCLOSE pVirtualChannelClose;
PVIRTUALCHANNELWRITE pVirtualChannelWrite;
/* Extended Fields */ typedef struct
UINT32 MagicNumber; /* identifies FreeRDP */ {
void* pExtendedData; /* extended initial data */ UINT32 cbSize;
void* pInterface; /* channel callback interface, use after initialization */ UINT32 protocolVersion;
rdpContext* context; PVIRTUALCHANNELINIT pVirtualChannelInit;
} CHANNEL_ENTRY_POINTS_FREERDP; PVIRTUALCHANNELOPEN pVirtualChannelOpen;
typedef CHANNEL_ENTRY_POINTS_FREERDP* PCHANNEL_ENTRY_POINTS_FREERDP; PVIRTUALCHANNELCLOSE pVirtualChannelClose;
PVIRTUALCHANNELWRITE pVirtualChannelWrite;
typedef struct /* Extended Fields */
{ UINT32 MagicNumber; /* identifies FreeRDP */
UINT32 cbSize; void* pExtendedData; /* extended initial data */
UINT32 protocolVersion; void* pInterface; /* channel callback interface, use after initialization */
PVIRTUALCHANNELINITEX pVirtualChannelInitEx; rdpContext* context;
PVIRTUALCHANNELOPENEX pVirtualChannelOpenEx; } CHANNEL_ENTRY_POINTS_FREERDP;
PVIRTUALCHANNELCLOSEEX pVirtualChannelCloseEx; typedef CHANNEL_ENTRY_POINTS_FREERDP* PCHANNEL_ENTRY_POINTS_FREERDP;
PVIRTUALCHANNELWRITEEX pVirtualChannelWriteEx;
/* Extended Fields */ typedef struct
UINT32 MagicNumber; /* identifies FreeRDP */ {
void* pExtendedData; /* extended initial data */ UINT32 cbSize;
void* pInterface; /* channel callback interface, use after initialization */ UINT32 protocolVersion;
rdpContext* context; PVIRTUALCHANNELINITEX pVirtualChannelInitEx;
} CHANNEL_ENTRY_POINTS_FREERDP_EX; PVIRTUALCHANNELOPENEX pVirtualChannelOpenEx;
typedef CHANNEL_ENTRY_POINTS_FREERDP_EX* PCHANNEL_ENTRY_POINTS_FREERDP_EX; PVIRTUALCHANNELCLOSEEX pVirtualChannelCloseEx;
PVIRTUALCHANNELWRITEEX pVirtualChannelWriteEx;
/* Extended Fields */
UINT32 MagicNumber; /* identifies FreeRDP */
void* pExtendedData; /* extended initial data */
void* pInterface; /* channel callback interface, use after initialization */
rdpContext* context;
} CHANNEL_ENTRY_POINTS_FREERDP_EX;
typedef CHANNEL_ENTRY_POINTS_FREERDP_EX* PCHANNEL_ENTRY_POINTS_FREERDP_EX;
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_SVC_H */ #endif /* FREERDP_SVC_H */

View File

@ -22,8 +22,6 @@
#ifndef FREERDP_TRANSPORT_IO_H #ifndef FREERDP_TRANSPORT_IO_H
#define FREERDP_TRANSPORT_IO_H #define FREERDP_TRANSPORT_IO_H
typedef struct rdp_transport_io rdpTransportIo;
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
@ -35,6 +33,8 @@ extern "C"
{ {
#endif #endif
typedef struct rdp_transport_io rdpTransportIo;
typedef int (*pTCPConnect)(rdpContext* context, rdpSettings* settings, const char* hostname, typedef int (*pTCPConnect)(rdpContext* context, rdpSettings* settings, const char* hostname,
int port, DWORD timeout); int port, DWORD timeout);
typedef BOOL (*pTransportFkt)(rdpTransport* transport); typedef BOOL (*pTransportFkt)(rdpTransport* transport);

View File

@ -32,18 +32,23 @@
#define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif #endif
typedef struct #ifdef __cplusplus
extern "C"
{ {
BYTE red; #endif
BYTE green;
BYTE blue;
} PALETTE_ENTRY;
typedef struct typedef struct
{ {
UINT32 count; BYTE red;
PALETTE_ENTRY entries[256]; BYTE green;
} rdpPalette; BYTE blue;
} PALETTE_ENTRY;
typedef struct
{
UINT32 count;
PALETTE_ENTRY entries[256];
} rdpPalette;
#include <freerdp/settings.h> #include <freerdp/settings.h>
@ -85,6 +90,10 @@ typedef enum
RDP_TRANSPORT_UDP_L RDP_TRANSPORT_UDP_L
} RDP_TRANSPORT_TYPE; } RDP_TRANSPORT_TYPE;
#ifdef __cplusplus
}
#endif
/* Plugin events */ /* Plugin events */
#include <freerdp/message.h> #include <freerdp/message.h>

View File

@ -20,8 +20,6 @@
#ifndef FREERDP_UPDATE_H #ifndef FREERDP_UPDATE_H
#define FREERDP_UPDATE_H #define FREERDP_UPDATE_H
typedef struct rdp_update rdpUpdate;
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/wlog.h> #include <winpr/wlog.h>
#include <winpr/synch.h> #include <winpr/synch.h>
@ -44,201 +42,204 @@ typedef struct rdp_update rdpUpdate;
/* Bitmap Updates */ /* Bitmap Updates */
#define EX_COMPRESSED_BITMAP_HEADER_PRESENT 0x01 #define EX_COMPRESSED_BITMAP_HEADER_PRESENT 0x01
typedef struct
{
UINT32 destLeft;
UINT32 destTop;
UINT32 destRight;
UINT32 destBottom;
UINT32 width;
UINT32 height;
UINT32 bitsPerPixel;
UINT32 flags;
UINT32 bitmapLength;
UINT32 cbCompFirstRowSize;
UINT32 cbCompMainBodySize;
UINT32 cbScanWidth;
UINT32 cbUncompressedSize;
BYTE* bitmapDataStream;
BOOL compressed;
} BITMAP_DATA;
typedef struct
{
UINT32 number;
BITMAP_DATA* rectangles;
BOOL skipCompression;
} BITMAP_UPDATE;
/* Palette Updates */
typedef struct
{
UINT32 number;
PALETTE_ENTRY entries[256];
} PALETTE_UPDATE;
/* Play Sound (System Beep) Updates */
typedef struct
{
UINT32 duration;
UINT32 frequency;
} PLAY_SOUND_UPDATE;
/* Surface Command Updates */
typedef struct
{
UINT32 highUniqueId;
UINT32 lowUniqueId;
UINT64 tmMilliseconds;
UINT64 tmSeconds;
} TS_COMPRESSED_BITMAP_HEADER_EX;
typedef struct
{
BYTE bpp;
BYTE flags;
UINT16 codecID;
UINT16 width;
UINT16 height;
UINT32 bitmapDataLength;
TS_COMPRESSED_BITMAP_HEADER_EX exBitmapDataHeader;
BYTE* bitmapData;
} TS_BITMAP_DATA_EX;
enum SURFCMD_CMDTYPE
{
CMDTYPE_SET_SURFACE_BITS = 0x0001,
CMDTYPE_FRAME_MARKER = 0x0004,
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
};
typedef struct
{
UINT32 cmdType;
UINT32 destLeft;
UINT32 destTop;
UINT32 destRight;
UINT32 destBottom;
TS_BITMAP_DATA_EX bmp;
BOOL skipCompression;
} SURFACE_BITS_COMMAND;
typedef struct
{
UINT32 frameAction;
UINT32 frameId;
} SURFACE_FRAME_MARKER;
enum SURFCMD_FRAMEACTION
{
SURFACECMD_FRAMEACTION_BEGIN = 0x0000,
SURFACECMD_FRAMEACTION_END = 0x0001
};
/** @brief status code as in 2.2.5.2 Server Status Info PDU */
enum
{
TS_STATUS_FINDING_DESTINATION = 0x00000401,
TS_STATUS_LOADING_DESTINATION = 0x00000402,
TS_STATUS_BRINGING_SESSION_ONLINE = 0x00000403,
TS_STATUS_REDIRECTING_TO_DESTINATION = 0x00000404,
TS_STATUS_VM_LOADING = 0x00000501,
TS_STATUS_VM_WAKING = 0x00000502,
TS_STATUS_VM_STARTING = 0x00000503,
TS_STATUS_VM_STARTING_MONITORING = 0x00000504,
TS_STATUS_VM_RETRYING_MONITORING = 0x00000505
};
typedef struct
{
UINT32 frameId;
UINT32 commandCount;
SURFACE_BITS_COMMAND* commands;
} SURFACE_FRAME;
/* defined inside libfreerdp-core */
typedef struct rdp_update_proxy rdpUpdateProxy;
/* Update Interface */
typedef BOOL (*pBeginPaint)(rdpContext* context);
typedef BOOL (*pEndPaint)(rdpContext* context);
typedef BOOL (*pSetBounds)(rdpContext* context, const rdpBounds* bounds);
typedef BOOL (*pSynchronize)(rdpContext* context);
typedef BOOL (*pDesktopResize)(rdpContext* context);
typedef BOOL (*pBitmapUpdate)(rdpContext* context, const BITMAP_UPDATE* bitmap);
typedef BOOL (*pPalette)(rdpContext* context, const PALETTE_UPDATE* palette);
typedef BOOL (*pPlaySound)(rdpContext* context, const PLAY_SOUND_UPDATE* play_sound);
typedef BOOL (*pSetKeyboardIndicators)(rdpContext* context, UINT16 led_flags);
typedef BOOL (*pRefreshRect)(rdpContext* context, BYTE count, const RECTANGLE_16* areas);
typedef BOOL (*pSuppressOutput)(rdpContext* context, BYTE allow, const RECTANGLE_16* area);
typedef BOOL (*pRemoteMonitors)(rdpContext* context, UINT32 count, const MONITOR_DEF* monitors);
typedef BOOL (*pSurfaceCommand)(rdpContext* context, wStream* s);
typedef BOOL (*pSurfaceBits)(rdpContext* context, const SURFACE_BITS_COMMAND* surfaceBitsCommand);
typedef BOOL (*pSurfaceFrameMarker)(rdpContext* context,
const SURFACE_FRAME_MARKER* surfaceFrameMarker);
typedef BOOL (*pSurfaceFrameBits)(rdpContext* context, const SURFACE_BITS_COMMAND* cmd, BOOL first,
BOOL last, UINT32 frameId);
typedef BOOL (*pSurfaceFrameAcknowledge)(rdpContext* context, UINT32 frameId);
typedef BOOL (*pSaveSessionInfo)(rdpContext* context, UINT32 type, void* data);
typedef BOOL (*pSetKeyboardImeStatus)(rdpContext* context, UINT16 imeId, UINT32 imeState,
UINT32 imeConvMode);
typedef BOOL (*pServerStatusInfo)(rdpContext* context, UINT32 status);
struct rdp_update
{
rdpContext* context; /* 0 */
UINT32 paddingA[16 - 1]; /* 1 */
pBeginPaint BeginPaint; /* 16 */
pEndPaint EndPaint; /* 17 */
pSetBounds SetBounds; /* 18 */
pSynchronize Synchronize; /* 19 */
pDesktopResize DesktopResize; /* 20 */
pBitmapUpdate BitmapUpdate; /* 21 */
pPalette Palette; /* 22 */
pPlaySound PlaySound; /* 23 */
pSetKeyboardIndicators SetKeyboardIndicators; /* 24 */
pSetKeyboardImeStatus SetKeyboardImeStatus; /* 25 */
UINT32 paddingB[32 - 26]; /* 26 */
rdpPointerUpdate* pointer; /* 32 */
rdpPrimaryUpdate* primary; /* 33 */
rdpSecondaryUpdate* secondary; /* 34 */
rdpAltSecUpdate* altsec; /* 35 */
rdpWindowUpdate* window; /* 36 */
UINT32 paddingC[48 - 37]; /* 37 */
pRefreshRect RefreshRect; /* 48 */
pSuppressOutput SuppressOutput; /* 49 */
pRemoteMonitors RemoteMonitors; /* 50 */
UINT32 paddingD[64 - 51]; /* 51 */
pSurfaceCommand SurfaceCommand; /* 64 */
pSurfaceBits SurfaceBits; /* 65 */
pSurfaceFrameMarker SurfaceFrameMarker; /* 66 */
pSurfaceFrameBits SurfaceFrameBits; /* 67 */
pSurfaceFrameAcknowledge SurfaceFrameAcknowledge; /* 68 */
pSaveSessionInfo SaveSessionInfo; /* 69 */
pServerStatusInfo ServerStatusInfo; /* 70 */
/* if autoCalculateBitmapData is set to TRUE, the server automatically
* fills BITMAP_DATA struct members: flags, cbCompMainBodySize and cbCompFirstRowSize.
*/
BOOL autoCalculateBitmapData; /* 71 */
UINT32 paddingE[80 - 72]; /* 72 */
};
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct rdp_update rdpUpdate;
typedef struct
{
UINT32 destLeft;
UINT32 destTop;
UINT32 destRight;
UINT32 destBottom;
UINT32 width;
UINT32 height;
UINT32 bitsPerPixel;
UINT32 flags;
UINT32 bitmapLength;
UINT32 cbCompFirstRowSize;
UINT32 cbCompMainBodySize;
UINT32 cbScanWidth;
UINT32 cbUncompressedSize;
BYTE* bitmapDataStream;
BOOL compressed;
} BITMAP_DATA;
typedef struct
{
UINT32 number;
BITMAP_DATA* rectangles;
BOOL skipCompression;
} BITMAP_UPDATE;
/* Palette Updates */
typedef struct
{
UINT32 number;
PALETTE_ENTRY entries[256];
} PALETTE_UPDATE;
/* Play Sound (System Beep) Updates */
typedef struct
{
UINT32 duration;
UINT32 frequency;
} PLAY_SOUND_UPDATE;
/* Surface Command Updates */
typedef struct
{
UINT32 highUniqueId;
UINT32 lowUniqueId;
UINT64 tmMilliseconds;
UINT64 tmSeconds;
} TS_COMPRESSED_BITMAP_HEADER_EX;
typedef struct
{
BYTE bpp;
BYTE flags;
UINT16 codecID;
UINT16 width;
UINT16 height;
UINT32 bitmapDataLength;
TS_COMPRESSED_BITMAP_HEADER_EX exBitmapDataHeader;
BYTE* bitmapData;
} TS_BITMAP_DATA_EX;
enum SURFCMD_CMDTYPE
{
CMDTYPE_SET_SURFACE_BITS = 0x0001,
CMDTYPE_FRAME_MARKER = 0x0004,
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
};
typedef struct
{
UINT32 cmdType;
UINT32 destLeft;
UINT32 destTop;
UINT32 destRight;
UINT32 destBottom;
TS_BITMAP_DATA_EX bmp;
BOOL skipCompression;
} SURFACE_BITS_COMMAND;
typedef struct
{
UINT32 frameAction;
UINT32 frameId;
} SURFACE_FRAME_MARKER;
enum SURFCMD_FRAMEACTION
{
SURFACECMD_FRAMEACTION_BEGIN = 0x0000,
SURFACECMD_FRAMEACTION_END = 0x0001
};
/** @brief status code as in 2.2.5.2 Server Status Info PDU */
enum
{
TS_STATUS_FINDING_DESTINATION = 0x00000401,
TS_STATUS_LOADING_DESTINATION = 0x00000402,
TS_STATUS_BRINGING_SESSION_ONLINE = 0x00000403,
TS_STATUS_REDIRECTING_TO_DESTINATION = 0x00000404,
TS_STATUS_VM_LOADING = 0x00000501,
TS_STATUS_VM_WAKING = 0x00000502,
TS_STATUS_VM_STARTING = 0x00000503,
TS_STATUS_VM_STARTING_MONITORING = 0x00000504,
TS_STATUS_VM_RETRYING_MONITORING = 0x00000505
};
typedef struct
{
UINT32 frameId;
UINT32 commandCount;
SURFACE_BITS_COMMAND* commands;
} SURFACE_FRAME;
/* defined inside libfreerdp-core */
typedef struct rdp_update_proxy rdpUpdateProxy;
/* Update Interface */
typedef BOOL (*pBeginPaint)(rdpContext* context);
typedef BOOL (*pEndPaint)(rdpContext* context);
typedef BOOL (*pSetBounds)(rdpContext* context, const rdpBounds* bounds);
typedef BOOL (*pSynchronize)(rdpContext* context);
typedef BOOL (*pDesktopResize)(rdpContext* context);
typedef BOOL (*pBitmapUpdate)(rdpContext* context, const BITMAP_UPDATE* bitmap);
typedef BOOL (*pPalette)(rdpContext* context, const PALETTE_UPDATE* palette);
typedef BOOL (*pPlaySound)(rdpContext* context, const PLAY_SOUND_UPDATE* play_sound);
typedef BOOL (*pSetKeyboardIndicators)(rdpContext* context, UINT16 led_flags);
typedef BOOL (*pRefreshRect)(rdpContext* context, BYTE count, const RECTANGLE_16* areas);
typedef BOOL (*pSuppressOutput)(rdpContext* context, BYTE allow, const RECTANGLE_16* area);
typedef BOOL (*pRemoteMonitors)(rdpContext* context, UINT32 count, const MONITOR_DEF* monitors);
typedef BOOL (*pSurfaceCommand)(rdpContext* context, wStream* s);
typedef BOOL (*pSurfaceBits)(rdpContext* context,
const SURFACE_BITS_COMMAND* surfaceBitsCommand);
typedef BOOL (*pSurfaceFrameMarker)(rdpContext* context,
const SURFACE_FRAME_MARKER* surfaceFrameMarker);
typedef BOOL (*pSurfaceFrameBits)(rdpContext* context, const SURFACE_BITS_COMMAND* cmd,
BOOL first, BOOL last, UINT32 frameId);
typedef BOOL (*pSurfaceFrameAcknowledge)(rdpContext* context, UINT32 frameId);
typedef BOOL (*pSaveSessionInfo)(rdpContext* context, UINT32 type, void* data);
typedef BOOL (*pSetKeyboardImeStatus)(rdpContext* context, UINT16 imeId, UINT32 imeState,
UINT32 imeConvMode);
typedef BOOL (*pServerStatusInfo)(rdpContext* context, UINT32 status);
struct rdp_update
{
rdpContext* context; /* 0 */
UINT32 paddingA[16 - 1]; /* 1 */
pBeginPaint BeginPaint; /* 16 */
pEndPaint EndPaint; /* 17 */
pSetBounds SetBounds; /* 18 */
pSynchronize Synchronize; /* 19 */
pDesktopResize DesktopResize; /* 20 */
pBitmapUpdate BitmapUpdate; /* 21 */
pPalette Palette; /* 22 */
pPlaySound PlaySound; /* 23 */
pSetKeyboardIndicators SetKeyboardIndicators; /* 24 */
pSetKeyboardImeStatus SetKeyboardImeStatus; /* 25 */
UINT32 paddingB[32 - 26]; /* 26 */
rdpPointerUpdate* pointer; /* 32 */
rdpPrimaryUpdate* primary; /* 33 */
rdpSecondaryUpdate* secondary; /* 34 */
rdpAltSecUpdate* altsec; /* 35 */
rdpWindowUpdate* window; /* 36 */
UINT32 paddingC[48 - 37]; /* 37 */
pRefreshRect RefreshRect; /* 48 */
pSuppressOutput SuppressOutput; /* 49 */
pRemoteMonitors RemoteMonitors; /* 50 */
UINT32 paddingD[64 - 51]; /* 51 */
pSurfaceCommand SurfaceCommand; /* 64 */
pSurfaceBits SurfaceBits; /* 65 */
pSurfaceFrameMarker SurfaceFrameMarker; /* 66 */
pSurfaceFrameBits SurfaceFrameBits; /* 67 */
pSurfaceFrameAcknowledge SurfaceFrameAcknowledge; /* 68 */
pSaveSessionInfo SaveSessionInfo; /* 69 */
pServerStatusInfo ServerStatusInfo; /* 70 */
/* if autoCalculateBitmapData is set to TRUE, the server automatically
* fills BITMAP_DATA struct members: flags, cbCompMainBodySize and cbCompFirstRowSize.
*/
BOOL autoCalculateBitmapData; /* 71 */
UINT32 paddingE[80 - 72]; /* 72 */
};
FREERDP_API void rdp_update_lock(rdpUpdate* update); FREERDP_API void rdp_update_lock(rdpUpdate* update);
FREERDP_API void rdp_update_unlock(rdpUpdate* update); FREERDP_API void rdp_update_unlock(rdpUpdate* update);

View File

@ -23,46 +23,46 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct
{
UINT32 magic_number; /* magic number */
UINT16 version_major; /* major version number */
UINT16 version_minor; /* minor version number */
INT32 thiszone; /* GMT to local correction */
UINT32 sigfigs; /* accuracy of timestamps */
UINT32 snaplen; /* max length of captured packets, in octets */
UINT32 network; /* data link type */
} pcap_header;
typedef struct
{
UINT32 ts_sec; /* timestamp seconds */
UINT32 ts_usec; /* timestamp microseconds */
UINT32 incl_len; /* number of octets of packet saved in file */
UINT32 orig_len; /* actual length of packet */
} pcap_record_header;
typedef struct s_pcap_record pcap_record;
struct s_pcap_record
{
pcap_record_header header;
union
{
void* data;
const void* cdata;
};
UINT32 length;
pcap_record* next;
};
typedef struct rdp_pcap rdpPcap;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct
{
UINT32 magic_number; /* magic number */
UINT16 version_major; /* major version number */
UINT16 version_minor; /* minor version number */
INT32 thiszone; /* GMT to local correction */
UINT32 sigfigs; /* accuracy of timestamps */
UINT32 snaplen; /* max length of captured packets, in octets */
UINT32 network; /* data link type */
} pcap_header;
typedef struct
{
UINT32 ts_sec; /* timestamp seconds */
UINT32 ts_usec; /* timestamp microseconds */
UINT32 incl_len; /* number of octets of packet saved in file */
UINT32 orig_len; /* actual length of packet */
} pcap_record_header;
typedef struct s_pcap_record pcap_record;
struct s_pcap_record
{
pcap_record_header header;
union
{
void* data;
const void* cdata;
};
UINT32 length;
pcap_record* next;
};
typedef struct rdp_pcap rdpPcap;
FREERDP_API rdpPcap* pcap_open(const char* name, BOOL write); FREERDP_API rdpPcap* pcap_open(const char* name, BOOL write);
FREERDP_API void pcap_close(rdpPcap* pcap); FREERDP_API void pcap_close(rdpPcap* pcap);

View File

@ -22,6 +22,11 @@
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#include <winpr/assert.h> #include <winpr/assert.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define POD_ARRAYS_IMPL(T, TLOWER) \ #define POD_ARRAYS_IMPL(T, TLOWER) \
typedef struct \ typedef struct \
{ \ { \
@ -124,11 +129,6 @@
a->nvalues = 0; \ a->nvalues = 0; \
} }
#ifdef __cplusplus
extern "C"
{
#endif
POD_ARRAYS_IMPL(UINT16, uint16) POD_ARRAYS_IMPL(UINT16, uint16)
POD_ARRAYS_IMPL(UINT32, uint32) POD_ARRAYS_IMPL(UINT32, uint32)
POD_ARRAYS_IMPL(UINT64, uint64) POD_ARRAYS_IMPL(UINT64, uint64)

View File

@ -23,13 +23,13 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/utils/stopwatch.h> #include <freerdp/utils/stopwatch.h>
typedef struct S_PROFILER PROFILER;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct S_PROFILER PROFILER;
FREERDP_API PROFILER* profiler_create(const char* name); FREERDP_API PROFILER* profiler_create(const char* name);
FREERDP_API void profiler_free(PROFILER* profiler); FREERDP_API void profiler_free(PROFILER* profiler);
@ -40,10 +40,6 @@ extern "C"
FREERDP_API void profiler_print(PROFILER* profiler); FREERDP_API void profiler_print(PROFILER* profiler);
FREERDP_API void profiler_print_footer(void); FREERDP_API void profiler_print_footer(void);
#ifdef __cplusplus
}
#endif
#ifdef WITH_PROFILER #ifdef WITH_PROFILER
#define PROFILER_RENAME(prof, name) \ #define PROFILER_RENAME(prof, name) \
do \ do \
@ -96,4 +92,8 @@ extern "C"
} while (0); } while (0);
#endif #endif
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_UTILS_PROFILER_H */ #endif /* FREERDP_UTILS_PROFILER_H */

View File

@ -23,29 +23,29 @@
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#include <freerdp/api.h> #include <freerdp/api.h>
/** @brief ring buffer meta data */
typedef struct
{
size_t initialSize;
size_t freeSize;
size_t size;
size_t readPtr;
size_t writePtr;
BYTE* buffer;
} RingBuffer;
/** @brief a piece of data in the ring buffer, exactly like a glibc iovec */
typedef struct
{
size_t size;
const BYTE* data;
} DataChunk;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** @brief ring buffer meta data */
typedef struct
{
size_t initialSize;
size_t freeSize;
size_t size;
size_t readPtr;
size_t writePtr;
BYTE* buffer;
} RingBuffer;
/** @brief a piece of data in the ring buffer, exactly like a glibc iovec */
typedef struct
{
size_t size;
const BYTE* data;
} DataChunk;
/** /**
* initialise a ringbuffer * initialise a ringbuffer
* *

View File

@ -23,11 +23,6 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#ifndef _WIN32
#include <signal.h>
#include <termios.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {

View File

@ -31,12 +31,13 @@
#include <freerdp/channels/scard.h> #include <freerdp/channels/scard.h>
#include <freerdp/utils/smartcard_operations.h> #include <freerdp/utils/smartcard_operations.h>
typedef struct s_scard_call_context scard_call_context;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct s_scard_call_context scard_call_context;
FREERDP_API scard_call_context* smartcard_call_context_new(const rdpSettings* settings); FREERDP_API scard_call_context* smartcard_call_context_new(const rdpSettings* settings);
FREERDP_API void smartcard_call_context_free(scard_call_context* ctx); FREERDP_API void smartcard_call_context_free(scard_call_context* ctx);
FREERDP_API BOOL smartcard_call_context_signal_stop(scard_call_context* ctx, BOOL reset); FREERDP_API BOOL smartcard_call_context_signal_stop(scard_call_context* ctx, BOOL reset);

View File

@ -16,8 +16,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#ifndef LIBFREERDP_CORE_SMARTCARDLOGON_H #ifndef FREERDP_UTILS_SMARTCARDLOGON_H
#define LIBFREERDP_CORE_SMARTCARDLOGON_H #define FREERDP_UTILS_SMARTCARDLOGON_H
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#include <freerdp/settings.h> #include <freerdp/settings.h>
@ -59,4 +59,4 @@ extern "C"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* LIBFREERDP_CORE_SMARTCARDLOGON_H */ #endif /* FREERDP_UTILS_SMARTCARDLOGON_H */

View File

@ -23,19 +23,19 @@
#include <freerdp/api.h> #include <freerdp/api.h>
#include <freerdp/types.h> #include <freerdp/types.h>
typedef struct
{
UINT64 start;
UINT64 end;
UINT64 elapsed;
UINT32 count;
} STOPWATCH;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
typedef struct
{
UINT64 start;
UINT64 end;
UINT64 elapsed;
UINT32 count;
} STOPWATCH;
FREERDP_API STOPWATCH* stopwatch_create(void); FREERDP_API STOPWATCH* stopwatch_create(void);
FREERDP_API void stopwatch_free(STOPWATCH* stopwatch); FREERDP_API void stopwatch_free(STOPWATCH* stopwatch);

Some files were not shown because too many files have changed in this diff Show More