public async Variant call (string method_name, Variant? parameters, DBusCallFlags flags, int timeout_msec, Cancellable? cancellable = null) throws Error

Asynchronously invokes the method_name method on this.

If method_name contains any dots, then name is split into interface and method name parts. This allows using this for invoking methods on other interfaces.

If the DBusConnection associated with this is closed then the operation will fail with g_io_error_closed. If cancellable is canceled, the operation will fail with g_io_error_cancelled. If parameters contains a value not compatible with the D-Bus protocol, the operation fails with g_io_error_invalid_argument.

If the parameters Variant is floating, it is consumed. This allows convenient 'inline' use of Variant, e.g.:

 g_dbus_proxy_call (proxy,
g_variant_new ("(ss)",
"Thing One",
"Thing Two"),
(GAsyncReadyCallback) two_strings_done,

If this has an expected interface (see g_interface_info) and method_name is referenced by it, then the return value is checked against the return type.

This is an asynchronous method. When the operation is finished, callback will be invoked in the thread-default main context of the thread you are calling this method from. You can then call call.end to get the result of the operation. See call_sync for the synchronous version of this method.

If callback is null then the D-Bus method call message will be sent with the g_dbus_message_flags_no_reply_expected flag set.



A DBusProxy.


Name of method to invoke.


A Variant tuple with parameters for the signal or null if not passing parameters.


Flags from the DBusCallFlags enumeration.


The timeout in milliseconds (with g_maxint meaning "infinite") or -1 to use the proxy default timeout.


A Cancellable or null.


A TaskReadyCallback to call when the request is satisfied or null if you don't care about the result of the method invocation.


The data to pass to callback.