/[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 1309 - (hide annotations)
Wed Nov 1 20:52:01 2006 UTC (17 years, 8 months ago) by stargo
File MIME type: text/plain
File size: 5124 byte(s)
Smartcard support by Alexi Volkov <alexi@pravex.kiev.ua> and additional
patches for smartcard-support by Jennings Jared <jared.jennings.ctr@eglin.af.mil>

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

  ViewVC Help
Powered by ViewVC 1.1.26