diff options
author | David Zeuthen <davidz@redhat.com> | 2010-05-10 11:47:08 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-05-10 11:47:08 -0400 |
commit | 869b4c68332f36377bbdfd186e37f6194ae5ed5a (patch) | |
tree | d6d614b211ec804a7191858ceafad47322829140 /gio/gdbusnamewatching.c | |
parent | 728c4e38e72055080c148f9cebca85a08d16a445 (diff) | |
download | glib-869b4c68332f36377bbdfd186e37f6194ae5ed5a.tar.gz |
GDBus: Use call() instead of invoke_method()
Lots of people been suggesting this. We still use MethodInvocation /
method_invocation for handling incoming method calls so use call()
instead of invoke_method() helps to separate the client and server
facilities. Which is a good thing(tm).
Diffstat (limited to 'gio/gdbusnamewatching.c')
-rw-r--r-- | gio/gdbusnamewatching.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c index 4e33e8356..3d96ee0a9 100644 --- a/gio/gdbusnamewatching.c +++ b/gio/gdbusnamewatching.c @@ -331,9 +331,9 @@ get_name_owner_cb (GObject *source_object, name_owner = NULL; result = NULL; - result = g_dbus_connection_invoke_method_finish (client->connection, - res, - NULL); + result = g_dbus_connection_call_finish (client->connection, + res, + NULL); if (result != NULL) { g_variant_get (result, "(s)", &name_owner); @@ -362,17 +362,17 @@ get_name_owner_cb (GObject *source_object, static void invoke_get_name_owner (Client *client) { - g_dbus_connection_invoke_method (client->connection, - "org.freedesktop.DBus", /* bus name */ - "/org/freedesktop/DBus", /* object path */ - "org.freedesktop.DBus", /* interface name */ - "GetNameOwner", /* method name */ - g_variant_new ("(s)", client->name), - G_DBUS_INVOKE_METHOD_FLAGS_NONE, - -1, - NULL, - (GAsyncReadyCallback) get_name_owner_cb, - client_ref (client)); + g_dbus_connection_call (client->connection, + "org.freedesktop.DBus", /* bus name */ + "/org/freedesktop/DBus", /* object path */ + "org.freedesktop.DBus", /* interface name */ + "GetNameOwner", /* method name */ + g_variant_new ("(s)", client->name), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + (GAsyncReadyCallback) get_name_owner_cb, + client_ref (client)); } /* ---------------------------------------------------------------------------------------------------- */ @@ -387,9 +387,9 @@ start_service_by_name_cb (GObject *source_object, result = NULL; - result = g_dbus_connection_invoke_method_finish (client->connection, - res, - NULL); + result = g_dbus_connection_call_finish (client->connection, + res, + NULL); if (result != NULL) { guint32 start_service_result; @@ -452,17 +452,17 @@ has_connection (Client *client) if (client->flags & G_BUS_NAME_WATCHER_FLAGS_AUTO_START) { - g_dbus_connection_invoke_method (client->connection, - "org.freedesktop.DBus", /* bus name */ - "/org/freedesktop/DBus", /* object path */ - "org.freedesktop.DBus", /* interface name */ - "StartServiceByName", /* method name */ - g_variant_new ("(su)", client->name, 0), - G_DBUS_INVOKE_METHOD_FLAGS_NONE, - -1, - NULL, - (GAsyncReadyCallback) start_service_by_name_cb, - client_ref (client)); + g_dbus_connection_call (client->connection, + "org.freedesktop.DBus", /* bus name */ + "/org/freedesktop/DBus", /* object path */ + "org.freedesktop.DBus", /* interface name */ + "StartServiceByName", /* method name */ + g_variant_new ("(su)", client->name, 0), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + (GAsyncReadyCallback) start_service_by_name_cb, + client_ref (client)); } else { |