2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2009-2011 Jay Sorg
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #ifndef __RDP_SETTINGS_H
21 #define __RDP_SETTINGS_H
23 #include <freerdp/types.h>
24 #include <freerdp/utils/blob.h>
25 #include <freerdp/utils/unicode.h>
27 /* Performance Flags */
28 #define PERF_FLAG_NONE 0x00000000
29 #define PERF_DISABLE_WALLPAPER 0x00000001
30 #define PERF_DISABLE_FULLWINDOWDRAG 0x00000002
31 #define PERF_DISABLE_MENUANIMATIONS 0x00000004
32 #define PERF_DISABLE_THEMING 0x00000008
33 #define PERF_DISABLE_CURSOR_SHADOW 0x00000020
34 #define PERF_DISABLE_CURSORSETTINGS 0x00000040
35 #define PERF_ENABLE_FONT_SMOOTHING 0x00000080
36 #define PERF_ENABLE_DESKTOP_COMPOSITION 0x00000100
38 /* Connection Types */
39 #define CONNECTION_TYPE_MODEM 0x01
40 #define CONNECTION_TYPE_BROADBAND_LOW 0x02
41 #define CONNECTION_TYPE_SATELLITE 0x03
42 #define CONNECTION_TYPE_BROADBAND_HIGH 0x04
43 #define CONNECTION_TYPE_WAN 0x05
44 #define CONNECTION_TYPE_LAN 0x06
46 /* Encryption Methods */
47 #define ENCRYPTION_METHOD_NONE 0x00000000
48 #define ENCRYPTION_METHOD_40BIT 0x00000001
49 #define ENCRYPTION_METHOD_128BIT 0x00000002
50 #define ENCRYPTION_METHOD_56BIT 0x00000008
51 #define ENCRYPTION_METHOD_FIPS 0x00000010
53 /* Encryption Levels */
54 #define ENCRYPTION_LEVEL_NONE 0x00000000
55 #define ENCRYPTION_LEVEL_LOW 0x00000001
56 #define ENCRYPTION_LEVEL_CLIENT_COMPATIBLE 0x00000002
57 #define ENCRYPTION_LEVEL_HIGH 0x00000003
58 #define ENCRYPTION_LEVEL_FIPS 0x00000004
60 /* Auto Reconnect Version */
61 #define AUTO_RECONNECT_VERSION_1 0x00000001
64 #define NEG_DSTBLT_INDEX 0x00
65 #define NEG_PATBLT_INDEX 0x01
66 #define NEG_SCRBLT_INDEX 0x02
67 #define NEG_MEMBLT_INDEX 0x03
68 #define NEG_MEM3BLT_INDEX 0x04
69 #define NEG_ATEXTOUT_INDEX 0x05
70 #define NEG_AEXTTEXTOUT_INDEX 0x06
71 #define NEG_DRAWNINEGRID_INDEX 0x07
72 #define NEG_LINETO_INDEX 0x08
73 #define NEG_MULTI_DRAWNINEGRID_INDEX 0x09
74 #define NEG_OPAQUE_RECT_INDEX 0x0A
75 #define NEG_SAVEBITMAP_INDEX 0x0B
76 #define NEG_WTEXTOUT_INDEX 0x0C
77 #define NEG_MEMBLT_V2_INDEX 0x0D
78 #define NEG_MEM3BLT_V2_INDEX 0x0E
79 #define NEG_MULTIDSTBLT_INDEX 0x0F
80 #define NEG_MULTIPATBLT_INDEX 0x10
81 #define NEG_MULTISCRBLT_INDEX 0x11
82 #define NEG_MULTIOPAQUERECT_INDEX 0x12
83 #define NEG_FAST_INDEX_INDEX 0x13
84 #define NEG_POLYGON_SC_INDEX 0x14
85 #define NEG_POLYGON_CB_INDEX 0x15
86 #define NEG_POLYLINE_INDEX 0x16
87 #define NEG_FAST_GLYPH_INDEX 0x18
88 #define NEG_ELLIPSE_SC_INDEX 0x19
89 #define NEG_ELLIPSE_CB_INDEX 0x1A
90 #define NEG_GLYPH_INDEX_INDEX 0x1B
91 #define NEG_GLYPH_WEXTTEXTOUT_INDEX 0x1C
92 #define NEG_GLYPH_WLONGTEXTOUT_INDEX 0x1D
93 #define NEG_GLYPH_WLONGEXTTEXTOUT_INDEX 0x1E
95 /* Glyph Support Level */
96 #define GLYPH_SUPPORT_NONE 0x0000
97 #define GLYPH_SUPPORT_PARTIAL 0x0001
98 #define GLYPH_SUPPORT_FULL 0x0002
99 #define GLYPH_SUPPORT_ENCODE 0x0003
111 uint16 wMilliseconds;
114 /* TIME_ZONE_INFORMATION */
115 struct _TIME_ZONE_INFO
118 char standardName[32];
119 SYSTEM_TIME standardDate;
121 char daylightName[32];
122 SYSTEM_TIME daylightDate;
125 typedef struct _TIME_ZONE_INFO TIME_ZONE_INFO;
127 /* ARC_CS_PRIVATE_PACKET */
133 uint8 securityVerifier[16];
134 } ARC_CS_PRIVATE_PACKET;
136 /* ARC_SC_PRIVATE_PACKET */
142 uint8 arcRandomBits[16];
143 } ARC_SC_PRIVATE_PACKET;
147 typedef struct rdp_certificate rdpCertificate;
148 typedef struct rdp_key rdpKey;
155 typedef struct rdp_CertBlob rdpCertBlob;
157 struct rdp_X509CertChain
162 typedef struct rdp_X509CertChain rdpX509CertChain;
169 typedef struct rdp_CertInfo rdpCertInfo;
171 struct rdp_certificate
173 rdpCertInfo cert_info;
174 rdpX509CertChain* x509_cert_chain;
181 char name[8]; /* ui sets */
182 int options; /* ui sets */
183 int channel_id; /* core sets */
184 boolean joined; /* client has joined the channel */
185 void* handle; /* just for ui */
187 typedef struct rdp_channel rdpChannel;
193 char name[256]; /* plugin name or path */
194 void* data; /* plugin data */
199 struct _BITMAP_CACHE_CELL_INFO
204 typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO;
206 struct _BITMAP_CACHE_V2_CELL_INFO
211 typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO;
215 struct _GLYPH_CACHE_DEFINITION
218 uint16 cacheMaximumCellSize;
220 typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION;
237 void* instance; /* 0 */
238 uint32 paddingA[16 - 1]; /* 1 */
240 /* Core Protocol Parameters */
241 uint32 width; /* 16 */
242 uint32 height; /* 17 */
243 uint32 rdp_version; /* 18 */
244 uint32 color_depth; /* 19 */
245 uint32 kbd_layout; /* 20 */
246 uint32 kbd_type; /* 21 */
247 uint32 kbd_subtype; /* 22 */
248 uint32 kbd_fn_keys; /* 23 */
249 uint32 client_build; /* 24 */
250 uint32 requested_protocols; /* 25 */
251 uint32 selected_protocol; /* 26 */
252 uint32 encryption_method; /* 27 */
253 uint32 encryption_level; /* 28 */
254 boolean authentication; /* 29 */
255 uint32 negotiationFlags; /* 30 */
256 uint32 paddingB[48 - 31]; /* 31 */
258 /* Connection Settings */
259 uint32 port; /* 48 */
260 boolean ipv6; /* 49 */
261 char* hostname; /* 50 */
262 char* username; /* 51 */
263 char* password; /* 52 */
264 char* domain; /* 53 */
265 char* shell; /* 54 */
266 char* directory; /* 55 */
267 char* ip_address; /* 56 */
268 char* client_dir; /* 57 */
269 boolean autologon; /* 58 */
270 boolean compression; /* 59 */
271 uint32 performance_flags; /* 60 */
272 rdpBlob* password_cookie; /* 61 */
273 uint32 paddingC[80 - 62]; /* 62 */
275 /* User Interface Parameters */
276 boolean sw_gdi; /* 80 */
277 boolean workarea; /* 81 */
278 boolean fullscreen; /* 82 */
279 boolean grab_keyboard; /* 83 */
280 boolean decorations; /* 84 */
281 uint32 percent_screen; /* 85 */
282 boolean mouse_motion; /* 86 */
283 char* window_title; /* 87 */
284 uint64 parent_window_xid; /* 88 */
285 uint32 paddingD[112 - 89]; /* 89 */
287 /* Internal Parameters */
288 char* home_path; /* 112 */
289 uint32 share_id; /* 113 */
290 uint32 pdu_source; /* 114 */
291 UNICONV* uniconv; /* 115 */
292 boolean server_mode; /* 116 */
293 char* config_path; /* 117 */
294 char* current_path; /* 118 */
295 char* development_path; /* 119 */
296 boolean development_mode; /* 120 */
297 uint32 paddingE[144 - 121]; /* 121 */
300 boolean encryption; /* 144 */
301 boolean tls_security; /* 145 */
302 boolean nla_security; /* 146 */
303 boolean rdp_security; /* 147 */
304 uint32 ntlm_version; /* 148 */
305 boolean secure_checksum; /* 149 */
306 uint32 paddingF[160 - 150]; /* 150 */
309 boolean console_audio; /* 160 */
310 boolean console_session; /* 161 */
311 uint32 redirected_session_id; /* 162 */
312 uint32 paddingG[176 - 163]; /* 163 */
315 boolean refresh_rect; /* 176 */
316 boolean suppress_output; /* 177 */
317 boolean desktop_resize; /* 178 */
318 uint32 paddingH[192 - 179]; /* 179 */
321 boolean auto_reconnection; /* 192 */
322 ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */
323 ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */
324 uint32 paddingI[208 - 195]; /* 195 */
327 TIME_ZONE_INFO* client_time_zone; /* 208 */
328 uint32 paddingJ[216 - 209]; /* 209 */
331 uint32 os_major_type; /* 216 */
332 uint32 os_minor_type; /* 217 */
333 uint32 vc_chunk_size; /* 218 */
334 boolean sound_beeps; /* 219 */
335 boolean smooth_fonts; /* 220 */
336 boolean frame_marker; /* 221 */
337 boolean fastpath_input; /* 222 */
338 boolean fastpath_output; /* 223 */
339 uint8 received_caps[32]; /* 224 (8) */
340 uint8 order_support[32]; /* 232 (8) */
341 boolean surface_commands; /* 240 */
342 boolean disable_wallpaper; /* 241 */
343 boolean disable_full_window_drag; /* 242 */
344 boolean disable_menu_animations; /* 243 */
345 boolean disable_theming; /* 244 */
346 uint32 connection_type; /* 245 */
347 uint32 multifrag_max_request_size; /* 246 */
348 uint32 paddingK[248 - 247]; /* 247 */
351 char* cert_file; /* 248 */
352 char* privatekey_file; /* 249 */
353 char client_hostname[32]; /* 250 (8) */
354 char client_product_id[32]; /* 258 (8) */
355 rdpBlob* server_random; /* 266 */
356 rdpBlob* server_certificate; /* 267 */
357 boolean ignore_certificate; /* 268 */
358 rdpCertificate* server_cert; /* 269 */
359 char* rdp_key_file; /* 270 */
360 rdpKey* server_key; /* 271 */
361 char* certificate_name; /* 272 */
362 uint32 paddingL[280 - 273]; /* 273 */
365 boolean rfx_codec; /* 280 */
366 boolean ns_codec; /* 281 */
367 uint32 rfx_codec_id; /* 282 */
368 uint32 ns_codec_id; /* 283 */
369 uint32 rfx_codec_mode; /* 284 */
370 boolean frame_acknowledge; /* 285 */
371 uint32 paddingM[296 - 286]; /* 286 */
374 boolean dump_rfx; /* 296 */
375 boolean play_rfx; /* 297 */
376 char* dump_rfx_file; /* 298 */
377 char* play_rfx_file; /* 299 */
378 uint32 paddingN[312 - 300]; /* 300 */
381 boolean remote_app; /* 312 */
382 uint32 num_icon_caches; /* 313 */
383 uint32 num_icon_cache_entries; /* 314 */
384 boolean rail_langbar_supported; /* 315 */
385 uint32 paddingO[320 - 316]; /* 316 */
388 boolean large_pointer; /* 320 */
389 boolean color_pointer; /* 321 */
390 uint32 pointer_cache_size; /* 322 */
391 uint32 paddingP[328 - 323]; /* 323 */
394 boolean bitmap_cache; /* 328 */
395 boolean bitmap_cache_v3; /* 329 */
396 boolean persistent_bitmap_cache; /* 330 */
397 uint32 bitmapCacheV2NumCells; /* 331 */
398 BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */
399 uint32 paddingQ[344 - 333]; /* 333 */
401 /* Offscreen Bitmap Cache */
402 boolean offscreen_bitmap_cache; /* 344 */
403 uint32 offscreen_bitmap_cache_size; /* 345 */
404 uint32 offscreen_bitmap_cache_entries; /* 346 */
405 uint32 paddingR[352 - 347]; /* 347 */
408 boolean glyph_cache; /* 352 */
409 uint32 glyphSupportLevel; /* 353 */
410 GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */
411 GLYPH_CACHE_DEFINITION* fragCache; /* 355 */
412 uint32 paddingS[360 - 356]; /* 356 */
415 boolean draw_nine_grid; /* 360 */
416 uint32 draw_nine_grid_cache_size; /* 361 */
417 uint32 draw_nine_grid_cache_entries; /* 362 */
418 uint32 paddingT[368 - 363]; /* 363 */
421 boolean draw_gdi_plus; /* 368 */
422 boolean draw_gdi_plus_cache; /* 369 */
423 uint32 paddingU[376 - 370]; /* 370 */
425 /* Desktop Composition */
426 boolean desktop_composition; /* 376 */
427 uint32 paddingV[384 - 377]; /* 377 */
431 rdpChannel channels[16];
435 struct rdp_monitor monitors[16];
439 struct rdp_ext_set extensions[16];
441 typedef struct rdp_settings rdpSettings;
443 rdpSettings* settings_new(void* instance);
444 void settings_free(rdpSettings* settings);
446 #endif /* __RDP_SETTINGS_H */