Mtk 10a telephone processing function

Source: Internet
Author: User

Various telephone processing methods are basically implemented in this function: Access, answering, active suspension, peer suspension, and phone status prompt.

If you want to automatically answer a call, you can also implement the following in this function:

Mmi_ret mmi_ucm_ind_hdlr (mmi_event_struct * para)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
Srv_ucm_ind_evt_struct * ind;
Srv_ucm_incoming_call_ind_struct * incoming_ind;
Srv_ucm_outgoing_call_ind_struct * outgoing_ind;
Srv_ucm_alert_ind_struct * alert_ind;
Srv_ucm_policy_ind_struct * policy_ind;
Srv_ucm_connect_ind_struct * connect_ind;
Srv_ucm_disconnecting_ind_struct * disconnecting_ind;
Srv_ucm_release_ind_struct * release_ind;
Srv_ucm_call_cost_ind_struct * call_cost_ind;
Srv_ucm_auto_redial_ind_struct * auto_redial_ind;
Srv_ucm_start_processing_ind_struct * start_processing_ind;
Srv_ucm_stop_processing_ind_struct * stop_processing_ind;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
Ind = (srv_ucm_ind_evt_struct *) para;
MMI_TRACE (MMI_COMMON_TRC_G5_CALL, TRC_MMI_UCM_IND_HDLR_P1, ind-> ind_type );


/* Update the call indicator icon on the status bar */
# Ifdef _ MMI_CALL_INDICATOR __
If (srv_ucm_query_call_count (SRV_UCM_ACTIVE_STATE, SRV_UCM_CALL_TYPE_ALL, NULL)> 0)
{
Wgui_status_icon_bar_change_icon_image (STATUS_ICON_CALL_INDICATOR, IMG_SI_CALL_INDICATOR_ACTIVE );
Wgui_status_icon_bar_show_icon (STATUS_ICON_CALL_INDICATOR );
}
Else if (srv_ucm_query_call_count (SRV_UCM_HOLD_STATE, SRV_UCM_CALL_TYPE_ALL, NULL)> 0)
{
Wgui_status_icon_bar_change_icon_image (STATUS_ICON_CALL_INDICATOR, IMG_SI_CALL_INDICATOR_HOLD );
Wgui_status_icon_bar_show_icon (STATUS_ICON_CALL_INDICATOR );
}
Else
{
Wgui_status_icon_bar_hide_icon (STATUS_ICON_CALL_INDICATOR );
}
# Endif/* _ MMI_CALL_INDICATOR __*/

Kal_prompt_trace (MOD_MMI, "ucm ind_type % d", ind-> ind_type );
Switch (ind-> ind_type)
{
Case SRV_UCM_INCOMING_CALL_IND:
{
Incoming_ind = (srv_ucm_incoming_call_ind_struct *) ind-> ptr;
# Ifdef _ MMI_FTE_SUPPORT __
Mmi_ucm_auto_lock_fsm_hdlr (MMI_UCM_AL_INCOMING_EVENT );
# Endif/* _ MMI_FTE_SUPPORT __*/

If (MMI_FALSE = mmi_frm_group_is_present (GRP_ID_UCM_MT ))
{
Mmi_ucm_sg_create (GRP_ID_ROOT, GRP_ID_UCM_MT );
}
/* Display the incoming call screen */
Mmi_ucm_handle_incoming_call_ind (incoming_ind );
}
Break;

Case SRV_UCM_OUTGOING_CALL_IND:
{
Outgoing_ind = (srv_ucm_outgoing_call_ind_struct *) ind-> ptr;
G_ucm_p-> call_misc.get_alert_ind = MMI_FALSE;
# Ifdef _ MMI_FTE_SUPPORT __
Mmi_ucm_auto_lock_fsm_hdlr (MMI_UCM_AL_OUTGOING_EVENT );
# Endif/* _ MMI_FTE_SUPPORT __*/
Mmi_ucm_handle_outgoing_call_ind (outgoing_ind );

}
Break;

Case SRV_UCM_ALERT_IND:
{
Alert_ind = (srv_ucm_alert_ind_struct *) ind-> ptr;
G_ucm_p-> call_misc.get_alert_ind = MMI_TRUE;
Mmi_ucm_alert_ind (alert_ind );
}
Break;

Case srv_ucm_policy_ind:
{
Policy_ind = (srv_ucm_policy_ind_struct *) ind-> ptr;
Mmi_ucm_policy_ind (policy_ind );
}
Break;

Case SRV_UCM_CONNECT_IND:
{
Connect_ind = (srv_ucm_connect_ind_struct *) ind-> ptr;
# Ifdef _ MMI_FTE_SUPPORT __
Mmi_ucm_auto_lock_fsm_hdlr (MMI_UCM_AL_CONNECT_EVENT );
# Endif/* _ MMI_FTE_SUPPORT __*/
Mmi_ucm_connect_ind (connect_ind );
}
Break;

Case SRV_UCM_DISCONNECTING_IND:
{
Disconnecting_ind = (srv_ucm_disconnecting_ind_struct *) ind-> ptr;
Mmi_ucm_handle_disconnecting_ind (disconnecting_ind );
}
Break;

Case SRV_UCM_RELEASE_IND:
{
Release_ind = (srv_ucm_release_ind_struct *) ind-> ptr;
# Ifdef _ MMI_FTE_SUPPORT __
Mmi_ucm_auto_lock_fsm_hdlr (MMI_UCM_AL_RELEASE_EVENT );
# Endif/* _ MMI_FTE_SUPPORT __*/
Mmi_ucm_release_ind (release_ind );

}
Break;

Case SRV_UCM_CALL_COST_IND:
{
Call_cost_ind = (srv_ucm_call_cost_ind_struct *) ind-> ptr;
Mmi_ucm_call_cost_ind (call_cost_ind );
}
Break;

Case SRV_UCM_AUTO_REDIAL_IND:
{
Auto_redial_ind = (srv_ucm_auto_redial_ind_struct *) ind-> ptr;
Mmi_ucm_auto_redial_ind (auto_redial_ind );
}
Break;

Case SRV_UCM_AUTO_REDIAL_CANCEL_IND:
{
Mmi_ucm_auto_redial_cancel_ind ();
}
Break;

Case SRV_UCM_START_PROCESSING_IND:
{
Start_processing_ind = (srv_ucm_start_processing_ind_struct *) ind-> ptr;
Mmi_ucm_start_processing_ind (start_processing_ind );
}
Break;

Case SRV_UCM_STOP_PROCESSING_IND:
{
Stop_processing_ind = (srv_ucm_stop_processing_ind_struct *) ind-> ptr;
Mmi_ucm_stop_processing_ind (stop_processing_ind );
}
Break;

Case SRV_UCM_QUERY_CANCEL_IND:
{
Mmi_ucm_query_cancel_ind ();
}
Break;

Case SRV_UCM_REFRESH_IND:
{
Mmi_ucm_refresh_ind ();
}
Break;

Default:
{
MMI_ASSERT (0 );
}
Break;

}
Return MMI_RET_ OK;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.