SMS

## SMS SMS |

## Synopsis

                        MbimSmsPduReadRecord;
    void                mbim_sms_pdu_read_record_array_free (MbimSmsPduReadRecord **array);

                        MbimSmsCdmaReadRecord;
    void                mbim_sms_cdma_read_record_array_free
                                                            (MbimSmsCdmaReadRecord **array);

                        MbimSmsPduSendRecord;
    void                mbim_sms_pdu_send_record_free       (MbimSmsPduSendRecord *var);

                        MbimSmsCdmaSendRecord;
    void                mbim_sms_cdma_send_record_free      (MbimSmsCdmaSendRecord *var);

    MbimMessage *       mbim_message_sms_configuration_query_new
                                                            (GError **error);
    MbimMessage *       mbim_message_sms_configuration_set_new
                                                            (MbimSmsFormat format,
                                                             const gchar *sc_address,
                                                             GError **error);
    gboolean            mbim_message_sms_configuration_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStorageState *sms_storage_state,
                                                             MbimSmsFormat *format,
                                                             guint32 *max_messages,
                                                             guint32 *cdma_short_message_size,
                                                             gchar **sc_address,
                                                             GError **error);

    MbimMessage *       mbim_message_sms_read_query_new     (MbimSmsFormat format,
                                                             MbimSmsFlag flag,
                                                             guint32 message_index,
                                                             GError **error);
    gboolean            mbim_message_sms_read_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsFormat *format,
                                                             guint32 *messages_count,
                                                             MbimSmsPduReadRecord ***pdu_messages,
                                                             MbimSmsCdmaReadRecord ***cdma_messages,
                                                             GError **error);
    gboolean            mbim_message_sms_read_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsFormat *format,
                                                             guint32 *messages_count,
                                                             MbimSmsPduReadRecord ***pdu_messages,
                                                             MbimSmsCdmaReadRecord ***cdma_messages,
                                                             GError **error);

    MbimMessage *       mbim_message_sms_send_set_new       (MbimSmsFormat format,
                                                             const MbimSmsPduSendRecord *pdu_message,
                                                             const MbimSmsCdmaSendRecord *cdma_message,
                                                             GError **error);
    gboolean            mbim_message_sms_send_response_parse
                                                            (const MbimMessage *message,
                                                             guint32 *message_reference,
                                                             GError **error);

    MbimMessage *       mbim_message_sms_delete_set_new     (MbimSmsFlag flag,
                                                             guint32 message_index,
                                                             GError **error);
    gboolean            mbim_message_sms_delete_response_parse
                                                            (const MbimMessage *message,
                                                             GError **error);

    MbimMessage *       mbim_message_sms_message_store_status_query_new
                                                            (GError **error);
    gboolean            mbim_message_sms_message_store_status_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStatusFlag *flag,
                                                             guint32 *message_index,
                                                             GError **error);
    gboolean            mbim_message_sms_message_store_status_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStatusFlag *flag,
                                                             guint32 *message_index,
                                                             GError **error);

## Description

## Details

### MbimSmsPduReadRecord

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

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.

### mbim_sms_pdu_read_record_array_free ()

    void                mbim_sms_pdu_read_record_array_free (MbimSmsPduReadRecord **array);

Frees the memory allocated for the array of MbimSmsPduReadRecords.

`array` : | a NULL terminated array of MbimSmsPduReadRecord structs.

### 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;

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.

### mbim_sms_cdma_read_record_array_free ()

    void                mbim_sms_cdma_read_record_array_free
                                                            (MbimSmsCdmaReadRecord **array);

Frees the memory allocated for the array of MbimSmsCdmaReadRecords.

`array` : | a NULL terminated array of MbimSmsCdmaReadRecord structs.

### MbimSmsPduSendRecord

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

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

### mbim_sms_pdu_send_record_free ()

    void                mbim_sms_pdu_send_record_free       (MbimSmsPduSendRecord *var);

Frees the memory allocated for the MbimSmsPduSendRecord.

`var` : | a MbimSmsPduSendRecord.

### MbimSmsCdmaSendRecord

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

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.

### mbim_sms_cdma_send_record_free ()

    void                mbim_sms_cdma_send_record_free      (MbimSmsCdmaSendRecord *var);

Frees the memory allocated for the MbimSmsCdmaSendRecord.

`var` : | a MbimSmsCdmaSendRecord.

### 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.

`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### 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.

`format` : | the 'Format' field, given as a MbimSmsFormat.
`sc_address` : | the 'ScAddress' field, given as a string.
`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_sms_configuration_response_parse ()

    gboolean            mbim_message_sms_configuration_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStorageState *sms_storage_state,
                                                             MbimSmsFormat *format,
                                                             guint32 *max_messages,
                                                             guint32 *cdma_short_message_size,
                                                             gchar **sc_address,
                                                             GError **error);

Create a new request for the 'ScAddress' response command in the 'SMS' service.

`message` : | the MbimMessage.
`sms_storage_state` : | return location for a MbimSmsStorageState, or `NULL` if the 'SmsStorageState' field is not needed.
`format` : | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed.
`max_messages` : | return location for a guint32, or `NULL` if the 'MaxMessages' field is not needed.
`cdma_short_message_size` : | return location for a guint32, or `NULL` if the 'CdmaShortMessageSize' field is not needed.
`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()`.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### 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.

`format` : | the 'Format' field, given as a MbimSmsFormat.
`flag` : | the 'Flag' field, given as a MbimSmsFlag.
`message_index` : | the 'MessageIndex' field, given as a guint32.
`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_sms_read_response_parse ()

    gboolean            mbim_message_sms_read_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsFormat *format,
                                                             guint32 *messages_count,
                                                             MbimSmsPduReadRecord ***pdu_messages,
                                                             MbimSmsCdmaReadRecord ***cdma_messages,
                                                             GError **error);

Create a new request for the 'CdmaMessages' response command in the 'SMS' service.

`message` : | the MbimMessage.
`format` : | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed.
`messages_count` : | return location for a guint32, or `NULL` if the 'MessagesCount' field is not needed.
`pdu_messages` : | return location for a newly allocated array of MbimSmsPduReadRecords, or `NULL` if the 'PduMessages' field is not needed. Free the returned value with `mbim_sms_pdu_read_record_array_free()`.
`cdma_messages` : | return location for a newly allocated array of MbimSmsCdmaReadRecords, or `NULL` if the 'CdmaMessages' field is not needed. Free the returned value with `mbim_sms_cdma_read_record_array_free()`.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_sms_read_notification_parse ()

    gboolean            mbim_message_sms_read_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsFormat *format,
                                                             guint32 *messages_count,
                                                             MbimSmsPduReadRecord ***pdu_messages,
                                                             MbimSmsCdmaReadRecord ***cdma_messages,
                                                             GError **error);

Create a new request for the 'CdmaMessages' notification command in the 'SMS' service.

`message` : | the MbimMessage.
`format` : | return location for a MbimSmsFormat, or `NULL` if the 'Format' field is not needed.
`messages_count` : | return location for a guint32, or `NULL` if the 'MessagesCount' field is not needed.
`pdu_messages` : | return location for a newly allocated array of MbimSmsPduReadRecords, or `NULL` if the 'PduMessages' field is not needed. Free the returned value with `mbim_sms_pdu_read_record_array_free()`.
`cdma_messages` : | return location for a newly allocated array of MbimSmsCdmaReadRecords, or `NULL` if the 'CdmaMessages' field is not needed. Free the returned value with `mbim_sms_cdma_read_record_array_free()`.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### 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.

`format` : | the 'Format' field, given as a MbimSmsFormat.
`pdu_message` : | the 'PduMessage' field, given as a MbimSmsPduSendRecord.
`cdma_message` : | the 'CdmaMessage' field, given as a MbimSmsCdmaSendRecord.
`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_sms_send_response_parse ()

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

Create a new request for the 'MessageReference' response command in the 'SMS' service.

`message` : | the MbimMessage.
`message_reference` : | return location for a guint32, or `NULL` if the 'MessageReference' field is not needed.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### 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.

`flag` : | the 'Flag' field, given as a MbimSmsFlag.
`message_index` : | the 'MessageIndex' field, given as a guint32.
`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_sms_delete_response_parse ()

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

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

`message` : | the MbimMessage.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### 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.

`error` : | return location for error or `NULL`.
Returns : | a newly allocated MbimMessage, which should be freed with `mbim_message_unref()`.

### mbim_message_sms_message_store_status_response_parse ()

    gboolean            mbim_message_sms_message_store_status_response_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStatusFlag *flag,
                                                             guint32 *message_index,
                                                             GError **error);

Create a new request for the 'MessageIndex' response command in the 'SMS' service.

`message` : | the MbimMessage.
`flag` : | return location for a MbimSmsStatusFlag, or `NULL` if the 'Flag' field is not needed.
`message_index` : | return location for a guint32, or `NULL` if the 'MessageIndex' field is not needed.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.

### mbim_message_sms_message_store_status_notification_parse ()

    gboolean            mbim_message_sms_message_store_status_notification_parse
                                                            (const MbimMessage *message,
                                                             MbimSmsStatusFlag *flag,
                                                             guint32 *message_index,
                                                             GError **error);

Create a new request for the 'MessageIndex' notification command in the 'SMS' service.

`message` : | the MbimMessage.
`flag` : | return location for a MbimSmsStatusFlag, or `NULL` if the 'Flag' field is not needed.
`message_index` : | return location for a guint32, or `NULL` if the 'MessageIndex' field is not needed.
`error` : | return location for error or `NULL`.
Returns : | `TRUE` if the message was correctly parsed, `FALSE` if `error` is set.