VirtualBox

source: vbox/trunk/src/VBox/RDP/client-1.8.4/types.h@ 77807

Last change on this file since 77807 was 76779, checked in by vboxsync, 6 years ago

RDP: add client-1.8.4.
bugref:9356: Update rdesktop-vrdp to 1.8.4
client-1.8.4 is a Subversion copy of 1.8.3 with the upstream 1.8.3 to 1.8.4
patch applied and a couple of fixes and changes after review, namely:

  • Stopped disabling the new pointer data format for our build, as this is no

longer needed.

  • Adjusted some snprintf buffers to make GCC happy.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1/*
2 rdesktop: A Remote Desktop Protocol client.
3 Common data types
4 Copyright (C) Matthew Chapman 1999-2008
5 Copyright 2014 Henrik Andersson <hean01@cendio.se> for Cendio AB
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21/*
22 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the General Public License version 2 (GPLv2) at this time for any software where
25 * a choice of GPL license versions is made available with the language indicating
26 * that GPLv2 or any later version may be used, or where a choice of which version
27 * of the GPL is applied is otherwise unspecified.
28 */
29
30typedef int RD_BOOL;
31
32#ifndef True
33#define True (1)
34#define False (0)
35#endif
36
37typedef unsigned char uint8;
38typedef signed char sint8;
39typedef unsigned short uint16;
40typedef signed short sint16;
41typedef unsigned int uint32;
42typedef signed int sint32;
43
44#define RD_UINT32_MAX (uint32)(-1)
45
46typedef void *RD_HBITMAP;
47typedef void *RD_HGLYPH;
48typedef void *RD_HCOLOURMAP;
49typedef void *RD_HCURSOR;
50
51
52typedef enum _RDP_VERSION
53{
54 RDP_V4 = 4,
55 RDP_V5 = 5,
56 RDP_V6 = 6
57} RDP_VERSION;
58
59
60typedef struct _RD_POINT
61{
62 sint16 x, y;
63}
64RD_POINT;
65
66typedef struct _COLOURENTRY
67{
68 uint8 red;
69 uint8 green;
70 uint8 blue;
71
72}
73COLOURENTRY;
74
75typedef struct _COLOURMAP
76{
77 uint16 ncolours;
78 COLOURENTRY *colours;
79
80}
81COLOURMAP;
82
83typedef struct _BOUNDS
84{
85 sint16 left;
86 sint16 top;
87 sint16 right;
88 sint16 bottom;
89
90}
91BOUNDS;
92
93typedef struct _PEN
94{
95 uint8 style;
96 uint8 width;
97 uint32 colour;
98
99}
100PEN;
101
102/* this is whats in the brush cache */
103typedef struct _BRUSHDATA
104{
105 uint32 colour_code;
106 uint32 data_size;
107 uint8 *data;
108}
109BRUSHDATA;
110
111typedef struct _BRUSH
112{
113 uint8 xorigin;
114 uint8 yorigin;
115 uint8 style;
116 uint8 pattern[8];
117 BRUSHDATA *bd;
118}
119BRUSH;
120
121typedef struct _FONTGLYPH
122{
123 sint16 offset;
124 sint16 baseline;
125 uint16 width;
126 uint16 height;
127 RD_HBITMAP pixmap;
128
129}
130FONTGLYPH;
131
132typedef struct _DATABLOB
133{
134 void *data;
135 int size;
136
137}
138DATABLOB;
139
140typedef struct _key_translation
141{
142 /* For normal scancode translations */
143 uint8 scancode;
144 uint16 modifiers;
145 /* For sequences. If keysym is nonzero, the fields above are not used. */
146 uint32 seq_keysym; /* Really KeySym */
147 struct _key_translation *next;
148}
149key_translation;
150
151typedef struct _key_translation_entry
152{
153 key_translation *tr;
154 /* The full KeySym for this entry, not KEYMAP_MASKed */
155 uint32 keysym;
156 /* This will be non-NULL if there has been a hash collision */
157 struct _key_translation_entry *next;
158}
159key_translation_entry;
160
161typedef struct _VCHANNEL
162{
163 uint16 mcs_id;
164 char name[8];
165 uint32 flags;
166 struct stream in;
167 void (*process) (STREAM);
168}
169VCHANNEL;
170
171/* PSTCACHE */
172typedef uint8 HASH_KEY[8];
173
174/* Header for an entry in the persistent bitmap cache file */
175typedef struct _PSTCACHE_CELLHEADER
176{
177 HASH_KEY key;
178 uint8 width, height;
179 uint16 length;
180 uint32 stamp;
181}
182CELLHEADER;
183
184#define MAX_CBSIZE 256
185
186/* RDPSND */
187typedef struct _RD_WAVEFORMATEX
188{
189 uint16 wFormatTag;
190 uint16 nChannels;
191 uint32 nSamplesPerSec;
192 uint32 nAvgBytesPerSec;
193 uint16 nBlockAlign;
194 uint16 wBitsPerSample;
195 uint16 cbSize;
196 uint8 cb[MAX_CBSIZE];
197} RD_WAVEFORMATEX;
198
199typedef struct _RDPCOMP
200{
201 uint32 roff;
202 uint8 hist[RDP_MPPC_DICT_SIZE];
203 struct stream ns;
204}
205RDPCOMP;
206
207/* RDPDR */
208typedef uint32 RD_NTSTATUS;
209typedef uint32 RD_NTHANDLE;
210
211typedef struct _DEVICE_FNS
212{
213 RD_NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
214 uint32 create_disposition, uint32 flags_and_attributes,
215 char *filename, RD_NTHANDLE * handle);
216 RD_NTSTATUS(*close) (RD_NTHANDLE handle);
217 RD_NTSTATUS(*read) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
218 uint32 * result);
219 RD_NTSTATUS(*write) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
220 uint32 * result);
221 RD_NTSTATUS(*device_control) (RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out);
222}
223DEVICE_FNS;
224
225
226typedef struct rdpdr_device_info
227{
228 uint32 device_type;
229 RD_NTHANDLE handle;
230 char name[8];
231 char *local_path;
232 void *pdevice_data;
233}
234RDPDR_DEVICE;
235
236typedef struct rdpdr_serial_device_info
237{
238 int dtr;
239 int rts;
240 uint32 control, xonoff, onlimit, offlimit;
241 uint32 baud_rate,
242 queue_in_size,
243 queue_out_size,
244 wait_mask,
245 read_interval_timeout,
246 read_total_timeout_multiplier,
247 read_total_timeout_constant,
248 write_total_timeout_multiplier, write_total_timeout_constant, posix_wait_mask;
249 uint8 stop_bits, parity, word_length;
250 uint8 chars[6];
251 struct termios *ptermios, *pold_termios;
252 int event_txempty, event_cts, event_dsr, event_rlsd, event_pending;
253}
254SERIAL_DEVICE;
255
256typedef struct rdpdr_parallel_device_info
257{
258 char *driver, *printer;
259 uint32 queue_in_size,
260 queue_out_size,
261 wait_mask,
262 read_interval_timeout,
263 read_total_timeout_multiplier,
264 read_total_timeout_constant,
265 write_total_timeout_multiplier,
266 write_total_timeout_constant, posix_wait_mask, bloblen;
267 uint8 *blob;
268}
269PARALLEL_DEVICE;
270
271typedef struct rdpdr_printer_info
272{
273 FILE *printer_fp;
274 char *driver, *printer;
275 uint32 bloblen;
276 uint8 *blob;
277 RD_BOOL default_printer;
278}
279PRINTER;
280
281typedef struct notify_data
282{
283 time_t modify_time;
284 time_t status_time;
285 time_t total_time;
286 unsigned int num_entries;
287}
288NOTIFY;
289
290#ifndef PATH_MAX
291#define PATH_MAX 256
292#endif
293
294typedef struct fileinfo
295{
296 uint32 device_id, flags_and_attributes, accessmask;
297 char path[PATH_MAX];
298 DIR *pdir;
299 struct dirent *pdirent;
300 char pattern[PATH_MAX];
301 RD_BOOL delete_on_close;
302 NOTIFY notify;
303 uint32 info_class;
304}
305FILEINFO;
306
307typedef RD_BOOL(*str_handle_lines_t) (const char *line, void *data);
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette