Syntax
VM_RESULT vm_gsm_sms_delete_message(
    VMUINT16 message_id, 
    vm_gsm_sms_callback callback, 
    void* user_data
);
ContentsIndex
PreviousUpNext
vm_gsm_sms_delete_message
Example
Syntax
VM_RESULT vm_gsm_sms_delete_message(
    VMUINT16 message_id, 
    vm_gsm_sms_callback callback, 
    void* user_data
);
Description

Deletes an existing message as specified by message ID. The Callback Action Data Structure is vm_gsm_sms_delete_message_callback_t;

Parameters
Parameters 
Description 
VMUINT16 message_id 
[IN] Specifies the message to be deleted. 
vm_gsm_sms_callback callback 
[IN] Callback function. 
void* user_data 
[IN] User data. 
Returns

Refer to VM_GSM_SMS_RESULT for return result and error code.

Example
void custom_sms_delete_message_callback(vm_gsm_sms_callback_t* callback_data)
{
    if(callback_data->action == VM_GSM_SMS_ACTION_DELETE)
    {
        if(callback_data->cause == VM_GSM_SMS_CAUSE_NO_ERROR)
        {
            if(!callback_data->action_data)
            {
                 vm_log_debug("action_data is NULL.");
                 return;
            }
            vm_log_debug("delete message success, result = %d, cause = %d",
                         callback_data->result, callback_data->cause);
        }
        else
        {
            vm_log_debug("delete message failed.");
        }
    }
}

void custom_sms_delete_message(void)
{
    VMINT16 message_id;
    VMINT res;

    message_id = vm_gsm_sms_get_message_id(VM_GSM_SMS_BOX_INBOX, 0);
    if(message_id == -1)
    {
        vm_log_debug("custom_sms_delete_message 0 message-index does not exist.");
    }
    res = vm_gsm_sms_delete_message(message_id, custom_sms_delete_message_callback, NULL);
    if(res != VM_GSM_SMS_RESULT_OK)
    {
        vm_log_debug("custom_sms_delete_message delete message failed.");
    }
}
File

vmgsm_sms.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.