diff options
author | Richard Hughes <richard@hughsie.com> | 2023-01-24 13:54:14 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2023-01-24 14:13:28 +0000 |
commit | 7b2cd2fbded8456dc5ee6021a5e74e24f325fe2f (patch) | |
tree | 8ff011179fc024542c9934a5b56b9ae2729e0af4 /gusb/gusb-device.c | |
parent | 6ecb11a5845cf5773d7e711c96ab4c2971fda766 (diff) | |
download | gusb-7b2cd2fbded8456dc5ee6021a5e74e24f325fe2f.tar.gz |
Add g_usb_device_get_tags() for future use
Diffstat (limited to 'gusb/gusb-device.c')
-rw-r--r-- | gusb/gusb-device.c | 18 |
1 files changed, 18 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` |