It derives from <GObject>.
A type for representing D-Bus messages that can be sent or received on a
<GDBusConnection>.
Its value is a boolean.
It is read only.
Utility function to calculate how many bytes are needed to completely deserialize the D-Bus message stored at blob.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
A blob representing a binary D-Bus message.
Returned: a 64-bit integer.
Number of bytes needed or -1 if error is set (e.g. if blob contains invalid data or not enough data is available to determine the size).
Not passed: guile-gi gives the length of blob.
The length of blob (must be at least 16).
Copies self. The copy is a deep copy and the returned
<GDBusMessage> is completely identical except
that it is guaranteed to not be locked.
This operation can fail if e.g. self contains file descriptors and the per-process or system-wide open files limit is reached.
Passed: a <GDBusMessage>.
Returned: a <GDBusMessage>.
A new <GDBusMessage> or #f if
error is set. Free with object:unref.
Convenience to get the first item in the body of self.
See dbus-message:get-arg0-path
for returning object-path-typed arg0 values.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The string item or #f if the first item in the body of self
is not a string.
Convenience to get the first item in the body of self.
See dbus-message:get-arg0 for
returning string-typed arg0 values.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The object path item or NULL if the first item in the body of
self is not an object path.
Gets the body of a message.
Passed: a <GDBusMessage>.
Returned: a <GVariant>, or #f.
A <GVariant> or #f if the body is
empty. Do not free, it is owned by self.
Gets the byte order of self.
Passed: a <GDBusMessage>.
Returned: a <GDBusMessageByteOrder>.
The byte order.
Convenience getter for the
destination header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Convenience getter for the
error-name header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Gets the flags for self.
Passed: a <GDBusMessage>.
Returned: a <GDBusMessageFlags>.
Flags that are set (typically values from the
<GDBusMessageFlags> enumeration bitwise
ORed together).
Gets a header field on self.
The caller is responsible for checking the type of the returned
<GVariant> matches what is expected.
Passed: a <GDBusMessage>.
Passed: a
<GDBusMessageHeaderField>, or one
of its symbols.
A 8-bit unsigned integer (typically a value from the
<GDBusMessageHeaderField>
enumeration)
Returned: a <GVariant>, or #f.
A <GVariant> with the value if the header was
found, #f otherwise. Do not free, it is owned by self.
Gets an array of all header fields on self that are set.
Passed: a <GDBusMessage>.
Returned: a bytevector.
An array of header fields terminated by
invalid. Each element is a
guchar. Free with byte-array:free.
Convenience getter for the
interface header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Checks whether self is locked. To monitor changes to this value,
connect to the object:notify
signal to listen for changes on the dbus-message:locked property.
Passed: a <GDBusMessage>.
Returned: a boolean.
#t if self is locked, #f otherwise.
Convenience getter for the member
header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Gets the type of self.
Passed: a <GDBusMessage>.
Returned: a <GDBusMessageType>.
A 8-bit unsigned integer (typically a value from the
<GDBusMessageType> enumeration).
Convenience getter for the
num-unix-fds header field.
Passed: a <GDBusMessage>.
Returned: an unsigned 32-bit integer.
The value.
Convenience getter for the path
header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Convenience getter for the
reply-serial header field.
Passed: a <GDBusMessage>.
Returned: an unsigned 32-bit integer.
The value.
Convenience getter for the sender
header field.
Passed: a <GDBusMessage>.
Returned: a string, or #f.
The value.
Gets the serial for self.
Passed: a <GDBusMessage>.
Returned: an unsigned 32-bit integer.
A guint32.
Convenience getter for the
signature header field.
This will always be non-#f, but may be an empty string.
Passed: a <GDBusMessage>.
Returned: a string.
The value.
Gets the UNIX file descriptors associated with self, if any.
This method is only available on UNIX.
The file descriptors normally correspond to G_VARIANT_TYPE_HANDLE
values in the body of the message. For example, if variant:get-handle returns 5, that is intended to be
a reference to the file descriptor that can be accessed by
g_unix_fd_list_get (list, 5, ...).
Passed: a <GDBusMessage>.
Returned: a <GUnixFDList>, or #f.
A <GUnixFDList> or #f if no file
descriptors are associated. Do not free, this object is owned by
self.
If self is locked, does nothing. Otherwise locks the message.
Passed: a <GDBusMessage>.
Creates a new empty <GDBusMessage>.
Returned: a <GDBusMessage>.
A <GDBusMessage>. Free with object:unref.
Creates a new <GDBusMessage> from the data
stored at blob. The byte order that the message was in can be
retrieved using dbus-message:get-byte-order.
If the blob cannot be parsed, contains invalid fields, or contains
invalid headers, invalid-argument will be
returned.
Passed: a bytevector, or a list or vector, each an unsigned 8-bit integer.
A blob representing a binary D-Bus message.
Passed: a <GDBusCapabilityFlags>, or a
list of its symbols, or one of them.
A <GDBusCapabilityFlags> describing
what protocol features are supported.
Returned: a <GDBusMessage>.
A new <GDBusMessage> or #f if
error is set. Free with object:unref.
Not passed: guile-gi gives the length of blob.
The length of blob.
Creates a new <GDBusMessage> for a method
call.
Passed: a string, or #f.
A valid D-Bus name or #f.
Passed: a string.
A valid object path.
Passed: a string, or #f.
A valid D-Bus interface name or #f.
Passed: a string.
A valid method name.
Returned: a <GDBusMessage>.
A <GDBusMessage>. Free with object:unref.
Creates a new <GDBusMessage> that is an error
reply to self.
Passed: a <GDBusMessage>.
A message of type method-call to create a
reply message to.
Passed: a string.
A valid D-Bus error name.
Passed: a string.
The D-Bus error message.
Returned: a <GDBusMessage>.
A <GDBusMessage>. Free with object:unref.
Creates a new <GDBusMessage> that is a reply
to self.
Passed: a <GDBusMessage>.
A message of type method-call to create a
reply message to.
Returned: a <GDBusMessage>.
<GDBusMessage>. Free with object:unref.
Creates a new <GDBusMessage> for a signal
emission.
Passed: a string.
A valid object path.
Passed: a string.
A valid D-Bus interface name.
Passed: a string.
A valid signal name.
Returned: a <GDBusMessage>.
A <GDBusMessage>. Free with object:unref.
Produces a human-readable multi-line description of self.
The contents of the description has no ABI guarantees, the contents and formatting is subject to change at any time. Typical output looks something like this:
Flags: none Version: 0 Serial: 4 Headers: path -> objectpath '/org/gtk/GDBus/TestObject' interface -> 'org.gtk.GDBus.TestInterface' member -> 'GimmeStdout' destination -> ':1.146' Body: () UNIX File Descriptors: (none)
or
Flags: no-reply-expected Version: 0 Serial: 477 Headers: reply-serial -> uint32 4 destination -> ':1.159' sender -> ':1.146' num-unix-fds -> uint32 1 Body: () UNIX File Descriptors: fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
Passed: a <GDBusMessage>.
Passed: an unsigned 32-bit integer.
Indentation level.
Returned: a string.
A string that should be freed with
byte-array:free.
Sets the body self. As a side-effect the
signature header field is set to
the type string of body (or cleared if body is #f).
If body is floating, self assumes ownership of body.
Passed: a <GDBusMessage>.
Passed: a <GVariant>.
Either #f or a <GVariant> that is a
tuple.
Sets the byte order of self.
Passed: a <GDBusMessage>.
Passed: a <GDBusMessageByteOrder>, or
one of its symbols.
The byte order.
Convenience setter for the
destination header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Convenience setter for the
error-name header field.
Passed: a <GDBusMessage>.
Passed: a string.
The value to set.
Sets the flags to set on self.
Passed: a <GDBusMessage>.
Passed: a <GDBusMessageFlags>, or a list
of its symbols, or one of them.
Flags for self that are set (typically values from the
<GDBusMessageFlags> enumeration bitwise
ORed together).
Sets a header field on self.
If value is floating, self assumes ownership of value.
Passed: a <GDBusMessage>.
Passed: a
<GDBusMessageHeaderField>, or one
of its symbols.
A 8-bit unsigned integer (typically a value from the
<GDBusMessageHeaderField>
enumeration)
Passed, or left out: a <GVariant>, or
#f.
A <GVariant> to set the header field or
#f to clear the header field.
Convenience setter for the
interface header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Convenience setter for the member
header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Sets self to be of type.
Passed: a <GDBusMessage>.
Passed: a <GDBusMessageType>, or one of
its symbols.
A 8-bit unsigned integer (typically a value from the
<GDBusMessageType> enumeration).
Convenience setter for the
num-unix-fds header field.
Passed: a <GDBusMessage>.
Passed: an unsigned 32-bit integer.
The value to set.
Convenience setter for the path
header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Convenience setter for the
reply-serial header field.
Passed: a <GDBusMessage>.
Passed: an unsigned 32-bit integer.
The value to set.
Convenience setter for the sender
header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Sets the serial for self.
The D-Bus specification does not allow the serial to be zero.
Passed: a <GDBusMessage>.
Passed: an unsigned 32-bit integer.
A guint32, which must not be zero.
Convenience setter for the
signature header field.
Passed: a <GDBusMessage>.
Passed, or left out: a string, or #f.
The value to set.
Sets the UNIX file descriptors associated with self. As a
side-effect the num-unix-fds header
field is set to the number of fds in fd-list (or cleared if
fd-list is #f).
This method is only available on UNIX.
When designing D-Bus APIs that are intended to be interoperable, please
note that non-GDBus implementations of D-Bus can usually only access
file descriptors if they are referenced by a value of type
G_VARIANT_TYPE_HANDLE in the body of the message.
Passed: a <GDBusMessage>.
Passed, or left out: a <GUnixFDList>, or
#f.
A <GUnixFDList> or #f.
Serializes self to a blob. The byte order returned by
dbus-message:get-byte-order
will be used.
Passed: a <GDBusMessage>.
Passed: a <GDBusCapabilityFlags>, or a
list of its symbols, or one of them.
A <GDBusCapabilityFlags> describing
what protocol features are supported.
Returned: a bytevector.
A pointer to a valid binary D-Bus message of out-size bytes
generated by self or #f if error is set. Free with
byte-array:free.
Not returned: it is the length of %return.
Return location for size of generated blob.
If self is not of type error does
nothing and returns #f.
Otherwise this method encodes the error in self as a
<GError> using
g_dbus_error_set_dbus_error() using the information in the
error-name header field of
self as well as the first string item in self’s body.
Passed: a <GDBusMessage>.
Returned: a boolean.
#t if error was set, #f otherwise.