aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/bluetooth-util.c')
-rw-r--r--binding/bluetooth-util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/binding/bluetooth-util.c b/binding/bluetooth-util.c
index 0af4898..e826aaf 100644
--- a/binding/bluetooth-util.c
+++ b/binding/bluetooth-util.c
@@ -1024,3 +1024,15 @@ json_object *get_named_property(const struct property_info *pi,
return jret;
}
+
+void json_process_path(json_object *jresp, const char *path) {
+ gchar *tmp;
+
+ tmp = bluez_return_adapter(path);
+ json_object_object_add(jresp, "adapter", json_object_new_string(tmp));
+ g_free(tmp);
+
+ tmp = bluez_return_device(path);
+ json_object_object_add(jresp, "device", json_object_new_string(tmp));
+ g_free(tmp);
+}