diff options
Diffstat (limited to 'droute')
-rw-r--r-- | droute/droute.c | 27 | ||||
-rw-r--r-- | droute/droute.h | 9 |
2 files changed, 36 insertions, 0 deletions
diff --git a/droute/droute.c b/droute/droute.c index 20c262f..9212e4d 100644 --- a/droute/droute.c +++ b/droute/droute.c @@ -686,6 +686,12 @@ droute_path_register (DRoutePath *path, DBusConnection *bus) } void +droute_path_unregister (DRoutePath *path, DBusConnection *bus) +{ + dbus_connection_unregister_object_path (bus, path->path); +} + +void droute_context_register (DRouteContext *cnx, DBusConnection *bus) { g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_register, @@ -693,9 +699,30 @@ droute_context_register (DRouteContext *cnx, DBusConnection *bus) } void +droute_context_unregister (DRouteContext *cnx, DBusConnection *bus) +{ + g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_unregister, + bus); +} + +void +droute_context_deregister (DRouteContext *cnx, DBusConnection *bus) +{ + g_ptr_array_foreach (cnx->registered_paths, (GFunc) droute_path_unregister, + bus); +} + +void droute_intercept_dbus (DBusConnection *bus) { dbus_connection_register_object_path (bus, DBUS_PATH_DBUS, &droute_vtable, NULL); } + +void +droute_unintercept_dbus (DBusConnection *bus) +{ + dbus_connection_unregister_object_path (bus, DBUS_PATH_DBUS); +} + /*END------------------------------------------------------------------------*/ diff --git a/droute/droute.h b/droute/droute.h index 766340e..b19dec6 100644 --- a/droute/droute.h +++ b/droute/droute.h @@ -97,8 +97,17 @@ void droute_path_register (DRoutePath *path, DBusConnection *bus); void +droute_path_unregister (DRoutePath *path, DBusConnection *bus); + +void droute_context_register (DRouteContext *cnx, DBusConnection *bus); void +droute_context_unregister (DRouteContext *cnx, DBusConnection *bus); + +void droute_intercept_dbus (DBusConnection *connection); + +void +droute_unintercept_dbus (DBusConnection *connection); #endif /* _DROUTE_H */ |