ReactOS  0.4.15-dev-1201-gb2cf5a4
types.h
Go to the documentation of this file.
1 /*
2  rdesktop: A Remote Desktop Protocol client.
3  Common data types
4  Copyright (C) Matthew Chapman 1999-2005
5 
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 
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.
15 
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.
19 */
20 
21 #if 0
22 typedef int BOOL;
23 #endif
24 
25 #ifndef True
26 #define True (1)
27 #define False (0)
28 #endif
29 
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;
36 
37 // TODO: detect Win32, avoid this mess
38 #if 0
39 typedef void *HBITMAP;
40 typedef void *HCURSOR;
41 #endif
42 typedef void *HGLYPH;
43 
44 // TODO: nuke, use HPALETTE
45 typedef void *HCOLOURMAP;
46 
47 #if 0
48 typedef struct _POINT
49 {
50  sint16 x, y;
51 }
52 POINT;
53 #endif
54 
55 // TODO: nuke, use COLORREF
56 typedef struct _COLOURENTRY
57 {
58  uint8 red;
59  uint8 green;
60  uint8 blue;
61 
62 }
64 
65 // TODO: nuke, use LOGPALETTE
66 typedef struct _COLOURMAP
67 {
70 
71 }
72 COLOURMAP;
73 
74 // TODO: nuke, use RECT
75 typedef struct _BOUNDS
76 {
77  sint16 left;
78  sint16 top;
79  sint16 right;
80  sint16 bottom;
81 
82 }
83 BOUNDS;
84 
85 // TODO: nuke, use LOGPEN
86 typedef struct _PEN
87 {
88  uint8 style;
89  uint8 width;
90  uint32 colour;
91 
92 }
93 PEN;
94 
95 typedef struct _BRUSH
96 {
97  uint8 xorigin;
98  uint8 yorigin;
99  uint8 style;
100  uint8 pattern[8];
101 
102 }
103 BRUSH;
104 
105 typedef struct _FONTGLYPH
106 {
107  sint16 offset;
109  uint16 width;
110  uint16 height;
112 
113 }
114 FONTGLYPH;
115 
116 typedef struct _DATABLOB
117 {
118  void *data;
119  int size;
120 
121 }
122 DATABLOB;
123 
124 typedef struct _key_translation
125 {
126  /* For normal scancode translations */
127  uint8 scancode;
129  /* For sequences. If keysym is nonzero, the fields above are not used. */
130  uint32 seq_keysym; /* Really KeySym */
131  struct _key_translation *next;
132 }
134 
135 typedef struct _VCHANNEL
136 {
137  CHANNEL_DEF def;
138  uint16 mcs_id;
139  struct stream in;
140  void (*process) (RDPCLIENT *, STREAM);
141 }
142 VCHANNEL;
143 
144 /* PSTCACHE */
145 typedef uint8 HASH_KEY[8];
146 
147 /* Header for an entry in the persistent bitmap cache file */
148 typedef struct _PSTCACHE_CELLHEADER
149 {
150  HASH_KEY key;
151  uint8 width, height;
152  uint16 length;
153  uint32 stamp;
154 }
155 CELLHEADER;
156 
157 #define MAX_CBSIZE 256
158 
159 /* RDPSND */
160 #if 0
161 typedef struct
162 {
163  uint16 wFormatTag;
165  uint32 nSamplesPerSec;
166  uint32 nAvgBytesPerSec;
167  uint16 nBlockAlign;
168  uint16 wBitsPerSample;
169  uint16 cbSize;
171 } WAVEFORMATEX;
172 #endif
173 typedef struct _RDPCOMP
174 {
175  uint32 roff;
177  struct stream ns;
178 }
179 RDPCOMP;
180 
181 #if 0
182 /* RDPDR */
183 typedef uint32 NTSTATUS;
184 typedef uint32 NTHANDLE;
185 
186 typedef struct _DEVICE_FNS
187 {
188  NTSTATUS(*create) (RDPCLIENT * This, uint32 device, uint32 desired_access, uint32 share_mode,
189  uint32 create_disposition, uint32 flags_and_attributes, char *filename,
190  NTHANDLE * handle);
191  NTSTATUS(*close) (RDPCLIENT * This, NTHANDLE handle);
193  uint32 * result);
195  uint32 * result);
197 }
198 DEVICE_FNS;
199 
200 
201 typedef struct rdpdr_device_info
202 {
204  NTHANDLE handle;
205  char name[8];
206  char *local_path;
207  void *pdevice_data;
208 }
210 
211 typedef struct rdpdr_serial_device_info
212 {
213  int dtr;
214  int rts;
219  wait_mask,
225  uint8 chars[6];
226  struct termios *ptermios, *pold_termios;
228 }
230 
231 typedef struct rdpdr_parallel_device_info
232 {
233  char *driver, *printer;
236  wait_mask,
242  uint8 *blob;
243 }
245 
246 typedef struct rdpdr_printer_info
247 {
248  FILE *printer_fp;
249  char *driver, *printer;
250  uint32 bloblen;
251  uint8 *blob;
253 }
254 PRINTER;
255 
256 typedef struct notify_data
257 {
261  unsigned int num_entries;
262 }
263 NOTIFY;
264 
265 #ifndef PATH_MAX
266 #define PATH_MAX 256
267 #endif
268 
269 typedef struct fileinfo
270 {
272  char path[PATH_MAX];
273  DIR *pdir;
274  struct dirent *pdirent;
275  char pattern[PATH_MAX];
277  NOTIFY notify;
279 }
280 FILEINFO;
281 #endif
282 
283 typedef BOOL(*str_handle_lines_t) (RDPCLIENT * This, const char *line, void *data);
time_t status_time
Definition: types.h:273
Definition: types.h:72
#define MAX_CBSIZE
Definition: types.h:157
RD_NTHANDLE handle
Definition: types.h:218
HBITMAP pixmap
Definition: types.h:111
uint32 read_interval_timeout
Definition: types.h:248
uint32 write_total_timeout_multiplier
Definition: types.h:230
signed int sint32
Definition: types.h:33
struct _FONTGLYPH FONTGLYPH
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
uint32 read_total_timeout_constant
Definition: types.h:248
uint16 ncolours
Definition: types.h:66
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
uint32 read_interval_timeout
Definition: types.h:230
uint32 device_id
Definition: types.h:285
uint32 flags_and_attributes
Definition: types.h:285
uint8 yorigin
Definition: types.h:103
int size
Definition: types.h:124
signed char sint8
Definition: types.h:29
struct rdpdr_parallel_device_info PARALLEL_DEVICE
unsigned int uint32
Definition: types.h:32
uint8 xorigin
Definition: types.h:102
CHANNEL_DEF def
Definition: types.h:137
Definition: types.h:82
uint16 height
Definition: types.h:115
char * printer
Definition: types.h:263
GLintptr offset
Definition: glext.h:5920
struct _BRUSH BRUSH
struct _COLOURMAP COLOURMAP
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
sint16 baseline
Definition: types.h:113
struct tWAVEFORMATEX WAVEFORMATEX
Definition: austream.idl:23
struct _PEN PEN
struct _key_translation * next
Definition: types.h:136
HICON HCURSOR
Definition: windef.h:299
char * driver
Definition: types.h:263
const char * filename
Definition: ioapi.h:135
int nChannels
Definition: pcmconverter.c:95
#define BOOL
Definition: nt_native.h:43
time_t modify_time
Definition: types.h:272
uint32 accessmask
Definition: types.h:285
struct termios * pold_termios
Definition: types.h:240
Definition: fatfs.h:198
sint16 right
Definition: types.h:76
uint32 read_total_timeout_constant
Definition: types.h:230
void * pdevice_data
Definition: types.h:221
uint32 write_total_timeout_constant
Definition: types.h:248
NOTIFY notify
Definition: types.h:291
RD_BOOL default_printer
Definition: types.h:266
uint32 read_total_timeout_multiplier
Definition: types.h:230
uint32 read_total_timeout_multiplier
Definition: types.h:248
#define RDP_MPPC_DICT_SIZE
Definition: constants.h:358
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: devices.h:37
uint8 width
Definition: types.h:85
Definition: dirent.h:39
struct termios * ptermios
Definition: types.h:240
struct _BOUNDS BOUNDS
RD_NTSTATUS(* write)(RD_NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
Definition: types.h:208
uint8 HASH_KEY[8]
Definition: types.h:161
void * HGLYPH
Definition: types.h:42
uint8 * blob
Definition: types.h:265
RD_BOOL delete_on_close
Definition: types.h:290
uint32 bloblen
Definition: types.h:264
struct rdpdr_serial_device_info SERIAL_DEVICE
uint8 blue
Definition: types.h:59
RD_BOOL(* str_handle_lines_t)(const char *line, void *data)
Definition: types.h:296
COLOURENTRY * colours
Definition: types.h:67
uint16 mcs_id
Definition: types.h:152
Definition: types.h:100
#define POINT
Definition: precomp.h:30
uint32 info_class
Definition: types.h:292
char * local_path
Definition: types.h:220
RD_NTSTATUS(* device_control)(RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out)
Definition: types.h:210
sint16 left
Definition: types.h:74
struct rdpdr_printer_info PRINTER
uint32 seq_keysym
Definition: types.h:135
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
struct stream * STREAM
sint16 bottom
Definition: types.h:77
static FILE * out
Definition: regtests2xml.c:44
#define PATH_MAX
Definition: types.h:280
unsigned char uint8
Definition: types.h:28
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
FILE * printer_fp
Definition: types.h:262
struct _RDPCOMP RDPCOMP
uint32 colour
Definition: types.h:86
char line[200]
Definition: main.c:97
struct dirent * pdirent
Definition: types.h:288
struct _key_translation key_translation
Definition: mxnamespace.c:44
Definition: parse.h:22
#define NTSTATUS
Definition: precomp.h:20
struct _COLOURENTRY COLOURENTRY
uint32 write_total_timeout_constant
Definition: types.h:230
unsigned int num_entries
Definition: types.h:275
sint16 top
Definition: types.h:75
void * data
Definition: types.h:123
signed short sint16
Definition: types.h:31
RD_NTSTATUS(* create)(uint32 device, uint32 desired_access, uint32 share_mode, uint32 create_disposition, uint32 flags_and_attributes, char *filename, RD_NTHANDLE *handle)
Definition: types.h:202
void * HCOLOURMAP
Definition: types.h:45
uint16 width
Definition: types.h:114
uint8 green
Definition: types.h:58
sint16 offset
Definition: types.h:112
DIR * pdir
Definition: types.h:287
uint32 write_total_timeout_multiplier
Definition: types.h:248
uint32 roff
Definition: types.h:190
struct _DEVICE_FNS DEVICE_FNS
struct _PSTCACHE_CELLHEADER CELLHEADER
GLuint in
Definition: glext.h:9616
uint8 scancode
Definition: types.h:132
__kernel_time_t time_t
Definition: linux.h:252
struct notify_data NOTIFY
unsigned short uint16
Definition: types.h:30
uint8 style
Definition: types.h:84
uint32 device_type
Definition: types.h:217
struct rdpdr_device_info RDPDR_DEVICE
struct fileinfo FILEINFO
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
Definition: tftpd.h:85
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
Definition: name.c:38
RD_NTSTATUS(* read)(RD_NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
Definition: types.h:206
uint8 red
Definition: types.h:57
struct _DATABLOB DATABLOB
struct _VCHANNEL VCHANNEL
static HBITMAP
Definition: button.c:44
uint8 hist[RDP_MPPC_DICT_SIZE]
Definition: types.h:191
GLuint64EXT * result
Definition: glext.h:11304
time_t total_time
Definition: types.h:274
uint8 style
Definition: types.h:104
RD_NTSTATUS(* close)(RD_NTHANDLE handle)
Definition: types.h:205
HASH_KEY key
Definition: types.h:166
uint16 modifiers
Definition: types.h:133
GLubyte * pattern
Definition: glext.h:7787