summaryrefslogtreecommitdiffstats
path: root/src/adapter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index c10b24f3..0c28ac5e 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3397,3 +3397,28 @@ void adapter_update_devices(struct btd_adapter *adapter)
DBUS_TYPE_OBJECT_PATH, &devices);
g_free(devices);
}
+
+static gchar *adapter_any_path = NULL;
+static int adapter_any_refcount = 0;
+
+const char *btd_adapter_any_request_path(void)
+{
+ if (adapter_any_refcount > 0)
+ return adapter_any_path;
+
+ adapter_any_path = g_strdup_printf("%s/any", manager_get_base_path());
+ adapter_any_refcount++;
+
+ return adapter_any_path;
+}
+
+void btd_adapter_any_release_path(void)
+{
+ adapter_any_refcount--;
+
+ if (adapter_any_refcount > 0)
+ return;
+
+ g_free(adapter_any_path);
+ adapter_any_path = NULL;
+}