summaryrefslogtreecommitdiff
path: root/gusb/gusb-device.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2022-10-26 09:10:31 +0100
committerRichard Hughes <richard@hughsie.com>2022-10-26 09:20:05 +0100
commitfa2556b755343dfd973b05ac101ba2c8b20645db (patch)
tree58214bc30b6fa109b0dd475209f0a11ebe01b3ca /gusb/gusb-device.c
parent45715f8cc484f04e36b9667834678edc43742306 (diff)
downloadgusb-fa2556b755343dfd973b05ac101ba2c8b20645db.tar.gz
Export g_usb_device_has_tag()
Diffstat (limited to 'gusb/gusb-device.c')
-rw-r--r--gusb/gusb-device.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c
index 601e5d6..773b3bc 100644
--- a/gusb/gusb-device.c
+++ b/gusb/gusb-device.c
@@ -448,8 +448,19 @@ _g_usb_device_save(GUsbDevice *self, JsonBuilder *json_builder, GError **error)
return TRUE;
}
+/**
+ * g_usb_device_has_tag:
+ * @self: a #GUsbDevice
+ * @tag: a tag, for example `bootloader` or `runtime-reload`
+ *
+ * Checks if a tag has been used to identify the specific device.
+ *
+ * Return value: %TRUE on success
+ *
+ * Since: 0.4.3
+ **/
gboolean
-_g_usb_device_has_tag(GUsbDevice *self, const gchar *tag)
+g_usb_device_has_tag(GUsbDevice *self, const gchar *tag)
{
GUsbDevicePrivate *priv = GET_PRIVATE(self);
@@ -485,7 +496,7 @@ g_usb_device_add_tag(GUsbDevice *self, const gchar *tag)
g_return_if_fail(G_USB_IS_DEVICE(self));
g_return_if_fail(tag != NULL);
- if (_g_usb_device_has_tag(self, tag))
+ if (g_usb_device_has_tag(self, tag))
return;
g_ptr_array_add(priv->tags, g_strdup(tag));
}