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-03-09 18:21:42 +0000 |
| commit | 6b0d43aae9291db2edc6e84feb1b406b51940660 (patch) | |
| tree | 9287f180b9ff59ec4e0bf6a302129bf95c6bc56c | |
| parent | 9f9e1b2813e047e7de59676e9ecfc900e377e969 (diff) | |
| download | bluez-6b0d43aae9291db2edc6e84feb1b406b51940660.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 b660810c1..7b5783d33 100644 --- a/plugins/service.c +++ b/plugins/service.c @@ -128,8 +128,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 }, { } }; |
