Function
Qmimessage_new_from_raw
since: 1.0
Declaration [src]
QmiMessage*
qmi_message_new_from_raw (
GByteArray* raw,
GError** error
)
Description [src]
Create a new QmiMessage from the given raw data buffer.
Whenever a complete QMI message is read, its raw data gets removed from the raw buffer.
Available since: 1.0
Parameters
raw-
Type: An array of
guint8Raw data buffer.
The argument will be modified by the function. The caller of the function takes ownership of the returned data, and is responsible for freeing it. 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 aNULLGError*.The argument will be left initialized to NULLby the function 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: QmiMessage
A newly created QmiMessage, which should be freed with qmi_message_unref(). If raw doesn’t contain a complete QMI message NULL is returned. If there is a complete QMI message but it appears not to be valid, NULL is returned and error is set.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |