lib: Add UP_DEVICE_KIND_BLUETOOTH_GENERIC type

This will be useful to show information about Bluetooth devices which
don't fit in with the existing types, and for which we don't want to
show an unknown kind.
This commit is contained in:
Bastien Nocera 2021-06-17 11:31:21 +02:00
parent d2053eff93
commit 2bddb64f68
2 changed files with 5 additions and 0 deletions

View file

@ -101,6 +101,8 @@ up_device_kind_to_string (UpDeviceKind type_enum)
return "wearable";
case UP_DEVICE_KIND_TOY:
return "toy";
case UP_DEVICE_KIND_BLUETOOTH_GENERIC:
return "bluetooth-generic";
default:
return "unknown";
}
@ -173,6 +175,8 @@ up_device_kind_from_string (const gchar *type)
return UP_DEVICE_KIND_WEARABLE;
if (g_str_equal (type, "toy"))
return UP_DEVICE_KIND_TOY;
if (g_str_equal (type, "bluetooth-generic"))
return UP_DEVICE_KIND_BLUETOOTH_GENERIC;
return UP_DEVICE_KIND_UNKNOWN;
}

View file

@ -64,6 +64,7 @@ typedef enum {
UP_DEVICE_KIND_CAMERA,
UP_DEVICE_KIND_WEARABLE,
UP_DEVICE_KIND_TOY,
UP_DEVICE_KIND_BLUETOOTH_GENERIC,
UP_DEVICE_KIND_LAST
} UpDeviceKind;