diff options
author | David Zeuthen <davidz@redhat.com> | 2010-04-26 20:34:10 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-04-26 20:34:10 -0400 |
commit | ea25fb53d2f3da90b5b01086e8edcc380fe31d4e (patch) | |
tree | 78731ea61ee10202d7d1fa4a6b691f59de84a429 /gdbus | |
parent | d7c2b7391a5bbcb1fee2972be23c5a920e00031a (diff) |
Make all invoke_method() functions take a GDBusInvokeMethodFlags
Right now the only known flag is G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START
but this might change in the future.
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/gdbus.c | 20 | ||||
-rw-r--r-- | gdbus/gdbusconnection.c | 55 | ||||
-rw-r--r-- | gdbus/gdbusconnection.h | 2 | ||||
-rw-r--r-- | gdbus/gdbusenums.h | 14 | ||||
-rw-r--r-- | gdbus/gdbusmessage.c | 1 | ||||
-rw-r--r-- | gdbus/gdbusnameowning.c | 2 | ||||
-rw-r--r-- | gdbus/gdbusnamewatching.c | 1 | ||||
-rw-r--r-- | gdbus/gdbusproxy.c | 8 | ||||
-rw-r--r-- | gdbus/gdbusproxy.h | 2 | ||||
-rw-r--r-- | gdbus/tests/connection.c | 6 | ||||
-rw-r--r-- | gdbus/tests/export.c | 15 | ||||
-rw-r--r-- | gdbus/tests/introspection.c | 1 | ||||
-rw-r--r-- | gdbus/tests/names.c | 2 | ||||
-rw-r--r-- | gdbus/tests/peer.c | 3 | ||||
-rw-r--r-- | gdbus/tests/proxy.c | 9 | ||||
-rw-r--r-- | gdbus/tests/threading.c | 5 |
16 files changed, 120 insertions, 26 deletions
diff --git a/gdbus/gdbus.c b/gdbus/gdbus.c index a20f1ad..7e66d73 100644 --- a/gdbus/gdbus.c +++ b/gdbus/gdbus.c @@ -148,7 +148,8 @@ print_methods (GDBusConnection *c, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 secs */ NULL, &error); if (result == NULL) @@ -209,7 +210,8 @@ print_paths (GDBusConnection *c, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 secs */ NULL, &error); if (result == NULL) @@ -286,7 +288,8 @@ print_names (GDBusConnection *c, "org.freedesktop.DBus", "ListNames", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 secs */ NULL, &error); if (result == NULL) @@ -314,7 +317,8 @@ print_names (GDBusConnection *c, "org.freedesktop.DBus", "ListActivatableNames", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 secs */ NULL, &error); if (result == NULL) @@ -455,7 +459,8 @@ call_helper_get_method_in_signature (GDBusConnection *c, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 secs */ NULL, error); if (result == NULL) @@ -821,6 +826,7 @@ handle_call (gint *argc, interface_name, method_name, parameters, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -989,6 +995,7 @@ dump_interface (GDBusConnection *c, "org.freedesktop.DBus.Properties", "GetAll", g_variant_new ("(s)", o->name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, 3000, NULL, NULL); @@ -1232,7 +1239,8 @@ handle_introspect (gint *argc, "org.freedesktop.DBus.Introspectable", "Introspect", NULL, - 3000, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, + 3000, /* 3 sec */ NULL, &error); if (result == NULL) diff --git a/gdbus/gdbusconnection.c b/gdbus/gdbusconnection.c index a2dd318..716b370 100644 --- a/gdbus/gdbusconnection.c +++ b/gdbus/gdbusconnection.c @@ -1652,6 +1652,7 @@ initable_init (GInitable *initable, "org.freedesktop.DBus", /* interface */ "Hello", NULL, /* parameters */ + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, /* TODO: cancellable */ &connection->priv->initialization_error); @@ -3809,6 +3810,14 @@ g_dbus_connection_emit_signal (GDBusConnection *connection, return ret; } +static void +add_invoke_method_flags (GDBusMessage *message, + GDBusInvokeMethodFlags flags) +{ + if (flags & G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START) + g_dbus_message_set_flags (message, G_DBUS_MESSAGE_FLAGS_NO_AUTO_START); +} + /** * g_dbus_connection_invoke_method: * @connection: A #GDBusConnection. @@ -3817,6 +3826,7 @@ g_dbus_connection_emit_signal (GDBusConnection *connection, * @interface_name: D-Bus interface to invoke method on. * @method_name: The name of the method to invoke. * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters. + * @flags: Flags from the #GDBusInvokeMethodFlags enumeration. * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. * @cancellable: A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't @@ -3841,16 +3851,17 @@ g_dbus_connection_emit_signal (GDBusConnection *connection, * function. */ void -g_dbus_connection_invoke_method (GDBusConnection *connection, - const gchar *bus_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - gint timeout_msec, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +g_dbus_connection_invoke_method (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusInvokeMethodFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { GDBusMessage *message; @@ -3864,6 +3875,7 @@ g_dbus_connection_invoke_method (GDBusConnection *connection, object_path, interface_name, method_name); + add_invoke_method_flags (message, flags); if (parameters != NULL) g_dbus_message_set_body (message, parameters); @@ -3954,6 +3966,7 @@ g_dbus_connection_invoke_method_finish (GDBusConnection *connection, * @interface_name: D-Bus interface to invoke method on. * @method_name: The name of the method to invoke. * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters. + * @flags: Flags from the #GDBusInvokeMethodFlags enumeration. * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. * @cancellable: A #GCancellable or %NULL. * @error: Return location for error or %NULL. @@ -3976,15 +3989,16 @@ g_dbus_connection_invoke_method_finish (GDBusConnection *connection, * return values. Free with g_variant_unref(). */ GVariant * -g_dbus_connection_invoke_method_sync (GDBusConnection *connection, - const gchar *bus_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - gint timeout_msec, - GCancellable *cancellable, - GError **error) +g_dbus_connection_invoke_method_sync (GDBusConnection *connection, + const gchar *bus_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusInvokeMethodFlags flags, + gint timeout_msec, + GCancellable *cancellable, + GError **error) { GDBusMessage *message; GDBusMessage *reply; @@ -4001,9 +4015,10 @@ g_dbus_connection_invoke_method_sync (GDBusConnection *connection, g_return_val_if_fail ((parameters == NULL) || g_variant_is_of_type (parameters, G_VARIANT_TYPE_TUPLE), NULL); message = g_dbus_message_new_method_call (bus_name, - object_path, + object_path, interface_name, method_name); + add_invoke_method_flags (message, flags); if (parameters != NULL) g_dbus_message_set_body (message, parameters); diff --git a/gdbus/gdbusconnection.h b/gdbus/gdbusconnection.h index aa868b4..49de717 100644 --- a/gdbus/gdbusconnection.h +++ b/gdbus/gdbusconnection.h @@ -175,6 +175,7 @@ void g_dbus_connection_invoke_method (GDBusConnection const gchar *interface_name, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -188,6 +189,7 @@ GVariant *g_dbus_connection_invoke_method_sync (GDBusConnection const gchar *interface_name, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GError **error); diff --git a/gdbus/gdbusenums.h b/gdbus/gdbusenums.h index ea85995..64a080e 100644 --- a/gdbus/gdbusenums.h +++ b/gdbus/gdbusenums.h @@ -269,6 +269,20 @@ typedef enum { } GDBusConnectionCapabilityFlags; /** + * GDBusInvokeMethodFlags: + * @G_DBUS_INVOKE_METHOD_FLAGS_NONE: No flags set. + * @G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START: The bus must not launch + * an owner for the destination name in response to this method + * invocation. + * + * Flags used in g_dbus_connection_invoke_method() and similar APIs. + */ +typedef enum { + G_DBUS_INVOKE_METHOD_FLAGS_NONE = 0, + G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START = (1<<0), +} GDBusInvokeMethodFlags; + +/** * GDBusMessageType: * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type. * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call. diff --git a/gdbus/gdbusmessage.c b/gdbus/gdbusmessage.c index d01c801..378419f 100644 --- a/gdbus/gdbusmessage.c +++ b/gdbus/gdbusmessage.c @@ -140,6 +140,7 @@ g_dbus_message_new_signal (const gchar *path, message = g_dbus_message_new (); message->priv->type = G_DBUS_MESSAGE_TYPE_SIGNAL; + message->priv->flags = G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED; g_dbus_message_set_path (message, path); g_dbus_message_set_member (message, signal); diff --git a/gdbus/gdbusnameowning.c b/gdbus/gdbusnameowning.c index b174c26..e90037b 100644 --- a/gdbus/gdbusnameowning.c +++ b/gdbus/gdbusnameowning.c @@ -401,6 +401,7 @@ has_connection (Client *client) g_variant_new ("(su)", client->name, client->flags), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) request_name_cb, @@ -675,6 +676,7 @@ g_bus_unown_name (guint owner_id) "org.freedesktop.DBus", /* interface name */ "ReleaseName", /* method name */ g_variant_new ("(s)", client->name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/gdbusnamewatching.c b/gdbus/gdbusnamewatching.c index cc8a8eb..ef030f2 100644 --- a/gdbus/gdbusnamewatching.c +++ b/gdbus/gdbusnamewatching.c @@ -382,6 +382,7 @@ has_connection (Client *client) "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, diff --git a/gdbus/gdbusproxy.c b/gdbus/gdbusproxy.c index b68fc3a..cbdd5e4 100644 --- a/gdbus/gdbusproxy.c +++ b/gdbus/gdbusproxy.c @@ -732,6 +732,7 @@ initable_init (GInitable *initable, "org.freedesktop.DBus.Properties", "GetAll", g_variant_new ("(s)", proxy->priv->interface_name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, /* timeout */ cancellable, error); @@ -811,6 +812,7 @@ async_initable_init_async (GAsyncInitable *initable, "org.freedesktop.DBus.Properties", "GetAll", g_variant_new ("(s)", proxy->priv->interface_name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, /* timeout */ cancellable, (GAsyncReadyCallback) get_all_cb, @@ -1296,6 +1298,7 @@ validate_method_return (const char *method_name, * @proxy: A #GDBusProxy. * @method_name: Name of method to invoke. * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. + * @flags: Flags from the #GDBusInvokeMethodFlags enumeration. * @timeout_msec: The timeout in milliseconds or -1 to use the proxy default timeout. * @cancellable: A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't @@ -1326,6 +1329,7 @@ void g_dbus_proxy_invoke_method (GDBusProxy *proxy, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -1362,6 +1366,7 @@ g_dbus_proxy_invoke_method (GDBusProxy *proxy, target_interface_name, target_method_name, parameters, + flags, timeout_msec == -1 ? proxy->priv->timeout_msec : timeout_msec, cancellable, (GAsyncReadyCallback) reply_cb, @@ -1424,6 +1429,7 @@ g_dbus_proxy_invoke_method_finish (GDBusProxy *proxy, * @proxy: A #GDBusProxy. * @method_name: Name of method to invoke. * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. + * @flags: Flags from the #GDBusInvokeMethodFlags enumeration. * @timeout_msec: The timeout in milliseconds or -1 to use the proxy default timeout. * @cancellable: A #GCancellable or %NULL. * @error: Return location for error or %NULL. @@ -1452,6 +1458,7 @@ GVariant * g_dbus_proxy_invoke_method_sync (GDBusProxy *proxy, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GError **error) @@ -1489,6 +1496,7 @@ g_dbus_proxy_invoke_method_sync (GDBusProxy *proxy, target_interface_name, target_method_name, parameters, + flags, timeout_msec == -1 ? proxy->priv->timeout_msec : timeout_msec, cancellable, error); diff --git a/gdbus/gdbusproxy.h b/gdbus/gdbusproxy.h index cbd94cd..456559b 100644 --- a/gdbus/gdbusproxy.h +++ b/gdbus/gdbusproxy.h @@ -128,6 +128,7 @@ gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *pr void g_dbus_proxy_invoke_method (GDBusProxy *proxy, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -138,6 +139,7 @@ GVariant *g_dbus_proxy_invoke_method_finish (GDBusProxy *pr GVariant *g_dbus_proxy_invoke_method_sync (GDBusProxy *proxy, const gchar *method_name, GVariant *parameters, + GDBusInvokeMethodFlags flags, gint timeout_msec, GCancellable *cancellable, GError **error); diff --git a/gdbus/tests/connection.c b/gdbus/tests/connection.c index 0297034..f0181d7 100644 --- a/gdbus/tests/connection.c +++ b/gdbus/tests/connection.c @@ -233,6 +233,7 @@ test_connection_send (void) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, ca, (GAsyncReadyCallback) msg_cb_expect_error_cancelled, @@ -249,6 +250,7 @@ test_connection_send (void) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) msg_cb_expect_success, @@ -264,6 +266,7 @@ test_connection_send (void) "org.freedesktop.DBus", /* interface name */ "NonExistantMethod", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) msg_cb_expect_error_unknown_method, @@ -280,6 +283,7 @@ test_connection_send (void) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, ca, (GAsyncReadyCallback) msg_cb_expect_error_cancelled_2, @@ -302,6 +306,7 @@ test_connection_send (void) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) msg_cb_expect_error_disconnected, @@ -454,6 +459,7 @@ test_connection_signals (void) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, /* parameters */ + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/tests/export.c b/gdbus/tests/export.c index a6a0a7f..e93a610 100644 --- a/gdbus/tests/export.c +++ b/gdbus/tests/export.c @@ -347,6 +347,7 @@ get_nodes_at (GDBusConnection *c, g_dbus_proxy_invoke_method (proxy, "Introspect", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) introspect_callback, @@ -403,6 +404,7 @@ has_interface (GDBusConnection *c, g_dbus_proxy_invoke_method (proxy, "Introspect", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) introspect_callback, @@ -452,6 +454,7 @@ count_interfaces (GDBusConnection *c, g_dbus_proxy_invoke_method (proxy, "Introspect", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) introspect_callback, @@ -520,6 +523,7 @@ dyna_create (GDBusConnection *c, g_dbus_proxy_invoke_method (proxy, "DynaCyber", g_variant_new ("()"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) dyna_create_callback, @@ -742,6 +746,7 @@ test_dispatch_thread_func (gpointer user_data) value = g_dbus_proxy_invoke_method_sync (foo_proxy, "org.freedesktop.DBus.Peer.Ping", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -754,6 +759,7 @@ test_dispatch_thread_func (gpointer user_data) value = g_dbus_proxy_invoke_method_sync (foo_proxy, "Method1", g_variant_new ("(s)", "winwinwin"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -768,6 +774,7 @@ test_dispatch_thread_func (gpointer user_data) value = g_dbus_proxy_invoke_method_sync (foo_proxy, "Method2", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -780,6 +787,7 @@ test_dispatch_thread_func (gpointer user_data) value = g_dbus_proxy_invoke_method_sync (foo_proxy, "Method2", g_variant_new ("(s)", "failfailfail"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -792,6 +800,7 @@ test_dispatch_thread_func (gpointer user_data) value = g_dbus_proxy_invoke_method_sync (foo_proxy, "NonExistantMethod", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -807,6 +816,7 @@ test_dispatch_thread_func (gpointer user_data) g_variant_new ("(ss)", "org.example.Foo", "PropertyUno"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -824,6 +834,7 @@ test_dispatch_thread_func (gpointer user_data) g_variant_new ("(ss)", "org.example.Foo", "ThisDoesntExist"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -838,6 +849,7 @@ test_dispatch_thread_func (gpointer user_data) g_variant_new ("(ss)", "org.example.Foo", "NotReadable"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -853,6 +865,7 @@ test_dispatch_thread_func (gpointer user_data) "org.example.Foo", "NotReadable", g_variant_new_string ("But Writable you are!")), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -868,6 +881,7 @@ test_dispatch_thread_func (gpointer user_data) "org.example.Foo", "NotWritable", g_variant_new_uint32 (42)), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -881,6 +895,7 @@ test_dispatch_thread_func (gpointer user_data) "org.freedesktop.DBus.Properties.GetAll", g_variant_new ("(s)", "org.example.Foo"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/tests/introspection.c b/gdbus/tests/introspection.c index 6eae26f..cde1eab 100644 --- a/gdbus/tests/introspection.c +++ b/gdbus/tests/introspection.c @@ -56,6 +56,7 @@ introspection_on_proxy_appeared (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "org.freedesktop.DBus.Introspectable.Introspect", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/tests/names.c b/gdbus/tests/names.c index f779264..b66200f 100644 --- a/gdbus/tests/names.c +++ b/gdbus/tests/names.c @@ -176,6 +176,7 @@ test_bus_own_name (void) "org.freedesktop.DBus", /* interface name */ "NameHasOwner", /* method name */ g_variant_new ("(s)", name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -200,6 +201,7 @@ test_bus_own_name (void) "org.freedesktop.DBus", /* interface name */ "NameHasOwner", /* method name */ g_variant_new ("(s)", name), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/tests/peer.c b/gdbus/tests/peer.c index 610bb31..84c7f80 100644 --- a/gdbus/tests/peer.c +++ b/gdbus/tests/peer.c @@ -485,6 +485,7 @@ test_peer (void) result = g_dbus_proxy_invoke_method_sync (proxy, "HelloPeer", g_variant_new ("(s)", "Hey Peer!"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, /* GCancellable */ &error); @@ -503,6 +504,7 @@ test_peer (void) g_dbus_proxy_invoke_method (proxy, "EmitSignal", NULL, /* no arguments */ + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, /* GCancellable */ NULL, /* GAsyncReadyCallback - we don't care about the result */ @@ -622,6 +624,7 @@ test_peer (void) result = g_dbus_proxy_invoke_method_sync (proxy, "HelloPeer", g_variant_new ("(s)", "Hey Again Peer!"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, /* GCancellable */ &error); diff --git a/gdbus/tests/proxy.c b/gdbus/tests/proxy.c index 4042c4b..13647d0 100644 --- a/gdbus/tests/proxy.c +++ b/gdbus/tests/proxy.c @@ -49,6 +49,7 @@ test_methods (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "HelloWorld", g_variant_new ("(s)", "Hey"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -63,6 +64,7 @@ test_methods (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "HelloWorld", g_variant_new ("(s)", "Yo"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -82,6 +84,7 @@ test_methods (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "Sleep", g_variant_new ("(i)", 500 /* msec */), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, 100 /* msec */, NULL, &error); @@ -97,6 +100,7 @@ test_methods (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "Sleep", g_variant_new ("(i)", 500 /* msec */), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, /* use proxy default (e.g. -1 -> e.g. 25000 msec) */ NULL, &error); @@ -111,6 +115,7 @@ test_methods (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "Sleep", g_variant_new ("(i)", 500 /* msec */), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, /* use proxy default (e.g. 250 msec) */ NULL, &error); @@ -166,6 +171,7 @@ test_properties (GDBusConnection *connection, g_variant_new ("(sv)", "y", variant2), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -262,6 +268,7 @@ test_signals (GDBusConnection *connection, g_variant_new ("(so)", "Accept the next proposition you hear", "/some/path"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); @@ -294,6 +301,7 @@ test_signals (GDBusConnection *connection, g_variant_new ("(so)", "You will make a great programmer", "/some/other/path"), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) test_proxy_signals_on_emit_signal_cb, @@ -319,6 +327,7 @@ test_bogus_method_return (GDBusConnection *connection, result = g_dbus_proxy_invoke_method_sync (proxy, "PairReturn", NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); diff --git a/gdbus/tests/threading.c b/gdbus/tests/threading.c index 12513ad..00e7ca7 100644 --- a/gdbus/tests/threading.c +++ b/gdbus/tests/threading.c @@ -137,6 +137,7 @@ test_delivery_in_thread_func (gpointer _data) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) msg_cb_expect_success, @@ -156,6 +157,7 @@ test_delivery_in_thread_func (gpointer _data) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, ca, (GAsyncReadyCallback) msg_cb_expect_error_cancelled, @@ -173,6 +175,7 @@ test_delivery_in_thread_func (gpointer _data) "org.freedesktop.DBus", /* interface name */ "GetId", /* method name */ NULL, + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, ca, (GAsyncReadyCallback) msg_cb_expect_error_cancelled, @@ -302,6 +305,7 @@ test_sleep_in_thread_func (gpointer _data) g_dbus_proxy_invoke_method (data->proxy, "Sleep", g_variant_new ("(i)", data->msec), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) sleep_cb, @@ -320,6 +324,7 @@ test_sleep_in_thread_func (gpointer _data) result = g_dbus_proxy_invoke_method_sync (data->proxy, "Sleep", g_variant_new ("(i)", data->msec), + G_DBUS_INVOKE_METHOD_FLAGS_NONE, -1, NULL, &error); |