X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=droute%2Fdroute.c;h=1567fc7bdc3d47cf9524dd6619f17ad6eb61cdca;hb=42099f8e221d9d887b5ffab1ba03a9eca160b83a;hp=20c262ff847980654be631fd4480d2d189160dc6;hpb=ccc0eca4840cfeba27754b0cd2b576d9698068a4;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/droute/droute.c b/droute/droute.c index 20c262f..1567fc7 100644 --- a/droute/droute.c +++ b/droute/droute.c @@ -537,16 +537,15 @@ handle_other (DBusConnection *bus, else reply = (func) (bus, message, datum); - if (!reply) + /* All D-Bus method calls must have a reply. + * If one is not provided presume that the caller has already + * sent one. + */ + if (reply) { - /* All D-Bus method calls must have a reply. - * If one is not provided presume that the call has a void - * return and no error has occured. - */ - reply = dbus_message_new_method_return (message); + dbus_connection_send (bus, reply, NULL); + dbus_message_unref (reply); } - dbus_connection_send (bus, reply, NULL); - dbus_message_unref (reply); result = DBUS_HANDLER_RESULT_HANDLED; } @@ -686,6 +685,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 +698,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------------------------------------------------------------------------*/