diff options
-rw-r--r-- | gusb/gusb-device.c | 16 | ||||
-rw-r--r-- | gusb/gusb-device.h | 2 | ||||
-rw-r--r-- | gusb/libgusb.ver | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index ba777f6..db3a79c 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -1100,6 +1100,22 @@ g_usb_device_get_events(GUsbDevice *self) } /** + * g_usb_device_clear_events: + * @self: a #GUsbDevice + * + * Clear all the events saved by the device. + * + * Since: 0.4.4 + **/ +void +g_usb_device_clear_events(GUsbDevice *self) +{ + GUsbDevicePrivate *priv = GET_PRIVATE(self); + g_return_if_fail(G_USB_IS_DEVICE(self)); + g_ptr_array_set_size(priv->events, 0); +} + +/** * g_usb_device_invalidate: * @self: a #GUsbDevice * diff --git a/gusb/gusb-device.h b/gusb/gusb-device.h index 17621e3..7d034a1 100644 --- a/gusb/gusb-device.h +++ b/gusb/gusb-device.h @@ -207,6 +207,8 @@ g_usb_device_get_interfaces(GUsbDevice *self, GError **error); GPtrArray * g_usb_device_get_events(GUsbDevice *self); +void +g_usb_device_clear_events(GUsbDevice *self); GPtrArray * g_usb_device_get_bos_descriptors(GUsbDevice *self, GError **error); diff --git a/gusb/libgusb.ver b/gusb/libgusb.ver index 92655a5..2e85f0b 100644 --- a/gusb/libgusb.ver +++ b/gusb/libgusb.ver @@ -202,6 +202,7 @@ LIBGUSB_0.4.3 { LIBGUSB_0.4.4 { global: + g_usb_device_clear_events; g_usb_device_get_tags; g_usb_device_is_emulated; g_usb_device_remove_tag; |