ContentsIndex
Example
vm_gsm_sms_set_interrupt_event_handler
VMINT custom_sms_new_message_interrupt_proc(vm_gsm_sms_event_t* event_data)
{
    vm_gsm_sms_event_new_sms_t* event_new_message_ptr;
    vm_gsm_sms_new_message_t* new_message_ptr = NULL;
    VMINT res = 0;

    if(event_data->event_id == VM_GSM_SMS_EVENT_ID_SMS_NEW_MESSAGE)
    {
        event_new_message_ptr = (vm_gsm_sms_event_new_sms_t *)event_data->event_info; // Gets the event info.
        new_message_ptr = event_new_message_ptr->message_data; // Gets the message data.
        res = vm_gsm_sms_clear_interrupt_event_handler(event_data->event_id,
                                custom_sms_new_message_interrupt_proc, NULL);
        if(res != VM_GSM_SMS_RESULT_OK)
        {
             vm_log_debug("custom_sms_new_message_interrupt_proc have got new message, but cannot delete interrupt");
        }
    }
    return res;
}

void custom_sms_set_interrupt_event_handler_sample(void)
{
    VMINT return = 0;
    return = vm_gsm_sms_set_interrupt_event_handler(VM_GSM_SMS_EVENT_ID_SMS_NEW_MESSAGE,
                                             custom_sms_new_message_interrupt_proc, NULL);
    if(return != VM_GSM_SMS_RESULT_OK)
    {
        vm_log_debug("Cannot set interrupt!");
    }
}
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.