DBusMessage

open class DBusMessage(pointer: <Error class: unknown class><<Error class: unknown class>>)

A type for representing D-Bus messages that can be sent or received on a class@Gio.DBusConnection.

Skipped during bindings generation

  • method get_header_fields: Array parameter of type guint8 is not supported

  • parameter out_size: out_size: Out parameter is not supported

  • parameter blob: Array parameter of type guint8 is not supported

  • parameter blob: Array parameter of type guint8 is not supported

Since

2.26

Constructors

Link copied to clipboard
constructor()

Creates a new empty #GDBusMessage.

constructor(name: String? = null, path: String, interface: String? = null, method: String)

Creates a new #GDBusMessage for a method call.

constructor(path: String, interface: String, signal: String)

Creates a new #GDBusMessage for a signal emission.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gioDBusMessagePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val locked: Boolean

Functions

Link copied to clipboard
open fun copy(): <Error class: unknown class><DBusMessage>

Copies @message. The copy is a deep copy and the returned #GDBusMessage is completely identical except that it is guaranteed to not be locked.

Link copied to clipboard
open fun getArg0(): String?

Convenience to get the first item in the body of @message.

Link copied to clipboard
open fun getArg0Path(): String?

Convenience to get the first item in the body of @message.

Link copied to clipboard
open fun getBody(): <Error class: unknown class>?

Gets the body of a message.

Link copied to clipboard

Gets the byte order of @message.

Link copied to clipboard
open fun getDestination(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.

Link copied to clipboard
open fun getErrorName(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.

Link copied to clipboard

Gets the flags for @message.

Link copied to clipboard
open fun getHeader(headerField: DBusMessageHeaderField): <Error class: unknown class>?

Gets a header field on @message.

Link copied to clipboard
open fun getInterface(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.

Link copied to clipboard
open fun getLocked(): Boolean

Checks whether @message is locked. To monitor changes to this value, conncet to the #GObject::notify signal to listen for changes on the #GDBusMessage:locked property.

Link copied to clipboard
open fun getMember(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.

Link copied to clipboard

Gets the type of @message.

Link copied to clipboard
open fun getNumUnixFds(): <Error class: unknown class>

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.

Link copied to clipboard
open fun getPath(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.

Link copied to clipboard
open fun getReplySerial(): <Error class: unknown class>

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.

Link copied to clipboard
open fun getSender(): String?

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.

Link copied to clipboard
open fun getSerial(): <Error class: unknown class>

Gets the serial for @message.

Link copied to clipboard
open fun getSignature(): String

Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.

Link copied to clipboard

Gets the UNIX file descriptors associated with @message, if any.

Link copied to clipboard
open fun lock()

If @message is locked, does nothing. Otherwise locks the message.

Link copied to clipboard
open fun newMethodErrorLiteral(errorName: String, errorMessage: String): DBusMessage

Creates a new #GDBusMessage that is an error reply to @method_call_message.

Link copied to clipboard

Creates a new #GDBusMessage that is a reply to @method_call_message.

Link copied to clipboard
open fun print(indent: <Error class: unknown class>): String

Produces a human-readable multi-line description of @message.

Link copied to clipboard
open fun setBody(body: <Error class: unknown class>)

Sets the body @message. As a side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the type string of @body (or cleared if @body is null).

Link copied to clipboard
open fun setByteOrder(byteOrder: DBusMessageByteOrder)

Sets the byte order of @message.

Link copied to clipboard
open fun setDestination(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.

Link copied to clipboard
open fun setErrorName(value: String)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.

Link copied to clipboard
open fun setFlags(flags: DBusMessageFlags)

Sets the flags to set on @message.

Link copied to clipboard
open fun setHeader(headerField: DBusMessageHeaderField, value: <Error class: unknown class>? = null)

Sets a header field on @message.

Link copied to clipboard
open fun setInterface(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.

Link copied to clipboard
open fun setMember(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.

Link copied to clipboard

Sets @message to be of @type.

Link copied to clipboard
open fun setNumUnixFds(value: <Error class: unknown class>)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.

Link copied to clipboard
open fun setPath(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.

Link copied to clipboard
open fun setReplySerial(value: <Error class: unknown class>)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.

Link copied to clipboard
open fun setSender(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.

Link copied to clipboard
open fun setSerial(serial: <Error class: unknown class>)

Sets the serial for @message.

Link copied to clipboard
open fun setSignature(value: String? = null)

Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.

Link copied to clipboard
open fun setUnixFdList(fdList: UnixFDList? = null)

Sets the UNIX file descriptors associated with @message. As a side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field is set to the number of fds in @fd_list (or cleared if

Link copied to clipboard
open fun toGerror(): <Error class: unknown class><Boolean>

If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does nothing and returns false.