diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-01-06 16:13:49 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-01-28 14:05:30 +0200 |
commit | c707943884dae067528b155baf434ed47f7a4b4b (patch) | |
tree | bf2b5b3eeeb31f423b87737a47f776297c39d32d | |
parent | 3f95667967aa816c3e4de35fa0e4e22627e55105 (diff) | |
download | bluez-c707943884dae067528b155baf434ed47f7a4b4b.tar.gz |
plugins/service: Add RemoteUUID property
-rw-r--r-- | plugins/service.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/service.c b/plugins/service.c index cb8d6c90d..ae805157f 100644 --- a/plugins/service.c +++ b/plugins/service.c @@ -130,8 +130,29 @@ static gboolean get_state(const GDBusPropertyTable *property, return TRUE; } +static gboolean remote_uuid_exists(const GDBusPropertyTable *property, + void *user_data) +{ + struct service_data *data = user_data; + struct btd_profile *p = btd_service_get_profile(data->service); + + return p->remote_uuid != NULL; +} + +static gboolean get_remote_uuid(const GDBusPropertyTable *property, + DBusMessageIter *iter, void *user_data) +{ + struct service_data *data = user_data; + struct btd_profile *p = btd_service_get_profile(data->service); + + dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &p->remote_uuid); + + return TRUE; +} + static const GDBusPropertyTable service_properties[] = { { "State", "s", get_state, NULL, NULL }, + { "RemoteUUID", "s", get_remote_uuid, NULL, remote_uuid_exists }, { } }; |