xorg driver, include cleanup

ulab-next
Jay Sorg 12 years ago
parent af8ca90784
commit 17bf2abe30

@ -1,8 +1,8 @@
/** /**
* xrdp: A Remote Desktop Protocol server. * xrdp: A Remote Desktop Protocol server.
* *
* Copyright (C) Jay Sorg 2009-2012 * Copyright (C) Jay Sorg 2009-2013
* Copyright (C) Laxmikant Rashinkar 2012 * Copyright (C) Laxmikant Rashinkar 2012-2013
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,14 +23,9 @@
#include "arch.h" #include "arch.h"
#include "parse.h" #include "parse.h"
int APP_CC int APP_CC clipboard_init(void);
clipboard_init(void); int APP_CC clipboard_deinit(void);
int APP_CC int APP_CC clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length);
clipboard_deinit(void); int APP_CC clipboard_xevent(void *xevent);
int APP_CC
clipboard_data_in(struct stream* s, int chan_id, int chan_flags, int length,
int total_length);
int APP_CC
clipboard_xevent(void* xevent);
#endif #endif

@ -1,7 +1,7 @@
/** /**
* xrdp: A Remote Desktop Protocol server. * xrdp: A Remote Desktop Protocol server.
* *
* Copyright (C) Jay Sorg 2012 * Copyright (C) Jay Sorg 2012-2013
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -127,9 +127,7 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */
char cFileName[256]; char cFileName[256];
}; };
int APP_CC int APP_CC clipboard_out_unicode(struct stream *s, char *text, int num_chars);
clipboard_out_unicode(struct stream *s, char *text, int num_chars); int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
int APP_CC
clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
#endif #endif

@ -515,7 +515,9 @@ void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id,
if (InitialQuery) if (InitialQuery)
{ {
if (Path == NULL) if (Path == NULL)
{
return; return;
}
/* Path in unicode needs this much space */ /* Path in unicode needs this much space */
path_len = ((g_mbstowcs(NULL, Path, 0) * sizeof(twchar)) / 2) + 2; path_len = ((g_mbstowcs(NULL, Path, 0) * sizeof(twchar)) / 2) + 2;
@ -704,7 +706,8 @@ void devredir_proc_client_devlist_announce_req(struct stream *s)
} }
} }
void dev_redir_proc_device_iocompletion(struct stream *s) void APP_CC
dev_redir_proc_device_iocompletion(struct stream *s)
{ {
FUSE_DATA *fuse_data = NULL; FUSE_DATA *fuse_data = NULL;
IRP *irp = NULL; IRP *irp = NULL;
@ -859,7 +862,8 @@ done:
log_debug("exiting"); log_debug("exiting");
} }
void dev_redir_proc_query_dir_response(IRP *irp, void APP_CC
dev_redir_proc_query_dir_response(IRP *irp,
struct stream *s_in, struct stream *s_in,
tui32 DeviceId, tui32 DeviceId,
tui32 CompletionId, tui32 CompletionId,
@ -984,7 +988,8 @@ void dev_redir_proc_query_dir_response(IRP *irp,
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*****************************************************************************/ *****************************************************************************/
int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) int APP_CC
dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
{ {
tui32 DesiredAccess; tui32 DesiredAccess;
tui32 CreateOptions; tui32 CreateOptions;
@ -1028,7 +1033,8 @@ int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
return rval; return rval;
} }
int dev_redir_file_open(void *fusep, tui32 device_id, char *path, int APP_CC
dev_redir_file_open(void *fusep, tui32 device_id, char *path,
int mode, int type, char *gen_buf) int mode, int type, char *gen_buf)
{ {
tui32 DesiredAccess; tui32 DesiredAccess;
@ -1140,7 +1146,8 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId)
* Remove (delete) a directory or file * Remove (delete) a directory or file
*****************************************************************************/ *****************************************************************************/
int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode) int APP_CC
devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode)
{ {
tui32 DesiredAccess; tui32 DesiredAccess;
tui32 CreateOptions; tui32 CreateOptions;
@ -1181,7 +1188,8 @@ int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode)
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*****************************************************************************/ *****************************************************************************/
int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, int APP_CC
devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
tui32 Length, tui64 Offset) tui32 Length, tui64 Offset)
{ {
struct stream *s; struct stream *s;
@ -1229,7 +1237,8 @@ int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
return 0; return 0;
} }
int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, int APP_CC
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
const char *buf, tui32 Length, tui64 Offset) const char *buf, tui32 Length, tui64 Offset)
{ {
struct stream *s; struct stream *s;
@ -1293,7 +1302,8 @@ int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
* @return FUSE_DATA on success, or NULL on failure * @return FUSE_DATA on success, or NULL on failure
*****************************************************************************/ *****************************************************************************/
void *devredir_fuse_data_peek(IRP *irp) void * APP_CC
devredir_fuse_data_peek(IRP *irp)
{ {
log_debug("returning %p", irp->fd_head); log_debug("returning %p", irp->fd_head);
return irp->fd_head; return irp->fd_head;
@ -1305,7 +1315,8 @@ void *devredir_fuse_data_peek(IRP *irp)
* @return FUSE_DATA on success, NULL on failure * @return FUSE_DATA on success, NULL on failure
*****************************************************************************/ *****************************************************************************/
void *devredir_fuse_data_dequeue(IRP *irp) void * APP_CC
devredir_fuse_data_dequeue(IRP *irp)
{ {
FUSE_DATA *head; FUSE_DATA *head;
@ -1340,7 +1351,8 @@ void *devredir_fuse_data_dequeue(IRP *irp)
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*****************************************************************************/ *****************************************************************************/
int devredir_fuse_data_enqueue(IRP *irp, void *vp) int APP_CC
devredir_fuse_data_enqueue(IRP *irp, void *vp)
{ {
FUSE_DATA *fd; FUSE_DATA *fd;
FUSE_DATA *tail; FUSE_DATA *tail;
@ -1377,7 +1389,8 @@ int devredir_fuse_data_enqueue(IRP *irp, void *vp)
** miscellaneous stuff ** ** miscellaneous stuff **
******************************************************************************/ ******************************************************************************/
void devredir_insert_DeviceIoRequest(struct stream *s, void APP_CC
devredir_insert_DeviceIoRequest(struct stream *s,
tui32 DeviceId, tui32 DeviceId,
tui32 FileId, tui32 FileId,
tui32 CompletionId, tui32 CompletionId,
@ -1398,7 +1411,8 @@ void devredir_insert_DeviceIoRequest(struct stream *s,
* Convert / to windows compatible \ * Convert / to windows compatible \
*****************************************************************************/ *****************************************************************************/
void devredir_cvt_slash(char *path) void APP_CC
devredir_cvt_slash(char *path)
{ {
char *cptr = path; char *cptr = path;
@ -1410,7 +1424,8 @@ void devredir_cvt_slash(char *path)
} }
} }
void devredir_cvt_to_unicode(char *unicode, char *path) void APP_CC
devredir_cvt_to_unicode(char *unicode, char *path)
{ {
char *dest; char *dest;
char *src; char *src;
@ -1435,7 +1450,8 @@ void devredir_cvt_to_unicode(char *unicode, char *path)
*dest++ = 0; *dest++ = 0;
} }
void devredir_cvt_from_unicode_len(char *path, char *unicode, int len) void APP_CC
devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
{ {
char *dest; char *dest;
char *dest_saved; char *dest_saved;
@ -1472,7 +1488,8 @@ void devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
g_free(dest_saved); g_free(dest_saved);
} }
int dev_redir_string_ends_with(char *string, char c) int APP_CC
dev_redir_string_ends_with(char *string, char c)
{ {
int len; int len;
@ -1480,14 +1497,16 @@ int dev_redir_string_ends_with(char *string, char c)
return (string[len - 1] == c) ? 1 : 0; return (string[len - 1] == c) ? 1 : 0;
} }
void devredir_insert_RDPDR_header(struct stream *s, tui16 Component, void APP_CC
devredir_insert_RDPDR_header(struct stream *s, tui16 Component,
tui16 PacketId) tui16 PacketId)
{ {
xstream_wr_u16_le(s, Component); xstream_wr_u16_le(s, Component);
xstream_wr_u16_le(s, PacketId); xstream_wr_u16_le(s, PacketId);
} }
void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) void APP_CC
devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
{ {
struct stream *s; struct stream *s;
int bytes; int bytes;
@ -1523,7 +1542,8 @@ void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
return; return;
} }
void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) void APP_CC
devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
{ {
FUSE_DATA *fuse_data; FUSE_DATA *fuse_data;
@ -1549,7 +1569,8 @@ void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
IRP_MJ_CLOSE, 0, 32); IRP_MJ_CLOSE, 0, 32);
} }
void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) void APP_CC
devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
{ {
struct stream *s; struct stream *s;
int bytes; int bytes;
@ -1601,7 +1622,8 @@ void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
return; return;
} }
void devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus) void APP_CC
devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus)
{ {
FUSE_DATA *fuse_data; FUSE_DATA *fuse_data;

@ -22,12 +22,9 @@ int g_drdynvc_chan_id;
int g_drdynvc_inited = 0; int g_drdynvc_inited = 0;
static int APP_CC drdynvc_send_capability_request(uint16_t version); static int APP_CC drdynvc_send_capability_request(uint16_t version);
static int APP_CC drdynvc_process_capability_response(struct stream* s, static int APP_CC drdynvc_process_capability_response(struct stream* s, unsigned char cmd);
unsigned char cmd); static int APP_CC drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd);
static int APP_CC drdynvc_process_open_channel_response(struct stream *s, static int APP_CC drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd);
unsigned char cmd);
static int APP_CC drdynvc_process_close_channel_response(struct stream *s,
unsigned char cmd);
static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd); static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd);
static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd); static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd);
static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val); static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val);

@ -54,12 +54,12 @@ struct irp
tui32 CompletionId, tui32 IoStatus); tui32 CompletionId, tui32 IoStatus);
}; };
IRP * devredir_irp_new(); IRP * APP_CC devredir_irp_new(void);
IRP * devredir_irp_clone(IRP *irp); IRP * APP_CC devredir_irp_clone(IRP *irp);
int devredir_irp_delete(IRP *irp); int APP_CC devredir_irp_delete(IRP *irp);
IRP * devredir_irp_find(tui32 completion_id); IRP * APP_CC devredir_irp_find(tui32 completion_id);
IRP * devredir_irp_find_by_fileid(tui32 FileId); IRP * APP_CC devredir_irp_find_by_fileid(tui32 FileId);
IRP * devredir_irp_get_last(); IRP * APP_CC devredir_irp_get_last(void);
void devredir_irp_dump(); void APP_CC devredir_irp_dump(void);
#endif /* end ifndef __IRP_H */ #endif /* end ifndef __IRP_H */

@ -147,7 +147,8 @@ static void scard_release_resources(void);
** non static functions ** ** non static functions **
******************************************************************************/ ******************************************************************************/
void scard_device_announce(tui32 device_id) void APP_CC
scard_device_announce(tui32 device_id)
{ {
IRP *irp; IRP *irp;
@ -187,7 +188,8 @@ void scard_device_announce(tui32 device_id)
** callbacks into this module ** ** callbacks into this module **
******************************************************************************/ ******************************************************************************/
void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, void APP_CC
scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId, tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus) tui32 IoStatus)
{ {
@ -243,7 +245,8 @@ void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
log_debug("leaving"); log_debug("leaving");
} }
void scard_handle_ListReaders_Return(struct stream *s, IRP *irp, void APP_CC
scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId, tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus) tui32 IoStatus)
{ {
@ -283,7 +286,8 @@ void scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
* *
*****************************************************************************/ *****************************************************************************/
static void scard_send_EstablishContext(IRP *irp) static void APP_CC
scard_send_EstablishContext(IRP *irp)
{ {
struct stream *s; struct stream *s;
int bytes; int bytes;
@ -311,7 +315,8 @@ static void scard_send_EstablishContext(IRP *irp)
* *
*****************************************************************************/ *****************************************************************************/
static void scard_send_ListReaders(IRP *irp, int wide) static void APP_CC
scard_send_ListReaders(IRP *irp, int wide)
{ {
/* see [MS-RDPESC] 2.2.2.4 */ /* see [MS-RDPESC] 2.2.2.4 */
@ -405,7 +410,8 @@ static void scard_send_ListReaders(IRP *irp, int wide)
* @return stream with IOCTL inserted in it, NULL on error * @return stream with IOCTL inserted in it, NULL on error
*****************************************************************************/ *****************************************************************************/
static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl) static struct stream * APP_CC
scard_make_new_ioctl(IRP *irp, tui32 ioctl)
{ {
/* /*
* format of device control request * format of device control request
@ -462,7 +468,8 @@ static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl)
* @return index into smartcards[] on success, -1 on failure * @return index into smartcards[] on success, -1 on failure
*****************************************************************************/ *****************************************************************************/
static int scard_add_new_device(tui32 device_id) static int APP_CC
scard_add_new_device(tui32 device_id)
{ {
int index; int index;
SMARTCARD *sc; SMARTCARD *sc;
@ -485,10 +492,12 @@ static int scard_add_new_device(tui32 device_id)
/** /**
* Find first unused entry in smartcards * Find first unused entry in smartcards
* *
* @return index of first unused entry in smartcards or -1 if smartcards is full * @return index of first unused entry in smartcards or -1 if smartcards
* is full
*****************************************************************************/ *****************************************************************************/
static int scard_get_free_slot(void) static int APP_CC
scard_get_free_slot(void)
{ {
int i; int i;
@ -509,7 +518,8 @@ static int scard_get_free_slot(void)
* Release resources prior to shutting down * Release resources prior to shutting down
*****************************************************************************/ *****************************************************************************/
static void scard_release_resources(void) static void APP_CC
scard_release_resources(void)
{ {
int i; int i;

@ -50,6 +50,8 @@ int g_do_dirty_ons = 0; /* delay remoting screen */
Bool g_wrapWindow = 1; Bool g_wrapWindow = 1;
Bool g_wrapPixmap = 1; Bool g_wrapPixmap = 1;
int g_codec_mode = 0; /* 0 = standard rdp, 1 = rfx */
rdpPixmapRec g_screenPriv; rdpPixmapRec g_screenPriv;
/* if true, running in RemoteApp / RAIL mode */ /* if true, running in RemoteApp / RAIL mode */

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -37,5 +37,7 @@ rdpInputKeyboardEvent(int msg, long param1, long param2,
int int
rdpInputMouseEvent(int msg, long param1, long param2, rdpInputMouseEvent(int msg, long param1, long param2,
long param3, long param4); long param3, long param4);
int
rdpInputInit(void);
#endif #endif

@ -38,6 +38,7 @@ rdp module main
#include <mi.h> #include <mi.h>
#include "rdp.h" #include "rdp.h"
#include "rdpInput.h"
/******************************************************************************/ /******************************************************************************/
#define LOG_LEVEL 1 #define LOG_LEVEL 1

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -69,29 +69,8 @@ Bool
rdpRRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate, rdpRRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
RRScreenSizePtr pSize) RRScreenSizePtr pSize)
{ {
ScrnInfoPtr pScrn;
rdpPtr dev;
rrScrPrivPtr pRRScrPriv;
Bool rv;
LLOGLN(0, ("rdpRRSetConfig:")); LLOGLN(0, ("rdpRRSetConfig:"));
rv = TRUE; return TRUE;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
#if 0
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv != 0)
{
if (dev->rrSetConfig != 0)
{
LLOGLN(0, ("rdpRRSetConfig: here"));
pRRScrPriv->rrSetConfig = dev->rrSetConfig;
rv = pRRScrPriv->rrSetConfig(pScreen, rotateKind, rate, pSize);
pRRScrPriv->rrSetConfig = rdpRRSetConfig;
}
}
#endif
return rv;
} }
/******************************************************************************/ /******************************************************************************/
@ -102,32 +81,15 @@ rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
int height; int height;
ScrnInfoPtr pScrn; ScrnInfoPtr pScrn;
rdpPtr dev; rdpPtr dev;
rrScrPrivPtr pRRScrPriv;
Bool rv;
LLOGLN(0, ("rdpRRGetInfo:")); LLOGLN(0, ("rdpRRGetInfo:"));
rv = TRUE;
pScrn = xf86Screens[pScreen->myNum]; pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn); dev = XRDPPTR(pScrn);
#if 0
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv != 0)
{
if (dev->rrGetInfo != 0)
{
LLOGLN(0, ("rdpRRGetInfo: here"));
pRRScrPriv->rrGetInfo = dev->rrGetInfo;
rv = pRRScrPriv->rrGetInfo(pScreen, pRotations);
pRRScrPriv->rrGetInfo = rdpRRGetInfo;
}
}
#else
*pRotations = RR_Rotate_0; *pRotations = RR_Rotate_0;
width = dev->width; width = dev->width;
height = dev->height; height = dev->height;
rdpRRRegisterSize(pScreen, width, height); rdpRRRegisterSize(pScreen, width, height);
#endif return TRUE;
return rv;
} }
/******************************************************************************/ /******************************************************************************/

@ -19,6 +19,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* this should be before all X11 .h files */
#include <xorg-server.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"

@ -55,13 +55,6 @@ static int g_tab_down = 0;
above *_down vars */ above *_down vars */
static int g_scroll_lock_down = 0; static int g_scroll_lock_down = 0;
/* if 1, a keystroke is done every minute, down, then up */
#define XRDPKB_TEST 0
#if XRDPKB_TEST
static OsTimerPtr g_timer = 0;
#endif
/******************************************************************************/ /******************************************************************************/
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #define LLOGLN(_level, _args) \
@ -517,21 +510,6 @@ rdpInputKeyboard(int msg, long param1, long param2, long param3, long param4)
return 0; return 0;
} }
#if XRDPKB_TEST
/******************************************************************************/
static CARD32
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
{
LLOGLN(0, ("rdpDeferredUpdateCallback:"));
rdpEnqueueKey(KeyPress, 115);
rdpEnqueueKey(KeyRelease, 115);
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
return 0;
}
#endif
/******************************************************************************/ /******************************************************************************/
void void
rdpkeybDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap) rdpkeybDeviceInit(DeviceIntPtr pDevice, KeySymsPtr pKeySyms, CARD8 *pModMap)
@ -637,9 +615,6 @@ rdpkeybControl(DeviceIntPtr device, int what)
rdpkeybChangeKeyboardControl); rdpkeybChangeKeyboardControl);
g_keyboard = device; g_keyboard = device;
rdpRegisterInputCallback(0, rdpInputKeyboard); rdpRegisterInputCallback(0, rdpInputKeyboard);
#if XRDPKB_TEST
g_timer = TimerSet(g_timer, 0, 1000, rdpDeferredUpdateCallback, 0);
#endif
break; break;
case DEVICE_ON: case DEVICE_ON:
pDev->on = 1; pDev->on = 1;

Loading…
Cancel
Save