summaryrefslogtreecommitdiff
path: root/gusb/gusb-context.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2023-02-02 16:43:16 +0000
committerRichard Hughes <richard@hughsie.com>2023-02-03 12:30:17 +0000
commit3124faf28e23009bd304dbd66cd32227c4142a9b (patch)
tree746eda7399bea4a62de465fff0b016e1ab0b36ce /gusb/gusb-context.h
parent4db790b78afc0642be95416cccba9c05b7ca5c5a (diff)
downloadgusb-3124faf28e23009bd304dbd66cd32227c4142a9b.tar.gz
Do not emit spurious ::device-removed events when emulating
If we load new emulation data we have to do horrible tricks in the caller to avoid handling the remove event when loading new event data. Make the caller (fwupd) much simpler by emitting the correct signals. Also add a ::device-changed signal that we can use to reload the device events.
Diffstat (limited to 'gusb/gusb-context.h')
-rw-r--r--gusb/gusb-context.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gusb/gusb-context.h b/gusb/gusb-context.h
index 3c47b5e..b1d4d54 100644
--- a/gusb/gusb-context.h
+++ b/gusb/gusb-context.h
@@ -22,12 +22,13 @@ struct _GUsbContextClass {
GObjectClass parent_class;
void (*device_added)(GUsbContext *self, GUsbDevice *device);
void (*device_removed)(GUsbContext *self, GUsbDevice *device);
+ void (*device_changed)(GUsbContext *self, GUsbDevice *device);
/*< private >*/
/*
* If adding fields to this struct, remove corresponding
* amount of padding to avoid changing overall struct size
*/
- gchar _gusb_reserved[62];
+ gchar _gusb_reserved[61];
};
typedef enum { G_USB_CONTEXT_ERROR_INTERNAL } GUsbContextError;