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> | 2014-04-10 14:16:14 +0000 |
| commit | 9248a77a77643b54fe85e078c960e0b3a967e127 (patch) | |
| tree | 1c3abfe17b371ca91202433701c77770cd0f354c | |
| parent | 6761c5bd9dce783dd1bf2f8b0172da200cf9d5e5 (diff) | |
| download | bluez-9248a77a77643b54fe85e078c960e0b3a967e127.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 }, { } }; |
