summaryrefslogtreecommitdiff
path: root/src/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/device.h b/src/device.h
index 904e21b..61ecf71 100644
--- a/src/device.h
+++ b/src/device.h
@@ -24,16 +24,18 @@
* Web: http://ni.fr.eu.org/
* Email: <nico at ni.fr.eu.org>
*/
+#include "image.h"
+
+#include <glib.h>
#include <libusb.h>
+#include <stdbool.h>
#include <stdint.h>
-#include <glib.h>
-
-#include "image.h"
/* Error domain for device related errors. */
#define DEVICE_ERROR device_error_quark()
struct device;
+struct device_manager;
/* USB poll function. If the device is handled by this driver, it should
* return a dynamically allocated string naming this device. */
@@ -43,7 +45,10 @@ typedef char *(*device_driver_usb_poll_f)(
/* USB open function. The device driver previously declared that it handles
* this device. */
typedef struct device *(*device_driver_usb_open_f)(
- libusb_context *usb, libusb_device *usb_device, GError **error);
+ struct device_manager *dm,
+ libusb_context *usb,
+ libusb_device *usb_device,
+ GError **error);
/* Poll function. If a device is handled by this driver, it should return a
* dynamically allocated string naming this device. */
@@ -52,7 +57,7 @@ typedef char *(*device_driver_poll_f)(void);
/* Open function. The device driver previously declared that it handles a
* device. */
typedef struct device *(*device_driver_open_f)(
- GError **error);
+ struct device_manager *dm, GError **error);
/* Information on a device driver. */
struct device_driver {