diff options
| author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-01-06 16:13:49 +0200 |
|---|---|---|
| committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-08-11 12:29:30 +0100 |
| commit | f4fc06183d6dd9290dd7c8ba8f7443ef9f10cc0e (patch) | |
| tree | 4cc9ec535f23ebfb754ebae14ac57134ab960101 | |
| parent | 4a74ba33b620b74ec7a1b105751bae6d2bac6aa2 (diff) | |
| download | bluez-f4fc06183d6dd9290dd7c8ba8f7443ef9f10cc0e.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 }, { } }; |
