20 #ifndef FREERDP_UPDATE_H
21 #define FREERDP_UPDATE_H
23 #include <winpr/crt.h>
24 #include <winpr/wlog.h>
25 #include <winpr/synch.h>
26 #include <winpr/thread.h>
27 #include <winpr/stream.h>
28 #include <winpr/collections.h>
30 #include <freerdp/rail.h>
31 #include <freerdp/types.h>
32 #include <freerdp/settings.h>
33 #include <freerdp/graphics.h>
34 #include <freerdp/utils/pcap.h>
36 #include <freerdp/primary.h>
37 #include <freerdp/secondary.h>
38 #include <freerdp/altsec.h>
39 #include <freerdp/window.h>
40 #include <freerdp/pointer.h>
43 #define EX_COMPRESSED_BITMAP_HEADER_PRESENT 0x01
63 UINT32 cbCompFirstRowSize;
64 UINT32 cbCompMainBodySize;
66 UINT32 cbUncompressedSize;
67 BYTE* bitmapDataStream;
99 UINT64 tmMilliseconds;
110 UINT32 bitmapDataLength;
117 CMDTYPE_SET_SURFACE_BITS = 0x0001,
118 CMDTYPE_FRAME_MARKER = 0x0004,
119 CMDTYPE_STREAM_SURFACE_BITS = 0x0006
130 BOOL skipCompression;
139 enum SURFCMD_FRAMEACTION
141 SURFACECMD_FRAMEACTION_BEGIN = 0x0000,
142 SURFACECMD_FRAMEACTION_END = 0x0001
148 TS_STATUS_FINDING_DESTINATION = 0x00000401,
149 TS_STATUS_LOADING_DESTINATION = 0x00000402,
150 TS_STATUS_BRINGING_SESSION_ONLINE = 0x00000403,
151 TS_STATUS_REDIRECTING_TO_DESTINATION = 0x00000404,
152 TS_STATUS_VM_LOADING = 0x00000501,
153 TS_STATUS_VM_WAKING = 0x00000502,
154 TS_STATUS_VM_STARTING = 0x00000503,
155 TS_STATUS_VM_STARTING_MONITORING = 0x00000504,
156 TS_STATUS_VM_RETRYING_MONITORING = 0x00000505
171 typedef BOOL (*pBeginPaint)(rdpContext* context);
172 typedef BOOL (*pEndPaint)(rdpContext* context);
173 typedef BOOL (*pSetBounds)(rdpContext* context,
const rdpBounds* bounds);
175 typedef BOOL (*pSynchronize)(rdpContext* context);
176 typedef BOOL (*pDesktopResize)(rdpContext* context);
177 typedef BOOL (*pBitmapUpdate)(rdpContext* context,
const BITMAP_UPDATE* bitmap);
178 typedef BOOL (*pPalette)(rdpContext* context,
const PALETTE_UPDATE* palette);
179 typedef BOOL (*pPlaySound)(rdpContext* context,
const PLAY_SOUND_UPDATE* play_sound);
180 typedef BOOL (*pSetKeyboardIndicators)(rdpContext* context, UINT16 led_flags);
182 typedef BOOL (*pRefreshRect)(rdpContext* context, BYTE count,
const RECTANGLE_16* areas);
183 typedef BOOL (*pSuppressOutput)(rdpContext* context, BYTE allow,
const RECTANGLE_16* area);
184 typedef BOOL (*pRemoteMonitors)(rdpContext* context, UINT32 count,
const MONITOR_DEF* monitors);
186 typedef BOOL (*pSurfaceCommand)(rdpContext* context,
wStream* s);
187 typedef BOOL (*pSurfaceBits)(rdpContext* context,
189 typedef BOOL (*pSurfaceFrameMarker)(rdpContext* context,
192 BOOL first, BOOL last, UINT32 frameId);
193 typedef BOOL (*pSurfaceFrameAcknowledge)(rdpContext* context, UINT32 frameId);
195 typedef BOOL (*pSaveSessionInfo)(rdpContext* context, UINT32 type,
void* data);
196 typedef BOOL (*pSetKeyboardImeStatus)(rdpContext* context, UINT16 imeId, UINT32 imeState,
198 typedef BOOL (*pServerStatusInfo)(rdpContext* context, UINT32 status);
203 UINT32 paddingA[16 - 1];
205 pBeginPaint BeginPaint;
207 pSetBounds SetBounds;
208 pSynchronize Synchronize;
209 pDesktopResize DesktopResize;
210 pBitmapUpdate BitmapUpdate;
212 pPlaySound PlaySound;
213 pSetKeyboardIndicators SetKeyboardIndicators;
214 pSetKeyboardImeStatus SetKeyboardImeStatus;
215 UINT32 paddingB[32 - 26];
217 rdpPointerUpdate* pointer;
218 rdpPrimaryUpdate* primary;
219 rdpSecondaryUpdate* secondary;
220 rdpAltSecUpdate* altsec;
221 rdpWindowUpdate* window;
222 UINT32 paddingC[48 - 37];
224 pRefreshRect RefreshRect;
225 pSuppressOutput SuppressOutput;
226 pRemoteMonitors RemoteMonitors;
227 UINT32 paddingD[64 - 51];
229 pSurfaceCommand SurfaceCommand;
230 pSurfaceBits SurfaceBits;
231 pSurfaceFrameMarker SurfaceFrameMarker;
232 pSurfaceFrameBits SurfaceFrameBits;
233 pSurfaceFrameAcknowledge SurfaceFrameAcknowledge;
234 pSaveSessionInfo SaveSessionInfo;
235 pServerStatusInfo ServerStatusInfo;
239 BOOL autoCalculateBitmapData;
240 UINT32 paddingE[80 - 72];
243 FREERDP_API
void rdp_update_lock(rdpUpdate* update);
244 FREERDP_API
void rdp_update_unlock(rdpUpdate* update);