📄 callmanagementincoming.c
字号:
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
*******************************************************************************/
/**
* Copyright Notice
* ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
* Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
* (It is illegal to remove this copyright notice from this software or any
* portion of it)
*/
/**************************************************************
FILENAME : CallManagementIncoming.c
PURPOSE : Call Management application
REMARKS : To keep in mind that History must always be saved
Skipping nodes it to be decided
AUTHOR : Ashish
DATE : Nov 8,02
**************************************************************/
#include "stdC.h"
#include "MMI_Features.h"
#include "L4Dr.h"
#include "L4Dr1.h"
#include "PixtelDataTypes.h"
#include "DebugInitDef.h"
#include "MMI_trc.h"
#include "ProtocolEvents.h"
#include "EventsGprot.h"
#include "HistoryGprot.h"
#include "SubLCDHistoryGprot.h"
#include "GlobalDefs.h"
#include "GlobalStruct.h"
#include "GlobalScrEnum.h"
#include "WrapperGprot.h"
#include "KeyBrd.h"
#include "TimerEvents.h"
#include "wgui.h"
#include "Wgui_categories_popup.h"
#include "wgui_categories_CM.h"
#include "wgui_categories_util.h"
#include "wgui_categories_inputs.h"
#include "wgui_categories_multimedia.h"
#include "CSP.h"
#include "gdi_include.h" /* for GDI's color define */
#include "ProfileGprots.h"
#include "BootUp.h"
#include "PowerOnChargerProt.h"
#include "MessagesExDcl.h"
#include "SmsPsHandler.h"
#include "MessagesResourceData.h"
#include "SMSApi.h"
#include "AlarmFrameworkProt.h"
#include "SATDefs.h"
#include "SATGProts.h"
#include "SimDetectionGexdcl.h"
#include "gpioInc.h"
#include "PhoneBookDef.h"
#include "PhoneBookGprot.h"
#include "CallSetUp.h"
#include "mdi_datatype.h"
#include "mdi_audio.h"
#include "AudioInc.h"
#ifdef __CTM_SUPPORT__
#include "TextPhoneDef.h"
#include "TextPhoneProt.h"
#endif /* __CTM_SUPPORT__ */
#ifdef __MMI_VOIP__
#include "VoIPGProt.h"
#endif
#include "CallManagementIdDef.h"
#include "CallManagementStruct.h"
#include "CallStructureManagementProt.h"
#include "CmErrorTypes.h"
#include "CmErrorHandlersProt.h"
#include "HistoryHelperProt.h"
#include "RedialHelperGProt.h"
#include "CommonStubsProt.h"
#include "PsCallHelperDef.h"
#include "mmiapi_struct.h"
#include "PsCallHelperGprot.h"
#include "CallManagementGprot.h"
#include "OutgoingCallHelperProt.h"
#include "OutgoingCallManagementProt.h"
#include "MessagesResourceData.h"
#include "IncomingCallManagementProt.h"
#include "PhonebookDef.h" /* For enum IMG_PHB_DEFAULT */
#include "CommonScreens.h" /* for popup window timer. */
#ifdef __MMI_BT_HP_SUPPORT__
#include "BTMMIHPGprots.h"
#endif
#ifdef __MMI_BT_SUPPORT__
#include "BTMMIScrGprots.h"
#endif
#if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
#include "ddl.h"
#include "jcutils.h"
#include "jcerror.h"
#include "jdd_tapi.h"
#endif
/* static CM_CALL_HANDLE gCallToEnd;// This is the call Selected for ending */
static CM_CALL_HANDLE gMyCallHandle;
static S8 CallDeflectBuffer[MAX_NUMBER];
static U8 gDTMFConfirmBuf[MAX_DTMFBUF_DIGITS];
static U8 cashSign[8];
static U8 AocBuffer[10];
static pBOOL gAttempToReject = FALSE;
static pBOOL gAttempToAnswer = FALSE;
static pBOOL gAcceptIncoming = FALSE; /* tells if there is a incoming call waiting to be accepted */
/* static pBOOL gHold2End=FALSE;// tells if there is a pending hold call 2 end */
/* static U16 gIdleScreenDigitsAnyKeyAnswer[MAX_CM_SCREEN_DIGITS_ANYKEY] =
{
KEY_0,KEY_1,KEY_2,KEY_3,
KEY_4,KEY_5,KEY_6,KEY_7,
KEY_8,KEY_9,KEY_STAR,KEY_POUND,
KEY_UP_ARROW,
KEY_DOWN_ARROW,
KEY_LEFT_ARROW,
KEY_RIGHT_ARROW,
KEY_CLEAR, KEY_ENTER, KEY_QUICK_ACS
}; */
S16 CallDeflectDigitKeyCode = -1;
U16 gSSEvent = 0;
MMI_BOOL gSSEventNotifyPresent = MMI_FALSE;
U16 gSSEventNotify = 0;
extern U8 isEarphonePlugged;
extern U32 gSumACMValue;
extern S8 gUSSDbuf[];
extern S8 UnicodeDTMFPadCallBuffer[];
extern const U16 CMIdleScreenDigits[];
extern PU8 gdispnameForSubLCD;
extern U8 isCSPPresent;
#ifdef WAP_SUPPORT
extern int wap_bearer_csd_is_disc(void);
#endif
#ifdef __MMI_CLAMSHELL__
extern BOOL IsClamClose(void);
#endif
extern void show_call_cost_UI(PU8 symbol, PU8 value);
/*****************************************************************************
* FUNCTION
* ReinitalizeIncomingCall
* DESCRIPTION
* To Re-Initialize the Incoming Call Management Application
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void ReinitalizeIncomingCall(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
SetProtocolEventHandler(PsCBackIncomingCallAccepted, PRT_INCOMINGCALL_ACCEPT_SUCCESS);
SetProtocolEventHandler(PsCBackCallIncoming, PRT_INCOMINGCALL_EVENT);
SetProtocolEventHandler(PsCBackCallWait, PRT_INCOMING_CALL_WAIT);
SetProtocolEventHandler(PsCBackSpeechIndication, PRT_SPEECH_IND_EVENT);
SetProtocolEventHandler(PsCBackAocIndication, PRT_AOC_EVENT_IND);
SetProtocolEventHandler(PsCBackNotifySSInd, PRT_NOTIFY_SS_EVENT);
SetProtocolEventHandler(PsCBackCcbsActivate, PRT_OUTGOING_DISCONNECT_IND);
SetProtocolEventHandler(PsCBackCCBSInvoked, PRT_CCBS_NOTIFY_IND);
SetProtocolEventHandler(PsCBackConfirmDTMFString, PRT_DTMF_CONFIRM_IND);
SetProtocolEventHandler(PsCBackNetworkCallDropped, PRT_NWRK_CALL_RELEASE);
SetProtocolEventHandler(PsCBackUSSNInd, PRT_USSN_IND);
SetProtocolEventHandler(PsCBackUSSRInd, PRT_USSR_IND);
SetProtocolEventHandler(CALLSETClipRsp, PRT_MMI_SS_CLIP_INTERROGATE_IND);
SetProtocolEventHandler(CALLSETClirRsp, PRT_MMI_SS_CLIR_INTERROGATE_IND);
SetProtocolEventHandler(CALLSETColpRsp, PRT_MMI_SS_COLP_INTERROGATE_IND);
SetProtocolEventHandler(CALLSETColrRsp, PRT_MMI_SS_COLR_INTERROGATE_IND);
SetProtocolEventHandler(CALLSETCnapRsp, PRT_MMI_SS_CNAP_INTERROGATE_IND);
SetProtocolEventHandler(CALLSETCcbsQueryRsp, PRT_MMI_SS_CCBS_RSP);
SetProtocolEventHandler(CALLSETEmlppQueryRsp, PRT_MMI_SS_EMLPP_RSP);
SetProtocolEventHandler(CALLSETWaitingRsp, PRT_MMI_SS_CALL_WAIT_RSP);
SetProtocolEventHandler(CALLSETForwardRsp, PRT_MMI_SS_CALL_FORWARD_RSP);
SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP);
SetProtocolEventHandler(CALLSETBarringPassRsp, PRT_MMI_SS_CHANGE_PASSWORD_RSP);
}
/*****************************************************************************
* FUNCTION
* InitIncomingCall
* DESCRIPTION
* To Initialize the Incoming Call Management Application
*
* This function sets up the handlers required for event flow and
* application management
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void InitIncomingCall(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ReinitalizeIncomingCall();
SetHiliteHandler(MITEM_INC_OPT_ANSWER, HiliteMenuIncomingAnswer);
SetHiliteHandler(MITEM_INC_OPT_DEFLN, HiliteMenuIncomingCallDeflection);
SetHiliteHandler(MITEM_CCBS_OPT_DIAL, HiliteMenuCCBSDial);
SetHiliteHandler(MITEM_INC_ACT_OPT_END_ACT, HiliteM2019AllActiveEnd);
SetHiliteHandler(MITEM_IAH_OPT_END_ACT, HiliteM2019AllActiveEnd);
SetHiliteHandler(MITEM_IMA_OPT_END_ONE_ACT, HiliteM2011SingleActiveEnd);
SetHiliteHandler(MITEM_IMAH_OPT_END_ONE_ACT, HiliteM2019AllActiveEnd);
SetHiliteHandler(MITEM_IMA_OPT_END_ALL_ACT, HiliteMenuEndAllCalls);
SetHiliteHandler(MITEM_INC_MHLD_OPT_END, HiliteMenuEndAllCalls);
SetHiliteHandler(MITEM_IAH_OPT_END_ALL, HiliteMenuEndAllCalls);
SetHiliteHandler(MITEM_INC_HLD_OPT_END, HiliteM2020AllHeldEnd);
SetHiliteHandler(MITEM_IAH_OPT_END_HLD, HiliteM2020AllHeldEnd);
SetHiliteHandler(MITEM_IAMH_ALL_HELD_END, HiliteM2020AllHeldEnd);
SetHiliteHandler(MITEM_INC_ACT_OPT_HOLD_ACT, HiliteM2014Swap);
SetHiliteHandler(MITEM_IMA_OPT_HOLD_CONF, HiliteM2014Swap);
SetHiliteHandler(MITEM_INC_HLD_OPT_RTRV, HiliteM2014Swap);
SetHiliteHandler(MITEM_INC_MHLD_OPT_RTRV, HiliteM2014Swap);
SetHiliteHandler(MITEM_IAH_OPT_SWAP, HiliteM2014Swap);
SetHiliteHandler(MITEM_IAH_OPT_CONFER, HiliteM2015Conference);
SetHiliteHandler(MITEM_IAH_OPT_TRANSFER, HiliteM2017Transfer);
SetHiliteHandler(MITEM_IMA_OPT_SPLIT, HiliteM2018Split);
SetHiliteHandler(MITEM_INC_ACT_OPT_MUTE, HiliteM2020Mute);
SetHiliteHandler(MITEM_INC_ACT_OPT_LOUDSP, HiliteM2023LoudSp);
}
/*****************************************************************************
* FUNCTION
* HiliteMenuIncomingAnswer
* DESCRIPTION
* Hilite function for Incoming Answer
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void HiliteMenuIncomingAnswer(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(KbCBackCallIncomingAccepted, KEY_EVENT_UP);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
}
/*****************************************************************************
* FUNCTION
* HiliteMenuIncomingCallDeflection
* DESCRIPTION
* Hilite function for Call Deflection
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void HiliteMenuIncomingCallDeflection(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_HiliteMenuIncomingCallDeflection));
ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(HandleCallDelfectDigitEntry, KEY_EVENT_UP);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
}
/*****************************************************************************
* FUNCTION
* HiliteMenuCCBSDial
* DESCRIPTION
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -