tzwrapper.cc: fixed use of iterator after erase
[barry.git] / src / usbwrap_libusb.h
blob4222924955daa4920e903de4112c4e0377b7d354
1 ///
2 /// \file usbwrap_libusb.h
3 /// USB API wrapper for libusb version 0.1
4 ///
6 /*
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.
24 #ifndef __SB_USBWRAP_LIBUSB_H__
25 #define __SB_USBWRAP_LIBUSB_H__
27 #include "usbwrap.h"
28 #include <string>
30 #include <usb.h>
32 #if defined( WIN32 )
33 // On Windows systems, usb.h includes <windows.h> which defines min/max,
34 // which causes trouble for other headers
35 #undef min
36 #undef max
37 #endif
39 namespace Usb
42 class DeviceIDImpl
44 public:
45 struct usb_device* m_dev;
48 struct DeviceHandle
50 struct usb_dev_handle* m_handle;
53 struct DeviceListImpl
55 std::vector<DeviceID> m_devices;
58 struct EndpointDescriptorImpl
60 struct usb_endpoint_descriptor m_desc;
63 struct InterfaceDescriptorImpl
65 struct usb_interface_descriptor m_desc;
68 struct ConfigDescriptorImpl
70 struct usb_config_descriptor m_desc;
73 struct DeviceDescriptorImpl
75 struct usb_device* m_dev;
76 struct usb_device_descriptor m_desc;
79 }; // namespace Usb
81 #endif // __SB_USBWRAP_LIBUSB_H__