From 61cd50a04f059b6af37fc0350dd73e4b233ddbec Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Fri, 17 Aug 2012 11:43:30 -0300 Subject: [PATCH] core: Add storing Appearance This patch stores the Appearance characteristic value read from the remote GAP service. --- src/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device.c b/src/device.c index d0d178cd3..f6161aa70 100644 --- a/src/device.c +++ b/src/device.c @@ -3021,6 +3021,7 @@ void device_set_appearance(struct btd_device *device, uint16_t value) { DBusConnection *conn = get_dbus_connection(); const char *icon = gap_appearance_to_icon(value); + bdaddr_t src; emit_property_changed(conn, device->path, DEVICE_INTERFACE, "Appearance", DBUS_TYPE_UINT16, &value); @@ -3028,6 +3029,10 @@ void device_set_appearance(struct btd_device *device, uint16_t value) if (icon) emit_property_changed(conn, device->path, DEVICE_INTERFACE, "Icon", DBUS_TYPE_STRING, &icon); + + adapter_get_address(device_get_adapter(device), &src); + write_remote_appearance(&src, &device->bdaddr, device->bdaddr_type, + value); } static gboolean notify_attios(gpointer user_data) -- 2.47.3