21 #ifndef PLUGINS_USBDMX_LIBUSBADAPTOR_H_
22 #define PLUGINS_USBDMX_LIBUSBADAPTOR_H_
39 std::string manufacturer;
53 virtual libusb_device*
RefDevice(libusb_device *dev) = 0;
67 virtual bool OpenDevice(libusb_device *usb_device,
68 libusb_device_handle **usb_handle) = 0;
79 libusb_device *usb_device,
81 libusb_device_handle **usb_handle) = 0;
87 virtual void Close(libusb_device_handle *usb_handle) = 0;
103 int configuration) = 0;
118 int interface_number) = 0;
134 int interface_number) = 0;
150 struct libusb_config_descriptor **config) = 0;
164 uint8_t config_index,
165 struct libusb_config_descriptor **config) = 0;
172 struct libusb_config_descriptor *config) = 0;
181 virtual struct libusb_transfer*
AllocTransfer(
int iso_packets) = 0;
187 virtual void FreeTransfer(
struct libusb_transfer *transfer) = 0;
223 uint8_t bmRequestType,
227 uint16_t wLength) = 0;
241 libusb_device_handle *dev_handle,
242 unsigned char *buffer,
243 libusb_transfer_cb_fn callback,
245 unsigned int timeout) = 0;
261 libusb_device_handle *dev_handle,
262 unsigned char endpoint,
263 unsigned char *buffer,
265 libusb_transfer_cb_fn callback,
267 unsigned int timeout) = 0;
281 libusb_device_handle *dev_handle,
282 unsigned char endpoint,
283 unsigned char *buffer,
285 libusb_transfer_cb_fn callback,
287 unsigned int timeout) = 0;
309 uint8_t bmRequestType,
315 unsigned int timeout) = 0;
327 virtual int BulkTransfer(
struct libusb_device_handle *dev_handle,
328 unsigned char endpoint,
332 unsigned int timeout) = 0;
344 unsigned char endpoint,
348 unsigned int timeout) = 0;
360 struct libusb_device *usb_device,
361 const struct libusb_device_descriptor &device_descriptor,
362 DeviceInformation *device_info);
371 const DeviceInformation &device_info);
380 const DeviceInformation &device_info);
396 libusb_device*
RefDevice(libusb_device *dev);
402 int ClaimInterface(libusb_device_handle *dev,
int interface_number);
409 struct libusb_config_descriptor **config);
412 uint8_t config_index,
413 struct libusb_config_descriptor **config);
427 uint8_t bmRequestType,
434 libusb_device_handle *dev_handle,
435 unsigned char *buffer,
436 libusb_transfer_cb_fn callback,
438 unsigned int timeout);
441 libusb_device_handle *dev_handle,
442 unsigned char endpoint,
443 unsigned char *buffer,
445 libusb_transfer_cb_fn callback,
447 unsigned int timeout);
450 libusb_device_handle *dev_handle,
451 unsigned char endpoint,
452 unsigned char *buffer,
454 libusb_transfer_cb_fn callback,
456 unsigned int timeout);
460 uint8_t bmRequestType,
466 unsigned int timeout);
468 int BulkTransfer(
struct libusb_device_handle *dev_handle,
469 unsigned char endpoint,
473 unsigned int timeout);
476 unsigned char endpoint,
480 unsigned int timeout);
494 libusb_device_handle **usb_handle);
498 libusb_device_handle **usb_handle);
500 void Close(libusb_device_handle *usb_handle);
519 libusb_device_handle **usb_handle);
523 libusb_device_handle **usb_handle);
525 void Close(libusb_device_handle *usb_handle);
528 uint8_t bmRequestType,
534 unsigned int timeout);
536 int BulkTransfer(
struct libusb_device_handle *dev_handle,
537 unsigned char endpoint,
541 unsigned int timeout);
544 unsigned char endpoint,
548 unsigned int timeout);
558 #endif // PLUGINS_USBDMX_LIBUSBADAPTOR_H_