Fix changelog email address
[freerdp-ubuntu-pcb-backport.git] / include / freerdp / settings.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * RDP Settings
4  *
5  * Copyright 2009-2011 Jay Sorg
6  *
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
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20 #ifndef __RDP_SETTINGS_H
21 #define __RDP_SETTINGS_H
22
23 #include <freerdp/types.h>
24 #include <freerdp/utils/blob.h>
25 #include <freerdp/utils/unicode.h>
26
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
37
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
45
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
52
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
59
60 /* Auto Reconnect Version */
61 #define AUTO_RECONNECT_VERSION_1                0x00000001
62
63 /* Order Support */
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
94
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
100
101 /* SYSTEM_TIME */
102 typedef struct
103 {
104         uint16 wYear;
105         uint16 wMonth;
106         uint16 wDayOfWeek;
107         uint16 wDay;
108         uint16 wHour;
109         uint16 wMinute;
110         uint16 wSecond;
111         uint16 wMilliseconds;
112 } SYSTEM_TIME;
113
114 /* TIME_ZONE_INFORMATION */
115 struct _TIME_ZONE_INFO
116 {
117         uint32 bias;
118         char standardName[32];
119         SYSTEM_TIME standardDate;
120         uint32 standardBias;
121         char daylightName[32];
122         SYSTEM_TIME daylightDate;
123         uint32 daylightBias;
124 };
125 typedef struct _TIME_ZONE_INFO TIME_ZONE_INFO;
126
127 /* ARC_CS_PRIVATE_PACKET */
128 typedef struct
129 {
130         uint32 cbLen;
131         uint32 version;
132         uint32 logonId;
133         uint8 securityVerifier[16];
134 } ARC_CS_PRIVATE_PACKET;
135
136 /* ARC_SC_PRIVATE_PACKET */
137 typedef struct
138 {
139         uint32 cbLen;
140         uint32 version;
141         uint32 logonId;
142         uint8 arcRandomBits[16];
143 } ARC_SC_PRIVATE_PACKET;
144
145 /* Certificates */
146
147 typedef struct rdp_certificate rdpCertificate;
148 typedef struct rdp_key rdpKey;
149
150 struct rdp_CertBlob
151 {
152         uint32 length;
153         uint8* data;
154 };
155 typedef struct rdp_CertBlob rdpCertBlob;
156
157 struct rdp_X509CertChain
158 {
159         uint32 count;
160         rdpCertBlob* array;
161 };
162 typedef struct rdp_X509CertChain rdpX509CertChain;
163
164 struct rdp_CertInfo
165 {
166         rdpBlob modulus;
167         uint8 exponent[4];
168 };
169 typedef struct rdp_CertInfo rdpCertInfo;
170
171 struct rdp_certificate
172 {
173         rdpCertInfo cert_info;
174         rdpX509CertChain* x509_cert_chain;
175 };
176
177 /* Channels */
178
179 struct rdp_channel
180 {
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 */
186 };
187 typedef struct rdp_channel rdpChannel;
188
189 /* Extensions */
190
191 struct rdp_ext_set
192 {
193         char name[256]; /* plugin name or path */
194         void* data; /* plugin data */
195 };
196
197 /* Bitmap Cache */
198
199 struct _BITMAP_CACHE_CELL_INFO
200 {
201         uint16 numEntries;
202         uint16 maxSize;
203 };
204 typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO;
205
206 struct _BITMAP_CACHE_V2_CELL_INFO
207 {
208         uint32 numEntries;
209         boolean persistent;
210 };
211 typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO;
212
213 /* Glyph Cache */
214
215 struct _GLYPH_CACHE_DEFINITION
216 {
217         uint16 cacheEntries;
218         uint16 cacheMaximumCellSize;
219 };
220 typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION;
221
222 /* Monitors */
223
224 struct rdp_monitor
225 {
226         int x;
227         int y;
228         int width;
229         int height;
230         int is_primary;
231 };
232
233 /* Settings */
234
235 struct rdp_settings
236 {
237         void* instance; /* 0 */
238         uint32 paddingA[16 - 1]; /* 1 */
239
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         boolean security_layer_negotiation; /* 31 */
257         uint32 paddingB[48 - 32]; /* 32 */
258
259         /* Connection Settings */
260         uint32 port; /* 48 */
261         boolean ipv6; /* 49 */
262         char* hostname; /* 50 */
263         char* username; /* 51 */
264         char* password; /* 52 */
265         char* domain; /* 53 */
266         char* shell; /* 54 */
267         char* directory; /* 55 */
268         char* ip_address; /* 56 */
269         char* client_dir; /* 57 */
270         boolean autologon; /* 58 */
271         boolean compression; /* 59 */
272         uint32 performance_flags; /* 60 */
273         rdpBlob* password_cookie; /* 61 */
274         uint32 paddingBackport[71 - 62]; /* 62 */
275         boolean send_preconnection_pdu; /* 71 */
276         uint32 preconnection_id; /* 72 */
277         char* preconnection_blob; /* 73 */
278         uint32 paddingC[80 - 74]; /* 74 */
279
280         /* User Interface Parameters */
281         boolean sw_gdi; /* 80 */
282         boolean workarea; /* 81 */
283         boolean fullscreen; /* 82 */
284         boolean grab_keyboard; /* 83 */
285         boolean decorations; /* 84 */
286         uint32 percent_screen; /* 85 */
287         boolean mouse_motion; /* 86 */
288         char* window_title; /* 87 */
289         uint64 parent_window_xid; /* 88 */
290         uint32 paddingD[112 - 89]; /* 89 */
291
292         /* Internal Parameters */
293         char* home_path; /* 112 */
294         uint32 share_id; /* 113 */
295         uint32 pdu_source; /* 114 */
296         UNICONV* uniconv; /* 115 */
297         boolean server_mode; /* 116 */
298         char* config_path; /* 117 */
299         char* current_path; /* 118 */
300         char* development_path; /* 119 */
301         boolean development_mode; /* 120 */
302         uint32 paddingE[144 - 121]; /* 121 */
303
304         /* Security */
305         boolean encryption; /* 144 */
306         boolean tls_security; /* 145 */
307         boolean nla_security; /* 146 */
308         boolean rdp_security; /* 147 */
309         uint32 ntlm_version; /* 148 */
310         boolean secure_checksum; /* 149 */
311         uint32 paddingF[160 - 150]; /* 150 */
312
313         /* Session */
314         boolean console_audio; /* 160 */
315         boolean console_session; /* 161 */
316         uint32 redirected_session_id; /* 162 */
317         uint32 paddingG[176 - 163]; /* 163 */
318
319         /* Output Control */
320         boolean refresh_rect; /* 176 */
321         boolean suppress_output; /* 177 */
322         boolean desktop_resize; /* 178 */
323         uint32 paddingH[192 - 179]; /* 179 */
324
325         /* Reconnection */
326         boolean auto_reconnection; /* 192 */
327         ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */
328         ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */
329         uint32 paddingI[208 - 195]; /* 195 */
330
331         /* Time Zone */
332         TIME_ZONE_INFO* client_time_zone; /* 208 */
333         uint32 paddingJ[216 - 209]; /* 209 */
334
335         /* Capabilities */
336         uint32 os_major_type; /* 216 */
337         uint32 os_minor_type; /* 217 */
338         uint32 vc_chunk_size; /* 218 */
339         boolean sound_beeps; /* 219 */
340         boolean smooth_fonts; /* 220 */
341         boolean frame_marker; /* 221 */
342         boolean fastpath_input; /* 222 */
343         boolean fastpath_output; /* 223 */
344         uint8 received_caps[32]; /* 224 (8) */
345         uint8 order_support[32]; /* 232 (8) */
346         boolean surface_commands; /* 240 */
347         boolean disable_wallpaper; /* 241 */
348         boolean disable_full_window_drag; /* 242 */
349         boolean disable_menu_animations; /* 243 */
350         boolean disable_theming; /* 244 */
351         uint32 connection_type; /* 245 */
352         uint32 multifrag_max_request_size; /* 246 */
353         uint32 paddingK[248 - 247]; /* 247 */
354
355         /* Certificate */
356         char* cert_file; /* 248 */
357         char* privatekey_file; /* 249 */
358         char client_hostname[32]; /* 250 (8) */
359         char client_product_id[32]; /* 258 (8) */
360         rdpBlob* server_random; /* 266 */
361         rdpBlob* server_certificate; /* 267 */
362         boolean ignore_certificate; /* 268 */
363         rdpCertificate* server_cert; /* 269 */
364         char* rdp_key_file; /* 270 */
365         rdpKey* server_key; /* 271 */
366         char* certificate_name; /* 272 */
367         uint32 paddingL[280 - 273]; /* 273 */
368
369         /* Codecs */
370         boolean rfx_codec; /* 280 */
371         boolean ns_codec; /* 281 */
372         uint32 rfx_codec_id; /* 282 */
373         uint32 ns_codec_id; /* 283 */
374         uint32 rfx_codec_mode; /* 284 */
375         boolean frame_acknowledge; /* 285 */
376         uint32 paddingM[296 - 286]; /* 286 */
377
378         /* Recording */
379         boolean dump_rfx; /* 296 */
380         boolean play_rfx; /* 297 */
381         char* dump_rfx_file; /* 298 */
382         char* play_rfx_file; /* 299 */
383         uint32 paddingN[312 - 300]; /* 300 */
384
385         /* RemoteApp */
386         boolean remote_app; /* 312 */
387         uint32 num_icon_caches; /* 313 */
388         uint32 num_icon_cache_entries; /* 314 */
389         boolean rail_langbar_supported; /* 315 */
390         uint32 paddingO[320 - 316]; /* 316 */
391
392         /* Pointer */
393         boolean large_pointer; /* 320 */
394         boolean color_pointer; /* 321 */
395         uint32 pointer_cache_size; /* 322 */
396         uint32 paddingP[328 - 323]; /* 323 */
397
398         /* Bitmap Cache */
399         boolean bitmap_cache; /* 328 */
400         boolean bitmap_cache_v3; /* 329 */
401         boolean persistent_bitmap_cache; /* 330 */
402         uint32 bitmapCacheV2NumCells; /* 331 */
403         BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */
404         uint32 paddingQ[344 - 333]; /* 333 */
405
406         /* Offscreen Bitmap Cache */
407         boolean offscreen_bitmap_cache; /* 344 */
408         uint32 offscreen_bitmap_cache_size; /* 345 */
409         uint32 offscreen_bitmap_cache_entries; /* 346 */
410         uint32 paddingR[352 - 347]; /* 347 */
411
412         /* Glyph Cache */
413         boolean glyph_cache; /* 352 */
414         uint32 glyphSupportLevel; /* 353 */
415         GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */
416         GLYPH_CACHE_DEFINITION* fragCache; /* 355 */
417         uint32 paddingS[360 - 356]; /* 356 */
418
419         /* Draw Nine Grid */
420         boolean draw_nine_grid; /* 360 */
421         uint32 draw_nine_grid_cache_size; /* 361 */
422         uint32 draw_nine_grid_cache_entries; /* 362 */
423         uint32 paddingT[368 - 363]; /* 363 */
424
425         /* Draw GDI+ */
426         boolean draw_gdi_plus; /* 368 */
427         boolean draw_gdi_plus_cache; /* 369 */
428         uint32 paddingU[376 - 370]; /* 370 */
429
430         /* Desktop Composition */
431         boolean desktop_composition; /* 376 */
432         uint32 paddingV[384 - 377]; /* 377 */
433
434         /* Channels */
435         int num_channels;
436         rdpChannel channels[16];
437
438         /* Monitors */
439         int num_monitors;
440         struct rdp_monitor monitors[16];
441
442         /* Extensions */
443         int num_extensions;
444         struct rdp_ext_set extensions[16];
445 };
446 typedef struct rdp_settings rdpSettings;
447
448 rdpSettings* settings_new(void* instance);
449 void settings_free(rdpSettings* settings);
450
451 #endif /* __RDP_SETTINGS_H */