~ubuntu-branches/ubuntu/lucid/rdesktop/lucid-security

« back to all changes in this revision

Viewing changes to types.h

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-10-21 21:34:16 UTC
  • Revision ID: james.westby@ubuntu.com-20071021213416-vcd360i0higuj6n8
Tags: 1.5.0-3+cvs20071006
Fix segfault in XGetPointerMapping() thanks to Felix Domke
(closes: #445779).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
   rdesktop: A Remote Desktop Protocol client.
3
3
   Common data types
4
 
   Copyright (C) Matthew Chapman 1999-2005
5
 
   
 
4
   Copyright (C) Matthew Chapman 1999-2007
 
5
 
6
6
   This program is free software; you can redistribute it and/or modify
7
7
   it under the terms of the GNU General Public License as published by
8
8
   the Free Software Foundation; either version 2 of the License, or
12
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
14
   GNU General Public License for more details.
15
 
   
 
15
 
16
16
   You should have received a copy of the GNU General Public License
17
17
   along with this program; if not, write to the Free Software
18
18
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
*/
20
20
 
21
 
typedef int BOOL;
 
21
typedef int RD_BOOL;
22
22
 
23
23
#ifndef True
24
24
#define True  (1)
32
32
typedef unsigned int uint32;
33
33
typedef signed int sint32;
34
34
 
35
 
typedef void *HBITMAP;
36
 
typedef void *HGLYPH;
37
 
typedef void *HCOLOURMAP;
38
 
typedef void *HCURSOR;
 
35
typedef void *RD_HBITMAP;
 
36
typedef void *RD_HGLYPH;
 
37
typedef void *RD_HCOLOURMAP;
 
38
typedef void *RD_HCURSOR;
39
39
 
40
 
typedef struct _POINT
 
40
typedef struct _RD_POINT
41
41
{
42
42
        sint16 x, y;
43
43
}
44
 
POINT;
 
44
RD_POINT;
45
45
 
46
46
typedef struct _COLOURENTRY
47
47
{
95
95
        sint16 baseline;
96
96
        uint16 width;
97
97
        uint16 height;
98
 
        HBITMAP pixmap;
 
98
        RD_HBITMAP pixmap;
99
99
 
100
100
}
101
101
FONTGLYPH;
145
145
#define MAX_CBSIZE 256
146
146
 
147
147
/* RDPSND */
148
 
typedef struct
 
148
typedef struct _RD_WAVEFORMATEX
149
149
{
150
150
        uint16 wFormatTag;
151
151
        uint16 nChannels;
155
155
        uint16 wBitsPerSample;
156
156
        uint16 cbSize;
157
157
        uint8 cb[MAX_CBSIZE];
158
 
} WAVEFORMATEX;
 
158
} RD_WAVEFORMATEX;
159
159
 
160
160
typedef struct _RDPCOMP
161
161
{
166
166
RDPCOMP;
167
167
 
168
168
/* RDPDR */
169
 
typedef uint32 NTSTATUS;
170
 
typedef uint32 NTHANDLE;
 
169
typedef uint32 RD_NTSTATUS;
 
170
typedef uint32 RD_NTHANDLE;
171
171
 
172
172
typedef struct _DEVICE_FNS
173
173
{
174
 
        NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
175
 
                           uint32 create_disposition, uint32 flags_and_attributes, char *filename,
176
 
                           NTHANDLE * handle);
177
 
        NTSTATUS(*close) (NTHANDLE handle);
178
 
        NTSTATUS(*read) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
179
 
                         uint32 * result);
180
 
        NTSTATUS(*write) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
181
 
                          uint32 * result);
182
 
        NTSTATUS(*device_control) (NTHANDLE handle, uint32 request, STREAM in, STREAM out);
 
174
        RD_NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
 
175
                              uint32 create_disposition, uint32 flags_and_attributes,
 
176
                              char *filename, RD_NTHANDLE * handle);
 
177
        RD_NTSTATUS(*close) (RD_NTHANDLE handle);
 
178
        RD_NTSTATUS(*read) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
 
179
                            uint32 * result);
 
180
        RD_NTSTATUS(*write) (RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
 
181
                             uint32 * result);
 
182
        RD_NTSTATUS(*device_control) (RD_NTHANDLE handle, uint32 request, STREAM in, STREAM out);
183
183
}
184
184
DEVICE_FNS;
185
185
 
187
187
typedef struct rdpdr_device_info
188
188
{
189
189
        uint32 device_type;
190
 
        NTHANDLE handle;
 
190
        RD_NTHANDLE handle;
191
191
        char name[8];
192
192
        char *local_path;
193
193
        void *pdevice_data;
235
235
        char *driver, *printer;
236
236
        uint32 bloblen;
237
237
        uint8 *blob;
238
 
        BOOL default_printer;
 
238
        RD_BOOL default_printer;
239
239
}
240
240
PRINTER;
241
241
 
259
259
        DIR *pdir;
260
260
        struct dirent *pdirent;
261
261
        char pattern[PATH_MAX];
262
 
        BOOL delete_on_close;
 
262
        RD_BOOL delete_on_close;
263
263
        NOTIFY notify;
264
264
        uint32 info_class;
265
265
}
266
266
FILEINFO;
267
267
 
268
 
typedef BOOL(*str_handle_lines_t) (const char *line, void *data);
 
268
typedef RD_BOOL(*str_handle_lines_t) (const char *line, void *data);