2 /// \file usbwrap_libusb_1_0.h
3 /// USB API wrapper for libusb version 1.0
7 Copyright (C) 2005-2013, Chris Frey
8 Portions Copyright (C) 2011, RealVNC Ltd.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 See the GNU General Public License in the COPYING file at the
20 root directory of this project for more details.
23 #ifndef __SB_USBWRAP_LIBUSB_1_0_H__
24 #define __SB_USBWRAP_LIBUSB_1_0_H__
30 // On Windows systems, libusb.h includes <windows.h> which defines min/max,
31 // which causes trouble for other headers
43 std::string m_busname
;
44 std::string m_filename
;
46 DeviceIDImpl(libusb_device
*dev
);
52 libusb_device_handle
*m_handle
;
57 libusb_device
** m_list
;
59 std::vector
<DeviceID
> m_devices
;
62 struct EndpointDescriptorImpl
64 const struct libusb_endpoint_descriptor
* m_desc
;
67 struct InterfaceDescriptorImpl
69 const struct libusb_interface_descriptor
* m_desc
;
72 struct ConfigDescriptorImpl
74 struct libusb_config_descriptor
* m_desc
;
77 struct DeviceDescriptorImpl
79 struct libusb_device_descriptor m_desc
;
85 #endif // __SB_USBWRAP_LIBUSB_1_0_H__