FreeRDP
libusb_udevman.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/cmdline.h>
#include <freerdp/addin.h>
#include "urbdrc_types.h"
#include "urbdrc_main.h"
#include "libusb_udevice.h"

Macros

#define BASIC_STATE_FUNC_DEFINED(_arg, _type)
 
#define BASIC_STATE_FUNC_REGISTER(_arg, _man)
 
#define freerdp_urbdrc_client_subsystem_entry   FREERDP_API freerdp_urbdrc_client_subsystem_entry
 

Typedefs

typedef UDEVMAN * PUDEVMAN
 

Functions

static void udevman_rewind (IUDEVMAN *idevman)
 
static int udevman_has_next (IUDEVMAN *idevman)
 
static IUDEVICE * udevman_get_next (IUDEVMAN *idevman)
 
static IUDEVICE * udevman_get_udevice_by_addr (IUDEVMAN *idevman, int bus_number, int dev_number)
 
static int udevman_register_udevice (IUDEVMAN *idevman, int bus_number, int dev_number, int UsbDevice, UINT16 idVendor, UINT16 idProduct, int flag)
 
static int udevman_unregister_udevice (IUDEVMAN *idevman, int bus_number, int dev_number)
 
static void udevman_parse_device_addr (char *str, int *id1, int *id2, char sign)
 
static void udevman_parse_device_pid_vid (char *str, int *id1, int *id2, char sign)
 
static int udevman_check_device_exist_by_id (IUDEVMAN *idevman, UINT16 idVendor, UINT16 idProduct)
 
static int udevman_is_auto_add (IUDEVMAN *idevman)
 
static IUDEVICE * udevman_get_udevice_by_UsbDevice_try_again (IUDEVMAN *idevman, UINT32 UsbDevice)
 
static IUDEVICE * udevman_get_udevice_by_UsbDevice (IUDEVMAN *idevman, UINT32 UsbDevice)
 
static void udevman_loading_lock (IUDEVMAN *idevman)
 
static void udevman_loading_unlock (IUDEVMAN *idevman)
 
static void udevman_wait_urb (IUDEVMAN *idevman)
 
static void udevman_push_urb (IUDEVMAN *idevman)
 
static void udevman_free (IUDEVMAN *idevman)
 
static void udevman_load_interface (UDEVMAN *udevman)
 
static void urbdrc_udevman_register_devices (UDEVMAN *udevman, char *devices)
 
static void urbdrc_udevman_parse_addin_args (UDEVMAN *udevman, ADDIN_ARGV *args)
 
int freerdp_urbdrc_client_subsystem_entry (PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints)
 

Variables

int libusb_debug
 
COMMAND_LINE_ARGUMENT_A urbdrc_udevman_args []
 

Macro Definition Documentation

#define BASIC_STATE_FUNC_DEFINED (   _arg,
  _type 
)
Value:
static _type udevman_get_##_arg (IUDEVMAN* idevman) \
{ \
UDEVMAN * udevman = (UDEVMAN *) idevman; \
return udevman->_arg; \
} \
static void udevman_set_##_arg (IUDEVMAN* idevman, _type _t) \
{ \
UDEVMAN * udevman = (UDEVMAN *) idevman; \
udevman->_arg = _t; \
}
return(void *)((char *) buffer-> buffer+buffer->tail)
#define BASIC_STATE_FUNC_REGISTER (   _arg,
  _man 
)
Value:
_man->iface.get_##_arg = udevman_get_##_arg; \
_man->iface.set_##_arg = udevman_set_##_arg
#define freerdp_urbdrc_client_subsystem_entry   FREERDP_API freerdp_urbdrc_client_subsystem_entry

Typedef Documentation

typedef UDEVMAN* PUDEVMAN

Function Documentation

int freerdp_urbdrc_client_subsystem_entry ( PFREERDP_URBDRC_SERVICE_ENTRY_POINTS  pEntryPoints)

Here is the call graph for this function:

static int udevman_check_device_exist_by_id ( IUDEVMAN *  idevman,
UINT16  idVendor,
UINT16  idProduct 
)
static

Here is the caller graph for this function:

static void udevman_free ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static IUDEVICE* udevman_get_next ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static IUDEVICE* udevman_get_udevice_by_addr ( IUDEVMAN *  idevman,
int  bus_number,
int  dev_number 
)
static

Here is the caller graph for this function:

static IUDEVICE* udevman_get_udevice_by_UsbDevice ( IUDEVMAN *  idevman,
UINT32  UsbDevice 
)
static

Here is the caller graph for this function:

static IUDEVICE* udevman_get_udevice_by_UsbDevice_try_again ( IUDEVMAN *  idevman,
UINT32  UsbDevice 
)
static

Here is the caller graph for this function:

static int udevman_has_next ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static int udevman_is_auto_add ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static void udevman_load_interface ( UDEVMAN *  udevman)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void udevman_loading_lock ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static void udevman_loading_unlock ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static void udevman_parse_device_addr ( char *  str,
int *  id1,
int *  id2,
char  sign 
)
static

Here is the caller graph for this function:

static void udevman_parse_device_pid_vid ( char *  str,
int *  id1,
int *  id2,
char  sign 
)
static

Here is the caller graph for this function:

static void udevman_push_urb ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static int udevman_register_udevice ( IUDEVMAN *  idevman,
int  bus_number,
int  dev_number,
int  UsbDevice,
UINT16  idVendor,
UINT16  idProduct,
int  flag 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void udevman_rewind ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static int udevman_unregister_udevice ( IUDEVMAN *  idevman,
int  bus_number,
int  dev_number 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void udevman_wait_urb ( IUDEVMAN *  idevman)
static

Here is the caller graph for this function:

static void urbdrc_udevman_parse_addin_args ( UDEVMAN *  udevman,
ADDIN_ARGV *  args 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void urbdrc_udevman_register_devices ( UDEVMAN *  udevman,
char *  devices 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int libusb_debug

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX USB Redirection

Copyright 2012 Atrust corp. Copyright 2012 Alfred Liu alfre.nosp@m.d.li.nosp@m.u@atr.nosp@m.usco.nosp@m.rp.co.nosp@m.m

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.

COMMAND_LINE_ARGUMENT_A urbdrc_udevman_args[]
Initial value:
=
{
{ "dbg", COMMAND_LINE_VALUE_FLAG, "", NULL, BoolValueFalse, -1, NULL, "debug" },
{ "dev", COMMAND_LINE_VALUE_REQUIRED, "<devices>", NULL, NULL, -1, NULL, "device list" },
{ "id", COMMAND_LINE_VALUE_FLAG, "", NULL, BoolValueFalse, -1, NULL, "FLAG_ADD_BY_VID_PID" },
{ "addr", COMMAND_LINE_VALUE_FLAG, "", NULL, BoolValueFalse, -1, NULL, "FLAG_ADD_BY_ADDR" },
{ "auto", COMMAND_LINE_VALUE_FLAG, "", NULL, BoolValueFalse, -1, NULL, "FLAG_ADD_BY_AUTO" },
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
}
#define COMMAND_LINE_VALUE_REQUIRED
Definition: winpr/include/winpr/cmdline.h:34
if availableBytes return NULL
Definition: TPCircularBuffer.h:104
#define BoolValueFalse
Definition: winpr/include/winpr/cmdline.h:92
#define COMMAND_LINE_VALUE_FLAG
Definition: winpr/include/winpr/cmdline.h:33