FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiGprs.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | abaee5bdfdc9 |
line wrap: on
line diff
--- a/src/ui/bmi/mmiGprs.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/mmiGprs.c Sun Nov 08 06:39:16 2020 +0000 @@ -2,28 +2,28 @@ CONDAT (UK) -******************************************************************************** +******************************************************************************** This software product is the property of Condat (UK) Ltd and may not be - disclosed to any third party without the express permission of the owner. - + disclosed to any third party without the express permission of the owner. + ******************************************************************************** - $Project name: - $Project code: - $Module: + $Project name: + $Project code: + $Module: $File: MmiGprs.c - $Revision: - - $Author: Condat(UK) - $Date: - + $Revision: + + $Author: Condat(UK) + $Date: + ******************************************************************************** - + Description: GPRS handling for MMI. - - + + ******************************************************************************** $History: MmiGprs.c @@ -39,17 +39,17 @@ Feb 24, 2006 REF:DR OMAPS00068976 x0035544 Description: GPRS attach icon - MMI follow up issue of OMAPS00051034 - solution: a Check is added for the idle mode display and querry the GPRS status of + solution: a Check is added for the idle mode display and querry the GPRS status of network registration and update the GPRS state and attach icon display accordingly. - + 15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version. Dec 02, 2005 REF: DR OMAPS00048551 x0039928 - Description: MMI Cloud displays ""GPRS Detached"" in place + Description: MMI Cloud displays ""GPRS Detached"" in place of ""GPRS Not Attached"" when unable to attach.. - Solution: A condition is added to check if the request is for attach and then display + Solution: A condition is added to check if the request is for attach and then display "GPRS Not Attached" in case it fails. - + Dec 01, 2005 REF: DR OMAPS00048530 x0039928 Description: After the GPRS detach the MMI shows it is attached. Solution: A check is made to display "GPRS Attached" only when an GPRS attach is @@ -57,9 +57,9 @@ Jun 14, 2005 REF: MMI-FIX-30439 x0018858 Description: The homezone/cityzone tags were not being displayed properly. - Solution: Modified to save the tags properly in caches and also made the + Solution: Modified to save the tags properly in caches and also made the appropriate modifications to update the same properly during mobility. - + $End *******************************************************************************/ @@ -207,7 +207,7 @@ { TRACE_EVENT("***ERROR*** MMI GPRS not initialised properly"); } - + return gprs_data; } @@ -226,7 +226,7 @@ void GPRS_Init(void) { T_MMI_GPRS_DATA *data; - + tracefunction("GPRS_Init()"); gprs_init(); @@ -245,7 +245,7 @@ data->notify_win = NULL; data->callback = NULL; data->reg_status = GPRS_OFF; - + return; } @@ -301,7 +301,7 @@ tracefunction("GPRS_Exit()"); if (data) - { + { /* Delete any remaining please wait window (just in case!)*/ GPRS_PleaseWaitDestroy(); @@ -310,12 +310,12 @@ { gprs_delete(data->mfw_gprs); } - + /* Delete MMI data */ FREE_MEMORY((void *)data, sizeof(T_MMI_GPRS_DATA)); gprs_data = NULL; } - + gprs_exit(); return; } @@ -338,7 +338,7 @@ T_MMI_GPRS_DATA *data = GPRS_Data(); T_MFW_GPRS *gprs; int result; - + #ifdef NEPTUNE_BOARD int iStatus = 0; int iDisplayIcn = 0; @@ -350,17 +350,17 @@ { return GPRS_OFF; } - + /* Keeps track of last status value, so we only need to call callback when a change occurs. * Default state is GPRS OFF */ iconsDeleteState(iconIdGPRSOn); - + #ifdef NEPTUNE_BOARD /* OMAPS00074454 - For Edge Icon Display */ iconsDeleteState(iconIdEdgeOn); /* END */ -#endif +#endif result = GPRS_OFF; /* Check if searching or attached */ @@ -369,12 +369,12 @@ { gprs = ((T_MFW_HDR *)data->mfw_gprs)->data; //x0035544 Feb 23, 2006 DR:OMAPS00068976 - /* Check for the idle mode and querry the status of network registration + /* Check for the idle mode and querry the status of network registration *and update the GPRS state and attach icon display accordingly */ - if (gprs && (idleIsFocussed() ||data->menu_win == NULL) ) - { -#ifdef NEPTUNE_BOARD - iDisplayIcn = mfw_gprs_edge_status (&iStatus); + if (gprs && (idleIsFocussed() ||data->menu_win == NULL) ) + { +#ifdef NEPTUNE_BOARD + iDisplayIcn = mfw_gprs_edge_status (&iStatus); /* Status is obtained from AT command and assigned. */ gprs->data.Reg_state.p_reg_State = (T_P_CGREG_STAT) iStatus; @@ -385,15 +385,15 @@ result = GPRS_SEARCHING; } - else if((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_SEARCHING) && + else if((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_SEARCHING) && (iDisplayIcn == EDGE_ICON_SET)) { result = EDGE_SEARCHING; } - + /* Check regState and iDisplayIcn For display of GPRS*/ - else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) && + else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) && (iDisplayIcn == GPRS_ICON_SET)) { iconsSetState(iconIdGPRSOn); @@ -401,30 +401,30 @@ } /* Check regState and iDisplayIcn For display of EDGE*/ - else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) && + else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) && (iDisplayIcn == EDGE_ICON_SET)) { - iconsSetState(iconIdEdgeOn); + iconsSetState(iconIdEdgeOn); result = EDGE_ATTACHED; } - else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || + else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN ) && (iDisplayIcn == EDGE_ICON_SET)) { iconsDeleteState(iconIdGPRSOn ); - result = GPRS_ERROR; + result = GPRS_ERROR; } - else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || + else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN ) && (iDisplayIcn == EDGE_ICON_SET)) { iconsDeleteState(iconIdEdgeOn ); - result = EDGE_ERROR; + result = EDGE_ERROR; } /* May 29, 2006 Ref bug OMAPS00078997 */ else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NOT_REG ) @@ -438,7 +438,7 @@ iconsDeleteState(iconIdGPRSOn); iconsDeleteState(iconIdEdgeOn); } - + #else gprs->data.Reg_state.p_reg_State = p_gprs_status(); @@ -452,17 +452,17 @@ /* Check regState rather than attached to find GPRS status */ - else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || + else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) { iconsSetState(iconIdGPRSOn); result = GPRS_ATTACHED; } - else if(gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED || - gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || + else if(gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED || + gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN || gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN) - + { iconsDeleteState(iconIdGPRSOn ); result = GPRS_ERROR; @@ -475,8 +475,8 @@ iconsDeleteState(iconIdGPRSOn ); result = GPRS_OFF; } -#endif - +#endif + } else if (gprs ) { @@ -489,21 +489,21 @@ /* gprs->data.Reg_state.regState = iStatus; */ gprs->data.Reg_state.regState = (T_CGREG_STAT) iStatus; - if ((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) && + if ((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) && (iDisplayIcn == GPRS_ICON_SET)) { result = GPRS_SEARCHING; } - else if((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) && + else if((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) && (iDisplayIcn == EDGE_ICON_SET)) { result = EDGE_SEARCHING; } - + /* Check regState and iDisplayIcn For display of GPRS*/ - else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME || - gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) && + else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME || + gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) && (iDisplayIcn == GPRS_ICON_SET)) { iconsSetState(iconIdGPRSOn); @@ -511,11 +511,11 @@ } /* Check regState and iDisplayIcn For display of EDGE*/ - else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME || - gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) && + else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME || + gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) && (iDisplayIcn == EDGE_ICON_SET)) { - iconsSetState(iconIdEdgeOn); + iconsSetState(iconIdEdgeOn); result = EDGE_ATTACHED; } #else @@ -538,10 +538,10 @@ iconsSetState(iconIdGPRSOn); result = GPRS_ATTACHED; } -#endif +#endif } } - + /* If status has changed, notify */ if (data->callback!=NULL && result!=data->reg_status) { @@ -564,13 +564,13 @@ $Arguments: parent_win - the parent window TextId1 - the first text string to be shown TextId2 - the second text string to be shown - - [afo 03/10/03] Moved function to an earlier location in the file and changed - the return type to void. We were taking liberties with C which we - got away with using the TI compiler but which Visual C flagged as + + [afo 03/10/03] Moved function to an earlier location in the file and changed + the return type to void. We were taking liberties with C which we + got away with using the TI compiler but which Visual C flagged as an error. - - We seem to be a bit slack on function scope and return values in + + We seem to be a bit slack on function scope and return values in some cases in this file. *******************************************************************************/ @@ -578,16 +578,16 @@ static void GPRS_ResultScreen(T_MFW_HND parent_win, USHORT TextId1, USHORT TextId2) { T_MMI_GPRS_DATA *data = GPRS_Data(); - + tracefunction("GPRS_ResultScreen()"); if (!data) { return; } - - GPRS_PleaseWaitDestroy(); - + + GPRS_PleaseWaitDestroy(); + info_screen(parent_win, TextId1, TextId2, NULL); data->display = FALSE; @@ -619,7 +619,7 @@ /* return; */ return 0; } - + data->status = MMI_GPRS_STATUS_ATTACHING; if (win) @@ -628,7 +628,7 @@ } /* Perform the attach */ - + if (gprs_attach(CGATT_STATE_ATTACHED)==MFW_RES_OK) { trace("GPRSAttach executing, awaiting confirmation."); @@ -678,7 +678,7 @@ { GPRS_PleaseWait(win, TxtPleaseWait, NULL); } - + if (gprs_attach(CGATT_STATE_DETACHED)==MFW_RES_OK) { trace("GPRSDetach executing, awaiting confirmation."); @@ -713,7 +713,7 @@ int GPRS_ContextDefine(SHORT cid, char *IPAddress, char *APN) { static T_PDP_CONTEXT context; - + strcpy(context.pdp_apn, APN); strcpy(context.pdp_type, "IP"); strcpy((char*)context.pdp_addr.ip_address.ipv4_addr.a4, (char*)IPAddress); @@ -727,7 +727,7 @@ */ context.d_comp = (U8) CGDCONT_D_COMP_OMITTED; context.h_comp = (U8) CGDCONT_H_COMP_OMITTED; - + // memset(&context.qos,0,sizeof(T_PS_qos)); // memset(&context.min_qos,0,sizeof(T_PS_qos)); @@ -742,7 +742,7 @@ int GPRS_ContextDefine(SHORT cid, char *IPAddress, char *APN) { static T_PDP_CONTEXT context; - + strcpy(context.pdp_apn, APN); strcpy(context.pdp_type, "IP"); strcpy((char*)context.pdp_addr.ip_address.ipv4_addr.a4, (char*)IPAddress); @@ -779,10 +779,10 @@ SHORT cids[2]; tracefunction("GPRS_ContextActivate()"); - + cids[0] = cid; cids[1] = 0; - + if (gprs_contextActivation(CGACT_STATE_ACTIVATED, cids)==MFW_RES_OK) { trace("GPRS_ContextActivate: Failed."); @@ -811,10 +811,10 @@ SHORT cids[2]; tracefunction("GPRS_ContextDeactivate()"); - + cids[0] = cid; cids[1] = 0; - + if (gprs_contextActivation(CGACT_STATE_DEACTIVATED, cids)==MFW_RES_OK) { trace("GPRS_ContextDeactivate: Failed."); @@ -851,7 +851,7 @@ QOS.qos_r97.relclass = relclass; QOS.qos_r97.peak = peak; QOS.qos_r97.mean = mean; - + if (gprs_setQOS(cid, &QOS)!=MFW_RES_OK) { trace("GPRS_MenuSetQOS: Failed"); @@ -859,7 +859,7 @@ } trace("GPRS_MenuSetQOS: OK"); - + return TRUE; } #else @@ -874,8 +874,8 @@ QOS.qos_r97.relclass = relclass; QOS.qos_r97.peak = peak; QOS.qos_r97.mean = mean; - - + + if (gprs_setQOS(cid, &QOS)!=MFW_RES_OK) { trace("GPRS_MenuSetQOS: Failed"); @@ -883,7 +883,7 @@ } trace("GPRS_MenuSetQOS: OK"); - + return TRUE; } #endif @@ -913,7 +913,7 @@ QOS.qos_r97.relclass = relclass; QOS.qos_r97.peak = peak; QOS.qos_r97.mean = mean; - + if (gprs_setQOSMin(cid, &QOS)!=MFW_RES_OK) { trace("GPRS_MenuSetMinQOS: Failed"); @@ -921,7 +921,7 @@ } trace("GPRS_MenuSetMinQOS: OK"); - + return TRUE; } #else @@ -936,7 +936,7 @@ QOS.qos_r97.relclass = relclass; QOS.qos_r97.peak = peak; QOS.qos_r97.mean = mean; - + if (gprs_setQOSMin(cid, &QOS)!=MFW_RES_OK) { trace("GPRS_MenuSetMinQOS: Failed"); @@ -944,7 +944,7 @@ } trace("GPRS_MenuSetMinQOS: OK"); - + return TRUE; } #endif @@ -971,7 +971,7 @@ { return SMS_SERVICE_OMITTED; } - + return data->sms_service; } @@ -995,7 +995,7 @@ UBYTE old_service = 0; /* Warning Correction - 29-11-2005 */ tracefunction("GPRS_SetSmsService"); trace_P1("Service: %d", service); - + switch(service) { case SMS_SERVICE_GPRS: @@ -1020,7 +1020,7 @@ old_service = data->sms_service; data->sms_service = service; } - + if (gprs_setServiceSMS(ACISmsService) != MFW_RES_OK) { trace("gprs_setServiceSMS failed"); @@ -1031,7 +1031,7 @@ } return FALSE; } - + return TRUE; } @@ -1056,7 +1056,7 @@ T_MFW_GPRS_DATA *gprs_data = (T_MFW_GPRS_DATA *)para; // Structure that stores data from mfw USHORT textId; int result; - + tracefunction("GPRS_MfwCb()"); if (!data) @@ -1065,11 +1065,11 @@ } /* Result of GPRS_NOTHING will not be sent */ - + result = GPRS_NOTHING; /* Find GPRS status */ - + if (idleIsFocussed()) { /* Update idle screen icons to show any change in GPRS status */ @@ -1080,7 +1080,7 @@ /* iconsShow calls GPRS_Status; if we don't call that, call this on its own */ GPRS_Status(); } - + switch(event) { case E_MFW_GPRS_S_CNTXT: @@ -1089,14 +1089,14 @@ case E_MFW_GPRS_S_ATT: trace("GPRS_MfwCb: E_MFW_GPRS_S_ATT"); - + // Dec 01, 2005 REF: DR OMAPS00048530 x0039928 // Fix : Set the current status to attaching or detaching depending on the request. if (data->reg_status!= GPRS_ATTACHED) data->status = MMI_GPRS_STATUS_ATTACHING; else data->status = MMI_GPRS_STATUS_DETACHING; - + if (data->display) { if (data->reg_status!= GPRS_ATTACHED) @@ -1116,7 +1116,7 @@ trace("GPRS_MfwCb: E_MFW_GPRS_S_ACT"); /* Notify of context activation */ - result = GPRS_CONTEXT_ACTIVATE; + result = GPRS_CONTEXT_ACTIVATE; break; case E_MFW_GPRS_R_ACT: @@ -1172,7 +1172,7 @@ case E_MFW_GPRS_R_EREP_RJ: trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_RJ"); - + /* Notify of context deactivation */ result = GPRS_CONTEXT_DEACTIVATE; @@ -1182,15 +1182,15 @@ trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_ATT"); /* Attach status has changed, display message as appropriate */ - + if (data->display) { if (data->reg_status==GPRS_ATTACHED) textId = TxtAttached; else textId = TxtNotAttached; - - /* Show result */ + + /* Show result */ GPRS_ResultScreen(win, TxtGPRS, textId); } data->status = MMI_GPRS_STATUS_IDLE; @@ -1232,7 +1232,7 @@ #endif // Dec 01, 2005 REF: DR OMAPS00048530 x0039928 // Fix : Display GPRS attached only if the request is for attaching. - if(data->status == MMI_GPRS_STATUS_ATTACHING) + if(data->status == MMI_GPRS_STATUS_ATTACHING) { /* Show result */ if (data->display) @@ -1242,7 +1242,7 @@ } data->status = MMI_GPRS_STATUS_IDLE; break; - + case GPRS_OFF: #ifdef MMI_HOMEZONE_ENABLED //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 @@ -1295,9 +1295,9 @@ { GPRS_ResultScreen(win, TxtGPRS, TxtError); } - break; + break; } - + break; case E_MFW_GPRS_S_SMSSERV: @@ -1305,7 +1305,7 @@ trace_P1("Service: %d", data->sms_service); data->status = MMI_GPRS_STATUS_IDLE; - + /* Display "Using <service>" */ if (data->display) @@ -1330,8 +1330,8 @@ TxtId2 = TxtNull; break; } - - /* Show result */ + + /* Show result */ GPRS_ResultScreen(win, TxtId1, TxtId2); } break; @@ -1344,15 +1344,15 @@ trace("GPRS_MfwCb: E_MFW_GPRS_ERROR"); data->status = MMI_GPRS_STATUS_IDLE; - + /* Display "GPRS Error" */ if (data->display) { /* Delete please wait window */ - GPRS_PleaseWaitDestroy(); - - /* Show result */ + GPRS_PleaseWaitDestroy(); + + /* Show result */ GPRS_ResultScreen(win, TxtGPRS, TxtFailed); } @@ -1364,12 +1364,12 @@ trace("GPRS_MfwCb: E_MFW_GPRS_CONNECT"); data->status = MMI_GPRS_STATUS_IDLE; - + if (data->display) { /* Delete please wait window */ - GPRS_PleaseWaitDestroy(); - + GPRS_PleaseWaitDestroy(); + /* Display "CONNECTED" window */ info_screen(win, TxtGPRS, TxtConnected, NULL); } @@ -1379,11 +1379,11 @@ trace("GPRS_MfwCb: E_MFW_GPRS_ERR_CONNECT"); data->status = MMI_GPRS_STATUS_IDLE; - + /* Display "GPRS No Answer" */ if (data->display) { - /* Show result */ + /* Show result */ GPRS_ResultScreen(win, TxtGPRS, TxtNoAnswer); } break; @@ -1393,18 +1393,18 @@ /* Add values returned from ACI * to total counter */ - + data->uplink_counter += (ULONG)(gprs_data->counter.octets_uplink); data->downlink_counter += (ULONG)(gprs_data->counter.octets_downlink); /* Only display counter if user has requested it */ - + if (data->display) { data->display = FALSE; /* Delete please wait window */ GPRS_PleaseWaitDestroy(); - + GPRS_ShowCounter(win); } break; @@ -1415,12 +1415,12 @@ } /* Send a notification if appropriate */ - + if (data->callback!=NULL && result!=GPRS_NOTHING) { data->callback(result); } - + return TRUE; } @@ -1442,7 +1442,7 @@ T_MMI_GPRS_DATA *data = GPRS_Data(); T_MFW_HND win = mfw_parent(mfw_header()); /* int gprsStatus; */ /* Warning Correction */ - + tracefunction("GPRS_MenuAttach()"); if (!data) @@ -1459,7 +1459,7 @@ if (data->reg_status==(int)GPRS_ATTACHED) { - /* Show result */ + /* Show result */ GPRS_ResultScreen(win, TxtAlreadyAttached, TxtAttached); return FALSE; } @@ -1494,12 +1494,12 @@ { return FALSE; } - + /* Check to make sure gprs handle exists */ if (!data->mfw_gprs) { - /* Show result */ + /* Show result */ GPRS_ResultScreen(win, TxtNotAttached, TxtNull); return FALSE; } @@ -1519,7 +1519,7 @@ /* Try to detach */ GPRS_Detach(win); - + return TRUE; } @@ -1548,28 +1548,28 @@ { return FALSE; } - + data->counter_type = MMI_GPRS_COUNTER_DOWNLINK; /* SPR#1875 - SH - Now DOWNLINK */ data->display = TRUE; data->status = MMI_GPRS_STATUS_DATA_COUNTER; GPRS_PleaseWait(win, TxtPleaseWait, NULL); /* SPR#1986 */ - + /* If a data call is in progress, counter is now reset every * time we check it - MMI keeps track of total. * If a data call is not in progress, display current total from MMI */ - + result = gprs_counter(TRUE); switch(result) { /* Waiting for rAT_PercentSNCNT callback, don't update display yet */ - - case MFW_RES_OK: + + case MFW_RES_OK: trace("gprs_counter executing, awaiting confirmation."); break; /* We're not connected - display current total */ - + case MfwResDone: GPRS_PleaseWaitDestroy(); data->display = FALSE; @@ -1577,14 +1577,14 @@ break; /* Error has occurred */ - + default: GPRS_PleaseWaitDestroy(); data->display = FALSE; info_screen(win, TxtGPRS,TxtError, NULL); break; } - + return TRUE; } @@ -1613,7 +1613,7 @@ { return FALSE; } - + data->counter_type = MMI_GPRS_COUNTER_UPLINK; /* SPR#1875 - SH - Now UPLINK */ data->display = TRUE; data->status = MMI_GPRS_STATUS_DATA_COUNTER; @@ -1622,19 +1622,19 @@ /* If a data call is in progress, counter is now reset every * time we check it - MMI keeps track of total. * If a data call is not in progress, display current total from MMI */ - + result = gprs_counter(TRUE); switch(result) { /* Waiting for rAT_PercentSNCNT callback, don't update display yet */ - + case MFW_RES_OK: trace("gprs_counter executing, awaiting confirmation."); break; /* We're not connected - display current total */ - + case MfwResDone: GPRS_PleaseWaitDestroy(); data->display = FALSE; @@ -1642,14 +1642,14 @@ break; /* Error has occurred */ - + default: GPRS_PleaseWaitDestroy(); data->display = FALSE; info_screen(win, TxtGPRS,TxtError, NULL); break; } - + return TRUE; } @@ -1720,14 +1720,14 @@ TRACE_EVENT("** No MFW gprs **"); return FALSE; } - + data->display = TRUE; if(!GPRS_SetSmsService(menu->lCursor[menu->level])) { info_screen(win, TxtFailed, NULL, NULL); } - + return TRUE; } @@ -1758,7 +1758,7 @@ { return NULL; } - + /* Delete any previous window */ GPRS_PleaseWaitDestroy(); @@ -1792,33 +1792,33 @@ static void GPRS_PleaseWaitCb(T_MFW_HND win, UBYTE identifier, UBYTE reason) { T_MMI_GPRS_DATA *data = GPRS_Data(); - + tracefunction("GPRS_PleaseWaitCb()"); if (!data) { return; } - + /* Dialog already destroyed by this point */ data->pleasewait_win = NULL; - + switch(reason) { case INFO_TIMEOUT: - + /* Delete window */ - + info_screen(data->menu_win, TxtTimedOut, NULL, NULL); data->status = MMI_GPRS_STATUS_IDLE; break; - + case INFO_KCD_HUP: case INFO_KCD_RIGHT: - + /*Cancel current operation */ - + switch(data->status) { case MMI_GPRS_STATUS_ATTACHING: @@ -1835,7 +1835,7 @@ } break; } - + return; } @@ -1856,20 +1856,20 @@ static void GPRS_PleaseWaitDestroy(void) { T_MMI_GPRS_DATA *data = GPRS_Data(); - + tracefunction("GPRS_PleaseWaitDestroy()"); if (!data) { return; } - + if (data->pleasewait_win) { SEND_EVENT(data->pleasewait_win, DIALOG_DESTROY, NULL, NULL); data->pleasewait_win = NULL; } - + return; } @@ -1903,22 +1903,22 @@ { return; } - + /* Destroy old editor if it exists */ - + if (data->edit_win) { GPRS_DestroyCounter(); } /* Set appropriate title string (corrected) */ - + switch(data->counter_type) { case MMI_GPRS_COUNTER_DOWNLINK: titleId = TxtIncomingData; break; - + case MMI_GPRS_COUNTER_UPLINK: titleId = TxtOutgoingData; break; @@ -1967,7 +1967,7 @@ editor_data.editor_attr.text = data->counterstring; /* Create the dialog handler */ - + data->edit_win = editor_start(win, &editor_data); /* start the editor */ #endif /* NEW_EDITOR */ @@ -1993,18 +1993,18 @@ { T_MMI_GPRS_DATA *data = GPRS_Data(); T_DISPLAY_DATA display_info; - + tracefunction("GPRS_ShowCounterCb()"); if (!data) { return; } - + switch(reason) { /* Prompt whether to reset */ - + case INFO_KCD_LEFT: dlg_initDisplayData_TextId(&display_info, TxtCancel, TxtReset, TxtDataCounterReset, TxtNull, COLOUR_STATUS); dlg_initDisplayData_events(&display_info, (T_VOID_FUNC) GPRS_ResetCounter, TEN_SECS, KEY_HUP|KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); @@ -2033,7 +2033,7 @@ $Returns: None $Arguments: Standard callback parameters - + *******************************************************************************/ static void GPRS_ResetCounter(T_MFW_HND win, UBYTE identifier, UBYTE reason) @@ -2046,11 +2046,11 @@ { return; } - + switch(reason) { /* RSK - Reset counter */ - + case INFO_KCD_RIGHT: if (data->counter_type==MMI_GPRS_COUNTER_UPLINK) { @@ -2060,17 +2060,17 @@ { data->downlink_counter = 0; } - + GPRS_ShowCounter(win); break; - + /* LSK or HUP - cancel without resetting */ - + case INFO_KCD_LEFT: case INFO_KCD_HUP: break; } - + return; } @@ -2084,7 +2084,7 @@ $Returns: None $Arguments: None - + *******************************************************************************/ static void GPRS_DestroyCounter() @@ -2092,17 +2092,17 @@ T_MMI_GPRS_DATA *data = GPRS_Data(); tracefunction("GPRS_DestroyCounter()"); - + if (!data) { return; } - + if (data->edit_win) { /* New Editor */ - + #ifdef NEW_EDITOR AUI_edit_Destroy(data->edit_win); #else @@ -2112,7 +2112,7 @@ data->counterstring = NULL; data->edit_win = NULL; } - + return; } @@ -2139,15 +2139,15 @@ { return; } - + counter = 0; - + switch(data->counter_type) { case MMI_GPRS_COUNTER_UPLINK: counter = data->uplink_counter; break; - + case MMI_GPRS_COUNTER_DOWNLINK: counter = data->downlink_counter; break;