FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
server/rdpgfx.h
1
20#ifndef FREERDP_CHANNEL_RDPGFX_SERVER_RDPGFX_H
21#define FREERDP_CHANNEL_RDPGFX_SERVER_RDPGFX_H
22
23#include <freerdp/channels/rdpgfx.h>
24#include <freerdp/types.h>
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif
30
31 typedef struct s_rdpgfx_server_context RdpgfxServerContext;
32 typedef struct s_rdpgfx_server_private RdpgfxServerPrivate;
33
34 typedef BOOL (*psRdpgfxServerOpen)(RdpgfxServerContext* context);
35 typedef BOOL (*psRdpgfxServerClose)(RdpgfxServerContext* context);
36
37 typedef BOOL (*psRdpgfxServerChannelIdAssigned)(RdpgfxServerContext* context, UINT32 channelId);
38
39 typedef BOOL (*psRdpgfxServerInitialize)(RdpgfxServerContext* context, BOOL externalThread);
40
41 typedef UINT (*psRdpgfxResetGraphics)(RdpgfxServerContext* context,
42 const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
43 typedef UINT (*psRdpgfxStartFrame)(RdpgfxServerContext* context,
44 const RDPGFX_START_FRAME_PDU* startFrame);
45 typedef UINT (*psRdpgfxEndFrame)(RdpgfxServerContext* context,
46 const RDPGFX_END_FRAME_PDU* endFrame);
47 typedef UINT (*psRdpgfxSurfaceCommand)(RdpgfxServerContext* context,
48 const RDPGFX_SURFACE_COMMAND* cmd);
49 typedef UINT (*psRdpgfxSurfaceFrameCommand)(RdpgfxServerContext* context,
50 const RDPGFX_SURFACE_COMMAND* cmd,
51 const RDPGFX_START_FRAME_PDU* startFrame,
52 const RDPGFX_END_FRAME_PDU* endFrame);
53 typedef UINT (*psRdpgfxDeleteEncodingContext)(
54 RdpgfxServerContext* context,
55 const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
56 typedef UINT (*psRdpgfxCreateSurface)(RdpgfxServerContext* context,
57 const RDPGFX_CREATE_SURFACE_PDU* createSurface);
58 typedef UINT (*psRdpgfxDeleteSurface)(RdpgfxServerContext* context,
59 const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
60 typedef UINT (*psRdpgfxSolidFill)(RdpgfxServerContext* context,
61 const RDPGFX_SOLID_FILL_PDU* solidFill);
62 typedef UINT (*psRdpgfxSurfaceToSurface)(RdpgfxServerContext* context,
63 const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
64 typedef UINT (*psRdpgfxSurfaceToCache)(RdpgfxServerContext* context,
65 const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
66 typedef UINT (*psRdpgfxCacheToSurface)(RdpgfxServerContext* context,
67 const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
68 typedef UINT (*psRdpgfxCacheImportOffer)(RdpgfxServerContext* context,
69 const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
70 typedef UINT (*psRdpgfxCacheImportReply)(RdpgfxServerContext* context,
71 const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
72 typedef UINT (*psRdpgfxEvictCacheEntry)(RdpgfxServerContext* context,
73 const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
74 typedef UINT (*psRdpgfxMapSurfaceToOutput)(
75 RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
76 typedef UINT (*psRdpgfxMapSurfaceToWindow)(
77 RdpgfxServerContext* context, const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
78 typedef UINT (*psRdpgfxMapSurfaceToScaledOutput)(
79 RdpgfxServerContext* context,
80 const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
81 typedef UINT (*psRdpgfxMapSurfaceToScaledWindow)(
82 RdpgfxServerContext* context,
83 const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
84 typedef UINT (*psRdpgfxCapsAdvertise)(RdpgfxServerContext* context,
85 const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
86 typedef UINT (*psRdpgfxCapsConfirm)(RdpgfxServerContext* context,
87 const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
88 typedef UINT (*psRdpgfxFrameAcknowledge)(RdpgfxServerContext* context,
89 const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
90 typedef UINT (*psRdpgfxQoeFrameAcknowledge)(
91 RdpgfxServerContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
92
94 {
95 HANDLE vcm;
96 void* custom;
97
98 psRdpgfxServerOpen Open;
99 psRdpgfxServerClose Close;
100
101 psRdpgfxResetGraphics ResetGraphics;
102 psRdpgfxStartFrame StartFrame;
103 psRdpgfxEndFrame EndFrame;
104 psRdpgfxSurfaceCommand SurfaceCommand;
105 psRdpgfxSurfaceFrameCommand SurfaceFrameCommand;
106 psRdpgfxDeleteEncodingContext DeleteEncodingContext;
107 psRdpgfxCreateSurface CreateSurface;
108 psRdpgfxDeleteSurface DeleteSurface;
109 psRdpgfxSolidFill SolidFill;
110 psRdpgfxSurfaceToSurface SurfaceToSurface;
111 psRdpgfxSurfaceToCache SurfaceToCache;
112 psRdpgfxCacheToSurface CacheToSurface;
113 psRdpgfxCacheImportOffer CacheImportOffer;
114 psRdpgfxCacheImportReply CacheImportReply;
115 psRdpgfxEvictCacheEntry EvictCacheEntry;
116 psRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
117 psRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
118 psRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
119 psRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
120 psRdpgfxCapsAdvertise CapsAdvertise;
121 psRdpgfxCapsConfirm CapsConfirm;
122 psRdpgfxFrameAcknowledge FrameAcknowledge;
123 psRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
124
125 RdpgfxServerPrivate* priv;
126 rdpContext* rdpcontext;
127
131 psRdpgfxServerChannelIdAssigned ChannelIdAssigned;
139 psRdpgfxServerInitialize Initialize;
140 };
141
142 FREERDP_API void rdpgfx_server_context_free(RdpgfxServerContext* context);
143
144 WINPR_ATTR_MALLOC(rdpgfx_server_context_free, 1)
145 FREERDP_API RdpgfxServerContext* rdpgfx_server_context_new(HANDLE vcm);
146
147 FREERDP_API BOOL rdpgfx_server_set_own_thread(RdpgfxServerContext* context,
148 BOOL internalThread);
149 FREERDP_API HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context);
150 FREERDP_API UINT rdpgfx_server_handle_messages(RdpgfxServerContext* context);
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif /* FREERDP_CHANNEL_RDPGFX_SERVER_RDPGFX_H */
psRdpgfxServerChannelIdAssigned ChannelIdAssigned
psRdpgfxServerInitialize Initialize