2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
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 __CAPABILITIES_H
21 #define __CAPABILITIES_H
25 #include <freerdp/freerdp.h>
26 #include <freerdp/constants.h>
27 #include <freerdp/settings.h>
28 #include <freerdp/utils/stream.h>
30 /* Capability Set Types */
31 #define CAPSET_TYPE_GENERAL 0x0001
32 #define CAPSET_TYPE_BITMAP 0x0002
33 #define CAPSET_TYPE_ORDER 0x0003
34 #define CAPSET_TYPE_BITMAP_CACHE 0x0004
35 #define CAPSET_TYPE_CONTROL 0x0005
36 #define CAPSET_TYPE_ACTIVATION 0x0007
37 #define CAPSET_TYPE_POINTER 0x0008
38 #define CAPSET_TYPE_SHARE 0x0009
39 #define CAPSET_TYPE_COLOR_CACHE 0x000A
40 #define CAPSET_TYPE_SOUND 0x000C
41 #define CAPSET_TYPE_INPUT 0x000D
42 #define CAPSET_TYPE_FONT 0x000E
43 #define CAPSET_TYPE_BRUSH 0x000F
44 #define CAPSET_TYPE_GLYPH_CACHE 0x0010
45 #define CAPSET_TYPE_OFFSCREEN_CACHE 0x0011
46 #define CAPSET_TYPE_BITMAP_CACHE_HOST_SUPPORT 0x0012
47 #define CAPSET_TYPE_BITMAP_CACHE_V2 0x0013
48 #define CAPSET_TYPE_VIRTUAL_CHANNEL 0x0014
49 #define CAPSET_TYPE_DRAW_NINE_GRID_CACHE 0x0015
50 #define CAPSET_TYPE_DRAW_GDI_PLUS 0x0016
51 #define CAPSET_TYPE_RAIL 0x0017
52 #define CAPSET_TYPE_WINDOW 0x0018
53 #define CAPSET_TYPE_COMP_DESK 0x0019
54 #define CAPSET_TYPE_MULTI_FRAGMENT_UPDATE 0x001A
55 #define CAPSET_TYPE_LARGE_POINTER 0x001B
56 #define CAPSET_TYPE_SURFACE_COMMANDS 0x001C
57 #define CAPSET_TYPE_BITMAP_CODECS 0x001D
58 #define CAPSET_TYPE_FRAME_ACKNOWLEDGE 0x001E
60 #define CAPSET_HEADER_LENGTH 4
62 #define SOURCE_DESCRIPTOR "FREERDP"
64 /* Capabilities Protocol Version */
65 #define CAPS_PROTOCOL_VERSION 0x0200
67 /* General Capability Flags */
68 #define FASTPATH_OUTPUT_SUPPORTED 0x0001
69 #define NO_BITMAP_COMPRESSION_HDR 0x0400
70 #define LONG_CREDENTIALS_SUPPORTED 0x0004
71 #define AUTORECONNECT_SUPPORTED 0x0008
72 #define ENC_SALTED_CHECKSUM 0x0010
75 #define DRAW_ALLOW_DYNAMIC_COLOR_FIDELITY 0x02
76 #define DRAW_ALLOW_COLOR_SUBSAMPLING 0x04
77 #define DRAW_ALLOW_SKIP_ALPHA 0x08
80 #define NEGOTIATE_ORDER_SUPPORT 0x0002
81 #define ZERO_BOUNDS_DELTA_SUPPORT 0x0008
82 #define COLOR_INDEX_SUPPORT 0x0020
83 #define SOLID_PATTERN_BRUSH_ONLY 0x0040
84 #define ORDER_FLAGS_EXTRA_SUPPORT 0x0080
86 /* Extended Order Flags */
87 #define CACHE_BITMAP_V3_SUPPORT 0x0002
88 #define ALTSEC_FRAME_MARKER_SUPPORT 0x0004
91 #define SOUND_BEEPS_FLAG 0x0001
94 #define INPUT_FLAG_SCANCODES 0x0001
95 #define INPUT_FLAG_MOUSEX 0x0004
96 #define INPUT_FLAG_FASTPATH_INPUT 0x0008
97 #define INPUT_FLAG_UNICODE 0x0010
98 #define INPUT_FLAG_FASTPATH_INPUT2 0x0020
100 /* Font Support Flags */
101 #define FONTSUPPORT_FONTLIST 0x0001
103 /* Brush Support Level */
104 #define BRUSH_DEFAULT 0x00000000
105 #define BRUSH_COLOR_8x8 0x00000001
106 #define BRUSH_COLOR_FULL 0x00000002
108 /* Bitmap Cache Version */
109 #define BITMAP_CACHE_V2 0x01
111 /* Bitmap Cache V2 Flags */
112 #define PERSISTENT_KEYS_EXPECTED_FLAG 0x0001
113 #define ALLOW_CACHE_WAITING_LIST_FLAG 0x0002
115 /* Virtual Channel Flags */
116 #define VCCAPS_NO_COMPR 0x00000000
117 #define VCCAPS_COMPR_SC 0x00000001
118 #define VCCAPS_COMPR_CS_8K 0x00000002
120 /* Draw Nine Grid Support Level */
121 #define DRAW_NINEGRID_NO_SUPPORT 0x00000000
122 #define DRAW_NINEGRID_SUPPORTED 0x00000001
123 #define DRAW_NINEGRID_SUPPORTED_V2 0x00000002
125 /* Draw GDI+ Support Level */
126 #define DRAW_GDIPLUS_DEFAULT 0x00000000
127 #define DRAW_GDIPLUS_SUPPORTED 0x00000001
129 /* Draw GDI+ Cache Level */
130 #define DRAW_GDIPLUS_CACHE_LEVEL_DEFAULT 0x00000000
131 #define DRAW_GDIPLUS_CACHE_LEVEL_ONE 0x00000001
133 /* RAIL Support Level */
134 #define RAIL_LEVEL_SUPPORTED 0x00000001
135 #define RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED 0x00000002
137 /* Window Support Level */
138 #define WINDOW_LEVEL_NOT_SUPPORTED 0x00000000
139 #define WINDOW_LEVEL_SUPPORTED 0x00000001
140 #define WINDOW_LEVEL_SUPPORTED_EX 0x00000002
142 /* Desktop Composition Support Level */
143 #define COMPDESK_NOT_SUPPORTED 0x0000
144 #define COMPDESK_SUPPORTED 0x0001
146 /* Large Pointer Support Flags */
147 #define LARGE_POINTER_FLAG_96x96 0x00000001
149 /* Surface Commands Flags */
150 #define SURFCMDS_SET_SURFACE_BITS 0x00000002
151 #define SURFCMDS_FRAME_MARKER 0x00000010
152 #define SURFCMDS_STREAM_SURFACE_BITS 0x00000040
154 /* Bitmap Codec Constants */
155 #define CARDP_CAPS_CAPTURE_NON_CAC 0x00000001
156 #define CBY_CAPS 0xCBC0
157 #define CBY_CAPSET 0xCBC1
158 #define CLY_CAPSET 0xCFC0
159 #define CLW_VERSION_1_0 0x0100
160 #define CT_TILE_64x64 0x0040
161 #define CLW_COL_CONV_ICT 0x1
162 #define CLW_XFORM_DWT_53_A 0x1
163 #define CLW_ENTROPY_RLGR1 0x01
164 #define CLW_ENTROPY_RLGR3 0x04
166 boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s);
167 void rdp_write_demand_active(STREAM* s, rdpSettings* settings);
168 boolean rdp_send_demand_active(rdpRdp* rdp);
169 boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s);
170 void rdp_write_confirm_active(STREAM* s, rdpSettings* settings);
171 boolean rdp_send_confirm_active(rdpRdp* rdp);
173 #endif /* __CAPABILITIES_H */