From 4de0cd850ef8f004010e4f56cf121def0ef2052c Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Fri, 17 Aug 2012 11:43:29 -0300 Subject: [PATCH] core: PropertyChanged signal for Icon/Appearance This patch emits the PropertyChanged signal in the Device hierarchy when the remote device Appearance characteristic is read. In general Appearance is a static value, if the device doesn't expose the Appearance value in the advertising data, the GAP plugin should read the value using GATT read procedure. --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.c b/src/device.c index 7657a74d1..d0d178cd3 100644 --- a/src/device.c +++ b/src/device.c @@ -3020,9 +3020,14 @@ int device_get_appearance(struct btd_device *device, uint16_t *value) void device_set_appearance(struct btd_device *device, uint16_t value) { DBusConnection *conn = get_dbus_connection(); + const char *icon = gap_appearance_to_icon(value); emit_property_changed(conn, device->path, DEVICE_INTERFACE, "Appearance", DBUS_TYPE_UINT16, &value); + + if (icon) + emit_property_changed(conn, device->path, DEVICE_INTERFACE, + "Icon", DBUS_TYPE_STRING, &icon); } static gboolean notify_attios(gpointer user_data) -- 2.47.3