Skip to main content

qmi_utils_read_string_from_buffer

Function qmi_utils_read_string_from_buffer 

Source
pub unsafe extern "C" fn qmi_utils_read_string_from_buffer(
    buffer: *mut *const guint8,
    buffer_size: *mut guint16,
    length_prefix_size: guint8,
    max_size: guint16,
    out: *mut *mut gchar,
)
Expand description

Reads a string from the buffer.

buffer: a buffer with raw binary data.
buffer_size: size of buffer.
length_prefix_size: size of the length prefix integer in bits.
max_size: maximum number of bytes to read, or 0 to read all available bytes.
out: return location for the read string. The returned value should be freed with g_free().

If length_prefix_size is greater than 0, only the amount of bytes given
there will be read. Otherwise, up to buffer_size bytes will be read.

Also note that both buffer and buffer_size get updated after the write.

Since: 1.0
Deprecated: 1.12: Use qmi_message_tlv_read_string() instead.