diff options
Diffstat (limited to 'device/bluetooth/bluetooth_device_bluez.cc')
-rw-r--r-- | device/bluetooth/bluetooth_device_bluez.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_device_bluez.cc b/device/bluetooth/bluetooth_device_bluez.cc index 4001f90..5ee49a4 100644 --- a/device/bluetooth/bluetooth_device_bluez.cc +++ b/device/bluetooth/bluetooth_device_bluez.cc @@ -244,6 +244,18 @@ uint16_t BluetoothDeviceBlueZ::GetDeviceID() const { return device_id; } +uint16_t BluetoothDeviceBlueZ::GetAppearance() const { + bluez::BluetoothDeviceClient::Properties* properties = + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( + object_path_); + DCHECK(properties); + + if (!properties->appearance.is_valid()) + return kAppearanceNotPresent; + + return properties->appearance.value(); +} + bool BluetoothDeviceBlueZ::IsPaired() const { bluez::BluetoothDeviceClient::Properties* properties = bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |