## SMS SMS |

## Functions

void | mbim_sms_pdu_read_record_array_free ()
void | mbim_sms_cdma_read_record_array_free ()
void | mbim_sms_pdu_send_record_free ()
void | mbim_sms_cdma_send_record_free ()
MbimMessage * | mbim_message_sms_configuration_query_new ()
MbimMessage * | mbim_message_sms_configuration_set_new ()
gboolean | mbim_message_sms_configuration_response_parse ()
MbimMessage * | mbim_message_sms_read_query_new ()
gboolean | mbim_message_sms_read_response_parse ()
gboolean | mbim_message_sms_read_notification_parse ()
MbimMessage * | mbim_message_sms_send_set_new ()
gboolean | mbim_message_sms_send_response_parse ()
MbimMessage * | mbim_message_sms_delete_set_new ()
gboolean | mbim_message_sms_delete_response_parse ()
MbimMessage * | mbim_message_sms_message_store_status_query_new ()
gboolean | mbim_message_sms_message_store_status_response_parse ()
gboolean | mbim_message_sms_message_store_status_notification_parse ()

## Types and Values

| MbimSmsPduReadRecord
typedef | MbimSmsPduReadRecordArray
| MbimSmsCdmaReadRecord
typedef | MbimSmsCdmaReadRecordArray
| MbimSmsPduSendRecord
| MbimSmsCdmaSendRecord

## Description

## Functions

### mbim_sms_pdu_read_record_array_free ()

    void
    mbim_sms_pdu_read_record_array_free (MbimSmsPduReadRecordArray *array);

Frees the memory allocated for the array of MbimSmsPduReadRecord structs.

#### Parameters

array | a NULL terminated array of MbimSmsPduReadRecord structs. |

Since: 1.4

### mbim_sms_cdma_read_record_array_free ()

    void
    mbim_sms_cdma_read_record_array_free (MbimSmsCdmaReadRecordArray *array);

Frees the memory allocated for the array of MbimSmsCdmaReadRecord structs.

#### Parameters

array | a NULL terminated array of MbimSmsCdmaReadRecord structs. |

Since: 1.4

### mbim_sms_pdu_send_record_free ()

    void
    mbim_sms_pdu_send_record_free (MbimSmsPduSendRecord *var);

Frees the memory allocated for the MbimSmsPduSendRecord.

#### Parameters

var | a MbimSmsPduSendRecord. |

Since: 1.4

### mbim_sms_cdma_send_record_free ()

    void
    mbim_sms_cdma_send_record_free (MbimSmsCdmaSendRecord *var);

Frees the memory allocated for the MbimSmsCdmaSendRecord.

#### Parameters

var | a MbimSmsCdmaSendRecord. |

Since: 1.4

### mbim_message_sms_configuration_query_new ()

    MbimMessage *
    mbim_message_sms_configuration_query_new
                                   (GError **error);

Create a new request for the 'Configuration' query command in the 'SMS' service.

#### Parameters

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

#### Returns

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

Since: 1.4

### mbim_message_sms_configuration_set_new ()

    MbimMessage *
    mbim_message_sms_configuration_set_new
                                   (MbimSmsFormat format,
                                    const gchar *sc_address,
                                    GError **error);

Create a new request for the 'Configuration' set command in the 'SMS' service.

#### Parameters

format | the 'Format' field, given as a MbimSmsFormat. | [in]
sc_address | the 'ScAddress' field, given as a string. | [in]
error | return location for error or `NULL`. |

#### Returns

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

Since: 1.4

### mbim_message_sms_configuration_response_parse ()

    gboolean
    mbim_message_sms_configuration_response_parse
                                   (const MbimMessage *message,
                                    MbimSmsStorageState *out_sms_storage_state,
                                    MbimSmsFormat *out_format,
                                    guint32 *out_max_messages,
                                    guint32 *out_cdma_short_message_size,
                                    gchar **out_sc_address,
                                    GError **error);

Parses and returns parameters of the 'Configuration' response command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_sms_storage_state | return location for a MbimSmsStorageState, or `NULL` if the 'SmsStorageState' field is not needed. | [out][optional][transfer none]
out_format | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed. | [out][optional][transfer none]
out_max_messages | return location for a guint32, or `NULL` if the 'MaxMessages' field is not needed. | [out][optional][transfer none]
out_cdma_short_message_size | return location for a guint32, or `NULL` if the 'CdmaShortMessageSize' field is not needed. | [out][optional][transfer none]
out_sc_address | return location for a newly allocated string, or `NULL` if the 'ScAddress' 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.4

### mbim_message_sms_read_query_new ()

    MbimMessage *
    mbim_message_sms_read_query_new (MbimSmsFormat format,
                                     MbimSmsFlag flag,
                                     guint32 message_index,
                                     GError **error);

Create a new request for the 'Read' query command in the 'SMS' service.

#### Parameters

format | the 'Format' field, given as a MbimSmsFormat. | [in]
flag | the 'Flag' field, given as a MbimSmsFlag. | [in]
message_index | the 'MessageIndex' 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.4

### mbim_message_sms_read_response_parse ()

    gboolean
    mbim_message_sms_read_response_parse (const MbimMessage *message,
                                          MbimSmsFormat *out_format,
                                          guint32 *out_messages_count,
                                          MbimSmsPduReadRecordArray **out_pdu_messages,
                                          MbimSmsCdmaReadRecordArray **out_cdma_messages,
                                          GError **error);

Parses and returns parameters of the 'Read' response command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_format | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed. | [out][optional][transfer none]
out_messages_count | return location for a guint32, or `NULL` if the 'MessagesCount' field is not needed. | [out][optional][transfer none]
out_pdu_messages | return location for a newly allocated array of MbimSmsPduReadRecord items, or `NULL` if the 'PduMessages' field is not needed. Free the returned value with `mbim_sms_pdu_read_record_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimSmsPduReadRecord]
out_cdma_messages | return location for a newly allocated array of MbimSmsCdmaReadRecord items, or `NULL` if the 'CdmaMessages' field is not needed. Free the returned value with `mbim_sms_cdma_read_record_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimSmsCdmaReadRecord]
error | return location for error or `NULL`. |

#### Returns

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

Since: 1.4

### mbim_message_sms_read_notification_parse ()

    gboolean
    mbim_message_sms_read_notification_parse
                                   (const MbimMessage *message,
                                    MbimSmsFormat *out_format,
                                    guint32 *out_messages_count,
                                    MbimSmsPduReadRecordArray **out_pdu_messages,
                                    MbimSmsCdmaReadRecordArray **out_cdma_messages,
                                    GError **error);

Parses and returns parameters of the 'Read' notification command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_format | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed. | [out][optional][transfer none]
out_messages_count | return location for a guint32, or `NULL` if the 'MessagesCount' field is not needed. | [out][optional][transfer none]
out_pdu_messages | return location for a newly allocated array of MbimSmsPduReadRecord items, or `NULL` if the 'PduMessages' field is not needed. Free the returned value with `mbim_sms_pdu_read_record_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimSmsPduReadRecord]
out_cdma_messages | return location for a newly allocated array of MbimSmsCdmaReadRecord items, or `NULL` if the 'CdmaMessages' field is not needed. Free the returned value with `mbim_sms_cdma_read_record_array_free()`. | [out][optional][transfer full][array zero-terminated=1][element-type MbimSmsCdmaReadRecord]
error | return location for error or `NULL`. |

#### Returns

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

Since: 1.4

### mbim_message_sms_send_set_new ()

    MbimMessage *
    mbim_message_sms_send_set_new (MbimSmsFormat format,
                                   const MbimSmsPduSendRecord *pdu_message,
                                   const MbimSmsCdmaSendRecord *cdma_message,
                                   GError **error);

Create a new request for the 'Send' set command in the 'SMS' service.

#### Parameters

format | the 'Format' field, given as a MbimSmsFormat. | [in]
pdu_message | the 'PduMessage' field, given as a MbimSmsPduSendRecord. | [in]
cdma_message | the 'CdmaMessage' field, given as a MbimSmsCdmaSendRecord. | [in]
error | return location for error or `NULL`. |

#### Returns

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

Since: 1.4

### mbim_message_sms_send_response_parse ()

    gboolean
    mbim_message_sms_send_response_parse (const MbimMessage *message,
                                          guint32 *out_message_reference,
                                          GError **error);

Parses and returns parameters of the 'Send' response command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_message_reference | return location for a guint32, or `NULL` if the 'MessageReference' 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.4

### mbim_message_sms_delete_set_new ()

    MbimMessage *
    mbim_message_sms_delete_set_new (MbimSmsFlag flag,
                                     guint32 message_index,
                                     GError **error);

Create a new request for the 'Delete' set command in the 'SMS' service.

#### Parameters

flag | the 'Flag' field, given as a MbimSmsFlag. | [in]
message_index | the 'MessageIndex' 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.4

### mbim_message_sms_delete_response_parse ()

    gboolean
    mbim_message_sms_delete_response_parse
                                   (const MbimMessage *message,
                                    GError **error);

Parses and returns parameters of the 'Delete' response command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
error | return location for error or `NULL`. |

#### Returns

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

Since: 1.4

### mbim_message_sms_message_store_status_query_new ()

    MbimMessage *
    mbim_message_sms_message_store_status_query_new
                                   (GError **error);

Create a new request for the 'Message Store Status' query command in the 'SMS' service.

#### Parameters

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

#### Returns

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

Since: 1.4

### mbim_message_sms_message_store_status_response_parse ()

    gboolean
    mbim_message_sms_message_store_status_response_parse
                                   (const MbimMessage *message,
                                    MbimSmsStatusFlag *out_flag,
                                    guint32 *out_message_index,
                                    GError **error);

Parses and returns parameters of the 'Message Store Status' response command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_flag | return location for a MbimSmsStatusFlag, or `NULL` if the 'Flag' field is not needed. | [out][optional][transfer none]
out_message_index | return location for a guint32, or `NULL` if the 'MessageIndex' 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.4

### mbim_message_sms_message_store_status_notification_parse ()

    gboolean
    mbim_message_sms_message_store_status_notification_parse
                                   (const MbimMessage *message,
                                    MbimSmsStatusFlag *out_flag,
                                    guint32 *out_message_index,
                                    GError **error);

Parses and returns parameters of the 'Message Store Status' notification command in the 'SMS' service.

#### Parameters

message | the MbimMessage. |
out_flag | return location for a MbimSmsStatusFlag, or `NULL` if the 'Flag' field is not needed. | [out][optional][transfer none]
out_message_index | return location for a guint32, or `NULL` if the 'MessageIndex' 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.4

## Types and Values

### MbimSmsPduReadRecord

    typedef struct {
        guint32 message_index;
        guint32 message_status;
        guint32 pdu_data_size;
        guint8 *pdu_data;
    } MbimSmsPduReadRecord;

#### Members

guint32 `message_index`; | a guint32. |
guint32 `message_status`; | a guint32. |
guint32 `pdu_data_size`; | size of the pdu_data array. |
guint8 *`pdu_data`; | an array of guint8 values. |

Since: 1.4

### MbimSmsPduReadRecordArray

    typedef MbimSmsPduReadRecord *MbimSmsPduReadRecordArray;

A NULL-terminated array of MbimSmsPduReadRecord elements.

Since: 1.24

### MbimSmsCdmaReadRecord

    typedef struct {
        guint32 message_index;
        guint32 message_status;
        gchar *address;
        gchar *timestamp;
        guint32 encoding;
        guint32 language;
        guint32 encoded_message_size;
        guint8 *encoded_message;
        guint32 encoded_message_size_in_characters;
    } MbimSmsCdmaReadRecord;

#### Members

guint32 `message_index`; | a guint32. |
guint32 `message_status`; | a guint32. |
gchar *`address`; | a string. |
gchar *`timestamp`; | a string. |
guint32 `encoding`; | a guint32. |
guint32 `language`; | a guint32. |
guint32 `encoded_message_size`; | size of the encoded_message array. |
guint8 *`encoded_message`; | an array of guint8 values. |
guint32 `encoded_message_size_in_characters`; | a guint32. |

Since: 1.4

### MbimSmsCdmaReadRecordArray

    typedef MbimSmsCdmaReadRecord *MbimSmsCdmaReadRecordArray;

A NULL-terminated array of MbimSmsCdmaReadRecord elements.

Since: 1.24

### MbimSmsPduSendRecord

    typedef struct {
        guint32 pdu_data_size;
        guint8 *pdu_data;
    } MbimSmsPduSendRecord;

#### Members

guint32 `pdu_data_size`; | size of the pdu_data array. |
guint8 *`pdu_data`; | an array of guint8 values. |

Since: 1.4

### MbimSmsCdmaSendRecord

    typedef struct {
        guint32 encoding;
        guint32 language;
        gchar *address;
        guint32 encoded_message_size;
        guint8 *encoded_message;
        guint32 encoded_message_size_in_characters;
    } MbimSmsCdmaSendRecord;

#### Members

guint32 `encoding`; | a guint32. |
guint32 `language`; | a guint32. |
gchar *`address`; | a string. |
guint32 `encoded_message_size`; | size of the encoded_message array. |
guint8 *`encoded_message`; | an array of guint8 values. |
guint32 `encoded_message_size_in_characters`; | a guint32. |

Since: 1.4