summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-01-06 16:13:49 +0200
committerMikko Ylinen <mikko.ylinen@intel.com>2014-09-23 21:29:46 +0300
commitedff2c3b4438603402241c80d60a51c51200b2f0 (patch)
treefb4dee10868e8a20cdeafc5c25174b310e2c3d53 /plugins
parent879cd4b30144c1b16f1b4f97a3bb28c217bf949d (diff)
downloadbluez-edff2c3b4438603402241c80d60a51c51200b2f0.tar.gz
bluez-edff2c3b4438603402241c80d60a51c51200b2f0.tar.bz2
bluez-edff2c3b4438603402241c80d60a51c51200b2f0.zip
plugins/service: Add RemoteUUID property
Diffstat (limited to 'plugins')
-rw-r--r--plugins/service.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/service.c b/plugins/service.c
index b660810c..7b5783d3 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 },
{ }
};