2011-07-01 05:23:36 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
* RDP Settings
|
|
|
|
*
|
|
|
|
* Copyright 2009-2011 Jay Sorg
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2011-07-05 03:52:24 +04:00
|
|
|
#ifndef __RDP_SETTINGS_H
|
|
|
|
#define __RDP_SETTINGS_H
|
2011-07-01 05:23:36 +04:00
|
|
|
|
2011-07-07 21:37:48 +04:00
|
|
|
#include <freerdp/types.h>
|
2011-07-10 05:04:57 +04:00
|
|
|
#include <freerdp/utils/blob.h>
|
2011-07-08 08:37:25 +04:00
|
|
|
#include <freerdp/utils/unicode.h>
|
|
|
|
|
2011-07-09 00:05:30 +04:00
|
|
|
/* Performance Flags */
|
|
|
|
#define PERF_FLAG_NONE 0x00000000
|
|
|
|
#define PERF_DISABLE_WALLPAPER 0x00000001
|
|
|
|
#define PERF_DISABLE_FULLWINDOWDRAG 0x00000002
|
|
|
|
#define PERF_DISABLE_MENUANIMATIONS 0x00000004
|
|
|
|
#define PERF_DISABLE_THEMING 0x00000008
|
|
|
|
#define PERF_DISABLE_CURSOR_SHADOW 0x00000020
|
|
|
|
#define PERF_DISABLE_CURSORSETTINGS 0x00000040
|
|
|
|
#define PERF_ENABLE_FONT_SMOOTHING 0x00000080
|
|
|
|
#define PERF_ENABLE_DESKTOP_COMPOSITION 0x00000100
|
|
|
|
|
|
|
|
/* Encryption Methods */
|
2011-07-20 00:30:05 +04:00
|
|
|
#define ENCRYPTION_METHOD_NONE 0x00000000
|
|
|
|
#define ENCRYPTION_METHOD_40BIT 0x00000001
|
|
|
|
#define ENCRYPTION_METHOD_128BIT 0x00000002
|
|
|
|
#define ENCRYPTION_METHOD_56BIT 0x00000008
|
|
|
|
#define ENCRYPTION_METHOD_FIPS 0x00000010
|
|
|
|
|
|
|
|
/* Encryption Levels */
|
|
|
|
#define ENCRYPTION_LEVEL_NONE 0x00000000
|
|
|
|
#define ENCRYPTION_LEVEL_LOW 0x00000001
|
|
|
|
#define ENCRYPTION_LEVEL_CLIENT_COMPATIBLE 0x00000002
|
|
|
|
#define ENCRYPTION_LEVEL_HIGH 0x00000003
|
|
|
|
#define ENCRYPTION_LEVEL_FIPS 0x00000004
|
2011-07-06 02:26:12 +04:00
|
|
|
|
2011-07-10 20:10:24 +04:00
|
|
|
/* Auto Reconnect Version */
|
|
|
|
#define AUTO_RECONNECT_VERSION_1 0x00000001
|
|
|
|
|
2011-08-05 00:22:15 +04:00
|
|
|
/* Order Support */
|
|
|
|
#define NEG_DSTBLT_INDEX 0x00
|
|
|
|
#define NEG_PATBLT_INDEX 0x01
|
|
|
|
#define NEG_SCRBLT_INDEX 0x02
|
|
|
|
#define NEG_MEMBLT_INDEX 0x03
|
|
|
|
#define NEG_MEM3BLT_INDEX 0x04
|
2011-09-12 07:35:33 +04:00
|
|
|
#define NEG_ATEXTOUT_INDEX 0x05
|
|
|
|
#define NEG_AEXTTEXTOUT_INDEX 0x06
|
2011-08-05 00:22:15 +04:00
|
|
|
#define NEG_DRAWNINEGRID_INDEX 0x07
|
|
|
|
#define NEG_LINETO_INDEX 0x08
|
|
|
|
#define NEG_MULTI_DRAWNINEGRID_INDEX 0x09
|
|
|
|
#define NEG_OPAQUE_RECT_INDEX 0x0A
|
|
|
|
#define NEG_SAVEBITMAP_INDEX 0x0B
|
2011-09-12 07:35:33 +04:00
|
|
|
#define NEG_WTEXTOUT_INDEX 0x0C
|
|
|
|
#define NEG_MEMBLT_V2_INDEX 0x0D
|
|
|
|
#define NEG_MEM3BLT_V2_INDEX 0x0E
|
2011-08-05 00:22:15 +04:00
|
|
|
#define NEG_MULTIDSTBLT_INDEX 0x0F
|
|
|
|
#define NEG_MULTIPATBLT_INDEX 0x10
|
|
|
|
#define NEG_MULTISCRBLT_INDEX 0x11
|
|
|
|
#define NEG_MULTIOPAQUERECT_INDEX 0x12
|
|
|
|
#define NEG_FAST_INDEX_INDEX 0x13
|
|
|
|
#define NEG_POLYGON_SC_INDEX 0x14
|
|
|
|
#define NEG_POLYGON_CB_INDEX 0x15
|
|
|
|
#define NEG_POLYLINE_INDEX 0x16
|
|
|
|
#define NEG_FAST_GLYPH_INDEX 0x18
|
|
|
|
#define NEG_ELLIPSE_SC_INDEX 0x19
|
|
|
|
#define NEG_ELLIPSE_CB_INDEX 0x1A
|
|
|
|
#define NEG_GLYPH_INDEX_INDEX 0x1B
|
2011-09-12 07:35:33 +04:00
|
|
|
#define NEG_GLYPH_WEXTTEXTOUT_INDEX 0x1C
|
|
|
|
#define NEG_GLYPH_WLONGTEXTOUT_INDEX 0x1D
|
|
|
|
#define NEG_GLYPH_WLONGEXTTEXTOUT_INDEX 0x1E
|
2011-08-05 00:22:15 +04:00
|
|
|
|
2011-08-21 22:16:53 +04:00
|
|
|
/* Glyph Support Level */
|
|
|
|
#define GLYPH_SUPPORT_NONE 0x0000
|
|
|
|
#define GLYPH_SUPPORT_PARTIAL 0x0001
|
|
|
|
#define GLYPH_SUPPORT_FULL 0x0002
|
|
|
|
#define GLYPH_SUPPORT_ENCODE 0x0003
|
|
|
|
|
2011-07-10 20:10:24 +04:00
|
|
|
/* SYSTEM_TIME */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint16 wYear;
|
|
|
|
uint16 wMonth;
|
|
|
|
uint16 wDayOfWeek;
|
|
|
|
uint16 wDay;
|
|
|
|
uint16 wHour;
|
|
|
|
uint16 wMinute;
|
|
|
|
uint16 wSecond;
|
|
|
|
uint16 wMilliseconds;
|
|
|
|
} SYSTEM_TIME;
|
|
|
|
|
|
|
|
/* TIME_ZONE_INFORMATION */
|
2011-08-16 01:05:48 +04:00
|
|
|
struct _TIME_ZONE_INFO
|
2011-07-10 20:10:24 +04:00
|
|
|
{
|
|
|
|
uint32 bias;
|
2011-07-27 03:14:11 +04:00
|
|
|
char standardName[32];
|
2011-07-10 20:10:24 +04:00
|
|
|
SYSTEM_TIME standardDate;
|
|
|
|
uint32 standardBias;
|
2011-07-27 03:14:11 +04:00
|
|
|
char daylightName[32];
|
2011-07-10 20:10:24 +04:00
|
|
|
SYSTEM_TIME daylightDate;
|
|
|
|
uint32 daylightBias;
|
2011-08-16 01:05:48 +04:00
|
|
|
};
|
|
|
|
typedef struct _TIME_ZONE_INFO TIME_ZONE_INFO;
|
2011-07-10 20:10:24 +04:00
|
|
|
|
|
|
|
/* ARC_CS_PRIVATE_PACKET */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32 cbLen;
|
|
|
|
uint32 version;
|
|
|
|
uint32 logonId;
|
|
|
|
uint8 securityVerifier[16];
|
|
|
|
} ARC_CS_PRIVATE_PACKET;
|
|
|
|
|
2011-07-25 21:42:14 +04:00
|
|
|
/* ARC_SC_PRIVATE_PACKET */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32 cbLen;
|
|
|
|
uint32 version;
|
|
|
|
uint32 logonId;
|
|
|
|
uint8 arcRandomBits[16];
|
|
|
|
} ARC_SC_PRIVATE_PACKET;
|
|
|
|
|
2011-07-01 05:23:36 +04:00
|
|
|
struct rdp_chan
|
|
|
|
{
|
|
|
|
char name[8]; /* ui sets */
|
2011-07-06 02:26:12 +04:00
|
|
|
int options; /* ui sets */
|
2011-07-01 05:23:36 +04:00
|
|
|
int chan_id; /* core sets */
|
2011-08-20 06:02:24 +04:00
|
|
|
boolean joined; /* client has joined the channel */
|
2011-07-01 05:23:36 +04:00
|
|
|
void * handle; /* just for ui */
|
|
|
|
};
|
2011-08-20 06:02:24 +04:00
|
|
|
typedef struct rdp_chan rdpChan;
|
2011-07-01 05:23:36 +04:00
|
|
|
|
|
|
|
struct rdp_ext_set
|
|
|
|
{
|
|
|
|
char name[256]; /* plugin name or path */
|
|
|
|
void * data; /* plugin data */
|
|
|
|
};
|
|
|
|
|
2011-08-06 00:56:40 +04:00
|
|
|
struct _BITMAP_CACHE_CELL_INFO
|
|
|
|
{
|
|
|
|
uint16 numEntries;
|
|
|
|
uint16 maxSize;
|
|
|
|
};
|
|
|
|
typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO;
|
|
|
|
|
|
|
|
struct _BITMAP_CACHE_V2_CELL_INFO
|
|
|
|
{
|
|
|
|
uint32 numEntries;
|
|
|
|
boolean persistent;
|
|
|
|
};
|
|
|
|
typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO;
|
|
|
|
|
2011-08-21 22:16:53 +04:00
|
|
|
struct _GLYPH_CACHE_DEFINITION
|
|
|
|
{
|
|
|
|
uint16 cacheEntries;
|
|
|
|
uint16 cacheMaximumCellSize;
|
|
|
|
};
|
|
|
|
typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION;
|
|
|
|
|
2011-07-01 05:23:36 +04:00
|
|
|
struct rdp_monitor
|
|
|
|
{
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int is_primary;
|
|
|
|
};
|
|
|
|
|
2011-07-05 03:52:24 +04:00
|
|
|
struct rdp_settings
|
2011-07-01 05:23:36 +04:00
|
|
|
{
|
2011-07-06 02:26:12 +04:00
|
|
|
uint16 width;
|
|
|
|
uint16 height;
|
2011-08-26 22:48:51 +04:00
|
|
|
boolean sw_gdi;
|
2011-08-17 22:13:44 +04:00
|
|
|
boolean workarea;
|
2011-08-19 19:12:30 +04:00
|
|
|
boolean fullscreen;
|
2011-08-17 22:13:44 +04:00
|
|
|
boolean decorations;
|
2011-07-06 02:26:12 +04:00
|
|
|
uint32 rdp_version;
|
|
|
|
uint16 color_depth;
|
|
|
|
uint32 kbd_layout;
|
|
|
|
uint32 kbd_type;
|
|
|
|
uint32 kbd_subtype;
|
|
|
|
uint32 kbd_fn_keys;
|
2011-07-08 08:37:25 +04:00
|
|
|
uint32 client_build;
|
2011-08-19 19:56:47 +04:00
|
|
|
uint32 requested_protocols;
|
2011-07-06 02:26:12 +04:00
|
|
|
uint32 selected_protocol;
|
2011-07-20 00:30:05 +04:00
|
|
|
uint32 encryption_method;
|
|
|
|
uint32 encryption_level;
|
2011-08-18 21:07:52 +04:00
|
|
|
boolean authentication;
|
2011-07-06 02:26:12 +04:00
|
|
|
|
2011-08-21 05:58:05 +04:00
|
|
|
boolean server_mode;
|
|
|
|
|
2011-08-16 01:05:48 +04:00
|
|
|
rdpBlob server_random;
|
|
|
|
rdpBlob server_certificate;
|
2011-09-05 11:08:55 +04:00
|
|
|
struct rdp_certificate* server_cert;
|
2011-07-10 05:04:57 +04:00
|
|
|
|
2011-09-13 10:40:27 +04:00
|
|
|
uint8 sign_key[16];
|
|
|
|
uint8 decrypt_key[16];
|
|
|
|
uint8 encrypt_key[16];
|
|
|
|
uint8 decrypt_update_key[16];
|
|
|
|
uint8 encrypt_update_key[16];
|
|
|
|
int rc4_key_len;
|
2011-07-10 05:04:57 +04:00
|
|
|
|
2011-07-18 07:16:31 +04:00
|
|
|
boolean console_audio;
|
2011-07-10 20:10:24 +04:00
|
|
|
boolean console_session;
|
2011-07-08 08:37:25 +04:00
|
|
|
uint32 redirected_session_id;
|
2011-07-06 02:26:12 +04:00
|
|
|
|
|
|
|
int num_channels;
|
2011-08-20 06:02:24 +04:00
|
|
|
rdpChan channels[16];
|
2011-07-06 02:26:12 +04:00
|
|
|
|
|
|
|
int num_monitors;
|
|
|
|
struct rdp_monitor monitors[16];
|
|
|
|
|
2011-07-10 20:10:24 +04:00
|
|
|
struct rdp_ext_set extensions[16];
|
|
|
|
|
2011-07-08 08:37:25 +04:00
|
|
|
UNICONV* uniconv;
|
|
|
|
char client_hostname[32];
|
|
|
|
char client_product_id[32];
|
|
|
|
|
2011-07-10 20:10:24 +04:00
|
|
|
uint16 port;
|
2011-07-27 03:14:11 +04:00
|
|
|
char* hostname;
|
|
|
|
char* username;
|
|
|
|
char* password;
|
|
|
|
char* domain;
|
|
|
|
char* shell;
|
|
|
|
char* directory;
|
2011-07-10 20:10:24 +04:00
|
|
|
uint32 performance_flags;
|
|
|
|
|
2011-08-19 09:35:29 +04:00
|
|
|
char* cert_file;
|
|
|
|
char* privatekey_file;
|
|
|
|
|
2011-07-10 20:10:24 +04:00
|
|
|
boolean autologon;
|
|
|
|
boolean compression;
|
|
|
|
|
|
|
|
boolean ipv6;
|
2011-07-27 03:14:11 +04:00
|
|
|
char* ip_address;
|
|
|
|
char* client_dir;
|
2011-08-16 01:05:48 +04:00
|
|
|
TIME_ZONE_INFO client_time_zone;
|
2011-07-25 21:42:14 +04:00
|
|
|
|
|
|
|
boolean auto_reconnection;
|
|
|
|
ARC_CS_PRIVATE_PACKET client_auto_reconnect_cookie;
|
|
|
|
ARC_SC_PRIVATE_PACKET server_auto_reconnect_cookie;
|
2011-07-10 20:10:24 +04:00
|
|
|
|
|
|
|
boolean encryption;
|
|
|
|
boolean tls_security;
|
|
|
|
boolean nla_security;
|
|
|
|
boolean rdp_security;
|
2011-07-06 02:26:12 +04:00
|
|
|
|
2011-07-20 00:30:05 +04:00
|
|
|
uint32 share_id;
|
2011-07-21 23:10:53 +04:00
|
|
|
uint16 pdu_source;
|
2011-07-20 00:30:05 +04:00
|
|
|
|
2011-07-21 06:05:12 +04:00
|
|
|
boolean refresh_rect;
|
|
|
|
boolean suppress_output;
|
|
|
|
boolean desktop_resize;
|
|
|
|
|
2011-07-21 09:56:48 +04:00
|
|
|
boolean frame_marker;
|
|
|
|
boolean bitmap_cache_v3;
|
|
|
|
|
2011-07-25 20:25:28 +04:00
|
|
|
uint8 received_caps[32];
|
2011-07-21 06:05:12 +04:00
|
|
|
uint8 order_support[32];
|
|
|
|
|
|
|
|
boolean sound_beeps;
|
2011-08-24 19:20:41 +04:00
|
|
|
boolean color_pointer;
|
|
|
|
uint16 pointer_cache_size;
|
2011-07-21 06:05:12 +04:00
|
|
|
|
2011-08-13 09:35:58 +04:00
|
|
|
boolean fastpath_input;
|
|
|
|
boolean fastpath_output;
|
2011-07-21 06:05:12 +04:00
|
|
|
|
|
|
|
boolean offscreen_bitmap_cache;
|
|
|
|
uint16 offscreen_bitmap_cache_size;
|
|
|
|
uint16 offscreen_bitmap_cache_entries;
|
|
|
|
|
2011-07-25 21:42:14 +04:00
|
|
|
boolean bitmap_cache;
|
2011-07-21 06:05:12 +04:00
|
|
|
boolean persistent_bitmap_cache;
|
|
|
|
|
2011-08-06 00:56:40 +04:00
|
|
|
uint8 bitmapCacheV2NumCells;
|
|
|
|
BITMAP_CACHE_V2_CELL_INFO bitmapCacheV2CellInfo[6];
|
|
|
|
|
2011-08-21 22:16:53 +04:00
|
|
|
uint16 glyphSupportLevel;
|
|
|
|
GLYPH_CACHE_DEFINITION glyphCache[10];
|
|
|
|
GLYPH_CACHE_DEFINITION fragCache;
|
|
|
|
|
2011-07-21 06:05:12 +04:00
|
|
|
uint32 vc_chunk_size;
|
|
|
|
|
|
|
|
boolean draw_nine_grid;
|
|
|
|
uint16 draw_nine_grid_cache_size;
|
|
|
|
uint16 draw_nine_grid_cache_entries;
|
|
|
|
|
|
|
|
boolean draw_gdi_plus;
|
|
|
|
boolean draw_gdi_plus_cache;
|
|
|
|
|
2011-07-21 09:56:48 +04:00
|
|
|
boolean large_pointer;
|
|
|
|
|
|
|
|
boolean surface_commands;
|
|
|
|
uint32 multifrag_max_request_size;
|
|
|
|
|
|
|
|
boolean desktop_composition;
|
|
|
|
|
2011-08-24 07:27:22 +04:00
|
|
|
boolean rfx_codec;
|
|
|
|
uint8 rfx_codec_id;
|
2011-07-21 09:56:48 +04:00
|
|
|
boolean frame_acknowledge;
|
|
|
|
|
2011-08-27 04:26:40 +04:00
|
|
|
boolean dump_rfx;
|
2011-08-28 23:51:49 +04:00
|
|
|
boolean play_rfx;
|
2011-08-27 04:26:40 +04:00
|
|
|
char* dump_rfx_file;
|
2011-08-28 23:51:49 +04:00
|
|
|
char* play_rfx_file;
|
2011-08-27 04:26:40 +04:00
|
|
|
|
2011-07-21 06:05:12 +04:00
|
|
|
boolean remote_app;
|
2011-08-15 01:05:34 +04:00
|
|
|
uint8 num_icon_caches;
|
|
|
|
uint16 num_icon_cache_entries;
|
2011-08-17 10:14:02 +04:00
|
|
|
boolean rail_langbar_supported;
|
2011-07-21 06:05:12 +04:00
|
|
|
|
2011-07-25 20:25:28 +04:00
|
|
|
boolean mouse_motion;
|
2011-07-01 05:23:36 +04:00
|
|
|
};
|
2011-07-07 21:37:48 +04:00
|
|
|
typedef struct rdp_settings rdpSettings;
|
|
|
|
|
|
|
|
rdpSettings* settings_new();
|
|
|
|
void settings_free(rdpSettings* settings);
|
2011-07-01 05:23:36 +04:00
|
|
|
|
2011-07-05 03:52:24 +04:00
|
|
|
#endif /* __RDP_SETTINGS_H */
|