gio.dbus_method_invocation

Module for [DBusMethodInvocation] class

Types 3

Instances of the [gio.dbus_method_invocation.DBusMethodInvocation] class are used when handling D-Bus method calls. It provides a way to asynchronously return results and errors.

The normal way to obtain a [gio.dbus_method_invocation.DBusMethodInvocation] object is to receive it as an argument to the handle_method_call() function in a [gio.types.DBusInterfaceVTable] that was passed to [gio.dbus_connection.DBusConnection.registerObject].

Methods
GType _gType() @property
DBusMethodInvocation self()Returns `this`, for use in `with` statements.
DBusMethodInvocationGidBuilder builder()Get builder for [gio.dbusmethodinvocation.DBusMethodInvocation] Returns: New builder object
gio.dbus_connection.DBusConnection getConnection()Gets the #GDBusConnection the method was invoked on. Returns: A #GDBusConnection. Do not free, it is owned by invocation.
string getInterfaceName()Gets the name of the D-Bus interface the method was invoked on.
gio.dbus_message.DBusMessage getMessage()Gets the #GDBusMessage for the method invocation. This is useful if you need to use low-level protocol features, such as UNIX file descriptor passing, that cannot be properly expressed in the #GVar...
gio.dbus_method_info.DBusMethodInfo getMethodInfo()Gets information about the method call, if any.
string getMethodName()Gets the name of the method that was invoked. Returns: A string. Do not free, it is owned by invocation.
string getObjectPath()Gets the object path the method was invoked on. Returns: A string. Do not free, it is owned by invocation.
glib.variant.Variant getParameters()Gets the parameters of the method invocation. If there are no input parameters then this will return a GVariant with 0 children rather than NULL. Returns: A #GVariant tuple. Do not unref this becau...
gio.dbus_property_info.DBusPropertyInfo getPropertyInfo()Gets information about the property that this method call is for, if any.
string getSender()Gets the bus name that invoked the method. Returns: A string. Do not free, it is owned by invocation.
void returnDbusError(string errorName, string errorMessage)Finishes handling a D-Bus method call by returning an error.
void returnErrorLiteral(glib.types.Quark domain, int code, string message)Like [gio.dbusmethodinvocation.DBusMethodInvocation.returnError] but without printf()-style formatting.
void returnGerror(glib.error.ErrorWrap error)Like [gio.dbusmethodinvocation.DBusMethodInvocation.returnError] but takes a #GError instead of the error domain, error code and message.
void returnValue(glib.variant.Variant parameters = null)Finishes handling a D-Bus method call by returning parameters. If the parameters GVariant is floating, it is consumed.
void returnValueWithUnixFdList(glib.variant.Variant parameters = null, gio.unix_fdlist.UnixFDList fdList = null)Like [gio.dbusmethodinvocation.DBusMethodInvocation.returnValue] but also takes a #GUnixFDList.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder for [gio.dbus_method_invocation.DBusMethodInvocation]