Mbim.Tlv

Fields

None

Methods

class

new (type, data, data_length)

class

string_new (str)

dup ()

get_raw ()

get_tlv_data ()

get_tlv_type ()

guint16_array_get ()

ref ()

string_get ()

unref ()

wake_command_get ()

wake_packet_get ()

Details

class Mbim.Tlv

An opaque type representing a MBIM TLV.

New in version 1.28.

classmethod new(type, data, data_length)
Parameters:
Returns:

a newly created Mbim.Tlv, which should be freed with Mbim.Tlv.unref().

Return type:

Mbim.Tlv

Create a Mbim.Tlv with the given contents.

New in version 1.28.

classmethod string_new(str)
Parameters:

str (str) – a string.

Raises:

GLib.Error

Returns:

a newly created Mbim.Tlv which should be freed with Mbim.Tlv.unref(), or None if error is set.

Return type:

Mbim.Tlv

Create a Mbim.Tlv of type Mbim.TlvType.WCHAR_STR with the given contents.

New in version 1.28.

dup()
Returns:

a newly created Mbim.Tlv, which should be freed with Mbim.Tlv.unref().

Return type:

Mbim.Tlv

Create a Mbim.Tlv with the same contents as self.

New in version 1.28.

get_raw()
Raises:

GLib.Error

Returns:

The raw data buffer, or None if error is set.

length:

return location for the size of the output buffer.

Return type:

(int, length: int)

Gets the whole raw data buffer of the Mbim.Tlv.

New in version 1.28.

get_tlv_data()
Returns:

The raw data buffer, or None if empty.

out_length:

return location for the size of the output buffer.

Return type:

(int, out_length: int)

Gets the TLV raw data.

New in version 1.28.

get_tlv_type()
Returns:

a Mbim.TlvType.

Return type:

Mbim.TlvType

Gets the message type.

New in version 1.28.

guint16_array_get()
Raises:

GLib.Error

Returns:

True if on success, False if error is set.

array_size:

return location for a #guint32, or None if the field is not needed.

array:

return location for a newly allocated array of #guint16 values, or None if the field is not needed. Free the returned value with GLib.free().

Return type:

(bool, array_size: int, array: int)

Get an array of #guint16 values with the contents in the Mbim.Tlv.

The method may return a successful return even with on empty arrays (i.e. with array_size set to 0 and array set to None).

New in version 1.28.

ref()
Returns:

the new reference to self.

Return type:

Mbim.Tlv

Atomically increments the reference count of self by one.

New in version 1.28.

string_get()
Raises:

GLib.Error

Returns:

a newly created string, which should be freed with GLib.free(), or None if error is set.

Return type:

str

Get a string with the contents in the Mbim.Tlv.

New in version 1.28.

unref()

Atomically decrements the reference count of self by one. If the reference count drops to 0, self is completely disposed.

New in version 1.28.

wake_command_get()
Raises:

GLib.Error

Returns:

True if on success, False if error is set.

service:

return location for a Mbim.Uuid specifying the service that triggered the wake.

cid:

return location for the command id that triggered the wake.

payload_size:

return location for a #guint32, or None if the field is not needed.

payload:

return location for a newly allocated array of #guint8 values, or None if the field is not needed. Free the returned value with GLib.free().

Return type:

(bool, service: Mbim.Uuid, cid: int, payload_size: int, payload: int)

Get the contents of a wake command TLV.

The method may return a successful return even with on empty payload (i.e. with payload_size set to 0 and payload set to None).

New in version 1.28.

wake_packet_get()
Raises:

GLib.Error

Returns:

True if on success, False if error is set.

filter_id:

return location for a #guint32 specifying the filter id.

original_packet_size:

return location for a #guint32, or None if the field is not needed.

packet_size:

return location for a #guint32, or None if the field is not needed.

packet:

return location for a newly allocated array of #guint8 values, or None if the field is not needed. Free the returned value with GLib.free().

Return type:

(bool, filter_id: int, original_packet_size: int, packet_size: int, packet: int)

Get the contents of a wake packet TLV.

New in version 1.28.