OutgoingCallManagement.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:201k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * FUNCTION
- * ProcessKBRetrieveReqEvent
- * DESCRIPTION
- * This is the function to process Keyboard(Request) Event CM_KB_RETRIEVEREQ.
- *
- * This Sets the flag CM_RETRIEVE_REQUESTED to all the held call
- * Invoke the protocol function irrespective of the state.
- * The chances of this being invoked in Idle or Active state is very less.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to NULL as the Retrieve is request on all held calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessKBRetrieveReqEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetChldReqSent() != CM_ACTION_NONE)
- {
- return CM_CALL_FAILURE;
- }
- flag = GetAllCallFlags();
- if (((flag & CM_SWAP_REQUESTED) != 0) ||
- ((flag & CM_CONF_REQUESTED) != 0) ||
- ((flag & CM_ECT_REQUESTED) != 0))
- {
- return CM_CALL_FAILURE;
- }
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n KBRetrieveReqEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n KBRetrieveReqEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- case CM_HOLD_STATE:
- SetRetrieveFlag();
- MakePsActiveHold((void*)RetrieveReqSucess);
- break;
- default:
- PRINT_INFORMATION(("n KBRetrieveReqEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessPSRetrieveSucEvent
- * DESCRIPTION
- * This is the function to process Protocol(Response) Event CM_PS_RETRIEVESUC.
- *
- * This resets the CM_RETRIEVE_REQUESTED flag & change the state of the call from
- * HOLD to ACTIVE if necessary it also changes the state of the State m/c.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Is Null as the request CM_KB_RETRIEVEREQ is on all Held/Hold calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessPSRetrieveSucEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n PSRetrieveSucEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n PSRetrieveSucEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- PRINT_INFORMATION(("n PSRetrieveSucEvent CM_INCOMING_STATE n"));
- MakeRetrieve();
- EntryScr1006NotifyRetrieveSucess();
- SetPreviousState(CM_ACTIVE_STATE);
- break;
- case CM_HOLD_STATE:
- case CM_ACTIVE_STATE:
- MakeRetrieve();
- EntryScr1006NotifyRetrieveSucess();
- if ((GetTotalCallCount() == GetTotalActiveCallCount()) && (GetTotalHoldCallCount() == 0))
- {
- SetPreviousState(GetCurrentState());
- SetCurrentState(CM_ACTIVE_STATE);
- }
- break;
- default:
- PRINT_INFORMATION(("n PSRetrieveSucEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessKBSwapReqEvent
- * DESCRIPTION
- * This is the function to process Keyboard(Request) Event CM_KB_SWAPREQ.
- *
- * This Sets the flag CM_SWAP_REQUESTED to all the calls
- * Invoke the protocol function irrespective of the state.
- * This is always Invoked in Active state.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to NULL as the Swap is requested on all calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessKBSwapReqEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- flag = GetAllCallFlags();
- if (GetChldReqSent() != CM_ACTION_NONE ||
- ((flag & CM_SWAP_REQUESTED) != 0) ||
- ((flag & CM_CONF_REQUESTED) != 0) ||
- ((flag & CM_ECT_REQUESTED) != 0))
- {
- return CM_CALL_FAILURE;
- }
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n KBSwapReqEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n KBSwapReqEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_HOLD_STATE:
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- SetSwapFlag();
- MakePsSwapCallRequest((void*)SwapReqSucess);
- break;
- default:
- PRINT_INFORMATION(("n KBSwapReqEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessPSSwapSucEvent
- * DESCRIPTION
- * This is the function to process Protocol(Response) Event CM_PS_SWAPSUC.
- *
- * This resets the CM_SWAP_REQUESTED flag & change the state of the call from
- * HOLD to ACTIVE & viceversa.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Is Null as the request CM_KB_SWAPREQ is on all calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessPSSwapSucEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetTotalCallCount() > 0)
- {
- SyncCallList();
- }
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n PSSwapSucEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n PSSwapSucEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- MakeSwap();
- // if (GetTotalActiveCallCount() + GetTotalHoldCallCount() == 1)
- // {
- // DeleteScreenIfPresent(ITEMSCR_INCOMING_CALL);
- // SetIncomingCallStateActive();
- // SetPreviousState (GetCurrentState());
- // SetCurrentState(CM_ACTIVE_STATE);
- // }
- EntryScr1007NotifySwapSucess();
- break;
- case CM_HOLD_STATE:
- MakeSwap();
- EntryScr1007NotifySwapSucess();
- break;
- case CM_ACTIVE_STATE:
- MakeSwap();
- EntryScr1007NotifySwapSucess();
- break;
- default:
- PRINT_INFORMATION(("n PSSwapSucEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessKBConfReqEvent
- * DESCRIPTION
- * This is the function to process Keyboard(Request) Event CM_KB_CONFREQ.
- *
- * This Sets the flag CM_CONF_REQUESTED to all the calls
- * Invoke the protocol function irrespective of the state.
- * This is always Invoked in Active state.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to NULL as the Conference is requested on all calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessKBConfReqEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- flag = GetAllCallFlags();
- if (((flag & CM_SWAP_REQUESTED) != 0) ||
- ((flag & CM_CONF_REQUESTED) != 0) ||
- ((flag & CM_ECT_REQUESTED) != 0))
- {
- return CM_CALL_FAILURE;
- }
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n KBConfReqEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n KBConfReqEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- SetConfFlag();
- MakePsConfCallRequest();
- break;
- case CM_HOLD_STATE:
- PRINT_INFORMATION(("n KBConfReqEvent CM_HOLD_STATE not handled still n"));
- break;
- default:
- PRINT_INFORMATION(("n KBConfReqEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessPSConfSucEvent
- * DESCRIPTION
- * This is the function to process Protocol(Response) Event CM_PS_CONFSUC.
- *
- * This resets the CM_CONF_REQUESTED flag & change the state of the all calls
- * to ACTIVE.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Is Null as the request CM_KB_CONFREQ is on all calls)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessPSConfSucEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n PSConfSucEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n PSConfSucEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- MakeConf();
- EntryScr1008NotifyConfSucess();
- break;
- case CM_HOLD_STATE:
- PRINT_INFORMATION(("n PSConfSucEvent CM_HOLD_STATE not handled still n"));
- break;
- default:
- PRINT_INFORMATION(("n PSConfSucEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessKBSplitReqEvent
- * DESCRIPTION
- * This is the function to process Keyboard(Request) Event CM_KB_SPLITREQ.
- *
- * This Sets the flag CM_SPLIT_REQUESTED to the particular call selected
- * from the group of active calls.
- * Invoke the protocol function irrespective of the state.
- * This is always Invoked in Active state.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to CM_CALL_HANDLE of the call to be splitted in the conference)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessKBSplitReqEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- CM_CALL_HANDLE callIndex;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memcpy((void*)&callIndex, MsgStruct, sizeof(CM_CALL_HANDLE));
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n KBSplitReqEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n KBSplitReqEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- if (GetTotalActiveCallCount() >= 2)
- {
- SetCallflag(callIndex, CM_SPLIT_REQUESTED, TRUE);
- MakePsSplitRequest(callIndex);
- }
- else
- {
- PRINT_INFORMATION(("n Not enuf calls to make a split request n"));
- }
- break;
- case CM_ACTIVE_STATE:
- if (GetTotalActiveCallCount() >= 2)
- {
- SetCallflag(callIndex, CM_SPLIT_REQUESTED, TRUE);
- MakePsSplitRequest(callIndex);
- }
- else
- {
- PRINT_INFORMATION(("n Not enuf calls to make a split request n"));
- }
- break;
- case CM_HOLD_STATE:
- PRINT_INFORMATION(("n KBSplitReqEvent CM_HOLD_STATE not handled still n"));
- break;
- default:
- PRINT_INFORMATION(("n KBSplitReqEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessPSSplitSucEvent
- * DESCRIPTION
- * This is the function to process Protocol(Response) Event CM_PS_SPLITSUC.
- *
- * This resets the CM_SPLIT_REQUESTED flag & change the state of that particular call to active
- * other calls states are changed to HOLD.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to CM_CALL_HANDLE of the call that requested CM_KB_SPLITREQ)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessPSSplitSucEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (GetCurrentState())
- {
- case CM_IDLE_STATE:
- PRINT_INFORMATION(("n PSSplitSucEvent CM_IDLE_STATE not handled still n"));
- break;
- case CM_OUTGOING_STATE:
- PRINT_INFORMATION(("n PSSplitSucEvent CM_OUTGOING_STATE not handled still n"));
- break;
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- MakeSplitSucess();
- EntryScr1010NotifySplitSucess();
- break;
- case CM_HOLD_STATE:
- PRINT_INFORMATION(("n PSSplitSucEvent CM_HOLD_STATE not handled still n"));
- break;
- default:
- PRINT_INFORMATION(("n PSSplitSucEvent CM State m/c Corrupted n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessKBEctReqEvent
- * DESCRIPTION
- * This is the function to process Keyboard(Request) Event CM_KB_HANGUPREQ.
- *
- * This Sets the flag CM_HANGUP_REQUESTED and invoke the protocol function irrespective of the state.
- * The chances of this being invoked in idle state is very less.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * this(?) [IN] Points to CM_CALL_HANDLE of the call to get dropped)
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessKBEctReqEvent(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- flag = GetAllCallFlags();
- if (((flag & CM_SWAP_REQUESTED) != 0) ||
- ((flag & CM_CONF_REQUESTED) != 0) ||
- ((flag & CM_ECT_REQUESTED) != 0))
- {
- return CM_CALL_FAILURE;
- }
- switch (GetCurrentState())
- {
- case CM_OUTGOING_STATE:
- if (GetTotalActiveCallCount() == 1 || GetTotalHoldCallCount() == 1)
- {
- S16 index;
- index = GetOutgoingCallIndex();
- if (index == -1)
- {
- break;
- }
- SetCallflag(index, CM_ECT_REQUESTED, FALSE);
- MakePsEctRequest();
- }
- else
- {
- PRINT_INFORMATION(("n Not Enuf Calls to make transfer n"));
- }
- break;
- case CM_INCOMING_STATE:
- case CM_ACTIVE_STATE:
- case CM_HOLD_STATE:
- if (GetTotalActiveCallCount() == 1 && GetTotalHoldCallCount() == 1)
- {
- S16 index;
- index = GetActiveCallIndex();
- if (index == -1)
- {
- break;
- }
- SetCallflag(index, CM_ECT_REQUESTED, FALSE);
- MakePsEctRequest();
- }
- else
- {
- PRINT_INFORMATION(("n Not Enuf Calls to make transfer n"));
- }
- break;
- default:
- PRINT_INFORMATION(("n ECT Default does not exit n"));
- return CM_CALL_FAILURE;
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessPSEctSuccessful
- * DESCRIPTION
- * This is the function to process Protocol(Response) Event CM_PS_ECT_SUCCESS.
- * PARAMETERS
- * MsgStruct [?]
- * ACTION_RESULT(?) [OUT]
- * RETURNS
- * This returns CM_CALL_SUCCESS if success or CM_CALL_FAILURE if failure.
- *****************************************************************************/
- ACTION_RESULT ProcessPSEctSuccessful(void *MsgStruct)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 count;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("XXX - In ProcessPSEctSuccessful XXXn"));
- /* only active mpty can be split */
- for (count = 0; count < MAX_CALLS; count++)
- {
- if (cm_p->state_info.AllCalls[count].status_flag & CM_ECT_REQUESTED)
- {
- ResetCallflag(count, CM_ECT_REQUESTED, FALSE);
- }
- }
- return CM_CALL_SUCCESS;
- }
- /*****************************************************************************
- * FUNCTION
- * PsCBackCallDeflected
- * DESCRIPTION
- * This function is called back by the protocol stack when the
- * Incoming Call is deflected
- * PARAMETERS
- * info [?]
- * RETURNS
- * void
- *****************************************************************************/
- void PsCBackCallDeflected(void *info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 result;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (CheckCallDeflectSuccess(info, &result))
- {
- PRINT_INFORMATION(("XXX - In PsCBackCallDeflected XXXn"));
- OutgoingProcessCMEvent(CM_PS_INCOMING_CALL_DEFLECT, info);
- /* ProcessIncomingEvents (CM_PS_INCOMING_CALL_DEFLECT, info); */
- }
- else
- {
- PRINT_INFORMATION(("XXX - FAILED FAILED FAILED In PsCBackCallDeflected XXXn"));
- ProcessIncomingFailureEvents(CM_PS_INCOMING_CALL_DEFLECT, result);
- DeleteUptoScrID(ITEMSCR_INCOMING_CALL);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EndSingleAndGoBack
- * DESCRIPTION
- * This function display the list of active and held calls
- * to choose the call that needs to be ended.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EndSingleAndGoBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 dummy;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gcallListlen = GetAllDispNameorNum(gcallList, gcallListImage, NULL, &dummy);
- if (gcallListlen != GetTotalActiveCallCount() + GetTotalHoldCallCount())
- {
- PRINT_INFORMATION(("nFatal Error in CM Call Structure 4n"));
- }
- gListOperation = 1;
- EntryScr1009CallListScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * EndSingleActiveAndGoBack
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EndSingleActiveAndGoBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gcallListlen = GetAllActDispNameorNum(gcallList);
- gListOperation = 1;
- EntryScr1009CallListScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * SplitAndGoBack
- * DESCRIPTION
- * This function display the list of active call
- * to choose the call that needs to be splitted.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SplitAndGoBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gcallListlen = GetAllActDispNameorNum(gcallList);
- if (gcallListlen != GetTotalActiveCallCount())
- {
- PRINT_INFORMATION(("nFatal Error in CM Call Structure 4n"));
- }
- gListOperation = 2;
- EntryScr1009CallListScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * SetCurrHiliteCall
- * DESCRIPTION
- * This is the hilite handler for the gcallList listview displayed.
- *
- * gHilitedCall will be updated by this function
- * PARAMETERS
- * hiliteIndex [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCurrHiliteCall(S32 hiliteIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- CM_CALL_HANDLE temp;
- S16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gHilitedCall = (U16) hiliteIndex;
- temp = GetCallHandle(gcallList[gHilitedCall]);
- if (temp > 0)
- {
- Cat19UpdateDuration(GetCallStartTime (temp));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * GetCurrStartCallTime
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- MYTIME *GetCurrStartCallTime(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- CM_CALL_HANDLE temp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- temp = GetCallHandle(gcallList[gHilitedCall]);
- if (temp > 0)
- {
- return GetCallStartTime (temp);
- }
- return NULL;
- }
- /*****************************************************************************
- * FUNCTION
- * HangupHilited
- * DESCRIPTION
- * Hangup the selected or hilted call
- *
- * this function converts the index to callhandle
- * and invoke the hangup
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HangupHilited(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- CM_CALL_HANDLE temp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- temp = GetCallHandle(gcallList[gHilitedCall]);
- HangupCall(temp);
- }
- /*****************************************************************************
- * FUNCTION
- * SplitHilited
- * DESCRIPTION
- * Split the selected or hilted call
- *
- * this function converts the index to callhandle
- * and invoke the Splitcall
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SplitHilited(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- CM_CALL_HANDLE temp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- temp = GetCallHandle(gcallList[gHilitedCall]);
- SplitCall(temp);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1009CallListScreen
- * DESCRIPTION
- * display the list of strings stored by gcallList
- *
- * The gcallList can contain the list of active or held calls
- * depending on the scenario the LSK operation is also depending on
- * gListOperation.If gListOperation==1 then operation is HANGUP request.
- * If gListOperation==2 then the operation is SPLIT.
- * PARAMETERS
- * void
- * gListOperation(?) [IN] GcallList,gcallListlen global variables filled by other function
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1009CallListScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR1009_CM_CALLLISTSCREEN, NULL, EntryScr1009CallListScreen, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR1009_CM_CALLLISTSCREEN);
- SetParentHandler(0);
- RegisterHighlightHandler(SetCurrHiliteCall);
- ShowCategory6Screen(
- STR_SCR1009_CAPTION,
- IMG_SCR1009_CAPTION,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- gcallListlen,
- gcallList,
- NULL,
- 0,
- guiBuffer);
- if (gListOperation == 1)
- {
- SetLeftSoftkeyFunction(HangupHilited, KEY_EVENT_UP);
- }
- else if (gListOperation == 2)
- {
- SetLeftSoftkeyFunction(SplitHilited, KEY_EVENT_UP);
- }
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1001OutgoingCall
- * DESCRIPTION
- * Shows the outgoing call screen
- *
- * This is invoked whenever the User requests for a outgoing call.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1001OutgoingCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 dispname;
- /* PU8 guiBuffer; */
- S8 *imgPath = NULL;
- U8 *IPNum = NULL;
- U16 nOutGoingImgId = 0;
- PHB_CM_INTERFACE *PhoneNumberStruct;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** In EntryScr1001OutgoingCall n"));
- TurnOnBacklight(1);
- SetCbackAfterSS(NULL);
- SetAbortCallRequestedFlag(FALSE);
- SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
- SetCMScrnFlag(TRUE);
- dispname = GetDispNameorNum();
- EntryNewScreen(SCR1001_CM_OUTGOINGCALLSCREEN, ExitScr1001OutgoingCall, NULL, NULL);
- /* guiBuffer = GetCurrGuiBuffer(SCR1001_CM_OUTGOINGCALLSCREEN); */
- PhoneNumberStruct = GetCMPhoneBookStruct();
- nOutGoingImgId = PhoneNumberStruct->pictureId;
- if (nOutGoingImgId == IMG_PHB_DEFAULT)
- {
- nOutGoingImgId = IMG_CM_STATE_OUTGOING;
- }
- UnicodeToAnsii((PS8) subMenuDataPtrs[0], (PS8) PhoneNumberStruct->name);
- UnicodeToAnsii((PS8) subMenuDataPtrs[1], (PS8) PhoneNumberStruct->number);
- UnicodeToAnsii((PS8) subMenuDataPtrs[2], (PS8) dispname);
- PRINT_INFORMATION(("*** In EntryScr1001OutgoingCall, name=%s, number=%sn", subMenuDataPtrs[0],
- subMenuDataPtrs[1]));
- PRINT_INFORMATION(("*** In EntryScr1001OutgoingCall, display name=%sn", subMenuDataPtrs[2]));
- #if defined(__MMI_PHB_CALL_SHOW_PICTURE_FROM_FILE__)
- if (nOutGoingImgId == 1)
- {
- /* use file image */
- imgPath = mmi_phb_image_get_path_from_id(PhoneNumberStruct->record_index);
- if (imgPath == NULL)
- {
- nOutGoingImgId = IMG_CM_STATE_OUTGOING;
- }
- }
- #endif /* defined(__MMI_PHB_CALL_SHOW_PICTURE_FROM_FILE__) */
- /* if(nOutGoingImgId==IMG_PHB_DEFAULT || ((nOutGoingImgId == 1) && imgPath == NULL))
- nOutGoingImgId=GetImgIdofState(CM_OUTGOING_STATE); //needs to be changed later. */
- /* Start by Julia: Drop call refinement */
- /* if (GetDisconnectingCallHandle() != -1)
- nOutGoingImgId=GetImgIdofState(CM_DISCONNECTING_STATE); */
- /* End by Julia */
- #ifdef __IP_NUMBER__
- if (GetTempUseIPNumber() == TRUE)
- {
- IPNum = (U8*) GetCurrIPNumberUCS2();
- }
- #endif /* __IP_NUMBER__ */
- if (GetTotalCallCount() > 1)
- {
- /* more than one call */
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() != -1)
- {
- if (nOutGoingImgId == 1)
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- 0,
- 0,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- IMG_CM_STATE_OUTGOING,
- imgPath,
- TRUE,
- NULL);
- }
- else
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- 0,
- 0,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- nOutGoingImgId,
- NULL,
- TRUE,
- NULL);
- }
- }
- else
- /* End by Julia */
- {
- if (nOutGoingImgId == 1)
- {
- ShowCategory18Screen(
- 0,
- STR_GLOBAL_OPTIONS,
- IMG_SCR1001_LSK,
- STR_GLOBAL_ABORT,
- IMG_SCR1001_RSK,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- IMG_CM_STATE_OUTGOING,
- imgPath,
- FALSE,
- NULL);
- }
- else
- {
- ShowCategory18Screen(
- 0,
- STR_GLOBAL_OPTIONS,
- IMG_SCR1001_LSK,
- STR_GLOBAL_ABORT,
- IMG_SCR1001_RSK,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- nOutGoingImgId,
- NULL,
- FALSE,
- NULL);
- }
- }
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() != -1)
- {
- SetKeyHandler(ReleaseCall, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- else
- /* End by Julia */
- {
- SetLeftSoftkeyFunction(EntryScrOutgoingMultipleOptions, KEY_EVENT_UP);
- SetRightSoftkeyFunction(DropRequest, KEY_EVENT_UP);
- SetKeyHandler(HangupAll, KEY_END, KEY_EVENT_DOWN);
- }
- if (!EmergencyCallPresent())
- {
- SetGroupKeyHandler(
- EnterScreenAndHandleDigit,
- (PU16) CMIdleScreenDigits,
- MAX_CM_SCREEN_DIGITS - 1,
- KEY_EVENT_DOWN);
- }
- }
- else
- {
- /* only one call */
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() != -1)
- {
- if (nOutGoingImgId == 1)
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- 0,
- 0,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- IMG_CM_STATE_OUTGOING,
- imgPath,
- TRUE,
- NULL);
- }
- else
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- 0,
- 0,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- nOutGoingImgId,
- NULL,
- TRUE,
- NULL);
- }
- }
- else
- {
- /* End by Julia */
- if (nOutGoingImgId == 1)
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- STR_GLOBAL_ABORT,
- IMG_SCR1001_RSK,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- IMG_CM_STATE_OUTGOING,
- imgPath,
- FALSE,
- NULL);
- }
- else
- {
- ShowCategory18Screen(
- 0,
- 0,
- 0,
- STR_GLOBAL_ABORT,
- IMG_SCR1001_RSK,
- STR_SCR1001_RUNNING,
- dispname,
- IPNum,
- 0,
- nOutGoingImgId,
- NULL,
- FALSE,
- NULL);
- }
- }
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() != -1)
- {
- SetKeyHandler(ReleaseCall, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- else
- /* End by Julia */
- {
- SetRightSoftkeyFunction(DropRequest, KEY_EVENT_UP);
- SetKeyHandler(DropRequest, KEY_END, KEY_EVENT_DOWN);
- }
- if (GetSpeechFlag())
- {
- SetGroupKeyHandler(
- EnterScreenAndHandleDigit,
- (PU16) CMIdleScreenDigits,
- MAX_CM_SCREEN_DIGITS - 1,
- KEY_EVENT_DOWN);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) && !(defined __MMI_TOUCH_IDLESCREEN_SHORTCUTS__)) /* PMT MANISH 20050623 */
- EnableCenterSoftkey(0, IMG_CSK_DIAL_ICON);
- SetCenterSoftkeyFunction(EnterScreenAndHandleDigit, KEY_EVENT_UP);
- redraw_center_softkey();
- #endif
- }
- }
- gdispnameForSubLCD = dispname;
- ShowSubLCDScreen(EntrySubLcdScr1001OutgoingCall);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScr1001OutgoingCall
- * DESCRIPTION
- * Typical exit screen to add the history variable of the screen.
- *
- * Updates the history variables of the screen.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScr1001OutgoingCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetCurrentState() == CM_OUTGOING_STATE)
- {
- history Scr1001;
- S16 nHistory = 0;
- Scr1001.scrnID = SCR1001_CM_OUTGOINGCALLSCREEN;
- Scr1001.entryFuncPtr = EntryScr1001OutgoingCall;
- pfnUnicodeStrcpy((S8*) Scr1001.inputBuffer, (S8*) & nHistory);
- GetCategoryHistory(Scr1001.guiBuffer);
- AddHistory(Scr1001);
- }
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) && !(defined __MMI_TOUCH_IDLESCREEN_SHORTCUTS__)) /* PMT MANISH 20050623 */
- ResetCenterSoftkey();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * EntrySubLcdScr1001OutgoingCall
- * DESCRIPTION
- * Entry screen for Sub Lcd OutGoing Call
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntrySubLcdScr1001OutgoingCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- ShowCategory311Screen(gdispnameForSubLCD, IMG_CM_SUBLCD_CALLING, NULL);
- SetSubLCDExitHandler(ExitSubLcdScr1001OutgoingCall);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLcdScr1001OutgoingCall
- * DESCRIPTION
- * Exit Handler for Sub Lcd OutGoing Call Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLcdScr1001OutgoingCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetCurrentState() == CM_OUTGOING_STATE && !IsSubLCDScreenPresent(SUB_LCD_SCR1001_CM_OUTGOINGCALLSCREEN))
- {
- SubLCDHistoryNode SubLCDHistory;
- SubLCDHistory.entryFuncPtr = EntrySubLcdScr1001OutgoingCall;
- AddSubLCDHistoryWithScrID(&SubLCDHistory, SUB_LCD_SCR1001_CM_OUTGOINGCALLSCREEN);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrOutgoingMultipleOptions
- * DESCRIPTION
- * This function is the entry screen for the outgoing call
- * option menu when there are more than one calls
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrOutgoingMultipleOptions(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- static U8 *PopUpList[10];
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nStrItemList[10]; /* Stores the strings id of submenus returned */
- U16 menuId;
- S16 nActiveCall;
- U16 nHeldCall;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- nActiveCall = GetTotalActiveCallCount();
- nHeldCall = GetTotalHoldCallCount();
- if (GetIncomingCallHandle() == -1)
- {
- /* no waiting call */
- if (nActiveCall == 1 && nHeldCall == 0)
- {
- menuId = MITEM2008_CM_WAIT_ACT_LSKOPTIONS;
- }
- else if (nActiveCall == 0 && nHeldCall == 1)
- {
- menuId = MITEM2008_CM_WAIT_S_HOLD_LSKOPTIONS;
- }
- else if (nActiveCall > 1 && nHeldCall == 0)
- {
- menuId = MITEM2008_CM_WAIT_MACT_LSKOPTIONS;
- }
- else if (nActiveCall == 0 && nHeldCall > 1)
- {
- menuId = MITEM2008_CM_WAIT_M_HOLD_LSKOPTIONS;
- }
- else
- {
- return;
- }
- }
- else
- {
- /* waiting call present */
- if (nActiveCall == 1 && nHeldCall == 0)
- {
- menuId = MITEM2008_CM_INC_ACT_LSKOPTIONS;
- }
- else if (nActiveCall == 0 && nHeldCall == 1)
- {
- menuId = MITEM2008_CM_INC_S_HOLD_LSKOPTIONS;
- }
- else if (nActiveCall > 1 && nHeldCall == 0)
- {
- menuId = MITEM2008_CM_INC_MACT_LSKOPTIONS;
- }
- else if (nActiveCall == 0 && nHeldCall > 1)
- {
- menuId = MITEM2008_CM_INC_M_HOLD_LSKOPTIONS;
- }
- else
- {
- /* 1 MO + 1 waiting */
- menuId = MITEM2008_CM_INC_LSKOPTIONS;
- }
- }
- EntryNewScreen(ITEM_SCR_OUT_WAIT_HOLD_OPN, NULL, EntryScrOutgoingMultipleOptions, NULL);
- SetCMScrnFlag(TRUE);
- guiBuffer = GetCurrGuiBuffer(ITEM_SCR_OUT_WAIT_HOLD_OPN);
- SetParentHandler(menuId);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- nNumofItem = GetNumOfChild(menuId);
- GetSequenceStringIds(menuId, nStrItemList);
- ConstructHintsList(menuId, PopUpList);
- ShowCategory55Screen(
- STR_SCR1002_CAPTION,
- IMG_SCR1002_CAPTION,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- nStrItemList,
- (U8 **) PopUpList,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(HangupAll, KEY_END, KEY_EVENT_DOWN);
- SetSideVolumeKeysForCM();
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1002ActiveCall
- * DESCRIPTION
- * This displays the list of active/Held calls or the single active/held call.
- *
- * This is the sort of base screen after processing the response events.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1002ActiveCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetCbackAfterSS(NULL);
- if (GetNotifySSFlag())
- {
- PRINT_INFORMATION((" XXX EntryScr1002ActiveCall: Notify Flag Set XXXn"));
- /* between call connected (MO or MT) and get time rsp to show active call screen,
- if the call is dropped, we stilll need to log the call as connected. */
- if (GetCallHandleForStartTimeUpdate())
- {
- MYTIME t;
- DTGetRTCTime(&t);
- UpdateCallStartTimeAndLogCall(GetCallHandleForStartTimeUpdate(), &t);
- SetCallHandleForStartTimeUpdate(0);
- }
- SetCbackAfterSS((FuncPtr) EntryScr1002ActiveCall);
- return;
- }
- #ifdef __CTM_SUPPORT__
- if (ctm_p->state == MMI_CTM_STATE_CONNECTED)
- {
- entry_ctm_talking();
- return;
- }
- #endif /* __CTM_SUPPORT__ */
- if (GetExitScrnID() != SCR_CM_ACTIVECALLSCREEN)
- {
- EntryNewScreen(SCR_CM_ACTIVECALLSCREEN, NULL, NULL, NULL);
- ShowCategoryDummyScreen();
- }
- ReplaceNewScreenHandler(SCR_CM_ACTIVECALLSCREEN, NULL, EntryScr1002ActiveCall);
- SetTransitionToActiveFlag(TRUE);
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- if (is_redrawing_old_screens())
- {
- MYTIME curtime;
- DTGetRTCTime(&curtime);
- DummyScr1002ActiveCall(&curtime);
- }
- else
- #endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */
- CMGetExactTime(DummyScr1002ActiveCall);
- }
- //jerson add begin 20070622
- #ifdef __MMI_ONEKEY_SNDREC_SUPPORT__
- extern void DummyEntrySoundRecorderInCall(void);
- #endif
- //jerson add end 20070622
- /*****************************************************************************
- * FUNCTION
- * DummyScr1002ActiveCall
- * DESCRIPTION
- * This is a dummy function for EntryScr1002ActiveCall()
- * this is made because of asynchronous CMGetExactTime
- *
- * This is the sort of base screen after processing the
- * response events.
- * PARAMETERS
- * t [?]
- * RETURNS
- * void
- *****************************************************************************/
- void DummyScr1002ActiveCall(MYTIME *t)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- TIMEANDINDEX timeStruct;
- U8 *guiBuffer;
- PU8 strDispnames[MAX_CALLS];
- U16 nImgIds[MAX_CALLS];
- U16 nIconIds[MAX_CALLS];
- U16 nRskStringId = 0, nLskStringId = 0;
- U16 nRskImgId = 0;
- S16 firstActiveCallIndex;
- S16 nActiveCall = 0;
- U16 nHoldCall = 0;
- U8 type = 255;
- U8 nAllcall;
- #ifdef __GPRS_MODE__
- S16 dummy;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** In EntryScr1002ActiveCalln"));
- SetTransitionToActiveFlag(FALSE);
- /* Start by Julia: Drop call refinement */
- /* CMScrnFlag will be FALSE if CM screen is covered with other application.
- If it is the case, don't set back to TRUE for disconnecting process. */
- //SetCMScrnFlag(TRUE);
- // End by Julia
- /* between call connected (MO or MT) and get time rsp to show active call screen,
- if the call is dropped, we stilll need to log the call as connected. */
- if (GetCallHandleForStartTimeUpdate())
- {
- UpdateCallStartTimeAndLogCall(GetCallHandleForStartTimeUpdate(), t);
- SetCallHandleForStartTimeUpdate(0);
- }
- nActiveCall = GetTotalActiveCallCount();
- nHoldCall = GetTotalHoldCallCount();
- if (nActiveCall + nHoldCall == 0)
- {
- GetOutOfCMApplication();
- return;
- }
- if (GetCurrentState() == CM_INCOMING_STATE)
- {
- return;
- }
- if (GetExitScrnID() != SCR_CM_ACTIVECALLSCREEN)
- {
- EntryNewScreen(SCR_CM_ACTIVECALLSCREEN, NULL, EntryScr1002ActiveCall, NULL);
- }
- else
- {
- ExitCategoryFunction();
- }
- ShowSubLCDScreen(EntrySubLcdScr1002ActiveCall);
- /* SS presnt, don't show active call, restore SS screen */
- if (EmergencyCallPresent())
- {
- DeleteScreenIfPresent(ITEM_SCR_USSN_MSG);
- }
- else if (IsScreenPresent(ITEM_SCR_USSN_MSG) || IsScreenPresent(SCR_CM_REQUESTINGUSSD))
- {
- ResumeSSScrInCall();
- SetCMScrnFlag(FALSE);
- return;
- }
- SetCMScrnFlag(TRUE);
- SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
- guiBuffer = GetCurrGuiBuffer(SCR_CM_ACTIVECALLSCREEN);
- RegisterHighlightHandler(SetCurrHiliteCall);
- memset (nIconIds, 0, sizeof (nIconIds));
- #ifdef __GPRS_MODE__
- gcallListlen = GetAllDispNameorNum(gcallList, gcallListImage, nIconIds, &dummy);
- #endif /* __GPRS_MODE__ */
- nAllcall = GetAllDispNameorNum(strDispnames, nImgIds, nIconIds, &firstActiveCallIndex);
- if (nAllcall != nActiveCall + nHoldCall)
- {
- PRINT_INFORMATION(("nFatal Error in CM Call Structure 1n"));
- }
- PRINT_INFORMATION(("n Active Calls = %d Hold calls = %d GetTotalCallCount = %d", nActiveCall, nHoldCall,
- GetTotalCallCount()));
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() == -1)
- {
- /* no call in disconnecting state */
- if ((mmi_bootup_is_sim_valid() == MMI_TRUE && EmergencyCallPresent() == FALSE) &&
- mmi_bootup_is_in_power_on_period() == MMI_FALSE)
- {
- nLskStringId = STR_GLOBAL_OPTIONS;
- }
- else
- {
- nLskStringId = 0;
- }
- if (GetLSpkNowOff())
- {
- SetLSpkNowOff(FALSE);
- StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT - 1000, EntryScrLoudSpNotifyScreen);
- }
- if (GetTotalActiveCallCount() > 0)
- {
- if (LoudSpeaker() != FALSE) /* Loud Speaker is ON, to show H-Held */
- {
- SetHFreeHeld(TRUE);
- }
- else
- {
- SetHFreeHeld(FALSE);
- }
- //KP Jerry modify on 2007-4-9 start
- #ifndef __MMI_HAND_FREE_FUNC_DISABLE__
- #if defined(__MMI_BT_HP_SUPPORT__) || defined(__MMI_BT_SUPPORT__)
- if ( /* mmi_bt_is_aud2hf() != MMI_TRUE */ mmi_bt_is_incall_aud_swap2bt() != MMI_TRUE)
- #endif
- {
- nRskImgId = IMG_SCR1002_LOUDSP_RSK;
- nRskStringId = GetHFreeHeld()? STR_SCR1002_LOUDSP_H_HELD_RSK : STR_SCR1002_LOUDSP_H_FREE_RSK;
- }
- #else/*__MMI_HAND_FREE_FUNC_DISABLE__*/
- nRskStringId=STR_MITEM_INC_ACT_OPT_END_ACT;
- #endif/*__MMI_HAND_FREE_FUNC_DISABLE__*/
- //KP Jerry modify on 2007-4-9 end
- }
- }
- /* End by Julia */
- InitializeTimeStructure(&timeStruct, t);
- #ifndef DISABLE_CM_MACROS
- PRINT_INFORMATION(("Time 2 category is - "));
- PRINT_INFORMATION(("%d yearn", timeStruct.time.nYear));
- PRINT_INFORMATION(("%d monthn", timeStruct.time.nMonth));
- PRINT_INFORMATION(("%d dayn", timeStruct.time.nDay));
- PRINT_INFORMATION(("%d hourn", timeStruct.time.nHour));
- PRINT_INFORMATION(("%d minuten", timeStruct.time.nMin));
- PRINT_INFORMATION(("%d secondn", timeStruct.time.nSec));
- #endif /* DISABLE_CM_MACROS */
- SetParentHandler(0);
- if ((nActiveCall + nHoldCall) > 1)
- {
- /* Start by Julia: Drop call refinement */
- /* some call is in disconnecting state */
- if (GetDisconnectingCallHandle() != -1)
- {
- ShowCategory19Screen(
- 0,
- 0,
- 0,
- 0,
- nAllcall,
- strDispnames,
- nIconIds,
- nImgIds,
- (UI_time*) & timeStruct.time,
- firstActiveCallIndex,
- guiBuffer);
- }
- else /* no call in disconnecting state */
- /* End by Julia */
- {
- ShowCategory19Screen(
- nLskStringId,
- IMG_SCR1002_LSK,
- nRskStringId,
- nRskImgId,
- nAllcall,
- strDispnames,
- nIconIds,
- nImgIds,
- (UI_time*) & timeStruct.time,
- firstActiveCallIndex,
- guiBuffer);
- }
- }
- else
- {
- /* only 1 call */
- type = GetActiveCallType();
- if (type == CSMCC_FAX_CALL)
- {
- nImgIds[0] = IMG_FAX_CALL_CONNECT;
- }
- else if (type == CSMCC_DATA_CALL)
- {
- nImgIds[0] = IMG_DATA_CALL_CONNECT;
- }
- else
- {
- if (nImgIds[0] == IMG_CM_STATE_ACTIVE)
- {
- nImgIds[0] = IMG_CM_STATE_SINGLE_ACTIVE;
- }
- else if (nImgIds[0] == IMG_CM_STATE_HOLD)
- {
- nImgIds[0] = IMG_CM_STATE_SINGLE_HOLD;
- }
- /* Start by Julia: Drop call refinement */
- /* else if (nImgIds[0] == IMG_CM_STATE_DISCONNECTING)
- nImgIds[0] = IMG_CM_STATE_SINGLE_DISCONNECTING; */
- }
- if (GetDisconnectingCallHandle() != -1)
- {
- ShowCategory20Screen(
- 0,
- 0,
- 0,
- 0,
- strDispnames[0],
- (UI_time*) & timeStruct.time,
- nIconIds[0],
- nImgIds[0],
- MMI_TRUE,
- guiBuffer);
- }
- else
- /* End by Julia */
- {
- ShowCategory20Screen(
- nLskStringId,
- IMG_SCR1002_LSK,
- nRskStringId,
- nRskImgId,
- strDispnames[0],
- (UI_time*) & timeStruct.time,
- nIconIds[0],
- nImgIds[0],
- MMI_FALSE,
- guiBuffer);
- }
- }
- /* Start by Julia: Drop call refinement */
- if (GetDisconnectingCallHandle() != -1)
- {
- SetKeyHandler(ReleaseCall, KEY_END, KEY_EVENT_DOWN);
- }
- else
- {
- /* End by Julia */
- SetLeftSoftkeyFunction(EntryScr1003CMActiveCallOptions, KEY_EVENT_UP);
- //jerson add begin 20070622
- #ifdef __MMI_ONEKEY_SNDREC_SUPPORT__
- SetKeyHandler(DummyEntrySoundRecorderInCall,KEY_ENTER,KEY_EVENT_UP);
- #endif
- //jerson add end 20070622
- //KP Jerry modify on 2007-4-9 start
- #ifndef __MMI_HAND_FREE_FUNC_DISABLE__
- #if !defined(__MMI_BT_HP_SUPPORT__) && !defined(__MMI_BT_SUPPORT__)
- SetRightSoftkeyFunction(LoudSpeakerFunction, KEY_EVENT_UP);
- #else /* !defined(__MMI_BT_HP_SUPPORT__) && !defined(__MMI_BT_SUPPORT__) */
- /* Bluetooth Support */
- if (mmi_bt_is_incall_aud_swap2bt() != MMI_TRUE)
- {
- SetRightSoftkeyFunction(LoudSpeakerFunction, KEY_EVENT_UP);
- }
- #endif /* !defined(__MMI_BT_HP_SUPPORT__) && !defined(__MMI_BT_SUPPORT__) */
- #else/*__MMI_HAND_FREE_FUNC_DISABLE__*/
- SetRightSoftkeyFunction(HangupAll,KEY_EVENT_UP);
- #endif/*__MMI_HAND_FREE_FUNC_DISABLE__*/
- //KP Jerry modify on 2007-4-9 end
- if (nActiveCall > 0 && nHoldCall > 0)
- {
- SetKeyHandler(SwapCall, KEY_SEND, KEY_EVENT_DOWN);
- }
- else if (nActiveCall == 0)
- {
- SetKeyHandler(RetrieveHeldCall, KEY_SEND, KEY_EVENT_DOWN);
- }
- else
- {
- SetKeyHandler(MakeActiveCallHold, KEY_SEND, KEY_EVENT_DOWN);
- }
- SetKeyHandler(HangupAll, KEY_END, KEY_EVENT_DOWN);
- if (nLskStringId != 0)
- {
- #ifdef __MMI_CM_ARROW_KEY_TO_PHB__
- SetKeyHandler(mmi_phb_list_enter_last_from_active_call, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_phb_list_enter_first_from_active_call, KEY_UP_ARROW, KEY_EVENT_DOWN);
- #endif /* __MMI_CM_ARROW_KEY_TO_PHB__ */
- }
- SetGroupKeyHandler(
- EnterScreenAndHandleDigit,
- (PU16) CMIdleScreenDigits,
- MAX_CM_SCREEN_DIGITS - 1,
- KEY_EVENT_DOWN);
- #if ( (defined __MMI_WGUI_CSK_ENABLE__) && (defined __MMI_TOUCH_SCREEN__) )
- SetCenterSoftkeyFunction(EnterScreenAndHandleDigit, KEY_EVENT_UP);
- #endif
- /* Handled crash for NULL= type changes by Kuldeep for Network Simulator 2.0 */
- type = GetActiveCallType();
- /* Handled crash for NULL= type changes by Kuldeep */
- if (type != CSMCC_FAX_CALL && type != CSMCC_DATA_CALL)
- {
- SetSideVolumeKeysForCM();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntrySubLcdScr1002ActiveCall
- * DESCRIPTION
- * Entry screen for Sub Lcd Active Call
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntrySubLcdScr1002ActiveCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecSubLCDCurrExitHandler();
- ShowCategory304Screen(IMG_CM_STATE_CONNECTED, NULL);
- SetSubLCDExitHandler(ExitSubLcdScr1002ActiveCall);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSubLcdScr1002ActiveCall
- * DESCRIPTION
- * Exit Handler for Sub Lcd Active Call Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSubLcdScr1002ActiveCall(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!IsSubLCDScreenPresent(SUB_LCD_SCR_CM_ACTIVECALLSCREEN))
- {
- SubLCDHistoryNode SubLCDHistory;
- SubLCDHistory.entryFuncPtr = EntrySubLcdScr1002ActiveCall;
- AddSubLCDHistoryWithScrID(&SubLCDHistory, SUB_LCD_SCR_CM_ACTIVECALLSCREEN);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1003CMActiveCallOptions
- * DESCRIPTION
- * This handles the LSK functionality for the active screen.
- * Displays options depending on the scenario.
- *
- * This handles all the scenario depending on the menuitem defined.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1003CMActiveCallOptions(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 parentId;
- U8 *guiBuffer;
- U8 *inputBuffer;
- static U8 *PopUpList[40];
- U16 nNumofItem;
- U16 nStrItemList[20];
- S16 nActiveCall = 0;
- U16 nHoldCall = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Added For CPHS */
- /* U16 isConfPresent=0;
- U16 isHoldPresent=0;
- S32 maskingByte=-1; */
- nActiveCall = GetTotalActiveCallCount();
- nHoldCall = GetTotalHoldCallCount();
- PRINT_INFORMATION(("n active option: active:%d, held:%dn", nActiveCall, nHoldCall));
- if (nActiveCall + nHoldCall == 0)
- {
- return;
- }
- if ((nActiveCall == 1) && (nHoldCall == 0))
- {
- U8 type;
- type = GetActiveCallType();
- if (type == CSMCC_DATA_CALL || type == CSMCC_FAX_CALL)
- {
- parentId = MITEM2001_CM_SINGLE_DATA_LSKOPTIONS;
- }
- else
- {
- parentId = MITEM2001_CM_SINGLE_ACTIVE_LSKOPTIONS;
- // isHoldPresent=1; /* Added For CPHS */
- }
- }
- else if ((nActiveCall == 0) && (nHoldCall == 1))
- {
- parentId = MITEM2002_CM_SINGLE_HOLD_LSKOPTIONS;
- }
- else if ((nActiveCall == 1) && (nHoldCall == 1))
- {
- parentId = MITEM2003_CM_S_ACTIVE_S_HOLD_LSKOPTIONS;
- // isConfPresent=1; /* Added For CPHS */
- }
- else if ((nActiveCall > 1) && (nHoldCall == 0))
- {
- parentId = MITEM2004_CM_M_ACTIVE_LSKOPTIONS;
- }
- else if ((nActiveCall == 0) && (nHoldCall > 1))
- {
- parentId = MITEM2005_CM_M_HOLD_LSKOPTIONS;
- }
- else if ((nActiveCall > 1) && (nHoldCall == 1))
- {
- parentId = MITEM2006_CM_M_ACTIVE_S_HOLD_LSKOPTIONS;
- // isConfPresent=1; /* Added For CPHS */
- }
- else if ((nActiveCall == 1) && (nHoldCall > 1))
- {
- parentId = MITEM2007_CM_S_ACTIVE_M_HOLD_LSKOPTIONS;
- // isConfPresent=1; /* Added For CPHS */
- }
- else
- {
- return;
- }
- PRINT_INFORMATION(("n parent:%dn", parentId));
- EntryNewScreen(SCR1003_CM_ACTIVECALLOPTIONS, ExitScr1003CMActiveCallOptions, NULL, NULL);
- SetCMScrnFlag(TRUE);
- guiBuffer = GetCurrGuiBuffer(SCR1003_CM_ACTIVECALLOPTIONS);
- if (IsScreenPresent(SCR1003_CM_ACTIVECALLOPTIONS))
- {
- inputBuffer = GetCurrInputBuffer(SCR1003_CM_ACTIVECALLOPTIONS);
- if (inputBuffer[0] != (nActiveCall + nHoldCall))
- {
- /* call count changed, always highlight the first item */
- guiBuffer = NULL;
- }
- }
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- SetParentHandler(parentId);
- #ifdef __CTM_SUPPORT__
- if (!((GetTotalActiveCallCount() > 0) &&
- (ctm_p->state == MMI_CTM_STATE_OPENED) && (ctm_p->mode_activated == CTM_DIRECT_MODE)))
- {
- /* only opened and unconnected case need to show connect ctm option */
- mmi_frm_hide_menu_item(MITEM2027_CM_CTM);
- }
- if (ctm_p->status == TRUE)
- {
- mmi_frm_hide_menu_item(MITEM2026_CM_SOUND_RECORDER);
- }
- #endif /* __CTM_SUPPORT__ */
- #if defined(__MMI_BT_HP_SUPPORT__) || defined(__MMI_BT_SUPPORT__)
- /*************************************************/
- /** Notice!!! */
- /** 1. The voice transfer menu item should be the last one in the option menu */
- /** 2. The voice transfer menu item is only added in XXX_CM_XXX_ACTIVE_XXX parentId. */
- /** So this screen has to removed this menu item while BT headset connected */
- /*************************************************/
- if (mmi_bt_is_hs_connected() != MMI_TRUE)
- {
- switch (parentId)
- {
- case MITEM2001_CM_SINGLE_DATA_LSKOPTIONS:
- case MITEM2002_CM_SINGLE_HOLD_LSKOPTIONS:
- case MITEM2005_CM_M_HOLD_LSKOPTIONS:
- break;
- default:
- mmi_frm_hide_menu_item(MITEM_CM_BT_SETPATH);
- break;
- }
- }
- /* Add by Elvis*/
- #ifdef __BT_INBAND_RING__
- mmi_frm_hide_menu_item(MITEM_CM_BT_SETPATH);
- #endif
- /* End of Elvis */
- #endif /* defined(__MMI_BT_HP_SUPPORT__) || defined(__MMI_BT_SUPPORT__) */
- /* diamond, 2005/07/01 add _Ext to menu item functions */
- nNumofItem = GetNumOfChild_Ext(parentId);
- GetSequenceStringIds_Ext(parentId, nStrItemList);
- ConstructHintsList(parentId, PopUpList);
- PRINT_INFORMATION(("n active option: %dn", nNumofItem));
- ShowCategory55Screen(
- STR_SCR1002_CAPTION,
- IMG_SCR1002_CAPTION,
- STR_GLOBAL_OK,
- IMG_SCR1003_LSK,
- STR_GLOBAL_BACK,
- IMG_SCR1003_RSK,
- nNumofItem,
- nStrItemList,
- (U8 **) PopUpList,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(HangupAll, KEY_END, KEY_EVENT_DOWN);
- SetSideVolumeKeysForCM();
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScr1003CMActiveCallOptions
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScr1003CMActiveCallOptions(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history Scr1001;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __CTM_SUPPORT__
- mmi_frm_unhide_menu_item(MITEM2027_CM_CTM);
- mmi_frm_unhide_menu_item(MITEM2026_CM_SOUND_RECORDER);
- #endif /* __CTM_SUPPORT__ */
- #if defined(__MMI_BT_HP_SUPPORT__) || defined(__MMI_BT_SUPPORT__)
- mmi_frm_unhide_menu_item(MITEM_CM_BT_SETPATH);
- #endif
- Scr1001.scrnID = SCR1003_CM_ACTIVECALLOPTIONS;
- Scr1001.entryFuncPtr = EntryScr1003CMActiveCallOptions;
- memset (Scr1001.inputBuffer, 0, sizeof (Scr1001.inputBuffer));
- Scr1001.inputBuffer[0] = (U8) GetTotalCallCount();
- GetCategoryHistory(Scr1001.guiBuffer);
- AddHistory(Scr1001);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1004NotifyEndCallDuration
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Hangup of a single call is success with a timeout of CM_NOTIFY_TIMEOUT.
- *
- * This has to display the time,we need to have the time display catefory function.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1004NotifyEndCallDuration(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- static S8 MessageString[SCR_TEXT_LEN];
- S8 TimeString[TEMP_NO * 2];
- S8 TempBuf[TEMP_NO];
- U16 img_id = IMG_ERROR_NOTIFY;
- U16 tone_id = CALL_DROP_TONE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- TurnOnBacklight(1);
- PRINT_INFORMATION((" XXX In EntryScr1004NotifyEndCallDurationXXXn"));
- SetCbackAfterSS(NULL);
- if (GetNotifySSFlag())
- {
- PRINT_INFORMATION((" XXX EntryScr1004NotifyEndCallDuration: Notify Flag Set XXXn"));
- if ((GetCurrentState() == CM_OUTGOING_STATE) && (-1 != GetOutgoingCallHandle()))
- {
- SetCbackAfterSS((FuncPtr) EntryScr1001OutgoingCall);
- }
- else if ( /* GetCurrentState() == CM_IDLE_STATE && */
- GetPreviousState() == CM_OUTGOING_STATE || GetPreviousState() == CM_ACTIVE_STATE)
- {
- SetCbackAfterSS((FuncPtr) EntryScr1004NotifyEndCallDuration);
- }
- else
- {
- SetCbackAfterSS((FuncPtr) EntryScr1002ActiveCall);
- }
- return;
- }
- EntryNewScreen(SCR1004_CM_DISPENDCALLDURATION, ExitScr1004NotifyEndCallDuration, NULL, NULL);
- if (GetTotalCallCount() > 0)
- {
- tone_id = 0;
- }
- if (GetActivatedCcbsFlag() == TRUE)
- {
- StartTimer(CM_NOTIFYDURATION_TIMER, 1, GoBackfromNotifyScr);
- return;
- }
- AnsiiToUnicodeString(TempBuf, "n ");
- if (GetDropRequestFlag() == TRUE && GetCurrentState() != CM_OUTGOING_STATE)
- {
- pfnUnicodeStrcpy((PS8) MessageString, (PS8) GetString(STR_CALL_ABORTED));
- SetDropRequestFlag(FALSE);
- SetCallEndedBeforeConnFlag(FALSE);
- }
- else
- {
- U16 error_code;
- switch (GetCallEndCause())
- {
- case ERR_UNASSIGNED_NUM:
- case ERR_INVALID_NUMBER_FORMAT:
- error_code = ERROR_UNRECOGNIZED_NUMBER;
- break;
- case ERR_CHANNEL_UN_ACCP:
- case ERR_NO_CIRCUIT_CHANNEL_AVAIL:
- case ERR_NETWORK_OUT_OF_ORDER:
- case ERR_QOS_UNAVAIL:
- case ERR_INVALID_TRANSIT_NW_SEL:
- case ERR_CSMCC_NO_RESPONSE_FROM_NW:
- case ERR_NETWORK_FAILURE:
- case ERR_CM_MM_RR_CONN_RELEASE:
- error_code = ERROR_NETWORK_FAIL;
- break;
- case ERR_REQUESTED_CKT_CHANEL_NOT_AVIL:
- case ERR_RESOURCE_UNAVAIL_UNSPECIFIED:
- case ERR_CM_MM_AUTH_FAILURE:
- error_code = ERROR_NETWORK_NOT_AVAILABLE;
- break;
- case ERR_OPR_DTR_BARRING:
- case ERR_CALL_BARRED:
- case ERR_IC_BAR_CUG:
- case ERR_BEARER_CAP_NOT_AVAIL:
- case ERR_CM_MM_ACCESS_BARRED:
- error_code = ERROR_BARRED_CALL;
- break;
- case ERR_NO_USER_RESPONDING:
- error_code = ERROR_NOT_RESPONDING;
- break;
- case ERR_NO_ANSWER_ON_ALERT:
- error_code = ERROR_NO_ANSWER;
- break;
- case ERR_REQ_FACILITY_UNAVAIL:
- case ERR_IE_NOT_IMPLEMENTED:
- case ERR_CONDITIONAL_MM_IE_ERROR:
- case ERR_CM_MM_ASSIGNMENT_REJECT:
- error_code = ERROR_UNAVAILABLE;
- break;
- case ERR_IMSI_UNKNOWN_IN_HLR:
- case ERR_IMSI_UNKNOWN_IN_VLR:
- case ERR_CM_MM_IMSI_DETACH:
- error_code = ERROR_IMSI_UNKNOWN;
- break;
- case ERR_IMEI_NOT_ACCEPTED:
- error_code = ERROR_IMEI_ERROR;
- break;
- case ERR_REQ_FAC_NOT_SUBS:
- case ERR_PLMN_NOT_ALLOWED:
- case ERR_LOCATION_AREA_NOT_ALLOWED:
- case ERR_ROAMING_AREA_NOT_ALLOWED:
- case ERR_GPRS_NOT_ALLOWED_IN_PLMN:
- case ERR_NO_SUITABLE_CELLS_IN_LA:
- case ERR_MSC_TEMP_NOT_REACHABLE:
- case ERR_CM_MM_ABORT_BY_NW:
- case ERR_CM_MM_STATE_NOT_ALLOWED_CM:
- case ERR_BEARER_CAP_NOT_AUTHORISED:
- error_code = ERROR_NETWORK_NOT_ALLOWED;
- break;
- case ERR_SERV_OPTION_NOT_SUPPORTED:
- case ERR_REQ_SERV_OPTION_NOT_SUBSCRIBED:
- case ERR_SERV_OPTION_TEMP_OUT_OF_ORDER:
- case ERR_CALL_CANNOT_BE_IDENTIFIED:
- error_code = ERROR_COMMAND_NOT_SUPPORTED;
- break;
- case ERR_ACM_EXCEEDED:
- error_code = ERROR_ACM_EXCEEDED;
- break;
- case ERR_USER_BUSY:
- error_code = ERROR_USER_BUSY;
- tone_id = TONE_BUSY_CALL_GSM;
- break;
- default:
- error_code = STR_CALL_ENDED;
- img_id = IMG_CM_STATE_ENDED;
- break;
- }
- pfnUnicodeStrcpy(MessageString, (PS8) GetString(error_code));
- pfnUnicodeStrcat((PS8) MessageString, TempBuf);
- SetErrorToneFlag(tone_id);
- if (tone_id == TONE_BUSY_CALL_GSM)
- {
- AudioPlayReq(TONE_BUSY_CALL_GSM, DEVICE_AUDIO_PLAY_INFINITE);
- }
- else if (tone_id > 0)
- {
- playRequestedTone(tone_id);
- }
- SetCallEndCause(0);
- if (TRUE == GetCallEndedBeforeConnFlag())
- {
- PRINT_INFORMATION((" XXX In EntryScr1004NotifyEndCallDurationXXX -- No timen"));
- SetCallEndedBeforeConnFlag(FALSE);
- }
- else
- {
- PRINT_INFORMATION((" XXX In EntryScr1004NotifyEndCallDurationXXX -- print timen"));
- duration_string(
- (UI_time*) & gTimeStructForCallDuration,
- (UI_string_type) TimeString,
- DT_ACTIVE_CALL_SCREEN);
- pfnUnicodeStrcat((PS8) MessageString, TimeString);
- }
- }
- ShowCategory63Screen((U8*) MessageString, img_id, NULL);
- ClearInputEventHandler(MMI_DEVICE_ALL);
- SetKeyHandler((FuncPtr) GoBackfromNotifyScr, KEY_END, KEY_EVENT_DOWN);
- SetPOPUpFlag(TRUE);
- StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, GoBackfromNotifyScr);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScr1004NotifyEndCallDuration
- * DESCRIPTION
- * This just stops timer which was started in the entry function.
- *
- * History might be added if required not
- * added as the notification does not need history.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScr1004NotifyEndCallDuration(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(CM_NOTIFYDURATION_TIMER);
- if (GetErrorToneFlag() == TONE_BUSY_CALL_GSM)
- {
- AudioStopReq(TONE_BUSY_CALL_GSM);
- }
- else if (GetErrorToneFlag() > 0)
- {
- stopRequestedTone(GetErrorToneFlag());
- }
- SetErrorToneFlag(0);
- if (GetPOPUpFlag())
- {
- SetPOPUpFlag(FALSE);
- AdjustHistoryForCM();
- }
- if (CMAllowInterrupt())
- {
- MMIProcessActionMsg();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrNotifyCallAborted
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Hangup of a single call is success with a timeout of CM_NOTIFY_TIMEOUT.
- *
- * This has to display the time,we need to have the time display catefory function.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrNotifyCallAborted(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- static U8 MessageString[TEMP_NO * 3];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_CM_NOTIFYCALLABORTED, ExitScrNotifyCMPopUp, NULL, NULL);
- PRINT_INFORMATION((" XXX In EntryScrNotifyCallAbortedn"));
- if (GetDropRequestFlag() == TRUE)
- {
- pfnUnicodeStrcpy((PS8) MessageString, (PS8) GetString(STR_CALL_ABORTED));
- SetDropRequestFlag(FALSE);
- }
- else
- {
- pfnUnicodeStrcpy((PS8) MessageString, (PS8) GetString(STR_CALL_ENDED));
- }
- SetCallEndedBeforeConnFlag(FALSE);
- ShowCategory63Screen(MessageString, IMG_CM_STATE_ENDED, NULL);
- ClearInputEventHandler(MMI_DEVICE_ALL);
- SetPOPUpFlag(TRUE);
- StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, GoBackfromNotifyScr);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1005NotifyHoldSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Hold request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1005NotifyHoldSucess(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("n EntryScr1005NotifyHoldSucess n"));
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_HLD, TRUE);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1006NotifyRetrieveSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Retrieve request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1006NotifyRetrieveSucess(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_RTVD, FALSE);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1007NotifySwapSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Swap request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1007NotifySwapSucess(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetTotalActiveCallCount() > 0 && GetTotalHoldCallCount() > 0)
- {
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_SWAP, FALSE);
- }
- else if (GetTotalActiveCallCount() > 0)
- {
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_RTVD, FALSE);
- }
- else if (GetTotalHoldCallCount() > 0)
- {
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_HLD, TRUE);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1008NotifyConfSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Conference request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1008NotifyConfSucess(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_CONF, FALSE);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScr1010NotifySplitSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Split request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScr1010NotifySplitSucess(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrNotifyCHLDSucess(STR_NFY_CALL_SPLIT, FALSE);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrNotifyCHLDSucess
- * DESCRIPTION
- * This is a notification which does not have history and used when the
- * Split request is success with a timeout of CM_NOTIFY_TIMEOUT.
- * PARAMETERS
- * notify_string [IN]
- * play_tone [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrNotifyCHLDSucess(U16 notify_string, pBOOL play_tone)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR1010_CM_DISPSPLITCALLSUCESS, ExitScrNotifyCMPopUpTone, NULL, NULL);
- #ifndef __MMI_CM_SHOW_CHLD_DONE__
- ShowCategory62Screen(notify_string, IMG_GLOBAL_ACTIVATED, NULL);
- #else
- ShowCategory62Screen(STR_ACTION_DONE, IMAGE_CCBS_ACTIVATED, NULL);
- #endif
- SetLeftSoftkeyFunction(GoBackfromNotifyScr, KEY_EVENT_UP);
- if (play_tone == TRUE && GetTotalCallCount() == 0)
- {
- playRequestedTone(SUCCESS_TONE_IN_CALL);
- SetErrorToneFlag(SUCCESS_TONE_IN_CALL);
- }
- SetKeysForPOPUp();
- SetPOPUpFlag(TRUE);
- StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, GoBackfromNotifyScr);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrNotifyCMPopUpTone
- * DESCRIPTION
- * This just stops timer which was started in the entry function.
- *
- * History might be added if required not
- * added as the notification does not need history.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrNotifyCMPopUpTone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetErrorToneFlag() > 0)
- {
- stopRequestedTone(GetErrorToneFlag());
- SetErrorToneFlag(0);
- }
- StopTimer(CM_NOTIFYDURATION_TIMER);
- if (GetPOPUpFlag())
- {
- SetPOPUpFlag(FALSE);
- AdjustHistoryForCM();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrLoudSpNotifyScreen
- * DESCRIPTION
- * display the notification screen in case of lous speaker
- * PARAMETERS
- * void
- * gListOperation(?) [IN] GcallList,gcallListlen global variables filled by other function
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrLoudSpNotifyScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* U8* guiBuffer; */
- PRINT_INFORMATION(("XXX EntryScrLoudSpNotifyScreenn"));
- EntryNewScreen(SCR_CM_NOTIFY_LOUDSPEAKER, ExitScrNotifyCMPopUp, NULL, NULL);
- /* guiBuffer = GetCurrGuiBuffer(SCR_CM_NOTIFY_LOUDSPEAKER); */
- if (LoudSpeaker() == TRUE)
- {
- ShowCategory62Screen(STR_NFY_LOUDSPEAKER_ON, 0, NULL);
- }
- else
- {
- ShowCategory62Screen(STR_NFY_LOUDSPEAKER_OFF, 0, NULL);
- }
- SetLeftSoftkeyFunction(GoBackfromNotifyScr, KEY_EVENT_UP);
- SetPOPUpFlag(TRUE);
- SetKeysForPOPUp();
- StartTimer(CM_NOTIFYDURATION_TIMER, CM_NOTIFY_TIMEOUT, GoBackfromNotifyScr);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrNotifyCMPopUp
- * DESCRIPTION
- * This function is the exit screen for for displaying SS info to user
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrNotifyCMPopUp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(CM_NOTIFYDURATION_TIMER);
- if (GetPOPUpFlag())
- {
- SetPOPUpFlag(FALSE);
- AdjustHistoryForCM();
- }
- }
- /************************ CISS *************************************/
- /*****************************************************************************
- * FUNCTION
- * EntryScrUSSDReq
- * DESCRIPTION
- * This function shows USSD screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrUSSDReq(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** In EntryScrUSSDReqn"));
- SetAbortCallRequestedFlag(FALSE);
- EntryNewScreen(SCR_CM_REQUESTINGUSSD, NULL, EntryScrUSSDReq, NULL);
- /* micha1115 */
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OUT);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_IN);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_PASS);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OLD_PASS);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OPTION);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_NEW_PASS);
- DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_CFRM_PASS);
- DeleteScreenIfPresent(SCR_ID_CALLSET_FORWARD_OPTIONS);
- DeleteScreenIfPresent(SCR_ID_CALLSET_FORWARD_NUMBER);
- DeleteScreenIfPresent(SCR_ID_CALLSET_FORWARD_NO_ANS_TIME);
- DeleteScreenIfPresent(SCR_ID_CALLSET_WAITING_MAIN);
- ShowCategory8Screen(
- STR_USSD_REQ_CAPTION,
- IMG_CM_USSD_REQUEST,
- 0,
- 0,
- STR_GLOBAL_ABORT,
- IMG_SCR_USSD_REQ_LSK,
- STR_USSD_REQ_DISP_SCR,
- IMG_CM_SS_OUTGOING,
- NULL);
- /* micha0915 */
- SetDelScrnIDCallbackHandler(SCR_CM_REQUESTINGUSSD, (HistoryDelCBPtr) SSReqHistoryDelHdlr);
- SetRightSoftkeyFunction(AbortUSSDRequest, KEY_EVENT_UP);
- SetKeyHandler(AbortUSSDRequestEND, KEY_END, KEY_EVENT_DOWN);
- }
- /* micha0915 */
- /*****************************************************************************
- * FUNCTION
- * SSReqHistoryDelHdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * in_param [?]
- * RETURNS
- * U8
- *****************************************************************************/
- U8 SSReqHistoryDelHdlr(void *in_param)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** SSReqHistoryDelHdlrn"));
- if (FALSE == GetAbortCallRequestedFlag())
- {
- SetAbortCallRequestedFlag(TRUE);
- MakePsDropUSSDReq(NULL);
- }
- else
- {
- PRINT_INFORMATION(("*** In SSReqHistoryDelHdlr.. Not sending ATHn"));
- }
- return FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * RemoveSSReqScr
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * U8(?)
- *****************************************************************************/
- void RemoveSSReqScr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetDelScrnIDCallbackHandler(SCR_CM_REQUESTINGUSSD, (HistoryDelCBPtr) NULL);
- DeleteScreenIfPresent(SCR_CM_REQUESTINGUSSD);
- }
- /*****************************************************************************
- * FUNCTION
- * AbortUSSDRequest
- * 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 UssdReq screen.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void AbortUSSDRequest(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** In AbortUSSDRequest Requestn"));
- if (FALSE == GetAbortCallRequestedFlag())
- {
- SetAbortCallRequestedFlag(TRUE);
- MakePsDropUSSDReq(CBackDropUSSDReq);
- }
- else
- {
- PRINT_INFORMATION(("*** In AbortUSSDRequest Request .. Not sending ATHn"));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * AbortUSSDRequestEND
- * DESCRIPTION
- * This is called when end key is pressed
- * on USSD screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void AbortUSSDRequestEND(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("*** In AbortUSSDRequest Requestn"));
- if (FALSE == GetAbortCallRequestedFlag())
- {
- SetAbortCallRequestedFlag(TRUE);
- MakePsDropUSSDReq(CBackDropUSSDReqEND);
- }
- else
- {
- PRINT_INFORMATION(("*** In AbortUSSDRequest Request .. Not sending ATHn"));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ProcessUSSDrecieved
- * DESCRIPTION
- * This function is called by the state machine function in
- * response to the USSD data recieved by the MS
- * PARAMETERS
- * info [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ProcessUSSDrecieved(void *info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __USSD_GOBACK_IDLE__
- if (((MMI_SS_USSD_RSP*) info)->op_code == SS_OP_UNSTRUCTUREDSS_REQUEST)
- {
- RemoveSSReqScr();
- SetDelScrnIDCallbackHandler(ITEM_SCR_USSN_MSG, (HistoryDelCBPtr) NULL);
- SetDelScrnIDCallbackHandler(ITEM_SCR_USSR_EDIT, (HistoryDelCBPtr) NULL);
- DeleteScreenIfPresent(ITEM_SCR_USSN_MSG);
- DeleteScreenIfPresent(ITEM_SCR_USSR_EDIT);
- GoBackHistory();
- return;
- }
- #endif
- if (((MMI_SS_USSD_RSP*) info)->result.flag == L4C_OK)
- {
- DeriveUSSDbuf(info);
- if (IsScreenPresent(SCR_CM_REQUESTINGUSSD))
- {
- HistoryReplace(SCR_CM_REQUESTINGUSSD, ITEM_SCR_USSN_MSG, EntryScrDisplayUSSDRes);
- }
- else
- {
- EntryScrDisplayUSSDRes();
- #ifdef __MMI_RECEIVE_USSD_TONE__
- playRequestedTone(WARNING_TONE);
- #endif
- }
- }
- else
- {
- if (((GetCurrentState() != CM_OUTGOING_STATE) && (GetCurrentState() != CM_INCOMING_STATE)) ||
- (GetActiveScreenId() == SCR_CM_REQUESTINGUSSD))
- {
- #ifdef __MMI_SS_SHOW_CAUSE__
- EntryNewScreen(GLOBAL_SCR_DUMMY, NULL, NULL, NULL);
- RemoveSSReqScr();
- ShowCauseString(((MMI_SS_USSD_RSP*) info)->result.cause, temp_string);
- ShowCategory74Screen(
- STR_TITLE_SCR_USSD_MSG,
- 0,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- (PU8) temp_string,
- pfnUnicodeStrlen(temp_string),
- NULL);
- SetLeftSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- #else /* __MMI_SS_SHOW_CAUSE__ */
- DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
- RemoveSSReqScr();
- #endif /* __MMI_SS_SHOW_CAUSE__ */
- }
- else
- {
- DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
- RemoveSSReqScr();
- }
- }
- SetDelScrnIDCallbackHandler(ITEM_SCR_USSN_MSG, (HistoryDelCBPtr) NULL);
- SetDelScrnIDCallbackHandler(ITEM_SCR_USSR_EDIT, (HistoryDelCBPtr) NULL);
- DeleteScreenIfPresent(ITEM_SCR_USSN_MSG);
- DeleteScreenIfPresent(ITEM_SCR_USSR_EDIT);
- }