VirtualBox

source: vbox/trunk/src/VBox/RDP/client-1.8.3/types.h@ 67954

Last change on this file since 67954 was 55123, checked in by vboxsync, 10 years ago

rdesktop 1.8.3 modified for VBox

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 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
44typedef void *RD_HBITMAP;
45typedef void *RD_HGLYPH;
46typedef void *RD_HCOLOURMAP;
47typedef void *RD_HCURSOR;
48
49
50typedef enum _RDP_VERSION
51{
52 RDP_V4 = 4,
53 RDP_V5 = 5,
54 RDP_V6 = 6
55} RDP_VERSION;
56
57
58typedef struct _RD_POINT
59{
60 sint16 x, y;
61}
62RD_POINT;
63
64typedef struct _COLOURENTRY
65{
66 uint8 red;
67 uint8 green;
68 uint8 blue;
69
70}
71COLOURENTRY;
72
73typedef struct _COLOURMAP
74{
75 uint16 ncolours;
76 COLOURENTRY *colours;
77
78}
79COLOURMAP;
80
81typedef struct _BOUNDS
82{
83 sint16 left;
84 sint16 top;
85 sint16 right;
86 sint16 bottom;
87
88}
89BOUNDS;
90
91typedef struct _PEN
92{
93 uint8 style;
94 uint8 width;
95 uint32 colour;
96
97}
98PEN;
99
100/* this is whats in the brush cache */
101typedef struct _BRUSHDATA
102{
103 uint32 colour_code;
104 uint32 data_size;
105 uint8 *data;
106}
107BRUSHDATA;
108
109typedef struct _BRUSH
110{
111 uint8 xorigin;
112 uint8 yorigin;
113 uint8 style;
114 uint8 pattern[8];
115 BRUSHDATA *bd;
116}
117BRUSH;
118
119typedef struct _FONTGLYPH
120{
121 sint16 offset;
122 sint16 baseline;
123 uint16 width;
124 uint16 height;
125 RD_HBITMAP pixmap;
126
127}
128FONTGLYPH;
129
130typedef struct _DATABLOB
131{
132 void *data;
133 int size;
134
135}
136DATABLOB;
137
138typedef struct _key_translation
139{
140 /* For normal scancode translations */
141 uint8 scancode;
142 uint16 modifiers;
143 /* For sequences. If keysym is nonzero, the fields above are not used. */
144 uint32 seq_keysym; /* Really KeySym */
145 struct _key_translation *next;
146}
147key_translation;
148
149typedef struct _key_translation_entry
150{
151 key_translation *tr;
152 /* The full KeySym for this entry, not KEYMAP_MASKed */
153 uint32 keysym;
154 /* This will be non-NULL if there has been a hash collision */
155 struct _key_translation_entry *next;
156}
157key_translation_entry;
158
159typedef struct _VCHANNEL
160{
161 uint16 mcs_id;
162 char name[8];
163 uint32 flags;
164 struct stream in;
165 void (*process) (STREAM);
166}
167VCHANNEL;
168
169/* PSTCACHE */
170typedef uint8 HASH_KEY[8];
171
172/* Header for an entry in the persistent bitmap cache file */
173typedef struct _PSTCACHE_CELLHEADER
174{
175 HASH_KEY key;
176 uint8 width, height;
177 uint16 length;
178 uint32 stamp;
179}
180CELLHEADER;
181
182#define MAX_CBSIZE 256
183
184/* RDPSND */
185typedef struct _RD_WAVEFORMATEX
186{
187 uint16 wFormatTag;
188 uint16 nChannels;
189 uint32 nSamplesPerSec;
190 uint32 nAvgBytesPerSec;
191 uint16 nBlockAlign;
192 uint16 wBitsPerSample;
193 uint16 cbSize;
194 uint8 cb[MAX_CBSIZE];
195} RD_WAVEFORMATEX;
196
197typedef struct _RDPCOMP
198{
199 uint32 roff;
200 uint8 hist[RDP_MPPC_DICT_SIZE];
201 struct stream ns;
202}
203RDPCOMP;
204
205/* RDPDR */
206typedef uint32 RD_NTSTATUS;
207typedef uint32 RD_NTHANDLE;
208
209typedef struct _DEVICE_FNS
210{
211 RD_NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
212 uint32 create_disposition, uint32 flags_and_attributes,
213 char *filename, RD_NTHANDLE * handle);
214 RD_NTSTATUS(*close) (RD_NTHANDLE handle);
215 RD_NTSTATUS(*read) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
216 uint32 * result);
217 RD_NTSTATUS(*write) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
218 uint32 * result);
219 RD_NTSTATUS(*device_control) (RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out);
220}
221DEVICE_FNS;
222
223
224typedef struct rdpdr_device_info
225{
226 uint32 device_type;
227 RD_NTHANDLE handle;
228 char name[8];
229 char *local_path;
230 void *pdevice_data;
231}
232RDPDR_DEVICE;
233
234typedef struct rdpdr_serial_device_info
235{
236 int dtr;
237 int rts;
238 uint32 control, xonoff, onlimit, offlimit;
239 uint32 baud_rate,
240 queue_in_size,
241 queue_out_size,
242 wait_mask,
243 read_interval_timeout,
244 read_total_timeout_multiplier,
245 read_total_timeout_constant,
246 write_total_timeout_multiplier, write_total_timeout_constant, posix_wait_mask;
247 uint8 stop_bits, parity, word_length;
248 uint8 chars[6];
249 struct termios *ptermios, *pold_termios;
250 int event_txempty, event_cts, event_dsr, event_rlsd, event_pending;
251}
252SERIAL_DEVICE;
253
254typedef struct rdpdr_parallel_device_info
255{
256 char *driver, *printer;
257 uint32 queue_in_size,
258 queue_out_size,
259 wait_mask,
260 read_interval_timeout,
261 read_total_timeout_multiplier,
262 read_total_timeout_constant,
263 write_total_timeout_multiplier,
264 write_total_timeout_constant, posix_wait_mask, bloblen;
265 uint8 *blob;
266}
267PARALLEL_DEVICE;
268
269typedef struct rdpdr_printer_info
270{
271 FILE *printer_fp;
272 char *driver, *printer;
273 uint32 bloblen;
274 uint8 *blob;
275 RD_BOOL default_printer;
276}
277PRINTER;
278
279typedef struct notify_data
280{
281 time_t modify_time;
282 time_t status_time;
283 time_t total_time;
284 unsigned int num_entries;
285}
286NOTIFY;
287
288#ifndef PATH_MAX
289#define PATH_MAX 256
290#endif
291
292typedef struct fileinfo
293{
294 uint32 device_id, flags_and_attributes, accessmask;
295 char path[PATH_MAX];
296 DIR *pdir;
297 struct dirent *pdirent;
298 char pattern[PATH_MAX];
299 RD_BOOL delete_on_close;
300 NOTIFY notify;
301 uint32 info_class;
302}
303FILEINFO;
304
305typedef 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