MS UICC Low Level Access: libmbim-glib Reference Manual

## MS UICC Low Level Access MS UICC Low Level Access |

## Functions

void | mbim_terminal_capability_info_array_free ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_atr_query_new ()
gboolean | mbim_message_ms_uicc_low_level_access_atr_response_parse ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_open_channel_set_new ()
gboolean | mbim_message_ms_uicc_low_level_access_open_channel_response_parse ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_close_channel_set_new ()
gboolean | mbim_message_ms_uicc_low_level_access_close_channel_response_parse ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_apdu_set_new ()
gboolean | mbim_message_ms_uicc_low_level_access_apdu_response_parse ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_terminal_capability_query_new ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_terminal_capability_set_new ()
gboolean | mbim_message_ms_uicc_low_level_access_terminal_capability_response_parse ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_reset_query_new ()
MbimMessage * | mbim_message_ms_uicc_low_level_access_reset_set_new ()
gboolean | mbim_message_ms_uicc_low_level_access_reset_response_parse ()

## Types and Values

| MbimTerminalCapabilityInfo
typedef | MbimTerminalCapabilityInfoArray

## Description

## Functions

### mbim_terminal_capability_info_array_free ()

    void
    mbim_terminal_capability_info_array_free
                                   (MbimTerminalCapabilityInfoArray *array);

Frees the memory allocated for the array of MbimTerminalCapabilityInfo structs.

#### Parameters

array | a NULL terminated array of MbimTerminalCapabilityInfo structs. |

Since: 1.26

### mbim_message_ms_uicc_low_level_access_atr_query_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_atr_query_new
                                   (GError **error);

Create a new request for the 'ATR' query command in the 'MS UICC Low Level Access' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_atr_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_atr_response_parse
                                   (const MbimMessage *message,
                                    gchar **out_atr,
                                    GError **error);

Parses and returns parameters of the 'ATR' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_atr | return location for a newly allocated string, or `NULL` if the 'atr' field is not needed. Free the returned value with `g_free()`. | [out][optional][transfer full]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_open_channel_set_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_open_channel_set_new
                                   (const guint32 app_id_size,
                                    const guint8 *app_id,
                                    guint32 select_p2_arg,
                                    guint32 channel_group,
                                    GError **error);

Create a new request for the 'Open Channel' set command in the 'MS UICC Low Level Access' service.

#### Parameters

app_id_size | size of the app_id array. | [in]
app_id | the 'AppId' field, given as an array of guint8 values. | [in][element-type guint8][array length=app_id_size]
select_p2_arg | the 'SelectP2Arg' field, given as a guint32. | [in]
channel_group | the 'ChannelGroup' field, given as a guint32. | [in]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_open_channel_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_open_channel_response_parse
                                   (const MbimMessage *message,
                                    guint32 *out_status,
                                    guint32 *out_channel,
                                    guint32 *out_response_size,
                                    const guint8 **out_response,
                                    GError **error);

Parses and returns parameters of the 'Open Channel' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_status | return location for a guint32, or `NULL` if the 'Status' field is not needed. | [out][optional][transfer none]
out_channel | return location for a guint32, or `NULL` if the 'Channel' field is not needed. | [out][optional][transfer none]
out_response_size | return location for the size of the response array. | [out][optional]
out_response | return location for an array of guint8 values. Do not free the returned value, it is owned by `message` . | [out][optional][transfer none][element-type guint8][array length=out_response_size]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_close_channel_set_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_close_channel_set_new
                                   (guint32 channel,
                                    guint32 channel_group,
                                    GError **error);

Create a new request for the 'Close Channel' set command in the 'MS UICC Low Level Access' service.

#### Parameters

channel | the 'Channel' field, given as a guint32. | [in]
channel_group | the 'ChannelGroup' field, given as a guint32. | [in]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_close_channel_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_close_channel_response_parse
                                   (const MbimMessage *message,
                                    guint32 *out_status,
                                    GError **error);

Parses and returns parameters of the 'Close Channel' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_status | return location for a guint32, or `NULL` if the 'Status' field is not needed. | [out][optional][transfer none]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_apdu_set_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_apdu_set_new
                                   (guint32 channel,
                                    MbimUiccSecureMessaging secure_messaging,
                                    MbimUiccClassByteType class_byte_type,
                                    const guint32 command_size,
                                    const guint8 *command,
                                    GError **error);

Create a new request for the 'APDU' set command in the 'MS UICC Low Level Access' service.

#### Parameters

channel | the 'Channel' field, given as a guint32. | [in]
secure_messaging | the 'SecureMessaging' field, given as a MbimUiccSecureMessaging. | [in]
class_byte_type | the 'ClassByteType' field, given as a MbimUiccClassByteType. | [in]
command_size | size of the command array. | [in]
command | the 'Command' field, given as an array of guint8 values. | [in][element-type guint8][array length=command_size]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_apdu_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_apdu_response_parse
                                   (const MbimMessage *message,
                                    guint32 *out_status,
                                    guint32 *out_response_size,
                                    const guint8 **out_response,
                                    GError **error);

Parses and returns parameters of the 'APDU' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_status | return location for a guint32, or `NULL` if the 'Status' field is not needed. | [out][optional][transfer none]
out_response_size | return location for the size of the response array. | [out][optional]
out_response | return location for an array of guint8 values. Do not free the returned value, it is owned by `message` . | [out][optional][transfer none][element-type guint8][array length=out_response_size]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_terminal_capability_query_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_terminal_capability_query_new
                                   (GError **error);

Create a new request for the 'Terminal Capability' query command in the 'MS UICC Low Level Access' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_terminal_capability_set_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_terminal_capability_set_new
                                   (guint32 terminal_capability_count,
                                    const MbimTerminalCapabilityInfo *const *terminal_capability,
                                    GError **error);

Create a new request for the 'Terminal Capability' set command in the 'MS UICC Low Level Access' service.

#### Parameters

terminal_capability_count | the 'TerminalCapabilityCount' field, given as a guint32. | [in]
terminal_capability | the 'TerminalCapability' field, given as an array of MbimTerminalCapabilityInfo items. | [in]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_terminal_capability_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_terminal_capability_response_parse
                                   (const MbimMessage *message,
                                    guint32 *out_terminal_capability_count,
                                    MbimTerminalCapabilityInfoArray **out_terminal_capability,
                                    GError **error);

Parses and returns parameters of the 'Terminal Capability' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_terminal_capability_count | return location for a guint32, or `NULL` if the 'TerminalCapabilityCount' field is not needed. | [out][optional][transfer none]
out_terminal_capability | return location for a newly allocated array of MbimTerminalCapabilityInfo items, or `NULL` if the 'TerminalCapability' field is not needed. Free the returned value with `mbim_terminal_capability_info_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimTerminalCapabilityInfo]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_reset_query_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_reset_query_new
                                   (GError **error);

Create a new request for the 'Reset' query command in the 'MS UICC Low Level Access' service.

#### Parameters

error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_reset_set_new ()

    MbimMessage *
    mbim_message_ms_uicc_low_level_access_reset_set_new
                                   (MbimUiccPassThroughAction pass_through_action,
                                    GError **error);

Create a new request for the 'Reset' set command in the 'MS UICC Low Level Access' service.

#### Parameters

pass_through_action | the 'PassThroughAction' field, given as a MbimUiccPassThroughAction. | [in]
error | return location for error or `NULL`. |

#### Returns

a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

Since: 1.26

### mbim_message_ms_uicc_low_level_access_reset_response_parse ()

    gboolean
    mbim_message_ms_uicc_low_level_access_reset_response_parse
                                   (const MbimMessage *message,
                                    MbimUiccPassThroughStatus *out_pass_through_status,
                                    GError **error);

Parses and returns parameters of the 'Reset' response command in the 'MS UICC Low Level Access' service.

#### Parameters

message | the MbimMessage. |
out_pass_through_status | return location for a MbimUiccPassThroughStatus, or `NULL` if the 'PassThroughStatus' field is not needed. | [out][optional][transfer none]
error | return location for error or `NULL`. |

#### Returns

`TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

Since: 1.26

## Types and Values

### MbimTerminalCapabilityInfo

    typedef struct {
        guint32 terminal_capability_data_size;
        guint8 *terminal_capability_data;
    } MbimTerminalCapabilityInfo;

#### Members

guint32 `terminal_capability_data_size`; | size of the terminal_capability_data array. |
guint8 *`terminal_capability_data`; | an array of guint8 values. |

Since: 1.26

### MbimTerminalCapabilityInfoArray

    typedef MbimTerminalCapabilityInfo *MbimTerminalCapabilityInfoArray;

A NULL-terminated array of MbimTerminalCapabilityInfo elements.

Since: 1.26