DBusMessage.from_blob


Description:

[ CCode ( has_construct_function = false ) ]
public DBusMessage.from_blob (uint8[] blob, DBusCapabilityFlags capabilities) throws Error

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

You must have previously called [func@Gio.DBusMessage.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 [method@Gio.DBusMessage.get_byte_order].

If the blob cannot be parsed, contains invalid fields, or contains invalid headers, [error@Gio.IOErrorEnum.INVALID_ARGUMENT] will be returned.

Parameters:

blob

a blob representing a binary D-Bus message

capabilities

flags describing what protocol features are supported

blob_len

the length of blob, in bytes

Returns:

The D-Bus message