热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

mtk中的一些函数作用

一、进入 ILDE 界面 1.EntryIdleScreen()     2.mmi_idle_entry_idle_screen()     

一、进入 ILDE 界面

1.EntryIdleScreen()     

2.mmi_idle_entry_idle_screen()

       注册按键:HandleIdleScreenDigitEntry()

       IdleSetLRKey()注册左软件EntryMainMenuFromIdleScreen(),右软件 mmi_phb_idle_enter_phb_list()

       注册SEND键CHISTGetCallLogBySENDKey()

       注册相机按键mmi_camera_entry_app_screen()

       注册声音按键SetDefaultVolumeKeyHandlers()     

二、按下数字键( 123456 )

1. HandleIdleScreenDigitEntry()

       判断是否处飞行静音模式

2. IdleScreenDigitHandler()

       ShowCategory16Screen()建立拨号输入框,并且注册每个按键的响应

       执行数字键‘1’的响应:MMI_key_1_down()

       注册      左软件IdleDialPadSavePhoneBook(),SEND键IdleDialPadCall (),#键IdleAbbrevDialling(),

                     速拨IdleCallSpeedDialOnLongPress(),语音DialVoiceMail()

 

三、按下 SEND 键拨号

1. IdleDialPadCall()

       gTempUseIPNum——

       判断是否是ssc_table2[]中号码()

       mmi_idle_remove_dialer_screen_exit_handler()

2. MakeCall()

       在初始化函数InitCallInfo( )中设置了cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION,cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       因此: mmi_ucm_app_make_call(MMI_UCM_VOICE_CALL_TYPE, (U8*)strNumber);

             return;

 

3. mmi_ucm_app_make_call()

       把拨号信息装载到g_ucm_p->mo_info中(module_id, dial_type, dial_num.num_uri,只有号码,暂时还没有姓名)

 

4. mmi_ucm_outgoing_call_sendkey()

       判断是否是飞行模式mmi_bootup_get_active_flight_mode()

       判断UCM是否存在有待处理的CALL:mmi_ucm_is_pending_action()

       判断是否是call related supplementary service:mmi_ucm_is_crss()

       判断是否是紧急呼叫:mmi_ucm_is_sos_number()--CheckValidEmergencyNo1()

       判断是否是空号码

       判断是否已经存在SOS

       判断UCM是否忙:mmi_ucm_is_busy()--没有需要处理的Call,没有OUTGOING, INCOMING的group,没有emergency call。

       判断是否可以显示拨号选项:mmi_ucm_dial_option()

 

       以上都排除之后,存在以下3中拨号:

       (1)是SS_OPERATION:mmi_ucm_dial_action()

       (2)已经存在DATA/CSD且本次拨号非DATA/CSD,或者已经存在非DATA/CSD且本次拨号是DATA/CSD:(即:DATA/CSD与正常call不能同时存在)

                     g_ucm_p->mo_info.is_wait_dial = TRUE;

          mmi_ucm_end_all_action();

       (3)已经有一组group电话状态为MMI_UCM_ACTIVE_STATE:mmi_ucm_hold_and_dial_action()

       (4) mmi_ucm_dial_action( )

 

       如果拨号失败,设置自动重拨。

5. mmi_ucm_dial_action()

       S32 freeTab = g_ucm_p->call_list.num_group;

       mmi_ucm_id_info_struct actionId;                                 这个变量传到下一个函数去

       g_ucm_p->call_misc.curr_action = MMI_UCM_DIAL;

       装载g_ucm_p->call_list.group_info[freeTab]信息(group_id, call_type, call_state)

       装载g_ucm_p->call_list.group_info[freeTab].call_info[0]信息

       g_ucm_p->call_list.group_info[freeTab].num_call++;

g_ucm_p->call_list.num_group++;

 

       装载actionId

       mmi_ucm_pre_send_req(MMI_UCM_DIAL, &actionId, NULL, &g_ucm_p->mo_info);

6. mmi_ucm_pre_send_req( )           所有关于CALL的请求都要走这里

       mmi_ucm_dial_req_struct dialReq;

       装载dialReq

       mmi_ucm_send_req(op_code, first_ptr->call_type, &dialReq);

7. mmi_ucm_send_req( )                  所有关于CALL的请求都要走这里

       mmi_gsm_ucm_act_req(MMI_UCM_DIAL, act_struct);

8. mmi_gsm_ucm_act_req( )

       设置了cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL,cm_p->ucm_operation = MMI_GSM_UCM_DIAL

       mmi_gsm_dial(act_struct)

9. mmi_gsm_dial( )

       MakeCall((PS8)dial_number);

10.MakeCall( )

       此时,cm_p->ucm_operation = MMI_GSM_UCM_DIAL

       判断是否是紧急拨号

       判断号码是否为空,是否含有非法字符

       MakeCallEx(strNumber, TRUE, CSMCC_VOICE_CALL);

11.MakeCallEX( )

       装载UnicodeDTMFPadCallBuffer

       CheckShortCutOrCall(call_type);

12. CheckShortCutOrCall( )

       装载DTMFPadCallBuffer

       判断是否含有#

       判断是否是短号码

       MakeMyCall((PS8) dtmfBuf,call_type)

13. MakeMyCall( )

       OUTGOING_CALL outCall;

       装载outCall。(号码,类型)

       MakeOutgoingcall(outCall);

14. MakeOutgoingcall( )

       OutgoingProcessCMEvent(CM_KB_OUTGOINGCALL, &MsgStruct); 进入状态机

15. ProcessKBOutgoingEvent()

       装载gCurrOutcall(号码和类型)

       switch (GetCurrentState())

              case CM_IDLE_STATE:

                     SetPreviousState(CM_IDLE_STATE);

             SetCurrentState(CM_OUTGOING_STATE);

                     AddNewCallInfo()

                     MakePsInitiateCall((PU8)MsgStruct, (void*)OutgoingCallConnected);

16. MakePsInitiateCall( )

       获取IP number。不使用为NULL

       MakePsSSVUSSDReq(MsgStruct, (PU8) IPNum, length, (void*)PsCBackSetCallFeatures);

17. MakePsSSVUSSDReq( )

       装载消息结构,发送消息:PRT_USSDVSS_REQ(到L4层分析号码)

L4 层分析号码后,返回消息: PRT_USSDVSS_RSP ,进入 CBACK :

1.PsCBackSetCallFeatures()

       根据拨出号码,设置到PHB查找,设置gPhoneNumberStruct

       设置拨出电话的姓名SetOutgoingNamefromPhonebook()

       mmi_gsm_dial_rsp(TRUE, CC_OPERATION, NULL, NULL);

2. mmi_gsm_dial_rsp( )                          

       mmi_ucm_dial_act_rsp_struct dial_rsp;

       设置了cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION,cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       mmi_gsm_get_call_list(dial_rsp.call_list);         把cm_p中的信息拷贝到dial_rsp.call_list中,填充dial_rsp.call_list的所有结构

       装载dial_rsp.remote_info为最后一通呼出电话的信息

       装载dial_rsp. alert_info(image_info.image_id,image_info.record_index,ip_num)

       mmi_ucm_dispatch_rsp(MMI_UCM_DIAL, MMI_UCM_VOICE_CALL_TYPE, (void *)&dial_rsp);

3. mmi_ucm_dispatch_rsp( )                 UCM都走这里

       mmi_ucm_dial_act_rsp(act_struct);

4. mmi_ucm_dial_act_rsp(void *act_struct )                 参数就是上面的dial_rsp

       g_ucm_p->mo_info.is_wait_dial = FALSE;

       mmi_ucm_sync_call_list(rsp->call_list);                   需要理解!!!!!!!!

       memcpy(&g_ucm_p->mo_mt_display, &rsp->alert_info, sizeof(mmi_ucm_ring_info_struct));

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

       mmi_ucm_go_back_screen_check();

5. mmi_ucm_go_back_screen_check( )

       判断UCM没有处于:MMI_UCM_WAIT_PROCESS_STATE,MMI_UCM_DO_PROCESS_STATE,MMI_UCM_COMP_PROCESS_STATE

       mmi_ucm_entry_marker();

       mmi_ucm_entry_outgoing_call();

6. mmi_ucm_entry_outgoing_call()

       EntryNewScreen(SCR_ID_UCM_OUTGOING, mmi_ucm_exit_outgoing_call, mmi_ucm_entry_outgoing_call, NULL);

       ShowCategory17Screen()

       注册右软件,END键mmi_ucm_outgoing_call_endkey()

       注册侧键mmi_ucm_set_sidekey();

L4 返回消息 PRT_OUTGOINGCALL_EVENT_RSP ,进入 CBACK:

1.PsCbackOutgoingCallIdSync( )

       如果不止1通电话,MMI与L4 PS同步:SyncCallList();

       SetOutgoingCallHandle(handle);       设置 cm_p->state_info.AllCalls[count].call_handle,cm_p->state_info.AllCalls[count].group_id

       mmi_gsm_sync_call_list_ind();

2. mmi_gsm_sync_call_list_ind( )

       mmi_gsm_get_call_list(call_list);        把cm_p中的电话信息拷贝到call_list中

       mmi_ucm_dispatch_ind(MMI_UCM_SYNC_CALL_LIST, (void *)call_list);

3. mmi_ucm_sync_call_list(call_list)         同步cm_p与g_ucm_p电话信息

4. mmi_ucm_go_back_screen_check();

       返回到mmi_ucm_entry_outgoing_call()

拨出电话被网络接通, L4 返回消息 PRT_OUTGOINGCALL_CONNECTED ,进入 CBACK :

1.OutgoingCallConnected()

       OutgoingProcessCMEvent(CM_PS_CALLCONNECTED, &handle);

2. ProcessPSCallconnectedEvent()

       switch (GetCurrentState())

              case CM_OUTGOING_STATE:

                     MakeHold();

          SetPreviousState(GetCurrentState());

          SetCurrentState(CM_ACTIVE_STATE);

                     SetCallState(gtmpOutgoingIndex, CM_ACTIVE_STATE, FALSE);

                     判断是否有INCOMING CALL,如果有,要回到来电界面

                     mmi_gsm_connect_ind(callHandle);

3. mmi_gsm_connect_ind( )

       mmi_ucm_connect_ind_struct connect_ind;

       装载connect_ind的3个结构:uid_info, remote_info, call_list。(call_list拷贝于cm_p中的电话信息)

       mmi_ucm_dispatch_ind(MMI_UCM_CONNECT_IND, (void *)&connect_ind);

       SetTempUseIPNumber(FALSE);

       ResetRedialAttempts();

4. void mmi_ucm_connect_ind(void *act_struct)    参数就是上面的connect_ind

       断言OUTGOING GROUP只有1组

       DTGetRTCTime(&g_ucm_p->call_list.group_info[groupIndex].call_info[0].start_time);

       mmi_ucm_log_call_history(groupIndex, 0, TRUE);                      log call

       mmi_ucm_sync_call_list(ind->call_list);           同步cm_p和g_ucm_p

       mmi_ucm_go_back_screen_check( )

5. mmi_ucm_go_back_screen_check( )

       如果SCR_ID_UCM_IN_CALL不存在,则mmi_ucm_entry_in_call( ); 然后启动时间提醒

       如果存在,GoBackHistory();

 

6. mmi_ucm_entry_in_call()

       RegisterHighlightHandler(mmi_ucm_highlight_in_call_item);

       ShowCategory403Screen()

       注册按键响应

主动挂断 1 通 ACTIVE CALL

1.mmi_ucm_in_call_endkey()

       当前高亮group,如果:

       只有1通电话:mmi_ucm_end_single_action()

       不止一通电话:mmi_ucm_end_conference_action()

2. mmi_ucm_end_single_action()

 

3. mmi_ucm_end_single_action_with_index(g_ucm_p->call_misc.hilite_tab, g_ucm_p->call_misc.hilite_index)

       mmi_ucm_id_info_struct actionId;

       显示:processing。。。

       g_ucm_p->call_misc.curr_action = MMI_UCM_END_SINGLE;

   g_ucm_p->call_list.group_info[hiliteTab].call_info[hiliteIndex].proc_state = MMI_UCM_DO_PROCESS_STATE;       

   g_ucm_p->call_list.group_info[hiliteTab].call_info[hiliteIndex].act_type = MMI_UCM_END_SINGLE;

       装载actionId

       mmi_ucm_pre_send_req(MMI_UCM_END_SINGLE, &actionId, NULL, NULL);

4. mmi_ucm_pre_send_req( )

       mmi_ucm_single_call_struct singleReq;

       装载singleReq

       mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

5. mmi_ucm_send_req( )

       mmi_gsm_ucm_act_req(MMI_UCM_END_SINGLE, act_struct);

6. mmi_gsm_ucm_act_req( )

       设置了cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL,cm_p->ucm_operation = MMI_GSM_UCM_END_SINGLE

       mmi_gsm_end_single(act_struct);

7. mmi_gsm_end_single(act_struct);         所有的挂断电话都是在这里处理!!

       分3中情况:

       (1)挂断的电话是OUTGOING,且还没有返回call id

                     SetCallAbortReqSentFlag(TRUE);

             SetCallflag(((mmi_ucm_single_call_struct*) act_struct)->action_uid.call_id, CM_HANGUP_REQUESTED, TRUE);

             MakePsAthRequest((void*)PsCBackOutgoingCallEnded);

       (2)挂断的电话是来电,且目前只有此1通电话

                     SetCallflag(((mmi_ucm_single_call_struct*) act_struct)->action_uid.call_id, CM_HANGUP_REQUESTED, TRUE);

             MakePsAthRequest((void*)PsCBackIncomingCallRejected);

       (3)其他情况(已经返回call id的OUTGOING CALL, 拒接呼叫等待的INCOMING CALL, ACTIVE、HOLD CALL)

                     根据挂断电话的call id到cm_p->state_info.AllCalls[count]查找

                     挂断呼叫等待:MakePsSendUDUB((void*)PsCBackIncomingCallRejected);

                     挂断其他:MakePsEndSelectiveCall((void*)HangupReqSucess, ((mmi_ucm_single_call_struct*) act_struct)->action_uid.call_id);

8.MakePsEndSelectiveCall()

       SetChldReqSent(CM_ENDSELECTIVE_REQ_SENT);

       装载消息PRT_CALLENDSPECIFIC_EVENT

       opcode = CSMCC_REL_SPECIFIC_CALL;

 

L4 返回消息 PRT_CALLENDSPECIFIC_SUCCESS :进入 CBACK:

1.HangupReqSucess()

       OutgoingProcessCMEvent(CM_PS_HANGUPSUC, (void*)&handle);    进入状态机

2. ProcessPSHangupSucEvent()

       根据返回的call id到cm_p中找到这个被挂断的电话,用找到的信息设置cm_p->disc_call

       switch (GetCurrentState())

              case CM_HOLD_STATE:

       case CM_ACTIVE_STATE:

                     ResetCallflag((*handle), CM_HANGUP_REQUESTED, TRUE);

           SetCallState((*handle), CM_IDLE_STATE, TRUE);

                     设置cm_p的prev_state和curr_state               到此,挂断电话信息在cm_p中仅存在于cm_p->disc_call中。

                     mmi_gsm_release_ind( GetCallEndCause());

                     SetCallAbortReqSentFlag(FALSE);

          mmi_gsm_end_single_rsp (TRUE, NULL);

3. mmi_gsm_release_ind( )

       mmi_ucm_release_ind_struct release_ind;

       用cm_p->disc_call去装载release_ind

       mmi_ucm_dispatch_ind(MMI_UCM_RELEASE_IND, (void *)&release_ind);

       memset(&cm_p->disc_call, 0, sizeof(mmi_gsm_disc_call_struct));

4. mmi_ucm_release_ind( )

       根据挂断电话的句柄,到g_ucm_p中找它的信息

       mmi_ucm_stop_inband_tone();

    mmi_ucm_stop_incoming_tone();

    memcpy(&ansMode, GetAnsweringMode(), sizeof(MMI_ANSWERING_MODE));

       如果自动应答开启,停止自动应答定时器

       if (开始时间正确,说明已经log call)

              mmi_ucm_log_call_duration(index.group_index, index.call_index);    记录通话时间

       else        //说明还没有log call

              mmi_ucm_log_call_history( )

       装载g_ucm_p->call_end

       mmi_ucm_sync_call_list(ind->call_list);    同步g_ucm_p与cm_p的电话信息。此时,挂断电话信息在cm_p->disc_call和g_ucm_p->call_end中。

       mmi_ucm_entry_call_end()                 通过g_ucm_p->call_end的信息,显示通话时间界面

       mmi_ucm_go_back_screen_check( );

       调整:扩音器,静音等设置。

5. mmi_gsm_end_single_rsp ()

       mmi_ucm_act_rsp_struct end_single_rsp;

       设置:cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION, cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       memset(&end_single_rsp, 0, sizeof(mmi_ucm_act_rsp_struct));

       mmi_gsm_get_call_list(end_single_rsp.call_list);     装载call_list结构,从cm_p中拷贝过来(被挂断电话的信息已经不存在了)

       清除自动重拨ResetRedialAttempts();

       mmi_ucm_dispatch_rsp(MMI_UCM_END_SINGLE, MMI_UCM_VOICE_CALL_TYPE, (void *)&end_single_rsp);

6. mmi_ucm_end_act_rsp( )

       mmi_ucm_sync_call_list(rsp->call_list);    同步g_ucm_p与rsp->call_list(即:cm_p)中的电话信息

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

   L4返回消息PRT_END_CHLD_RSP:进入CBACK:

1.CheckFailureChld( )

       SetChldReqSent(CM_ACTION_NONE);

       mmi_gsm_end_single_rsp(TRUE, NULL);              与上面的相同!

来电:

1. PsCBackCallIncoming()

       ProcessIncomingEvents(CM_PS_CALL_INCOMING, info);

 

2.ProcessIncomingCallEvent(info)

       AddNewCallInfo()       在这里,cm_p->state_info.AllCalls[index].group_id = GetUnUsedGroupID();

                                                 如果是MO,那么就先设置为255,然后在PsCBackSetCallFeature( )中在设置为GetUnUsedGroupID()

       CMSetupAlertForMT();     准备提示信息   

 

3. mmi_gsm_ring_ind()

       mmi_ucm_ring_ind_struct ring_ind;  

       装载ring_ind

       mmi_ucm_dispatch_ind(MMI_UCM_RING_IND, (void *)&ring_ind);

 

4. mmi_ucm_ring_ind(void *act_struct)                  参数就是上面的ring_ind

       如果(当前没有OUTGOING, INCOMING group,不存在紧急电话,不是黑名单号码)

       {

              mmi_ucm_sync_call_list(ind->call_list);                  同步cm_p与g_ucm_p

              把参数带进来的消息拷贝到g_ucm_p->mo_mt_display和g_ucm_p->call_misc.l4c_info中

              mmi_ucm_entry_marker()

              mdi_audio_stop_all()

 

       }

       否则      //自动拒接来电

       {

              mmi_ucm_pre_send_req(MMI_UCM_AUTO_REJECT, &(ind->uid_info), NULL, NULL);

       mmi_ucm_pre_send_req(MMI_UCM_FORCE_RELEASE, &(ind->uid_info), NULL, NULL);

       }

 

 

5. mmi_ucm_entry_incoming_call()

       根据g_ucm_p->mo_mt_display,设置一些提示信息:tone id, path, image……

       ShowCategory17Screen()

       注册按键相应:

       任意键接听: mmi_ucm_incoming_call_sendkey()

       右软件,END键拒接:mmi_ucm_incoming_call_endkey()

       SEND键接听:mmi_ucm_incoming_call_endkey()

       mmi_ucm_play_incoming_tone() 分2中:ring tone, wait tone

 

 

拒接来电

1.mmi_ucm_incoming_call_endkey()

mmi_ucm_stop_incoming_tone()

如果已经启动自动接听,则停止定时器UCM_AUTO_ANSWER_TIMER

mmi_ucm_end_single_action_with_index(groupIndex, 0)

 

2. mmi_ucm_end_single_action_with_index( )

       mmi_ucm_id_info_struct actionId;

       显示processing….

       装载actionId

       mmi_ucm_pre_send_req(MMI_UCM_END_SINGLE, &actionId, NULL, NULL);

 

 

3. mmi_ucm_pre_send_req( )

       mmi_ucm_single_call_struct singleReq;

       用上面的actionId装载singleReq

       mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

 

4. mmi_ucm_send_req( )

       mmi_gsm_ucm_act_req(MMI_UCM_END_SINGLE, act_struct);

 

5. mmi_gsm_ucm_act_req( )

       设置:cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_END_SINGLE

       mmi_gsm_end_single(act_struct);

 

6. mmi_gsm_end_single( )          所有的挂断电话都是在这里处理

       由于此时只有一通来电,因此执行:else if(GetTotalCallCount() == 1 && GetCurrentState() == CM_INCOMING_STATE) 这个分支

       SetCallflag(CM_HANGUP_REQUESTED)

       MakePsAthRequest((void*)PsCBackIncomingCallRejected);

 

7. MakePsAthRequest( )

       发送消息:PRT_ATH_REQ

       athReq->op_code = L4C_DISCONNECT_NONE;

 

 

L4C返回消息:PRT_ATH_REQ_SUCCESS,进入CBACK:

1. PsCBackIncomingCallRejected( )

       ProcessIncomingEvents(CM_PS_INCOMING_CALL_REJECTED, info);            J进入状态机

              g_bUserReject = TRUE;

              gIncomingCallDroppedFlag = TRUE

 

2. ProcessIncomingCallRejected()

       装载cm_p->disc_call

       ResetCallflag(CM_HANGUP_REQUESTED)

       设置CM的状态

       PurgeIncomingCallStructure()             清除了该来电在cm_p中的信息。但是在cm_p->disc_call中仍然存在

       mmi_gsm_release_ind(GetCallEndCause());

       mmi_gsm_end_single_rsp(TRUE, NULL);

 

3.mmi_gsm_release_ind( )

       mmi_ucm_release_ind_struct release_ind;

       用cm_p->disc_call来装载release_ind

       mmi_gsm_get_call_list(release_ind.call_list);           获取cm_p中的电话信息

       mmi_ucm_dispatch_ind(MMI_UCM_RELEASE_IND, (void *)&release_ind);

 

4. mmi_ucm_release_ind()

       mmi_ucm_stop_inband_tone();

    mmi_ucm_stop_incoming_tone();

       因为是来电,start_time时间无效,因此log call

       装载g_ucm_p->call_end

       mmi_ucm_sync_call_list(ind->call_list);                  同步cm_p与g_ucm_p。此时,2个变量中除了disc_call和call_end,再也没有其他关于被挂断电话的信息了。

       mmi_ucm_entry_call_end()                               提示信息:结束(需要利用g_ucm_p->call_end的信息)

       恢复一些必要的变量到原始状态

 

       清除g_ucm_p->call_end信息

 

5. mmi_gsm_end_single_rsp()

       mmi_ucm_act_rsp_struct end_single_rsp;

       设置:cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION, cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       mmi_gsm_get_call_list(end_single_rsp.call_list);

       ResetRedialAttempts()               清除自动重拨信息

       mmi_ucm_dispatch_rsp(MMI_UCM_END_SINGLE, MMI_UCM_VOICE_CALL_TYPE, (void *)&end_single_rsp);

 

6. mmi_ucm_end_act_rsp()

       mmi_ucm_sync_call_list(rsp->call_list);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

 

 

拒接接听

1.mmi_ucm_incoming_call_sendkey()

       mmi_ucm_stop_incoming_tone();

       判断该如何去接听

 

2. mmi_ucm_accept_action()

       mmi_ucm_id_info_struct actionId;

       显示processing…..

       g_ucm_p->call_misc.curr_action = MMI_UCM_ACCEPT;

       装载actionId;

       mmi_ucm_pre_send_req(MMI_UCM_ACCEPT, &actionId, NULL, NULL);

 

3. mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

 

4. mmi_gsm_ucm_act_req(MMI_UCM_ACCEPT, act_struct);

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_ACCEPT

 

5. mmi_gsm_accept(act_struct)

       MakePsCallAcceptIncoming((void*)PsCBackIncomingCallAccepted);

              发送消息:PRT_INCOMINGCALL_ACCEPT_EVENT

 

L4返回消息PRT_INCOMINGCALL_ACCEPT_SUCCESS,进入CBACK:

1.PsCBackIncomingCallAccepted()

       ProcessIncomingEvents(CM_PS_INCOMING_CALL_CONNECTED, info);             进入状态机

 

2. ProcessAcceptIncomingCall()

       设置CM的状态

       SetIncomingCallStateActive();

       mmi_gsm_accept_rsp(TRUE, NULL);

 

3. mmi_gsm_accept_rsp( )

       mmi_ucm_act_rsp_struct accept_rsp;     

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION, cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       mmi_gsm_get_call_list(accept_rsp.call_list);                  获取cm_p电话信息

       mmi_ucm_dispatch_rsp(MMI_UCM_ACCEPT, MMI_UCM_VOICE_CALL_TYPE, (void *)&accept_rsp);

 

4. mmi_ucm_accept_act_rsp(act_struct);

       Log call

       mmi_ucm_sync_call_list(rsp->call_list);                  同步cm_p与g_ucm_p

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);           

mmi_ucm_go_back_screen_check();

 

5. mmi_ucm_go_back_screen_check()           此时这个来电信息已经变成ACTIVE

       mmi_ucm_tab_highlight();                 设置显示的tab信息

       mmi_ucm_entry_in_call();    

1.Hole Single , Hold Conference (操作完全相同)

1. mmi_ucm_hold_action()

       mmi_ucm_hold_action_with_index(g_ucm_p->call_misc.hilite_tab);

 

2. mmi_ucm_hold_action_with_index()

       显示processing

       g_ucm_p->call_misc.curr_action = MMI_UCM_HOLD;

       设置该高亮hiliteTab的所有电话的proc_state=MMI_UCM_DO_PROCESS_STATE, act_type=MMI_UCM_HOLD

       mmi_ucm_pre_send_req(MMI_UCM_HOLD, &actionId, NULL, NULL);

 

3. mmi_ucm_pre_send_req( )

       装载singleReq

       mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

 

4. mmi_ucm_send_req( )

       mmi_gsm_ucm_act_req(MMI_UCM_HOLD, act_struct)

 

5. mmi_gsm_ucm_act_req( )

       设置:cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_HOLD

       mmi_gsm_hold(act_struct);

 

6. mmi_gsm_hold( )

       MakePsSwapCallRequest ((void*)mmi_gsm_ps_hold_rsp);

       发送消息:PRT_SWAPCALL_EVENT

       swapReq->opcode = CSMCC_SWAP_CALL;   

 

 

L4C返回PRT_END_CHLD_RSP,进入CBACK:

1. mmi_gsm_ps_hold_rsp()

       ProcessIncomingEvents(CM_PS_ACTIVE_CALL_HELD, info);      进入状态机

 

2. ProcessCallsHeld()

       if (GetTotalCallCount() > 0)

SyncCallList();                    首先cm_p与L4C同步,然后g_ucm_p与cm_p同步

       设置CM状态

 

 

2.Retrieve Single, Retrieve Conference( 操作完全相同 )

1. mmi_ucm_retrieve_action()

       mmi_ucm_retrieve_action_with_index(g_ucm_p->call_misc.hilite_tab);

 

2. mmi_ucm_retrieve_action_with_index( )

       提示:processing..

       mmi_ucm_pre_send_req(MMI_UCM_RETRIEVE, &actionId, NULL, NULL);

 

3. mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

 

4. mmi_gsm_ucm_act_req(MMI_UCM_RETRIEVE, act_struct);

       设置:cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_RETRIECE

 

5. mmi_gsm_retrieve(act_struct);

       MakePsSwapCallRequest ((void*)RetrieveReqSucess);

              发送消息:PRT_SWAPCALL_EVENT, opcode = CSMCC_SWAP_CALL;

 

L4返回:PRT_END_CHLD_RSP,进入CBACK:

1. RetrieveReqSucess()

       OutgoingProcessCMEvent(CM_PS_RETRIEVESUC, (void*)MsgStruct);             进入状态机

 

2. ProcessPSRetrieveSucEvent()

       MakeRetrieve()

       设置CM状态

 

3. mmi_gsm_retrieve_rsp(TRUE, NULL);

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION, cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       mmi_ucm_dispatch_rsp(MMI_UCM_RETRIEVE, MMI_UCM_VOICE_CALL_TYPE, (void *)&retrieve_rsp);

 

4. mmi_ucm_act_rsp(act_struct);

       mmi_ucm_sync_call_list(rsp->call_list);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

       显示:操作成功

       mmi_ucm_go_back_screen_check()

 

 

3.Swap

1. mmi_ucm_swap_action()

 

2. mmi_ucm_swap_action_with_index(g_ucm_p->call_misc.hilite_tab, -1);

 

3. mmi_ucm_pre_send_req()

mmi_ucm_send_req(op_code, first_ptr->call_type, &multipleReq);

 

4. mmi_gsm_ucm_act_req(MMI_UCM_SWAP, act_struct);

       SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_SWAP);

 

5. mmi_gsm_swap(act_struct);

       MakePsSwapCallRequest((void*)SwapReqSucess);

              消息:PRT_SWAPCALL_EVENT

 

L4返回:PRT_END_CHLD_RSP,进入CBACK:

1. SwapReqSucess()

       OutgoingProcessCMEvent(CM_PS_SWAPSUC, (void*)MsgStruct);      进入状态机

 

2. ProcessPSSwapSucEvent()

       MakeSwap();

       mmi_gsm_swap_rsp()

              mmi_ucm_dispatch_rsp(MMI_UCM_SWAP, MMI_UCM_VOICE_CALL_TYPE, (void *)&swap_rsp);

 

3. mmi_ucm_act_rsp()

       mmi_ucm_sync_call_list(rsp->call_list);

       mmi_ucm_go_back_screen_check()

 

 

4. Conference

1. mmi_ucm_conference_action()

 

2. mmi_ucm_conference_action_with_index(g_ucm_p->call_misc.hilite_tab, -1);

       显示processing…

 

3. mmi_ucm_pre_send_req(MMI_UCM_CONFERENCE, &firstId, &otherId, NULL);

 

4. mmi_ucm_send_req(op_code, first_ptr->call_type, &confReq);

 

5. mmi_gsm_ucm_act_req(MMI_UCM_CONFERENCE, act_struct);

       SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_CONFERENCE);

 

6. mmi_gsm_conference(act_struct);

       SetConfFlag()

 

7. MakePsConfCallRequest()

       发送消息:PRT_CONFCALL_EVENT, opcode = CSMCC_ADD_HELD_CALL;

 

L4返回PRT_END_CHLD_RSP,进入CBACK:

1. ConfReqSucess()

       OutgoingProcessCMEvent(CM_PS_CONFSUC, (void*)MsgStruct);      进入状态机

 

2. ProcessPSConfSucEvent()

       MakeConf()                                此时,cm_p中所有HOLD CALL,都变成ACTIVE

 

3. mmi_gsm_conference_rsp(TRUE, NULL);

       SetUCMOperationState(MMI_GSM_UCM_NO_ACTION, MMI_GSM_UCM_IDLE);

       把cm_p中所有ACTIVE CALL的group_id都设置成cm_p->state_info.ucm_conf_group_id。

       mmi_gsm_get_call_list(conference_rsp.call_list);

       mmi_ucm_dispatch_rsp(MMI_UCM_CONFERENCE, MMI_UCM_VOICE_CALL_TYPE, (void *)&conference_rsp);

 

4. mmi_ucm_act_rsp(act_struct);

       同步cm_p与g_ucm_p电话信息

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

       显示操作成功

       mmi_ucm_go_back_screen_check()

 

 

 

5. 分机

1. mmi_ucm_split_action()

 

2. mmi_ucm_split_action_with_index(g_ucm_p->call_misc.hilite_tab, g_ucm_p->call_misc.hilite_index);

       Processing….

 

3. mmi_ucm_pre_send_req(MMI_UCM_SPLIT, &actionId, NULL, NULL);

       装载splitReq

 

4. mmi_ucm_send_req(op_code, first_ptr->call_type, &splitReq);

 

5. mmi_gsm_ucm_act_req(MMI_UCM_SPLIT, act_struct);

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NOMAL, cm_p->ucm_operation = MMI_GSM_UCM_SPLIT

 

6. mmi_gsm_split(act_struct);

       设置分机电话的status_flag = CM_SPLIT_REQUESTED

 

7. MakePsSplitRequest(((mmi_ucm_split_req_struct*) act_struct)->split_call);

       发送消息PRT_SPLITCALL_EVENT, opcode = CSMCC_HOLD_ACTIVE_EXCEPT_SPECIFIC_CALL;

 

L4返回消息PRT_END_CHLD_RSP,进入CBACK:

1. SplitReqSucess()

       OutgoingProcessCMEvent(CM_PS_SPLITSUC, (void*)MsgStruct);       进入状态机

 

2. ProcessPSSplitSucEvent()

       MakeSplitSucess()                      设置其他ACTIVE CALL为HOLD 状态

 

3. mmi_gsm_split_rsp(TRUE, NULL);

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NO_ACTION, cm_p->ucm_operation = MMI_GSM_UCM_IDLE

       mmi_gsm_get_call_list(split_rsp.call_list);

       mmi_ucm_dispatch_rsp(MMI_UCM_SPLIT, MMI_UCM_VOICE_CALL_TYPE, (void *)&split_rsp);

 

4. mmi_ucm_act_rsp()

       mmi_ucm_sync_call_list(rsp->call_list);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_DO_PROCESS_STATE, MMI_UCM_COMP_PROCESS_STATE);

       mmi_ucm_set_process_state(-1, -1, MMI_UCM_COMP_PROCESS_STATE, MMI_UCM_IDLE_PROCESS_STATE);

       显示操作成功

       mmi_ucm_go_back_screen_check()

 

 

 

6.End Single

1. mmi_ucm_end_single_action( )

 

2. mmi_ucm_end_single_action_with_index(g_ucm_p->call_misc.hilite_tab, g_ucm_p->call_misc.hilite_index);

       mmi_ucm_pre_send_req(MMI_UCM_END_SINGLE, &actionId, NULL, NULL);

 

3. mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

 

4. mmi_gsm_ucm_act_req(MMI_UCM_END_SINGLE, act_struct);

       设置cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_END_SINGLE

 

5.mmi_gsm_end_single(act_struct);                 所有的挂断一通电话都是在这里处理

 

 

7.End Conference

1. mmi_ucm_end_conference_action()

 

2. mmi_ucm_end_conference_action_with_index(g_ucm_p->call_misc.hilite_tab);

       mmi_ucm_pre_send_req(MMI_UCM_END_CONFERENCE, &actionId, NULL, NULL);       注意:actionId中只有group_id, 没有call_id

 

3. mmi_ucm_send_req(op_code, first_ptr->call_type, &endconfReq);

 

4. mmi_gsm_ucm_act_req(MMI_UCM_END_CONFERENCE, act_struct);

       SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_END_CONFERENCE);

 

5. mmi_gsm_end_conference(act_struct);

       if(GetTotalActiveCallCount() > 1)                   电话会议处于ACTIVE STATE

       {

              MakePsHangupallActiveRequest((void*)HangupallActReqSucess);

              return;

       }

       else if (GetTotalHoldCallCount() > 1)              电话会议处于HOLD STATE

       {

              MakePsSendRelHeld((void*)HangupallHldReqSucess);

              return;

       }

 

 

8.End All

1. mmi_ucm_end_all_action()

 

2. mmi_ucm_end_all_action_with_type(MMI_UCM_CALL_TYPE_ALL);

       Processing

       g_ucm_p->call_misc.curr_action = MMI_UCM_END_ALL;

 

3. mmi_ucm_pre_send_req()

 

4. mmi_ucm_send_req()

 

5. mmi_gsm_ucm_act_req(MMI_UCM_END_ALL, act_struct);

       SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_END_ALL);

 

6. mmi_gsm_end_all(act_struct);

       MakePsHangupallCallsRequest((void*)HangupallReqSucess);

              发送消息:PRT_ENDALLCALL_EVENT, opcode = CSMCC_REL_ALL

 

L4返回PRT_ENDALLCALLREQ_SUCCESS,进入CBACK:

1.HangupallReqSucess()

       OutgoingProcessCMEvent(CM_PS_HANGUPALLSUC, (void*)&gMyhandle);    进入状态机

 

2. ProcessPSHangupallSucEvent()

 

3. mmi_gsm_release_ind()

 

 

 

 

9.NetWork Drop

1. PsCBackNetworkCallDropped()

       ProcessIncomingEvents(CM_PS_NWK_CALL_DROP, info);  

 

2. ProcessEndCallIdAndGoBack( )

 

 

转自:http://blog.csdn.net/feosun/article/details/5628495


推荐阅读
  • 兆芯X86 CPU架构的演进与现状(国产CPU系列)
    本文详细介绍了兆芯X86 CPU架构的发展历程,从公司成立背景到关键技术授权,再到具体芯片架构的演进,全面解析了兆芯在国产CPU领域的贡献与挑战。 ... [详细]
  • MySQL初级篇——字符串、日期时间、流程控制函数的相关应用
    文章目录:1.字符串函数2.日期时间函数2.1获取日期时间2.2日期与时间戳的转换2.3获取年月日、时分秒、星期数、天数等函数2.4时间和秒钟的转换2. ... [详细]
  • 单片微机原理P3:80C51外部拓展系统
      外部拓展其实是个相对来说很好玩的章节,可以真正开始用单片机写程序了,比较重要的是外部存储器拓展,81C55拓展,矩阵键盘,动态显示,DAC和ADC。0.IO接口电路概念与存 ... [详细]
  • 开机自启动的几种方式
    0x01快速自启动目录快速启动目录自启动方式源于Windows中的一个目录,这个目录一般叫启动或者Startup。位于该目录下的PE文件会在开机后进行自启动 ... [详细]
  • Quora问题探讨:26岁开始转行做开发是否太迟? ... [详细]
  • 2020年9月15日,Oracle正式发布了最新的JDK 15版本。本次更新带来了许多新特性,包括隐藏类、EdDSA签名算法、模式匹配、记录类、封闭类和文本块等。 ... [详细]
  • poj 3352 Road Construction ... [详细]
  • 文章目录Golang定时器Timer和Tickertime.Timertime.NewTimer()实例time.AfterFunctime.Tickertime.NewTicke ... [详细]
  • 本文详细介绍了 PHP 中对象的生命周期、内存管理和魔术方法的使用,包括对象的自动销毁、析构函数的作用以及各种魔术方法的具体应用场景。 ... [详细]
  • 命令模式是一种行为设计模式,它将请求封装成一个独立的对象,从而允许你参数化不同的请求、队列请求或者记录请求日志。本文将详细介绍命令模式的基本概念、组件及其在实际场景中的应用。 ... [详细]
  • 题目《BZOJ2654: Tree》的时间限制为30秒,内存限制为512MB。该问题通过结合二分查找和Kruskal算法,提供了一种高效的优化解决方案。具体而言,利用二分查找缩小解的范围,再通过Kruskal算法构建最小生成树,从而在复杂度上实现了显著的优化。此方法不仅提高了算法的效率,还确保了在大规模数据集上的稳定性能。 ... [详细]
  • 在尝试对 QQmlPropertyMap 类进行测试驱动开发时,发现其派生类中无法正常调用槽函数或 Q_INVOKABLE 方法。这可能是由于 QQmlPropertyMap 的内部实现机制导致的,需要进一步研究以找到解决方案。 ... [详细]
  • 本文提出了一种基于栈结构的高效四则运算表达式求值方法。该方法能够处理包含加、减、乘、除运算符以及十进制整数和小括号的算术表达式。通过定义和实现栈的基本操作,如入栈、出栈和判空等,算法能够准确地解析并计算输入的表达式,最终输出其计算结果。此方法不仅提高了计算效率,还增强了对复杂表达式的处理能力。 ... [详细]
  • 如何将TS文件转换为M3U8直播流:HLS与M3U8格式详解
    在视频传输领域,MP4虽然常见,但在直播场景中直接使用MP4格式存在诸多问题。例如,MP4文件的头部信息(如ftyp、moov)较大,导致初始加载时间较长,影响用户体验。相比之下,HLS(HTTP Live Streaming)协议及其M3U8格式更具优势。HLS通过将视频切分成多个小片段,并生成一个M3U8播放列表文件,实现低延迟和高稳定性。本文详细介绍了如何将TS文件转换为M3U8直播流,包括技术原理和具体操作步骤,帮助读者更好地理解和应用这一技术。 ... [详细]
  • 本文详细探讨了几种常用的Java后端开发框架组合及其具体应用场景。通过对比分析Spring Boot、MyBatis、Hibernate等框架的特点和优势,结合实际项目需求,为开发者提供了选择合适框架组合的参考依据。同时,文章还介绍了这些框架在微服务架构中的应用,帮助读者更好地理解和运用这些技术。 ... [详细]
author-avatar
手机用户2602922607
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有