gio.dbus_message

Module for [DBusMessage] class

Types 3

A type for representing D-Bus messages that can be sent or received on a gio.dbus_connection.DBusConnection.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
DBusMessage self() nothrowReturns `this`, for use in `with` statements.
DBusMessageGidBuilder builder() static nothrowGet builder for [gio.dbus_message.DBusMessage] Returns: New builder object
bool locked() @property nothrow
gio.dbus_message.DBusMessage newFromBlob(ubyte[] blob, gio.types.DBusCapabilityFlags capabilities) staticCreates a new #GDBusMessage from the data stored at blob. The byte order that the message was in can be retrieved using [gio.dbus_message.DBusMessage.getByteOrder].
gio.dbus_message.DBusMessage newMethodCall(string name, string path, string interface_, string method) static nothrowCreates a new #GDBusMessage for a method call.
gio.dbus_message.DBusMessage newSignal(string path, string interface_, string signal) static nothrowCreates a new #GDBusMessage for a signal emission.
ptrdiff_t bytesNeeded(ubyte[] blob) staticUtility function to calculate how many bytes are needed to completely deserialize the D-Bus message stored at blob.
gio.dbus_message.DBusMessage copy()Copies message. The copy is a deep copy and the returned #GDBusMessage is completely identical except that it is guaranteed to not be locked.
string getArg0() nothrowConvenience to get the first item in the body of message.
string getArg0Path() nothrowConvenience to get the first item in the body of message.
glib.variant.Variant getBody() nothrowGets the body of a message. Returns: A #GVariant or null if the body is empty. Do not free, it is owned by message.
gio.types.DBusMessageByteOrder getByteOrder() nothrowGets the byte order of message. Returns: The byte order.
string getDestination() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Destination] header field. Returns: The value.
string getErrorName() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.ErrorName] header field. Returns: The value.
gio.types.DBusMessageFlags getFlags() nothrowGets the flags for message. Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
glib.variant.Variant getHeader(gio.types.DBusMessageHeaderField headerField) nothrowGets a header field on message.
ubyte[] getHeaderFields() nothrowGets an array of all header fields on message that are set. Returns: An array of header fields terminated by [gio.types.DBusMessageHeaderField.Invalid]. Each element is a #guchar. Free with [glib....
string getInterface() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Interface] header field. Returns: The value.
bool getLocked() nothrowChecks 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. Returns: true if message is lo...
string getMember() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Member] header field. Returns: The value.
gio.types.DBusMessageType getMessageType() nothrowGets the type of message. Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
uint getNumUnixFds() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.NumUnixFds] header field. Returns: The value.
string getPath() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Path] header field. Returns: The value.
uint getReplySerial() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.ReplySerial] header field. Returns: The value.
string getSender() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Sender] header field. Returns: The value.
uint getSerial() nothrowGets the serial for message. Returns: A #guint32.
string getSignature() nothrowConvenience getter for the [gio.types.DBusMessageHeaderField.Signature] header field.
gio.unix_fdlist.UnixFDList getUnixFdList() nothrowGets the UNIX file descriptors associated with message, if any.
void lock() nothrowIf message is locked, does nothing. Otherwise locks the message.
gio.dbus_message.DBusMessage newMethodErrorLiteral(string errorName, string errorMessage) nothrowCreates a new #GDBusMessage that is an error reply to method_call_message.
gio.dbus_message.DBusMessage newMethodReply() nothrowCreates a new #GDBusMessage that is a reply to method_call_message. Returns: #GDBusMessage. Free with [gobject.object.ObjectWrap.unref].
string print(uint indent) nothrowProduces a human-readable multi-line description of message.
void setBody(glib.variant.Variant body_) nothrowSets the body message. As a side-effect the [gio.types.DBusMessageHeaderField.Signature] header field is set to the type string of body (or cleared if body is null).
void setByteOrder(gio.types.DBusMessageByteOrder byteOrder) nothrowSets the byte order of message.
void setDestination(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Destination] header field.
void setErrorName(string value) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.ErrorName] header field.
void setFlags(gio.types.DBusMessageFlags flags) nothrowSets the flags to set on message.
void setHeader(gio.types.DBusMessageHeaderField headerField, glib.variant.Variant value = null) nothrowSets a header field on message.
void setInterface(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Interface] header field.
void setMember(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Member] header field.
void setMessageType(gio.types.DBusMessageType type) nothrowSets message to be of type.
void setNumUnixFds(uint value) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.NumUnixFds] header field.
void setPath(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Path] header field.
void setReplySerial(uint value) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.ReplySerial] header field.
void setSender(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Sender] header field.
void setSerial(uint serial) nothrowSets the serial for message.
void setSignature(string value = null) nothrowConvenience setter for the [gio.types.DBusMessageHeaderField.Signature] header field.
void setUnixFdList(gio.unix_fdlist.UnixFDList fdList = null) nothrowSets the UNIX file descriptors associated with message. As a side-effect the [gio.types.DBusMessageHeaderField.NumUnixFds] header field is set to the number of fds in fd_list (or cleared if fd_list...
ubyte[] toBlob(gio.types.DBusCapabilityFlags capabilities)Serializes message to a blob. The byte order returned by [gio.dbus_message.DBusMessage.getByteOrder] will be used.
bool toGerror()If message is not of type [gio.types.DBusMessageType.Error] does nothing and returns false.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new empty #GDBusMessage. Returns: A #GDBusMessage. Free with [gobject.object.ObjectWrap.unref].

Fluent builder for gio.dbus_message.DBusMessage

Methods
DBusMessage build() nothrowCreate object from builder. Returns: New object