mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 04:20:04 +01:00
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:
parent
d2053eff93
commit
2bddb64f68
2 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue