summaryrefslogtreecommitdiff
path: root/gusb
diff options
context:
space:
mode:
Diffstat (limited to 'gusb')
-rw-r--r--gusb/gusb-device.c18
-rw-r--r--gusb/gusb-device.h2
-rw-r--r--gusb/libgusb.ver1
3 files changed, 21 insertions, 0 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c
index 90f1539..ba777f6 100644
--- a/gusb/gusb-device.c
+++ b/gusb/gusb-device.c
@@ -449,6 +449,24 @@ _g_usb_device_save(GUsbDevice *self, JsonBuilder *json_builder, GError **error)
}
/**
+ * g_usb_device_get_tags:
+ * @self: a #GUsbDevice
+ *
+ * Gets all the tags.
+ *
+ * Returns: (transfer container) (element-type utf8): string tags
+ *
+ * Since: 0.4.4
+ **/
+GPtrArray *
+g_usb_device_get_tags(GUsbDevice *self)
+{
+ GUsbDevicePrivate *priv = GET_PRIVATE(self);
+ g_return_val_if_fail(G_USB_IS_DEVICE(self), NULL);
+ return g_ptr_array_ref(priv->tags);
+}
+
+/**
* g_usb_device_has_tag:
* @self: a #GUsbDevice
* @tag: a tag, for example `bootloader` or `runtime-reload`
diff --git a/gusb/gusb-device.h b/gusb/gusb-device.h
index 124dd57..17621e3 100644
--- a/gusb/gusb-device.h
+++ b/gusb/gusb-device.h
@@ -178,6 +178,8 @@ void
g_usb_device_remove_tag(GUsbDevice *self, const gchar *tag);
gboolean
g_usb_device_has_tag(GUsbDevice *self, const gchar *tag);
+GPtrArray *
+g_usb_device_get_tags(GUsbDevice *self);
guint8
g_usb_device_get_configuration_index(GUsbDevice *self);
diff --git a/gusb/libgusb.ver b/gusb/libgusb.ver
index 59c311c..92655a5 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_get_tags;
g_usb_device_is_emulated;
g_usb_device_remove_tag;
local: *;