Gio.DBusMessage.new_from_blob
Description: Reference for Gio.DBusMessage.new_from_blob

### Constructor

# Gio DBusMessagenew_from_blob

since: 2.26

#### Declaration [src]

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

#### Description [src]

Creates a new D-Bus message from the data stored at `blob`.

You must have previously called `g_dbus_message_bytes_needed()` on `blob`, and ensure that `blob` is at least as long as the return value from that function indicates. In particular, that means that `blob` must be at least 16 bytes long (but will typically be much longer).

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

#### Parameters

`blob`

  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.

`blob_len`

  Type: `gsize`

  The length of `blob`, in bytes.

`capabilities`

  Type: `GDBusCapabilityFlags`

  Flags describing what protocol features are supported.

`error`

  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 be 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`

The D-Bus message.

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