DBusConnection.call

Asynchronously invokes the method_name method on the interface_name D-Bus interface on the remote object at object_path owned by bus_name. If connection 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 reply_type is non-NULL then the reply will be checked for having this type and an error will be raised if it does not match. Said another way, if you give a reply_type then any non-NULL return value will be of this type. If the parameters GVariant is floating, it is consumed. This allows Since 2.26

Parameters

busName string

A unique or well-known bus name or NULL if connection is not a message bus connection. [allow-none]

objectPath string

Path of remote object.

interfaceName string

D-Bus interface to invoke method on.

methodName string

The name of the method to invoke.

parameters Variant

A GVariant tuple with parameters for the method or NULL if not passing parameters. [allow-none]

replyType VariantType

The expected type of the reply, or NULL. [allow-none]

flags GDBusCallFlags

Flags from the GDBusCallFlags enumeration.

timeoutMsec int

The timeout in milliseconds, -1 to use the default timeout or G_MAXINT for no timeout.

cancellable Cancellable

A GCancellable or NULL. [allow-none]

callback GAsyncReadyCallback

A GAsyncReadyCallback to call when the request is satisfied or NULL if you don't care about the result of the method invocation. [allow-none]

userData void*

The data to pass to callback.

Meta