From e3f823061e2554af692d79d50cbb370e8f227375 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Mon, 10 Apr 2017 13:16:46 -0700 Subject: [PATCH] client: Add interface_type_register/unregister --- client/dbus-proxy.c | 12 ++++++++++++ client/dbus-proxy.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c index 536ef000..35fe9587 100644 --- a/client/dbus-proxy.c +++ b/client/dbus-proxy.c @@ -321,6 +321,18 @@ static void dbus_disconnect_callback(void *user_data) l_main_quit(); } +void proxy_interface_type_register( + const struct proxy_interface_type *interface_type) +{ + l_queue_push_tail(proxy_interface_types, (void *) interface_type); +} + +void proxy_interface_type_unregister( + const struct proxy_interface_type *interface_type) +{ + l_queue_remove(proxy_interface_types, (void *) interface_type); +} + bool dbus_proxy_init(void) { if (dbus) diff --git a/client/dbus-proxy.h b/client/dbus-proxy.h index cc9abf95..1491856f 100644 --- a/client/dbus-proxy.h +++ b/client/dbus-proxy.h @@ -42,5 +42,10 @@ struct proxy_interface_type { struct proxy_interface *proxy_interface_find(const char *interface, const char *path); +void proxy_interface_type_register( + const struct proxy_interface_type *interface_type); +void proxy_interface_type_unregister( + const struct proxy_interface_type *interface_type); + bool dbus_proxy_init(void); bool dbus_proxy_exit(void);