mirror of https://github.com/FreeRDP/FreeRDP
channels: move rdpdr header
This commit is contained in:
parent
837cc777ce
commit
e95b5b5a24
|
@ -34,8 +34,6 @@ if(MSVC AND (NOT WITH_STATIC_PLUGINS))
|
|||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
|
||||
include_directories(../../rdpdr/client)
|
||||
|
||||
if(NOT WITH_STATIC_PLUGINS)
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
else()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* File System Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2012 Gerald Richter
|
||||
* Copyright 2012 Gerald Richter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
@ -52,8 +53,6 @@
|
|||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include "disk_file.h"
|
||||
|
||||
static boolean disk_file_wildcard_match(const char* pattern, const char* filename)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* File System Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2012 Gerald Richter
|
||||
* Copyright 2012 Gerald Richter
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* File System Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -39,6 +39,7 @@
|
|||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
@ -46,8 +47,6 @@
|
|||
#include <winpr/thread.h>
|
||||
#include <winpr/interlocked.h>
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include "disk_file.h"
|
||||
|
||||
typedef struct _DISK_DEVICE DISK_DEVICE;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* statvfs emulation for windows
|
||||
*
|
||||
* Copyright 2012 Gerald Richter
|
||||
|
|
|
@ -21,8 +21,6 @@ set(MODULE_PREFIX "CHANNEL_RDPDR_PARALLEL_CLIENT")
|
|||
set(${MODULE_PREFIX}_SRCS
|
||||
parallel_main.c)
|
||||
|
||||
include_directories(../../rdpdr/client)
|
||||
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
|
|
@ -57,9 +57,7 @@
|
|||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
struct _PARALLEL_DEVICE
|
||||
{
|
||||
|
|
|
@ -37,8 +37,6 @@ if(WIN32)
|
|||
printer_win.h)
|
||||
endif()
|
||||
|
||||
include_directories(../../rdpdr/client)
|
||||
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel - CUPS driver
|
||||
*
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
|
@ -31,9 +31,8 @@
|
|||
|
||||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include "printer_main.h"
|
||||
|
||||
#include "printer_cups.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel - CUPS driver
|
||||
*
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
|
@ -35,9 +35,7 @@
|
|||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/thread.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#ifdef WITH_CUPS
|
||||
#include "printer_cups.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
|
@ -20,7 +20,7 @@
|
|||
#ifndef __PRINTER_MAIN_H
|
||||
#define __PRINTER_MAIN_H
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
/* SERVER_PRINTER_CACHE_EVENT.cachedata */
|
||||
#define RDPDR_ADD_PRINTER_EVENT 0x00000001
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel - WIN driver
|
||||
*
|
||||
* Copyright 2012 Gerald Richter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Print Virtual Channel - win driver
|
||||
*
|
||||
* Copyright 2012 Gerald Richter
|
||||
|
@ -20,7 +20,6 @@
|
|||
#ifndef __PRINTER_WIN_H
|
||||
#define __PRINTER_WIN_H
|
||||
|
||||
|
||||
rdpPrinterDriver* printer_win_get_driver(void);
|
||||
|
||||
#ifdef WITH_DEBUG_WINPR
|
||||
|
|
|
@ -25,8 +25,6 @@ set(${MODULE_PREFIX}_SRCS
|
|||
devman.h
|
||||
rdpdr_main.c
|
||||
rdpdr_main.h
|
||||
rdpdr_types.h
|
||||
rdpdr_constants.h
|
||||
rdpdr_capabilities.c
|
||||
rdpdr_capabilities.h)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -33,7 +33,7 @@
|
|||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/load_plugin.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_main.h"
|
||||
#include "devman.h"
|
||||
|
||||
DEVMAN* devman_new(rdpSvcPlugin* plugin)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,12 +18,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __DEVMAN_H
|
||||
#define __DEVMAN_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H
|
||||
#define FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H
|
||||
|
||||
DEVMAN* devman_new(rdpSvcPlugin* plugin);
|
||||
void devman_free(DEVMAN* devman);
|
||||
boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data);
|
||||
DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id);
|
||||
|
||||
#endif /* __DEVMAN_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -32,8 +32,7 @@
|
|||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_main.h"
|
||||
#include "devman.h"
|
||||
#include "irp.h"
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,11 +18,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __IRP_H
|
||||
#define __IRP_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H
|
||||
#define FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_main.h"
|
||||
|
||||
IRP* irp_new(DEVMAN* devman, STREAM* data_in);
|
||||
|
||||
#endif /* __IRP_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -29,8 +29,7 @@
|
|||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_main.h"
|
||||
#include "rdpdr_capabilities.h"
|
||||
|
||||
/* Output device redirection capability set header */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,12 +18,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RDPDR_CAPABILITIES_H
|
||||
#define __RDPDR_CAPABILITIES_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H
|
||||
#define FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H
|
||||
|
||||
#include "rdpdr_main.h"
|
||||
|
||||
void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in);
|
||||
void rdpdr_send_capability_response(rdpdrPlugin* rdpdr);
|
||||
|
||||
#endif /* __RDPDR_CAPABILITIES_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -33,15 +33,15 @@
|
|||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_capabilities.h"
|
||||
|
||||
#include "devman.h"
|
||||
#include "irp.h"
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,13 +18,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RDPDR_MAIN_H
|
||||
#define __RDPDR_MAIN_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H
|
||||
#define FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H
|
||||
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
|
||||
typedef struct rdpdr_plugin rdpdrPlugin;
|
||||
|
||||
struct rdpdr_plugin
|
||||
|
@ -39,4 +38,4 @@ struct rdpdr_plugin
|
|||
char computerName[256];
|
||||
};
|
||||
|
||||
#endif /* __RDPDR_MAIN_H */
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H */
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RDPDR_TYPES_H
|
||||
#define __RDPDR_TYPES_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/thread.h>
|
||||
#include <winpr/interlocked.h>
|
||||
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
typedef struct _DEVICE DEVICE;
|
||||
typedef struct _IRP IRP;
|
||||
typedef struct _DEVMAN DEVMAN;
|
||||
|
||||
typedef void (*pcIRPRequest)(DEVICE* device, IRP* irp);
|
||||
typedef void (*pcFreeDevice)(DEVICE* device);
|
||||
|
||||
struct _DEVICE
|
||||
{
|
||||
uint32 id;
|
||||
|
||||
uint32 type;
|
||||
char* name;
|
||||
STREAM* data;
|
||||
|
||||
pcIRPRequest IRPRequest;
|
||||
pcFreeDevice Free;
|
||||
};
|
||||
|
||||
typedef void (*pcIRPResponse)(IRP* irp);
|
||||
|
||||
struct _IRP
|
||||
{
|
||||
SLIST_ENTRY ItemEntry;
|
||||
|
||||
DEVICE* device;
|
||||
DEVMAN* devman;
|
||||
uint32 FileId;
|
||||
uint32 CompletionId;
|
||||
uint32 MajorFunction;
|
||||
uint32 MinorFunction;
|
||||
STREAM* input;
|
||||
|
||||
uint32 IoStatus;
|
||||
STREAM* output;
|
||||
|
||||
pcIRPResponse Complete;
|
||||
pcIRPResponse Discard;
|
||||
};
|
||||
|
||||
struct _DEVMAN
|
||||
{
|
||||
rdpSvcPlugin* plugin;
|
||||
uint32 id_sequence; /* generate unique device id */
|
||||
LIST* devices;
|
||||
};
|
||||
|
||||
typedef void (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device);
|
||||
|
||||
struct _DEVICE_SERVICE_ENTRY_POINTS
|
||||
{
|
||||
DEVMAN* devman;
|
||||
|
||||
pcRegisterDevice RegisterDevice;
|
||||
RDP_PLUGIN_DATA* plugin_data;
|
||||
};
|
||||
typedef struct _DEVICE_SERVICE_ENTRY_POINTS DEVICE_SERVICE_ENTRY_POINTS;
|
||||
typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS;
|
||||
|
||||
typedef int (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS);
|
||||
|
||||
#endif /* __RDPDR_TYPES_H */
|
|
@ -24,8 +24,6 @@ set(${MODULE_PREFIX}_SRCS
|
|||
serial_constants.h
|
||||
serial_main.c)
|
||||
|
||||
include_directories(../../rdpdr/client)
|
||||
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(serial PROPERTIES PREFIX "")
|
||||
|
||||
|
|
|
@ -40,18 +40,18 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include "devman.h"
|
||||
#include "serial_tty.h"
|
||||
#include "serial_constants.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/thread.h>
|
||||
#include <freerdp/utils/unicode.h>
|
||||
#include <freerdp/utils/wait_obj.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
typedef struct _SERIAL_DEVICE SERIAL_DEVICE;
|
||||
|
||||
struct _SERIAL_DEVICE
|
||||
{
|
||||
DEVICE device;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <freerdp/utils/thread.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/hexdump.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
|
@ -46,8 +47,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "rdpdr_constants.h"
|
||||
#include "rdpdr_types.h"
|
||||
#include "serial_tty.h"
|
||||
#include "serial_constants.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
typedef struct _SERIAL_TTY SERIAL_TTY;
|
||||
|
||||
struct _SERIAL_TTY
|
||||
{
|
||||
uint32 id;
|
||||
|
|
|
@ -22,7 +22,6 @@ set(${MODULE_PREFIX}_SRCS
|
|||
scard_main.c
|
||||
scard_operations.c)
|
||||
|
||||
include_directories(../../rdpdr/client)
|
||||
include_directories(${PCSC_INCLUDE_DIRS})
|
||||
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
#include <freerdp/utils/thread.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#include "scard_main.h"
|
||||
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "devman.h"
|
||||
#include "rdpdr_types.h"
|
||||
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/debug.h>
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#include <winpr/synch.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Smartcard Device Service Virtual Channel
|
||||
*
|
||||
* Copyright (C) Alexi Volkov <alexi@myrealbox.com> 2006
|
||||
|
@ -43,47 +43,45 @@
|
|||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
#include <freerdp/utils/thread.h>
|
||||
|
||||
#include "rdpdr_types.h"
|
||||
#include "rdpdr_constants.h"
|
||||
#include <freerdp/channels/rdpdr.h>
|
||||
|
||||
#include "scard_main.h"
|
||||
|
||||
/* [MS-RDPESC] 3.1.4 */
|
||||
#define SCARD_IOCTL_ESTABLISH_CONTEXT 0x00090014 /* EstablishContext */
|
||||
#define SCARD_IOCTL_RELEASE_CONTEXT 0x00090018 /* ReleaseContext */
|
||||
#define SCARD_IOCTL_IS_VALID_CONTEXT 0x0009001C /* IsValidContext */
|
||||
#define SCARD_IOCTL_LIST_READER_GROUPS 0x00090020 /* ListReaderGroups */
|
||||
#define SCARD_IOCTL_LIST_READERS 0x00090028 /* ListReadersA */
|
||||
#define SCARD_IOCTL_INTRODUCE_READER_GROUP 0x00090050 /* IntroduceReaderGroup */
|
||||
#define SCARD_IOCTL_FORGET_READER_GROUP 0x00090058 /* ForgetReader */
|
||||
#define SCARD_IOCTL_INTRODUCE_READER 0x00090060 /* IntroduceReader */
|
||||
#define SCARD_IOCTL_FORGET_READER 0x00090068 /* IntroduceReader */
|
||||
#define SCARD_IOCTL_ADD_READER_TO_GROUP 0x00090070 /* AddReaderToGroup */
|
||||
#define SCARD_IOCTL_REMOVE_READER_FROM_GROUP 0x00090078 /* RemoveReaderFromGroup */
|
||||
#define SCARD_IOCTL_GET_STATUS_CHANGE 0x000900A0 /* GetStatusChangeA */
|
||||
#define SCARD_IOCTL_CANCEL 0x000900A8 /* Cancel */
|
||||
#define SCARD_IOCTL_CONNECT 0x000900AC /* ConnectA */
|
||||
#define SCARD_IOCTL_RECONNECT 0x000900B4 /* Reconnect */
|
||||
#define SCARD_IOCTL_DISCONNECT 0x000900B8 /* Disconnect */
|
||||
#define SCARD_IOCTL_BEGIN_TRANSACTION 0x000900BC /* BeginTransaction */
|
||||
#define SCARD_IOCTL_END_TRANSACTION 0x000900C0 /* EndTransaction */
|
||||
#define SCARD_IOCTL_STATE 0x000900C4 /* State */
|
||||
#define SCARD_IOCTL_STATUS 0x000900C8 /* StatusA */
|
||||
#define SCARD_IOCTL_TRANSMIT 0x000900D0 /* Transmit */
|
||||
#define SCARD_IOCTL_CONTROL 0x000900D4 /* Control */
|
||||
#define SCARD_IOCTL_GETATTRIB 0x000900D8 /* GetAttrib */
|
||||
#define SCARD_IOCTL_SETATTRIB 0x000900DC /* SetAttrib */
|
||||
#define SCARD_IOCTL_ACCESS_STARTED_EVENT 0x000900E0 /* SCardAccessStartedEvent */
|
||||
#define SCARD_IOCTL_LOCATE_CARDS_BY_ATR 0x000900E8 /* LocateCardsByATR */
|
||||
#define SCARD_IOCTL_ESTABLISH_CONTEXT 0x00090014 /* EstablishContext */
|
||||
#define SCARD_IOCTL_RELEASE_CONTEXT 0x00090018 /* ReleaseContext */
|
||||
#define SCARD_IOCTL_IS_VALID_CONTEXT 0x0009001C /* IsValidContext */
|
||||
#define SCARD_IOCTL_LIST_READER_GROUPS 0x00090020 /* ListReaderGroups */
|
||||
#define SCARD_IOCTL_LIST_READERS 0x00090028 /* ListReadersA */
|
||||
#define SCARD_IOCTL_INTRODUCE_READER_GROUP 0x00090050 /* IntroduceReaderGroup */
|
||||
#define SCARD_IOCTL_FORGET_READER_GROUP 0x00090058 /* ForgetReader */
|
||||
#define SCARD_IOCTL_INTRODUCE_READER 0x00090060 /* IntroduceReader */
|
||||
#define SCARD_IOCTL_FORGET_READER 0x00090068 /* IntroduceReader */
|
||||
#define SCARD_IOCTL_ADD_READER_TO_GROUP 0x00090070 /* AddReaderToGroup */
|
||||
#define SCARD_IOCTL_REMOVE_READER_FROM_GROUP 0x00090078 /* RemoveReaderFromGroup */
|
||||
#define SCARD_IOCTL_GET_STATUS_CHANGE 0x000900A0 /* GetStatusChangeA */
|
||||
#define SCARD_IOCTL_CANCEL 0x000900A8 /* Cancel */
|
||||
#define SCARD_IOCTL_CONNECT 0x000900AC /* ConnectA */
|
||||
#define SCARD_IOCTL_RECONNECT 0x000900B4 /* Reconnect */
|
||||
#define SCARD_IOCTL_DISCONNECT 0x000900B8 /* Disconnect */
|
||||
#define SCARD_IOCTL_BEGIN_TRANSACTION 0x000900BC /* BeginTransaction */
|
||||
#define SCARD_IOCTL_END_TRANSACTION 0x000900C0 /* EndTransaction */
|
||||
#define SCARD_IOCTL_STATE 0x000900C4 /* State */
|
||||
#define SCARD_IOCTL_STATUS 0x000900C8 /* StatusA */
|
||||
#define SCARD_IOCTL_TRANSMIT 0x000900D0 /* Transmit */
|
||||
#define SCARD_IOCTL_CONTROL 0x000900D4 /* Control */
|
||||
#define SCARD_IOCTL_GETATTRIB 0x000900D8 /* GetAttrib */
|
||||
#define SCARD_IOCTL_SETATTRIB 0x000900DC /* SetAttrib */
|
||||
#define SCARD_IOCTL_ACCESS_STARTED_EVENT 0x000900E0 /* SCardAccessStartedEvent */
|
||||
#define SCARD_IOCTL_LOCATE_CARDS_BY_ATR 0x000900E8 /* LocateCardsByATR */
|
||||
|
||||
#define SCARD_INPUT_LINKED 0xFFFFFFFF
|
||||
#define SCARD_INPUT_LINKED 0xFFFFFFFF
|
||||
|
||||
/* Decode Win CTL_CODE values */
|
||||
#define WIN_CTL_FUNCTION(ctl_code) ((ctl_code & 0x3FFC) >> 2)
|
||||
#define WIN_CTL_DEVICE_TYPE(ctl_code) (ctl_code >> 16)
|
||||
#define WIN_CTL_FUNCTION(ctl_code) ((ctl_code & 0x3FFC) >> 2)
|
||||
#define WIN_CTL_DEVICE_TYPE(ctl_code) (ctl_code >> 16)
|
||||
|
||||
#define WIN_FILE_DEVICE_SMARTCARD 0x00000031
|
||||
#define WIN_FILE_DEVICE_SMARTCARD 0x00000031
|
||||
|
||||
|
||||
static uint32 sc_output_string(IRP* irp, char *src, boolean wide)
|
||||
|
@ -183,13 +181,14 @@ static void sc_output_buffer_start(IRP *irp, int length)
|
|||
|
||||
static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, boolean wide)
|
||||
{
|
||||
char *buffer;
|
||||
char* buffer;
|
||||
int bufferSize;
|
||||
|
||||
bufferSize = wide ? (2 * dataLength) : dataLength;
|
||||
buffer = xmalloc(bufferSize + 2); /* reserve 2 bytes for the '\0' */
|
||||
|
||||
stream_read(irp->input, buffer, bufferSize);
|
||||
|
||||
if (wide)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol client.
|
||||
* File System Virtual Channel
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Device Redirection Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,8 +18,17 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __RDPDR_CONSTANTS_H
|
||||
#define __RDPDR_CONSTANTS_H
|
||||
#ifndef FREERDP_CHANNEL_RDPDR_H
|
||||
#define FREERDP_CHANNEL_RDPDR_H
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/thread.h>
|
||||
#include <winpr/interlocked.h>
|
||||
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
/* RDPDR_HEADER.Component */
|
||||
enum RDPDR_CTYP
|
||||
|
@ -456,5 +465,66 @@ enum FILE_FS_INFORMATION_CLASS
|
|||
FileFsMaximumInformation
|
||||
};
|
||||
|
||||
#endif /* __RDPDR_CONSTANTS_H */
|
||||
typedef struct _DEVICE DEVICE;
|
||||
typedef struct _IRP IRP;
|
||||
typedef struct _DEVMAN DEVMAN;
|
||||
|
||||
typedef void (*pcIRPRequest)(DEVICE* device, IRP* irp);
|
||||
typedef void (*pcFreeDevice)(DEVICE* device);
|
||||
|
||||
struct _DEVICE
|
||||
{
|
||||
uint32 id;
|
||||
|
||||
uint32 type;
|
||||
char* name;
|
||||
STREAM* data;
|
||||
|
||||
pcIRPRequest IRPRequest;
|
||||
pcFreeDevice Free;
|
||||
};
|
||||
|
||||
typedef void (*pcIRPResponse)(IRP* irp);
|
||||
|
||||
struct _IRP
|
||||
{
|
||||
SLIST_ENTRY ItemEntry;
|
||||
|
||||
DEVICE* device;
|
||||
DEVMAN* devman;
|
||||
uint32 FileId;
|
||||
uint32 CompletionId;
|
||||
uint32 MajorFunction;
|
||||
uint32 MinorFunction;
|
||||
STREAM* input;
|
||||
|
||||
uint32 IoStatus;
|
||||
STREAM* output;
|
||||
|
||||
pcIRPResponse Complete;
|
||||
pcIRPResponse Discard;
|
||||
};
|
||||
|
||||
struct _DEVMAN
|
||||
{
|
||||
rdpSvcPlugin* plugin;
|
||||
uint32 id_sequence;
|
||||
LIST* devices;
|
||||
};
|
||||
|
||||
typedef void (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device);
|
||||
|
||||
struct _DEVICE_SERVICE_ENTRY_POINTS
|
||||
{
|
||||
DEVMAN* devman;
|
||||
|
||||
pcRegisterDevice RegisterDevice;
|
||||
RDP_PLUGIN_DATA* plugin_data;
|
||||
};
|
||||
typedef struct _DEVICE_SERVICE_ENTRY_POINTS DEVICE_SERVICE_ENTRY_POINTS;
|
||||
typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS;
|
||||
|
||||
typedef int (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS);
|
||||
|
||||
#endif /* FREERDP_CHANNEL_RDPDR_H */
|
||||
|
Loading…
Reference in New Issue