zoukankan      html  css  js  c++  java
  • mtk 10a 电话处理函数

    电话的各种处理基本都在这个函数里实现:接入、接听、主动挂断、对方挂断、电话状态提示等。

    如果要做电话的自动接听,也在这个函数里实现:

    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_notify_ind_struct *notify_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_NOTIFY_IND:
            {
                notify_ind = (srv_ucm_notify_ind_struct*)ind->ptr;
                mmi_ucm_notify_ind(notify_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;     
    }

  • 相关阅读:
    vue 同页面不同参数
    vue的data用到this问题
    vue轮播,不是只有左右切换的,还有只切换src的
    vue页面高度填充,不出现滚动条
    WdatePicker做出onchange效果
    总结最近移动端遇到的坑(auto-size + zepto)
    react
    ES6-set && 数组剔重
    [置顶] Jquery easyui+Jsonp+asp.net+翻页 事件版
    扩展Jquery easyui的validator插件
  • 原文地址:https://www.cnblogs.com/inteliot/p/2531361.html
Copyright © 2011-2022 走看看