/[rdesktop]/sourceforge.net/trunk/rdesktop/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 /sourceforge.net/trunk/rdesktop/types.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1365 - (hide annotations)
Thu Jan 4 05:39:39 2007 UTC (17 years, 5 months ago) by jsorg71
File MIME type: text/plain
File size: 5281 byte(s)
copyright year update

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

  ViewVC Help
Powered by ViewVC 1.1.26