since: 2.26


g_dbus_message_new_from_blob (
  guchar* blob,
  gsize blob_len,
  GDBusCapabilityFlags capabilities,
  GError** error


Creates a new GDBusMessage from the data stored at blob. The byte order that the message was in can be retrieved using g_dbus_message_get_byte_order().

If the blob cannot be parsed, contains invalid fields, or contains invalid headers, G_IO_ERROR_INVALID_ARGUMENT will be returned.

Available since: 2.26



Type: An array of guint8

A blob representing a binary D-Bus message.

The length of the array is specified in the blob_len argument.
The data is owned by the caller of the function.

Type: gsize

The length of blob.


Type: GDBusCapabilityFlags

A GDBusCapabilityFlags describing what protocol features are supported.


Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the constructor if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: GDBusMessage

A new GDBusMessage or NULL if error is set. Free with g_object_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.