📄 mmi_callback.c
字号:
MmiSendSignal(task_id,sendSignal);
break;
case EV_MN_APP_GPRS_ATTACH_RESULT_F:
MmiCreateSignal(SIG_APP_MN_GPRS_ATTACH_RESULT,sizeof(MnGprsAttachResultS),&sendSignal);
sendSignal->sig.MnGprsAttachResult.attach_type =((APP_MN_GPRS_ATTACH_RESULT_T*)param_ptr)->attach_type;
sendSignal->sig.MnGprsAttachResult.is_attach_ok =((APP_MN_GPRS_ATTACH_RESULT_T*)param_ptr)->is_attach_ok;
MmiSendSignal(task_id,sendSignal);
break;
case EV_MN_APP_GPRS_DETACH_RESULT_F:
MmiCreateSignal(SIG_APP_MN_GPRS_DETACH_RESULT,sizeof(MnGprsDetachResultS),&sendSignal);
sendSignal->sig.MnGprsDetachResult.detach_type =((APP_MN_GPRS_DETACH_RESULT_T*)param_ptr)->detach_type;
sendSignal->sig.MnGprsDetachResult.is_detach_ok =((APP_MN_GPRS_DETACH_RESULT_T*)param_ptr)->is_detach_ok;
MmiSendSignal(task_id,sendSignal);
break;
case EV_MN_APP_PUCT_INFO_CNF_F:
MmiCreateSignal(SIG_APP_MN_PUCT_INFO_CNF,sizeof(MnPuctInfoCnfS),&sendSignal);
sendSignal->sig.MnPuctInfoCnf.is_ok =((APP_MN_PUCT_INFO_CNF_T*)param_ptr)->is_ok;
sendSignal->sig.MnPuctInfoCnf.is_service_support =((APP_MN_PUCT_INFO_CNF_T*)param_ptr)->is_service_support;
sendSignal->sig.MnPuctInfoCnf.puct_info =((APP_MN_PUCT_INFO_CNF_T*)param_ptr)->puct_info;
MmiSendSignal(task_id,sendSignal);
break;
case EV_MN_APP_MSISDN_UPDATE_CNF_F:
MmiCreateSignal(SIG_APP_MN_MSISDN_UPDATE_CNF_F,sizeof(MnMsisdnUpdateCnfS),&sendSignal);
sendSignal->sig.MnMsisdnUpdateCnf.is_ok =((APP_MN_MSISDN_UPDATE_CNF_T*)param_ptr)->is_ok;
sendSignal->sig.MnMsisdnUpdateCnf.operate_type =((APP_MN_MSISDN_UPDATE_CNF_T*)param_ptr)->operate_type;
MmiSendSignal(task_id,sendSignal);
break;
default:
//SCI_ASSERT(FALSE);
//louis check assert 2003.6.25
SCI_TRACE_MID("mmi_callback: the event id is error %d",event_id);
break;
}
}
/*****************ADD the call callbackfunction heer */
void mmicall_CallBackFunc(
uint32 taskId, // the client's task id
uint32 event_id, // the event type
void *param_ptr // data follow the event
)
{
MmiSignalS *sendSignal = PNULL;
uint16 task_id = (uint16)taskId;
//SCI_ASSERT(PNULL != param_ptr);
//louis check assert 2003.6.25
if( PNULL == param_ptr )
{
SCI_TRACE_HIGH("mmi_callback: the ponit of param is empty");
return;
}
// distinguish the different message type to set the signal_size and signal_code
switch(event_id)
{
// indicate that the MO call is delivered
case EV_MN_APP_CALL_START_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_START_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_START_IND,sizeof(MnCcCallStartIndS),&sendSignal);
sendSignal->sig.MnCcCallStartInd.call_id =((APP_MN_CALL_START_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallStartInd.called_num =((APP_MN_CALL_START_IND_T*)param_ptr)->called_num;
MmiSendSignal(task_id,sendSignal);
break;
// the remote user is alerting
case EV_MN_APP_ALERTING_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_ALERTING_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_ALERTING_IND,sizeof(MnCcCallAlertingIndS),&sendSignal);
sendSignal->sig.MnCcCallAlertingInd.call_id =((APP_MN_ALERTING_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallAlertingInd.alerting_type =((APP_MN_ALERTING_IND_T*)param_ptr)->alerting_type;
MmiSendSignal(task_id,sendSignal);
break;
// The MT call has been setuped completely
case EV_MN_APP_SETUP_COMPLETE_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_SETUP_COMPLETE_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_SETUP_COMPLETE_IND,sizeof(MnCcSetupCompleteIndS),&sendSignal);
sendSignal->sig.MnCcSetupCompleteInd.call_id =((APP_MN_SETUP_COMPLETE_IND_T*)param_ptr)->call_id;
MmiSendSignal(task_id,sendSignal);
break;
// The MO call has been setuped completely
case EV_MN_APP_SETUP_COMPLETE_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_SETUP_COMPLETE_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_SETUP_COMPLETE_CNF,sizeof(MnCcSetupCompleteCnfS),&sendSignal);
sendSignal->sig.MnCcSetupCompleteCnf.call_id =((APP_MN_SETUP_COMPLETE_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcSetupCompleteCnf.connected_num_present =((APP_MN_SETUP_COMPLETE_CNF_T*)param_ptr)->connected_num_present;
sendSignal->sig.MnCcSetupCompleteCnf.connected_num =((APP_MN_SETUP_COMPLETE_CNF_T*)param_ptr)->connected_num;
sendSignal->sig.MnCcSetupCompleteCnf.connected_sub_addr_present =((APP_MN_SETUP_COMPLETE_CNF_T*)param_ptr)->connected_sub_addr_present;
sendSignal->sig.MnCcSetupCompleteCnf.connected_sub_addr =((APP_MN_SETUP_COMPLETE_CNF_T*)param_ptr)->connected_sub_addr;
MmiSendSignal(task_id,sendSignal);
break;
// the current call has been disconnected
case EV_MN_APP_CALL_DISCONNECTED_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_DISC_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_DISCONNECTED_IND,sizeof(MnCcCallDisconnectdIndS),&sendSignal);
sendSignal->sig.MnCcCallDisconnectdInd.call_id =((APP_MN_CALL_DISCONNECTED_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallDisconnectdInd.disconnected_cause =((APP_MN_CALL_DISCONNECTED_IND_T*)param_ptr)->disconnected_cause;
MmiSendSignal(task_id,sendSignal);
break;
// There is an error
case EV_MN_APP_CALL_ERR_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_ERR_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_ERR_IND,sizeof(MnCcCallErrIndS),&sendSignal);
sendSignal->sig.MnCcCallErrInd.call_id =((APP_MN_CALL_ERR_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallErrInd.error_cause =((APP_MN_CALL_ERR_IND_T*)param_ptr)->error_cause;
MmiSendSignal(task_id,sendSignal);
break;
// indicate that an incoming call is present
case EV_MN_APP_SETUP_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_SETUP_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_SETUP_IND,sizeof(MnCcSetupIndS),&sendSignal);
sendSignal->sig.MnCcSetupInd.call_id =((APP_MN_SETUP_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcSetupInd.calling_num_present =((APP_MN_SETUP_IND_T*)param_ptr)->calling_num_present;
sendSignal->sig.MnCcSetupInd.calling_num =((APP_MN_SETUP_IND_T*)param_ptr)->calling_num;
sendSignal->sig.MnCcSetupInd.calling_sub_addr_present =((APP_MN_SETUP_IND_T*)param_ptr)->calling_sub_addr_present;
sendSignal->sig.MnCcSetupInd.calling_sub_addr =((APP_MN_SETUP_IND_T*)param_ptr)->calling_sub_addr;
MmiSendSignal(task_id,sendSignal);
break;
// indicate that the request of holding was accepted or reject by network.
case EV_MN_APP_HELD_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_HOLD_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_HELD_CNF,sizeof(MnCcCallHeldCnfS),&sendSignal);
sendSignal->sig.MnCcCallHeldCnf.call_id =((APP_MN_CALL_HELD_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallHeldCnf.req_is_accepted =((APP_MN_CALL_HELD_CNF_T*)param_ptr)->req_is_accepted;
MmiSendSignal(task_id,sendSignal);
break;
// indicate that the request of retrieving was accepted or rejected by network
case EV_MN_APP_RETRIEVED_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_RETRIEVED_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_RETRIEVED_CNF,sizeof(MnCcCallRetrievedCnfS),&sendSignal);
sendSignal->sig.MnCcCallRetrievedCnf.call_id =((APP_MN_CALL_RETRIEVED_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallRetrievedCnf.req_is_accepted =((APP_MN_CALL_RETRIEVED_CNF_T*)param_ptr)->req_is_accepted;
MmiSendSignal(task_id,sendSignal);
break;
// The TCH channel has been allocated to the local user
case EV_MN_APP_SYNC_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_SYNC_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_SYNC_IND,sizeof(MnCcSyncIndS),&sendSignal);
sendSignal->sig.MnCcSyncInd.channel_mode =((APP_MN_SYNC_IND_T*)param_ptr)->channel_mode;
sendSignal->sig.MnCcSyncInd.sync_cause =((APP_MN_SYNC_IND_T*)param_ptr)->sync_cause;
MmiSendSignal(task_id,sendSignal);
break;
// indicate that the call is progress in the network.
case EV_MN_APP_PROGRESS_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_PROGRESS_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_PROGRESS_IND,sizeof(MnCcProgressIndS),&sendSignal);
sendSignal->sig.MnCcProgressInd.call_id =((APP_MN_PROGRESS_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcProgressInd.progress_ind =((APP_MN_PROGRESS_IND_T*)param_ptr)->progress_ind;
MmiSendSignal(task_id,sendSignal);
break;
// The remote user transfer the USER-USER information to the local user
case EV_MN_APP_USERTOUSER_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_USER_TO_USER_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_USER_TO_USER_IND,sizeof(MnCcUserToUserIndS),&sendSignal);
sendSignal->sig.MnCcUserToUserInd.call_id =((APP_MN_USER_TO_USER_IND_T*)param_ptr)->call_id;
sendSignal->sig.MnCcUserToUserInd.user_to_user =((APP_MN_USER_TO_USER_IND_T*)param_ptr)->user_to_user;
MmiSendSignal(task_id,sendSignal);
break;
// indicate that the network has accepted the local user's MODIFY requestion
case EV_MN_APP_MODIFY_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_MODIFY_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_MODIFY_CNF,sizeof(MnCcCallModifyCnfS),&sendSignal);
sendSignal->sig.MnCcCallModifyCnf.call_id =((APP_MN_CALL_MODIFY_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcCallModifyCnf.req_is_accepted =((APP_MN_CALL_MODIFY_CNF_T*)param_ptr)->req_is_accepted;
sendSignal->sig.MnCcCallModifyCnf.direction_is_reverse =((APP_MN_CALL_MODIFY_CNF_T*)param_ptr)->direction_is_reverse;
MmiSendSignal(task_id,sendSignal);
break;
// the communication time has equal or great the maxACM value
case EV_MN_APP_ACMMAX_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_ACMMAX_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_ACMMAX_IND,sizeof(MnCcAcmmaxIndS),&sendSignal);
MmiSendSignal(task_id,sendSignal);
break;
// indicate the network accepted the START DTMF or not
case EV_MN_APP_START_DTMF_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_START_DTMF_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_START_DTMF_CNF,sizeof(MnCcStartDtmfCnfS),&sendSignal);
sendSignal->sig.MnCcStartDtmfCnf.call_id =((APP_MN_START_DTMF_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcStartDtmfCnf.req_is_accepted =((APP_MN_START_DTMF_CNF_T*)param_ptr)->req_is_accepted;
sendSignal->sig.MnCcStartDtmfCnf.dtmf_key =((APP_MN_START_DTMF_CNF_T*)param_ptr)->dtmf_key;
MmiSendSignal(task_id,sendSignal);
break;
// indicate the network accepted the STOP DTMF or not.
case EV_MN_APP_STOP_DTMF_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_STOP_DTMF_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_STOP_DTMF_CNF,sizeof(MnCcStopDtmfCnfS),&sendSignal);
sendSignal->sig.MnCcStopDtmfCnf.call_id =((APP_MN_STOP_DTMF_CNF_T*)param_ptr)->call_id;
MmiSendSignal(task_id,sendSignal);
break;
// indicate the remote user has waited the current call entity
case EV_MN_APP_CALL_WAIT_IND_F:
SCI_TRACE_LOW("MN: Send APP_MN_CALL_WAIT_IND to MMI client\n");
MmiCreateSignal(SIG_APP_MN_CALL_WAIT_IND,sizeof(MnCcCallWaitIndS),&sendSignal);
sendSignal->sig.MnCcCallWaitInd.call_id =((APP_MN_CALL_WAIT_IND_T*)param_ptr)->call_id;
MmiSendSignal(task_id,sendSignal);
break;
// indicate the network has accepted or rejected the request of BUILD MPTY
case EV_MN_APP_BUILD_MPTY_CNF_F:
SCI_TRACE_LOW("MN: Send APP_MN_BUILD_MPTY_CNF to MMI client\n");
MmiCreateSignal(SIG_APP_MN_BUILD_MPTY_CNF,sizeof(MnCcBuildMptyCnfS),&sendSignal);
sendSignal->sig.MnCcBuildMptyCnf.call_id =((APP_MN_BUILD_MPTY_CNF_T*)param_ptr)->call_id;
sendSignal->sig.MnCcBuildMptyCnf.req_is_accepted =((APP_MN_BUILD_MPTY_CNF_T*)param_ptr)->req_is_accepted;
MmiSendSignal(task_id,sendSignal);
break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -