|
Packit |
1fb8d4 |
/**
|
|
Packit |
1fb8d4 |
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
Packit |
1fb8d4 |
* RemoteFX USB Redirection
|
|
Packit |
1fb8d4 |
*
|
|
Packit |
1fb8d4 |
* Copyright 2012 Atrust corp.
|
|
Packit |
1fb8d4 |
* Copyright 2012 Alfred Liu <alfred.liu@atruscorp.com>
|
|
Packit |
1fb8d4 |
*
|
|
Packit |
1fb8d4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit |
1fb8d4 |
* you may not use this file except in compliance with the License.
|
|
Packit |
1fb8d4 |
* You may obtain a copy of the License at
|
|
Packit |
1fb8d4 |
*
|
|
Packit |
1fb8d4 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
1fb8d4 |
*
|
|
Packit |
1fb8d4 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
1fb8d4 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
1fb8d4 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
1fb8d4 |
* See the License for the specific language governing permissions and
|
|
Packit |
1fb8d4 |
* limitations under the License.
|
|
Packit |
1fb8d4 |
*/
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
#ifndef FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H
|
|
Packit |
1fb8d4 |
#define FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H
|
|
Packit |
1fb8d4 |
|
|
Packit Service |
5a9772 |
#include <winpr/windows.h>
|
|
Packit |
1fb8d4 |
#include <libusb.h>
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
#include "urbdrc_types.h"
|
|
Packit |
1fb8d4 |
#include "urbdrc_main.h"
|
|
Packit |
1fb8d4 |
|
|
Packit Service |
5a9772 |
typedef struct libusb_device LIBUSB_DEVICE;
|
|
Packit Service |
5a9772 |
typedef struct libusb_device_handle LIBUSB_DEVICE_HANDLE;
|
|
Packit Service |
5a9772 |
typedef struct libusb_device_descriptor LIBUSB_DEVICE_DESCRIPTOR;
|
|
Packit Service |
5a9772 |
typedef struct libusb_config_descriptor LIBUSB_CONFIG_DESCRIPTOR;
|
|
Packit Service |
5a9772 |
typedef struct libusb_interface LIBUSB_INTERFACE;
|
|
Packit Service |
5a9772 |
typedef struct libusb_interface_descriptor LIBUSB_INTERFACE_DESCRIPTOR;
|
|
Packit Service |
5a9772 |
typedef struct libusb_endpoint_descriptor LIBUSB_ENDPOINT_DESCEIPTOR;
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
typedef struct _UDEVICE UDEVICE;
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
struct _UDEVICE
|
|
Packit |
1fb8d4 |
{
|
|
Packit |
1fb8d4 |
IUDEVICE iface;
|
|
Packit |
1fb8d4 |
|
|
Packit Service |
5a9772 |
void* udev;
|
|
Packit Service |
5a9772 |
void* prev;
|
|
Packit Service |
5a9772 |
void* next;
|
|
Packit Service |
5a9772 |
|
|
Packit Service |
5a9772 |
UINT32 UsbDevice; /* An unique interface ID */
|
|
Packit Service |
5a9772 |
UINT32 ReqCompletion; /* An unique interface ID */
|
|
Packit Service |
5a9772 |
IWTSVirtualChannelManager* channelManager;
|
|
Packit Service |
5a9772 |
UINT32 channelID;
|
|
Packit Service |
5a9772 |
UINT16 status;
|
|
Packit Service |
5a9772 |
BYTE bus_number;
|
|
Packit Service |
5a9772 |
BYTE dev_number;
|
|
Packit Service |
5a9772 |
char path[17];
|
|
Packit Service |
5a9772 |
int port_number;
|
|
Packit Service |
5a9772 |
int isCompositeDevice;
|
|
Packit Service |
5a9772 |
|
|
Packit Service |
5a9772 |
LIBUSB_DEVICE_HANDLE* libusb_handle;
|
|
Packit Service |
5a9772 |
LIBUSB_DEVICE_HANDLE* hub_handle;
|
|
Packit Service |
5a9772 |
LIBUSB_DEVICE* libusb_dev;
|
|
Packit Service |
5a9772 |
LIBUSB_DEVICE_DESCRIPTOR* devDescriptor;
|
|
Packit Service |
5a9772 |
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
|
Packit Service |
5a9772 |
LIBUSB_CONFIG_DESCRIPTOR* LibusbConfig;
|
|
Packit Service |
5a9772 |
|
|
Packit Service |
5a9772 |
wHashTable* request_queue;
|
|
Packit Service |
5a9772 |
|
|
Packit Service |
5a9772 |
URBDRC_PLUGIN* urbdrc;
|
|
Packit |
1fb8d4 |
};
|
|
Packit Service |
5a9772 |
typedef UDEVICE* PUDEVICE;
|
|
Packit |
1fb8d4 |
|
|
Packit Service |
5a9772 |
size_t udev_new_by_id(URBDRC_PLUGIN* urbdrc, libusb_context* ctx, UINT16 idVendor, UINT16 idProduct,
|
|
Packit Service |
5a9772 |
IUDEVICE*** devArray);
|
|
Packit Service |
5a9772 |
IUDEVICE* udev_new_by_addr(URBDRC_PLUGIN* urbdrc, libusb_context* ctx, BYTE bus_number,
|
|
Packit Service |
5a9772 |
BYTE dev_number);
|
|
Packit Service |
5a9772 |
const char* usb_interface_class_to_string(uint8_t class);
|
|
Packit |
1fb8d4 |
|
|
Packit |
1fb8d4 |
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H */
|