mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-26 15:30:04 +01:00
Add media-player and tablet device kinds
This commit is contained in:
parent
8077052c3f
commit
0ece8dea46
2 changed files with 12 additions and 0 deletions
|
|
@ -73,6 +73,12 @@ up_device_kind_to_string (UpDeviceKind type_enum)
|
||||||
case UP_DEVICE_KIND_PHONE:
|
case UP_DEVICE_KIND_PHONE:
|
||||||
type = "phone";
|
type = "phone";
|
||||||
break;
|
break;
|
||||||
|
case UP_DEVICE_KIND_MEDIA_PLAYER:
|
||||||
|
type = "media-player";
|
||||||
|
break;
|
||||||
|
case UP_DEVICE_KIND_TABLET:
|
||||||
|
type = "tablet";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
type = "unknown";
|
type = "unknown";
|
||||||
break;
|
break;
|
||||||
|
|
@ -110,6 +116,10 @@ up_device_kind_from_string (const gchar *type)
|
||||||
return UP_DEVICE_KIND_PDA;
|
return UP_DEVICE_KIND_PDA;
|
||||||
if (g_strcmp0 (type, "phone") == 0)
|
if (g_strcmp0 (type, "phone") == 0)
|
||||||
return UP_DEVICE_KIND_PHONE;
|
return UP_DEVICE_KIND_PHONE;
|
||||||
|
if (g_strcmp0 (type, "media-player") == 0)
|
||||||
|
return UP_DEVICE_KIND_MEDIA_PLAYER;
|
||||||
|
if (g_strcmp0 (type, "tablet") == 0)
|
||||||
|
return UP_DEVICE_KIND_TABLET;
|
||||||
return UP_DEVICE_KIND_UNKNOWN;
|
return UP_DEVICE_KIND_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ typedef enum {
|
||||||
UP_DEVICE_KIND_KEYBOARD,
|
UP_DEVICE_KIND_KEYBOARD,
|
||||||
UP_DEVICE_KIND_PDA,
|
UP_DEVICE_KIND_PDA,
|
||||||
UP_DEVICE_KIND_PHONE,
|
UP_DEVICE_KIND_PHONE,
|
||||||
|
UP_DEVICE_KIND_MEDIA_PLAYER,
|
||||||
|
UP_DEVICE_KIND_TABLET,
|
||||||
UP_DEVICE_KIND_LAST
|
UP_DEVICE_KIND_LAST
|
||||||
} UpDeviceKind;
|
} UpDeviceKind;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue