comparison src/ui/bmi/mmiAoc.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 db101b57af2d
comparison
equal deleted inserted replaced
91:c3d28a37caad 92:c0052fe355d3
28 $History: MmiAoc.c 28 $History: MmiAoc.c
29 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M 29 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M
30 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) 30 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge )
31 Solution:Made the following changes 31 Solution:Made the following changes
32 1. Based on the value of Aoc_flag it will be decided to disply 'charge/Timers' menu or not. 32 1. Based on the value of Aoc_flag it will be decided to disply 'charge/Timers' menu or not.
33 33
34 June 16, 2005 REF: CRR 31267 x0021334 34 June 16, 2005 REF: CRR 31267 x0021334
35 Description: Handset ignore the initializtion of the PIN1/PIN2 35 Description: Handset ignore the initializtion of the PIN1/PIN2
36 Fix: Cheking is done to ascertain if PIN1/PIN2 are initialised. If not, appropriate 36 Fix: Cheking is done to ascertain if PIN1/PIN2 are initialised. If not, appropriate
37 message is displayed to the user. 37 message is displayed to the user.
38 38
39 09/04/01 Original Condat(UK) BMI version. 39 09/04/01 Original Condat(UK) BMI version.
40 May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI 40 May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI
41 Issue description: On the SIM EF(ACMMax) is defined as 0xFFFFFF, so it should be possible to 41 Issue description: On the SIM EF(ACMMax) is defined as 0xFFFFFF, so it should be possible to
42 enter 16777215, but only 999999 is accepted. 42 enter 16777215, but only 999999 is accepted.
43 Solution: MAX_ENTER_LIMIT changed from 7 to 9. A check is done to verify that the entered 43 Solution: MAX_ENTER_LIMIT changed from 7 to 9. A check is done to verify that the entered
44 ACMmax value is less that 0xFFFFFF. Otherwise "Not Allowed" message is displayed. 44 ACMmax value is less that 0xFFFFFF. Otherwise "Not Allowed" message is displayed.
45 45
46 $End 46 $End
47 47
48 *******************************************************************************/ 48 *******************************************************************************/
160 #define SERVICES_OUT_OF_RANGE 715 160 #define SERVICES_OUT_OF_RANGE 715
161 #define SERVICES_AOC_NOT_SUPPORTED 716 161 #define SERVICES_AOC_NOT_SUPPORTED 716
162 #define PIN_REQUEST_FOR_RESET_CHARGE 717 162 #define PIN_REQUEST_FOR_RESET_CHARGE 717
163 163
164 /* May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI 164 /* May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI
165 MAX_ENTER_LIMIT changed from 7 to 9 to accept "Limit" values till 16777215 (0xFFFFFF) 165 MAX_ENTER_LIMIT changed from 7 to 9 to accept "Limit" values till 16777215 (0xFFFFFF)
166 Previously, with MAX_ENTER_LIMIT set to 7, maximum 999999 could be entered as limit. 166 Previously, with MAX_ENTER_LIMIT set to 7, maximum 999999 could be entered as limit.
167 Effectively, the limit is MAX_ENTER_LIMIT - 1. The last character used for string termination. 167 Effectively, the limit is MAX_ENTER_LIMIT - 1. The last character used for string termination.
168 Also, the maximum value that can be entered (0xFFFFFF) is # defined to MAX_ENTER_VALUE 168 Also, the maximum value that can be entered (0xFFFFFF) is # defined to MAX_ENTER_VALUE
169 */ 169 */
170 /* Max. Enter of Character */ 170 /* Max. Enter of Character */
812 // Password not necessary, Pin2 scenario done 812 // Password not necessary, Pin2 scenario done
813 memset(PWD, 0x00, 16); 813 memset(PWD, 0x00, 16);
814 814
815 // May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI 815 // May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI
816 816
817 // If the ACMmax value entered by the user is more than 16777215 (0xFFFFFF), 817 // If the ACMmax value entered by the user is more than 16777215 (0xFFFFFF),
818 // display a "Not Allowed" message. 818 // display a "Not Allowed" message.
819 if(data->aocInfo.acm_max > MAX_ENTER_VALUE) 819 if(data->aocInfo.acm_max > MAX_ENTER_VALUE)
820 { 820 {
821 // Send event to display a "Not Allowed" message. 821 // Send event to display a "Not Allowed" message.
822 SEND_EVENT (win, SERVICES_AOC_NOT_SUPPORTED, 0, 0); 822 SEND_EVENT (win, SERVICES_AOC_NOT_SUPPORTED, 0, 0);
823 } 823 }
824 824
825 // Else set the ACMmax value in AoC. 825 // Else set the ACMmax value in AoC.
826 else 826 else
827 { 827 {
828 result = cm_set_aoc_value(CM_AOC_ACMMAX, &data->aocInfo, PWD); /* save ACMmax in AOC */ 828 result = cm_set_aoc_value(CM_AOC_ACMMAX, &data->aocInfo, PWD); /* save ACMmax in AOC */
829 829
830 TRACE_EVENT_P1("%ld", data->aocInfo.acm_max); 830 TRACE_EVENT_P1("%ld", data->aocInfo.acm_max);
1364 #ifdef NEPTUNE_BOARD 1364 #ifdef NEPTUNE_BOARD
1365 sprintf(line, "%ld %s", data->aocInfo.acm, data->aocInfo.cur); 1365 sprintf(line, "%ld %s", data->aocInfo.acm, data->aocInfo.cur);
1366 #else 1366 #else
1367 service_calculate (win, (char*)line, data->aocInfo.acm); 1367 service_calculate (win, (char*)line, data->aocInfo.acm);
1368 #endif 1368 #endif
1369 1369
1370 TRACE_EVENT ("calculate ACM * PPU; PPU !=0 and ACM!=0"); 1370 TRACE_EVENT ("calculate ACM * PPU; PPU !=0 and ACM!=0");
1371 } 1371 }
1372 1372
1373 if (data->aocInfo.acm EQ '\0') 1373 if (data->aocInfo.acm EQ '\0')
1374 strcpy ((char *)line, "0"); 1374 strcpy ((char *)line, "0");
1597 char line2[MAX_LINE]; 1597 char line2[MAX_LINE];
1598 char *pdest,*src,*dst,*POINT; 1598 char *pdest,*src,*dst,*POINT;
1599 LONG result; 1599 LONG result;
1600 int ch = '.'; 1600 int ch = '.';
1601 UBYTE counter=0; 1601 UBYTE counter=0;
1602 1602
1603 /*SPR2500, check validity of pinters before continuing*/ 1603 /*SPR2500, check validity of pinters before continuing*/
1604 if ((!win) || 1604 if ((!win) ||
1605 (!win_data) || 1605 (!win_data) ||
1606 (!data)) 1606 (!data))
1607 { 1607 {
1714 1714
1715 *******************************************************************************/ 1715 *******************************************************************************/
1716 UBYTE getAOCflag(void) 1716 UBYTE getAOCflag(void)
1717 { 1717 {
1718 return Aoc_flag; 1718 return Aoc_flag;
1719 } 1719 }
1720 #endif 1720 #endif
1721 1721
1722 1722
1723 /******************************************************************************* 1723 /*******************************************************************************
1724 1724
1743 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS 1743 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS
1744 //The 'Charge/Timers' menu should be displayed if CPHS is not supported. 1744 //The 'Charge/Timers' menu should be displayed if CPHS is not supported.
1745 if (CphsPresent() != TRUE) 1745 if (CphsPresent() != TRUE)
1746 { 1746 {
1747 TRACE_EVENT("CPHS is not present in this SIM"); 1747 TRACE_EVENT("CPHS is not present in this SIM");
1748 setAOCflag(TRUE); 1748 setAOCflag(TRUE);
1749 } 1749 }
1750 TRACE_EVENT_P1("Values: Aoc_flag = %d - 1 Indicates AOC is set in the CSP", getAOCflag()); 1750 TRACE_EVENT_P1("Values: Aoc_flag = %d - 1 Indicates AOC is set in the CSP", getAOCflag());
1751 TRACE_EVENT_P1("status : cphs_status = %d ", CphsPresent()); 1751 TRACE_EVENT_P1("status : cphs_status = %d ", CphsPresent());
1752 #endif 1752 #endif
1753 1753
1754 if (access.access_acm EQ MFW_SIM_PIN2 && 1754 if (access.access_acm EQ MFW_SIM_PIN2 &&
1755 access.access_acmmax EQ MFW_SIM_PIN2 && 1755 access.access_acmmax EQ MFW_SIM_PIN2 &&
1756 access.access_puct EQ MFW_SIM_PIN2) 1756 access.access_puct EQ MFW_SIM_PIN2)
1757 { 1757 {
1758 TRACE_EVENT("PIN 2 required"); 1758 TRACE_EVENT("PIN 2 required");
1774 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS 1774 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS
1775 #ifdef FF_CPHS 1775 #ifdef FF_CPHS
1776 if (getAOCflag()) 1776 if (getAOCflag())
1777 return MFW_SIM_PIN_REQ; 1777 return MFW_SIM_PIN_REQ;
1778 else 1778 else
1779 return MFW_SIM_NO_AOC; 1779 return MFW_SIM_NO_AOC;
1780 #else 1780 #else
1781 return MFW_SIM_PIN_REQ; 1781 return MFW_SIM_PIN_REQ;
1782 #endif 1782 #endif
1783 } 1783 }
1784 else if (access.access_acm EQ MFW_SIM_NO_PIN && 1784 else if (access.access_acm EQ MFW_SIM_NO_PIN &&
1785 access.access_acmmax EQ MFW_SIM_NO_PIN && 1785 access.access_acmmax EQ MFW_SIM_NO_PIN &&
1786 access.access_puct EQ MFW_SIM_NO_PIN) 1786 access.access_puct EQ MFW_SIM_NO_PIN)
1812 return MFW_SIM_NO_PIN; 1812 return MFW_SIM_NO_PIN;
1813 else 1813 else
1814 return MFW_SIM_NO_AOC; 1814 return MFW_SIM_NO_AOC;
1815 } 1815 }
1816 #endif 1816 #endif
1817 1817
1818 } 1818 }
1819 1819
1820 /******************************************************************************* 1820 /*******************************************************************************
1821 1821
1822 $Function: service_check_aoc 1822 $Function: service_check_aoc