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 along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 typedef unsigned char uint8
;
27 typedef signed char sint8
;
28 typedef unsigned short uint16
;
29 typedef signed short sint16
;
30 typedef unsigned int uint32
;
31 typedef signed int sint32
;
33 typedef void *RD_HBITMAP
;
34 typedef void *RD_HGLYPH
;
35 typedef void *RD_HCOLOURMAP
;
36 typedef void *RD_HCURSOR
;
38 typedef struct _RD_POINT
44 typedef struct _COLOURENTRY
53 typedef struct _COLOURMAP
61 typedef struct _BOUNDS
90 typedef struct _FONTGLYPH
101 typedef struct _DATABLOB
109 typedef struct _key_translation
111 /* For normal scancode translations */
114 /* For sequences. If keysym is nonzero, the fields above are not used. */
115 uint32 seq_keysym
; /* Really KeySym */
116 struct _key_translation
*next
;
120 typedef struct _VCHANNEL
126 void (*process
) (STREAM
);
131 typedef uint8 HASH_KEY
[8];
133 /* Header for an entry in the persistent bitmap cache file */
134 typedef struct _PSTCACHE_CELLHEADER
143 #define MAX_CBSIZE 256
150 uint32 nSamplesPerSec
;
151 uint32 nAvgBytesPerSec
;
153 uint16 wBitsPerSample
;
155 uint8 cb
[MAX_CBSIZE
];
158 typedef struct _RDPCOMP
161 uint8 hist
[RDP_MPPC_DICT_SIZE
];
167 typedef uint32 RD_NTSTATUS
;
168 typedef uint32 RD_NTHANDLE
;
170 typedef struct _DEVICE_FNS
172 RD_NTSTATUS(*create
) (uint32 device
, uint32 desired_access
, uint32 share_mode
,
173 uint32 create_disposition
, uint32 flags_and_attributes
, char *filename
,
174 RD_NTHANDLE
* handle
);
175 RD_NTSTATUS(*close
) (RD_NTHANDLE handle
);
176 RD_NTSTATUS(*read
) (RD_NTHANDLE handle
, uint8
* data
, uint32 length
, uint32 offset
,
178 RD_NTSTATUS(*write
) (RD_NTHANDLE handle
, uint8
* data
, uint32 length
, uint32 offset
,
180 RD_NTSTATUS(*device_control
) (RD_NTHANDLE handle
, uint32 request
, STREAM in
, STREAM out
);
185 typedef struct rdpdr_device_info
195 typedef struct rdpdr_serial_device_info
199 uint32 control
, xonoff
, onlimit
, offlimit
;
204 read_interval_timeout
,
205 read_total_timeout_multiplier
,
206 read_total_timeout_constant
,
207 write_total_timeout_multiplier
, write_total_timeout_constant
, posix_wait_mask
;
208 uint8 stop_bits
, parity
, word_length
;
210 struct termios
*ptermios
, *pold_termios
;
211 int event_txempty
, event_cts
, event_dsr
, event_rlsd
, event_pending
;
215 typedef struct rdpdr_parallel_device_info
217 char *driver
, *printer
;
218 uint32 queue_in_size
,
221 read_interval_timeout
,
222 read_total_timeout_multiplier
,
223 read_total_timeout_constant
,
224 write_total_timeout_multiplier
,
225 write_total_timeout_constant
, posix_wait_mask
, bloblen
;
230 typedef struct rdpdr_printer_info
233 char *driver
, *printer
;
236 BOOL default_printer
;
240 typedef struct notify_data
245 unsigned int num_entries
;
254 typedef struct fileinfo
256 uint32 device_id
, flags_and_attributes
, accessmask
;
259 struct dirent
*pdirent
;
260 char pattern
[PATH_MAX
];
261 BOOL delete_on_close
;
268 typedef BOOL(*str_handle_lines_t
) (const char *line
, void *data
);