add GPL v2+ SPDX header
[project/usbmode.git] / switch.h
index 1c964db582f588fccc77b897cac92391e1a5594b..309543e7c207f9eefce56ace9efcfa7730c26870 100644 (file)
--- a/switch.h
+++ b/switch.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef __USBMODE_SWITCH_H
 #define __USBMODE_SWITCH_H
 
@@ -7,20 +8,24 @@
 struct usbdev_data {
        struct libusb_device_descriptor desc;
        struct libusb_config_descriptor *config;
+       libusb_device *dev;
        libusb_device_handle *devh;
        struct blob_attr *info;
        int interface;
        int msg_endpoint;
        int response_endpoint;
+       int release_delay;
+       int dev_class;
        bool need_response;
 
        char idstr[10];
        char mfg[128], prod[128], serial[128];
 };
 
-extern struct blob_attr **messages;
+extern char **messages;
 extern int *message_len;
 extern int n_messages;
+extern struct libusb_context *usb;
 
 void handle_switch(struct usbdev_data *data);