summaryrefslogtreecommitdiff
path: root/src/qmi-firmware-update/qfu-udev-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-12-05 19:28:36 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-01-16 11:24:14 +0100
commitd613f8ac4f55ed918ba6bd916f31cfac0d036d9f (patch)
treef271c74433911e39cd5a1583644d01005939c5a0 /src/qmi-firmware-update/qfu-udev-helpers.h
parentd6fccedd7b67567b1bef9323391364c6721feb19 (diff)
qmi-firmware-update: allow specifying devices by vid:pid or bus:dev
Diffstat (limited to 'src/qmi-firmware-update/qfu-udev-helpers.h')
-rw-r--r--src/qmi-firmware-update/qfu-udev-helpers.h37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/qmi-firmware-update/qfu-udev-helpers.h b/src/qmi-firmware-update/qfu-udev-helpers.h
index 759c5cf..9a26120 100644
--- a/src/qmi-firmware-update/qfu-udev-helpers.h
+++ b/src/qmi-firmware-update/qfu-udev-helpers.h
@@ -27,24 +27,29 @@
G_BEGIN_DECLS
-gchar *qfu_udev_helper_get_udev_device_sysfs_path (GUdevDevice *device,
- GError **error);
-gchar *qfu_udev_helper_get_sysfs_path (GFile *file,
- const gchar *const *subsys,
- GError **error);
+gchar *qfu_udev_helper_find_by_file (GFile *file,
+ GError **error);
+gchar *qfu_udev_helper_find_by_device_info (guint16 vid,
+ guint16 pid,
+ guint busnum,
+ guint devnum,
+ GError **error);
typedef enum {
- QFU_UDEV_HELPER_WAIT_FOR_DEVICE_TYPE_TTY,
- QFU_UDEV_HELPER_WAIT_FOR_DEVICE_TYPE_CDC_WDM,
-} QfuUdevHelperWaitForDeviceType;
-
-void qfu_udev_helper_wait_for_device (QfuUdevHelperWaitForDeviceType device_type,
- const gchar *sysfs_path,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GFile *qfu_udev_helper_wait_for_device_finish (GAsyncResult *res,
- GError **error);
+ QFU_UDEV_HELPER_DEVICE_TYPE_TTY,
+ QFU_UDEV_HELPER_DEVICE_TYPE_CDC_WDM,
+} QfuUdevHelperDeviceType;
+
+GList *qfu_udev_helper_list_devices (QfuUdevHelperDeviceType device_type,
+ const gchar *sysfs_path);
+
+void qfu_udev_helper_wait_for_device (QfuUdevHelperDeviceType device_type,
+ const gchar *sysfs_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GFile *qfu_udev_helper_wait_for_device_finish (GAsyncResult *res,
+ GError **error);
G_END_DECLS