change HANDLE to NTHANDLE to avoid conflics
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@775 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
d3c773173d
commit
c0651b51a1
20
disk.c
20
disk.c
@ -169,9 +169,9 @@ disk_enum_devices(uint32 * id, char *optarg)
|
||||
/* Opens or creates a file or directory */
|
||||
static NTSTATUS
|
||||
disk_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create_disposition,
|
||||
uint32 flags_and_attributes, char *filename, HANDLE * phandle)
|
||||
uint32 flags_and_attributes, char *filename, NTHANDLE * phandle)
|
||||
{
|
||||
HANDLE handle;
|
||||
NTHANDLE handle;
|
||||
DIR *dirp;
|
||||
int flags, mode;
|
||||
char path[256];
|
||||
@ -325,7 +325,7 @@ disk_create(uint32 device_id, uint32 accessmask, uint32 sharemode, uint32 create
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
disk_close(HANDLE handle)
|
||||
disk_close(NTHANDLE handle)
|
||||
{
|
||||
struct fileinfo *pfinfo;
|
||||
|
||||
@ -345,7 +345,7 @@ disk_close(HANDLE handle)
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
disk_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
disk_read(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
int n;
|
||||
|
||||
@ -382,7 +382,7 @@ disk_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * re
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
disk_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
disk_write(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
int n;
|
||||
|
||||
@ -409,7 +409,7 @@ disk_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * r
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
disk_query_information(HANDLE handle, uint32 info_class, STREAM out)
|
||||
disk_query_information(NTHANDLE handle, uint32 info_class, STREAM out)
|
||||
{
|
||||
uint32 file_attributes, ft_high, ft_low;
|
||||
struct stat filestat;
|
||||
@ -490,7 +490,7 @@ disk_query_information(HANDLE handle, uint32 info_class, STREAM out)
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
disk_set_information(HANDLE handle, uint32 info_class, STREAM in, STREAM out)
|
||||
disk_set_information(NTHANDLE handle, uint32 info_class, STREAM in, STREAM out)
|
||||
{
|
||||
uint32 device_id, length, file_attributes, ft_high, ft_low;
|
||||
char newname[256], fullpath[256];
|
||||
@ -744,7 +744,7 @@ FsVolumeInfo(char *fpath)
|
||||
|
||||
|
||||
NTSTATUS
|
||||
disk_query_volume_information(HANDLE handle, uint32 info_class, STREAM out)
|
||||
disk_query_volume_information(NTHANDLE handle, uint32 info_class, STREAM out)
|
||||
{
|
||||
struct STATFS_T stat_fs;
|
||||
struct fileinfo *pfinfo;
|
||||
@ -809,7 +809,7 @@ disk_query_volume_information(HANDLE handle, uint32 info_class, STREAM out)
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
disk_query_directory(HANDLE handle, uint32 info_class, char *pattern, STREAM out)
|
||||
disk_query_directory(NTHANDLE handle, uint32 info_class, char *pattern, STREAM out)
|
||||
{
|
||||
uint32 file_attributes, ft_low, ft_high;
|
||||
char *dirname, fullpath[256];
|
||||
@ -919,7 +919,7 @@ disk_query_directory(HANDLE handle, uint32 info_class, char *pattern, STREAM out
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
disk_device_control(HANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
disk_device_control(NTHANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
{
|
||||
uint32 result;
|
||||
|
||||
|
12
parallel.c
12
parallel.c
@ -19,7 +19,7 @@ extern int errno;
|
||||
extern RDPDR_DEVICE g_rdpdr_device[];
|
||||
|
||||
static PARALLEL_DEVICE *
|
||||
get_parallel_data(HANDLE handle)
|
||||
get_parallel_data(NTHANDLE handle)
|
||||
{
|
||||
int index;
|
||||
|
||||
@ -74,7 +74,7 @@ parallel_enum_devices(uint32 * id, char *optarg)
|
||||
|
||||
static NTSTATUS
|
||||
parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
|
||||
uint32 flags, char *filename, HANDLE * handle)
|
||||
uint32 flags, char *filename, NTHANDLE * handle)
|
||||
{
|
||||
int parallel_fd;
|
||||
|
||||
@ -102,7 +102,7 @@ parallel_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 dispo
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
parallel_close(HANDLE handle)
|
||||
parallel_close(NTHANDLE handle)
|
||||
{
|
||||
int i = get_device_index(handle);
|
||||
if (i >= 0)
|
||||
@ -112,14 +112,14 @@ parallel_close(HANDLE handle)
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
parallel_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
parallel_read(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
*result = read(handle, data, length);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
parallel_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
parallel_write(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
int rc = STATUS_SUCCESS;
|
||||
|
||||
@ -153,7 +153,7 @@ parallel_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
parallel_device_control(HANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
parallel_device_control(NTHANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
{
|
||||
if ((request >> 16) != FILE_DEVICE_PARALLEL)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -3,7 +3,7 @@
|
||||
extern RDPDR_DEVICE g_rdpdr_device[];
|
||||
|
||||
static PRINTER *
|
||||
get_printer_data(HANDLE handle)
|
||||
get_printer_data(NTHANDLE handle)
|
||||
{
|
||||
int index;
|
||||
|
||||
@ -83,7 +83,7 @@ printer_enum_devices(uint32 * id, char *optarg)
|
||||
|
||||
static NTSTATUS
|
||||
printer_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags,
|
||||
char *filename, HANDLE * handle)
|
||||
char *filename, NTHANDLE * handle)
|
||||
{
|
||||
char cmd[256];
|
||||
PRINTER *pprinter_data;
|
||||
@ -107,7 +107,7 @@ printer_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 dispos
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
printer_close(HANDLE handle)
|
||||
printer_close(NTHANDLE handle)
|
||||
{
|
||||
int i = get_device_index(handle);
|
||||
if (i >= 0)
|
||||
@ -121,7 +121,7 @@ printer_close(HANDLE handle)
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
printer_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
printer_write(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
PRINTER *pprinter_data;
|
||||
|
||||
|
12
proto.h
12
proto.h
@ -28,10 +28,10 @@ void cliprdr_send_data(uint8 * data, uint32 length);
|
||||
BOOL cliprdr_init(void);
|
||||
/* disk.c */
|
||||
int disk_enum_devices(uint32 * id, char *optarg);
|
||||
NTSTATUS disk_query_information(HANDLE handle, uint32 info_class, STREAM out);
|
||||
NTSTATUS disk_set_information(HANDLE handle, uint32 info_class, STREAM in, STREAM out);
|
||||
NTSTATUS disk_query_volume_information(HANDLE handle, uint32 info_class, STREAM out);
|
||||
NTSTATUS disk_query_directory(HANDLE handle, uint32 info_class, char *pattern, STREAM out);
|
||||
NTSTATUS disk_query_information(NTHANDLE handle, uint32 info_class, STREAM out);
|
||||
NTSTATUS disk_set_information(NTHANDLE handle, uint32 info_class, STREAM in, STREAM out);
|
||||
NTSTATUS disk_query_volume_information(NTHANDLE handle, uint32 info_class, STREAM out);
|
||||
NTSTATUS disk_query_directory(NTHANDLE handle, uint32 info_class, char *pattern, STREAM out);
|
||||
/* mppc.c */
|
||||
int mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen);
|
||||
/* ewmhints.c */
|
||||
@ -108,7 +108,7 @@ BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char
|
||||
char *directory);
|
||||
void rdp_disconnect(void);
|
||||
/* rdpdr.c */
|
||||
int get_device_index(HANDLE handle);
|
||||
int get_device_index(NTHANDLE handle);
|
||||
void convert_to_unix_filename(char *filename);
|
||||
BOOL rdpdr_init(void);
|
||||
void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout);
|
||||
@ -143,7 +143,7 @@ BOOL sec_connect(char *server, char *username);
|
||||
void sec_disconnect(void);
|
||||
/* serial.c */
|
||||
int serial_enum_devices(uint32 * id, char *optarg);
|
||||
BOOL serial_get_timeout(HANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout);
|
||||
BOOL serial_get_timeout(NTHANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout);
|
||||
/* tcp.c */
|
||||
STREAM tcp_init(uint32 maxlen);
|
||||
void tcp_send(STREAM s);
|
||||
|
4
rdpdr.c
4
rdpdr.c
@ -65,7 +65,7 @@ extern FILEINFO g_fileinfo[];
|
||||
static VCHANNEL *rdpdr_channel;
|
||||
|
||||
/* If select() times out, the request for the device with handle g_min_timeout_fd is aborted */
|
||||
HANDLE g_min_timeout_fd;
|
||||
NTHANDLE g_min_timeout_fd;
|
||||
uint32 g_num_devices;
|
||||
|
||||
/* Table with information about rdpdr devices */
|
||||
@ -90,7 +90,7 @@ struct async_iorequest *g_iorequest;
|
||||
|
||||
/* Return device_id for a given handle */
|
||||
int
|
||||
get_device_index(HANDLE handle)
|
||||
get_device_index(NTHANDLE handle)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < RDPDR_MAX_DEVICES; i++)
|
||||
|
20
serial.c
20
serial.c
@ -88,7 +88,7 @@
|
||||
extern RDPDR_DEVICE g_rdpdr_device[];
|
||||
|
||||
static SERIAL_DEVICE *
|
||||
get_serial_info(HANDLE handle)
|
||||
get_serial_info(NTHANDLE handle)
|
||||
{
|
||||
int index;
|
||||
|
||||
@ -101,7 +101,7 @@ get_serial_info(HANDLE handle)
|
||||
}
|
||||
|
||||
static BOOL
|
||||
get_termios(SERIAL_DEVICE * pser_inf, HANDLE serial_fd)
|
||||
get_termios(SERIAL_DEVICE * pser_inf, NTHANDLE serial_fd)
|
||||
{
|
||||
speed_t speed;
|
||||
struct termios *ptermios;
|
||||
@ -224,7 +224,7 @@ get_termios(SERIAL_DEVICE * pser_inf, HANDLE serial_fd)
|
||||
}
|
||||
|
||||
static void
|
||||
set_termios(SERIAL_DEVICE * pser_inf, HANDLE serial_fd)
|
||||
set_termios(SERIAL_DEVICE * pser_inf, NTHANDLE serial_fd)
|
||||
{
|
||||
speed_t speed;
|
||||
|
||||
@ -407,9 +407,9 @@ serial_enum_devices(uint32 * id, char *optarg)
|
||||
|
||||
static NTSTATUS
|
||||
serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition,
|
||||
uint32 flags_and_attributes, char *filename, HANDLE * handle)
|
||||
uint32 flags_and_attributes, char *filename, NTHANDLE * handle)
|
||||
{
|
||||
HANDLE serial_fd;
|
||||
NTHANDLE serial_fd;
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
struct termios *ptermios;
|
||||
|
||||
@ -462,7 +462,7 @@ serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposi
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
serial_close(HANDLE handle)
|
||||
serial_close(NTHANDLE handle)
|
||||
{
|
||||
int i = get_device_index(handle);
|
||||
if (i >= 0)
|
||||
@ -472,7 +472,7 @@ serial_close(HANDLE handle)
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
serial_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
serial_read(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
long timeout;
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
@ -519,14 +519,14 @@ serial_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 *
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
serial_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
serial_write(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result)
|
||||
{
|
||||
*result = write(handle, data, length);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
serial_device_control(HANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
serial_device_control(NTHANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
{
|
||||
#if 0
|
||||
int flush_mask, purge_mask;
|
||||
@ -684,7 +684,7 @@ serial_device_control(HANDLE handle, uint32 request, STREAM in, STREAM out)
|
||||
|
||||
/* Read timeout for a given file descripter (device) when adding fd's to select() */
|
||||
BOOL
|
||||
serial_get_timeout(HANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout)
|
||||
serial_get_timeout(NTHANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout)
|
||||
{
|
||||
int index;
|
||||
SERIAL_DEVICE *pser_inf;
|
||||
|
14
types.h
14
types.h
@ -166,19 +166,19 @@ RDPCOMP;
|
||||
|
||||
/* RDPDR */
|
||||
typedef uint32 NTSTATUS;
|
||||
typedef uint32 HANDLE;
|
||||
typedef uint32 NTHANDLE;
|
||||
|
||||
typedef struct _DEVICE_FNS
|
||||
{
|
||||
NTSTATUS(*create) (uint32 device, uint32 desired_access, uint32 share_mode,
|
||||
uint32 create_disposition, uint32 flags_and_attributes, char *filename,
|
||||
HANDLE * handle);
|
||||
NTSTATUS(*close) (HANDLE handle);
|
||||
NTSTATUS(*read) (HANDLE handle, uint8 * data, uint32 length, uint32 offset,
|
||||
NTHANDLE * handle);
|
||||
NTSTATUS(*close) (NTHANDLE handle);
|
||||
NTSTATUS(*read) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
|
||||
uint32 * result);
|
||||
NTSTATUS(*write) (HANDLE handle, uint8 * data, uint32 length, uint32 offset,
|
||||
NTSTATUS(*write) (NTHANDLE handle, uint8 * data, uint32 length, uint32 offset,
|
||||
uint32 * result);
|
||||
NTSTATUS(*device_control) (HANDLE handle, uint32 request, STREAM in, STREAM out);
|
||||
NTSTATUS(*device_control) (NTHANDLE handle, uint32 request, STREAM in, STREAM out);
|
||||
}
|
||||
DEVICE_FNS;
|
||||
|
||||
@ -186,7 +186,7 @@ DEVICE_FNS;
|
||||
typedef struct rdpdr_device_info
|
||||
{
|
||||
uint32 device_type;
|
||||
HANDLE handle;
|
||||
NTHANDLE handle;
|
||||
char name[8];
|
||||
char *local_path;
|
||||
void *pdevice_data;
|
||||
|
@ -1,8 +1,7 @@
|
||||
/*
|
||||
rdesktop: A Remote Desktop Protocol client.
|
||||
User interface services - X Window System
|
||||
Copyright (C) Matthew Chapman 1999-2004
|
||||
qte.cpp by Jay Sorg
|
||||
Copyright (C) Jay Sorg 2004
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -21,7 +20,6 @@
|
||||
|
||||
//#define SHARP
|
||||
|
||||
#include "../rdesktop.h"
|
||||
#ifdef SHARP
|
||||
#include <qpe/qpeapplication.h>
|
||||
#else
|
||||
@ -41,10 +39,26 @@
|
||||
#include <qfile.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include "qtewin.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h> // va_list va_start va_end
|
||||
|
||||
#include "../rdesktop.h"
|
||||
#include "qtewin.h"
|
||||
|
||||
/* types */
|
||||
struct QColorMap
|
||||
{
|
||||
uint32 RGBColors[256];
|
||||
int NumColors;
|
||||
};
|
||||
|
||||
struct bitmap
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
uint8* data;
|
||||
};
|
||||
|
||||
uint32 g_flags = 0;
|
||||
char g_server[64] = "";
|
||||
char g_domain[16] = "";
|
||||
@ -79,29 +93,15 @@ QPEApplication* g_App = 0;
|
||||
#else
|
||||
QApplication* g_App = 0;
|
||||
#endif
|
||||
QMyMainWindow* g_MW = 0;
|
||||
QMyScrollView* g_SV = 0;
|
||||
struct QColorMap
|
||||
{
|
||||
uint32 RGBColors[256];
|
||||
int NumColors;
|
||||
};
|
||||
struct QColorMap* g_CM = 0;
|
||||
uint8* g_BS = 0;
|
||||
static QMyMainWindow *g_MW = 0;
|
||||
static QMyScrollView *g_SV = 0;
|
||||
static struct QColorMap *g_CM = 0;
|
||||
static uint8 *g_BS = 0;
|
||||
|
||||
int g_clipx = 0;
|
||||
int g_clipy = 0;
|
||||
int g_clipcx = 0;
|
||||
int g_clipcy = 0;
|
||||
|
||||
struct bitmap
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
uint8* data;
|
||||
};
|
||||
|
||||
int owncolmap = False;
|
||||
static int g_clipx = 0;
|
||||
static int g_clipy = 0;
|
||||
static int g_clipcx = 0;
|
||||
static int g_clipcy = 0;
|
||||
|
||||
//*****************************************************************************
|
||||
void CleanString(QString* Item)
|
||||
|
Loading…
Reference in New Issue
Block a user