XnUSBDevice.h File Reference
`#include "XnPlatform.h"`
`#include "XnStatus.h"`
`#include <Win32/usb100.h>`

Go to the source code of this file.

## Classes

struct | XnUSBStringDescriptor
struct | XnUSBInterfaceDescriptorHolder
struct | XnUSBConfigDescriptorHolder
struct | XnUSBDeviceDescriptorHolder

## Macros

#define | USB_DT_CONFIG_SIZE 0
#define | USB_DT_CONFIG 0
#define | USB_CONFIG_ATT_ONE 0
#define | USB_DT_ENDPOINT_SIZE 0
#define | USB_DT_ENDPOINT 0
#define | USB_ENDPOINT_XFER_BULK 0
#define | USB_DT_INTERFACE_SIZE 0
#define | USB_DT_INTERFACE 0
#define | USB_CLASS_VENDOR_SPEC 0
#define | USB_DT_DEVICE_SIZE 0
#define | USB_DT_DEVICE 0

## Typedefs

typedef USB_ENDPOINT_DESCRIPTOR | XnUSBEndpointDescriptor
typedef USB_INTERFACE_DESCRIPTOR | XnUSBInterfaceDescriptor
typedef USB_CONFIGURATION_DESCRIPTOR | XnUSBConfigDescriptor
typedef USB_DEVICE_DESCRIPTOR | XnUSBDeviceDescriptor
typedef enum XnUSBDeviceConnectionState | XnUSBDeviceConnectionState
typedef struct XnUSBStringDescriptor | XnUSBStringDescriptor
typedef struct XnUSBInterfaceDescriptorHolder | XnUSBInterfaceDescriptorHolder
typedef struct XnUSBConfigDescriptorHolder | XnUSBConfigDescriptorHolder
typedef struct XnUSBDeviceDescriptorHolder | XnUSBDeviceDescriptorHolder
typedef struct XnUSBDevice | XnUSBDevice
typedef void(* | XnUSBDeviceNewControlRequestCallback) (XnUSBDevice *pDevice, void *pCookie)
typedef void(* | XnUSBDeviceConnectivityChangedCallback) (XnUSBDevice *pDevice, XnUSBDeviceConnectionState state, void *pCookie)

## Enumerations

enum | XnUSBDeviceConnectionState { XN_USB_DEVICE_DISCONNECTED , XN_USB_DEVICE_CONNECTED , XN_USB_DEVICE_SUSPENDED }

## Functions

XN_C_API XnStatus XN_C_DECL | xnUSBDeviceInit (const XnUSBDeviceDescriptorHolder *pDeviceDescriptor, XnUInt32 nControlMessageMaxSize, XnUSBDevice **ppDevice)
XN_C_API void XN_C_DECL | xnUSBDeviceShutdown (XnUSBDevice *pDevice)
XN_C_API XnBool XN_C_DECL | xnUSBDeviceIsControlRequestPending (XnUSBDevice *pDevice)
XN_C_API XnStatus XN_C_DECL | xnUSBDeviceReceiveControlRequest (XnUSBDevice *pDevice, XnUChar *pBuffer, XnUInt32 *pnRequestSize)
XN_C_API XnStatus XN_C_DECL | xnUSBDeviceSendControlReply (XnUSBDevice *pDevice, const XnUChar *pBuffer, XnUInt32 nReplySize)
XN_C_API XnStatus XN_C_DECL | xnUSBDeviceSetNewControlRequestCallback (XnUSBDevice *pDevice, XnUSBDeviceNewControlRequestCallback pFunc, void *pCookie)
XN_C_API XnStatus XN_C_DECL | xnUSBDeviceSetConnectivityChangedCallback (XnUSBDevice *pDevice, XnUSBDeviceConnectivityChangedCallback pFunc, void *pCookie)
XN_C_API XnStatus XN_C_DECL | xnUSBDeviceWriteEndpoint (XnUSBDevice *pDevice, XnUInt8 nAddress, const XnUChar *pData, XnUInt32 nDataSize)

## Macro Definition Documentation

## USB_CLASS_VENDOR_SPEC

#define USB_CLASS_VENDOR_SPEC 0

## USB_CONFIG_ATT_ONE

#define USB_CONFIG_ATT_ONE 0

## USB_DT_CONFIG

#define USB_DT_CONFIG 0

## USB_DT_CONFIG_SIZE

#define USB_DT_CONFIG_SIZE 0

## USB_DT_DEVICE

#define USB_DT_DEVICE 0

## USB_DT_DEVICE_SIZE

#define USB_DT_DEVICE_SIZE 0

## USB_DT_ENDPOINT

#define USB_DT_ENDPOINT 0

## USB_DT_ENDPOINT_SIZE

#define USB_DT_ENDPOINT_SIZE 0

## USB_DT_INTERFACE

#define USB_DT_INTERFACE 0

## USB_DT_INTERFACE_SIZE

#define USB_DT_INTERFACE_SIZE 0

## USB_ENDPOINT_XFER_BULK

#define USB_ENDPOINT_XFER_BULK 0

## Typedef Documentation

## XnUSBConfigDescriptor

typedef USB_CONFIGURATION_DESCRIPTOR XnUSBConfigDescriptor

## XnUSBConfigDescriptorHolder

typedef struct XnUSBConfigDescriptorHolder XnUSBConfigDescriptorHolder

## XnUSBDevice

typedef struct XnUSBDevice XnUSBDevice

## XnUSBDeviceConnectionState

typedef enum XnUSBDeviceConnectionState XnUSBDeviceConnectionState

## XnUSBDeviceConnectivityChangedCallback

typedef void(* XnUSBDeviceConnectivityChangedCallback) (XnUSBDevice *pDevice, XnUSBDeviceConnectionState state, void *pCookie)

## XnUSBDeviceDescriptor

typedef USB_DEVICE_DESCRIPTOR XnUSBDeviceDescriptor

## XnUSBDeviceDescriptorHolder

typedef struct XnUSBDeviceDescriptorHolder XnUSBDeviceDescriptorHolder

## XnUSBDeviceNewControlRequestCallback

typedef void(* XnUSBDeviceNewControlRequestCallback) (XnUSBDevice *pDevice, void *pCookie)

## XnUSBEndpointDescriptor

typedef USB_ENDPOINT_DESCRIPTOR XnUSBEndpointDescriptor

## XnUSBInterfaceDescriptor

typedef USB_INTERFACE_DESCRIPTOR XnUSBInterfaceDescriptor

## XnUSBInterfaceDescriptorHolder

typedef struct XnUSBInterfaceDescriptorHolder XnUSBInterfaceDescriptorHolder

## XnUSBStringDescriptor

typedef struct XnUSBStringDescriptor XnUSBStringDescriptor

## Enumeration Type Documentation

## XnUSBDeviceConnectionState

enum XnUSBDeviceConnectionState

Enumerator
XN_USB_DEVICE_DISCONNECTED |
XN_USB_DEVICE_CONNECTED |
XN_USB_DEVICE_SUSPENDED |

## Function Documentation

## xnUSBDeviceInit()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceInit | ( | const XnUSBDeviceDescriptorHolder * | pDeviceDescriptor,
|  | XnUInt32 | nControlMessageMaxSize,
|  | XnUSBDevice ** | ppDevice )

## xnUSBDeviceIsControlRequestPending()

XN_C_API XnBool XN_C_DECL xnUSBDeviceIsControlRequestPending | ( | XnUSBDevice * | pDevice | ) |

## xnUSBDeviceReceiveControlRequest()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceReceiveControlRequest | ( | XnUSBDevice * | pDevice,
|  | XnUChar * | pBuffer,
|  | XnUInt32 * | pnRequestSize )

## xnUSBDeviceSendControlReply()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceSendControlReply | ( | XnUSBDevice * | pDevice,
|  | const XnUChar * | pBuffer,
|  | XnUInt32 | nReplySize )

## xnUSBDeviceSetConnectivityChangedCallback()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceSetConnectivityChangedCallback | ( | XnUSBDevice * | pDevice,
|  | XnUSBDeviceConnectivityChangedCallback | pFunc,
|  | void * | pCookie )

## xnUSBDeviceSetNewControlRequestCallback()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceSetNewControlRequestCallback | ( | XnUSBDevice * | pDevice,
|  | XnUSBDeviceNewControlRequestCallback | pFunc,
|  | void * | pCookie )

## xnUSBDeviceShutdown()

XN_C_API void XN_C_DECL xnUSBDeviceShutdown | ( | XnUSBDevice * | pDevice | ) |

## xnUSBDeviceWriteEndpoint()

XN_C_API XnStatus XN_C_DECL xnUSBDeviceWriteEndpoint | ( | XnUSBDevice * | pDevice,
|  | XnUInt8 | nAddress,
|  | const XnUChar * | pData,
|  | XnUInt32 | nDataSize )