/[rdesktop]/jpeg/rdesktop/trunk/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

Diff of /jpeg/rdesktop/trunk/types.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 309 by jsorg71, Tue Feb 4 05:32:13 2003 UTC revision 1309 by stargo, Wed Nov 1 20:52:01 2006 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Common data types     Common data types
4     Copyright (C) Matthew Chapman 1999-2002     Copyright (C) Matthew Chapman 1999-2005
5        
6     This program is free software; you can redistribute it and/or modify     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     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     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.     (at your option) any later version.
10      
11     This program is distributed in the hope that it will be useful,     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# Line 18  Line 18 
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */  */
20    
21    #ifdef WITH_SCARD
22    #include <wintypes.h>
23    #else
24  typedef int BOOL;  typedef int BOOL;
25    #endif
26    
27  #ifndef True  #ifndef True
28  #define True  (1)  #define True  (1)
# Line 37  typedef void *HGLYPH; Line 41  typedef void *HGLYPH;
41  typedef void *HCOLOURMAP;  typedef void *HCOLOURMAP;
42  typedef void *HCURSOR;  typedef void *HCURSOR;
43    
44    typedef struct _POINT
45    {
46            sint16 x, y;
47    }
48    POINT;
49    
50  typedef struct _COLOURENTRY  typedef struct _COLOURENTRY
51  {  {
52          uint8 red;          uint8 red;
# Line 56  COLOURMAP; Line 66  COLOURMAP;
66    
67  typedef struct _BOUNDS  typedef struct _BOUNDS
68  {  {
69          uint16 left;          sint16 left;
70          uint16 top;          sint16 top;
71          uint16 right;          sint16 right;
72          uint16 bottom;          sint16 bottom;
73    
74  }  }
75  BOUNDS;  BOUNDS;
# Line 104  DATABLOB; Line 114  DATABLOB;
114    
115  typedef struct _key_translation  typedef struct _key_translation
116  {  {
117            /* For normal scancode translations */
118          uint8 scancode;          uint8 scancode;
119          uint16 modifiers;          uint16 modifiers;
120            /* For sequences. If keysym is nonzero, the fields above are not used. */
121            uint32 seq_keysym;      /* Really KeySym */
122            struct _key_translation *next;
123  }  }
124  key_translation;  key_translation;
125    
126    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    
136    /* PSTCACHE */
137    typedef uint8 HASH_KEY[8];
138    
139    /* Header for an entry in the persistent bitmap cache file */
140    typedef struct _PSTCACHE_CELLHEADER
141    {
142            HASH_KEY key;
143            uint8 width, height;
144            uint16 length;
145            uint32 stamp;
146    }
147    CELLHEADER;
148    
149    #define MAX_CBSIZE 256
150    
151    /* RDPSND */
152    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    } WAVEFORMATEX;
163    
164    typedef struct _RDPCOMP
165    {
166            uint32 roff;
167            uint8 hist[RDP_MPPC_DICT_SIZE];
168            struct stream ns;
169    }
170    RDPCOMP;
171    
172    /* RDPDR */
173    typedef uint32 NTSTATUS;
174    typedef uint32 NTHANDLE;
175    
176    typedef struct _DEVICE_FNS
177    {
178            NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
179                               uint32 create_disposition, uint32 flags_and_attributes, char *filename,
180                               NTHANDLE * handle);
181            NTSTATUS(*close) (NTHANDLE handle);
182            NTSTATUS(*read) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
183                             uint32 * result);
184            NTSTATUS(*write) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
185                              uint32 * result);
186            NTSTATUS(*device_control) (NTHANDLE handle, uint32 request, STREAM in, STREAM out);
187    }
188    DEVICE_FNS;
189    
190    
191    typedef struct rdpdr_device_info
192    {
193            uint32 device_type;
194            NTHANDLE handle;
195            char name[8];
196            char *local_path;
197            void *pdevice_data;
198    }
199    RDPDR_DEVICE;
200    
201    typedef struct rdpdr_serial_device_info
202    {
203            int dtr;
204            int rts;
205            uint32 control, xonoff, onlimit, offlimit;
206            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            uint8 chars[6];
216            struct termios *ptermios, *pold_termios;
217            int event_txempty, event_cts, event_dsr, event_rlsd, event_pending;
218    }
219    SERIAL_DEVICE;
220    
221    typedef struct rdpdr_parallel_device_info
222    {
223            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    }
234    PARALLEL_DEVICE;
235    
236    typedef struct rdpdr_printer_info
237    {
238            FILE *printer_fp;
239            char *driver, *printer;
240            uint32 bloblen;
241            uint8 *blob;
242            BOOL default_printer;
243    }
244    PRINTER;
245    
246    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    #ifndef PATH_MAX
256    #define PATH_MAX 256
257    #endif
258    
259    typedef struct fileinfo
260    {
261            uint32 device_id, flags_and_attributes, accessmask;
262            char path[PATH_MAX];
263            DIR *pdir;
264            struct dirent *pdirent;
265            char pattern[PATH_MAX];
266            BOOL delete_on_close;
267            NOTIFY notify;
268            uint32 info_class;
269    }
270    FILEINFO;
271    
272    typedef BOOL(*str_handle_lines_t) (const char *line, void *data);

Legend:
Removed from v.309  
changed lines
  Added in v.1309

  ViewVC Help
Powered by ViewVC 1.1.26