add a mbim eject handler
[project/usbmode.git] / switch.h
index eda94c2..97c14f3 100644 (file)
--- a/switch.h
+++ b/switch.h
@@ -6,20 +6,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;
+       bool need_response;
 
        char idstr[10];
        char mfg[128], prod[128], serial[128];
 };
 
-enum {
-       DATA_MODE,
-       DATA_MSG,
-       DATA_MSG2,
-       DATA_MSG3,
-       __DATA_MAX
-};
+extern char **messages;
+extern int *message_len;
+extern int n_messages;
+extern struct libusb_context *usb;
 
 void handle_switch(struct usbdev_data *data);