FreeRDP
rail_common.h
1 
24 #ifndef FREERDP_CHANNEL_RAIL_COMMON_H
25 #define FREERDP_CHANNEL_RAIL_COMMON_H
26 
27 #include <freerdp/rail.h>
28 
29 #define RAIL_PDU_HEADER_LENGTH 4
30 
31 /* Fixed length of PDUs, excluding variable lengths */
32 #define RAIL_HANDSHAKE_ORDER_LENGTH 4 /* fixed */
33 #define RAIL_HANDSHAKE_EX_ORDER_LENGTH 8 /* fixed */
34 #define RAIL_CLIENT_STATUS_ORDER_LENGTH 4 /* fixed */
35 #define RAIL_EXEC_ORDER_LENGTH 8 /* variable */
36 #define RAIL_EXEC_RESULT_ORDER_LENGTH 12 /* variable */
37 #define RAIL_SYSPARAM_ORDER_LENGTH 4 /* variable */
38 #define RAIL_MINMAXINFO_ORDER_LENGTH 20 /* fixed */
39 #define RAIL_LOCALMOVESIZE_ORDER_LENGTH 12 /* fixed */
40 #define RAIL_ACTIVATE_ORDER_LENGTH 5 /* fixed */
41 #define RAIL_SYSMENU_ORDER_LENGTH 8 /* fixed */
42 #define RAIL_SYSCOMMAND_ORDER_LENGTH 6 /* fixed */
43 #define RAIL_NOTIFY_EVENT_ORDER_LENGTH 12 /* fixed */
44 #define RAIL_WINDOW_MOVE_ORDER_LENGTH 12 /* fixed */
45 #define RAIL_SNAP_ARRANGE_ORDER_LENGTH 12 /* fixed */
46 #define RAIL_GET_APPID_REQ_ORDER_LENGTH 4 /* fixed */
47 #define RAIL_LANGBAR_INFO_ORDER_LENGTH 4 /* fixed */
48 #define RAIL_LANGUAGEIME_INFO_ORDER_LENGTH 42 /* fixed */
49 #define RAIL_COMPARTMENT_INFO_ORDER_LENGTH 16 /* fixed */
50 #define RAIL_CLOAK_ORDER_LENGTH 5 /* fixed */
51 #define RAIL_TASKBAR_INFO_ORDER_LENGTH 12 /* fixed */
52 #define RAIL_Z_ORDER_SYNC_ORDER_LENGTH 4 /* fixed */
53 #define RAIL_POWER_DISPLAY_REQUEST_ORDER_LENGTH 4 /* fixed */
54 #define RAIL_GET_APPID_RESP_ORDER_LENGTH 524 /* fixed */
55 #define RAIL_GET_APPID_RESP_EX_ORDER_LENGTH 1048 /* fixed */
56 
57 UINT rail_read_handshake_order(wStream* s, RAIL_HANDSHAKE_ORDER* handshake);
58 void rail_write_handshake_order(wStream* s, const RAIL_HANDSHAKE_ORDER* handshake);
59 UINT rail_read_handshake_ex_order(wStream* s, RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
60 void rail_write_handshake_ex_order(wStream* s, const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
61 
62 wStream* rail_pdu_init(size_t length);
63 UINT rail_read_pdu_header(wStream* s, UINT16* orderType, UINT16* orderLength);
64 void rail_write_pdu_header(wStream* s, UINT16 orderType, UINT16 orderLength);
65 
66 UINT rail_write_unicode_string(wStream* s, const RAIL_UNICODE_STRING* unicode_string);
67 UINT rail_write_unicode_string_value(wStream* s, const RAIL_UNICODE_STRING* unicode_string);
68 
69 UINT rail_read_sysparam_order(wStream* s, RAIL_SYSPARAM_ORDER* sysparam, BOOL extendedSpiSupported);
70 UINT rail_write_sysparam_order(wStream* s, const RAIL_SYSPARAM_ORDER* sysparam,
71  BOOL extendedSpiSupported);
72 BOOL rail_is_extended_spi_supported(UINT32 channelFlags);
73 const char* rail_get_order_type_string(UINT16 orderType);
74 const char* rail_get_order_type_string_full(UINT16 orderType, char* buffer, size_t length);
75 
76 #endif /* FREERDP_CHANNEL_RAIL_COMMON_H */