The DBus bus allows calling a method on a given remote object without specifying the destination interface, if the method name is unique. However, if two interfaces on the remote object export the same method name, the result is undefined (one of the two may be called or an error may be returned).

When using DBus in a peer-to-peer context (i.e., not on a bus), the service parameter is optional.

Returns the interface of the method being called (in the case of a method call) or of the signal being received from.

bool QDBusMessage::isDelayedReply() const

Returns the delayed reply flag, as set by setDelayedReply(). By default, this flag is false, which means Qt D-Bus will generate automatic replies when necessary.

bool QDBusMessage::isInteractiveAuthorizationAllowed() const

Returns the interactive authorization allowed flag, as set by setInteractiveAuthorizationAllowed(). By default this flag is false and the other end is expected to make any authorization decisions non-interactively and promptly.

bool QDBusMessage::isReplyRequired() const

Returns the flag that indicates if this message should see a reply or not. This is only meaningful for method call messages: any other kind of message cannot have replies and this function will always return false for them.

void QDBusMessage::setAutoStartService(boolenable)

Sets the auto start flag to enable. This flag only makes sense for method call messages, where it tells the D-Bus server to either auto start the service responsible for the service name, or not to auto start it.

By default this flag is true, i.e. a service is autostarted. This means:

When the service that this method call is sent to is already running, the method call is sent to it. If the service is not running yet, the D-Bus daemon is requested to autostart the service that is assigned to this service name. This is handled by .service files that are placed in a directory known to the D-Bus server. These files then each contain a service name and the path to a program that should be executed when this service name is requested.

void QDBusMessage::setDelayedReply(boolenable) const

Sets whether the message will be replied later (if enable is true) or if an automatic reply should be generated by Qt D-Bus (if enable is false).

In D-Bus, all method calls must generate a reply to the caller, unless the caller explicitly indicates otherwise (see isReplyRequired()). QtDBus automatically generates such replies for any slots being called, but it also allows slots to indicate whether they will take responsibility of sending the reply at a later time, after the function has finished processing.

void QDBusMessage::setInteractiveAuthorizationAllowed(boolenable)

Sets the interactive authorization flag to enable. This flag only makes sense for method call messages, where it tells the D-Bus server that the caller of the method is prepared to wait for interactive authorization to take place (for instance via Polkit) before the actual method is processed.

By default this flag is false and the other end is expected to make any authorization decisions non-interactively and promptly.

The org.freedesktop.DBus.Error.InteractiveAuthorizationRequired error indicates that authorization failed, but could have succeeded if this flag had been set.