📄 outgoingcallhelper.c
字号:
* PsCBackOutgoingCallEnded
* DESCRIPTION
* Call Back function for ATH_SUCCESS to hangup outgoing call
*
* ATH_RSP from PS
* PARAMETERS
* MsgStruct [?]
* expected(?) [IN] NULL
* RETURNS
* void
*****************************************************************************/
void PsCBackOutgoingCallEnded(void *MsgStruct)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
CM_CALL_HANDLE handle;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
mmi_jdd_tapi_make_call_result(JC_ERR_UNKNOWN);
#endif
SetCallAbortReqSentFlag(FALSE);
if (GetCurrentState() == CM_IDLE_STATE)
{
PRINT_INFORMATION(("XXX - In PsCBackOutgoingCallEnded no call to drop XXX\n"));
/* SetDropRequestFlag(FALSE); */
return;
}
if ((handle = GetOutgoingCallHandle()) == -1)
{
/* MO call already got connected before it's aborted */
handle = GetHungUpHandle();
if (handle == -1)
{
PRINT_INFORMATION(("XXX - In PsCBackOutgoingCallEnded call already dropped XXX\n"));
return;
}
}
OutgoingProcessCMEvent(CM_PS_HANGUPSUC, (void*)&handle);
SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
}
/*****************************************************************************
* FUNCTION
* PsCBackUSSDResponse
* DESCRIPTION
* This function is called back by the protocol stack when USSD data is recieved by n/w
*
* info is
* PARAMETERS
* info [?]
* RETURNS
* void
*****************************************************************************/
void PsCBackUSSDResponse(void *info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
PRINT_INFORMATION(("XXX - In PsCBackUSSDResponse XXX\n"));
OutgoingProcessCMEvent(CM_PS_USSD_RECVD, info);
/* ProcessIncomingEvents (CM_PS_USSD_RECVD, info); */
}
/* Start by Julia: Drop call refinement */
/*****************************************************************************
* FUNCTION
* ReleaseCall
* DESCRIPTION
* Invokes the helper function to make the disconnecting call released complete
*
* This is invoked whenever the user press END key in the disconnecting call screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void ReleaseCall(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 count;
CM_CALL_HANDLE handle;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (count = 0; count < MAX_CALLS; count++)
{
if (cm_p->state_info.AllCalls[count].curr_state == CM_DISCONNECTING_STATE)
{
handle = cm_p->state_info.AllCalls[count].call_handle;
MakePsReleaseCompleteRequest(handle);
OutgoingProcessCMEvent(CM_PS_HANGUPSUC, (void*)&handle);
if (GetAutoReleaseFlag() == FALSE)
{
return;
}
}
}
SetAutoReleaseFlag(FALSE);
}
/* End by Julia */
/*****************************************************************************
* FUNCTION
* DropRequest
* DESCRIPTION
* Invokes the helper function to hangup or disconnect the call
* which is yet to connect.
*
* This is invoked whenever the User press LSK in the outgoingcallscreen.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void DropRequest(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
CM_CALL_HANDLE handle;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
PRINT_INFORMATION(("*** In Drop Request\n"));
if (GetNotifySSFlag())
{
StopTimer(CM_NOTIFYDURATION_TIMER);
}
if (FALSE == GetAbortCallRequestedFlag())
{
handle = GetOutgoingCallHandle();
if ((GetCallflag(handle, TRUE) & CM_HANGUP_REQUESTED) == 0)
{
SetDropRequestFlag(TRUE);
SetAbortCallRequestedFlag(TRUE);
HangupCall(handle);
if (GetExitScrnID() == SCR1001_CM_OUTGOINGCALLSCREEN)
{
MOMTHideAnimation();
}
}
}
else
{
PRINT_INFORMATION(("*** In DropRequest .. Not calling drop\n"));
}
}
/*****************************************************************************
* FUNCTION
* HangupCall
* DESCRIPTION
* Helper function to generate Keybrd Event CM_KB_HANGUPREQ with the OUTGOING_CALL structure.
*
* This invokes the function to process the CM_KB_HANGUPREQ event in the state m/c.
* PARAMETERS
* CallHandle [IN]
* contains(?) [IN] The call handle of the call that needs to be dropped.
* RETURNS
* void
*****************************************************************************/
void HangupCall(CM_CALL_HANDLE CallHandle)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
PRINT_INFORMATION(("*** In HangupCall\n"));
OutgoingProcessCMEvent(CM_KB_HANGUPREQ, &CallHandle);
}
/*****************************************************************************
* FUNCTION
* HangupReqSucess
* DESCRIPTION
* Helper function to Generate CM known Stack Event CM_PS_HANGUPSUC
* with the Structure containing CM_CALL_HANDLE.
*
* We are assuming that the protocol stack sends the sucess response for the hangup request
* with the CM_CALL_HANDLE. CHLD RELEASE_SPECIFIC => RELEASE_IND from PS
* PARAMETERS
* MsgStruct [?]
* This(?) [IN] Contains CM_CALL_HANDLE passed by the stack when call drop is success)
* RETURNS
* void
*****************************************************************************/
void HangupReqSucess(void *MsgStruct)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
CM_CALL_HANDLE handle;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
PRINT_INFORMATION(("XXX - In HangupReqSucess XXX\n"));
handle = DeriveCallHandle(MsgStruct);
OutgoingProcessCMEvent(CM_PS_HANGUPSUC, (void*)&handle);
SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
}
/*****************************************************************************
* FUNCTION
* HangupAll
* DESCRIPTION
* Helper function to generate Keybrd Event CM_KB_HANGUPALLREQ with the NULL structure.
*
* This invokes the function to process the CM_KB_HANGUPALLREQ event in the state m/c.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void HangupAll(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U16 scrId;
U8 flag;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
flag = GetAllCallFlags();
#ifdef __MMI_CLAMSHELL__
if (GetCurrentState() == CM_INCOMING_STATE && GetTotalCallCount() > 1)
{
KbCBackCallIncomingRejected();
return;
}
#endif /* __MMI_CLAMSHELL__ */
if (GetTotalActiveCallCount() > 0 && GetTotalHoldCallCount() > 0 &&
((flag & CM_SWAP_REQUESTED) == 0) && ((flag & CM_CONF_REQUESTED) == 0) && ((flag & CM_ECT_REQUESTED) == 0))
{
/* swapping can't decide which call is active and held,
issue rel all req instead */
/* rel active and accept */
ProcessIncomingEvents(CM_KB_END_ALL_ACTIVE_RETRIEVE_HELD, NULL);
}
else
{
OutgoingProcessCMEvent(CM_KB_HANGUPALLREQ, (void*)NULL);
}
scrId = GetExitScrnID();
if (scrId == SCR1001_CM_OUTGOINGCALLSCREEN || (scrId == SCR_CM_ACTIVECALLSCREEN && GetTotalCallCount() == 1))
{
MOMTHideAnimation();
}
/* else
EntryScr1002ActiveCall(); */
}
/*****************************************************************************
* FUNCTION
* HangupallReqSucess
* DESCRIPTION
* Helper function to Generate CM known Stack Event CM_PS_HANGUPALLSUC
* with the Structure containing NULL.
*
* We are assuming that the protocol stack sends the Sucess response for the Hangup all calls request
* without any structure.
* PARAMETERS
* MsgStruct [?]
* This(?) [IN] Contains Null)
* RETURNS
* void
*****************************************************************************/
void HangupallReqSucess(void *MsgStruct)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gMyhandle = DeriveCallHandle(MsgStruct);
PRINT_INFORMATION(("XXX - In HangupallReqSucess XXX\n"));
OutgoingProcessCMEvent(CM_PS_HANGUPALLSUC, (void*)&gMyhandle);
SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
}
/*****************************************************************************
* FUNCTION
* HangupallActive
* DESCRIPTION
* Helper function to generate Keybrd Event CM_KB_HANGUPALLACTREQ with the NULL structure.
*
* This invokes the function to process the CM_KB_HANGUPALLACTREQ event in the state m/c.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void HangupallActive(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
OutgoingProcessCMEvent(CM_KB_HANGUPALLACTREQ, (void*)NULL);
}
/*****************************************************************************
* FUNCTION
* HangupallActReqSucess
* DESCRIPTION
* Helper function to Generate CM known Stack Event CM_PS_HANGUPALLACTSUC
* with the Structure containing NULL.
*
* We are assuming that the protocol stack sends the Sucess response for the Hangup all Active calls
* request without any structure.
* PARAMETERS
* MsgStruct [?]
* This(?) [IN] Contains Null)
* RETURNS
* void
*****************************************************************************/
void HangupallActReqSucess(void *MsgStruct)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gMyhandle = DeriveCallHandle(MsgStruct);
PRINT_INFORMATION(("XXX - In HangupallActReqSucess XXX\n"));
OutgoingProcessCMEvent(CM_PS_HANGUPALLACTSUC, (void*)&gMyhandle);
SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
}
/*****************************************************************************
* FUNCTION
* HangupallHeld
* DESCRIPTION
* Helper function to generate Keybrd Event CM_KB_HANGUPALLHLDREQ with the NULL structure.
*
* This invokes the function to process the CM_KB_HANGUPALLHLDREQ event in the state m/c.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void HangupallHeld(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
OutgoingProcessCMEvent(CM_KB_HANGUPALLHLDREQ, (void*)NULL);
}
/*****************************************************************************
* FUNCTION
* HangupallHldReqSucess
* DESCRIPTION
* Helper function to Generate CM known Stack Event CM_PS_HANGUPALLHLDSUC
* with the Structure containing NULL.
*
* We are assuming that the protocol stack sends the Sucess response for the Hangup all Held calls
* request without any structure.
* PARAMETERS
* MsgStruct [?]
* This(?) [IN] Contains Null)
* RETURNS
* void
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -