+void
+droute_path_register (DRoutePath *path, DBusConnection *bus)
+{
+ if (path->prefix)
+ dbus_connection_register_fallback (bus, path->path, &droute_vtable, path);
+ else
+ dbus_connection_register_object_path (bus, path->path,
+ &droute_vtable, path);
+}
+
+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,
+ 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);
+}
+