2 rdesktop: A Remote Desktop Protocol client.
4 Copyright (C) Matthew Chapman 1999-2005
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.
11 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.
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.
30 typedef unsigned char uint8
;
31 typedef signed char sint8
;
32 typedef unsigned short uint16
;
33 typedef signed short sint16
;
34 typedef unsigned int uint32
;
35 typedef signed int sint32
;
37 // TODO: detect Win32, avoid this mess
39 typedef void *HBITMAP
;
40 typedef void *HCURSOR
;
44 // TODO: nuke, use HPALETTE
45 typedef void *HCOLOURMAP
;
55 // TODO: nuke, use COLORREF
56 typedef struct _COLOURENTRY
65 // TODO: nuke, use LOGPALETTE
66 typedef struct _COLOURMAP
74 // TODO: nuke, use RECT
75 typedef struct _BOUNDS
85 // TODO: nuke, use LOGPEN
105 typedef struct _FONTGLYPH
116 typedef struct _DATABLOB
124 typedef struct _key_translation
126 /* For normal scancode translations */
129 /* For sequences. If keysym is nonzero, the fields above are not used. */
130 uint32 seq_keysym
; /* Really KeySym */
131 struct _key_translation
*next
;
135 typedef struct _VCHANNEL
140 void (*process
) (RDPCLIENT
*, STREAM
);
145 typedef uint8 HASH_KEY
[8];
147 /* Header for an entry in the persistent bitmap cache file */
148 typedef struct _PSTCACHE_CELLHEADER
157 #define MAX_CBSIZE 256
165 uint32 nSamplesPerSec
;
166 uint32 nAvgBytesPerSec
;
168 uint16 wBitsPerSample
;
170 uint8 cb
[MAX_CBSIZE
];
173 typedef struct _RDPCOMP
176 uint8 hist
[RDP_MPPC_DICT_SIZE
];
183 typedef uint32 NTSTATUS
;
184 typedef uint32 NTHANDLE
;
186 typedef struct _DEVICE_FNS
188 NTSTATUS(*create
) (RDPCLIENT
* This
, uint32 device
, uint32 desired_access
, uint32 share_mode
,
189 uint32 create_disposition
, uint32 flags_and_attributes
, char *filename
,
191 NTSTATUS(*close
) (RDPCLIENT
* This
, NTHANDLE handle
);
192 NTSTATUS(*read
) (RDPCLIENT
* This
, NTHANDLE handle
, uint8
* data
, uint32 length
, uint32 offset
,
194 NTSTATUS(*write
) (RDPCLIENT
* This
, NTHANDLE handle
, uint8
* data
, uint32 length
, uint32 offset
,
196 NTSTATUS(*device_control
) (RDPCLIENT
* This
, NTHANDLE handle
, uint32 request
, STREAM in
, STREAM out
);
201 typedef struct rdpdr_device_info
211 typedef struct rdpdr_serial_device_info
215 uint32 control
, xonoff
, onlimit
, offlimit
;
220 read_interval_timeout
,
221 read_total_timeout_multiplier
,
222 read_total_timeout_constant
,
223 write_total_timeout_multiplier
, write_total_timeout_constant
, posix_wait_mask
;
224 uint8 stop_bits
, parity
, word_length
;
226 struct termios
*ptermios
, *pold_termios
;
227 int event_txempty
, event_cts
, event_dsr
, event_rlsd
, event_pending
;
231 typedef struct rdpdr_parallel_device_info
233 char *driver
, *printer
;
234 uint32 queue_in_size
,
237 read_interval_timeout
,
238 read_total_timeout_multiplier
,
239 read_total_timeout_constant
,
240 write_total_timeout_multiplier
,
241 write_total_timeout_constant
, posix_wait_mask
, bloblen
;
246 typedef struct rdpdr_printer_info
249 char *driver
, *printer
;
252 BOOL default_printer
;
256 typedef struct notify_data
261 unsigned int num_entries
;
269 typedef struct fileinfo
271 uint32 device_id
, flags_and_attributes
, accessmask
;
274 struct dirent
*pdirent
;
275 char pattern
[PATH_MAX
];
276 BOOL delete_on_close
;
283 typedef BOOL(*str_handle_lines_t
) (RDPCLIENT
* This
, const char *line
, void *data
);