/[rdesktop]/jpeg/rdesktop/trunk/types.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /jpeg/rdesktop/trunk/types.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1485 - (hide annotations)
Tue Nov 25 08:05:25 2008 UTC (15 years, 5 months ago) by astrand
Original Path: sourceforge.net/trunk/rdesktop/types.h
File MIME type: text/plain
File size: 5319 byte(s)
Ran indent-all

1 matty 10 /*
2     rdesktop: A Remote Desktop Protocol client.
3     Common data types
4 jsorg71 1475 Copyright (C) Matthew Chapman 1999-2008
5 jsorg71 1364
6 matty 10 This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 n-ki 569
11 matty 10 This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     GNU General Public License for more details.
15 jsorg71 1364
16 matty 10 You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19     */
20    
21 jsorg71 1372 typedef int RD_BOOL;
22 matty 10
23     #ifndef True
24     #define True (1)
25     #define False (0)
26     #endif
27    
28     typedef unsigned char uint8;
29 matthewc 299 typedef signed char sint8;
30 matty 10 typedef unsigned short uint16;
31 matthewc 299 typedef signed short sint16;
32 matty 10 typedef unsigned int uint32;
33 matthewc 299 typedef signed int sint32;
34 matty 10
35 jsorg71 1364 typedef void *RD_HBITMAP;
36     typedef void *RD_HGLYPH;
37     typedef void *RD_HCOLOURMAP;
38     typedef void *RD_HCURSOR;
39 matty 10
40 jsorg71 1364 typedef struct _RD_POINT
41 jdmeijer 831 {
42     sint16 x, y;
43     }
44 jsorg71 1364 RD_POINT;
45 jdmeijer 831
46 matty 10 typedef struct _COLOURENTRY
47     {
48     uint8 red;
49     uint8 green;
50     uint8 blue;
51    
52 astrand 64 }
53     COLOURENTRY;
54 matty 10
55     typedef struct _COLOURMAP
56     {
57     uint16 ncolours;
58     COLOURENTRY *colours;
59    
60 astrand 64 }
61     COLOURMAP;
62 matty 10
63     typedef struct _BOUNDS
64     {
65 jsorg71 375 sint16 left;
66     sint16 top;
67     sint16 right;
68     sint16 bottom;
69 matty 10
70 astrand 64 }
71     BOUNDS;
72 matty 10
73     typedef struct _PEN
74     {
75     uint8 style;
76     uint8 width;
77 jsorg71 309 uint32 colour;
78 matty 10
79 astrand 64 }
80     PEN;
81 matty 10
82 jsorg71 1474 /* this is whats in the brush cache */
83     typedef struct _BRUSHDATA
84     {
85 jsorg71 1483 uint32 colour_code;
86     uint32 data_size;
87 astrand 1485 uint8 *data;
88 jsorg71 1474 }
89     BRUSHDATA;
90    
91 matty 10 typedef struct _BRUSH
92     {
93     uint8 xorigin;
94     uint8 yorigin;
95     uint8 style;
96     uint8 pattern[8];
97 astrand 1485 BRUSHDATA *bd;
98 astrand 64 }
99     BRUSH;
100 matty 10
101     typedef struct _FONTGLYPH
102     {
103 matthewc 299 sint16 offset;
104     sint16 baseline;
105 matty 10 uint16 width;
106     uint16 height;
107 jsorg71 1364 RD_HBITMAP pixmap;
108 matty 10
109 astrand 64 }
110     FONTGLYPH;
111 matty 10
112     typedef struct _DATABLOB
113     {
114     void *data;
115     int size;
116    
117 astrand 64 }
118     DATABLOB;
119 astrand 66
120     typedef struct _key_translation
121     {
122 astrand 949 /* For normal scancode translations */
123 astrand 66 uint8 scancode;
124     uint16 modifiers;
125 astrand 949 /* For sequences. If keysym is nonzero, the fields above are not used. */
126     uint32 seq_keysym; /* Really KeySym */
127     struct _key_translation *next;
128 astrand 66 }
129     key_translation;
130 forsberg 413
131 matthewc 432 typedef struct _VCHANNEL
132     {
133     uint16 mcs_id;
134     char name[8];
135     uint32 flags;
136     struct stream in;
137     void (*process) (STREAM);
138     }
139     VCHANNEL;
140 forsberg 413
141 jsorg71 725 /* PSTCACHE */
142 jdmeijer 830 typedef uint8 HASH_KEY[8];
143 jsorg71 725
144     /* Header for an entry in the persistent bitmap cache file */
145     typedef struct _PSTCACHE_CELLHEADER
146     {
147 jdmeijer 830 HASH_KEY key;
148 jsorg71 725 uint8 width, height;
149     uint16 length;
150     uint32 stamp;
151     }
152     CELLHEADER;
153    
154 stargo 492 #define MAX_CBSIZE 256
155    
156 matthewc 474 /* RDPSND */
157 jsorg71 1364 typedef struct _RD_WAVEFORMATEX
158 astrand 499 {
159     uint16 wFormatTag;
160     uint16 nChannels;
161     uint32 nSamplesPerSec;
162     uint32 nAvgBytesPerSec;
163     uint16 nBlockAlign;
164     uint16 wBitsPerSample;
165     uint16 cbSize;
166     uint8 cb[MAX_CBSIZE];
167 jsorg71 1364 } RD_WAVEFORMATEX;
168 matthewc 474
169 n-ki 683 typedef struct _RDPCOMP
170     {
171     uint32 roff;
172     uint8 hist[RDP_MPPC_DICT_SIZE];
173     struct stream ns;
174     }
175     RDPCOMP;
176    
177 matthewc 432 /* RDPDR */
178 jsorg71 1364 typedef uint32 RD_NTSTATUS;
179     typedef uint32 RD_NTHANDLE;
180 matthewc 432
181     typedef struct _DEVICE_FNS
182 forsberg 413 {
183 jsorg71 1364 RD_NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
184     uint32 create_disposition, uint32 flags_and_attributes,
185     char *filename, RD_NTHANDLE * handle);
186     RD_NTSTATUS(*close) (RD_NTHANDLE handle);
187     RD_NTSTATUS(*read) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
188     uint32 * result);
189     RD_NTSTATUS(*write) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
190     uint32 * result);
191     RD_NTSTATUS(*device_control) (RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out);
192 forsberg 413 }
193 matthewc 432 DEVICE_FNS;
194 n-ki 569
195    
196     typedef struct rdpdr_device_info
197     {
198 astrand 580 uint32 device_type;
199 jsorg71 1364 RD_NTHANDLE handle;
200 astrand 580 char name[8];
201     char *local_path;
202     void *pdevice_data;
203 n-ki 569 }
204     RDPDR_DEVICE;
205    
206     typedef struct rdpdr_serial_device_info
207     {
208 astrand 580 int dtr;
209 n-ki 627 int rts;
210 stargo 795 uint32 control, xonoff, onlimit, offlimit;
211 astrand 580 uint32 baud_rate,
212     queue_in_size,
213     queue_out_size,
214     wait_mask,
215     read_interval_timeout,
216     read_total_timeout_multiplier,
217     read_total_timeout_constant,
218     write_total_timeout_multiplier, write_total_timeout_constant, posix_wait_mask;
219     uint8 stop_bits, parity, word_length;
220 stargo 795 uint8 chars[6];
221 astrand 580 struct termios *ptermios, *pold_termios;
222 stargo 795 int event_txempty, event_cts, event_dsr, event_rlsd, event_pending;
223 n-ki 569 }
224     SERIAL_DEVICE;
225    
226     typedef struct rdpdr_parallel_device_info
227     {
228 astrand 580 char *driver, *printer;
229     uint32 queue_in_size,
230     queue_out_size,
231     wait_mask,
232     read_interval_timeout,
233     read_total_timeout_multiplier,
234     read_total_timeout_constant,
235     write_total_timeout_multiplier,
236     write_total_timeout_constant, posix_wait_mask, bloblen;
237     uint8 *blob;
238 n-ki 569 }
239     PARALLEL_DEVICE;
240    
241     typedef struct rdpdr_printer_info
242     {
243 astrand 580 FILE *printer_fp;
244     char *driver, *printer;
245     uint32 bloblen;
246     uint8 *blob;
247 jsorg71 1372 RD_BOOL default_printer;
248 n-ki 569 }
249     PRINTER;
250 n-ki 627
251 stargo 795 typedef struct notify_data
252     {
253     time_t modify_time;
254     time_t status_time;
255     time_t total_time;
256     unsigned int num_entries;
257     }
258     NOTIFY;
259    
260 stargo 978 #ifndef PATH_MAX
261     #define PATH_MAX 256
262     #endif
263    
264 n-ki 627 typedef struct fileinfo
265     {
266 stargo 795 uint32 device_id, flags_and_attributes, accessmask;
267 stargo 978 char path[PATH_MAX];
268 n-ki 627 DIR *pdir;
269     struct dirent *pdirent;
270 stargo 978 char pattern[PATH_MAX];
271 jsorg71 1372 RD_BOOL delete_on_close;
272 stargo 795 NOTIFY notify;
273     uint32 info_class;
274 n-ki 627 }
275     FILEINFO;
276 astrand 1053
277 jsorg71 1372 typedef RD_BOOL(*str_handle_lines_t) (const char *line, void *data);

  ViewVC Help
Powered by ViewVC 1.1.26