FreeCalypso > hg > fc-tourmaline
changeset 142:ec9f955fc487
mmiBook*.c: bogotab fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 14 Nov 2020 08:43:59 +0000 |
parents | 67b91d34f75e |
children | fbe284e160c1 |
files | src/ui/bmi/mmiBookCallDetailsWindow.c src/ui/bmi/mmiBookCallListWindow.c src/ui/bmi/mmiBookController.c src/ui/bmi/mmiBookDetailsWindow.c src/ui/bmi/mmiBookMenuWindow.c src/ui/bmi/mmiBookPhonebook.c src/ui/bmi/mmiBookSDNWindow.c src/ui/bmi/mmiBookSearchWindow.c src/ui/bmi/mmiBookServices.c src/ui/bmi/mmiBookShared.c src/ui/bmi/mmiBookUtils.c |
diffstat | 11 files changed, 5271 insertions(+), 5620 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ui/bmi/mmiBookCallDetailsWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookCallDetailsWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,21 +9,21 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookCallDetailsWindow.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookCallDetailsWindow.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** Description: This provides the implementation of the call details window for the - phone book module + phone book module ******************************************************************************** $History: MmiBookCallDetailsWindow.c @@ -33,11 +33,11 @@ the fix done as part of CRR 22638 reverted back as it isn't clean Aug 24, 2004 REF: CRR 22638 xrashmic - Bug: E-Sample switches off when you attempt to look at details of a number - in call list. - Fix: Using the data stored in global variable to avoid corrupt data. + Bug: E-Sample switches off when you attempt to look at details of a number + in call list. + Fix: Using the data stored in global variable to avoid corrupt data. - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End // Issue Number : SPR#12874 on 31/03/04 by Rashmi.C.N. @@ -45,7 +45,6 @@ - /******************************************************************************* Include Files @@ -152,16 +151,16 @@ /******************************************************************************* - $Function: bookCallDetails + $Function: bookCallDetails - $Description: dialog function for the call details windows + $Description: dialog function for the call details windows - $Returns: None. + $Returns: None. - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ @@ -170,541 +169,531 @@ T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; tBookStandard *data = (tBookStandard *)win_data->user; #ifdef NEW_EDITOR - T_MFW_PHB_ENTRY p_pEntry; - tMmiPhbData current = data->phbk->current; - T_MFW_PHB_ENTRY *my = ¤t.entry[ current.selectedName - current.missedCallsOffset ]; - T_ATB_TEXT nameText; - T_ATB_TEXT numberText; - T_ATB_TEXT otherText; - char *TempBuffer = (char *)ALLOC_MEMORY(CALLDETAILS_INFO_LEN); - char *time; - char *date; + T_MFW_PHB_ENTRY p_pEntry; + tMmiPhbData current = data->phbk->current; + T_MFW_PHB_ENTRY *my = ¤t.entry[ current.selectedName - current.missedCallsOffset ]; + T_ATB_TEXT nameText; + T_ATB_TEXT numberText; + T_ATB_TEXT otherText; + char *TempBuffer = (char *)ALLOC_MEMORY(CALLDETAILS_INFO_LEN); + char *time; + char *date; TRACE_FUNCTION( "bookCallDetails()" ); - /* SPR#1428 - SH - New Editor changes - * Moved all this stuff here from the WinCb - it shouldn't be there! */ + /* SPR#1428 - SH - New Editor changes + * Moved all this stuff here from the WinCb - it shouldn't be there! */ - /* try to get the name from the phone book, null the structure out - if we can't find it at all - */ + /* try to get the name from the phone book, null the structure out + if we can't find it at all + */ - if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) - { - bookCopyPhbName(my, &p_pEntry,PHB_MAX_LEN); - my->name.len = p_pEntry.name.len; - } - else - { - my->name.len = 0; - } + if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) + { + bookCopyPhbName(my, &p_pEntry,PHB_MAX_LEN); + my->name.len = p_pEntry.name.len; + } + else + { + my->name.len = 0; + } - numberText.dcs = ATB_DCS_ASCII; - numberText.data = my->number; - ATB_string_Length(&numberText); + numberText.dcs = ATB_DCS_ASCII; + numberText.data = my->number; + ATB_string_Length(&numberText); #ifdef EASY_TEXT_ENABLED - if ( my->name.data[0] ==0x80) - { - /* UNICODE */ - nameText.dcs = ATB_DCS_UNICODE; - nameText.data = &my->name.data[2]; - } - else + if ( my->name.data[0] ==0x80) + { + /* UNICODE */ + nameText.dcs = ATB_DCS_UNICODE; + nameText.data = &my->name.data[2]; + } + else #endif /* EASY_TEXT_ENABLED */ - { - /* ASCII */ - nameText.dcs = ATB_DCS_ASCII; - nameText.data = my->name.data; - } + { + /* ASCII */ + nameText.dcs = ATB_DCS_ASCII; + nameText.data = my->name.data; + } - ATB_string_Length(&nameText); + ATB_string_Length(&nameText); - ATB_edit_ResetMode(data->editor, ED_MODE_READONLY); /* Switch off read only to add text */ - ATB_edit_ClearAll(data->editor); /* Blank the editor */ - ATB_edit_InsertString(data->editor, &nameText); - ATB_edit_Char(data->editor, ctrlEnter, FALSE); - ATB_edit_InsertString(data->editor, &numberText); - ATB_edit_Char(data->editor, ctrlEnter, FALSE); + ATB_edit_ResetMode(data->editor, ED_MODE_READONLY); /* Switch off read only to add text */ + ATB_edit_ClearAll(data->editor); /* Blank the editor */ + ATB_edit_InsertString(data->editor, &nameText); + ATB_edit_Char(data->editor, ctrlEnter, FALSE); + ATB_edit_InsertString(data->editor, &numberText); + ATB_edit_Char(data->editor, ctrlEnter, FALSE); - if (CphsPresent() == TRUE) - { - sprintf(TempBuffer, "Line %d", my->line); - otherText.dcs = ATB_DCS_ASCII; - otherText.data = (UBYTE *)TempBuffer; - ATB_string_Length(&otherText); - ATB_edit_InsertString(data->editor, &otherText); - ATB_edit_Char(data->editor, ctrlEnter, FALSE); - } + if (CphsPresent() == TRUE) + { + sprintf(TempBuffer, "Line %d", my->line); + otherText.dcs = ATB_DCS_ASCII; + otherText.data = (UBYTE *)TempBuffer; + ATB_string_Length(&otherText); + ATB_edit_InsertString(data->editor, &otherText); + ATB_edit_Char(data->editor, ctrlEnter, FALSE); + } - /* API - 10/09/03 - SPR2513 - Add support to display chinese Data & Time */ - /* API - 05/09/03 - SPR2357 - Get the character string for the date */ + /* API - 10/09/03 - SPR2513 - Add support to display chinese Data & Time */ + /* API - 05/09/03 - SPR2357 - Get the character string for the date */ - date = MmiRsrcGetText(TxtCallDate); + date = MmiRsrcGetText(TxtCallDate); - if(Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) - { - otherText.dcs = ATB_DCS_UNICODE; - otherText.data = (UBYTE *)date; - } - else - { - otherText.dcs = ATB_DCS_ASCII; - otherText.data = (UBYTE *)date; - } - ATB_string_Length(&otherText); - ATB_edit_InsertString(data->editor, &otherText); + if(Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) + { + otherText.dcs = ATB_DCS_UNICODE; + otherText.data = (UBYTE *)date; + } + else + { + otherText.dcs = ATB_DCS_ASCII; + otherText.data = (UBYTE *)date; + } + ATB_string_Length(&otherText); + ATB_edit_InsertString(data->editor, &otherText); - /* API - 05/09/03 - SPR2357 - END */ - /* API - 10/09/03 - SPR2513 - END */ + /* API - 05/09/03 - SPR2357 - END */ + /* API - 10/09/03 - SPR2513 - END */ - // API - 21-01-03 - 1566 - Date and Time displayed for Recent calls + // API - 21-01-03 - 1566 - Date and Time displayed for Recent calls - // change by Sasken ( Rashmi C N) on March 31th 2004 - // Issue Number : MMI-SPR-12874 - // Bug: Wrong date and time in the Missed call details. - // Solution: converting the date and time into decimal format used in the + // change by Sasken ( Rashmi C N) on March 31th 2004 + // Issue Number : MMI-SPR-12874 + // Bug: Wrong date and time in the Missed call details. + // Solution: converting the date and time into decimal format used in the // phonebook management. - sprintf((char*)TempBuffer, "%.2d/%.2d/%.2d",(UBYTE)((my->date.day[0])<<4)+(UBYTE) my->date.day[1], - (UBYTE) ((my->date.month[0])<<4)+(UBYTE) my->date.month[1], - (UBYTE) ((my->date.year[0])<<4)+(UBYTE) my->date.year[1]); - otherText.dcs = ATB_DCS_ASCII; - otherText.data = (UBYTE *)TempBuffer; - ATB_string_Length(&otherText); - ATB_edit_InsertString(data->editor, &otherText); - ATB_edit_Char(data->editor, ctrlEnter, FALSE); - + sprintf((char*)TempBuffer, "%.2d/%.2d/%.2d",(UBYTE)((my->date.day[0])<<4)+(UBYTE) my->date.day[1], + (UBYTE) ((my->date.month[0])<<4)+(UBYTE) my->date.month[1], + (UBYTE) ((my->date.year[0])<<4)+(UBYTE) my->date.year[1]); + otherText.dcs = ATB_DCS_ASCII; + otherText.data = (UBYTE *)TempBuffer; + ATB_string_Length(&otherText); + ATB_edit_InsertString(data->editor, &otherText); + ATB_edit_Char(data->editor, ctrlEnter, FALSE); - /* API - 10/09/03 - SPR2513 - Add support to display chinese Data & Time */ - /* API - 05/09/03 - SPR2357 - Get the character string for the Time */ + /* API - 10/09/03 - SPR2513 - Add support to display chinese Data & Time */ + /* API - 05/09/03 - SPR2357 - Get the character string for the Time */ - time = MmiRsrcGetText(TxtCallTime); + time = MmiRsrcGetText(TxtCallTime); - if(Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) - { - otherText.dcs = ATB_DCS_UNICODE; - otherText.data = (UBYTE *)time; - } - else - { - otherText.dcs = ATB_DCS_ASCII; - otherText.data = (UBYTE *)time; - } + if(Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) + { + otherText.dcs = ATB_DCS_UNICODE; + otherText.data = (UBYTE *)time; + } + else + { + otherText.dcs = ATB_DCS_ASCII; + otherText.data = (UBYTE *)time; + } - ATB_edit_InsertString(data->editor, &otherText); + ATB_edit_InsertString(data->editor, &otherText); - /* API - 05/09/03 - SPR2357 - END */ - /* API - 10/09/03 - SPR2513 - END */ + /* API - 05/09/03 - SPR2357 - END */ + /* API - 10/09/03 - SPR2513 - END */ - // API - 21-01-03 - 1566 - Date and Time displayed for Recent calls + // API - 21-01-03 - 1566 - Date and Time displayed for Recent calls - // change by Sasken ( Rashmi C N) on March 31th 2004 - // Issue Number : MMI-SPR-12874 - // Bug: Wrong date and time in the Missed call details. - // Solution: converting the date and time into decimal format used in the + // change by Sasken ( Rashmi C N) on March 31th 2004 + // Issue Number : MMI-SPR-12874 + // Bug: Wrong date and time in the Missed call details. + // Solution: converting the date and time into decimal format used in the // phonebook management. - sprintf((char*)TempBuffer, "%.2d:%.2d", (UBYTE) ((my->time.hour[0])<<4)+(UBYTE) my->time.hour[1], - (UBYTE) ((my->time.minute[0])<<4)+(UBYTE) my->time.minute[1]); + sprintf((char*)TempBuffer, "%.2d:%.2d", (UBYTE) ((my->time.hour[0])<<4)+(UBYTE) my->time.hour[1], + (UBYTE) ((my->time.minute[0])<<4)+(UBYTE) my->time.minute[1]); - otherText.dcs = ATB_DCS_ASCII; - otherText.data = (UBYTE *)TempBuffer; - ATB_string_Length(&otherText); - ATB_edit_InsertString(data->editor, &otherText); + otherText.dcs = ATB_DCS_ASCII; + otherText.data = (UBYTE *)TempBuffer; + ATB_string_Length(&otherText); + ATB_edit_InsertString(data->editor, &otherText); - ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ + ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ - FREE_MEMORY((void *)TempBuffer, CALLDETAILS_INFO_LEN); + FREE_MEMORY((void *)TempBuffer, CALLDETAILS_INFO_LEN); - /* show the editor and update the soft keys - */ - /* SH - the string has changed, so we need to refresh the word-wrap */ - ATB_edit_Refresh(data->editor); - win_show(data->win); + /* show the editor and update the soft keys + */ + /* SH - the string has changed, so we need to refresh the word-wrap */ + ATB_edit_Refresh(data->editor); + win_show(data->win); #else /* NEW_EDITOR */ - if ( event == CALL_DETAILS_INIT ) - winShow( data->win ); + if ( event == CALL_DETAILS_INIT ) + winShow( data->win ); #endif /* NEW_EDITOR */ } - - /******************************************************************************* - $Function: bookCallDetailsWinCB + $Function: bookCallDetailsWinCB - $Description: Window call back function + $Description: Window call back function - $Returns: MFW_EVENT_CONSUMED + $Returns: MFW_EVENT_CONSUMED - $Arguments: e, event to be handles, w, window handle + $Arguments: e, event to be handles, w, window handle *******************************************************************************/ static int bookCallDetailsWinCB( MfwEvt e, MfwWin *w ) { - tBookStandard * data = (tBookStandard *)w->user; -// char *Time; // RAVI -// char *Date; // RAVI + tBookStandard * data = (tBookStandard *)w->user; +// char *Time; // RAVI +// char *Date; // RAVI - TRACE_FUNCTION("bookCallDetailsWinCB"); - switch( e ) + TRACE_FUNCTION("bookCallDetailsWinCB"); + switch( e ) { case MfwWinVisible: - { + { /* SPR#1428 - SH - New Editor changes - Just show editor, calculate text * string to display in bookCallDetails() */ #ifdef NEW_EDITOR - ATB_edit_Show(data->editor); - resources_setTitleColour(COLOUR_EDITOR); + ATB_edit_Show(data->editor); + resources_setTitleColour(COLOUR_EDITOR); - /* TITLE */ + /* TITLE */ - dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); - PROMPT(0,0,0,TxtDetails); + dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); + PROMPT(0,0,0,TxtDetails); #else /* NEW_EDITOR */ - char TempBuffer[32]; - T_MFW_PHB_ENTRY p_pEntry; - tMmiPhbData current = data->phbk->current; - T_MFW_PHB_ENTRY *my = ¤t.entry[ current.selectedName - current.missedCallsOffset ]; + char TempBuffer[32]; + T_MFW_PHB_ENTRY p_pEntry; + tMmiPhbData current = data->phbk->current; + T_MFW_PHB_ENTRY *my = ¤t.entry[ current.selectedName - current.missedCallsOffset ]; - /* default screen update prior to painting below - */ - dspl_ClearAll(); + /* default screen update prior to painting below + */ + dspl_ClearAll(); - /* try to get the name from the phone book, null the structure out - if we can't find it at all - */ + /* try to get the name from the phone book, null the structure out + if we can't find it at all + */ #ifdef NO_ASCIIZ - { - UBYTE result; + { + UBYTE result; - if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) - { - + if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) + { //GW Copy name and length - bookCopyPhbName(my, &p_pEntry,PHB_MAX_LEN); - my->name.len = p_pEntry.name.len; - } - else - { - TRACE_EVENT(">>>>Length set to zero"); - my->name.len = 0; - } + bookCopyPhbName(my, &p_pEntry,PHB_MAX_LEN); + my->name.len = p_pEntry.name.len; + } + else + { + TRACE_EVENT(">>>>Length set to zero"); + my->name.len = 0; + } - } + } #else /* NO_ASCIIZ */ - if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) - bookCopyPhbName(my, &p_pEntry, NAME_SCREEN_MAX); //GW Copy name - else - memset( (char*) my->name, '\0', NAME_SCREEN_MAX ); + if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) ) + bookCopyPhbName(my, &p_pEntry, NAME_SCREEN_MAX); //GW Copy name + else + memset( (char*) my->name, '\0', NAME_SCREEN_MAX ); #endif /* NO_ASCIIZ */ - memset((char*)TempBuffer ,'\0',32); + memset((char*)TempBuffer ,'\0',32); - /* API - 1203 - 30/09/02 - Add the Data and the Time to the TempBuffer to be shown when the details of a - LDN, LMN etc is looked at. Currently commented out as the ACI does not store the - numbers at present and garbage would be displayed. - */ + /* API - 1203 - 30/09/02 - Add the Data and the Time to the TempBuffer to be shown when the details of a + LDN, LMN etc is looked at. Currently commented out as the ACI does not store the + numbers at present and garbage would be displayed. + */ - /* API - 1542 - 10/01/03 - Update from issue above Added the values written to the structure by ACI to - display them to the user. - */ + /* API - 1542 - 10/01/03 - Update from issue above Added the values written to the structure by ACI to + display them to the user. + */ - /* API - 05/09/03 - SPR2357 - Get the character string for the date and time */ - Time = MmiRsrcGetText(TxtCallTime); - Date = MmiRsrcGetText(TxtCallDate); + /* API - 05/09/03 - SPR2357 - Get the character string for the date and time */ + Time = MmiRsrcGetText(TxtCallTime); + Date = MmiRsrcGetText(TxtCallDate); - sprintf((char*)TempBuffer,"%s%d%d%s%d%d%s %s%d%d%s%d%d%s%d%d%s", - Time, (UBYTE) my->time.hour[0], (UBYTE) my->time.hour[1], ":", - (UBYTE) my->time.minute[0], (UBYTE) my->time.minute[1], "\n", - Date, (UBYTE) my->date.day[0], (UBYTE) my->date.day[1], "/", - (UBYTE) my->date.month[0], (UBYTE) my->date.month[1], "/", - (UBYTE) my->date.year[0], (UBYTE) my->date.year[1], "\n"); - /* API - 05/09/03 - SPR2357 - END */ + sprintf((char*)TempBuffer,"%s%d%d%s%d%d%s %s%d%d%s%d%d%s%d%d%s", + Time, (UBYTE) my->time.hour[0], (UBYTE) my->time.hour[1], ":", + (UBYTE) my->time.minute[0], (UBYTE) my->time.minute[1], "\n", + Date, (UBYTE) my->date.day[0], (UBYTE) my->date.day[1], "/", + (UBYTE) my->date.month[0], (UBYTE) my->date.month[1], "/", + (UBYTE) my->date.year[0], (UBYTE) my->date.year[1], "\n"); + /* API - 05/09/03 - SPR2357 - END */ #ifdef NO_ASCIIZ #ifdef EASY_TEXT_ENABLED /*MC SPR 1242, changed macros to function calls e.g FIRST_LINE_CHINESE->Mmi_layout_first_line()*/ - if (my->name.data[0] ==0x80)//if unicode - { //display name as unicode - dspl_TextOut(0,0, DSPL_TXTATTR_UNICODE, (char *)my->name.data); - if ((my->name.data[MAX_LINE+2] != 0) && (my->name.data[MAX_LINE+3] != 0)) - dspl_TextOut(0, Mmi_layout_first_line(), 0, (char *) &my->name.data[MAX_LINE+2]); - //display number - dspl_TextOut(0, Mmi_layout_second_line(), 0, (char *) my->number); - if (strlen((char *) my->number) > MAX_LINE) -/*MC end*/ dspl_TextOut(0, Mmi_layout_second_line() + 8, 0, (char *) &my->number[MAX_LINE]); - } - else + if (my->name.data[0] ==0x80)//if unicode + { //display name as unicode + dspl_TextOut(0,0, DSPL_TXTATTR_UNICODE, (char *)my->name.data); + if ((my->name.data[MAX_LINE+2] != 0) && (my->name.data[MAX_LINE+3] != 0)) + dspl_TextOut(0, Mmi_layout_first_line(), 0, (char *) &my->name.data[MAX_LINE+2]); + //display number + dspl_TextOut(0, Mmi_layout_second_line(), 0, (char *) my->number); + if (strlen((char *) my->number) > MAX_LINE) +/*MC end*/ dspl_TextOut(0, Mmi_layout_second_line() + 8, 0, (char *) &my->number[MAX_LINE]); + } + else #endif /* EASY_TEXT_ENABLED */ - { - if (CphsPresent() == TRUE) - { - sprintf( (char *) data->edtBuf, "%s%s%s%s%d%s%s", - (char *) my->name.data, "\n", - (char *) my->number,"\n Line ", my->line,"\n", - TempBuffer ); - } - else - sprintf( (char *) data->edtBuf, "%s%s%s%s%s", - (char *) my->name.data, "\n", - (char *) my->number,"\n", - TempBuffer ); + { + if (CphsPresent() == TRUE) + { + sprintf( (char *) data->edtBuf, "%s%s%s%s%d%s%s", + (char *) my->name.data, "\n", + (char *) my->number,"\n Line ", my->line,"\n", + TempBuffer ); + } + else + sprintf( (char *) data->edtBuf, "%s%s%s%s%s", + (char *) my->name.data, "\n", + (char *) my->number,"\n", + TempBuffer ); - /* show the editor and update the soft keys - */ - edtShow( data->edt ); - } + /* show the editor and update the soft keys + */ + edtShow( data->edt ); + } #else /* NO_ASCIIZ */ - if (CphsPresent() == TRUE) - { - sprintf( (char *) data->edtBuf, "%s%s%s%s%d%s%s", - (char *) my->name, "\n", - (char *) my->number,"\n Line ", my->line,"\n", - TempBuffer ); - } - else - sprintf( (char *) data->edtBuf, "%s%s%s%s%s", - (char *) my->name, "\n", - (char *) my->number,"\n", - TempBuffer ); + if (CphsPresent() == TRUE) + { + sprintf( (char *) data->edtBuf, "%s%s%s%s%d%s%s", + (char *) my->name, "\n", + (char *) my->number,"\n Line ", my->line,"\n", + TempBuffer ); + } + else + sprintf( (char *) data->edtBuf, "%s%s%s%s%s", + (char *) my->name, "\n", + (char *) my->number,"\n", + TempBuffer ); - /* show the editor and update the soft keys - */ - edtShow( data->edt ); + /* show the editor and update the soft keys + */ + edtShow( data->edt ); #endif /* NO_ASCIIZ */ #endif /* NEW_EDITOR */ - displaySoftKeys( TxtNull, TxtSoftBack ); - } - break; + displaySoftKeys( TxtNull, TxtSoftBack ); + } + break; default: - { - /* default processing, we return IGNORED here and let the - default handler pick up the ball - */ - return MFW_EVENT_PASSED; - } + { + /* default processing, we return IGNORED here and let the + default handler pick up the ball + */ + return MFW_EVENT_PASSED; + } } return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookCallDetailsKeyCB + $Function: bookCallDetailsKeyCB - $Description: normal keyboard handler + $Description: normal keyboard handler - $Returns: MFW_EVENT_CONSUMED in all cases + $Returns: MFW_EVENT_CONSUMED in all cases - $Arguments: e, event to be handled, k keyboard handle + $Arguments: e, event to be handled, k keyboard handle *******************************************************************************/ static int bookCallDetailsKeyCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_HND win = mfwParent( mfw_header() ); T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; tBookStandard *data = (tBookStandard *) win_data->user; - /* make sure we handle null keyboards - */ - if ( k == NULL ) - return MFW_EVENT_CONSUMED; + /* make sure we handle null keyboards + */ + if ( k == NULL ) + return MFW_EVENT_CONSUMED; - /* deal with the incoming key code - */ + /* deal with the incoming key code + */ switch( k->code ) { - case KCD_MNUDOWN: - { - /* scroll down event - */ + case KCD_MNUDOWN: + { + /* scroll down event + */ - if ( data->phbk->current.selectedName == data->phbk->current.status.used_entries-1 ) - { - data->phbk->current.selectedName = 0; - } - else - data->phbk->current.selectedName++; + if ( data->phbk->current.selectedName == data->phbk->current.status.used_entries-1 ) + { + data->phbk->current.selectedName = 0; + } + else + data->phbk->current.selectedName++; - } + } break; case KCD_MNUUP: - { - /* scroll up event - */ - if ( data->phbk->current.selectedName == 0 ) - { - data->phbk->current.selectedName = data->phbk->current.status.used_entries-1; - } - else - data->phbk->current.selectedName--; - } + { + /* scroll up event + */ + if ( data->phbk->current.selectedName == 0 ) + { + data->phbk->current.selectedName = data->phbk->current.status.used_entries-1; + } + else + data->phbk->current.selectedName--; + } break; case KCD_CALL: - { - /* left, implies make call - */ - callNumber( data->phbk->current.entry[data->phbk->current.selectedName].number ); - bookPhonebookDestroy( data->phbk->win ); - } - break; + { + /* left, implies make call + */ + callNumber( data->phbk->current.entry[data->phbk->current.selectedName].number ); + bookPhonebookDestroy( data->phbk->win ); + } + break; case KCD_RIGHT: - { - bookCallDetailsDestroy(data->win); - } + { + bookCallDetailsDestroy(data->win); + } break; case KCD_HUP: - { - /* clear, destroy the window - */ - bookCallDetailsDestroy( data->win ); - } - break; + { + /* clear, destroy the window + */ + bookCallDetailsDestroy( data->win ); + } + break; default: - { - /* no default behaviour required - */ - } - break; + { + /* no default behaviour required + */ + } + break; } - /* if we have scrolled then the behaviour needs to be to perform another - search to get the window updated correctly - */ - if ( ( k->code == KCD_MNUUP ) || ( k->code == KCD_MNUDOWN ) ) - { - SEND_EVENT(data->win, 0, 0, 0); + /* if we have scrolled then the behaviour needs to be to perform another + search to get the window updated correctly + */ + if ( ( k->code == KCD_MNUUP ) || ( k->code == KCD_MNUDOWN ) ) + { + SEND_EVENT(data->win, 0, 0, 0); winShow( win ); - } + } - /* and always return consumed - */ + /* and always return consumed + */ return MFW_EVENT_CONSUMED; } - /******************************************************************************* - $Function: bookCallDetailsKbdLongCB + $Function: bookCallDetailsKbdLongCB - $Description: Keyboard Long Press event handler + $Description: Keyboard Long Press event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, keyboard handle + $Arguments: e, event, k, keyboard handle *******************************************************************************/ static int bookCallDetailsKeyLongCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - /* hand a long clear event only - */ - if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) - bookCallDetailsDestroy( data->win ); + /* hand a long clear event only + */ + if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) + bookCallDetailsDestroy( data->win ); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookCallDetailsCreate + $Function: bookCallDetailsCreate - $Description: Creates the window and associates editors and keyboards + $Description: Creates the window and associates editors and keyboards with it. - $Returns: handle of the newly created window, or NULL if failure + $Returns: handle of the newly created window, or NULL if failure - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ static T_MFW_HND bookCallDetailsCreate( MfwHnd parent ) { - T_MFW_WIN *win_data; - tBookStandard *data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ); - T_MFW_WIN *parent_win_data = ((T_MFW_HDR *)parent)->data; - T_phbk *phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ); + T_MFW_WIN *parent_win_data = ((T_MFW_HDR *)parent)->data; + T_phbk *phbk = (T_phbk *)parent_win_data->user; - TRACE_FUNCTION ("phbk_call_details_create()"); + TRACE_FUNCTION ("phbk_call_details_create()"); - /* Deal with allocation failure on the data block - */ - if ( ! data ) - return NULL; + /* Deal with allocation failure on the data block + */ + if ( ! data ) + return NULL; - /* create the window - */ - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookCallDetailsWinCB ) ) == NULL ) - return NULL; + /* create the window + */ + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookCallDetailsWinCB ) ) == NULL ) + return NULL; - /* Associate the dialog and user data areas - */ - data->mmi_control.dialog = (T_DIALOG_FUNC) bookCallDetails; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *) data; - data->parent_win = parent; + /* Associate the dialog and user data areas + */ + data->mmi_control.dialog = (T_DIALOG_FUNC) bookCallDetails; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *) data; + data->parent_win = parent; /* Create the keyboards and editor objects, and associate a phone book handler */ - data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookCallDetailsKeyCB ); + data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookCallDetailsKeyCB ); data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookCallDetailsKeyLongCB ); - /*OMAPS00115777 - a0393213(R.Prabakar) - Details of any Missed call number shows Invalid information - The phonebook should be set before sending any event to 'call details window'*/ - data->phbk = phbk; - /* 1945 MZ Initialise the edtBuf */ - memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); + /*OMAPS00115777 - a0393213(R.Prabakar) - Details of any Missed call number shows Invalid information + The phonebook should be set before sending any event to 'call details window'*/ + data->phbk = phbk; + /* 1945 MZ Initialise the edtBuf */ + memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - AUI_edit_SetAttr( &data->editor_attr, PHB_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, - ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR2102*/, (UBYTE*) data->edtBuf, STANDARD_EDITOR_SIZE); - data->editor = ATB_edit_Create(&data->editor_attr,0); - SEND_EVENT(data->win, 0, 0, 0); - ATB_edit_Init(data->editor); + AUI_edit_SetAttr( &data->editor_attr, PHB_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, + ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR2102*/, (UBYTE*) data->edtBuf, STANDARD_EDITOR_SIZE); + data->editor = ATB_edit_Create(&data->editor_attr,0); + SEND_EVENT(data->win, 0, 0, 0); + ATB_edit_Init(data->editor); #else/*NEW_EDITOR*/ - bookSetEditAttributes( PHB_EDITOR, COLOUR_EDITOR_XX , 0, edtCurBar1, 0, - (char*) data->edtBuf, STANDARD_EDITOR_SIZE, &data->attr ); - data->edt = edtCreate( data->win, &data->attr, 0, 0 ); + bookSetEditAttributes( PHB_EDITOR, COLOUR_EDITOR_XX , 0, edtCurBar1, 0, + (char*) data->edtBuf, STANDARD_EDITOR_SIZE, &data->attr ); + data->edt = edtCreate( data->win, &data->attr, 0, 0 ); #endif /*NEW_EDITOR*/ - - /* return the handle to the newly created window - */ + /* return the handle to the newly created window + */ return data->win; } @@ -719,74 +708,69 @@ /******************************************************************************* - $Function: bookCallDetailsStart + $Function: bookCallDetailsStart - $Description: entry point for the call details window + $Description: entry point for the call details window - $Returns: handle of newly created window, or NULL + $Returns: handle of newly created window, or NULL - $Arguments: parent, handle of the parent window + $Arguments: parent, handle of the parent window *******************************************************************************/ T_MFW_HND bookCallDetailsStart( MfwHnd parent ) { - T_MFW_HND win; + T_MFW_HND win; - TRACE_FUNCTION( "bookCallDetailsStart()" ); + TRACE_FUNCTION( "bookCallDetailsStart()" ); - /* create and initialise the window - */ + /* create and initialise the window + */ if ( ( win = bookCallDetailsCreate( parent ) ) != NULL ) SEND_EVENT( win, CALL_DETAILS_INIT, 0, 0 ); - /* return the handle, or NULL if it failed to be created correctly - */ + /* return the handle, or NULL if it failed to be created correctly + */ return win; } - /******************************************************************************* - $Function: bookCallDetailsDestroy + $Function: bookCallDetailsDestroy - $Description: destroys the call details window + $Description: destroys the call details window - $Returns: None. + $Returns: None. - $Arguments: window, hande of the window to be destroyed + $Arguments: window, hande of the window to be destroyed *******************************************************************************/ void bookCallDetailsDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *)win->user; + T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *)win->user; - TRACE_FUNCTION ("bookCallDetailsDestroy()"); + TRACE_FUNCTION ("bookCallDetailsDestroy()"); - if ( data ) - { - /* SPR#1428 - SH - New Editor changes */ + if ( data ) + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* New editor isn't automatically destroyed with winDelete, - * so we destroy it here */ - if (data->editor) - { - ATB_edit_Destroy(data->editor); - } + /* New editor isn't automatically destroyed with winDelete, + * so we destroy it here */ + if (data->editor) + { + ATB_edit_Destroy(data->editor); + } #endif - winDelete( data->win ); - FREE_MEMORY( (unsigned char *) data, sizeof( tBookStandard ) ); - } + winDelete( data->win ); + FREE_MEMORY( (unsigned char *) data, sizeof( tBookStandard ) ); + } } - - - - /******************************************************************************* End of File
--- a/src/ui/bmi/mmiBookCallListWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookCallListWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookCallListWindow.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookCallListWindow.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -32,21 +32,21 @@ the fix done as part of CRR 22638 reverted back as it isn't clean July 21,2006 REF:DR OMAPS00085695 x0047075 - Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto. - Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the - current selected entry. + Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto. + Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the + current selected entry. Apr 05, 2006 REF: OMAPS00073906 a0393213 (Prabakar R) Bug : Phone will crash when check the Missed calls list and press the direction key Fix : unnecessary function calls are removed Aug 24, 2004 REF: CRR 22638 xrashmic - Bug: E-Sample switches off when you attempt to look at details of a number - in call list. - Fix: Storing the data in a global variable to be used later. + Bug: E-Sample switches off when you attempt to look at details of a number + in call list. + Fix: Storing the data in a global variable to be used later. - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -54,7 +54,6 @@ - /******************************************************************************* Include Files @@ -118,7 +117,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -140,7 +138,6 @@ #include "MmiBookShared.h" - /******************************************************************************* Local Data Structure Definitions @@ -148,9 +145,9 @@ *******************************************************************************/ #define NO_FAILURE (-1) -int idCounter = 0; -static char missedCalls[40]; -char calls[10]; +int idCounter = 0; +static char missedCalls[40]; +char calls[10]; /******************************************************************************* @@ -162,308 +159,306 @@ /******************************************************************************* - $Function: bookCallListSetupEntries + $Function: bookCallListSetupEntries - $Description: Populates the call list display with the current values + $Description: Populates the call list display with the current values - $Returns: None + $Returns: None - $Arguments: Current, pointer to the entry in question + $Arguments: Current, pointer to the entry in question *******************************************************************************/ static void bookCallListSetupEntries( tMmiPhbData *Current ) { - T_MFW_PHB_ENTRY p_pEntry; - int index; + T_MFW_PHB_ENTRY p_pEntry; + int index; - /* search the phone book(s) - */ - for ( index = 0; index < Current->list.num_entries; index++ ) - { - //GW Copy name text (for NO_ASCII set/clear) and length - //GW but only if there is an entry! - if ( bookFindNameInPhonebook( (const char *) Current->entry[ index ].number, &p_pEntry ) ) - bookCopyPhbName(&Current->entry[ index ], &p_pEntry, PHONEBOOK_ITEM_LENGTH/*SPR2123*/); - } + /* search the phone book(s) + */ + for ( index = 0; index < Current->list.num_entries; index++ ) + { + //GW Copy name text (for NO_ASCII set/clear) and length + //GW but only if there is an entry! + if ( bookFindNameInPhonebook( (const char *) Current->entry[ index ].number, &p_pEntry ) ) + bookCopyPhbName(&Current->entry[ index ], &p_pEntry, PHONEBOOK_ITEM_LENGTH/*SPR2123*/); + } } - - /******************************************************************************* - $Function: bookCallListDialog + $Function: bookCallListDialog - $Description: Dialog functino for the phone book call list window + $Description: Dialog functino for the phone book call list window - $Returns: None + $Returns: None - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ static void bookCallListDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *)win_data->user; - tMmiPhbData *Current = &data->phbk->current; - MfwMnu *mnu; + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *)win_data->user; + tMmiPhbData *Current = &data->phbk->current; + MfwMnu *mnu; - int Failure; + int Failure; TRACE_FUNCTION ("bookCallListDialog()"); TRACE_EVENT ("jgg-bookCallListDialog()"); - /* Handle the dialog events - */ + /* Handle the dialog events + */ switch (event) - { - case CALLS_LIST_INIT: - { - /* Initialise message - */ + { + case CALLS_LIST_INIT: + { + /* Initialise message + */ //July 21,2006 REF:DR OMAPS00085695 x0047075 //Fix: After deleting an entry in the phonebook,we make First entry as the current selected entry . - Current->selectedName = 0; - data->phbk->current.index = 1; - data->phbk->current.status.book = (int)parameter; + Current->selectedName = 0; + data->phbk->current.index = 1; + data->phbk->current.status.book = (int)parameter; - /* If we are currently loading the phone book we can't go any - further, so indicate a failure condition - */ - Failure = ( phb_get_mode() == PHB_LOADING ) ? TxtPleaseWait : NO_FAILURE; + /* If we are currently loading the phone book we can't go any + further, so indicate a failure condition + */ + Failure = ( phb_get_mode() == PHB_LOADING ) ? TxtPleaseWait : NO_FAILURE; - /* grab the current status of the phone book, and - check that it's okay - */ - if ( Failure == NO_FAILURE ) - { - bookGetCurrentStatus( &data->phbk->current.status ); + /* grab the current status of the phone book, and + check that it's okay + */ + if ( Failure == NO_FAILURE ) + { + bookGetCurrentStatus( &data->phbk->current.status ); - /* Issue 2538, MZ 25/09/03 Only read the number of used records from the Service Table - when initialising the calls list. */ + /* Issue 2538, MZ 25/09/03 Only read the number of used records from the Service Table + when initialising the calls list. */ - Failure = ( bookFindName(data->phbk->current.status.used_entries, &data->phbk->current ) != MFW_PHB_OK ) - ? TxtReadError : NO_FAILURE; - } + Failure = ( bookFindName(data->phbk->current.status.used_entries, &data->phbk->current ) != MFW_PHB_OK ) + ? TxtReadError : NO_FAILURE; + } - /* Check for an empty list - */ - if ( Failure == NO_FAILURE ) - Failure = ( data->phbk->current.index == 0 ) ? TxtEmptyList : NO_FAILURE; + /* Check for an empty list + */ + if ( Failure == NO_FAILURE ) + Failure = ( data->phbk->current.index == 0 ) ? TxtEmptyList : NO_FAILURE; - /* api patch 03-04-02 - */ - if ((Failure != NO_FAILURE) && (idCounter > 0)) - Failure = NO_FAILURE; + /* api patch 03-04-02 + */ + if ((Failure != NO_FAILURE) && (idCounter > 0)) + Failure = NO_FAILURE; - /* If everything is okay we can try to find the name in the - phone book, otherwise Failure will contain an error message - */ - if ( Failure == NO_FAILURE ) - { - bookCallListSetupEntries( &data->phbk->current ); + /* If everything is okay we can try to find the name in the + phone book, otherwise Failure will contain an error message + */ + if ( Failure == NO_FAILURE ) + { + bookCallListSetupEntries( &data->phbk->current ); //July 21,2006 REF:DR OMAPS00085695 x0047075 // Fix: After deleting an entry in the phonebook,we make First entry as the Current selected entry. - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; - winShow( data->win ); - } - else - { - /* If we get to here and the failure flag isn't NO_FAILURE then - it'll be set to the id of the message we need to present, so - show the information dialog and destroy the call list window - */ - bookShowInformation( data->phbk->win, Failure, NULL, NULL ); - bookCallListDestroy( data->win ); - } - } - break; - case SEARCH_SCROLL_UP: - { - /* Scroll up - */ - - if(( Current->selectedName == 1) && (Current->status.used_entries == 1)) - Current->selectedName = Current->selectedName; + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; + winShow( data->win ); + } + else + { + /* If we get to here and the failure flag isn't NO_FAILURE then + it'll be set to the id of the message we need to present, so + show the information dialog and destroy the call list window + */ + bookShowInformation( data->phbk->win, Failure, NULL, NULL ); + bookCallListDestroy( data->win ); + } + } + break; + case SEARCH_SCROLL_UP: + { + /* Scroll up + */ - else if ( ( Current->index == 1 ) && ( Current->selectedName == Current->missedCallsOffset ) ) - { - if ( (Current->status.used_entries + Current->missedCallsOffset) < MAX_SEARCH_CALL_LIST ) - Current->selectedName = Current->status.used_entries -1; - else - Current->selectedName = MAX_SEARCH_CALL_LIST - 1; - Current->index = Current->status.used_entries + Current->missedCallsOffset - Current->selectedName; - } - else - { - if(Current->selectedName == Current->missedCallsOffset) - { - if(Current->index == 1 + Current->missedCallsOffset) - Current->selectedName = Current->missedCallsOffset; - Current->index--; - } - else - Current->selectedName--; - } - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; + if(( Current->selectedName == 1) && (Current->status.used_entries == 1)) + Current->selectedName = Current->selectedName; - //Apr 05, 2006 REF: OMAPS00073906 a0393213 (Prabakar R) - //Bug : Phone will crash when check the Missed calls list and press the direction key - //Fix : unnecessary function calls(bookFindName and bookCallListSetupEntries) are removed - } - break; - - case SEARCH_SCROLL_DOWN: - { - /* Scroll Down - */ - - if ( ( Current->index + Current->selectedName ) == Current->status.used_entries + Current->missedCallsOffset) - { - Current->index = 1; - Current->selectedName = 0 + Current->missedCallsOffset; - } - else - { - if ( Current->selectedName == MAX_SEARCH_CALL_LIST - 1 ) - Current->index++; - else - Current->selectedName++; - } - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; + else if ( ( Current->index == 1 ) && ( Current->selectedName == Current->missedCallsOffset ) ) + { + if ( (Current->status.used_entries + Current->missedCallsOffset) < MAX_SEARCH_CALL_LIST ) + Current->selectedName = Current->status.used_entries -1; + else + Current->selectedName = MAX_SEARCH_CALL_LIST - 1; + Current->index = Current->status.used_entries + Current->missedCallsOffset - Current->selectedName; + } + else + { + if(Current->selectedName == Current->missedCallsOffset) + { + if(Current->index == 1 + Current->missedCallsOffset) + Current->selectedName = Current->missedCallsOffset; + Current->index--; + } + else + Current->selectedName--; + } + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; //Apr 05, 2006 REF: OMAPS00073906 a0393213 (Prabakar R) //Bug : Phone will crash when check the Missed calls list and press the direction key //Fix : unnecessary function calls(bookFindName and bookCallListSetupEntries) are removed - } - break; + } + break; - default: - { + case SEARCH_SCROLL_DOWN: + { + /* Scroll Down + */ - /* No need to deal with any other events - */ - } - break; - } + if ( ( Current->index + Current->selectedName ) == Current->status.used_entries + Current->missedCallsOffset) + { + Current->index = 1; + Current->selectedName = 0 + Current->missedCallsOffset; + } + else + { + if ( Current->selectedName == MAX_SEARCH_CALL_LIST - 1 ) + Current->index++; + else + Current->selectedName++; + } + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; + + //Apr 05, 2006 REF: OMAPS00073906 a0393213 (Prabakar R) + //Bug : Phone will crash when check the Missed calls list and press the direction key + //Fix : unnecessary function calls(bookFindName and bookCallListSetupEntries) are removed + } + break; + + default: + { + + /* No need to deal with any other events + */ + } + break; + } } /******************************************************************************* - $Function: bookCallListWinCB + $Function: bookCallListWinCB - $Description: Window Event Handler + $Description: Window Event Handler - $Returns: MFW_EVENT_CONSUMED if event handled, otherwise MFW_EVENT_PASSED + $Returns: MFW_EVENT_CONSUMED if event handled, otherwise MFW_EVENT_PASSED - $Arguments: standard window event handler, e, event, w, window handle + $Arguments: standard window event handler, e, event, w, window handle *******************************************************************************/ static int bookCallListWinCB( MfwEvt e, MfwWin *w ) { - tBookStandard *data = (tBookStandard *)w->user; - tMmiPhbData *Current = &data->phbk->current; - char *ptr; -// MfwMnu *mnu; // RAVI - int index, i; -// int Withheld; // RAVI + tBookStandard *data = (tBookStandard *)w->user; + tMmiPhbData *Current = &data->phbk->current; + char *ptr; +// MfwMnu *mnu; // RAVI + int index, i; +// int Withheld; // RAVI /* x0045876, 14-Aug-2006 (WR - "missedOutput" was set but never used) */ - /*int displayStart, missedOutput; */ - int displayStart; + /*int displayStart, missedOutput; */ + int displayStart; - TRACE_FUNCTION("bookCallListWinCB"); + TRACE_FUNCTION("bookCallListWinCB"); - /* x0045876, 14-Aug-2006 (WR - "missedOutput" was set but never used) */ - /* missedOutput = FALSE; */ + /* x0045876, 14-Aug-2006 (WR - "missedOutput" was set but never used) */ + /* missedOutput = FALSE; */ - /* api introduction to display withheld numbers in recent calls list - 03-04-02 - */ - switch( e ) + /* api introduction to display withheld numbers in recent calls list + 03-04-02 + */ + switch( e ) { case MfwWinVisible: - { - /* Handle the window visible event, show default screen, - populate the call list menu and put up default soft keys - */ - TRACE_EVENT_P1("<<<<idCounter Value is %d", idCounter); - MmiBookShowDefault(); + { + /* Handle the window visible event, show default screen, + populate the call list menu and put up default soft keys + */ + TRACE_EVENT_P1("<<<<idCounter Value is %d", idCounter); + MmiBookShowDefault(); - if(idCounter > 0) - { - /* x0045876, 14-Aug-2006 (WR - "missedOutput" was set but never used) */ - /* missedOutput = TRUE; */ + if(idCounter > 0) + { + /* x0045876, 14-Aug-2006 (WR - "missedOutput" was set but never used) */ + /* missedOutput = TRUE; */ - displayStart = 1; - strcpy(missedCalls,MmiRsrcGetText(TxtUnknown)); - strcat(missedCalls,": "); - sprintf(calls,"%d",idCounter); - strcat(missedCalls,calls); - data->phbk->current.missedCallsOffset = 1; - strcpy( (char*)MmiBookCallList( 0 ), (char*)missedCalls); - } - else - displayStart = 0; + displayStart = 1; + strcpy(missedCalls,MmiRsrcGetText(TxtUnknown)); + strcat(missedCalls,": "); + sprintf(calls,"%d",idCounter); + strcat(missedCalls,calls); + data->phbk->current.missedCallsOffset = 1; + strcpy( (char*)MmiBookCallList( 0 ), (char*)missedCalls); + } + else + displayStart = 0; - index = 0; + index = 0; - for ( i = displayStart; i < NAME_LIST_SIZE; i++ ) - { + for ( i = displayStart; i < NAME_LIST_SIZE; i++ ) + { #ifdef NO_ASCIIZ - if ( data->phbk->current.entry[index].name.len > 0 ) - ptr = (char *) data->phbk->current.entry[index].name.data; - else if(strlen((char *) data->phbk->current.entry[index].number) > 0) - ptr = (char *) data->phbk->current.entry[index].number; - else - ptr = ""; + if ( data->phbk->current.entry[index].name.len > 0 ) + ptr = (char *) data->phbk->current.entry[index].name.data; + else if(strlen((char *) data->phbk->current.entry[index].number) > 0) + ptr = (char *) data->phbk->current.entry[index].number; + else + ptr = ""; #else - if ( strlen( (char *) data->phbk->current.entry[index].name ) > 0 ) - ptr = (char *) data->phbk->current.entry[index].name; - else if (strlen((char *) data->phbk->current.entry[index].number) > 0) - ptr = (char *) data->phbk->current.entry[index].number; - else - ptr = ""; + if ( strlen( (char *) data->phbk->current.entry[index].name ) > 0 ) + ptr = (char *) data->phbk->current.entry[index].name; + else if (strlen((char *) data->phbk->current.entry[index].number) > 0) + ptr = (char *) data->phbk->current.entry[index].number; + else + ptr = ""; #endif - strcpy( (char*)MmiBookCallList( i ), ptr); - TRACE_FUNCTION((char*)MmiBookCallList( i )); - index ++; - strcpy( (char*)MmiBookCallList( index ), (char*)ptr); - TRACE_EVENT((char*)MmiBookCallList( index )); - } + strcpy( (char*)MmiBookCallList( i ), ptr); + TRACE_FUNCTION((char*)MmiBookCallList( i )); + index ++; + strcpy( (char*)MmiBookCallList( index ), (char*)ptr); + TRACE_EVENT((char*)MmiBookCallList( index )); + } - mnuUnhide(data->menu); + mnuUnhide(data->menu); - if((idCounter > 0) && (Current->status.used_entries == 0)) - displaySoftKeys( TxtNull, TxtSoftBack ); - else if((idCounter > 0) && (Current->status.used_entries > 0)) - displaySoftKeys( TxtSoftOptions, TxtSoftBack ); - else - displaySoftKeys( TxtSoftOptions, TxtSoftBack ); - } - break; + if((idCounter > 0) && (Current->status.used_entries == 0)) + displaySoftKeys( TxtNull, TxtSoftBack ); + else if((idCounter > 0) && (Current->status.used_entries > 0)) + displaySoftKeys( TxtSoftOptions, TxtSoftBack ); + else + displaySoftKeys( TxtSoftOptions, TxtSoftBack ); + } + break; default: - { - /* If it's not a window visible event we ignore it and - pass it back up the tree to be handled - */ - return MFW_EVENT_PASSED; - } -// break; // RAVI + { + /* If it's not a window visible event we ignore it and + pass it back up the tree to be handled + */ + return MFW_EVENT_PASSED; + } +// break; // RAVI } return MFW_EVENT_CONSUMED; @@ -472,191 +467,189 @@ /******************************************************************************* - $Function: bookCallListKbdCB + $Function: bookCallListKbdCB - $Description: Keyboard event handler + $Description: Keyboard event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, keyboard handle + $Arguments: e, event, k, keyboard handle *******************************************************************************/ static int bookCallListKbdCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - tMmiPhbData *Current = &data->phbk->current; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + tMmiPhbData *Current = &data->phbk->current; - /* Handle the events provided by the key - */ + /* Handle the events provided by the key + */ switch (k->code) { case KCD_MNUUP: { - SEND_EVENT( data->win, SEARCH_SCROLL_UP, 0, 0 ); + SEND_EVENT( data->win, SEARCH_SCROLL_UP, 0, 0 ); winShow(win); - } + } break; case KCD_MNUDOWN: - { - SEND_EVENT( data->win, SEARCH_SCROLL_DOWN, 0, 0 ); + { + SEND_EVENT( data->win, SEARCH_SCROLL_DOWN, 0, 0 ); winShow(win); - } + } break; case KCD_RIGHT: - bookPhonebookDestroy( data->phbk->win ); - break; - case KCD_CALL: - { - /* selected to call the number - */ - mnuHide( data->menu ); - callNumber( data->phbk->current.entry[data->phbk->current.selectedName - data->phbk->current.missedCallsOffset].number ); - bookPhonebookDestroy( data->phbk->win ); - } + bookPhonebookDestroy( data->phbk->win ); + break; + case KCD_CALL: + { + /* selected to call the number + */ + mnuHide( data->menu ); + callNumber( data->phbk->current.entry[data->phbk->current.selectedName - data->phbk->current.missedCallsOffset].number ); + bookPhonebookDestroy( data->phbk->win ); + } break; - case KCD_MNUSELECT: + case KCD_MNUSELECT: case KCD_LEFT: - { - /* Selected the options menu so display them - */ - if(Current->status.used_entries > 0) - data->phbk->menu_call_options_win = bookMenuStart( data->phbk->win, bookRepRedOptionsMenuAttributes(),0 ); - else - break; - } + { + /* Selected the options menu so display them + */ + if(Current->status.used_entries > 0) + data->phbk->menu_call_options_win = bookMenuStart( data->phbk->win, bookRepRedOptionsMenuAttributes(),0 ); + else + break; + } break; case KCD_HUP: - { - /* Selected to get out of here, so destroy the window - */ - bookCallListDestroy( data->win ); - } - break; + { + /* Selected to get out of here, so destroy the window + */ + bookCallListDestroy( data->win ); + } + break; - default: - { - /* No other handling required here - */ - } - break; + default: + { + /* No other handling required here + */ + } + break; } - /* Always consume the event - */ + /* Always consume the event + */ return MFW_EVENT_CONSUMED; } /******************************************************************************* - $Function: bookCallListKbdLongCB + $Function: bookCallListKbdLongCB - $Description: Keyboard Long Press event handler + $Description: Keyboard Long Press event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, keyboard handle + $Arguments: e, event, k, keyboard handle *******************************************************************************/ static int bookCallListKbdLongCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - /* hand a long clear event only - */ - if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) - bookCallListDestroy( data->win ); + /* hand a long clear event only + */ + if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) + bookCallListDestroy( data->win ); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookCallListCreate + $Function: bookCallListCreate - $Description: Create the call list window + $Description: Create the call list window - $Returns: Handle of the window, or NULL if there is an error + $Returns: Handle of the window, or NULL if there is an error - $Arguments: parent, handle of the parent window + $Arguments: parent, handle of the parent window *******************************************************************************/ static T_MFW_HND bookCallListCreate( MfwHnd parent ) { - T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; - T_phbk *phbk = (T_phbk *)parent_win_data->user; - T_MFW_WIN *win_data; - tBookStandard *data; - MfwMnu *mnu; + T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; + T_phbk *phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data; + MfwMnu *mnu; - TRACE_FUNCTION ("bookCallListCreate()"); + TRACE_FUNCTION ("bookCallListCreate()"); - /* allocate memory for our control block - */ - if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) - return NULL; + /* allocate memory for our control block + */ + if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) + return NULL; - /* Create the window if we can - */ - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookCallListWinCB ) ) == NULL ) - { - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - return NULL; - } - /*SPR 2123, MC allocate memory for phonebook list*/ - if (create_mmi_phonebook_names_list() == NULL) - return NULL; - /* Okay, we have created the control block and the window, so - we now need to configure the dialog and data pointers - */ - data->mmi_control.dialog = (T_DIALOG_FUNC) bookCallListDialog; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *) data; - data->phbk = phbk; - data->phbk->root_win = data->win; - data->phbk->calls_list_win = data->win; - data->parent_win = parent; + /* Create the window if we can + */ + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookCallListWinCB ) ) == NULL ) + { + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + return NULL; + } + /*SPR 2123, MC allocate memory for phonebook list*/ + if (create_mmi_phonebook_names_list() == NULL) + return NULL; + /* Okay, we have created the control block and the window, so + we now need to configure the dialog and data pointers + */ + data->mmi_control.dialog = (T_DIALOG_FUNC) bookCallListDialog; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *) data; + data->phbk = phbk; + data->phbk->root_win = data->win; + data->phbk->calls_list_win = data->win; + data->parent_win = parent; - /* create keyboards and menus for our window - */ - data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookCallListKbdCB ); - data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookCallListKbdLongCB ); - data->menu = mnuCreate( data->win, (MfwMnuAttr *)MmiBookMenuDetailsList(), 0, 0 ); + /* create keyboards and menus for our window + */ + data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookCallListKbdCB ); + data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookCallListKbdLongCB ); + data->menu = mnuCreate( data->win, (MfwMnuAttr *)MmiBookMenuDetailsList(), 0, 0 ); - mnu = (MfwMnu *) mfwControl( data->menu ); + mnu = (MfwMnu *) mfwControl( data->menu ); - /* api 19-04-02 - path to move cursor down one - in missed calls list. */ + /* api 19-04-02 - path to move cursor down one + in missed calls list. */ - if(idCounter > 0) - mnu->lCursor[mnu->level] = 1; - else - mnu->lCursor[mnu->level] = 0; + if(idCounter > 0) + mnu->lCursor[mnu->level] = 1; + else + mnu->lCursor[mnu->level] = 0; - mnuScrollMode(data->menu,0); + mnuScrollMode(data->menu,0); - /* allow the window and menu to be created - */ - mnuUnhide(data->menu); - winShow(data->win); + /* allow the window and menu to be created + */ + mnuUnhide(data->menu); + winShow(data->win); - /* And return the handle of the newly created window - */ + /* And return the handle of the newly created window + */ return data->win; } @@ -669,83 +662,81 @@ /******************************************************************************* - $Function: bookCallListStart + $Function: bookCallListStart - $Description: Entry point for the call list window + $Description: Entry point for the call list window - $Returns: Handle of window + $Returns: Handle of window - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ T_MFW_HND bookCallListStart( MfwHnd parent,int parameter ) { - T_MFW_HND win; + T_MFW_HND win; - /* create and initialise the window - */ + /* create and initialise the window + */ if ( ( win = bookCallListCreate( parent ) ) != NULL ) - SEND_EVENT( win, CALLS_LIST_INIT, 0, (void*)parameter ); + SEND_EVENT( win, CALLS_LIST_INIT, 0, (void*)parameter ); - /* return the handle, or NULL if we have had an error - */ + /* return the handle, or NULL if we have had an error + */ return win; } /******************************************************************************* - $Function: bookCallListDestroy + $Function: bookCallListDestroy - $Description: destroys the call list window + $Description: destroys the call list window - $Returns: None + $Returns: None - $Arguments: window, the window to be killed + $Arguments: window, the window to be killed *******************************************************************************/ void bookCallListDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *)win->user; + T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *)win->user; - TRACE_FUNCTION ("bookCallListDestroy()"); - /* Remove the Withheld counter from the list - */ - idCounter = 0; - memset (missedCalls, '\0', 40); - memset(calls, '\0', 10); + TRACE_FUNCTION ("bookCallListDestroy()"); + /* Remove the Withheld counter from the list + */ + idCounter = 0; + memset (missedCalls, '\0', 40); + memset(calls, '\0', 10); - /* Only actually do something if the data pointer is valid - */ - if ( ! data ) - return; + /* Only actually do something if the data pointer is valid + */ + if ( ! data ) + return; - /* If we are the root window then we need to deal with the - phonebook destruction - */ - if ( data->phbk->root_win == window ) - bookPhonebookDestroy(data->phbk->win); - else - { - /* delete our window and free the allocated memory - */ - data->phbk->calls_list_win = 0; - winDelete ( data->win ); - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - } - /*SPR2123, MC deallocate memory for phonebook list*/ - destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); + /* If we are the root window then we need to deal with the + phonebook destruction + */ + if ( data->phbk->root_win == window ) + bookPhonebookDestroy(data->phbk->win); + else + { + /* delete our window and free the allocated memory + */ + data->phbk->calls_list_win = 0; + winDelete ( data->win ); + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + } + /*SPR2123, MC deallocate memory for phonebook list*/ + destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); } - /******************************************************************************* End of File *******************************************************************************/ -
--- a/src/ui/bmi/mmiBookController.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookController.c Sat Nov 14 08:43:59 2020 +0000 @@ -11,12 +11,12 @@ $Project name: Basic MMI $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookController.c - $Revision: 1.0 + $Module: PhoneBook + $File: MmiBookController.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -30,47 +30,46 @@ $History: MmiBookController.c - Nov 10, 2006 DRT: OMAPS000103354 x0039928 - Description: Delete all failure in LDN Phonebook - Solution: phb_delete_all is called with the proper phone book as input. + Nov 10, 2006 DRT: OMAPS000103354 x0039928 + Description: Delete all failure in LDN Phonebook + Solution: phb_delete_all is called with the proper phone book as input. - Aug 18, 2006 ER: OMAPS00089840 x0039928 - Description: Changes to be made in MMI for the functionality "Delete all" ADN entries - Solution: A new menu item "Delete All" is added in the phone book menu. + Aug 18, 2006 ER: OMAPS00089840 x0039928 + Description: Changes to be made in MMI for the functionality "Delete all" ADN entries + Solution: A new menu item "Delete All" is added in the phone book menu. - July 21,2006 REF:DR OMAPS00085695 x0047075 - Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto. - Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the - current selected entry. + July 21,2006 REF:DR OMAPS00085695 x0047075 + Description:Fail to delete the correct entry in LDN, LRN and LMN with Locosto. + Solution:After deleting any entry in the LDN,LRN,LMN book,we highlight the first entry as the + current selected entry. - Jun 13, 2005 REF: SPR 31705 x0021308 + Jun 13, 2005 REF: SPR 31705 x0021308 Description: Once maximum limit of the My Number is exceeded, display info : Phonebook full, expected is MyNumber Full Solution: Replaced the Return tag in function Protected Menu Handler(booksetownNumber) from Phonebookfull with MyNumberfull. - Jun 13, 2005 REF: SPR 31710 x0021308 - Description: Once maximum limit of the FDN Number is exceeded, display info : Phonebook full, + Jun 13, 2005 REF: SPR 31710 x0021308 + Description: Once maximum limit of the FDN Number is exceeded, display info : Phonebook full, expected is FDNList Full Solution: Replaced the Return tag in function Protected Menu Handler(booksetownNumber) from Phonebookfull with FDNListfull While checking whether in FDNMenu is active using MenuFDN global variable. - Sep 22, 2004 REF: CRR 21392 xvilliva - Bug: PIN2 Screen is not displaying, While Adding FDN Number thru - Recent call Menu. - Fix: We add the "bookRepRedNameEnter" to "ProtectedActions" array. - If FDN is enabled, Pin2 will be asked. + Sep 22, 2004 REF: CRR 21392 xvilliva + Bug: PIN2 Screen is not displaying, While Adding FDN Number thru + Recent call Menu. + Fix: We add the "bookRepRedNameEnter" to "ProtectedActions" array. + If FDN is enabled, Pin2 will be asked. - June 26, 2006 REF : OMAPS00083148 x0023848 - Bug: SMS send is failed when trying through missed call list - Fix: Assignemnt of SmsData.called_from_reply_item to FALSE is Added + June 26, 2006 REF : OMAPS00083148 x0023848 + Bug: SMS send is failed when trying through missed call list + Fix: Assignemnt of SmsData.called_from_reply_item to FALSE is Added 25/10/00 Original Condat(UK) BMI version. - $End // Issue Number : MMI-FIX-12161 on 07/04/04 by Nishikant Kulkarni/Ajith K.P @@ -143,7 +142,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -242,7 +240,7 @@ NULL }; // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// This flag will indicate when we are in FDN menu +// This flag will indicate when we are in FDN menu int menuFDN; extern T_call call_data; @@ -286,10 +284,10 @@ // for phonebook is internal phone book, we avoid asking Pin2 accordingly. if(menuFDN == 0 && bookActiveBook(WRITE) == PHB_IPB) { - //Do nothing. + //Do nothing. } // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// Pin2 should be prompted when user does FDN related operations in FDN menu +// Pin2 should be prompted when user does FDN related operations in FDN menu // In FDN menu, receie an active call and FDN is disabled, pin2 should not be prompted for in call addressbook operations else if ( phb_get_mode() == PHB_RESTRICTED || (menuFDN && (call_data.calls.numCalls==0))) { @@ -335,26 +333,26 @@ */ static int Pin2Rqd( tProtectFunction FunTag, tProtectFunction FunPtr, tBookMfwMenu *Menu, tBookMfwMenuItem *Item ) { - pBookMfwWin win_data = (pBookMfwWin) bookWindowData(); - pBookPhonebook book = ((pBookStandard)win_data->user)->phbk; -// int i; // RAVI + pBookMfwWin win_data = (pBookMfwWin) bookWindowData(); + pBookPhonebook book = ((pBookStandard)win_data->user)->phbk; +// int i; // RAVI - /* Yup, so we need to store the pending action for - this window, this will be invoked by the checking - operation, indirectly, if the check is successful - */ - book->pin2_next = (T_VOID_FUNC) FunPtr; + /* Yup, so we need to store the pending action for + this window, this will be invoked by the checking + operation, indirectly, if the check is successful + */ + book->pin2_next = (T_VOID_FUNC) FunPtr; - //We're cheating and passing the current window to the - //handler via the unused menu parameter -- MC - book->menu = (tBookMfwMenu*) bookCurrentWindow(); - book->item = Item; + //We're cheating and passing the current window to the + //handler via the unused menu parameter -- MC + book->menu = (tBookMfwMenu*) bookCurrentWindow(); + book->item = Item; - /* Call out to get the pin2 number checked, this will - respond with a message back to this object, which - we will deal with on receipt - */ - return pin2_check( bookCurrentWindow()); + /* Call out to get the pin2 number checked, this will + respond with a message back to this object, which + we will deal with on receipt + */ + return pin2_check( bookCurrentWindow()); } /******************************************************************************* @@ -415,14 +413,14 @@ if (Phbk->UpdateAction!=ADD_FROM_IDLE) memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN ); /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); + memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); /* Indicate this is an additional entry being created */ Phbk->UpdateAction = CREATE_ENTRY; - // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) - // As the book is being changed for FDN menu operations, we need to - // get back the current book for the normal phonbook operations + // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) + // As the book is being changed for FDN menu operations, we need to + // get back the current book for the normal phonbook operations Phbk->current.status.book = bookActiveBook(READ); /* Determine if we have room to add any new entries @@ -442,17 +440,17 @@ */ /*If FDN menu active and no room for entries, then display FDN list full */ - tIndexTagNames Tag ; + tIndexTagNames Tag ; if(menuFDN) - { - Tag = ( Phbk->phbk->current.status.used_entries ) - ? TxtFDNListFull : TxtOperationNotAvail; //SPR 31710 x0021308:RamG - } + { + Tag = ( Phbk->phbk->current.status.used_entries ) + ? TxtFDNListFull : TxtOperationNotAvail; //SPR 31710 x0021308:RamG + } else - { - Tag = ( Phbk->phbk->current.status.used_entries ) + { + Tag = ( Phbk->phbk->current.status.used_entries ) ? TxtPhbkFull : TxtOperationNotAvail; - } + } bookShowInformation( win, Tag,NULL, NULL ); @@ -489,56 +487,56 @@ /* Indicate this is an edit of a current entry */ Phbk->UpdateAction = MODIFY_EXISTING; - /*MC SPR 1327, if UPN don't change phonebook type*/ + /*MC SPR 1327, if UPN don't change phonebook type*/ if (data->phbk->current.status.book != PHB_UPN) - data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->current.status.book = bookActiveBook(READ); - /*api - clear buffers before edit - */ - memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN ); - memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); + /*api - clear buffers before edit + */ + memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN ); + memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); TRACE_EVENT_P2("current phbk is = %d and current entry is = %d", data->phbk->current.status.book,data->phbk->current.entry[ data->phbk->current.selectedName ].book); - if(data->phbk->current.status.book == PHB_ADN_FDN) - { - if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN) - { - bookActivateFDN((T_MFW_HND)Menu); - } - else - { - /* And populate the buffers with the information to be modified - */ - #ifdef NO_ASCIIZ - /*MC , SPR 1242 copy whole name, merged from b-sample build*/ - memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN /*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/); - #else - memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN ); - #endif - memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN ); + if(data->phbk->current.status.book == PHB_ADN_FDN) + { + if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN) + { + bookActivateFDN((T_MFW_HND)Menu); + } + else + { + /* And populate the buffers with the information to be modified + */ + #ifdef NO_ASCIIZ + /*MC , SPR 1242 copy whole name, merged from b-sample build*/ + memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN /*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/); + #else + memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN ); + #endif + memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN ); - /* And edit the entry we currently have active - */ - Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number ); - } - } + /* And edit the entry we currently have active + */ + Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number ); + } + } else - { - /* And populate the buffers with the information to be modified - */ - #ifdef NO_ASCIIZ - /*MC , SPR 1242 copy whole name, merged from b-sample build*/ - memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN/*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/); - #else - memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN ); - #endif - memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN ); + { + /* And populate the buffers with the information to be modified + */ + #ifdef NO_ASCIIZ + /*MC , SPR 1242 copy whole name, merged from b-sample build*/ + memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name.data, MAX_ALPHA_LEN/*Phbk->current.entry[ Phbk->current.selectedName ].name.len*/); + #else + memcpy( Phbk->phbk->edt_buf_name, Phbk->current.entry[ Phbk->current.selectedName ].name, MAX_ALPHA_LEN ); + #endif + memcpy( Phbk->phbk->edt_buf_number, Phbk->current.entry[ Phbk->current.selectedName ].number, PHB_MAX_LEN ); - /* And edit the entry we currently have active - */ - Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number ); - } + /* And edit the entry we currently have active + */ + Phbk->input_number_win = bookInputStartNumberEditor( win, Phbk->edt_buf_number ); + } /* Always return event consumed */ return MFW_EVENT_CONSUMED; @@ -562,25 +560,25 @@ PROTECTED_MENU_HANDLER( bookNameDelete ) { - //recast the menu parameter as the current window -- MC - //and pass it on - //when ADN_FDN phonebook in use check if current entry is FDN - //is so then call information screen or allow entry to be deleted. --- AP 23/01/02 - //Issue 1944 MZ Allow an entry in FDN list to be deleted. + //recast the menu parameter as the current window -- MC + //and pass it on + //when ADN_FDN phonebook in use check if current entry is FDN + //is so then call information screen or allow entry to be deleted. --- AP 23/01/02 + //Issue 1944 MZ Allow an entry in FDN list to be deleted. T_MFW_HND win = (T_MFW_HND)Menu; T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; - /*MC SPR 1327, if UPN don't change phonebook type*/ + /*MC SPR 1327, if UPN don't change phonebook type*/ if (data->phbk->current.status.book != PHB_UPN) - data->phbk->current.status.book = bookActiveBook(READ); - if(data->phbk->current.status.book == PHB_ADN_FDN) - if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN) - bookActivateFDN((T_MFW_HND)Menu); - else - bookDeleteEntry((T_MFW_HND)Menu); - else - bookDeleteEntry((T_MFW_HND)Menu); + data->phbk->current.status.book = bookActiveBook(READ); + if(data->phbk->current.status.book == PHB_ADN_FDN) + if(data->phbk->current.entry[ data->phbk->current.selectedName ].book==PHB_FDN) + bookActivateFDN((T_MFW_HND)Menu); + else + bookDeleteEntry((T_MFW_HND)Menu); + else + bookDeleteEntry((T_MFW_HND)Menu); return MFW_EVENT_CONSUMED; } @@ -605,7 +603,7 @@ tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - callNumber( Phbk->current.entry[ Phbk->current.selectedName ].number ); + callNumber( Phbk->current.entry[ Phbk->current.selectedName ].number ); return MFW_EVENT_CONSUMED; } @@ -670,7 +668,7 @@ { MmiBookSetCurrentText(TxtFailed); bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL ); - bookPhonebookDestroy(Phbk->win); + bookPhonebookDestroy(Phbk->win); } return MFW_EVENT_CONSUMED; @@ -697,14 +695,13 @@ tBookStandard *data = (tBookStandard *) win_data->user; data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); return MFW_EVENT_CONSUMED; } - /******************************************************************************* $Function: bookNumberSearch @@ -726,8 +723,8 @@ tBookStandard *data = (tBookStandard *) win_data->user; data->phbk->current.KindOfSearch = SEARCH_BY_NUMBER; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); return MFW_EVENT_CONSUMED; } @@ -755,8 +752,8 @@ tBookStandard *data = (tBookStandard *) win_data->user; data->phbk->current.KindOfSearch = SEARCH_BY_LOCATION; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); return MFW_EVENT_CONSUMED; } @@ -778,12 +775,10 @@ PROTECTED_MENU_HANDLER( bookNameDeleteAll ) { -return NULL; + return NULL; } - - /******************************************************************************* $Function: bookNameMessage @@ -847,8 +842,8 @@ data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = PHB_UPN; - data->phbk->search_win = bookSearchStart( data->phbk->win ); + data->phbk->current.status.book = PHB_UPN; + data->phbk->search_win = bookSearchStart( data->phbk->win ); return MFW_EVENT_CONSUMED; } @@ -877,13 +872,13 @@ /* Clear the input editor structures before we go any further */ /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); + memset( Phbk->phbk->edt_buf_name, '\0', MAX_ALPHA_LEN ); memset( Phbk->phbk->edt_buf_number, '\0', PHB_MAX_LEN ); /* Indicate this is an additional entry being created */ Phbk->UpdateAction = CREATE_ENTRY; - data->phbk->current.status.book = PHB_UPN; + data->phbk->current.status.book = PHB_UPN; /* Determine if we have room to add any new entries */ bookGetCurrentStatus( &Phbk->phbk->current.status ); @@ -935,9 +930,9 @@ char* selected_number; selected_number = (char*)data->phbk->current.entry[data->phbk->current.selectedName].number; - // Sep 22, 2004 REF: CRR 21392 xvilliva - // We get the exact book that is selected. - data->phbk->current.status.book = bookActiveBook(WRITE); + // Sep 22, 2004 REF: CRR 21392 xvilliva + // We get the exact book that is selected. + data->phbk->current.status.book = bookActiveBook(WRITE); Phbk->UpdateAction = CREATE_ENTRY; bookGetCurrentStatus( &Phbk->phbk->current.status ); @@ -985,14 +980,13 @@ T_phbk *Phbk = data->phbk; - deleteFromFile(Phbk,Phbk->current.status.book); bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL ); bookMenuDestroy(Phbk->menu_call_options_win); // July 21, 2006 REF:DR OMAPS00085695 x0047075 // Fix : Always sending the CALLS_LIST_INIT event whenever we delete an entry from LDN ,LRN,LMN phonebook. // if(Phbk->current.status.used_entries > 0) -// SEND_EVENT(Phbk->calls_list_win, SEARCH_SCROLL_UP, 0, 0 ); +// SEND_EVENT(Phbk->calls_list_win, SEARCH_SCROLL_UP, 0, 0 ); SEND_EVENT(Phbk->calls_list_win, CALLS_LIST_INIT, 0, (void*)Phbk->current.status.book ); return 1; } @@ -1019,13 +1013,11 @@ tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - bookCallDetailsStart( Phbk->win); - return 1; - + bookCallDetailsStart( Phbk->win); + return 1; } - /******************************************************************************* $Function: bookServiceNumbers @@ -1047,8 +1039,8 @@ tBookStandard *data = (tBookStandard *) win_data->user; data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = PHB_SDN; - data->phbk->search_win = bookSearchStart( data->phbk->win ); + data->phbk->current.status.book = PHB_SDN; + data->phbk->search_win = bookSearchStart( data->phbk->win ); return MFW_EVENT_CONSUMED; } @@ -1073,7 +1065,7 @@ /* This performs the memory view functions, and returns MFW_EVENT_CONSUMED in all cases. */ - bookMemoryView(); + bookMemoryView(); return MFW_EVENT_CONSUMED; } @@ -1137,7 +1129,7 @@ { T_MFW_HND win = mfwParent( mfw_header() ); - bookPhonebookStart(win,PhbkRedialListNormal); + bookPhonebookStart(win,PhbkRedialListNormal); return MFW_EVENT_CONSUMED; } /******************************************************************************* @@ -1158,7 +1150,7 @@ { T_MFW_HND win = mfwParent( mfw_header() ); - bookPhonebookStart(win,PhbkReplyListNormal); + bookPhonebookStart(win,PhbkReplyListNormal); return MFW_EVENT_CONSUMED; } @@ -1209,24 +1201,24 @@ PROTECTED_MENU_HANDLER( bookSelectBook ) { T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - T_MFW_HND menu_win; - UBYTE selectedBook; + T_MFW_HND menu_win; + UBYTE selectedBook; - TRACE_FUNCTION("bookSelectBook"); + TRACE_FUNCTION("bookSelectBook"); - if (bookGetBookAvailable()) - { - selectedBook = (UBYTE)bookGetBookSelected(); - menu_win = bookMenuStart(Phbk->win, SelectBookAttributes(), 0); - SEND_EVENT(menu_win, DEFAULT_OPTION, NULL, (void *)&selectedBook); // Add our own callback - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); - } + if (bookGetBookAvailable()) + { + selectedBook = (UBYTE)bookGetBookSelected(); + menu_win = bookMenuStart(Phbk->win, SelectBookAttributes(), 0); + SEND_EVENT(menu_win, DEFAULT_OPTION, NULL, (void *)&selectedBook); // Add our own callback + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); + } return MFW_EVENT_CONSUMED; } @@ -1247,17 +1239,17 @@ PROTECTED_MENU_HANDLER( bookSelectBookSIM ) { T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - if (bookGetBookAvailable()) - { - bookSetBookSelected(FALSE); - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100); - } - else - bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000); + if (bookGetBookAvailable()) + { + bookSetBookSelected(FALSE); + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100); + } + else + bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000); return MFW_EVENT_CONSUMED; } @@ -1277,20 +1269,20 @@ PROTECTED_MENU_HANDLER( bookSelectBookPhone ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; - if (bookGetBookAvailable()) - { - bookSetBookSelected(TRUE); - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100); - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable,NULL, NULL ); - } + if (bookGetBookAvailable()) + { + bookSetBookSelected(TRUE); + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookChangePB, (USHORT)bookGetBookSelected(), 100); + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable,NULL, NULL ); + } return MFW_EVENT_CONSUMED; } @@ -1309,23 +1301,23 @@ PROTECTED_MENU_HANDLER( bookCopyEntry ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; - TRACE_FUNCTION( "bookCopyEntry()" ); + TRACE_FUNCTION( "bookCopyEntry()" ); - if (bookGetBookAvailable()) - { - /* Show Please Wait dialog briefly, then call copy function - */ - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)FALSE, 100); - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); - } + if (bookGetBookAvailable()) + { + /* Show Please Wait dialog briefly, then call copy function + */ + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)FALSE, 100); + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); + } return MFW_EVENT_CONSUMED; } @@ -1344,23 +1336,23 @@ PROTECTED_MENU_HANDLER( bookCopyAll ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; - TRACE_FUNCTION( "bookCopyAll()" ); + TRACE_FUNCTION( "bookCopyAll()" ); - if (bookGetBookAvailable()) - { - /* Copy - */ - bookCopyMultiple(Phbk->win, FALSE, 0); - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); - } + if (bookGetBookAvailable()) + { + /* Copy + */ + bookCopyMultiple(Phbk->win, FALSE, 0); + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); + } return MFW_EVENT_CONSUMED; } @@ -1379,23 +1371,23 @@ PROTECTED_MENU_HANDLER( bookMoveEntry ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; - TRACE_FUNCTION( "bookMoveEntry()" ); + TRACE_FUNCTION( "bookMoveEntry()" ); - if (bookGetBookAvailable()) - { - /* Show Please Wait dialog briefly, then call move function - */ - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)TRUE, 100); - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); - } + if (bookGetBookAvailable()) + { + /* Show Please Wait dialog briefly, then call move function + */ + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopySingle, (USHORT)TRUE, 100); + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); + } return MFW_EVENT_CONSUMED; } @@ -1414,23 +1406,23 @@ PROTECTED_MENU_HANDLER( bookMoveAll ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; - TRACE_FUNCTION( "bookMoveAll()" ); + TRACE_FUNCTION( "bookMoveAll()" ); - if (bookGetBookAvailable()) - { - /* Show Please Wait dialog briefly, then call copy function - */ - bookCopyMultiple(Phbk->win, TRUE, 0); - } - else - { - bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); - } + if (bookGetBookAvailable()) + { + /* Show Please Wait dialog briefly, then call copy function + */ + bookCopyMultiple(Phbk->win, TRUE, 0); + } + else + { + bookShowInformation( Phbk->win, TxtNotAvailable, NULL, NULL); + } return MFW_EVENT_CONSUMED; } @@ -1439,18 +1431,15 @@ PIN2RQD_MENU_HANDLER( CphsAlsLock ) { - return cphs_lock_als( Menu, Item ); + return cphs_lock_als( Menu, Item ); } PIN2RQD_MENU_HANDLER( CphsAlsUnlock ) { - return cphs_unlock_als( Menu, Item ); + return cphs_unlock_als( Menu, Item ); } /******************************************************************************* End of File *******************************************************************************/ - - -
--- a/src/ui/bmi/mmiBookDetailsWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookDetailsWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,26 +9,26 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookDetailsWindow.h - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookDetailsWindow.h + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** Description: - Provides the details handlig for the phone book + Provides the details handlig for the phone book ******************************************************************************** $History: MmiBookDetailsWindow.h - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -36,7 +36,6 @@ - /******************************************************************************* Include Files @@ -100,7 +99,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -125,7 +123,6 @@ #include "mmiColours.h" - /******************************************************************************* Private Methods @@ -135,165 +132,163 @@ /******************************************************************************* - $Function: bookDetailsDialog + $Function: bookDetailsDialog - $Description: Dialog function for the details window, doesn't currently do - anything + $Description: Dialog function for the details window, doesn't currently do + anything - $Returns: None + $Returns: None - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ static void bookDetailsDialog ( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *)win_data->user; - T_MFW_PHB_ENTRY *entry; - /* SPR#1428 - SH - New Editor changes - * Insert the ascii or unicode name into the buffer */ + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *)win_data->user; + T_MFW_PHB_ENTRY *entry; + /* SPR#1428 - SH - New Editor changes + * Insert the ascii or unicode name into the buffer */ #ifdef NEW_EDITOR - T_ATB_TEXT nameText; - T_ATB_TEXT numberText; + T_ATB_TEXT nameText; + T_ATB_TEXT numberText; - TRACE_FUNCTION("bookDetailsDialog"); + TRACE_FUNCTION("bookDetailsDialog"); - entry = &data->phbk->current.entry[ data->phbk->current.selectedName ]; - /*SPR 2175, no need to do any GSM->ASCII conversions, removed conversion code*/ + entry = &data->phbk->current.entry[ data->phbk->current.selectedName ]; + /*SPR 2175, no need to do any GSM->ASCII conversions, removed conversion code*/ - numberText.dcs = ATB_DCS_ASCII; - numberText.data = entry->number; - ATB_string_Length(&numberText); + numberText.dcs = ATB_DCS_ASCII; + numberText.data = entry->number; + ATB_string_Length(&numberText); - if ( entry->name.data[0] ==0x80) - { + if ( entry->name.data[0] ==0x80) + { - /* UNICODE */ - TRACE_EVENT("***UNICODE OUTPUT***"); - nameText.dcs = ATB_DCS_UNICODE; - nameText.data = &entry->name.data[2]; - } - else - { - nameText.dcs = ATB_DCS_ASCII; - nameText.data = entry->name.data; - } + /* UNICODE */ + TRACE_EVENT("***UNICODE OUTPUT***"); + nameText.dcs = ATB_DCS_UNICODE; + nameText.data = &entry->name.data[2]; + } + else + { + nameText.dcs = ATB_DCS_ASCII; + nameText.data = entry->name.data; + } - ATB_string_Length(&nameText); + ATB_string_Length(&nameText); - ATB_edit_ResetMode(data->editor, ED_MODE_READONLY); /* Switch off read only to add text */ - ATB_edit_InsertString(data->editor, &nameText); /* Insert name string */ - ATB_edit_Char(data->editor, ctrlEnter, FALSE); /* Insert carriage return */ - ATB_edit_InsertString(data->editor, &numberText); /* Insert number string */ - ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ + ATB_edit_ResetMode(data->editor, ED_MODE_READONLY); /* Switch off read only to add text */ + ATB_edit_InsertString(data->editor, &nameText); /* Insert name string */ + ATB_edit_Char(data->editor, ctrlEnter, FALSE); /* Insert carriage return */ + ATB_edit_InsertString(data->editor, &numberText); /* Insert number string */ + ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ - /* Text has changed, so refresh word wrap */ - ATB_edit_Refresh(data->editor); + /* Text has changed, so refresh word wrap */ + ATB_edit_Refresh(data->editor); - win_show(data->win); + win_show(data->win); #endif /* NEW_EDITOR */ } - - /******************************************************************************* - $Function: bookDetailsWindowCB + $Function: bookDetailsWindowCB - $Description: Window event handler + $Description: Window event handler - $Returns: MFW_EVENT_CONSUMED for the window visible event, - MFW_EVENT_PASSED otherwise + $Returns: MFW_EVENT_CONSUMED for the window visible event, + MFW_EVENT_PASSED otherwise - $Arguments: e, event, w, window handle + $Arguments: e, event, w, window handle *******************************************************************************/ static int bookDetailsWindowCB ( MfwEvt e, MfwWin *w ) { - tBookStandard *data = (tBookStandard *)w->user; + tBookStandard *data = (tBookStandard *)w->user; /* x0045876, 14-Aug-2006 (WR - "ptr" was declared but never referenced) */ #ifndef NEW_EDITOR - T_MFW_PHB_ENTRY *ptr; // dat; + T_MFW_PHB_ENTRY *ptr; // dat; #endif -// char debug[50]; // RAVI +// char debug[50]; // RAVI - TRACE_FUNCTION("bookDetailsWindowCB"); - switch( e ) + TRACE_FUNCTION("bookDetailsWindowCB"); + switch( e ) { case MfwWinVisible: - { - /* handle the visible event, start by shoing the default information - */ - MmiBookShowDefault(); + { + /* handle the visible event, start by shoing the default information + */ + MmiBookShowDefault(); - /* SPR#1428 - SH - New Editor: display editor here rather than filling up the information. Do that in - * dialog function above. */ + /* SPR#1428 - SH - New Editor: display editor here rather than filling up the information. Do that in + * dialog function above. */ #ifdef NEW_EDITOR - ATB_edit_Show(data->editor); - resources_setTitleColour(COLOUR_EDITOR); + ATB_edit_Show(data->editor); + resources_setTitleColour(COLOUR_EDITOR); - /* TITLE */ + /* TITLE */ - dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); - PROMPT(0,0,0,TxtDetails); + dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); + PROMPT(0,0,0,TxtDetails); #else /* NEW_EDITOR */ - /* Build and show the editor - */ - ptr = &data->phbk->current.entry[ data->phbk->current.selectedName ]; + /* Build and show the editor + */ + ptr = &data->phbk->current.entry[ data->phbk->current.selectedName ]; #ifdef NO_ASCIIZ #ifdef EASY_TEXT_ENABLED - /*MC SPR 1242, changed macros to function calls e.g FIRST_LINE_CHINESE->Mmi_layout_first_line()*/ - if ( ptr->name.data[0] ==0x80)//if unicode - { - TRACE_EVENT("***UNICODE OUTPUT***"); - dspl_TextOut(0,0,DSPL_TXTATTR_UNICODE,(char *)&ptr->name.data[2]); - if ((ptr->name.data[MAX_LINE+2] != 0) && ptr->name.data[MAX_LINE+3] != 0) - dspl_TextOut(0,Mmi_layout_line(1),DSPL_TXTATTR_UNICODE,(char *)&(ptr->name.data[MAX_LINE+2])); - dspl_TextOut(0,Mmi_layout_line(2),0,(char *)ptr->number); - if (strlen((char*)ptr->number) > MAX_LINE) - dspl_TextOut(0,Mmi_layout_line(1)+numberLineHeight(),0, (char*)&ptr->number[MAX_LINE]); - } - else + /*MC SPR 1242, changed macros to function calls e.g FIRST_LINE_CHINESE->Mmi_layout_first_line()*/ + if ( ptr->name.data[0] ==0x80)//if unicode + { + TRACE_EVENT("***UNICODE OUTPUT***"); + dspl_TextOut(0,0,DSPL_TXTATTR_UNICODE,(char *)&ptr->name.data[2]); + if ((ptr->name.data[MAX_LINE+2] != 0) && ptr->name.data[MAX_LINE+3] != 0) + dspl_TextOut(0,Mmi_layout_line(1),DSPL_TXTATTR_UNICODE,(char *)&(ptr->name.data[MAX_LINE+2])); + dspl_TextOut(0,Mmi_layout_line(2),0,(char *)ptr->number); + if (strlen((char*)ptr->number) > MAX_LINE) + dspl_TextOut(0,Mmi_layout_line(1)+numberLineHeight(),0, (char*)&ptr->number[MAX_LINE]); + } + else #endif /* EASY_TEXT_ENABLED */ - { - // convert from GSM to Alpha characters - bookGsm2Alpha( (UBYTE *) ptr->name.data ); + { + // convert from GSM to Alpha characters + bookGsm2Alpha( (UBYTE *) ptr->name.data ); - sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name.data, "\n", (char *) ptr->number); - edtShow(data->edt); - } + sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name.data, "\n", (char *) ptr->number); + edtShow(data->edt); + } #else /* NO_ASCIIZ */ - { - sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name, "\n", (char *) ptr->number); - edtShow(data->edt); - } + { + sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name, "\n", (char *) ptr->number); + edtShow(data->edt); + } #endif /* NO_ASCIIZ */ #endif /* NEW_EDITOR */ - /* pop up the soft keys - */ - displaySoftKeys( TxtSoftCall, /* TxtSoftOptions */ TxtSoftBack ); - } - break; + /* pop up the soft keys + */ + displaySoftKeys( TxtSoftCall, /* TxtSoftOptions */ TxtSoftBack ); + } + break; default: - { - /* default handler just indicate event not handled - */ - return MFW_EVENT_PASSED; - } + { + /* default handler just indicate event not handled + */ + return MFW_EVENT_PASSED; + } } return MFW_EVENT_CONSUMED; @@ -302,73 +297,73 @@ /******************************************************************************* - $Function: bookDetailsKbdCB + $Function: bookDetailsKbdCB - $Description: Keyboard handler + $Description: Keyboard handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, key handle + $Arguments: e, event, k, key handle *******************************************************************************/ static int bookDetailsKbdCB ( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - tMmiPhbData *Current = &data->phbk->current; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + tMmiPhbData *Current = &data->phbk->current; - TRACE_FUNCTION("bookDetailsKbdCB()"); + TRACE_FUNCTION("bookDetailsKbdCB()"); - /* Handle the key events - */ + /* Handle the key events + */ switch (k->code) { case KCD_MNUUP: - break; + break; case KCD_MNUDOWN: - break; + break; - case KCD_MNUSELECT: - case KCD_CALL: + case KCD_MNUSELECT: + case KCD_CALL: case KCD_LEFT: - { - /* select to make the call - */ - callNumber( Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy( data->phbk->win ); - } - break; + { + /* select to make the call + */ + callNumber( Current->entry[ Current->selectedName ].number ); + bookPhonebookDestroy( data->phbk->win ); + } + break; case KCD_RIGHT: - { - /* start up the options menu - */ - //Cancel this screen - bookDetailsDestroy( data->win ); - } - break; + { + /* start up the options menu + */ + //Cancel this screen + bookDetailsDestroy( data->win ); + } + break; case KCD_HUP: - { - /* Cancel this menu - */ - bookDetailsDestroy( data->win ); - } - break; + { + /* Cancel this menu + */ + bookDetailsDestroy( data->win ); + } + break; default: - { - /* default handling is to get us out of here - */ - memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); - sprintf( data->edtBuf, "%s%c", (char *) Current->entry[ Current->selectedName ].number, editControls[ k->code ] ); - idleDialBuffer( data->edtBuf ); - bookPhonebookDestroy( data->phbk->win ); - } - break; + { + /* default handling is to get us out of here + */ + memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); + sprintf( data->edtBuf, "%s%c", (char *) Current->entry[ Current->selectedName ].number, editControls[ k->code ] ); + idleDialBuffer( data->edtBuf ); + bookPhonebookDestroy( data->phbk->win ); + } + break; } return MFW_EVENT_CONSUMED; @@ -377,111 +372,107 @@ /******************************************************************************* - $Function: bookDetailsKbdLongCB + $Function: bookDetailsKbdLongCB - $Description: Keyboard Long Press event handler + $Description: Keyboard Long Press event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, keyboard handle + $Arguments: e, event, k, keyboard handle *******************************************************************************/ static int bookDetailsKbdLongCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - /* hand a long clear event only - */ - if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) - bookDetailsDestroy( data->win ); + /* hand a long clear event only + */ + if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) + bookDetailsDestroy( data->win ); - return MFW_EVENT_CONSUMED; + return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookDetailsCreate + $Function: bookDetailsCreate - $Description: create an instance of the details window + $Description: create an instance of the details window - $Returns: handle of newly created window, or NULL if we fail to create + $Returns: handle of newly created window, or NULL if we fail to create - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ static T_MFW_HND bookDetailsCreate(MfwHnd parent) { - T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; - T_phbk *phbk = (T_phbk *)parent_win_data->user; - T_MFW_WIN *win_data; - tBookStandard *data; + T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; + T_phbk *phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data; - TRACE_FUNCTION ("bookDetailsCreate()"); + TRACE_FUNCTION ("bookDetailsCreate()"); - /* allocate memory for our control block - */ - if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) - return NULL; + /* allocate memory for our control block + */ + if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) + return NULL; - /* Create the window if we can - */ - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookDetailsWindowCB ) ) == NULL ) - { - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - return NULL; - } + /* Create the window if we can + */ + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookDetailsWindowCB ) ) == NULL ) + { + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + return NULL; + } - /* Okay, we have created the control block and the window, so - we now need to configure the dialog and data pointers - */ - data->mmi_control.dialog = (T_DIALOG_FUNC) bookDetailsDialog; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *) data; - data->phbk = phbk; - data->parent_win = parent; + /* Okay, we have created the control block and the window, so + we now need to configure the dialog and data pointers + */ + data->mmi_control.dialog = (T_DIALOG_FUNC) bookDetailsDialog; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *) data; + data->phbk = phbk; + data->parent_win = parent; - /* create keyboards and menus for our window - */ - data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookDetailsKbdCB ); - data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookDetailsKbdLongCB ); + /* create keyboards and menus for our window + */ + data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookDetailsKbdCB ); + data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookDetailsKbdLongCB ); - /* 1945 MZ Initialise the edtBuf */ - memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); + /* 1945 MZ Initialise the edtBuf */ + memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - AUI_edit_SetAttr( &data->editor_attr, BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR1752*/, (UBYTE *)data->edtBuf, STANDARD_EDITOR_SIZE); - data->editor = ATB_edit_Create( &data->editor_attr, 0 ); - SEND_EVENT(data->win, 0, 0, 0); - ATB_edit_Init(data->editor); + AUI_edit_SetAttr( &data->editor_attr, BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR1752*/, (UBYTE *)data->edtBuf, STANDARD_EDITOR_SIZE); + data->editor = ATB_edit_Create( &data->editor_attr, 0 ); + SEND_EVENT(data->win, 0, 0, 0); + ATB_edit_Init(data->editor); #else /*NEW_EDITOR*/ - // API - 08-01-03 - 1540 - change edtCurBar1 to edtCurNone - bookSetEditAttributes( BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, 0, edtCurNone, 0, data->edtBuf, STANDARD_EDITOR_SIZE, &data->attr ); - data->edt = edtCreate( data->win, &data->attr, 0, 0 ); - edtUnhide( data->edt ); + // API - 08-01-03 - 1540 - change edtCurBar1 to edtCurNone + bookSetEditAttributes( BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, 0, edtCurNone, 0, data->edtBuf, STANDARD_EDITOR_SIZE, &data->attr ); + data->edt = edtCreate( data->win, &data->attr, 0, 0 ); + edtUnhide( data->edt ); #endif /*NEW_EDITOR*/ - /* allow the window and menu to be created - */ - mnuUnhide(data->menu); - winShow(data->win); + /* allow the window and menu to be created + */ + mnuUnhide(data->menu); + winShow(data->win); - /* And return the handle of the newly created window - */ + /* And return the handle of the newly created window + */ return data->win; } - - /******************************************************************************* Public Methods @@ -491,72 +482,68 @@ /******************************************************************************* - $Function: bookDetailsStart + $Function: bookDetailsStart - $Description: Start routine for the phonebook details window + $Description: Start routine for the phonebook details window - $Returns: None, assigns the window handle to the name_details_win - hook in the current phone book + $Returns: None, assigns the window handle to the name_details_win + hook in the current phone book - $Arguments: m, menu, i, menu item + $Arguments: m, menu, i, menu item *******************************************************************************/ void bookDetailsStart( MfwMnu* m, MfwMnuItem* i ) { - T_MFW_HND win = mfwParent(mfw_header()); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *)win_data->user; + T_MFW_HND win = mfwParent(mfw_header()); + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *)win_data->user; - TRACE_FUNCTION ("bookDetailsStart()"); + TRACE_FUNCTION ("bookDetailsStart()"); - data->phbk->name_details_win = bookDetailsCreate( data->phbk->win ); + data->phbk->name_details_win = bookDetailsCreate( data->phbk->win ); } - - /******************************************************************************* - $Function: bookDetailsDestroy + $Function: bookDetailsDestroy - $Description: Destroy the phone book details window + $Description: Destroy the phone book details window - $Returns: None + $Returns: None - $Arguments: window, handle of window to close + $Arguments: window, handle of window to close *******************************************************************************/ void bookDetailsDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *)win->user; + T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *)win->user; - TRACE_FUNCTION ("bookDetailsdestroy()"); + TRACE_FUNCTION ("bookDetailsdestroy()"); - /* Only need to do this if the data is valid - */ - if ( data ) - { - /* SPR#1428 - SH - New Editor changes */ + /* Only need to do this if the data is valid + */ + if ( data ) + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* New editor no longer destroyed with winDelete, - * so destroy it here */ - if (data->editor) - { - ATB_edit_Destroy(data->editor); - } + /* New editor no longer destroyed with winDelete, + * so destroy it here */ + if (data->editor) + { + ATB_edit_Destroy(data->editor); + } #endif /* NEW_EDITOR */ - data->phbk->name_details_win = 0; - winDelete( data->win ); - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - } + data->phbk->name_details_win = 0; + winDelete( data->win ); + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + } } - - /******************************************************************************* End of File
--- a/src/ui/bmi/mmiBookMenuWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookMenuWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookMenuWindow.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookMenuWindow.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -29,19 +29,19 @@ Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar) Description : Reboot of the target when you unplug/plug USB cable using camera application - xrashmic 28 Jun 2006, OMAPS00084172 - On pressing back from options menu in camera, the midi stopped playing. - Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume) + xrashmic 28 Jun 2006, OMAPS00084172 + On pressing back from options menu in camera, the midi stopped playing. + Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume) - Sep 01, 2005 REF: CRR 32707 x0021334 - Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu - Fix: Select soft key operation in volume menu has been modified to fix this problem. + Sep 01, 2005 REF: CRR 32707 x0021334 + Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu + Fix: Select soft key operation in volume menu has been modified to fix this problem. - Apr 05, 2005 REF: ENH 29994 xdeepadh - Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application - Solution: Generic Midi Ringer and Midi Test Application were implemented. + Apr 05, 2005 REF: ENH 29994 xdeepadh + Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application + Solution: Generic Midi Ringer and Midi Test Application were implemented. - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -135,7 +135,7 @@ #include "MmiSounds.h" #include "MmiIdle.h" -extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu +extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu /******************************************************************************* External Function Prototype @@ -161,183 +161,177 @@ *******************************************************************************/ - /******************************************************************************* - $Function: bookMenuMenuCB + $Function: bookMenuMenuCB - $Description: Menu handler for the menu window + $Description: Menu handler for the menu window - $Returns: MFW_EVENT_CONSUMED if event handled, otherwise - MFW_EVENT_PASSED + $Returns: MFW_EVENT_CONSUMED if event handled, otherwise + MFW_EVENT_PASSED - $Arguments: e, event, m, menu handle + $Arguments: e, event, m, menu handle *******************************************************************************/ static int bookMenuMenuCB( MfwEvt e, MfwMnu *m ) { - T_MFW_HND window = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND window = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - TRACE_FUNCTION( "bookMenuMenuCB()" ); + TRACE_FUNCTION( "bookMenuMenuCB()" ); - /* We only handle the ESCAPE event in here - */ - switch( e ) + /* We only handle the ESCAPE event in here + */ + switch( e ) { case E_MNU_ESCAPE: - { - /* Escape requested, we need to shut down this window - */ - if (data->Callback) - (data->Callback) (data->parent_win, NULL, NULL); - bookMenuDestroy( window ); - //xrashmic 28 Jun 2006, OMAPS00084172 - //On pressing back from options menu in camera, the midi stopped playing. - if(getSoundsReason() == SettingVolume) - stopRingerVolSettingInactivityTimer(); - } - break; + { + /* Escape requested, we need to shut down this window + */ + if (data->Callback) + (data->Callback) (data->parent_win, NULL, NULL); + bookMenuDestroy( window ); + //xrashmic 28 Jun 2006, OMAPS00084172 + //On pressing back from options menu in camera, the midi stopped playing. + if(getSoundsReason() == SettingVolume) + stopRingerVolSettingInactivityTimer(); + } + break; default: - { - /* unknown event, pass it up the tree for handling elsewhere - */ + { + /* unknown event, pass it up the tree for handling elsewhere + */ return MFW_EVENT_PASSED; } -/* break; */ /* RAVI */ - } +/* break; */ /* RAVI */ + } - /* We got here, event handled, prevent anyone else - dealing with it - */ - return MFW_EVENT_CONSUMED; + /* We got here, event handled, prevent anyone else + dealing with it + */ + return MFW_EVENT_CONSUMED; } - - - - /******************************************************************************* - $Function: bookMenuDialog + $Function: bookMenuDialog - $Description: Menu window dialog function + $Description: Menu window dialog function - $Returns: none + $Returns: none - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ void bookMenuDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; -/* MfwMnu *mnu; */ /* RAVI */ + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; +/* MfwMnu *mnu; */ /* RAVI */ - TRACE_FUNCTION( "bookMenuDialog()" ); + TRACE_FUNCTION( "bookMenuDialog()" ); - /* The menu dialog function has to deal with initialisation - and responses from the PIN2 validation methods - */ + /* The menu dialog function has to deal with initialisation + and responses from the PIN2 validation methods + */ switch( event ) - { - case MENU_INIT: - { - /* On initialisation, we can create the menus and - display the window - */ - data->menu = mnuCreate( data->win, (MfwMnuAttr *) parameter, E_MNU_ESCAPE, (MfwCb) bookMenuMenuCB ); - mnuLang( data->menu, mainMmiLng ); - mnuUnhide( data->menu ); - winShow( data->win ); + { + case MENU_INIT: + { + /* On initialisation, we can create the menus and + display the window + */ + data->menu = mnuCreate( data->win, (MfwMnuAttr *) parameter, E_MNU_ESCAPE, (MfwCb) bookMenuMenuCB ); + mnuLang( data->menu, mainMmiLng ); + mnuUnhide( data->menu ); + winShow( data->win ); - if (value EQ PhbkMainMenu) - { - // start the timer for the keypadlock - tim_start (data->menu_tim); - data->status_of_timer = FALSE; - } - else - { - data->status_of_timer = TRUE; - } - if(value == SettingVolume) - { - /* - The ringer volume settings dialog has been invoked, create and start the - 4 second time out. - */ - /* RAVI - 20-1-2006 */ + if (value EQ PhbkMainMenu) + { + // start the timer for the keypadlock + tim_start (data->menu_tim); + data->status_of_timer = FALSE; + } + else + { + data->status_of_timer = TRUE; + } + if(value == SettingVolume) + { + /* + The ringer volume settings dialog has been invoked, create and start the + 4 second time out. + */ + /* RAVI - 20-1-2006 */ #ifdef NEPTUNE_BOARD - setSoundsReason(SettingVolume); + setSoundsReason(SettingVolume); #endif - /* END RAVI */ - startRingerVolSettingInactivityTimer(); - } + /* END RAVI */ + startRingerVolSettingInactivityTimer(); + } - } - break; + } + break; - case ADD_CALLBACK: - { - /* Change the callback from the default menu callback to one specified - * in parameter */ - data->Callback = (T_VOID_FUNC)parameter; - } - break; + case ADD_CALLBACK: + { + /* Change the callback from the default menu callback to one specified + * in parameter */ + data->Callback = (T_VOID_FUNC)parameter; + } + break; - case DEFAULT_OPTION: - { - /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */ + case DEFAULT_OPTION: + { + /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */ - mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter)); - } - break; + mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter)); + } + break; - case PIN2_OK: - { - /* We have received a PIN2 authorisation, so we can execute the - the requested function - */ + case PIN2_OK: + { + /* We have received a PIN2 authorisation, so we can execute the + the requested function + */ - TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op"); - (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item); + TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op"); + (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item); - } - break; - case E_MNU_ESCAPE: - { - /* Escape requested, we need to shut down this window - */ - bookMenuDestroy( win); - } - break; - default: - { - /* In situations where a PIN2 abort is returned, we can handle it - as a default event, and just ignore it - */ - TRACE_EVENT("PIN2 not OK"); - } - break; - } + } + break; + case E_MNU_ESCAPE: + { + /* Escape requested, we need to shut down this window + */ + bookMenuDestroy( win); + } + break; + default: + { + /* In situations where a PIN2 abort is returned, we can handle it + as a default event, and just ignore it + */ + TRACE_EVENT("PIN2 not OK"); + } + break; + } } - /******************************************************************************* - $Function: bookMenuTimCB + $Function: bookMenuTimCB - $Description: Menu tim handler + $Description: Menu tim handler $Returns: @@ -347,550 +341,530 @@ static int bookMenuTimCB (T_MFW_EVENT event, T_MFW_TIM *tc) { - T_MFW_HND window = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND window = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; - /* ADDED RAVI - 25-11-2005 */ - return 0; - /* END RAVI */ + /* ADDED RAVI - 25-11-2005 */ + return 0; + /* END RAVI */ } - - - - /******************************************************************************* - $Function: bookMenuWindowCB + $Function: bookMenuWindowCB - $Description: Menu window handler + $Description: Menu window handler - $Returns: MFW_EVENT_CONSUMED if event handled, otherwise - MFW_EVENT_PASSED + $Returns: MFW_EVENT_CONSUMED if event handled, otherwise + MFW_EVENT_PASSED - $Arguments: e, event, m, window handle + $Arguments: e, event, m, window handle *******************************************************************************/ static int bookMenuWindowCB( MfwEvt e, MfwWin *w ) { - tBookStandard * data = (tBookStandard *)w->user; - MfwMnu * mnu; + tBookStandard * data = (tBookStandard *)w->user; + MfwMnu * mnu; TRACE_FUNCTION( "bookMenuWindowCB()" ); - if (!w) - return MFW_EVENT_PASSED; + if (!w) + return MFW_EVENT_PASSED; - switch( e ) + switch( e ) { case MfwWinVisible: - { - dspl_ClearAll(); // sbh - clear screen before update - mnu = (MfwMnu *) mfwControl( data->menu ); + { + dspl_ClearAll(); // sbh - clear screen before update + mnu = (MfwMnu *) mfwControl( data->menu ); - /* - **Check whether the data is valid, if not use 'sensible' default values - */ - if (mnu) - { - if (mnu->curAttr) - softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); - else - softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); + /* + **Check whether the data is valid, if not use 'sensible' default values + */ + if (mnu) + { + if (mnu->curAttr) + softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); + else + softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); - } - else - softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); - } - break; + } + else + softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); + } + break; default: - { - /* unknown event, pass it up the tree for handling elsewhere - */ + { + /* unknown event, pass it up the tree for handling elsewhere + */ return MFW_EVENT_PASSED; } - /* break; */ /* RAVI */ - } + /* break; */ /* RAVI */ + } - /* We got here, event handled, prevent anyone else - dealing with it - */ + /* We got here, event handled, prevent anyone else + dealing with it + */ return MFW_EVENT_CONSUMED; } - - - - /******************************************************************************* - $Function: bookMenuKbdCB + $Function: bookMenuKbdCB - $Description: tbd + $Description: tbd - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, key handle + $Arguments: e, event, k, key handle *******************************************************************************/ static int bookMenuKbdCB( MfwEvt e, MfwKbd *k ) { - static BOOL storeSelectedItemToPcm=FALSE; - T_MFW_HND window = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - MfwMnu *mnu; - U8 keycode; /* SPR#1608 - SH */ + static BOOL storeSelectedItemToPcm=FALSE; + T_MFW_HND window = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + MfwMnu *mnu; + U8 keycode; /* SPR#1608 - SH */ - TRACE_FUNCTION( "bookMenuKbdCB()" ); + TRACE_FUNCTION( "bookMenuKbdCB()" ); - /* handle the keypress - */ - switch (k->code) + /* handle the keypress + */ + switch (k->code) { - case KCD_MNUUP: - { - // keypadLock will not activate anymore - data->status_of_timer = TRUE; - /* Update the window with the previous element - */ + case KCD_MNUUP: + { + // keypadLock will not activate anymore + data->status_of_timer = TRUE; + /* Update the window with the previous element + */ mnuUp( data->menu ); - /* + /* Special case when setting up ringer volume, the current ringer is played as user scrolls the volume settings Silent -> cresendo. MZ. */ /* RAVI - 20-1-2006 */ #ifdef NEPTUNE_BOARD - if (getSoundsReason () == SettingVolume) - { - volumeMenuScrollUp(); - } + if (getSoundsReason () == SettingVolume) + { + volumeMenuScrollUp(); + } #endif - /* END RAVI */ + /* END RAVI */ if(getScrollSelectMenuItem() == TRUE ||(getSoundsReason() == SettingVolume) ) - { - mnuSelect(data->menu); - /* Scroll up in volume setting */ - restartVolSettingInactivityTimer(); - } - } + { + mnuSelect(data->menu); + /* Scroll up in volume setting */ + restartVolSettingInactivityTimer(); + } + } break; - case KCD_MNUDOWN: - { - // keypadLock will not activate anymore - data->status_of_timer = TRUE; - /* Update the window with the next element - */ + case KCD_MNUDOWN: + { + // keypadLock will not activate anymore + data->status_of_timer = TRUE; + /* Update the window with the next element + */ mnuDown( data->menu ); - /* + /* Special case when setting up ringer volume, the current ringer is played as user scrolls the volume settings Silent -> cresendo. MZ. */ /* RAVI - 20-1-2006 */ #ifdef NEPTUNE_BOARD - if (getSoundsReason () == SettingVolume) - { - volumeMenuScrollDown(); - } + if (getSoundsReason () == SettingVolume) + { + volumeMenuScrollDown(); + } #endif - /* END RAVI */ + /* END RAVI */ if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) - { - mnuSelect(data->menu); - restartVolSettingInactivityTimer(); - } + { + mnuSelect(data->menu); + restartVolSettingInactivityTimer(); + } - } + } break; - case KCD_MNUSELECT: + case KCD_MNUSELECT: case KCD_LEFT: - { - // keypadLock will not activate anymore - data->status_of_timer = TRUE; + { + // keypadLock will not activate anymore + data->status_of_timer = TRUE; - // Select this element - mnuSelect( data->menu ); - /*30 Mar 2007 a0393213 (R.Prabakar) - OMAPS00123019 ( Reboot of the target when you unplug/plug USB cable using camera application) - The usb enumeration option window has to be destroyed automatically once the user selects an option. - Earlier the menu was destroyed in the menu select call back function (mmi_usb_enumeration) and the same menu was - accesed further in this function. This was resulting in crash. - Now the menu is destroyed in this function and returned immediately. - */ - #ifdef FF_MMI_USBMS - if(usb_opt_win && - data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu) - { - bookMenuDestroy(usb_opt_win); - usb_opt_win=NULL; - break; - } - #endif - mnu = (MfwMnu *) mfwControl( data->menu ); + // Select this element + mnuSelect( data->menu ); + /*30 Mar 2007 a0393213 (R.Prabakar) + OMAPS00123019 ( Reboot of the target when you unplug/plug USB cable using camera application) + The usb enumeration option window has to be destroyed automatically once the user selects an option. + Earlier the menu was destroyed in the menu select call back function (mmi_usb_enumeration) and the same menu was + accesed further in this function. This was resulting in crash. + Now the menu is destroyed in this function and returned immediately. + */ + #ifdef FF_MMI_USBMS + if(usb_opt_win && + data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu) + { + bookMenuDestroy(usb_opt_win); + usb_opt_win=NULL; + break; + } + #endif + mnu = (MfwMnu *) mfwControl( data->menu ); - if (mnu != NULL) - { - if (mnu->curAttr != NULL) - { - // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check - if( winIsFocussed(window) ) - softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); - } - } + if (mnu != NULL) + { + if (mnu->curAttr != NULL) + { + // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check + if( winIsFocussed(window) ) + softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); + } + } - // A volume or tone setting menu has been entered. MZ 2/4/01 - if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) - { - TRACE_FUNCTION("@@@@ A volume or tone settin"); + // A volume or tone setting menu has been entered. MZ 2/4/01 + if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) + { + TRACE_FUNCTION("@@@@ A volume or tone settin"); - /* - First time pcm flag is false, subsequent selection of menu item - will select and terminate the volume settings menu. 3/4/01 MZ. - */ - if(storeSelectedItemToPcm ==TRUE || getSoundsReason() == SettingVolume ) - { - clearScrollSelectMenuItem(); - volMenuItemSelected(); - storeSelectedItemToPcm =FALSE; - mnuEscape( data->menu ); - if(getSoundsReason() == SettingVolume) - { - setSoundsReason(SoundsNone); - stopRingerVolSettingInactivityTimer(); - } + /* + First time pcm flag is false, subsequent selection of menu item + will select and terminate the volume settings menu. 3/4/01 MZ. + */ + if(storeSelectedItemToPcm ==TRUE || getSoundsReason() == SettingVolume ) + { + clearScrollSelectMenuItem(); + volMenuItemSelected(); + storeSelectedItemToPcm =FALSE; + mnuEscape( data->menu ); + if(getSoundsReason() == SettingVolume) + { + setSoundsReason(SoundsNone); + stopRingerVolSettingInactivityTimer(); + } //Apr 05, 2005 REF: ENH 29994 xdeepadh #ifdef FF_MIDI_RINGER - //Delete the timer for volume scrolling - if(hPlayerStartTimer!=NULL) - timDelete(hPlayerStartTimer); + //Delete the timer for volume scrolling + if(hPlayerStartTimer!=NULL) + timDelete(hPlayerStartTimer); #endif - break; - } - /* - Second time the left soft key is used, store the setting in pcm and terminate the - volume settings menu. - */ - storeSelectedItemToPcm =TRUE; + break; + } + /* + Second time the left soft key is used, store the setting in pcm and terminate the + volume settings menu. + */ + storeSelectedItemToPcm =TRUE; - } - } + } + } break; - // POWER key takes us to idle screen. + // POWER key takes us to idle screen. case KCD_POWER: - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; - HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away + HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away - //return to idle screen + //return to idle screen - if (data->Callback) - (data->Callback) (data->parent_win, NULL, NULL); + if (data->Callback) + (data->Callback) (data->parent_win, NULL, NULL); - bookMenuDestroy(data->win); - stopRingerVolSettingInactivityTimer(); + bookMenuDestroy(data->win); + stopRingerVolSettingInactivityTimer(); - SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); + SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); break; case KCD_RIGHT: case KCD_HUP: - { - // keypadLock will not activate anymore - data->status_of_timer = TRUE; + { + // keypadLock will not activate anymore + data->status_of_timer = TRUE; - // Sep 01, 2005 REF: CRR 32707 x0021334 - // Set storeSelectedItemToPcm to FALSE to enable proper operation every time instead of - // handling it in alterate attempts. - storeSelectedItemToPcm = FALSE; + // Sep 01, 2005 REF: CRR 32707 x0021334 + // Set storeSelectedItemToPcm to FALSE to enable proper operation every time instead of + // handling it in alterate attempts. + storeSelectedItemToPcm = FALSE; - HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away + HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away - /* get us out of here - */ + /* get us out of here + */ mnuEscape( data->menu ); - mnu = (MfwMnu *) mfwControl( data->menu ); - if (mnu != NULL) - { - if (mnu->curAttr != NULL) - { - // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check - if( winIsFocussed(window) ) - softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); - } - } + mnu = (MfwMnu *) mfwControl( data->menu ); + if (mnu != NULL) + { + if (mnu->curAttr != NULL) + { + // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check + if( winIsFocussed(window) ) + softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); + } + } - // Return the menu scroll behavior to normal. - if(getScrollSelectMenuItem() == TRUE) - { - clearScrollSelectMenuItem(); - } - /* - If user exits the volume settings menu from the Idle or Incoming call screen. - clear the soundsReason. - */ - if(getSoundsReason() == SettingVolume) - { - /* RAVI - 20-1-2006 */ + // Return the menu scroll behavior to normal. + if(getScrollSelectMenuItem() == TRUE) + { + clearScrollSelectMenuItem(); + } + /* + If user exits the volume settings menu from the Idle or Incoming call screen. + clear the soundsReason. + */ + if(getSoundsReason() == SettingVolume) + { + /* RAVI - 20-1-2006 */ #ifdef NEPTUNE_BOARD - /* Restore the volume setting */ - restorePreviousVolumeSetting (); + /* Restore the volume setting */ + restorePreviousVolumeSetting (); #endif - /* END RAVI */ - stopRingerVolSettingInactivityTimer(); - setSoundsReason(SoundsNone); + /* END RAVI */ + stopRingerVolSettingInactivityTimer(); + setSoundsReason(SoundsNone); //Apr 05, 2005 REF: ENH 29994 xdeepadh #ifdef FF_MIDI_RINGER - //Delete teh timer for volume scrolling - if(hPlayerStartTimer!=NULL) - timDelete(hPlayerStartTimer); + //Delete teh timer for volume scrolling + if(hPlayerStartTimer!=NULL) + timDelete(hPlayerStartTimer); #endif - } + } - } + } break; case KCD_STAR: - { + { - /* + /* * Keypadlock will lock only * within two seconds by press "*" */ - if(data->status_of_timer EQ FALSE) - { - TRACE_EVENT ("activate KEYpadLOCK"); - mnuEscape( data->menu ); - settingsKeyPadLockOn (); - } + if(data->status_of_timer EQ FALSE) + { + TRACE_EVENT ("activate KEYpadLOCK"); + mnuEscape( data->menu ); + settingsKeyPadLockOn (); + } - /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */ + /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */ else if (window == data->phbk->menu_main_win) - { - /* Number key presses in phonebook menu returns user to idle screen, - add key press to Idle edit screen. */ + { + /* Number key presses in phonebook menu returns user to idle screen, + add key press to Idle edit screen. */ - keycode = k->code; + keycode = k->code; - bookMenuDestroy(data->win); + bookMenuDestroy(data->win); - SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); - } - } + SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); + } + } break; case KCD_HASH: - { - /* + { + /* * Keypadlock will lock only * within two seconds by press "*" */ - if(data->status_of_timer EQ FALSE) - { - TRACE_EVENT ("activate Silent mode"); + if(data->status_of_timer EQ FALSE) + { + TRACE_EVENT ("activate Silent mode"); - if(FFS_flashData.settings_status & SettingsSilentMode) - { - settingsSilentModeOff(); - } - else - { - settingsSilentModeOn(); - } - mnuEscape( data->menu ); - } + if(FFS_flashData.settings_status & SettingsSilentMode) + { + settingsSilentModeOff(); + } + else + { + settingsSilentModeOn(); + } + mnuEscape( data->menu ); + } - /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */ + /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */ else if (window == data->phbk->menu_main_win) - { - /* Number key presses in phonebook menu returns user to idle screen, - add key press to Idle edit screen. */ + { + /* Number key presses in phonebook menu returns user to idle screen, + add key press to Idle edit screen. */ - keycode = k->code; + keycode = k->code; - bookMenuDestroy(data->win); + bookMenuDestroy(data->win); - SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); - } - } + SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); + } + } break; default: - { - TRACE_EVENT("bookMenuKbdCb - DEFAULT!"); - /* SH - only allow dialling if we are in the main menu */ - if (window == data->phbk->menu_main_win) - { - /* keypadLock will not activate anymore */ - data->status_of_timer = TRUE; + { + TRACE_EVENT("bookMenuKbdCb - DEFAULT!"); + /* SH - only allow dialling if we are in the main menu */ + if (window == data->phbk->menu_main_win) + { + /* keypadLock will not activate anymore */ + data->status_of_timer = TRUE; - /* Number key presses in phonebook menu returns user to idle screen, - add key press to Idle edit screen. */ + /* Number key presses in phonebook menu returns user to idle screen, + add key press to Idle edit screen. */ - keycode = k->code; + keycode = k->code; - bookMenuDestroy(data->win); + bookMenuDestroy(data->win); - /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ - /* if ((k->code>=KCD_0 && k->code<=KCD_9)) */ - if (k->code<=KCD_9) - { - TRACE_EVENT("Idle Editor Start!"); - SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); - } - } - } + /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ + /* if ((k->code>=KCD_0 && k->code<=KCD_9)) */ + if (k->code<=KCD_9) + { + TRACE_EVENT("Idle Editor Start!"); + SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); + } + } + } break; - } + } - /* always consume the event - */ + /* always consume the event + */ return MFW_EVENT_CONSUMED; } - - - - - /******************************************************************************* - $Function: bookMenuKbdLongCB + $Function: bookMenuKbdLongCB - $Description: keyboard long press event handler + $Description: keyboard long press event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, key handle + $Arguments: e, event, k, key handle *******************************************************************************/ static int bookMenuKbdLongCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND window = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND window = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - TRACE_FUNCTION( "bookMenuKbdLongCB()" ); + TRACE_FUNCTION( "bookMenuKbdLongCB()" ); - if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) - { mnuEscape( data->menu ); - return MFW_EVENT_CONSUMED; - } - /*if long press on END key*/ - if ( ( e & KEY_HUP) && ( e & KEY_LONG ) ) - { - U8 keycode; - U8 uMode; - uMode = dspl_Enable(0); - - // keypadLock will not activate anymore - data->status_of_timer = TRUE; + if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) + { mnuEscape( data->menu ); + return MFW_EVENT_CONSUMED; + } + /*if long press on END key*/ + if ( ( e & KEY_HUP) && ( e & KEY_LONG ) ) + { + U8 keycode; + U8 uMode; + uMode = dspl_Enable(0); - //return to idle screen + // keypadLock will not activate anymore + data->status_of_timer = TRUE; - keycode = k->code; + //return to idle screen - if (data->Callback) - (data->Callback) (data->parent_win, NULL, NULL); + keycode = k->code; - bookMenuDestroy(data->win); - stopRingerVolSettingInactivityTimer(); + if (data->Callback) + (data->Callback) (data->parent_win, NULL, NULL); - SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode); + bookMenuDestroy(data->win); + stopRingerVolSettingInactivityTimer(); - dspl_Enable(uMode); - } + SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode); - return MFW_EVENT_CONSUMED; -} + dspl_Enable(uMode); + } - - - + return MFW_EVENT_CONSUMED; +} /******************************************************************************* - $Function: bookMenuCreate + $Function: bookMenuCreate - $Description: Create the menu window + $Description: Create the menu window - $Returns: handle of newly created window, or NULL if error + $Returns: handle of newly created window, or NULL if error - $Arguments: parent, handle of the parent window + $Arguments: parent, handle of the parent window *******************************************************************************/ static T_MFW_HND bookMenuCreate( MfwHnd parent ) { - T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; - T_phbk *phbk = (T_phbk *)parent_win_data->user; - T_MFW_WIN *win_data; - tBookStandard *data; + T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; + T_phbk *phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data; - TRACE_FUNCTION( "bookMenuCreate()" ); + TRACE_FUNCTION( "bookMenuCreate()" ); - /* allocate memory for our control block - */ - if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) - return NULL; + /* allocate memory for our control block + */ + if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) + return NULL; - /* Create the window if we can - */ - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookMenuWindowCB ) ) == NULL ) - { - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - return NULL; - } + /* Create the window if we can + */ + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookMenuWindowCB ) ) == NULL ) + { + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + return NULL; + } - /* Okay, we have created the control block and the window, so - we now need to configure the dialog and data pointers - */ - data->mmi_control.dialog = (T_DIALOG_FUNC) bookMenuDialog; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *) data; - data->phbk = phbk; - data->parent_win = parent; + /* Okay, we have created the control block and the window, so + we now need to configure the dialog and data pointers + */ + data->mmi_control.dialog = (T_DIALOG_FUNC) bookMenuDialog; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *) data; + data->phbk = phbk; + data->parent_win = parent; - /* create keyboards and menus for our window - */ - data->kbd = kbdCreate ( data->win, KEY_ALL, (MfwCb) bookMenuKbdCB ); - data->kbd_long = kbdCreate ( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookMenuKbdLongCB ); + /* create keyboards and menus for our window + */ + data->kbd = kbdCreate ( data->win, KEY_ALL, (MfwCb) bookMenuKbdCB ); + data->kbd_long = kbdCreate ( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookMenuKbdLongCB ); data->menu_tim = tim_create (data->win, THREE_SECS, (MfwCb) bookMenuTimCB); - data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK) + data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK) - /* And return the handle of the newly created window - */ + /* And return the handle of the newly created window + */ return data->win; } - - - /******************************************************************************* Public Methods @@ -901,19 +875,19 @@ $Function: bookMenuStart - $Description: tbd + $Description: tbd - $Returns: tbd + $Returns: tbd - $Arguments: tbd + $Arguments: tbd *******************************************************************************/ T_MFW_HND bookMenuStart( MfwHnd parent, MfwMnuAttr *menuAttr,SHORT reason ) { - T_MFW_HND win; + T_MFW_HND win; - win = bookMenuCreate( parent ); + win = bookMenuCreate( parent ); if ( win != NULL ) SEND_EVENT( win, MENU_INIT, reason, (MfwMnuAttr *) menuAttr ); @@ -921,74 +895,69 @@ } - /******************************************************************************* - $Function: bookMenuDestroy + $Function: bookMenuDestroy - $Description: Destroy the menu window + $Description: Destroy the menu window - $Returns: none + $Returns: none - $Arguments: window, handle of the window being destroyed + $Arguments: window, handle of the window being destroyed *******************************************************************************/ void bookMenuDestroy( MfwHnd window ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - char test_string[40]; + T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + char test_string[40]; - TRACE_FUNCTION( "bookMenuDestroy()" ); + TRACE_FUNCTION( "bookMenuDestroy()" ); - if (window == NULL) - { - TRACE_EVENT ("Error : Called with NULL Pointer"); - return; - } + if (window == NULL) + { + TRACE_EVENT ("Error : Called with NULL Pointer"); + return; + } - if ( data ) - { + if ( data ) + { - /* If we have the root window here then we use the main phone - book destroy method - */ - if ( data->phbk->root_win == window ) - { - bookPhonebookDestroy( data->phbk->win ); - return; - } + /* If we have the root window here then we use the main phone + book destroy method + */ + if ( data->phbk->root_win == window ) + { + bookPhonebookDestroy( data->phbk->win ); + return; + } - /* Otherwise clear down our pointers and free the current - menu window structures - */ - if ( data->phbk->search_win == window ) - data->phbk->search_win = 0; - if ( data->phbk->menu_main_win == window ) - data->phbk->menu_main_win = 0; - if ( data->phbk->menu_options_win == window ) - data->phbk->menu_options_win = 0; - if ( data->phbk->menu_options_win_2 == window ) - data->phbk->menu_options_win_2 = 0; - if ( data->phbk->menu_call_options_win == window ) - data->phbk->menu_call_options_win = 0; - if ( data->phbk->menu_call_options_win_2 == window ) - data->phbk->menu_call_options_win_2 = 0; + /* Otherwise clear down our pointers and free the current + menu window structures + */ + if ( data->phbk->search_win == window ) + data->phbk->search_win = 0; + if ( data->phbk->menu_main_win == window ) + data->phbk->menu_main_win = 0; + if ( data->phbk->menu_options_win == window ) + data->phbk->menu_options_win = 0; + if ( data->phbk->menu_options_win_2 == window ) + data->phbk->menu_options_win_2 = 0; + if ( data->phbk->menu_call_options_win == window ) + data->phbk->menu_call_options_win = 0; + if ( data->phbk->menu_call_options_win_2 == window ) + data->phbk->menu_call_options_win_2 = 0; - winDelete( data->win ); - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - sprintf(test_string, "Bookmenudestroy: %d", mfwCheckMemoryLeft()); - TRACE_EVENT(test_string); - } + winDelete( data->win ); + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + sprintf(test_string, "Bookmenudestroy: %d", mfwCheckMemoryLeft()); + TRACE_EVENT(test_string); + } } - - - - /******************************************************************************* End of File
--- a/src/ui/bmi/mmiBookPhonebook.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookPhonebook.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookPhoneBook.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookPhoneBook.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -34,22 +34,22 @@ sending MMS/EMS. Solution: The new feature to select the number from phonebook while sending - Aug 16, 2004 REF: CRR 24323 Deepa M.D - Bug:Clenup of sprintf used for tracing - Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX + Aug 16, 2004 REF: CRR 24323 Deepa M.D + Bug:Clenup of sprintf used for tracing + Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX - Sep 29, 2004 REF: CRR 25041 xvilliva - Bug: add new entry in the FDN , phone gets rebooted. - Fix: The global variable "menuFDN" is reset while menu is destroyed. + Sep 29, 2004 REF: CRR 25041 xvilliva + Bug: add new entry in the FDN , phone gets rebooted. + Fix: The global variable "menuFDN" is reset while menu is destroyed. Jul 21, 2004 REF: CRR 13348 xvilliva - Bug: After selecting HPLMN manually, the idle screen is not shown. - Fix: After phonebook menu is created, we store the window handle in a - global. + Bug: After selecting HPLMN manually, the idle screen is not shown. + Fix: After phonebook menu is created, we store the window handle in a + global. - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -119,7 +119,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -140,8 +139,6 @@ #include "MmiTimers.h" - - #include "MmiBookShared.h" #include "MmiBookController.h" @@ -163,321 +160,305 @@ /******************************************************************************* - $Function: bookPhonebookDialog + $Function: bookPhonebookDialog - $Description: Dialog function for the phone book application + $Description: Dialog function for the phone book application - $Returns: none + $Returns: none - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, reason for call + value, not used + parameter, reason for call *******************************************************************************/ static void bookPhonebookDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - T_phbk *data = (T_phbk *) win_data->user; - SHORT *reason = (SHORT *) parameter; + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + T_phbk *data = (T_phbk *) win_data->user; + SHORT *reason = (SHORT *) parameter; TRACE_FUNCTION ("bookPhonebookDialog()"); switch (event) - { - case PHBK_INIT: - { - /* Initialise the phone book application. - Note that we need to deal with a number of different - initialisation types, depending on the reason given - */ - memset( data->edt_buf_name, '\0', sizeof( data->edt_buf_name ) ); - memset( data->edt_buf_number, '\0', sizeof( data->edt_buf_number ) ); + { + case PHBK_INIT: + { + /* Initialise the phone book application. + Note that we need to deal with a number of different + initialisation types, depending on the reason given + */ + memset( data->edt_buf_name, '\0', sizeof( data->edt_buf_name ) ); + memset( data->edt_buf_number, '\0', sizeof( data->edt_buf_number ) ); /* SPR#1428 - SH - New Editor changes */ #ifndef NEW_EDITOR - /* No longer needed for NEW_EDITOR - attributes are initialised when editors created*/ - bookSetEditAttributes( PHONEBOOK_DLG_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, - (char *) data->edt_buf_name, MAX_ALPHA_LEN, &data->edt_attr_name ); - bookSetEditAttributes( PHONEBOOK_DLG_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, - (char *) data->edt_buf_number, MAX_ALPHA_LEN, &data->edt_attr_number ); + /* No longer needed for NEW_EDITOR - attributes are initialised when editors created*/ + bookSetEditAttributes( PHONEBOOK_DLG_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, + (char *) data->edt_buf_name, MAX_ALPHA_LEN, &data->edt_attr_name ); + bookSetEditAttributes( PHONEBOOK_DLG_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, + (char *) data->edt_buf_number, MAX_ALPHA_LEN, &data->edt_attr_number ); #endif - /* deal with the different initialisation types - */ - if ((bookPhoneBookLoading()==BOOK_FAILURE)&&(( *reason )!=PhbkMainMenu)) - { - T_DISPLAY_DATA display_info; + /* deal with the different initialisation types + */ + if ((bookPhoneBookLoading()==BOOK_FAILURE)&&(( *reason )!=PhbkMainMenu)) + { + T_DISPLAY_DATA display_info; - dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull , COLOUR_STATUS_WAIT); - dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR ); + dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull , COLOUR_STATUS_WAIT); + dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR ); - /* Call Info Screen - */ - info_dialog( idle_get_window(), &display_info ); + /* Call Info Screen + */ + info_dialog( idle_get_window(), &display_info ); - bookPhonebookDestroy(data->win); - return; - } - switch ( *reason ) - { - case PhbkNormal: - { - /* Normal initialisation - */ - data->current.status.book = bookActiveBook(READ); - data->current.index = 1; + bookPhonebookDestroy(data->win); + return; + } + switch ( *reason ) + { + case PhbkNormal: + { + /* Normal initialisation + */ + data->current.status.book = bookActiveBook(READ); + data->current.index = 1; data->menu_main_win = bookMenuStart( data->win, bookPhonebookMenuAttributes(), *reason); - data->root_win = data->menu_main_win; - } - break; + data->root_win = data->menu_main_win; + } + break; - case PhbkMainMenu: - { - /* Normal initialisation - */ - data->current.status.book = bookActiveBook(READ); - data->current.index = 1; + case PhbkMainMenu: + { + /* Normal initialisation + */ + data->current.status.book = bookActiveBook(READ); + data->current.index = 1; data->menu_main_win = bookMenuStart( data->win, bookMainMenuAttributes(), *reason); - data->root_win = data->menu_main_win; - } - break; + data->root_win = data->menu_main_win; + } + break; - case PhbkReplyListNormal: - { - TRACE_EVENT ("PhbkReplyListNormal"); + case PhbkReplyListNormal: + { + TRACE_EVENT ("PhbkReplyListNormal"); - /* reply list - */ - bookCallListStart(win,PHB_LRN); - } - break; - case PhbkMissedCallsListNormal: - { - /* reply list - */ - bookCallListStart(win,PHB_LMN); - } - break; + /* reply list + */ + bookCallListStart(win,PHB_LRN); + } + break; + case PhbkMissedCallsListNormal: + { + /* reply list + */ + bookCallListStart(win,PHB_LMN); + } + break; - case PhbkRedialListNormal: - { - /* Redial list - */ - bookCallListStart(win,PHB_LDN); - } - break; + case PhbkRedialListNormal: + { + /* Redial list + */ + bookCallListStart(win,PHB_LDN); + } + break; - case PhbkNameEnterIdle: - { - /* Normal initialisation - */ - data->current.status.book = bookActiveBook(READ); - data->current.index = 1; + case PhbkNameEnterIdle: + { + /* Normal initialisation + */ + data->current.status.book = bookActiveBook(READ); + data->current.index = 1; data->menu_main_win = bookMenuStart( data->win, bookPhonebookMenuAttributes(), *reason); - data->root_win = data->menu_main_win; - data->phbk->UpdateAction = ADD_FROM_IDLE; - } - break; + data->root_win = data->menu_main_win; + data->phbk->UpdateAction = ADD_FROM_IDLE; + } + break; - case PhbkSearchNormal : - { - /* Search window - */ - data->root_win = data->phbk->search_win; - } - break; + case PhbkSearchNormal : + { + /* Search window + */ + data->root_win = data->phbk->search_win; + } + break; - case PhbkFromSms : - { - /* Invoked from within SMS, need to remember this - */ - data->phbk->fromSMS = TRUE; - data->root_win = data->phbk->search_win; - data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + case PhbkFromSms : + { + /* Invoked from within SMS, need to remember this + */ + data->phbk->fromSMS = TRUE; + data->root_win = data->phbk->search_win; + data->phbk->current.KindOfSearch = SEARCH_BY_NAME; + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); - } - break; + } + break; //CRR: 25302 - xpradipg 10 Nov 2004 //New case added to handle the retrival of number from MMS/EMS - case PhbkFromMms : - { - /* Invoked from within MMS/EMS, need to remember this - */ - data->phbk->fromMmsEms = TRUE; - data->root_win = data->phbk->search_win; - data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + case PhbkFromMms : + { + /* Invoked from within MMS/EMS, need to remember this + */ + data->phbk->fromMmsEms = TRUE; + data->root_win = data->phbk->search_win; + data->phbk->current.KindOfSearch = SEARCH_BY_NAME; + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); - } - break; + } + break; - /*SH*/ - case PhbkFromSmsSC : - { - /* Invoked from within SMS Service centre, need to remember this - */ - data->phbk->fromSMSSC = TRUE; - data->root_win = data->phbk->search_win; - data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + /*SH*/ + case PhbkFromSmsSC : + { + /* Invoked from within SMS Service centre, need to remember this + */ + data->phbk->fromSMSSC = TRUE; + data->root_win = data->phbk->search_win; + data->phbk->current.KindOfSearch = SEARCH_BY_NAME; + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); - } - break; + } + break; - case PhbkFromDivert: - { - /* Invoked from within Divert, need to remember this - */ - data->phbk->fromDivert = TRUE; - data->root_win = data->phbk->search_win; - data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + case PhbkFromDivert: + { + /* Invoked from within Divert, need to remember this + */ + data->phbk->fromDivert = TRUE; + data->root_win = data->phbk->search_win; + data->phbk->current.KindOfSearch = SEARCH_BY_NAME; + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); - } + } - break; - /*SPR 1392, initialisation from call deflection*/ - case PhbkFromDeflect: - { - /* Invoked from within Divert, need to remember this - */ - data->phbk->fromDeflect = TRUE; - data->root_win = data->phbk->search_win; - data->phbk->current.KindOfSearch = SEARCH_BY_NAME; - data->phbk->current.status.book = bookActiveBook(READ); - data->phbk->search_win = bookSearchStart( data->phbk->win ); + break; + /*SPR 1392, initialisation from call deflection*/ + case PhbkFromDeflect: + { + /* Invoked from within Divert, need to remember this + */ + data->phbk->fromDeflect = TRUE; + data->root_win = data->phbk->search_win; + data->phbk->current.KindOfSearch = SEARCH_BY_NAME; + data->phbk->current.status.book = bookActiveBook(READ); + data->phbk->search_win = bookSearchStart( data->phbk->win ); - } + } - break; + break; - default: - { - /* No default action required - */ - } - } - } - break; - case PHBK_SEND_NUMBER: - TRACE_EVENT ("PHBK_SEND_NUMBER"); - /***************************Go-lite Optimization changes Start***********************/ - //Aug 16, 2004 REF: CRR 24323 Deepa M.D - TRACE_EVENT_P3 ("win %p parameter %s data->phbk %p",win,(char*)parameter,data->phbk); - /***************************Go-lite Optimization changes end***********************/ - strncpy( data->phbk->edt_buf_number, (char*)parameter, PHB_MAX_LEN ); - break; - default: - { - /* No default action required - */ - } - } + default: + { + /* No default action required + */ + } + } + } + break; + case PHBK_SEND_NUMBER: + TRACE_EVENT ("PHBK_SEND_NUMBER"); + /***************************Go-lite Optimization changes Start***********************/ + //Aug 16, 2004 REF: CRR 24323 Deepa M.D + TRACE_EVENT_P3 ("win %p parameter %s data->phbk %p",win,(char*)parameter,data->phbk); + /***************************Go-lite Optimization changes end***********************/ + strncpy( data->phbk->edt_buf_number, (char*)parameter, PHB_MAX_LEN ); + break; + default: + { + /* No default action required + */ + } + } } - - - - - - - /******************************************************************************* - $Function: bookPhonebookWindowCB + $Function: bookPhonebookWindowCB - $Description: Window call back for the phone book application + $Description: Window call back for the phone book application - $Returns: MFW_EVENT_CONSUMED if event is MfwWinVisible, otherwise - MFW_EVENT_PASSED + $Returns: MFW_EVENT_CONSUMED if event is MfwWinVisible, otherwise + MFW_EVENT_PASSED - $Arguments: e, event, w, window handle + $Arguments: e, event, w, window handle *******************************************************************************/ static int bookPhonebookWindowCB ( MfwEvt e, MfwWin *w ) { TRACE_FUNCTION ("bookPhonebookWindowCB()"); - return ( e == MfwWinVisible ) ? MFW_EVENT_CONSUMED : MFW_EVENT_PASSED; + return ( e == MfwWinVisible ) ? MFW_EVENT_CONSUMED : MFW_EVENT_PASSED; } - - - - - - /******************************************************************************* - $Function: bookPhonebookCreate + $Function: bookPhonebookCreate - $Description: Create the phone book application + $Description: Create the phone book application - $Returns: Handle of the newly created window or NULL if error + $Returns: Handle of the newly created window or NULL if error - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ static T_MFW_HND bookPhonebookCreate( MfwHnd parent ) { - T_MFW_WIN *win_data; - T_phbk *data; + T_MFW_WIN *win_data; + T_phbk *data; - TRACE_FUNCTION ("bookPhonebookCreate()"); + TRACE_FUNCTION ("bookPhonebookCreate()"); - if ( ( data = (T_phbk *) ALLOC_MEMORY( sizeof( T_phbk ) ) ) == NULL ) - return NULL; + if ( ( data = (T_phbk *) ALLOC_MEMORY( sizeof( T_phbk ) ) ) == NULL ) + return NULL; - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookPhonebookWindowCB ) ) == NULL ) - { - FREE_MEMORY( (void *) data, sizeof( T_phbk ) ); - return NULL; - } + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookPhonebookWindowCB ) ) == NULL ) + { + FREE_MEMORY( (void *) data, sizeof( T_phbk ) ); + return NULL; + } /* Create window handler */ data->mmi_control.dialog = (T_DIALOG_FUNC) bookPhonebookDialog; - data->mmi_control.data = data; + data->mmi_control.data = data; win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *)data; - winShow(data->win); + win_data->user = (void *)data; + winShow(data->win); - /* initialise the options structure - */ - data->root_win = 0; - data->menu_main_win = 0; - data->calls_list_win = 0; - data->menu_options_win = 0; - data->menu_options_win_2 = 0; - data->menu_call_options_win = 0; - data->menu_call_options_win_2 = 0; - data->name_details_win = 0; - data->search_win = 0; - data->fromSMS = FALSE; - data->fromSMSSC = FALSE; - data->fromDivert = FALSE; - data->fromDeflect = FALSE;/*SPR 1392*/ - data->parent_win = parent; - data->phbk = data; + /* initialise the options structure + */ + data->root_win = 0; + data->menu_main_win = 0; + data->calls_list_win = 0; + data->menu_options_win = 0; + data->menu_options_win_2 = 0; + data->menu_call_options_win = 0; + data->menu_call_options_win_2 = 0; + data->name_details_win = 0; + data->search_win = 0; + data->fromSMS = FALSE; + data->fromSMSSC = FALSE; + data->fromDivert = FALSE; + data->fromDeflect = FALSE;/*SPR 1392*/ + data->parent_win = parent; + data->phbk = data; - /* return window handle + /* return window handle */ return data->win; } - - - /******************************************************************************* Public methods @@ -486,100 +467,96 @@ /******************************************************************************* - $Function: bookPhonebookStart + $Function: bookPhonebookStart - $Description: Starts up the phone book application + $Description: Starts up the phone book application - $Returns: Handle of window or NULL if error + $Returns: Handle of window or NULL if error - $Arguments: parent, window, reason, for invocation + $Arguments: parent, window, reason, for invocation *******************************************************************************/ T_MFW_HND bookPhonebookStart( MfwHnd parent, int reason ) { - T_MFW_HND win; + T_MFW_HND win; if ( ( win = bookPhonebookCreate( parent ) ) != NULL ) { SEND_EVENT( win, PHBK_INIT, 0, (int *) &reason ); - if(reason == PhbkMainMenu) - gPhbkMenu = win;//Jul 21, 2004 REF: CRR 13348 xvilliva + if(reason == PhbkMainMenu) + gPhbkMenu = win;//Jul 21, 2004 REF: CRR 13348 xvilliva } return win; } - - - - /******************************************************************************* - $Function: bookPhonebookDestroy + $Function: bookPhonebookDestroy - $Description: Destroys the phone book application + $Description: Destroys the phone book application - $Returns: none + $Returns: none - $Arguments: window, to be destroyed + $Arguments: window, to be destroyed *******************************************************************************/ void bookPhonebookDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; - T_phbk *data = (T_phbk *) win->user; + T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; + T_phbk *data = (T_phbk *) win->user; - TRACE_FUNCTION ("bookPhonebookDestroy()"); + TRACE_FUNCTION ("bookPhonebookDestroy()"); - if ( data ) - { - /* need to clean up all of the subordinate windows which - may have been created during the phone book application - */ - data->root_win = 0; - if (data->search_win) - bookSearchDestroy( data->search_win ); + if ( data ) + { + /* need to clean up all of the subordinate windows which + may have been created during the phone book application + */ + data->root_win = 0; + if (data->search_win) + bookSearchDestroy( data->search_win ); - if (data->menu_main_win) - bookMenuDestroy(data->menu_main_win); + if (data->menu_main_win) + bookMenuDestroy(data->menu_main_win); - if (data->calls_list_win) - bookCallListDestroy(data->calls_list_win); + if (data->calls_list_win) + bookCallListDestroy(data->calls_list_win); - if (data->menu_options_win) - bookMenuDestroy(data->menu_options_win); + if (data->menu_options_win) + bookMenuDestroy(data->menu_options_win); - if (data->menu_options_win_2) - bookMenuDestroy(data->menu_options_win_2); + if (data->menu_options_win_2) + bookMenuDestroy(data->menu_options_win_2); - if (data->menu_call_options_win) - bookMenuDestroy(data->menu_call_options_win); + if (data->menu_call_options_win) + bookMenuDestroy(data->menu_call_options_win); - if (data->menu_call_options_win_2) - { - menuFDN = 0 ;// Sep 29, 2004 REF: CRR 25041 xvilliva - bookMenuDestroy(data->menu_call_options_win_2); - } + if (data->menu_call_options_win_2) + { + menuFDN = 0 ;// Sep 29, 2004 REF: CRR 25041 xvilliva + bookMenuDestroy(data->menu_call_options_win_2); + } - if (data->name_details_win) - bookDetailsDestroy(data->name_details_win); + if (data->name_details_win) + bookDetailsDestroy(data->name_details_win); - if (data->input_name_win) - bookInputDestroy(data->input_name_win); + if (data->input_name_win) + bookInputDestroy(data->input_name_win); - if (data->input_number_win) - bookInputDestroy(data->input_number_win); + if (data->input_number_win) + bookInputDestroy(data->input_number_win); - /* delete the window and free any allocated memory - */ - winDelete (data->win); - FREE_MEMORY( (void *) data, sizeof( T_phbk ) ); - } - //Jul 21, 2004 REF: CRR 13348 xvilliva - //While we destroy the menu assign the handle to NULL. - gPhbkMenu = NULL; + /* delete the window and free any allocated memory + */ + winDelete (data->win); + FREE_MEMORY( (void *) data, sizeof( T_phbk ) ); + } + //Jul 21, 2004 REF: CRR 13348 xvilliva + //While we destroy the menu assign the handle to NULL. + gPhbkMenu = NULL; }
--- a/src/ui/bmi/mmiBookSDNWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookSDNWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookSDNWindow.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookSDNWindow.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -32,7 +32,7 @@ sending MMS/EMS. Solution: The new feature to select the number from phonebook while sending MMS/EMS is added - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -40,7 +40,6 @@ - /******************************************************************************* Include Files @@ -91,7 +90,7 @@ #include "mfw_mme.h" #include "mfw_sat.h" #include "mfw_sms.h" -#include "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr' +#include "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr' #include "dspl.h" @@ -105,7 +104,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -130,8 +128,6 @@ #include "mmiColours.h" - - /******************************************************************************* Private methods @@ -140,16 +136,16 @@ /******************************************************************************* - $Function: bookSDN + $Function: bookSDN - $Description: window dialog function + $Description: window dialog function - $Returns: none. + $Returns: none. - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ @@ -157,190 +153,188 @@ { T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; tBookStandard *data = (tBookStandard *)win_data->user; - MfwMnu *mnu; - tMmiPhbData *my; + MfwMnu *mnu; + tMmiPhbData *my; TRACE_FUNCTION ("bookSDN()"); - /* Guard against bad incoming data - */ - if ( ! data ) - return; + /* Guard against bad incoming data + */ + if ( ! data ) + return; - /* Grab the current phonebook data element, we use this a lot - */ - my = &data->phbk->current; + /* Grab the current phonebook data element, we use this a lot + */ + my = &data->phbk->current; - /* simple event handler, dealing with the messages we know about - */ + /* simple event handler, dealing with the messages we know about + */ switch (event) - { - case SEARCH_INIT: - { - /* Search initialise, no action required - */ - } - break; + { + case SEARCH_INIT: + { + /* Search initialise, no action required + */ + } + break; - case SEARCH_SCROLL_UP: - { - /* Scroll up event we need to deal with correctly - */ - if ( ( my->index==1 ) && ( my->selectedName == 0 ) ) - { - /* select the correct boundary for the list - */ - my->selectedName = my->status.used_entries; - if ( my->selectedName > MAX_SEARCH_NAME ) - my->selectedName = MAX_SEARCH_NAME; + case SEARCH_SCROLL_UP: + { + /* Scroll up event we need to deal with correctly + */ + if ( ( my->index==1 ) && ( my->selectedName == 0 ) ) + { + /* select the correct boundary for the list + */ + my->selectedName = my->status.used_entries; + if ( my->selectedName > MAX_SEARCH_NAME ) + my->selectedName = MAX_SEARCH_NAME; - /* and subtract one cos we are dealing with an array starting - at zero - */ - my->selectedName--; + /* and subtract one cos we are dealing with an array starting + at zero + */ + my->selectedName--; - /* and calculate the correct index value - */ - my->index = my->status.used_entries - my->selectedName; + /* and calculate the correct index value + */ + my->index = my->status.used_entries - my->selectedName; - } - else - { - if ( my->selectedName == 0 ) - my->index--; - else - my->selectedName--; - } + } + else + { + if ( my->selectedName == 0 ) + my->index--; + else + my->selectedName--; + } - /* update menu structures - */ - mnu = (MfwMnu *)mfwControl( data->menu ); - mnu->lCursor[ mnu->level ] = my->selectedName; + /* update menu structures + */ + mnu = (MfwMnu *)mfwControl( data->menu ); + mnu->lCursor[ mnu->level ] = my->selectedName; - /* and go find the name - */ - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - } - break; + /* and go find the name + */ + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + } + break; - case SEARCH_SCROLL_DOWN: - { - /* scroll down event is a bit easier than the scroll up - */ - if ( (my->index + my->selectedName) == my->status.used_entries ) - { - my->index = 1; - my->selectedName = 0; - } - else - { - if ( my->selectedName == (MAX_SEARCH_NAME - 1) ) - my->index++; - else - my->selectedName++; - } + case SEARCH_SCROLL_DOWN: + { + /* scroll down event is a bit easier than the scroll up + */ + if ( (my->index + my->selectedName) == my->status.used_entries ) + { + my->index = 1; + my->selectedName = 0; + } + else + { + if ( my->selectedName == (MAX_SEARCH_NAME - 1) ) + my->index++; + else + my->selectedName++; + } - /* update menu structures - */ - mnu = (MfwMnu *)mfwControl( data->menu ); - mnu->lCursor[ mnu->level ] = my->selectedName; + /* update menu structures + */ + mnu = (MfwMnu *)mfwControl( data->menu ); + mnu->lCursor[ mnu->level ] = my->selectedName; - /* and go find the name - */ - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - } - break; + /* and go find the name + */ + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + } + break; - case SEARCH_STRING: - { - /* search for the current element selected in our buffer - */ - my->index = my->index + my->selectedName; + case SEARCH_STRING: + { + /* search for the current element selected in our buffer + */ + my->index = my->index + my->selectedName; - if ( bookSearchName( data->edtBuf, MAX_SEARCH_NAME, &data->phbk->current ) == MFW_PHB_OK ) - { - if ( my->index > (my->status.used_entries - MAX_SEARCH_NAME + 1) ) - { - /* need to reorganise a bit here - */ - if ( my->status.used_entries > MAX_SEARCH_NAME ) - { - my->selectedName = my->index - my->status.used_entries; - my->selectedName += MAX_SEARCH_NAME - 1; - my->index -= my->selectedName; - } - else - { - my->selectedName = my->index - 1; - my->index = 1; - } + if ( bookSearchName( data->edtBuf, MAX_SEARCH_NAME, &data->phbk->current ) == MFW_PHB_OK ) + { + if ( my->index > (my->status.used_entries - MAX_SEARCH_NAME + 1) ) + { + /* need to reorganise a bit here + */ + if ( my->status.used_entries > MAX_SEARCH_NAME ) + { + my->selectedName = my->index - my->status.used_entries; + my->selectedName += MAX_SEARCH_NAME - 1; + my->index -= my->selectedName; + } + else + { + my->selectedName = my->index - 1; + my->index = 1; + } - /* find the appropriate name - */ - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - } - else - data->phbk->current.selectedName = 0; + /* find the appropriate name + */ + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + } + else + data->phbk->current.selectedName = 0; - /* update menu structures - */ - mnu = (MfwMnu *)mfwControl(data->menu); - mnu->lCursor[mnu->level] = data->phbk->current.selectedName; - } - } - break; + /* update menu structures + */ + mnu = (MfwMnu *)mfwControl(data->menu); + mnu->lCursor[mnu->level] = data->phbk->current.selectedName; + } + } + break; - case SEARCH_UPDATE: - { - /* Update search message - */ - my->index = 1; - my->selectedName = 0; - memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); + case SEARCH_UPDATE: + { + /* Update search message + */ + my->index = 1; + my->selectedName = 0; + memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_Reset( data->editor ); + ATB_edit_Reset( data->editor ); #else /* NEW_EDITOR */ - edtReset( data->edt ); + edtReset( data->edt ); #endif /* NEW_EDITOR */ - /* deal with the new search using the method above - */ - SEND_EVENT( win, SEARCH_STRING, 0, 0 ); - } - break; + /* deal with the new search using the method above + */ + SEND_EVENT( win, SEARCH_STRING, 0, 0 ); + } + break; /* SPR#1428 - SH - New Editor: added event so we can * prompt a redraw when required. */ #ifdef NEW_EDITOR - case SEARCH_REDRAW: - win_show(data->win); - break; + case SEARCH_REDRAW: + win_show(data->win); + break; #endif - default: - { - /* no default handler, just ignore any other messages - */ - } - break; + default: + { + /* no default handler, just ignore any other messages + */ + } + break; - } + } } - - /******************************************************************************* - $Function: bookSDNWinCB + $Function: bookSDNWinCB - $Description: Window call back function + $Description: Window call back function - $Returns: status indicating if event handled or not + $Returns: status indicating if event handled or not - $Arguments: e, event, w, window handle + $Arguments: e, event, w, window handle *******************************************************************************/ @@ -348,117 +342,115 @@ { tBookStandard *data = (tBookStandard *)w->user; - char *ElemPtr, *NumPtr; + char *ElemPtr, *NumPtr; - /* x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ - /* int leftKey, rightKey, ElemSize, i, Position; */ - int leftKey, rightKey, ElemSize, i; + /* x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ + /* int leftKey, rightKey, ElemSize, i, Position; */ + int leftKey, rightKey, ElemSize, i; TRACE_FUNCTION ("phbk_sdn_win_cb()"); - switch (e) + switch (e) { case MfwWinVisible: - { - /* Paint function, clear the screen and paint in each - of our controls - */ - dspl_ClearAll(); + { + /* Paint function, clear the screen and paint in each + of our controls + */ + dspl_ClearAll(); /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_Show(data->editor); + ATB_edit_Show(data->editor); #else /* NEW_EDITOR */ - edtShow(data->edt); + edtShow(data->edt); #endif /* NEW_EDITOR */ - /* Populate the names screen buffer - */ - for (i=0;i<MAX_SEARCH_NAME;i++) - { - /* Grab info for this element - */ - ElemPtr = MmiBookCallList(i); - ElemSize = MmiBookCallListSize(i); + /* Populate the names screen buffer + */ + for (i=0;i<MAX_SEARCH_NAME;i++) + { + /* Grab info for this element + */ + ElemPtr = MmiBookCallList(i); + ElemSize = MmiBookCallListSize(i); - /* Decide on whether to use number or name - */ + /* Decide on whether to use number or name + */ #ifdef NO_ASCIIZ - NumPtr = (char*)data->phbk->current.entry[i].name.data; + NumPtr = (char*)data->phbk->current.entry[i].name.data; #else - NumPtr = (char*)data->phbk->current.entry[i].name; + NumPtr = (char*)data->phbk->current.entry[i].name; #endif - if ( *NumPtr == '\0' ) - { - NumPtr = (char*)data->phbk->current.entry[i].number; - /* x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ - /* Position = POS_END; */ - } - /* BEGIN: x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ - /* - else - Position = POS_BEGIN; - */ - /* END: x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ + if ( *NumPtr == '\0' ) + { + NumPtr = (char*)data->phbk->current.entry[i].number; + /* x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ + /* Position = POS_END; */ + } + /* BEGIN: x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ + /* + else + Position = POS_BEGIN; + */ + /* END: x0045876, 14-Aug-2006 (WR - "Position" was set but never used) */ - /* Clear the buffer, then fill it with the required value - */ - memset( ElemPtr, '\0', ElemSize ); - /*mc, SPR 1442, replaced old truncation function with new one*/ - resources_truncate_to_screen_width(NumPtr, 0, ElemPtr, ElemSize,SCREEN_SIZE_X, FALSE); - } + /* Clear the buffer, then fill it with the required value + */ + memset( ElemPtr, '\0', ElemSize ); + /*mc, SPR 1442, replaced old truncation function with new one*/ + resources_truncate_to_screen_width(NumPtr, 0, ElemPtr, ElemSize,SCREEN_SIZE_X, FALSE); + } - /* Show the menu and stick up the find prompt - */ - mnuUnhide(data->menu); - PROMPT( MmiBookMenuArea().px, Mmi_layout_line(SECOND_LAST_LINE_TOP), 0, TxtFind ); + /* Show the menu and stick up the find prompt + */ + mnuUnhide(data->menu); + PROMPT( MmiBookMenuArea().px, Mmi_layout_line(SECOND_LAST_LINE_TOP), 0, TxtFind ); - /* The softkeys are dependant on how we got here - */ - //CRR: 25302 - xpradipg 10 Nov 2004 - //check also if phonebook is invoked by MMS/EMS - if ( ( data->phbk->fromSMS ) || ( data->phbk->fromSMSSC )|| (data->phbk->fromMmsEms) ||( data->phbk->current.status.book == PHB_SDN ) ) - { - leftKey = TxtSoftSelect; - rightKey = TxtSoftBack; - } - else - { - leftKey = TxtSoftCall; - rightKey = TxtSoftOptions; - } - displaySoftKeys( leftKey, rightKey ); - } - break; + /* The softkeys are dependant on how we got here + */ + //CRR: 25302 - xpradipg 10 Nov 2004 + //check also if phonebook is invoked by MMS/EMS + if ( ( data->phbk->fromSMS ) || ( data->phbk->fromSMSSC )|| (data->phbk->fromMmsEms) ||( data->phbk->current.status.book == PHB_SDN ) ) + { + leftKey = TxtSoftSelect; + rightKey = TxtSoftBack; + } + else + { + leftKey = TxtSoftCall; + rightKey = TxtSoftOptions; + } + displaySoftKeys( leftKey, rightKey ); + } + break; - default: - { - /* Default handler, just return zero and let the next handler in the - chain deal with the event if required - */ - return 0; - } + default: + { + /* Default handler, just return zero and let the next handler in the + chain deal with the event if required + */ + return 0; + } } - /* return non-zero status indicating we have dealt with the event - */ - return MFW_EVENT_CONSUMED; + /* return non-zero status indicating we have dealt with the event + */ + return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookSDNKbdCB + $Function: bookSDNKbdCB - $Description: Keyboard handler + $Description: Keyboard handler - $Returns: stats indicating if event handled or not + $Returns: stats indicating if event handled or not (Always MFW_EVENT_CONSUMED) - $Arguments: e, event, k, keyboard handle + $Arguments: e, event, k, keyboard handle *******************************************************************************/ @@ -467,247 +459,240 @@ T_MFW_HND win = mfwParent(mfw_header()); T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; tBookStandard *data = (tBookStandard *)win_data->user; - tBookMessageEvents MyEvent = SEARCH_STRING; - char *Number; + tBookMessageEvents MyEvent = SEARCH_STRING; + char *Number; -// int i = 0; // RAVI +// int i = 0; // RAVI TRACE_FUNCTION ("bookSDNKbdCB()"); /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - AUI_entry_EventKey(data->entry_data, e, k); + AUI_entry_EventKey(data->entry_data, e, k); #else /* NEW_EDITOR */ - /* Make sure we have the correct editor enabled - * (unnecessary for NEW_EDITOR) */ - if ( activeEditor() != data->edt ) - editActivate( data->edt, TRUE ); - editEventKey( e, k ); + /* Make sure we have the correct editor enabled + * (unnecessary for NEW_EDITOR) */ + if ( activeEditor() != data->edt ) + editActivate( data->edt, TRUE ); + editEventKey( e, k ); #endif /* NEW_EDITOR */ - /* Handle the events we need to deal with here - */ - switch (k->code) + /* Handle the events we need to deal with here + */ + switch (k->code) { case KCD_MNUUP: - { - /* Scroll up event, just mark our event as such and it'll - be dealt with in due course - */ - MyEvent = SEARCH_SCROLL_UP; - } - break; + { + /* Scroll up event, just mark our event as such and it'll + be dealt with in due course + */ + MyEvent = SEARCH_SCROLL_UP; + } + break; case KCD_MNUDOWN: - { - /* Scroll down event, just mark our event as such and it'll - be dealt with in due course - */ - MyEvent = SEARCH_SCROLL_DOWN; - } - break; + { + /* Scroll down event, just mark our event as such and it'll + be dealt with in due course + */ + MyEvent = SEARCH_SCROLL_DOWN; + } + break; - case KCD_CALL: + case KCD_CALL: case KCD_LEFT: - { - /* left key is a select, we either need to send the number - back to the parent window, or call it - */ - Number = (char *) data->phbk->current.entry[ data->phbk->current.selectedName ].number; + { + /* left key is a select, we either need to send the number + back to the parent window, or call it + */ + Number = (char *) data->phbk->current.entry[ data->phbk->current.selectedName ].number; - if ( data->phbk->fromSMS ) - SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, 0, (UBYTE *) Number ); - if ( data->phbk->fromSMSSC ) - SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, 0, (UBYTE *) Number ); - else if(data->phbk->fromDivert ) - SEND_EVENT( data->phbk->parent_win, DIVERT_PHBK_NUMBER, 0, (UBYTE *) Number ); - else if(data->phbk->fromDeflect )/*SPR 1392, send event to call dialogue*/ - SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, 0, (UBYTE *) Number ); + if ( data->phbk->fromSMS ) + SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, 0, (UBYTE *) Number ); + if ( data->phbk->fromSMSSC ) + SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, 0, (UBYTE *) Number ); + else if(data->phbk->fromDivert ) + SEND_EVENT( data->phbk->parent_win, DIVERT_PHBK_NUMBER, 0, (UBYTE *) Number ); + else if(data->phbk->fromDeflect )/*SPR 1392, send event to call dialogue*/ + SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, 0, (UBYTE *) Number ); //CRR: 25302 - xpradipg 10 Nov 2004 //send even if invoked by MMS/EMS else if(data->phbk->fromMmsEms) SEND_EVENT( data->phbk->parent_win, MMS_EMS_PHBK_NUMBER, 0, (UBYTE *) Number ); - else - callNumber( (UBYTE *) Number ); + else + callNumber( (UBYTE *) Number ); - /* Having dealt with the number, we destroy our phone book - context and exit the handler early - */ - bookPhonebookDestroy( data->phbk->win ); - return MFW_EVENT_CONSUMED; - } - //break; // RAVI + /* Having dealt with the number, we destroy our phone book + context and exit the handler early + */ + bookPhonebookDestroy( data->phbk->win ); + return MFW_EVENT_CONSUMED; + } + //break; // RAVI case KCD_RIGHT: - { - /* Right key is a cancel - */ - bookSDNDestroy( data->win ); - data->phbk->search_win = 0; - return MFW_EVENT_CONSUMED; - } -// break; // RAVI + { + /* Right key is a cancel + */ + bookSDNDestroy( data->win ); + data->phbk->search_win = 0; + return MFW_EVENT_CONSUMED; + } +// break; // RAVI case KCD_HUP: - { - /* Clear key deletes the last character, or if none left will - take us out of here - */ + { + /* Clear key deletes the last character, or if none left will + take us out of here + */ if ( data->edtBuf[0] == '\0' ) - { - bookSDNDestroy( data->win ); - data->phbk->search_win = 0; - return MFW_EVENT_CONSUMED; - } + { + bookSDNDestroy( data->win ); + data->phbk->search_win = 0; + return MFW_EVENT_CONSUMED; + } else - { - /* Delete last character entered - */ - /* SPR#1428 - SH - New Editor changes */ + { + /* Delete last character entered + */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 */ + ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 */ #else /* NEW_EDITOR */ edtChar( data->edt, ecBack ); #endif /* NEW_EDITOR */ - } - } + } + } break; default: - { - /* No default processing required - */ - } + { + /* No default processing required + */ + } break; } - /* Initiate a new search based on the current settings, MyEvent - will have been set accordingly - */ + /* Initiate a new search based on the current settings, MyEvent + will have been set accordingly + */ SEND_EVENT( data->win, MyEvent, 0, 0 ); - winShow( data->win ); + winShow( data->win ); - /* And make sure no calling routines try to do anything with the - event we have just dealt with - */ + /* And make sure no calling routines try to do anything with the + event we have just dealt with + */ return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookSDNKeyLongCB + $Function: bookSDNKeyLongCB - $Description: long keyboard event handler + $Description: long keyboard event handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event to handle, k, keyboard handle + $Arguments: e, event to handle, k, keyboard handle *******************************************************************************/ static int bookSDNKeyLongCB( MfwEvt e, MfwKbd *k ) { T_MFW_HND win = mfwParent(mfw_header()); - T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; + T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; tBookStandard *data = (tBookStandard *)win_data->user; - /* Just checks for clear and long being set, if so it will - destroy the window - */ - if ( (e & KEY_CLEAR) && (e & KEY_LONG) ) - { - bookSDNDestroy( win ); - data->phbk->search_win = 0; - } + /* Just checks for clear and long being set, if so it will + destroy the window + */ + if ( (e & KEY_CLEAR) && (e & KEY_LONG) ) + { + bookSDNDestroy( win ); + data->phbk->search_win = 0; + } - /* Force event consumed always, prevents default behaviour - kicking in - */ - return MFW_EVENT_CONSUMED; + /* Force event consumed always, prevents default behaviour + kicking in + */ + return MFW_EVENT_CONSUMED; } - - /******************************************************************************* - $Function: bookSDNCreate + $Function: bookSDNCreate - $Description: Creates the Service numbers widow + $Description: Creates the Service numbers widow - $Returns: Window Handle, or NULL if unsuccessfull + $Returns: Window Handle, or NULL if unsuccessfull - $Arguments: Parent, handle of the parent window + $Arguments: Parent, handle of the parent window *******************************************************************************/ static T_MFW_HND bookSDNCreate( MfwHnd parent ) { - T_MFW_WIN *win_data; - tBookStandard *data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ); - T_MFW_WIN *parent_win_data = ((T_MFW_HDR *)parent)->data; - T_phbk* phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ); + T_MFW_WIN *parent_win_data = ((T_MFW_HDR *)parent)->data; + T_phbk* phbk = (T_phbk *)parent_win_data->user; - TRACE_FUNCTION( "bookSDNCreate()" ); + TRACE_FUNCTION( "bookSDNCreate()" ); - /* Create the window - */ - if ( ( data->win = win_create (parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookSDNWinCB ) ) == NULL ) - return NULL; + /* Create the window + */ + if ( ( data->win = win_create (parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookSDNWinCB ) ) == NULL ) + return NULL; - /*SPR 2123, MC allocate memory for phonebook list*/ - if (create_mmi_phonebook_names_list() == NULL) - return NULL; + /*SPR 2123, MC allocate memory for phonebook list*/ + if (create_mmi_phonebook_names_list() == NULL) + return NULL; - /* set up the basic window elements, dialog and user data pointers - */ - data->mmi_control.dialog = (T_DIALOG_FUNC)bookSDN; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *)data; - data->parent_win = parent; + /* set up the basic window elements, dialog and user data pointers + */ + data->mmi_control.dialog = (T_DIALOG_FUNC)bookSDN; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *)data; + data->parent_win = parent; - /* Create keyboard and menu handlers to be associated with - this window - */ - data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookSDNKbdCB ); + /* Create keyboard and menu handlers to be associated with + this window + */ + data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookSDNKbdCB ); data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookSDNKeyLongCB ); - data->menu = mnuCreate( data->win, MmiBookMenuDetailsList(), 0, 0 ); + data->menu = mnuCreate( data->win, MmiBookMenuDetailsList(), 0, 0 ); - /* Set basic edit attributes structure and create an editor - associated with these attributes - */ - /* SPR#1428 - SH - New Editor changes */ + /* Set basic edit attributes structure and create an editor + associated with these attributes + */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - AUI_edit_SetAttr( &data->editor_attr, BOOKSDN_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_ALPHA, ED_CURSOR_BAR, ATB_DCS_ASCII, (UBYTE*) data->edtBuf, MAX_SEARCH_CHAR); - data->editor = ATB_edit_Create(&data->editor_attr,0); - data->entry_data = AUI_entry_Create(data->win, data->editor, SEARCH_REDRAW); - ATB_edit_Init(data->editor); + AUI_edit_SetAttr( &data->editor_attr, BOOKSDN_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_ALPHA, ED_CURSOR_BAR, ATB_DCS_ASCII, (UBYTE*) data->edtBuf, MAX_SEARCH_CHAR); + data->editor = ATB_edit_Create(&data->editor_attr,0); + data->entry_data = AUI_entry_Create(data->win, data->editor, SEARCH_REDRAW); + ATB_edit_Init(data->editor); #else /* NEW_EDITOR */ - bookSetEditAttributes( BOOKSDN_EDITOR, COLOUR_EDITOR_XX , 0, edtCurBar1, 0, (char*) data->edtBuf, MAX_SEARCH_CHAR, &data->attr ); - data->edt = edtCreate( data->win, &data->attr, 0, 0 ); + bookSetEditAttributes( BOOKSDN_EDITOR, COLOUR_EDITOR_XX , 0, edtCurBar1, 0, (char*) data->edtBuf, MAX_SEARCH_CHAR, &data->attr ); + data->edt = edtCreate( data->win, &data->attr, 0, 0 ); #endif /* NEW_EDITOR */ - /* Show the menu - */ - mnuUnhide(data->menu); + /* Show the menu + */ + mnuUnhide(data->menu); - /* associate the phonebook handler - */ - data->phbk = phbk; + /* associate the phonebook handler + */ + data->phbk = phbk; - /* and return the newly created window handle - */ + /* and return the newly created window handle + */ return data->win; } - - - /******************************************************************************* Public methods @@ -716,246 +701,241 @@ /******************************************************************************* - $Function: bookSDNStart + $Function: bookSDNStart - $Description: This is the entry point for the service numbers window handler + $Description: This is the entry point for the service numbers window handler - $Returns: handle of window we are creating + $Returns: handle of window we are creating - $Arguments: Parent, handle of the parent window + $Arguments: Parent, handle of the parent window *******************************************************************************/ T_MFW_HND bookSDNStart( MfwHnd parent ) { - T_MFW_HND win; + T_MFW_HND win; T_MFW_WIN *win_data; tBookStandard *data; - MfwMnu *mnu; + MfwMnu *mnu; - TRACE_FUNCTION( "bookSDNCreate()" ); + TRACE_FUNCTION( "bookSDNCreate()" ); - /* We can't actually create the window if the phone book is - still loading, so we will deal with this up front - */ - if ( phb_get_mode() == PHB_LOADING ) - { - bookShowInformation( idle_get_window(), TxtPleaseWait ,NULL, NULL ); - return NULL; - } + /* We can't actually create the window if the phone book is + still loading, so we will deal with this up front + */ + if ( phb_get_mode() == PHB_LOADING ) + { + bookShowInformation( idle_get_window(), TxtPleaseWait ,NULL, NULL ); + return NULL; + } - /* Create the basic window, dealing with errors here and just terminating - if we can't create the window correctly. - */ + /* Create the basic window, dealing with errors here and just terminating + if we can't create the window correctly. + */ if ( ( win = bookSDNCreate( parent ) ) == NULL ) - return NULL; + return NULL; - /* Okay, we have created the window, so set up our internal - working pointers and check if the current phone book has - some entries in it - */ - win_data = ((T_MFW_HDR *) win)->data; + /* Okay, we have created the window, so set up our internal + working pointers and check if the current phone book has + some entries in it + */ + win_data = ((T_MFW_HDR *) win)->data; data = (tBookStandard *)win_data->user; - data->phbk->current.status.book = PHB_SDN; + data->phbk->current.status.book = PHB_SDN; - /* we need to determine if there are any entries in the phone book - before we allow the service number windows to be displayed, we - do this by searching for an empty name - */ - bookGetCurrentStatus( &data->phbk->current.status ); - memset( data->edtBuf, '\0' , sizeof( data->edtBuf ) ); - data->phbk->current.index = 1; - data->phbk->current.selectedName = 0; - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + /* we need to determine if there are any entries in the phone book + before we allow the service number windows to be displayed, we + do this by searching for an empty name + */ + bookGetCurrentStatus( &data->phbk->current.status ); + memset( data->edtBuf, '\0' , sizeof( data->edtBuf ) ); + data->phbk->current.index = 1; + data->phbk->current.selectedName = 0; + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - /* If the current index is still zero then we have been unable to - find an entry, in this case we need to shutdown the service - numbers window, since we can't do anything with it. - */ - if ( data->phbk->current.index == 0 ) - { - bookSDNDestroy( win ); - data->phbk->search_win = 0; - bookShowInformation( idle_get_window(), TxtEmptyList ,NULL, NULL ); - return 0; - } + /* If the current index is still zero then we have been unable to + find an entry, in this case we need to shutdown the service + numbers window, since we can't do anything with it. + */ + if ( data->phbk->current.index == 0 ) + { + bookSDNDestroy( win ); + data->phbk->search_win = 0; + bookShowInformation( idle_get_window(), TxtEmptyList ,NULL, NULL ); + return 0; + } - /* We are still running, so set up the menu and edit structures - accordingly, and display the window - */ - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[ mnu->level ] = data->phbk->current.selectedName; + /* We are still running, so set up the menu and edit structures + accordingly, and display the window + */ + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[ mnu->level ] = data->phbk->current.selectedName; /* SPR#1428 - SH - New Editor: editActivate no longer needed */ #ifndef NEW_EDITOR - editActivate( data->edt, 1 ); + editActivate( data->edt, 1 ); #endif - winShow( data->win ); + winShow( data->win ); - /* return the pointer to the window - */ + /* return the pointer to the window + */ return win; } - /******************************************************************************* - $Function: bookFindNameInSDNPhonebook + $Function: bookFindNameInSDNPhonebook - $Description: This routine performs the FindNameInPhoneBook functionality, - tuned to the particular requirements of the service numbers - phonebook. + $Description: This routine performs the FindNameInPhoneBook functionality, + tuned to the particular requirements of the service numbers + phonebook. - $Returns: handle of window we are creating + $Returns: handle of window we are creating - $Arguments: Parent, handle of the parent window + $Arguments: Parent, handle of the parent window *******************************************************************************/ int bookFindNameInSDNPhonebook( const char* p_pszNumber, T_MFW_PHB_ENTRY* p_pEntry ) { - T_MFW_PHB_LIST phb_list; + T_MFW_PHB_LIST phb_list; #ifdef NO_ASCIIZ - T_MFW_PHB_TEXT p_pszNumberText; + T_MFW_PHB_TEXT p_pszNumberText; #endif - SHORT phb_index=0; + SHORT phb_index=0; /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - UBYTE l_name[MAX_ALPHA_LEN]; - int status; + UBYTE l_name[MAX_ALPHA_LEN]; + int status; char bfr[80]; - TRACE_FUNCTION("bookFindNameInSDNPhonebook()"); + TRACE_FUNCTION("bookFindNameInSDNPhonebook()"); - /* guard against dodgy input data - */ - if( ( p_pszNumber == NULL ) || ( p_pEntry == NULL ) ) - return 0; - if ( strlen(p_pszNumber) < 1) - return (0); - /* initialise the search structures - */ - memset(p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY)); - memset(&phb_list, 0, sizeof(phb_list)); - phb_list.entry = p_pEntry; - phb_list.num_entries = 1; - phb_list.book = PHB_SDN; + /* guard against dodgy input data + */ + if( ( p_pszNumber == NULL ) || ( p_pEntry == NULL ) ) + return 0; + if ( strlen(p_pszNumber) < 1) + return (0); + /* initialise the search structures + */ + memset(p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY)); + memset(&phb_list, 0, sizeof(phb_list)); + phb_list.entry = p_pEntry; + phb_list.num_entries = 1; + phb_list.book = PHB_SDN; - //GW Set up data structure for NO_ASCIIZ + //GW Set up data structure for NO_ASCIIZ #ifdef NO_ASCIIZ - p_pszNumberText.dcs = MFW_DCS_8bits; - p_pszNumberText.len = strlen(p_pszNumber); - strcpy((char*)p_pszNumberText.data, p_pszNumber); + p_pszNumberText.dcs = MFW_DCS_8bits; + p_pszNumberText.len = strlen(p_pszNumber); + strcpy((char*)p_pszNumberText.data, p_pszNumber); #endif - /* see what we can find using the standard search routine for - any phone book, giving the service numbers book as a parameter - */ + /* see what we can find using the standard search routine for + any phone book, giving the service numbers book as a parameter + */ #ifdef NO_ASCIIZ - status = phb_find_entries( (UBYTE)PHB_SDN, &phb_index, (UBYTE)MFW_PHB_NUMBER, 1, &p_pszNumberText, &phb_list ); + status = phb_find_entries( (UBYTE)PHB_SDN, &phb_index, (UBYTE)MFW_PHB_NUMBER, 1, &p_pszNumberText, &phb_list ); #else - status = phb_find_entries( PHB_SDN, &phb_index, MFW_PHB_NUMBER, 1, (char *) p_pszNumber, &phb_list ); + status = phb_find_entries( PHB_SDN, &phb_index, MFW_PHB_NUMBER, 1, (char *) p_pszNumber, &phb_list ); #endif - sprintf(bfr,"len:%2d , name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",p_pEntry->name.len); - memcpy(&bfr[16], p_pEntry->name.data, PHB_MAX_LEN); - TRACE_FUNCTION(bfr); - sprintf(bfr,"number:'%s'",p_pEntry->number); - TRACE_FUNCTION(bfr); + sprintf(bfr,"len:%2d , name: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",p_pEntry->name.len); + memcpy(&bfr[16], p_pEntry->name.data, PHB_MAX_LEN); + TRACE_FUNCTION(bfr); + sprintf(bfr,"number:'%s'",p_pEntry->number); + TRACE_FUNCTION(bfr); - if (status != MFW_PHB_OK) - { - phb_list.result = MFW_NO_ENTRY; - TRACE_FUNCTION("bookFindNameInSDNPhonebook()- status error"); - } + if (status != MFW_PHB_OK) + { + phb_list.result = MFW_NO_ENTRY; + TRACE_FUNCTION("bookFindNameInSDNPhonebook()- status error"); + } - /* convert the returned data to manageable information - */ + /* convert the returned data to manageable information + */ #ifdef NO_ASCIIZ - //GW Check that conversion returned a valid string - //GW Testing for 0 is stupid but since the macros PASSED and FAILED that are used by the procedure are not in the header (duh!) we can't use them. - /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - if (mfw_SIM2GsmStr( p_pEntry->name.len, p_pEntry->name.data, MAX_ALPHA_LEN, l_name ) == 0) - memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); + //GW Check that conversion returned a valid string + //GW Testing for 0 is stupid but since the macros PASSED and FAILED that are used by the procedure are not in the header (duh!) we can't use them. + /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + if (mfw_SIM2GsmStr( p_pEntry->name.len, p_pEntry->name.data, MAX_ALPHA_LEN, l_name ) == 0) + memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); - p_pEntry->name.data[0] = 0x00; + p_pEntry->name.data[0] = 0x00; #else - bookGsm2Alpha( p_pEntry->name ); + bookGsm2Alpha( p_pEntry->name ); #endif /* if we couldn't find any information, null out the return - structure, this will stop people who don't check the return - status from getting sensible information - */ - if( phb_list.result != MFW_ENTRY_EXIST ) - memset(p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY)); + structure, this will stop people who don't check the return + status from getting sensible information + */ + if( phb_list.result != MFW_ENTRY_EXIST ) + memset(p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY)); - /* return status depends on result of search - */ - return ( phb_list.result == MFW_ENTRY_EXIST ); + /* return status depends on result of search + */ + return ( phb_list.result == MFW_ENTRY_EXIST ); } - - - - /******************************************************************************* - $Function: bookSDNDestroy + $Function: bookSDNDestroy - $Description: destroys the Service Numbers window + $Description: destroys the Service Numbers window - $Returns: none. + $Returns: none. - $Arguments: window, handle of the window to be destroyed + $Arguments: window, handle of the window to be destroyed *******************************************************************************/ void bookSDNDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; - tBookStandard *data = (tBookStandard *)win->user; + T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; + tBookStandard *data = (tBookStandard *)win->user; - TRACE_FUNCTION( "bookSDNDestroy" ); + TRACE_FUNCTION( "bookSDNDestroy" ); - /* Guard against bad incoming data - */ - if ( ! data ) - return; + /* Guard against bad incoming data + */ + if ( ! data ) + return; /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* Editor is no longer destroyed with winDelete, - * so destroy it here. */ - if (data->editor) - { - ATB_edit_Destroy(data->editor); - data->editor = 0; - } - if (data->entry_data) - { - AUI_entry_Destroy(data->entry_data); - data->entry_data = 0; - } + /* Editor is no longer destroyed with winDelete, + * so destroy it here. */ + if (data->editor) + { + ATB_edit_Destroy(data->editor); + data->editor = 0; + } + if (data->entry_data) + { + AUI_entry_Destroy(data->entry_data); + data->entry_data = 0; + } #endif /* NEW_EDITOR */ - /* Destroy the window using the appropriate method - */ - if ( data->phbk->root_win == window ) - bookPhonebookDestroy( data->phbk->win ); - else - { - /* deleting the window, so make sure we free the memory - */ - data->phbk->search_win = 0; - winDelete( data->win ); - FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); - } - /*SPR2123, MC deallocate memory for phonebook list*/ - destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); + /* Destroy the window using the appropriate method + */ + if ( data->phbk->root_win == window ) + bookPhonebookDestroy( data->phbk->win ); + else + { + /* deleting the window, so make sure we free the memory + */ + data->phbk->search_win = 0; + winDelete( data->win ); + FREE_MEMORY( (void *)data, sizeof( tBookStandard ) ); + } + /*SPR2123, MC deallocate memory for phonebook list*/ + destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); } @@ -964,4 +944,3 @@ End of File *******************************************************************************/ -
--- a/src/ui/bmi/mmiBookSearchWindow.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookSearchWindow.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,21 +9,21 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiSearchWindow.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiSearchWindow.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** Description: - This module provides the phone book search window functionality for the - phone book module of the basic MMI + This module provides the phone book search window functionality for the + phone book module of the basic MMI ******************************************************************************** $History: MmiSearchWindow.c @@ -45,19 +45,19 @@ Solution: The new feature to select the number from phonebook while sending MMS/EMS is added - Oct 26, 2004 REF: CRR 25354 xkundadu - Description: Phonebook: After entering precise name to search and then - trying to delete using RSK, first character is not deleted - Fix: If only one character is present in the editor and delete key is pressed, - delete the editor buffer and update the editor view. + Oct 26, 2004 REF: CRR 25354 xkundadu + Description: Phonebook: After entering precise name to search and then + trying to delete using RSK, first character is not deleted + Fix: If only one character is present in the editor and delete key is pressed, + delete the editor buffer and update the editor view. - Aug 16, 2004 REF: CRR 24323 Deepa M.D - Bug:Clenup of sprintf used for tracing - Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX + Aug 16, 2004 REF: CRR 24323 Deepa M.D + Bug:Clenup of sprintf used for tracing + Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX - 25/10/00 Original Condat(UK) BMI version. - 20/02/02 Reinstated editor when in Chinese language by removing - "if not Chinese" conditions SPR 1742 + 25/10/00 Original Condat(UK) BMI version. + 20/02/02 Reinstated editor when in Chinese language by removing + "if not Chinese" conditions SPR 1742 $End @@ -128,7 +128,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -167,7 +166,7 @@ typedef struct { T_MMI_CONTROL mmi_control; - T_MFW_HND chinese_search_win; /* MFW win handler */ + T_MFW_HND chinese_search_win; /* MFW win handler */ T_MFW_HND parent; ListMenuData * menu_list_data; } T_CHINESE_SEARCH_INFO; @@ -189,780 +188,762 @@ /******************************************************************************* - $Function: bookSearchDialog + $Function: bookSearchDialog - $Description: dialog handler for the search window functionality + $Description: dialog handler for the search window functionality - $Returns: None + $Returns: None - $Arguments: win, window handle + $Arguments: win, window handle event, event to be handled - value, not used - parameter, not used + value, not used + parameter, not used *******************************************************************************/ void bookSearchDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) { - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - tMmiPhbData *Current = &data->phbk->current; - MfwMnu *mnu; + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + tMmiPhbData *Current = &data->phbk->current; + MfwMnu *mnu; //Jan 22, 2006 REF: OMAPS00061930 x0039928 // Fix : Add a local variable search_string char search_string[MAX_ALPHA_LEN]; //x0066692 Date:23 April 2007 DR:OMAPS00121834, Asha //Fix for phone book search issue - when phonebook has more than 240 entries. - UBYTE max_search_name; + UBYTE max_search_name; TRACE_FUNCTION( "bookSearchDialog()" ); switch( event ) - { - case SEARCH_INIT: - { - /* No initialisation required - */ - } - break; + { + case SEARCH_INIT: + { + /* No initialisation required + */ + } + break; - case SEARCH_SCROLL_UP: - { /*MC SPR 1541, flag to show whether we've scrolled off-screen and need to - update the portion of the list displayed*/ - BOOL get_new_screen = FALSE; + case SEARCH_SCROLL_UP: + { /*MC SPR 1541, flag to show whether we've scrolled off-screen and need to + update the portion of the list displayed*/ + BOOL get_new_screen = FALSE; - /* Scroll up - */ - if ( ( Current->index == 1 ) && ( Current->selectedName == 0 ) ) - { - if ( Current->status.used_entries < MAX_SEARCH_NAME ) - Current->selectedName = Current->status.used_entries - 1; - else - { Current->selectedName = MAX_SEARCH_NAME - 1; - /*SPR 1541, we're scrolling up from the first item in the list and are to go to - the end*/ - get_new_screen = TRUE; - } - Current->index = Current->status.used_entries - Current->selectedName; + /* Scroll up + */ + if ( ( Current->index == 1 ) && ( Current->selectedName == 0 ) ) + { + if ( Current->status.used_entries < MAX_SEARCH_NAME ) + Current->selectedName = Current->status.used_entries - 1; + else + { Current->selectedName = MAX_SEARCH_NAME - 1; + /*SPR 1541, we're scrolling up from the first item in the list and are to go to + the end*/ + get_new_screen = TRUE; + } + Current->index = Current->status.used_entries - Current->selectedName; - } - else - { - if (Current->selectedName == 0) - { Current->index--; - /*SPR 1541, we've just come off the top of the screen*/ - get_new_screen = TRUE; - } - else - Current->selectedName--; - } + } + else + { + if (Current->selectedName == 0) + { Current->index--; + /*SPR 1541, we've just come off the top of the screen*/ + get_new_screen = TRUE; + } + else + Current->selectedName--; + } - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; - /*SPR 1541, only update the list if flag set*/ - if (get_new_screen == TRUE) - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - } - break; + /*SPR 1541, only update the list if flag set*/ + if (get_new_screen == TRUE) + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + } + break; - case SEARCH_SCROLL_DOWN: - { /*MC SPR 1541, flag to show whether we've scrolled off-screen and need to - update the portion of the list displayed*/ - BOOL get_new_screen = FALSE; + case SEARCH_SCROLL_DOWN: + { /*MC SPR 1541, flag to show whether we've scrolled off-screen and need to + update the portion of the list displayed*/ + BOOL get_new_screen = FALSE; - /* Scroll Down - */ - if ( ( Current->index + Current->selectedName ) == Current->status.used_entries ) - { - Current->index = 1; - Current->selectedName = 0; - /*SPR 1541, we've come off the end of the list and are to go back to - the beginning*/ - get_new_screen = TRUE; - } - else - { - if ( Current->selectedName == MAX_SEARCH_NAME - 1 ) - { Current->index++; - /*SPR 1541, we've just come off the bottom of the screen*/ - get_new_screen = TRUE; - } - else - Current->selectedName++; - } + /* Scroll Down + */ + if ( ( Current->index + Current->selectedName ) == Current->status.used_entries ) + { + Current->index = 1; + Current->selectedName = 0; + /*SPR 1541, we've come off the end of the list and are to go back to + the beginning*/ + get_new_screen = TRUE; + } + else + { + if ( Current->selectedName == MAX_SEARCH_NAME - 1 ) + { Current->index++; + /*SPR 1541, we've just come off the bottom of the screen*/ + get_new_screen = TRUE; + } + else + Current->selectedName++; + } - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; - /*SPR 1541, only update the list if flag set*/ - if (get_new_screen == TRUE) - bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); - } - break; + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; + /*SPR 1541, only update the list if flag set*/ + if (get_new_screen == TRUE) + bookFindName( MAX_SEARCH_NAME, &data->phbk->current ); + } + break; - case SEARCH_STRING: - { - { - //Jan 22, 2006 REF: OMAPS00061930 x0039928 - //Fix : Copy the number to be searched into the search_string variable and give a search for it - if ( value == TRUE) - strcpy(search_string,(char*)data->phbk->edt_buf_name); - else - strcpy(search_string,(char*)data->edtBuf); + case SEARCH_STRING: + { + { + //Jan 22, 2006 REF: OMAPS00061930 x0039928 + //Fix : Copy the number to be searched into the search_string variable and give a search for it + if ( value == TRUE) + strcpy(search_string,(char*)data->phbk->edt_buf_name); + else + strcpy(search_string,(char*)data->edtBuf); - /* Find name - */ - Current->index = Current->index + Current->selectedName; - if ( bookSearchName( search_string, MAX_SEARCH_NAME, Current ) == MFW_PHB_OK ) - { - //x0066692 Date:23 April 2007 DR:OMAPS00121834, Asha - //Fix is added to make cursor point to the correct entry in the phonebook. - max_search_name = Current->status.used_entries - Current->index +1; - if ( max_search_name > MAX_SEARCH_NAME ) - max_search_name = MAX_SEARCH_NAME; + /* Find name + */ + Current->index = Current->index + Current->selectedName; + if ( bookSearchName( search_string, MAX_SEARCH_NAME, Current ) == MFW_PHB_OK ) + { + //x0066692 Date:23 April 2007 DR:OMAPS00121834, Asha + //Fix is added to make cursor point to the correct entry in the phonebook. + max_search_name = Current->status.used_entries - Current->index +1; + if ( max_search_name > MAX_SEARCH_NAME ) + max_search_name = MAX_SEARCH_NAME; - if ( Current->index > ( Current->status.used_entries + 1 - max_search_name ) ) - { - if ( Current->status.used_entries > MAX_SEARCH_NAME ) - { - Current->selectedName = Current->index - Current->status.used_entries + max_search_name - 1; - Current->index = Current->index - Current->selectedName; - } - else - { - Current->selectedName = Current->index - 1; - Current->index=1; - } + if ( Current->index > ( Current->status.used_entries + 1 - max_search_name ) ) + { + if ( Current->status.used_entries > MAX_SEARCH_NAME ) + { + Current->selectedName = Current->index - Current->status.used_entries + max_search_name - 1; + Current->index = Current->index - Current->selectedName; + } + else + { + Current->selectedName = Current->index - 1; + Current->index=1; + } - /* go find the name - */ + /* go find the name + */ - bookFindName(MAX_SEARCH_NAME,&data->phbk->current); - } - else - { - Current->selectedName =0; + bookFindName(MAX_SEARCH_NAME,&data->phbk->current); + } + else + { + Current->selectedName =0; - } + } - /* update the menu */ - /* SPR881 - SH - Move name find to below */ - } - else - {/*SPR 2233, if no name found, go to beginning of list*/ - Current->index = 1; - Current->selectedName = 0; - } + /* update the menu */ + /* SPR881 - SH - Move name find to below */ + } + else + {/*SPR 2233, if no name found, go to beginning of list*/ + Current->index = 1; + Current->selectedName = 0; + } - /* update the menu - */ - /* SPR881 - SH - is necessary even when BookSearchName, above, fails */ + /* update the menu + */ + /* SPR881 - SH - is necessary even when BookSearchName, above, fails */ - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; - TRACE_EVENT_P1("Current->selectedName: %d", Current->selectedName); - /* go find the name - */ - bookFindName(MAX_SEARCH_NAME,&data->phbk->current); - } - } - break; + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; + TRACE_EVENT_P1("Current->selectedName: %d", Current->selectedName); + /* go find the name + */ + bookFindName(MAX_SEARCH_NAME,&data->phbk->current); + } + } + break; - case SEARCH_UPDATE: - { - /* Update, actually an initialisation/reset phase - */ - Current->index = 1; - Current->selectedName = 0; + case SEARCH_UPDATE: + { + /* Update, actually an initialisation/reset phase + */ + Current->index = 1; + Current->selectedName = 0; - { - memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); - /* SPR#1428 - SH - New Editor changes */ + { + memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_Reset( data->editor ); + ATB_edit_Reset( data->editor ); #else /* NEW_EDITOR */ - edtReset( data->edt ); + edtReset( data->edt ); #endif /* NEW_EDITOR */ - SEND_EVENT( win, SEARCH_STRING, 0, 0 ); - } - } - break; + SEND_EVENT( win, SEARCH_STRING, 0, 0 ); + } + } + break; /* SPR#1428 - SH - New Editor: Add this to allow redraw of * window on request. */ #ifdef NEW_EDITOR - case SEARCH_REDRAW: - /*SPR 2104, TRACE seems to fix timing probs :/ */ - TRACE_EVENT("UPDATE SEARCH REDRAW"); - SEND_EVENT(data->win, SEARCH_STRING, 0, 0); - win_show(data->win); - break; + case SEARCH_REDRAW: + /*SPR 2104, TRACE seems to fix timing probs :/ */ + TRACE_EVENT("UPDATE SEARCH REDRAW"); + SEND_EVENT(data->win, SEARCH_STRING, 0, 0); + win_show(data->win); + break; #endif /* NEW_EDITOR */ - default: - { - /* - */ - } - break; + default: + { + /* + */ + } + break; } } - - - - /******************************************************************************* - $Function: bookSearchWindowCB + $Function: bookSearchWindowCB - $Description: Window call back function + $Description: Window call back function - $Returns: MFW_EVENT_CONSUMED, or MFW_EVENT_PASSED + $Returns: MFW_EVENT_CONSUMED, or MFW_EVENT_PASSED - $Arguments: e, event, w, window handle + $Arguments: e, event, w, window handle *******************************************************************************/ static int bookSearchWindowCB( MfwEvt e, MfwWin *w ) { - tBookStandard *data = (tBookStandard *) w->user; - tMmiPhbData *Current = &data->phbk->current; - int index; - char *pchr; - char pchr2[PHB_MAX_LEN*2 +4];/*mc, SPR 1442*/ + tBookStandard *data = (tBookStandard *) w->user; + tMmiPhbData *Current = &data->phbk->current; + int index; + char *pchr; + char pchr2[PHB_MAX_LEN*2 +4];/*mc, SPR 1442*/ TRACE_FUNCTION( "bookSearchWindowCB()" ); - // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) - // When FDN is disabled we need to display only ADN entries in the phonebook menu. - // We just use the preset PHB_ADN as the current book. - //if(data->phbk->current.status.book == PHB_ADN) - // data->phbk->current.status.book = PHB_ADN_FDN; + // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) + // When FDN is disabled we need to display only ADN entries in the phonebook menu. + // We just use the preset PHB_ADN as the current book. + //if(data->phbk->current.status.book == PHB_ADN) + // data->phbk->current.status.book = PHB_ADN_FDN; - /* Deal with the visible event - */ - switch (e) + /* Deal with the visible event + */ + switch (e) { case MfwWinVisible: - { - /* Deal with the window visible event - */ - MmiBookShowDefault(); + { + /* Deal with the window visible event + */ + MmiBookShowDefault(); - { - /* SPR#1428 - SH - New Editor changes */ + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_Show( data->editor ); + ATB_edit_Show( data->editor ); #else /* NEW_EDITOR */ - edtShow( data->edt ); + edtShow( data->edt ); #endif /* NEW_EDITOR */ - } + } - /* SPR#1428 - SH - New Editor: Only update the list if we're not in multi-tap */ + /* SPR#1428 - SH - New Editor: Only update the list if we're not in multi-tap */ #ifdef NEW_EDITOR - if (!data->editor->multitap) - { + if (!data->editor->multitap) + { #endif /* NEW_EDITOR */ - for ( index = 0; index < MAX_SEARCH_NAME; index++ ) - { + for ( index = 0; index < MAX_SEARCH_NAME; index++ ) + { TRACE_EVENT( "bookSearchWindowCB()-loopstart" ); - pchr = (char *) MmiBookCallList( index ); + pchr = (char *) MmiBookCallList( index ); - memset( pchr, '\0', NAME_SCREEN_MAX ); + memset( pchr, '\0', NAME_SCREEN_MAX ); - /* SPR#1428 - SH - remove extraneous call to edtShow*/ - /*SPR 2123, using new macro PHONEBOOK_ITEM_LENGTH*/ + /* SPR#1428 - SH - remove extraneous call to edtShow*/ + /*SPR 2123, using new macro PHONEBOOK_ITEM_LENGTH*/ #ifdef NO_ASCIIZ - /*if current language chinese*/ - if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) - { /*SPR 2653, this check should be here too*/ - if (!Current->list.entry == NULL) - { if ( Current->entry[ index ].name.len NEQ 0) //if name not empty - { - if (Current->entry[ index ].name.data[0] != 0x80)//if not unicode - {/*we have to convert to unicode*/ - pchr2[0]= (char)0x80;/*SPR 1442, add unicode tag*//*a0393213 lint warnings removal - typecast done*/ - pchr2[1]= 0x7f; - /*SPR2175, use new function*/ - ATB_convert_String((char*)Current->entry[ index ].name.data, MFW_ASCII, - (UBYTE)strlen((char*)Current->entry[ index ].name.data), &pchr2[2], MFW_DCS_UCS2, PHONEBOOK_ITEM_LENGTH-2, FALSE); - /*SPR 1442 and now truncate the string*/ - resources_truncate_to_screen_width((char *) pchr2, Current->entry[ index ].name.len*2+2, pchr,PHONEBOOK_ITEM_LENGTH , SCREEN_SIZE_X, TRUE); - } - else /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - { - /*SPR 1442 truncate the string*/ - resources_truncate_to_screen_width((char *) Current->entry[index].name.data, Current->entry[index].name.len, pchr, MAX_ALPHA_LEN, SCREEN_SIZE_X, TRUE); - } - } - else /*we convert number string into unicode*/ - { pchr2[0]= (char)0x80;/*SPR 1442, add unicode tag*//*a0393213 lint warnings removal-typecast done*/ - pchr2[1]= 0x7f; - /*SPR 2175, use new function*/ - ATB_convert_String((char*)Current->entry[ index ].number, MFW_ASCII, - (UBYTE)strlen((char*)Current->entry[ index ].number), &pchr2[2], MFW_DCS_UCS2, PHONEBOOK_ITEM_LENGTH-2, FALSE); - /*SPR 1442 and now truncate the string*/ - resources_truncate_to_screen_width((char *) pchr2, strlen((char*)Current->entry[ index ].number)*2+2, pchr,PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, TRUE); - } - } + /*if current language chinese*/ + if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) + { /*SPR 2653, this check should be here too*/ + if (!Current->list.entry == NULL) + { if ( Current->entry[ index ].name.len NEQ 0) //if name not empty + { + if (Current->entry[ index ].name.data[0] != 0x80)//if not unicode + {/*we have to convert to unicode*/ + pchr2[0]= (char)0x80;/*SPR 1442, add unicode tag*//*a0393213 lint warnings removal - typecast done*/ + pchr2[1]= 0x7f; + /*SPR2175, use new function*/ + ATB_convert_String((char*)Current->entry[ index ].name.data, MFW_ASCII, + (UBYTE)strlen((char*)Current->entry[ index ].name.data), &pchr2[2], MFW_DCS_UCS2, PHONEBOOK_ITEM_LENGTH-2, FALSE); + /*SPR 1442 and now truncate the string*/ + resources_truncate_to_screen_width((char *) pchr2, Current->entry[ index ].name.len*2+2, pchr,PHONEBOOK_ITEM_LENGTH , SCREEN_SIZE_X, TRUE); + } + else /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + { + /*SPR 1442 truncate the string*/ + resources_truncate_to_screen_width((char *) Current->entry[index].name.data, Current->entry[index].name.len, pchr, MAX_ALPHA_LEN, SCREEN_SIZE_X, TRUE); + } + } + else /*we convert number string into unicode*/ + { pchr2[0]= (char)0x80;/*SPR 1442, add unicode tag*//*a0393213 lint warnings removal-typecast done*/ + pchr2[1]= 0x7f; + /*SPR 2175, use new function*/ + ATB_convert_String((char*)Current->entry[ index ].number, MFW_ASCII, + (UBYTE)strlen((char*)Current->entry[ index ].number), &pchr2[2], MFW_DCS_UCS2, PHONEBOOK_ITEM_LENGTH-2, FALSE); + /*SPR 1442 and now truncate the string*/ + resources_truncate_to_screen_width((char *) pchr2, strlen((char*)Current->entry[ index ].number)*2+2, pchr,PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, TRUE); + } + } - } + } - else - { /*if current language a latin language*/ + else + { /*if current language a latin language*/ /*SPR 2653, removed consitional compilation, this check applies whether we're in simulation mode or target hardware*/ - // EF check for null pointer first - if (!Current->list.entry == NULL) - /*SPR 2104, don't need this test*/ + // EF check for null pointer first + if (!Current->list.entry == NULL) + /*SPR 2104, don't need this test*/ - if ( Current->entry[ index ].name.len NEQ 0&&Current->entry[ index ].name.data[0] != 0x80/*mc*/) //Should check to see if null name - { /*mc, SPR 1442, replaced old truncation function with new one*/ - resources_truncate_to_screen_width((char *) Current->entry[index].name.data, Current->entry[index].name.len, pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, FALSE); - } - else - {/*mc, SPR 1442, replaced old truncation function with new one*/ - resources_truncate_to_screen_width((char *) Current->entry[index].number, strlen((char*)Current->entry[index].number), pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X,FALSE); - } + if ( Current->entry[ index ].name.len NEQ 0&&Current->entry[ index ].name.data[0] != 0x80/*mc*/) //Should check to see if null name + { /*mc, SPR 1442, replaced old truncation function with new one*/ + resources_truncate_to_screen_width((char *) Current->entry[index].name.data, Current->entry[index].name.len, pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, FALSE); + } + else + {/*mc, SPR 1442, replaced old truncation function with new one*/ + resources_truncate_to_screen_width((char *) Current->entry[index].number, strlen((char*)Current->entry[index].number), pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X,FALSE); + } #else - if ( Current->entry[ index ].name[ 0 ] != NULL) //Should check to see if null name - { /*mc, SPR 1442, replaced old truncation function with new one*/ - resources_truncate_to_screen_width((char *) Current->entry[index].name, 0, pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, FALSE); - } - else - { /*mc, SPR 1442, replaced old truncation function with new one*/ - resources_truncate_to_screen_width((char *) Current->entry[index].number, strlen((char*)Current->entry[index].number), pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X,FALSE); - } - /*SPR 2123 end*/ + if ( Current->entry[ index ].name[ 0 ] != NULL) //Should check to see if null name + { /*mc, SPR 1442, replaced old truncation function with new one*/ + resources_truncate_to_screen_width((char *) Current->entry[index].name, 0, pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X, FALSE); + } + else + { /*mc, SPR 1442, replaced old truncation function with new one*/ + resources_truncate_to_screen_width((char *) Current->entry[index].number, strlen((char*)Current->entry[index].number), pchr, PHONEBOOK_ITEM_LENGTH, SCREEN_SIZE_X,FALSE); + } + /*SPR 2123 end*/ #endif #ifdef NO_ASCIIZ/*MC SPR 975, opening bracket only exists when NO_ASCIIZ defined*/ - } + } #endif - } + } - TRACE_EVENT( "bookSearchWindowCB()-end of loop" ); - mnuShow(data->menu); - /* SPR#1428 - SH - End of condition to check if we're in multi-tap */ + TRACE_EVENT( "bookSearchWindowCB()-end of loop" ); + mnuShow(data->menu); + /* SPR#1428 - SH - End of condition to check if we're in multi-tap */ #ifdef NEW_EDITOR - } + } #endif - /* special case if invoked from SMS or using SDN book - */ - if ( ( data->phbk->fromSMS )|| - ( data->phbk->fromSMSSC ) || /* SPR#1428 - SH - New event for service centre editor */ - ( data->phbk->fromDivert ) || - ( data->phbk->fromDeflect )|| - //CRR: 25302 - xpradipg 10 Nov 2004 - //check if it was invoked from MMS/EMS - ( data->phbk->fromMmsEms)|| - ( Current->status.book == PHB_SDN ) ) - { - //displaySoftKeys( TxtSoftSelect, TxtSoftBack ); + /* special case if invoked from SMS or using SDN book + */ + if ( ( data->phbk->fromSMS )|| + ( data->phbk->fromSMSSC ) || /* SPR#1428 - SH - New event for service centre editor */ + ( data->phbk->fromDivert ) || + ( data->phbk->fromDeflect )|| + //CRR: 25302 - xpradipg 10 Nov 2004 + //check if it was invoked from MMS/EMS + ( data->phbk->fromMmsEms)|| + ( Current->status.book == PHB_SDN ) ) + { + //displaySoftKeys( TxtSoftSelect, TxtSoftBack ); // Jun 07, 2004 REF: CRR MMI-SPR-12818 Rashmi C N(Sasken) -// when the editor is empty, we need to display BACK softkey +// when the editor is empty, we need to display BACK softkey // Delete softkey is displayed when it contains some characters - if (data->editor_attr.text.len==0) - { - displaySoftKeys( TxtSoftSelect, TxtSoftBack ); - } - else - { - displaySoftKeys( TxtSoftSelect, TxtDelete ); - } - } - else - { - //displaySoftKeys( TxtSoftOptions, TxtSoftBack ); + if (data->editor_attr.text.len==0) + { + displaySoftKeys( TxtSoftSelect, TxtSoftBack ); + } + else + { + displaySoftKeys( TxtSoftSelect, TxtDelete ); + } + } + else + { + //displaySoftKeys( TxtSoftOptions, TxtSoftBack ); // Jun 07, 2004 REF: CRR MMI-SPR-12818 Rashmi C N(Sasken) -// when the editor is empty, we need to display BACK softkey +// when the editor is empty, we need to display BACK softkey // Delete softkey is displayed when it contains some characters - if (data->editor_attr.text.len==0) - { - displaySoftKeys( TxtSoftOptions, TxtSoftBack ); - } - else - { - displaySoftKeys( TxtSoftOptions, TxtDelete ); - } - } + if (data->editor_attr.text.len==0) + { + displaySoftKeys( TxtSoftOptions, TxtSoftBack ); + } + else + { + displaySoftKeys( TxtSoftOptions, TxtDelete ); + } + } - } - TRACE_EVENT( "bookSearchWindowCB()-sk display end" ); - break; + } + TRACE_EVENT( "bookSearchWindowCB()-sk display end" ); + break; - default: - { - /* default is to pass event back for further handling - */ - return MFW_EVENT_PASSED; - } -// break; // RAVI + default: + { + /* default is to pass event back for further handling + */ + return MFW_EVENT_PASSED; + } +// break; // RAVI } - /* consume the event - */ + /* consume the event + */ return MFW_EVENT_CONSUMED; } - - - - - - /******************************************************************************* - $Function: bookSearchKbdCB + $Function: bookSearchKbdCB - $Description: Keyboard handler + $Description: Keyboard handler - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, key handle + $Arguments: e, event, k, key handle *******************************************************************************/ static int bookSearchKbdCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - tMmiPhbData *Current = &data->phbk->current; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; + tMmiPhbData *Current = &data->phbk->current; - TRACE_FUNCTION ("bookSearchKbdCB()"); + TRACE_FUNCTION ("bookSearchKbdCB()"); - /* SPR#1428 - SH - New editor doesn't require editActivate */ - #ifndef NEW_EDITOR - /* Set our editor active if it isn't already - */ - if ( activeEditor() != data->edt ) - editActivate( data->edt, TRUE); - #endif + /* SPR#1428 - SH - New editor doesn't require editActivate */ + #ifndef NEW_EDITOR + /* Set our editor active if it isn't already + */ + if ( activeEditor() != data->edt ) + editActivate( data->edt, TRUE); + #endif - /* Deal with the key and event combinatino - */ + /* Deal with the key and event combinatino + */ - switch( k->code ) + switch( k->code ) { case KCD_MNUUP: - { - /* scroll up - */ - SEND_EVENT( data->win, SEARCH_SCROLL_UP, 0, 0 ); - winShow( data->win ); - } - break; + { + /* scroll up + */ + SEND_EVENT( data->win, SEARCH_SCROLL_UP, 0, 0 ); + winShow( data->win ); + } + break; case KCD_MNUDOWN: - { - /* scroll down - */ - SEND_EVENT( data->win, SEARCH_SCROLL_DOWN, 0, 0 ); - winShow( data->win ); - } - break; - + { + /* scroll down + */ + SEND_EVENT( data->win, SEARCH_SCROLL_DOWN, 0, 0 ); + winShow( data->win ); + } + break; - case KCD_CALL: - if ( data->phbk->fromSMS ) - SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - else if ( data->phbk->fromSMSSC ) - SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - else - { if (data->phbk->fromDeflect /*SPR 1392, select number don't call it*/ ) - SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - else - callNumber( Current->entry[ Current->selectedName ].number ); - } - bookPhonebookDestroy(data->phbk->win); - break; + case KCD_CALL: + if ( data->phbk->fromSMS ) + SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + else if ( data->phbk->fromSMSSC ) + SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + else + { if (data->phbk->fromDeflect /*SPR 1392, select number don't call it*/ ) + SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + else + callNumber( Current->entry[ Current->selectedName ].number ); + } + bookPhonebookDestroy(data->phbk->win); + break; /* JVJ #1743 Right key deletes the characters, HUP destroys the window */ #ifdef NEW_EDITOR - case KCD_HUP: + case KCD_HUP: #else /* NEW_EDITOR */ case KCD_HUP: #endif /* NEW_EDITOR */ - { - if ( data->phbk->fromSMS ){ /* Send empty string so that ptr can be set 0*/ - SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID, - "" ); - bookPhonebookDestroy(data->phbk->win); - } - else if ( data->phbk->fromSMSSC ){ - SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID, - NULL ); - bookPhonebookDestroy(data->phbk->win); - } - /* Marcus (mk): Issue 1010: 2002-08-22: Start */ - else if (data->phbk->fromDivert) - { - bookPhonebookDestroy(data->phbk->win); - } - else if (data->phbk->fromDeflect)/*MC SPR 1392*/ - { /*Send empty string so that pointer to this window can be set to 0*/ - SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID,""); - bookPhonebookDestroy(data->phbk->win); - } + { + if ( data->phbk->fromSMS ){ /* Send empty string so that ptr can be set 0*/ + SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID, + "" ); + bookPhonebookDestroy(data->phbk->win); + } + else if ( data->phbk->fromSMSSC ){ + SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID, + NULL ); + bookPhonebookDestroy(data->phbk->win); + } + /* Marcus (mk): Issue 1010: 2002-08-22: Start */ + else if (data->phbk->fromDivert) + { + bookPhonebookDestroy(data->phbk->win); + } + else if (data->phbk->fromDeflect)/*MC SPR 1392*/ + { /*Send empty string so that pointer to this window can be set to 0*/ + SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID,""); + bookPhonebookDestroy(data->phbk->win); + } //CRR: 25302 - xpradipg 10 Nov 2004 //also handle if invoked by MMS/EMS else if ( data->phbk->fromMmsEms ) { /* Send empty string so that ptr can be set 0*/ - SEND_EVENT( data->phbk->parent_win, MMS_EMS_PHBK_NUMBER, PHBK_ID,"" ); - bookPhonebookDestroy(data->phbk->win); - } - /* Marcus (mk): Issue 1010: 2002-08-22: End */ - else - bookSearchDestroy(data->win); + SEND_EVENT( data->phbk->parent_win, MMS_EMS_PHBK_NUMBER, PHBK_ID,"" ); + bookPhonebookDestroy(data->phbk->win); + } + /* Marcus (mk): Issue 1010: 2002-08-22: End */ + else + bookSearchDestroy(data->win); - } - break; + } + break; - case KCD_MNUSELECT: + case KCD_MNUSELECT: case KCD_LEFT: - { - /* if in SMS send the event to it - */ - if ( data->phbk->fromSMS ) - { SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID /*MZ 6/2/01 */, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy(data->phbk->win); - } - else if ( data->phbk->fromSMSSC ) - { SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID /*MZ 6/2/01 */, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy(data->phbk->win); - } - else if(data->phbk->fromDivert ) //MZ 26/02/01 check for divert If in Divert send event. - { - SEND_EVENT( data->phbk->parent_win, DIVERT_PHBK_NUMBER, PHBK_ID /*MZ 28/2/01 */, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy(data->phbk->win); - } - else if(data->phbk->fromDeflect ) /*SPR 1392*/ - { - TRACE_EVENT_P1("<< API deflection no. = %s", (char*) Current->entry[ Current->selectedName ].number); - SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID, - (UBYTE *) Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy(data->phbk->win); - } + { + /* if in SMS send the event to it + */ + if ( data->phbk->fromSMS ) + { SEND_EVENT( data->phbk->parent_win, SMS_PHBK_NUMBER, PHBK_ID /*MZ 6/2/01 */, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + bookPhonebookDestroy(data->phbk->win); + } + else if ( data->phbk->fromSMSSC ) + { SEND_EVENT( data->phbk->parent_win, SMSSC_PHBK_NUMBER, PHBK_ID /*MZ 6/2/01 */, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + bookPhonebookDestroy(data->phbk->win); + } + else if(data->phbk->fromDivert ) //MZ 26/02/01 check for divert If in Divert send event. + { + SEND_EVENT( data->phbk->parent_win, DIVERT_PHBK_NUMBER, PHBK_ID /*MZ 28/2/01 */, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + bookPhonebookDestroy(data->phbk->win); + } + else if(data->phbk->fromDeflect ) /*SPR 1392*/ + { + TRACE_EVENT_P1("<< API deflection no. = %s", (char*) Current->entry[ Current->selectedName ].number); + SEND_EVENT( data->phbk->parent_win, DEFLECT_PHBK_NUMBER, PHBK_ID, + (UBYTE *) Current->entry[ Current->selectedName ].number ); + bookPhonebookDestroy(data->phbk->win); + } //CRR: 25302 - xpradipg 10 Nov 2004 //send the number to the MMS/EMS window else if(data->phbk->fromMmsEms) { TRACE_EVENT_P1("the value if win from MMS is %x",data->phbk->parent_win); SEND_EVENT( data->phbk->parent_win, MMS_EMS_PHBK_NUMBER,PHBK_ID,(void *) Current->entry[ Current->selectedName ].number ); - bookPhonebookDestroy(data->phbk->win); + bookPhonebookDestroy(data->phbk->win); } - else - /* Start a new options menu - */ - /*check for UPN SPR 1327*/ - if (Current->status.book != PHB_UPN) - data->phbk->menu_options_win = bookMenuStart( data->phbk->win, bookNameMenuAttributes(),0); - else - data->phbk->menu_options_win = bookMenuStart( data->phbk->win, bookUPNMenuAttributes(),0); - } - break; + else + /* Start a new options menu + */ + /*check for UPN SPR 1327*/ + if (Current->status.book != PHB_UPN) + data->phbk->menu_options_win = bookMenuStart( data->phbk->win, bookNameMenuAttributes(),0); + else + data->phbk->menu_options_win = bookMenuStart( data->phbk->win, bookUPNMenuAttributes(),0); + } + break; - /* JVJ #1743 Right key deletes search character*/ + /* JVJ #1743 Right key deletes search character*/ #ifdef NEW_EDITOR - case KCD_RIGHT: + case KCD_RIGHT: #else /* NEW_EDITOR */ case KCD_HUP: #endif /* NEW_EDITOR */ - { - - + { - /* If we have any characters in the buffer, step back, otherwise - destroy the window - */ + /* If we have any characters in the buffer, step back, otherwise + destroy the window + */ - if ( data->edtBuf[0]) - { + if ( data->edtBuf[0]) + { -// Oct 26, 2004 REF: CRR 25354 xkundadu -// Description: Phonebook: After entering precise name to search and then -// trying to delete using RSK, first character is not deleted. -// Fix: If only one character is present in the editor and delete key is -// pressed, delete the editor buffer and update the editor view. +// Oct 26, 2004 REF: CRR 25354 xkundadu +// Description: Phonebook: After entering precise name to search and then +// trying to delete using RSK, first character is not deleted. +// Fix: If only one character is present in the editor and delete key is +// pressed, delete the editor buffer and update the editor view. - // Find out the length of the buffer. - if(strlen((char*)data->edtBuf) == 1) - { - //If only one character is present, delete and set the buffer - //to NULL. - data->edtBuf[0] = '\0'; - data->editor_attr.text.len = 0; - //Move the cursor accordingly. - ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); - data->editor->update = ED_UPDATE_TRIVIAL; - SEND_EVENT( data->win, SEARCH_STRING, 0, 0); - //Update the window. - winShow( data->win ); - break; - } + // Find out the length of the buffer. + if(strlen((char*)data->edtBuf) == 1) + { + //If only one character is present, delete and set the buffer + //to NULL. + data->edtBuf[0] = '\0'; + data->editor_attr.text.len = 0; + //Move the cursor accordingly. + ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); + data->editor->update = ED_UPDATE_TRIVIAL; + SEND_EVENT( data->win, SEARCH_STRING, 0, 0); + //Update the window. + winShow( data->win ); + break; + } - /* SPR#1428 - SH - New Editor changes */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* SPR#2174 - SH - If multitap is in progress, delete current character - * rather than previous character */ + /* SPR#2174 - SH - If multitap is in progress, delete current character + * rather than previous character */ - if (data->editor->multitap) - { - AUI_entry_StopMultitap(data->entry_data); /* Cancel multitap */ - ATB_edit_DeleteRight(data->editor, TRUE); /* SPR#2342 - SH */ - } - else - { - ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ - } + if (data->editor->multitap) + { + AUI_entry_StopMultitap(data->entry_data); /* Cancel multitap */ + ATB_edit_DeleteRight(data->editor, TRUE); /* SPR#2342 - SH */ + } + else + { + ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ + } #else /* NEW_EDITOR */ edtChar( data->edt,ecBack ); #endif /* NEW_EDITOR */ - SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); - winShow( data->win ); - } - else - { - /*API - 12/08/03 - CQ11268 - Add this so the phonebbok is destoryed on right key press*/ - if ( data->phbk->fromSMS ) - { /* Send empty string so that ptr can be set 0*/ - bookPhonebookDestroy(data->phbk->win); - } - else if ( data->phbk->fromSMSSC ) - { - bookPhonebookDestroy(data->phbk->win); - } - /* Marcus (mk): Issue 1010: 2002-08-22: Start */ - else if (data->phbk->fromDivert) - { - bookPhonebookDestroy(data->phbk->win); - } - else if (data->phbk->fromDeflect)/*MC SPR 1392*/ - { /*Send empty string so that pointer to this window can be set to 0*/ - bookPhonebookDestroy(data->phbk->win); - } + SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); + winShow( data->win ); + } + else + { + /*API - 12/08/03 - CQ11268 - Add this so the phonebbok is destoryed on right key press*/ + if ( data->phbk->fromSMS ) + { /* Send empty string so that ptr can be set 0*/ + bookPhonebookDestroy(data->phbk->win); + } + else if ( data->phbk->fromSMSSC ) + { + bookPhonebookDestroy(data->phbk->win); + } + /* Marcus (mk): Issue 1010: 2002-08-22: Start */ + else if (data->phbk->fromDivert) + { + bookPhonebookDestroy(data->phbk->win); + } + else if (data->phbk->fromDeflect)/*MC SPR 1392*/ + { /*Send empty string so that pointer to this window can be set to 0*/ + bookPhonebookDestroy(data->phbk->win); + } //CRR: 25302 - xpradipg 10 Nov 2004 //Handle if invoked from MMS/EMS else if(data->phbk->fromMmsEms) { bookPhonebookDestroy(data->phbk->win); } - /* Marcus (mk): Issue 1010: 2002-08-22: End */ - else - bookSearchDestroy(data->win); - /*API - 12/08/03 - CQ11268 - END*/ - } - } - break; + /* Marcus (mk): Issue 1010: 2002-08-22: End */ + else + bookSearchDestroy(data->win); + /*API - 12/08/03 - CQ11268 - END*/ + } + } + break; - case KCD_HASH: - { + case KCD_HASH: + { - { - /* SPR#1428 - SH - New Editor changes */ + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - ATB_edit_DeleteLeft( data->editor, TRUE); /* SPR#2342 - SH */ + ATB_edit_DeleteLeft( data->editor, TRUE); /* SPR#2342 - SH */ #else /* NEW_EDITOR */ edtChar( data->edt,ecBack ); #endif /* NEW_EDITOR */ - } + } - /*NM, p016 - even updating when deleting characters - */ - SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); - winShow( data->win ); - } - break; + /*NM, p016 + even updating when deleting characters + */ + SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); + winShow( data->win ); + } + break; default: - { + { - { - /* SPR#1428 - SH - New Editor changes */ + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - AUI_entry_EventKey( data->entry_data, e, k ); + AUI_entry_EventKey( data->entry_data, e, k ); - /* send the search event to ourselves, - * but only when a character is finished in multi-tap - */ - if (!data->editor->multitap) - { - SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); - } + /* send the search event to ourselves, + * but only when a character is finished in multi-tap + */ + if (!data->editor->multitap) + { + SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); + } #else /* NEW_EDITOR */ - editEventKey( e, k ); - /* send the search event to ourselves, - */ - SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); + editEventKey( e, k ); + /* send the search event to ourselves, + */ + SEND_EVENT( data->win, SEARCH_STRING, 0, 0 ); #endif /* NEW_EDITOR */ - winShow( data->win ); - } - } - break; + winShow( data->win ); + } + } + break; } - /* always consume the event - */ + /* always consume the event + */ return MFW_EVENT_CONSUMED; } - - - - - /******************************************************************************* - $Function: bookSearchKbdLongCB + $Function: bookSearchKbdLongCB - $Description: long keypress event handler, handles long clear event only + $Description: long keypress event handler, handles long clear event only - $Returns: MFW_EVENT_CONSUMED always + $Returns: MFW_EVENT_CONSUMED always - $Arguments: e, event, k, key handle + $Arguments: e, event, k, key handle *******************************************************************************/ static int bookSearchKbdLongCB( MfwEvt e, MfwKbd *k ) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - TRACE_FUNCTION ("bookSearchKbdLongCB()"); + TRACE_FUNCTION ("bookSearchKbdLongCB()"); - /* deal with the clear event - */ - if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) - { - bookSearchDestroy( win ); - data->phbk->search_win = 0; - } + /* deal with the clear event + */ + if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) + { + bookSearchDestroy( win ); + data->phbk->search_win = 0; + } - /* consume the event - */ - return MFW_EVENT_CONSUMED; + /* consume the event + */ + return MFW_EVENT_CONSUMED; } //Jan 22, 2006 REF: OMAPS00061930 x0039928 @@ -971,102 +952,102 @@ /******************************************************************************* - $Function: bookSearchTimCB + $Function: bookSearchTimCB - $Description: Callback function for the Phonebook timer. + $Description: Callback function for the Phonebook timer. - $Returns: None + $Returns: None - $Arguments: window handle event, timer control block + $Arguments: window handle event, timer control block *******************************************************************************/ static int bookSearchTimCB (MfwEvt event, MfwTim *timer) { - T_MFW_HND win = mfwParent( mfw_header() ); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfwParent( mfw_header() ); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - /* x0045876, 14-Aug-2006 (WR - "Current" was declared but never referenced) */ - /* tMmiPhbData *Current = &data->phbk->current; */ - TRACE_FUNCTION ("bookSearchTimCB()"); + /* x0045876, 14-Aug-2006 (WR - "Current" was declared but never referenced) */ + /* tMmiPhbData *Current = &data->phbk->current; */ + TRACE_FUNCTION ("bookSearchTimCB()"); SEND_EVENT( data->win, SEARCH_STRING, 1, 0); - winShow( data->win ); - return MFW_EVENT_CONSUMED; + winShow( data->win ); + return MFW_EVENT_CONSUMED; } /******************************************************************************* - $Function: bookSearchCreate + $Function: bookSearchCreate - $Description: Create the search window + $Description: Create the search window - $Returns: handle of window or NULL if error + $Returns: handle of window or NULL if error - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ static T_MFW_HND bookSearchCreate( MfwHnd parent ) { - T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; - T_phbk *phbk = (T_phbk *)parent_win_data->user; - T_MFW_WIN *win_data; - tBookStandard *data; -// int i; // RAVI -// char debug[50]; // RAVI + T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; + T_phbk *phbk = (T_phbk *)parent_win_data->user; + T_MFW_WIN *win_data; + tBookStandard *data; +// int i; // RAVI +// char debug[50]; // RAVI - TRACE_FUNCTION ("bookSearchCreate()"); + TRACE_FUNCTION ("bookSearchCreate()"); - /* allocate memory for our control block - */ - if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) - return NULL; + /* allocate memory for our control block + */ + if ( ( data = (tBookStandard *) ALLOC_MEMORY( sizeof( tBookStandard ) ) ) == NULL ) + return NULL; - /*SPR 2123, MC allocate memory for phonebook list*/ - if (create_mmi_phonebook_names_list() == NULL) - return NULL; + /*SPR 2123, MC allocate memory for phonebook list*/ + if (create_mmi_phonebook_names_list() == NULL) + return NULL; - /* Create the window if we can - */ - if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookSearchWindowCB ) ) == NULL ) - { - FREE_MEMORY( (void *) data, sizeof( tBookStandard ) ); - return NULL; - } + /* Create the window if we can + */ + if ( ( data->win = win_create( parent, 0, E_WIN_VISIBLE, (T_MFW_CB) bookSearchWindowCB ) ) == NULL ) + { + FREE_MEMORY( (void *) data, sizeof( tBookStandard ) ); + return NULL; + } - /* Okay, we have created the control block and the window, so - we now need to configure the dialog and data pointers - */ - data->mmi_control.dialog = (T_DIALOG_FUNC) bookSearchDialog; - data->mmi_control.data = data; - win_data = ((T_MFW_HDR *)data->win)->data; - win_data->user = (void *) data; - data->phbk = phbk; - data->parent_win = parent; + /* Okay, we have created the control block and the window, so + we now need to configure the dialog and data pointers + */ + data->mmi_control.dialog = (T_DIALOG_FUNC) bookSearchDialog; + data->mmi_control.data = data; + win_data = ((T_MFW_HDR *)data->win)->data; + win_data->user = (void *) data; + data->phbk = phbk; + data->parent_win = parent; - /* create keyboards and menus for our window - */ - data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookSearchKbdCB ); - data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookSearchKbdLongCB ); - //Jan 22, 2006 REF: OMAPS00061930 x0039928 - // Fix: Create a timer and assign to PhbSearchTim - data->tim = timCreate(data->win, 1000, (MfwCb)bookSearchTimCB); - data->menu = mnuCreate( data->win,MmiBookMenuDetailsList() , 0, 0 ); - PhbSearchTim = data->tim; - mnuLang (data->menu,0); + /* create keyboards and menus for our window + */ + data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookSearchKbdCB ); + data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookSearchKbdLongCB ); + //Jan 22, 2006 REF: OMAPS00061930 x0039928 + // Fix: Create a timer and assign to PhbSearchTim + data->tim = timCreate(data->win, 1000, (MfwCb)bookSearchTimCB); + data->menu = mnuCreate( data->win,MmiBookMenuDetailsList() , 0, 0 ); + PhbSearchTim = data->tim; + mnuLang (data->menu,0); - /* 1945 MZ Initialise the edtBuf */ - memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); + /* 1945 MZ Initialise the edtBuf */ + memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); - { + { - /* SPR#1428 - SH - New Editor changes */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR /*SPR 2233, make sure editor only displays lower-case chars*/ - AUI_edit_SetAttr(&data->editor_attr, BOOKSEARCH_EDITOR, COLOUR_EDITOR_XX,EDITOR_FONT, + AUI_edit_SetAttr(&data->editor_attr, BOOKSEARCH_EDITOR, COLOUR_EDITOR_XX,EDITOR_FONT, ED_MODE_ALPHA | ED_MODE_FORMATTED, ED_CURSOR_BAR, ATB_DCS_ASCII, (UBYTE*) data->edtBuf, MAX_SEARCH_CHAR); data->editor_attr.FormatString = "*a"; data->editor = ATB_edit_Create( &data->editor_attr, 0 ); @@ -1074,25 +1055,24 @@ /*SPR2233 end*/ ATB_edit_Init(data->editor); #else /* NEW_EDITOR */ - bookSetEditAttributes(BOOKSEARCH_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, - (char *) data->edtBuf, MAX_SEARCH_CHAR, &data->attr ); - data->edt = edtCreate( data->win, &data->attr, 0, 0 ); + bookSetEditAttributes(BOOKSEARCH_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, + (char *) data->edtBuf, MAX_SEARCH_CHAR, &data->attr ); + data->edt = edtCreate( data->win, &data->attr, 0, 0 ); #endif /* NEW_EDITOR */ - } + } - /* allow the window and menu to be created - */ - mnuUnhide(data->menu); - winShow(data->win); + /* allow the window and menu to be created + */ + mnuUnhide(data->menu); + winShow(data->win); - /* And return the handle of the newly created window - */ + /* And return the handle of the newly created window + */ return data->win; } - /******************************************************************************* Public Methods @@ -1100,214 +1080,204 @@ *******************************************************************************/ - - /******************************************************************************* - $Function: bookSearchStart + $Function: bookSearchStart - $Description: Starts the search window + $Description: Starts the search window - $Returns: handle of newly created window, or NULL if error + $Returns: handle of newly created window, or NULL if error - $Arguments: parent, handle of parent window + $Arguments: parent, handle of parent window *******************************************************************************/ T_MFW_HND bookSearchStart( MfwHnd parent ) { - T_MFW_HND win; - T_MFW_WIN *win_data; + T_MFW_HND win; + T_MFW_WIN *win_data; tBookStandard *data; - MfwMnu *mnu; - tMmiPhbData *Current; + MfwMnu *mnu; + tMmiPhbData *Current; - /* if the phone book is still loading, we can't do anything - with it, so return a NULL, after showing an information - dialog - */ - if ( phb_get_mode() == PHB_LOADING ) - { - bookShowInformation( idle_get_window(), TxtPleaseWait ,NULL, NULL ); - return NULL; - } + /* if the phone book is still loading, we can't do anything + with it, so return a NULL, after showing an information + dialog + */ + if ( phb_get_mode() == PHB_LOADING ) + { + bookShowInformation( idle_get_window(), TxtPleaseWait ,NULL, NULL ); + return NULL; + } - /* try to create the window - */ + /* try to create the window + */ if ( ( win = bookSearchCreate( parent ) ) == NULL ) - return NULL; - - /* having created the window, we now need to initialise it to - sensible data - */ - win_data = ( (T_MFW_HDR *) win)->data; - data = (tBookStandard *) win_data->user; - Current = &data->phbk->current; + return NULL; - /* establish the status of the phone book - */ - if ( ( Current->status.book != PHB_UPN ) && ( Current->status.book != PHB_SDN ) ) - Current->status.book = bookActiveBook(READ); - bookGetCurrentStatus( &Current->status ); + /* having created the window, we now need to initialise it to + sensible data + */ + win_data = ( (T_MFW_HDR *) win)->data; + data = (tBookStandard *) win_data->user; + Current = &data->phbk->current; - /* try to establish if we have information in the phone book - */ - Current->index = 1; - Current->selectedName = 0; - bookFindName( MAX_SEARCH_NAME, Current ); + /* establish the status of the phone book + */ + if ( ( Current->status.book != PHB_UPN ) && ( Current->status.book != PHB_SDN ) ) + Current->status.book = bookActiveBook(READ); + bookGetCurrentStatus( &Current->status ); - if ( ! Current->index ) - { - bookSearchDestroy( win ); - bookShowInformation( idle_get_window(), TxtEmptyList, NULL, NULL ); - return NULL; - } + /* try to establish if we have information in the phone book + */ + Current->index = 1; + Current->selectedName = 0; + bookFindName( MAX_SEARCH_NAME, Current ); - /* clear the edit buffer prior to displaying the editor and menus - */ - + if ( ! Current->index ) + { + bookSearchDestroy( win ); + bookShowInformation( idle_get_window(), TxtEmptyList, NULL, NULL ); + return NULL; + } - memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); - /* SPR#1428 - SH - New Editor: don't need editActivate */ + /* clear the edit buffer prior to displaying the editor and menus + */ + + memset( data->edtBuf, '\0', sizeof( data->edtBuf ) ); + /* SPR#1428 - SH - New Editor: don't need editActivate */ #ifndef NEW_EDITOR - editActivate( data->edt, true ); + editActivate( data->edt, true ); #endif /* NEW_EDITOR */ - mnu = (MfwMnu *) mfwControl( data->menu ); - mnu->lCursor[mnu->level] = Current->selectedName; - winShow(data->win); + mnu = (MfwMnu *) mfwControl( data->menu ); + mnu->lCursor[mnu->level] = Current->selectedName; + winShow(data->win); - /* return the handle to the newly created window - */ + /* return the handle to the newly created window + */ return win; } - - /******************************************************************************* - $Function: bookSearchDestroy + $Function: bookSearchDestroy - $Description: Destroy the search window + $Description: Destroy the search window - $Returns: None + $Returns: None - $Arguments: Window, handle of the window to be destroyed + $Arguments: Window, handle of the window to be destroyed *******************************************************************************/ void bookSearchDestroy( MfwHnd window ) { - T_MFW_WIN *win = ((T_MFW_HDR *) window)->data; - tBookStandard *data = (tBookStandard *) win->user; + T_MFW_WIN *win = ((T_MFW_HDR *) window)->data; + tBookStandard *data = (tBookStandard *) win->user; - TRACE_FUNCTION( "bookSearchDestroy()" ); + TRACE_FUNCTION( "bookSearchDestroy()" ); - /* Only destroy if the data is valid - */ - if ( data ) - { - /* SPR#1428 - SH - New Editor changes */ + /* Only destroy if the data is valid + */ + if ( data ) + { + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* Editor now not automatically destroyed by winDelete, - * so destroy it here. */ - if (data->entry_data) - { - AUI_entry_Destroy(data->entry_data); - data->entry_data = 0; - } - if (data->editor) - { - ATB_edit_Destroy(data->editor); - data->editor = 0; - } + /* Editor now not automatically destroyed by winDelete, + * so destroy it here. */ + if (data->entry_data) + { + AUI_entry_Destroy(data->entry_data); + data->entry_data = 0; + } + if (data->editor) + { + ATB_edit_Destroy(data->editor); + data->editor = 0; + } #endif /* NEW_EDITOR */ - /* If we're the root window we destroy using it's function - */ - if ( data->phbk->root_win == window ) - { - bookPhonebookDestroy( data->phbk->win ); - return; - } + /* If we're the root window we destroy using it's function + */ + if ( data->phbk->root_win == window ) + { + bookPhonebookDestroy( data->phbk->win ); + return; + } - /* delete ourself - */ - data->phbk->search_win = 0; - winDelete( data->win ); - FREE_MEMORY( (void *) data, sizeof( tBookStandard ) ); - } - /*SPR2123, MC deallocate memory for phonebook list*/ - destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); + /* delete ourself + */ + data->phbk->search_win = 0; + winDelete( data->win ); + FREE_MEMORY( (void *) data, sizeof( tBookStandard ) ); + } + /*SPR2123, MC deallocate memory for phonebook list*/ + destroy_mmi_phonebook_names_list(MmiBookMenuDetailsList()); } - - - - - /******************************************************************************* - $Function: bookSearchName + $Function: bookSearchName - $Description: locate a requested name in the phone book + $Description: locate a requested name in the phone book - $Returns: status of the findName routine + $Returns: status of the findName routine - $Arguments: pattern, to be searched for - number, of elements to limit the search to - current, pointer to a buffer to store the results + $Arguments: pattern, to be searched for + number, of elements to limit the search to + current, pointer to a buffer to store the results *******************************************************************************/ UBYTE bookSearchName (char *pattern,UBYTE number,tMmiPhbData *current) { - #ifdef NO_ASCIIZ - T_MFW_PHB_TEXT l_name; + #ifdef NO_ASCIIZ + T_MFW_PHB_TEXT l_name; #else - UBYTE l_name[PHB_MAX_LEN]; + UBYTE l_name[PHB_MAX_LEN]; #endif -// UBYTE len; // RAVI - int i; - UBYTE ret = (UBYTE)PHB_FAIL; +// UBYTE len; // RAVI + int i; + UBYTE ret = (UBYTE)PHB_FAIL; - TRACE_FUNCTION( "bookSearchName()" ); + TRACE_FUNCTION( "bookSearchName()" ); - /* if using UPN phone book, return status of findname - */ - if ( current->status.book == PHB_UPN ) - return ret = current->result = bookFindName( MAX_SEARCH_NAME, current ); + /* if using UPN phone book, return status of findname + */ + if ( current->status.book == PHB_UPN ) + return ret = current->result = bookFindName( MAX_SEARCH_NAME, current ); - /* otherwise we need to be a little bit more clever with this - */ + /* otherwise we need to be a little bit more clever with this + */ memset( current->entry, 0, MAX_SEARCH_CALL_LIST * sizeof( T_MFW_PHB_ENTRY ) ); - bookGetCurrentStatus( ¤t->status ); + bookGetCurrentStatus( ¤t->status ); - current->list.entry = current->entry; - current->list.num_entries = number; + current->list.entry = current->entry; + current->list.num_entries = number; - /* convert from GSM characters - */ - #ifdef NO_ASCIIZ + /* convert from GSM characters + */ + #ifdef NO_ASCIIZ - memset( l_name.data, 0, PHB_MAX_LEN ); - mfw_Gsm2SIMStr( MFW_DCS_7bits, (UBYTE *) pattern, PHB_MAX_LEN, l_name.data, &l_name.len ); - #else + memset( l_name.data, 0, PHB_MAX_LEN ); + mfw_Gsm2SIMStr( MFW_DCS_7bits, (UBYTE *) pattern, PHB_MAX_LEN, l_name.data, &l_name.len ); + #else memset( l_name, 0, PHB_MAX_LEN ); - mfw_Gsm2SIMStr( MFW_DCS_7bits, (UBYTE *) pattern, PHB_MAX_LEN, l_name, &len ); - #endif - /* perform a search to locate a match with this criteria - */ + mfw_Gsm2SIMStr( MFW_DCS_7bits, (UBYTE *) pattern, PHB_MAX_LEN, l_name, &len ); + #endif + /* perform a search to locate a match with this criteria + */ if ( strlen(pattern) != 0 ) { #ifdef WIN32 #ifndef NO_ASCIIZ - /***************************Go-lite Optimization changes Start***********************/ - //Aug 16, 2004 REF: CRR 24323 Deepa M.D - TRACE_EVENT_P1("Search str: %s", l_name.data); - /***************************Go-lite Optimization changes end***********************/ + /***************************Go-lite Optimization changes Start***********************/ + //Aug 16, 2004 REF: CRR 24323 Deepa M.D + TRACE_EVENT_P1("Search str: %s", l_name.data); + /***************************Go-lite Optimization changes end***********************/ ret = phb_find_entries( current->status.book, ¤t->index, MFW_PHB_ALPHA, number, (UBYTE *) l_name, len, ¤t->list ); #endif #else @@ -1325,54 +1295,52 @@ { /* we don't have any name information, so start at the beginning */ - current->index = 1; - current->selectedName = 0; - bookFindName( MAX_SEARCH_NAME, current ); + current->index = 1; + current->selectedName = 0; + bookFindName( MAX_SEARCH_NAME, current ); } - /* check for match - */ - if ( ( current->list.num_entries < MAX_SEARCH_NAME ) - || ( current->list.result == MFW_NO_ENTRY ) || ( ret == (UBYTE)PHB_FAIL ) ) - { - /* no, then try to find again - */ - ret = bookFindName( MAX_SEARCH_NAME, current ); - } - else - { - for ( i = 0; i < number; i++ ) + /* check for match + */ + if ( ( current->list.num_entries < MAX_SEARCH_NAME ) + || ( current->list.result == MFW_NO_ENTRY ) || ( ret == (UBYTE)PHB_FAIL ) ) + { + /* no, then try to find again + */ + ret = bookFindName( MAX_SEARCH_NAME, current ); + } + else + { + for ( i = 0; i < number; i++ ) #ifdef NO_ASCIIZ { - /* convert from Sim to GSM and then copy to output buffer - */ + /* convert from Sim to GSM and then copy to output buffer + */ /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ /*MC SPR 2175, using new function to convert name string*/ - if (current->entry[i].name.dcs == MFW_DCS_8bits && current->entry[i].name.data[0] != 0x80) - { ATB_convert_String((char*)current->entry[i].name.data, MFW_DCS_8bits, current->entry[i].name.len, (char*)l_name.data, MFW_ASCII, MAX_ALPHA_LEN, FALSE); - memcpy( current->entry[i].name.data, l_name.data, MAX_ALPHA_LEN ); - current->entry[i].name.len = l_name.len; - current->entry[i].name.dcs = MFW_ASCII; - } + if (current->entry[i].name.dcs == MFW_DCS_8bits && current->entry[i].name.data[0] != 0x80) + { ATB_convert_String((char*)current->entry[i].name.data, MFW_DCS_8bits, current->entry[i].name.len, (char*)l_name.data, MFW_ASCII, MAX_ALPHA_LEN, FALSE); + memcpy( current->entry[i].name.data, l_name.data, MAX_ALPHA_LEN ); + current->entry[i].name.len = l_name.len; + current->entry[i].name.dcs = MFW_ASCII; + } } #else /* convert from GSM to Alpha characters - */ - bookGsm2Alpha( (UBYTE *) current->entry[i].name ); + */ + bookGsm2Alpha( (UBYTE *) current->entry[i].name ); #endif - } + } - /* return the status, and store it as part of current as well - */ - TRACE_EVENT_P1("BookSearchName returns: %d", ret); - return current->result = ret; + /* return the status, and store it as part of current as well + */ + TRACE_EVENT_P1("BookSearchName returns: %d", ret); + return current->result = ret; } - /******************************************************************************* End of File *******************************************************************************/ -
--- a/src/ui/bmi/mmiBookServices.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookServices.c Sat Nov 14 08:43:59 2020 +0000 @@ -11,12 +11,12 @@ $Project name: Basic MMI $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookServices.c - $Revision: 1.0 + $Module: PhoneBook + $File: MmiBookServices.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -29,59 +29,59 @@ $History: MmiBookServices.c Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) - Bug:PhoneBook: Wrong confirmation message in Phonebook storage when copying/moving a contact - after adding one or making a change - Fix: ACI shall not send rAT_OK for entry addition / entry change operations in Internal PHB - Hence, the "addname_flag" and "changename_flag" are immdtly reset incase of Internal PHB + Bug:PhoneBook: Wrong confirmation message in Phonebook storage when copying/moving a contact + after adding one or making a change + Fix: ACI shall not send rAT_OK for entry addition / entry change operations in Internal PHB + Hence, the "addname_flag" and "changename_flag" are immdtly reset incase of Internal PHB June 22, 2006 REF: DRT OMAPS00081761 x0012849 : Jagannatha Description:Handset crash when adding new entry with more then 20 digits to phonebook SIM card Solution: Number editor will be restricted to 20 characters when EXT1 is not supported. June 14, 2006 REF: OMAPS00079308 x0039928 - Bug:Validation and Optimization of Memory consumption - Fix: Memory optimization is done in bookFindNameInSpecificPhonebook to save around 450 bytes of memory. + Bug:Validation and Optimization of Memory consumption + Fix: Memory optimization is done in bookFindNameInSpecificPhonebook to save around 450 bytes of memory. May 29, 2006 DR: OMAPS00079431 - xreddymn Description: Name field is not limited to 14 bytes in case of SIM phonebook. Solution: In bookInputStartNameEditor, limit the number of characters after checking if SIM or ME phonebook is being used. - Jan 22, 2006 REF: OMAPS00061930 x0039928 - Bug:PhoneBook -Change entry and view entry through Change option-failed - Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries. + Jan 22, 2006 REF: OMAPS00061930 x0039928 + Bug:PhoneBook -Change entry and view entry through Change option-failed + Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries. - June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 - Issue description: SIM: wrong behavior when FDN is not allocated in SST - Solution: Before displaying the FDN options, a check is made if FDN is allocated. Only if - FDN is allocated, the options are displayed. + June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 + Issue description: SIM: wrong behavior when FDN is not allocated in SST + Solution: Before displaying the FDN options, a check is made if FDN is allocated. Only if + FDN is allocated, the options are displayed. - Sep 29, 2004 REF: CRR 25041 xvilliva - Bug: add new entry in the FDN , phone gets rebooted. - Fix: The bookMenuStart() is called with the window data->phbk->win, - similar to the function bookFDNMenu() to avoid crash. The menu - window thus created is stored, which will be deleted while - phonebook menu is destroyed. + Sep 29, 2004 REF: CRR 25041 xvilliva + Bug: add new entry in the FDN , phone gets rebooted. + Fix: The bookMenuStart() is called with the window data->phbk->win, + similar to the function bookFDNMenu() to avoid crash. The menu + window thus created is stored, which will be deleted while + phonebook menu is destroyed. - Jul 29, 2004 REF: CRR 20888 Deepa M.D - Bug:Message received not showing with name, name stored in phonebook - Fix:Memset the structure(p_pszNumberText.data) to 0 and then memcpy. + Jul 29, 2004 REF: CRR 20888 Deepa M.D + Bug:Message received not showing with name, name stored in phonebook + Fix:Memset the structure(p_pszNumberText.data) to 0 and then memcpy. - Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN - Description: Current state of FDN not highlighted - Fix: Instead of showing the submenu directly we call this function - where we set the menu and also higlight the previously selected menu item + Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN + Description: Current state of FDN not highlighted + Fix: Instead of showing the submenu directly we call this function + where we set the menu and also higlight the previously selected menu item - June 25, 2004 REF: CRR 21547 xvilliva - Bug: Taking blank entries in phonebook if select book is either SIM or Phone. - Fix: We check for presence of either phone number or name before add/modify. + June 25, 2004 REF: CRR 21547 xvilliva + Bug: Taking blank entries in phonebook if select book is either SIM or Phone. + Fix: We check for presence of either phone number or name before add/modify. - Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) - Description: The confirmation for deleting entry from address book was a timed confirmation - screen. - Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' + Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) + Description: The confirmation for deleting entry from address book was a timed confirmation + screen. + Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' - Issue Number : SPR#12722 on 29/03/04 by Deepa M.D + Issue Number : SPR#12722 on 29/03/04 by Deepa M.D 25/10/00 Original Condat(UK) BMI version. @@ -92,7 +92,6 @@ - /******************************************************************************* Include Files @@ -143,13 +142,13 @@ #include "mfw_mme.h" #include "mfw_sat.h" #include "mfw_sms.h" -#include "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr' +#include "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr' #include "dspl.h" #include "ksd.h" #include "psa.h" -#include "psa_sim.h" // June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 +#include "psa_sim.h" // June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 #include "MmiMain.h" #include "MmiBookController.h" @@ -158,7 +157,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -218,7 +216,7 @@ # define PB_MAX_FIND_ENTRIES 4 #endif -// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN +// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN #define FIRSTMENUITEM 0 #define SECONDMENUITEM 1 @@ -264,7 +262,7 @@ tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - TRACE_EVENT_P1("bookDeleteEntryCB index %d", Phbk->current.entry[Phbk->current.selectedName].index); + TRACE_EVENT_P1("bookDeleteEntryCB index %d", Phbk->current.entry[Phbk->current.selectedName].index); /* This call back is invoked from the delete entry dialog confirmation screen, and will only respond to the left key (OK) being selected. @@ -274,7 +272,7 @@ case INFO_KCD_LEFT: { if (( Phbk->current.status.book == PHB_UPN) || - (Phbk->current.status.book == PHB_FDN )) + (Phbk->current.status.book == PHB_FDN )) deleteFromFile( Phbk, Phbk->current.status.book ); else deleteFromFile( Phbk, bookActiveBook(WRITE) ); @@ -297,12 +295,6 @@ } - - - - - - /******************************************************************************* Public Methods @@ -310,12 +302,6 @@ *******************************************************************************/ - - - - - - /******************************************************************************* $Function: bookInitialise @@ -335,7 +321,7 @@ /* SPR#1112 - SH - Added E_PHB_READY and E_PHB_BUSY */ phb = phb_create( 0, (MfwEvt) (E_PHB_UPN_LIST | E_PHB_ERROR | E_PHB_STATUS - | E_PHB_READY | E_PHB_BUSY), (MfwCb) bookEvent ); + | E_PHB_READY | E_PHB_BUSY), (MfwCb) bookEvent ); } @@ -357,109 +343,107 @@ void bookInitInternal( void ) { - UBYTE intphonebook; - T_MFW ret; + UBYTE intphonebook; + T_MFW ret; - ret = GI_pb_GetPhonebook(&intphonebook); + ret = GI_pb_GetPhonebook(&intphonebook); - if (ret==MFW_PHB_OK) - { - bookSetBookAvailable(TRUE); - GI_pb_Initialise(); - if (intphonebook) - { - bookSetBookSelected(TRUE); - } - else - bookSetBookSelected(FALSE); - } - else - bookSetBookAvailable(FALSE); + if (ret==MFW_PHB_OK) + { + bookSetBookAvailable(TRUE); + GI_pb_Initialise(); + if (intphonebook) + { + bookSetBookSelected(TRUE); + } + else + bookSetBookSelected(FALSE); + } + else + bookSetBookAvailable(FALSE); - return; + return; } /******************************************************************************* - $Function: bookGetBookSelected + $Function: bookGetBookSelected - $Description: Is the internal phonebook selected? + $Description: Is the internal phonebook selected? - $Returns: TRUE if internal phonebook is selected, FALSE otherwise + $Returns: TRUE if internal phonebook is selected, FALSE otherwise - $Arguments: none + $Arguments: none *******************************************************************************/ BOOL bookGetBookSelected() { - return ipbBookSelected; + return ipbBookSelected; } /******************************************************************************* - $Function: bookSetBookSelected + $Function: bookSetBookSelected - $Description: Select or deselect the internal phonebook + $Description: Select or deselect the internal phonebook - $Returns: None. + $Returns: None. - $Arguments: TRUE to select internal phonebook, FALSE to select SIM phonebook + $Arguments: TRUE to select internal phonebook, FALSE to select SIM phonebook *******************************************************************************/ void bookSetBookSelected(UBYTE bookSelected) { - ipbBookSelected = bookSelected; + ipbBookSelected = bookSelected; - return; + return; } /******************************************************************************* - $Function: bookGetBookAvailable + $Function: bookGetBookAvailable - $Description: Is the internal phonebook available for use? + $Description: Is the internal phonebook available for use? - $Returns: TRUE if internal phonebook is available, FALSE otherwise + $Returns: TRUE if internal phonebook is available, FALSE otherwise - $Arguments: none + $Arguments: none *******************************************************************************/ BOOL bookGetBookAvailable() { - return ipbBookAvailable; + return ipbBookAvailable; } /******************************************************************************* - $Function: bookSetBookAvailable + $Function: bookSetBookAvailable - $Description: Indicate whether or not the internal phonebook is available for use + $Description: Indicate whether or not the internal phonebook is available for use - $Returns: None. + $Returns: None. - $Arguments: TRUE to if internal phonebook is available, FALSE otherwise + $Arguments: TRUE to if internal phonebook is available, FALSE otherwise *******************************************************************************/ void bookSetBookAvailable(UBYTE bookAvailable) { - ipbBookAvailable = bookAvailable; + ipbBookAvailable = bookAvailable; - return; + return; } #endif - - /******************************************************************************* $Function: bookExit @@ -476,26 +460,20 @@ void bookExit( void ) { TRACE_FUNCTION( "bookExit()" ); - phb_delete( phb ); - /* SPR#1112 - SH - Now redundant */ + phb_delete( phb ); + /* SPR#1112 - SH - Now redundant */ // bookDeletePhoneBook(); /* SPR#1112 - SH - Exit internal phonebook if activated */ #ifdef INT_PHONEBOOK - if (bookGetBookAvailable()) - GI_pb_Exit(); + if (bookGetBookAvailable()) + GI_pb_Exit(); #endif - return; + return; } - - - - - - /******************************************************************************* $Function: bookAddName @@ -519,7 +497,7 @@ /*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ - memset( Phbk->edt_buf_name, 0, MAX_ALPHA_LEN ); + memset( Phbk->edt_buf_name, 0, MAX_ALPHA_LEN ); memcpy( Phbk->edt_buf_number, (char*)number, PHB_MAX_LEN ); /* Populate the input specifier structure and use it to @@ -532,12 +510,6 @@ } - - - - - - /******************************************************************************* $Function: bookShowInformation @@ -558,7 +530,7 @@ TRACE_FUNCTION( "bookShowInformation()" ); - dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, txtId, TxtNull, COLOUR_BOOK_POPUP); + dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, txtId, TxtNull, COLOUR_BOOK_POPUP); dlg_initDisplayData_events( &display_info, (T_VOID_FUNC) cb_function, THREE_SECS, KEY_CLEAR ); display_info.TextString = text; @@ -584,7 +556,7 @@ *******************************************************************************/ T_MFW_HND bookShowInfoScreen( MfwHnd parent, int txtId1, int txtId2, T_VOID_FUNC cb_function, - USHORT Identifier, ULONG Time) + USHORT Identifier, ULONG Time) { T_DISPLAY_DATA display_info; @@ -593,7 +565,7 @@ dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, txtId1, txtId2, COLOUR_BOOK_POPUP); dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)cb_function, Time, KEY_CLEAR); - display_info.Identifier = Identifier; + display_info.Identifier = Identifier; /* Call Info Screen */ @@ -629,8 +601,6 @@ int firstNotMatch=0; - - TRACE_FUNCTION("bookFindIndexMatchPB()"); #ifdef TRACE_PB_DEBUG @@ -712,17 +682,14 @@ } - - - /******************************************************************************* $Function: bookFindNameInPhonebook $Description: SPR#1112 - Modified function to search in alternate phonebook. - Locates the name in the current phonebook. If the current phonebook is - the internal phonebook and no result is found, the SIM phonebook is also - searched. + Locates the name in the current phonebook. If the current phonebook is + the internal phonebook and no result is found, the SIM phonebook is also + searched. $Returns: 0 if error, 1 if successful @@ -751,9 +718,9 @@ if (!result && bookGetBookAvailable() && bookGetBookSelected()) { - bookSetBookSelected(FALSE); - result = bookFindNameInSpecificPhonebook(p_pszNumber, p_pEntry); - bookSetBookSelected(TRUE); + bookSetBookSelected(FALSE); + result = bookFindNameInSpecificPhonebook(p_pszNumber, p_pEntry); + bookSetBookSelected(TRUE); } #endif @@ -766,7 +733,7 @@ $Function: bookFindNameInSpecificPhonebook $Description: Locates the name in a specified phone book - SPR#1112 - SH - Separate this part of function, so we can call it twice + SPR#1112 - SH - Separate this part of function, so we can call it twice $Returns: 0 if error, 1 if successful $Arguments: p_pszNumber, pointer to pattern to match, p_pEntry, pointer @@ -779,7 +746,7 @@ int bookFindNameInSpecificPhonebook( const char *p_pszNumber, T_MFW_PHB_ENTRY *p_pEntry ) { #ifdef NO_ASCIIZ - T_MFW_PHB_TEXT p_pszNumberText; + T_MFW_PHB_TEXT p_pszNumberText; #endif T_MFW_PHB_LIST phb_list; //, new_list; // RAVI @@ -807,7 +774,7 @@ return (0); if (strlen(p_pszNumber) < 1) - return (0); + return (0); memset( p_pEntry, 0, sizeof(T_MFW_PHB_ENTRY) ); memset( &phb_list, 0, sizeof(phb_list) ); @@ -834,29 +801,29 @@ memcpy( (char*)p_pszNumberText.data, p_pszNumber , p_pszNumberText.len ); ret = phb_find_entries( - bookActiveBook(READ), /* phonebook */ - &phb_index, /* returns index in phb */ - MFW_PHB_NUMBER, /* searching for number */ - PB_MAX_FIND_ENTRIES, /* return max. four entry */ - &p_pszNumberText, /* search this pattern */ - &phb_list /* return structure */ - ); + bookActiveBook(READ), /* phonebook */ + &phb_index, /* returns index in phb */ + MFW_PHB_NUMBER, /* searching for number */ + PB_MAX_FIND_ENTRIES, /* return max. four entry */ + &p_pszNumberText, /* search this pattern */ + &phb_list /* return structure */ + ); #else ret = phb_find_entries( - bookActiveBook(READ), /* phonebook */ - &phb_index, /* returns index in phb */ - MFW_PHB_NUMBER, /* searching for number */ - PB_MAX_FIND_ENTRIES, /* return max. four entry */ - (char *)p_pszNumber, /* search this pattern */ - &phb_list /* return structure */ - ); + bookActiveBook(READ), /* phonebook */ + &phb_index, /* returns index in phb */ + MFW_PHB_NUMBER, /* searching for number */ + PB_MAX_FIND_ENTRIES, /* return max. four entry */ + (char *)p_pszNumber, /* search this pattern */ + &phb_list /* return structure */ + ); #endif //NO_ASCIIZ //Check return from phb_find_entries if (ret == MFW_PHB_FAIL) { - return (0); + return (0); } @@ -886,52 +853,52 @@ /* Convert name into appropriate format */ #ifdef NO_ASCIIZ - /*MC SPR 1319*/ + /*MC SPR 1319*/ #ifdef EASY_TEXT_ENABLED #ifndef FF_MMI_PB_OPTIM - for (k=0;k<p_pEntry->name.len; k++) - { - if (p_pEntry->name.data[k]==0 ) - { - debug[k] = '0'; - } - else - { - debug[k] = p_pEntry->name.data[k]; - } - } - TRACE_EVENT_P1("BFNIP: %s ", debug); + for (k=0;k<p_pEntry->name.len; k++) + { + if (p_pEntry->name.data[k]==0 ) + { + debug[k] = '0'; + } + else + { + debug[k] = p_pEntry->name.data[k]; + } + } + TRACE_EVENT_P1("BFNIP: %s ", debug); #endif - /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - if (p_pEntry->name.data[0] == 0x80) /* Unicode 0x80 style */ - { - /*MC, removed var "actual_length*/ - int i; + /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + if (p_pEntry->name.data[0] == 0x80) /* Unicode 0x80 style */ + { + /*MC, removed var "actual_length*/ + int i; for (i=1; i<MAX_ALPHA_LEN; i+=1) - { - l_name[i+1] = p_pEntry->name.data[i]; + { + l_name[i+1] = p_pEntry->name.data[i]; - } - l_name[0] = p_pEntry->name.data[0]; - l_name[1] = MAX_ALPHA_LEN; + } + l_name[0] = p_pEntry->name.data[0]; + l_name[1] = MAX_ALPHA_LEN; - memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); + memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); - if (p_pEntry->name.len%2 == 1)/*if length of string odd*/ - { - p_pEntry->name.len++; /*MC we have to increase the length by one as we've shifted the string up*/ - } + if (p_pEntry->name.len%2 == 1)/*if length of string odd*/ + { + p_pEntry->name.len++; /*MC we have to increase the length by one as we've shifted the string up*/ + } - /*MC, ensure all the chars in the string after string length are 0*/ - for (i=p_pEntry->name.len; i<MAX_ALPHA_LEN; i++) - { - p_pEntry->name.data[i]= 0; - } + /*MC, ensure all the chars in the string after string length are 0*/ + for (i=p_pEntry->name.len; i<MAX_ALPHA_LEN; i++) + { + p_pEntry->name.data[i]= 0; + } #ifndef FF_MMI_PB_OPTIM - for (k=0;k<p_pEntry->name.len; k++) - { + for (k=0;k<p_pEntry->name.len; k++) + { if (p_pEntry->name.data[k]==0 ) { debug[k] = '0'; @@ -940,57 +907,55 @@ { debug[k] = p_pEntry->name.data[k]; } - } + } TRACE_EVENT_P1("BNFIP conv: %s", debug); - sprintf(debug, "Length of phonebook entry:%d", p_pEntry->name.len); + sprintf(debug, "Length of phonebook entry:%d", p_pEntry->name.len); #endif - } + } else #endif /* EASY_TEXT_ENABLED */ - /* Marcus: Issue 963: 11/09/2002: Start */ - { - /* - * bookGsm2Alpha requires ASCIIZ string - make sure it is. - * This also will help calling functions that may assume ASCIIZ. - */ - if (sizeof(p_pEntry->name.data) > p_pEntry->name.len) - { - p_pEntry->name.data[p_pEntry->name.len] = '\0'; - } + /* Marcus: Issue 963: 11/09/2002: Start */ + { + /* + * bookGsm2Alpha requires ASCIIZ string - make sure it is. + * This also will help calling functions that may assume ASCIIZ. + */ + if (sizeof(p_pEntry->name.data) > p_pEntry->name.len) + { + p_pEntry->name.data[p_pEntry->name.len] = '\0'; + } /*SPR2175, use new function to convert from GSM to ASCII*/ - { + { - TRACE_EVENT_P1("Converting name from 8-bit to ASCII, dcs: %d", p_pEntry->name.dcs); - ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); - p_pEntry->name.dcs = MFW_ASCII; - memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); - } + TRACE_EVENT_P1("Converting name from 8-bit to ASCII, dcs: %d", p_pEntry->name.dcs); + ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); + p_pEntry->name.dcs = MFW_ASCII; + memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); + } - } - /* Marcus: Issue 963: 11/09/2002: End */ + } + /* Marcus: Issue 963: 11/09/2002: End */ /*MC end*/ #else - bookGsm2Alpha( (UBYTE *) p_pEntry->name ); + bookGsm2Alpha( (UBYTE *) p_pEntry->name ); #endif /* NO_ASCIIZ */ return (1); } - - /******************************************************************************* - $Function: bookFindNumberByPosition + $Function: bookFindNumberByPosition - $Description: locate a number given the index + $Description: locate a number given the index - $Returns: 0 if failure, 1 otherwise + $Returns: 0 if failure, 1 otherwise - $Arguments: index of the number to find, p_pentry, return structure + $Arguments: index of the number to find, p_pentry, return structure *******************************************************************************/ @@ -1027,34 +992,34 @@ */ #ifdef NO_ASCIIZ - { - #ifdef EASY_TEXT_ENABLED - /*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ - int i; - if (p_pEntry->name.data[0] == 0x80 ||p_pEntry->name.data[0]== 0x00) - { for (i=1; i<MAX_ALPHA_LEN; i+=1) - { - l_name[i+1] = p_pEntry->name.data[i]; + { + #ifdef EASY_TEXT_ENABLED + /*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ + int i; + if (p_pEntry->name.data[0] == 0x80 ||p_pEntry->name.data[0]== 0x00) + { for (i=1; i<MAX_ALPHA_LEN; i+=1) + { + l_name[i+1] = p_pEntry->name.data[i]; - } - l_name[0] = p_pEntry->name.data[0]; - l_name[1] = MAX_ALPHA_LEN; + } + l_name[0] = p_pEntry->name.data[0]; + l_name[1] = MAX_ALPHA_LEN; - memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); + memcpy( p_pEntry->name.data, (char*)l_name, MAX_ALPHA_LEN ); - p_pEntry->name.len++;/* = actual_length;*/ + p_pEntry->name.len++;/* = actual_length;*/ - } - else - #endif + } + else + #endif - /*SPR2175, use new function to convert from GSM to ASCII*/ - if (p_pEntry->name.dcs == MFW_DCS_8bits && p_pEntry->name.data[0] != 0x80) - { - ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); - p_pEntry->name.dcs = MFW_ASCII; - memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); - } + /*SPR2175, use new function to convert from GSM to ASCII*/ + if (p_pEntry->name.dcs == MFW_DCS_8bits && p_pEntry->name.data[0] != 0x80) + { + ATB_convert_String((char*)p_pEntry->name.data, MFW_DCS_8bits, p_pEntry->name.len, (char*)l_name, MFW_ASCII, MAX_ALPHA_LEN, FALSE); + p_pEntry->name.dcs = MFW_ASCII; + memcpy(p_pEntry->name.data, l_name, MAX_ALPHA_LEN); + } } #else @@ -1069,12 +1034,6 @@ } - - - - - - /******************************************************************************* $Function: bookCallIndex @@ -1106,15 +1065,6 @@ } - - - - - - - - - /******************************************************************************* $Function: bookGsm2Alpha @@ -1148,8 +1098,6 @@ } - - /******************************************************************************* $Function: bookActiveBook @@ -1168,30 +1116,29 @@ /* SPR#1112 - SH - Return internal phonebook ID when appropriate */ // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// To get FDN book, when FDN is disabled, but only when accessing from FDM menu and not while we are in active call +// To get FDN book, when FDN is disabled, but only when accessing from FDM menu and not while we are in active call - if(menuFDN && (call_data.calls.numCalls==0)) - { - return PHB_FDN; - } + if(menuFDN && (call_data.calls.numCalls==0)) + { + return PHB_FDN; + } #ifdef INT_PHONEBOOK if (bookGetBookAvailable() && bookGetBookSelected()) - return PHB_IPB; + return PHB_IPB; #endif // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// When FDN is disabled we need to display only ADN entries in the phonebook menu. -// We now return PHB_ADN instead of PHB_ADN_FDN. +// When FDN is disabled we need to display only ADN entries in the phonebook menu. +// We now return PHB_ADN instead of PHB_ADN_FDN. if(process == READ) return ( phb_get_mode() == PHB_RESTRICTED ) ? PHB_FDN : PHB_ADN; else if(process == WRITE) - return ( phb_get_mode() == PHB_RESTRICTED ) ? PHB_FDN : PHB_ADN; + return ( phb_get_mode() == PHB_RESTRICTED ) ? PHB_FDN : PHB_ADN; return PHB_NONE; /*a0393213 warnings removal-added return statement*/ } - /******************************************************************************* $Function: bookMemoryView @@ -1209,8 +1156,8 @@ T_MFW_HND win = mfwParent( mfw_header() ); T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; - char Buffer[16]; - int TxtToShow; + char Buffer[16]; + int TxtToShow; /* Determine which book we are currently using @@ -1220,17 +1167,17 @@ /* retrieve he status of the book, and create a string for output based on the status */ - #if(BOARD!=61) + #if(BOARD!=61) Buffer[0] = '\0'; // OMAPS00042166 - RAVI /*a0393213 warnings removal-== changed to =*/ #endif if ( bookGetCurrentStatus( &data->phbk->current.status ) == MFW_PHB_OK ) { /* SPR#1112 - Internal phonebook - show the current selected phonebook*/ #ifdef INT_PHONEBOOK - if (bookGetBookAvailable() && bookGetBookSelected()) - TxtToShow = TxtPhone; - else - TxtToShow = TxtSIM; + if (bookGetBookAvailable() && bookGetBookSelected()) + TxtToShow = TxtPhone; + else + TxtToShow = TxtSIM; #else TxtToShow = TxtUsed; #endif @@ -1242,27 +1189,21 @@ TxtToShow = TxtReadError; - { - T_DISPLAY_DATA display_info; + { + T_DISPLAY_DATA display_info; - dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtToShow, TxtNull , COLOUR_STATUS); - dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR ); - display_info.TextString2 = Buffer; + dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtToShow, TxtNull , COLOUR_STATUS); + dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_CLEAR ); + display_info.TextString2 = Buffer; - /* Call Info Screen - */ - info_dialog( win, &display_info ); - } + /* Call Info Screen + */ + info_dialog( win, &display_info ); + } } - - - - - - /******************************************************************************* $Function: bookDeleteEntry @@ -1284,43 +1225,43 @@ /* Initialise the dialog control block with default information */ - dlg_initDisplayData_TextId( &Dialog, TxtSoftOK, TxtCancel, TxtPressOk, TxtDelete, COLOUR_STATUS); + dlg_initDisplayData_TextId( &Dialog, TxtSoftOK, TxtCancel, TxtPressOk, TxtDelete, COLOUR_STATUS); -// Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) -// Description: The confirmation for deleting entry from address book was a timed confirmation -// screen. -// Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' - dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDeleteEntryCB, FOREVER, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); +// Jun 23, 2004 REF: CRR MMI-SPR-21636 Rashmi C N(Sasken) +// Description: The confirmation for deleting entry from address book was a timed confirmation +// screen. +// Solution: Now the time is set to 'FOREVER' from 'TEN_SECS' + dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDeleteEntryCB, FOREVER, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); /* Show the dialog */ - info_dialog( Window, &Dialog ); + info_dialog( Window, &Dialog ); } /******************************************************************************* - $Function: bookActivateFDN + $Function: bookActivateFDN - $Description: information screen to tell user to activate FDN + $Description: information screen to tell user to activate FDN - $Returns: None + $Returns: None - $Arguments: None + $Arguments: None *******************************************************************************/ void bookActivateFDN( T_MFW_HND window ) { - tBookDialogData Dialog; + tBookDialogData Dialog; /* Initialise the dialog control block with default information - */ - dlg_initDisplayData_TextId( &Dialog, TxtNull, TxtNull, TxtPlease, TxtActivateFDN, COLOUR_STATUS); - dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)NULL, FOUR_SECS, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); + */ + dlg_initDisplayData_TextId( &Dialog, TxtNull, TxtNull, TxtPlease, TxtActivateFDN, COLOUR_STATUS); + dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)NULL, FOUR_SECS, KEY_CLEAR | KEY_LEFT | KEY_RIGHT ); - /* Show the dialog - */ - info_dialog( window, &Dialog ); + /* Show the dialog + */ + info_dialog( window, &Dialog ); } /* SPR#1428 - SH - New Editor: moved the following two functions @@ -1329,21 +1270,21 @@ /******************************************************************************* - $Function: bookInputStartNumberEditor + $Function: bookInputStartNumberEditor - $Description: Start the input handler using default properties + $Description: Start the input handler using default properties - $Returns: Handle of newly created window, or NULL if failure + $Returns: Handle of newly created window, or NULL if failure - $Arguments: parent, parent window handle, buffer, input buffer + $Arguments: parent, parent window handle, buffer, input buffer *******************************************************************************/ MfwHnd bookInputStartNumberEditor( MfwHnd parent, void *buffer ) { - T_AUI_EDITOR_DATA editor_data; + T_AUI_EDITOR_DATA editor_data; U16 editor_num_length = NUMBER_LENGTH;; - TRACE_FUNCTION ("bookInputStartNumberEditor()"); + TRACE_FUNCTION ("bookInputStartNumberEditor()"); // June 22, 2006 REF: DRT OMAPS00081761 x0012849 // Number length can be upto 41 when EXT1 is allocated and activated in SIM service table @@ -1395,145 +1336,143 @@ } TRACE_EVENT_P1 ("Number length = %d ",editor_num_length); - AUI_edit_SetDefault(&editor_data); - AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); - AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNumberCB); - // Change by Sasken ( Deepa M.d) on March 29th 2004 - // Issue Number : MMI-SPR-12722 - // Subject: Right softkey should be "Back" when the editor is empty - // Bug : Right softkey should be "Back" when the editor is empty - // Solution : Added alternative string for the right softkey tobe displayed when the editor is empty + AUI_edit_SetDefault(&editor_data); + AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); + AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNumberCB); + // Change by Sasken ( Deepa M.d) on March 29th 2004 + // Issue Number : MMI-SPR-12722 + // Subject: Right softkey should be "Back" when the editor is empty + // Bug : Right softkey should be "Back" when the editor is empty + // Solution : Added alternative string for the right softkey tobe displayed when the editor is empty - AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterNumber, NULL); - AUI_edit_SetAltTextStr(&editor_data, 0, NULL, TRUE, TxtSoftBack); + AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterNumber, NULL); + AUI_edit_SetAltTextStr(&editor_data, 0, NULL, TRUE, TxtSoftBack); // June 22, 2006 REF: DRT OMAPS00081761 x0012849 // Changed the limit frommm NUMBER_LENGTH to editor_num_length. - AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_num_length); - AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); + AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_num_length); + AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); - return AUI_edit_Start(parent, &editor_data); + return AUI_edit_Start(parent, &editor_data); } - /******************************************************************************* - $Function: bookInputStartNameEditor + $Function: bookInputStartNameEditor - $Description: Start the input handler using default properties + $Description: Start the input handler using default properties - $Returns: Handle of newly created window, or NULL if failure + $Returns: Handle of newly created window, or NULL if failure - $Arguments: parent, parent window handle, buffer, input buffer + $Arguments: parent, parent window handle, buffer, input buffer *******************************************************************************/ MfwHnd bookInputStartNameEditor( MfwHnd parent, void *buffer ) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) parent )->data; - tBookStandard *data = (tBookStandard *) win_data->user; - T_phbk *Phbk = data->phbk; - T_AUI_EDITOR_DATA editor_data; - U16 editor_length; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) parent )->data; + tBookStandard *data = (tBookStandard *) win_data->user; + T_phbk *Phbk = data->phbk; + T_AUI_EDITOR_DATA editor_data; + U16 editor_length; - TRACE_FUNCTION ("bookInputStartNameEditor()"); + TRACE_FUNCTION ("bookInputStartNameEditor()"); - /* xreddymn OMAPS00079431 May-29-2006 - * Restrict the number of characters that the user can input for name - * based on which phonebook is selected. - */ - if(bookGetBookSelected() == TRUE) - { - /* For ME phonebook use MAX_ALPHA_LEN */ - editor_length = MAX_ALPHA_LEN; - } - else - { - /* For SIM phonebook, restrict length to 14 */ - editor_length = 15; - } + /* xreddymn OMAPS00079431 May-29-2006 + * Restrict the number of characters that the user can input for name + * based on which phonebook is selected. + */ + if(bookGetBookSelected() == TRUE) + { + /* For ME phonebook use MAX_ALPHA_LEN */ + editor_length = MAX_ALPHA_LEN; + } + else + { + /* For SIM phonebook, restrict length to 14 */ + editor_length = 15; + } /* Set up the default parameters for the input window */ #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) - /*MC, the chinese editor MUST have a unicode string as input*/ - /*MC , SPR 1242 merged in from b-sample build*/ - if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) - { - T_CHINESE_DATA chinese_data; - chinese_data.TextString = (char*) Phbk->edt_buf_name; - if (chinese_data.TextString[0]== 0)//if, empty string - { - chinese_data.TextString[0] = (char)0x80;//give string Unicode tag /*a0393213 lint warnings removal-typecast done*/ - chinese_data.TextString[1] = 0x7F; - } - else - { - if (chinese_data.TextString[0]!= (char)0x80)/*If ASCII string*//*a0393213 lint warnings removal-typecast done*/ - { + /*MC, the chinese editor MUST have a unicode string as input*/ + /*MC , SPR 1242 merged in from b-sample build*/ + if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) + { + T_CHINESE_DATA chinese_data; + chinese_data.TextString = (char*) Phbk->edt_buf_name; + if (chinese_data.TextString[0]== 0)//if, empty string + { + chinese_data.TextString[0] = (char)0x80;//give string Unicode tag /*a0393213 lint warnings removal-typecast done*/ + chinese_data.TextString[1] = 0x7F; + } + else + { + if (chinese_data.TextString[0]!= (char)0x80)/*If ASCII string*//*a0393213 lint warnings removal-typecast done*/ + { - /*SPR 1752, if ASCII string, use a latin editor*/ - AUI_edit_SetDefault(&editor_data); - AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); - AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); - AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); - /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ - AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); - AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); + /*SPR 1752, if ASCII string, use a latin editor*/ + AUI_edit_SetDefault(&editor_data); + AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); + AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); + AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); + /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ + AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); + AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); - return AUI_edit_Start(parent, &editor_data); - } - } - /*MC end*/ - chinese_data.Callback = (T_AUI_EDIT_CB)bookAddNameCB; - chinese_data.Identifier = INPUT_LEFT ; - chinese_data.LeftSoftKey = TxtSave; - chinese_data.DestroyEditor = TRUE; - /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ - chinese_data.EditorSize = (USHORT)((editor_length-4)/2);//i.e.8 - return chinese_input(parent, &chinese_data); - } - else + return AUI_edit_Start(parent, &editor_data); + } + } + /*MC end*/ + chinese_data.Callback = (T_AUI_EDIT_CB)bookAddNameCB; + chinese_data.Identifier = INPUT_LEFT ; + chinese_data.LeftSoftKey = TxtSave; + chinese_data.DestroyEditor = TRUE; + /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ + chinese_data.EditorSize = (USHORT)((editor_length-4)/2);//i.e.8 + return chinese_input(parent, &chinese_data); + } + else #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ - { - AUI_edit_SetDefault(&editor_data); - AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); - AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); - AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); + { + AUI_edit_SetDefault(&editor_data); + AUI_edit_SetDisplay(&editor_data, NUMBER_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); + AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)bookAddNameCB); + AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtEnterName, NULL); /*SPR 1752*/ #ifdef NO_ASCIIZ - if (Phbk->edt_buf_name[0] ==0x80) - /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ - AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, &Phbk->edt_buf_name[2], editor_length/2 -2); - else + if (Phbk->edt_buf_name[0] ==0x80) + /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ + AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, &Phbk->edt_buf_name[2], editor_length/2 -2); + else #endif - /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ - AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); - AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); + /* xreddymn OMAPS00079431 May-29-2006: Length changes based on selected phonebook */ + AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)buffer, editor_length); + AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); - return AUI_edit_Start(parent, &editor_data); - } + return AUI_edit_Start(parent, &editor_data); + } } - /******************************************************************************* - $Function: bookInputDestroy + $Function: bookInputDestroy - $Description: Destroy Input Window + $Description: Destroy Input Window - $Returns: None + $Returns: None - $Arguments: Handle of window to be destroyed + $Arguments: Handle of window to be destroyed *******************************************************************************/ void bookInputDestroy( MfwHnd window ) { - TRACE_FUNCTION ("bookInputDestroy()"); - /*MC SPR 1752, send destroy event to window*/ - SEND_EVENT( window, E_ED_DESTROY, 0, 0 ); + TRACE_FUNCTION ("bookInputDestroy()"); + /*MC SPR 1752, send destroy event to window*/ + SEND_EVENT( window, E_ED_DESTROY, 0, 0 ); } @@ -1552,84 +1491,82 @@ void bookAddNameCB( T_MFW_HND win, USHORT Identifier, SHORT reason ) { - - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; tBookStandard *data = (tBookStandard *) win_data->user; T_phbk *Phbk = data->phbk; - TRACE_FUNCTION("bookAddNameCB"); + TRACE_FUNCTION("bookAddNameCB"); - switch (reason) + switch (reason) { - case INFO_KCD_LEFT: + case INFO_KCD_LEFT: { /* Construct a new entry to be written to the phone book */ - /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode - { //MC, if empty string, remove 0x80 at beginning - if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) - memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); - } + /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode + { //MC, if empty string, remove 0x80 at beginning + if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) + memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); + } - // xvilliva SPR21547 We check for presence of either phone number or name. - // We add or modify the entry and flash an alert correspondingly. - if(strlen((char *) Phbk->edt_buf_number)>0 || strlen((char *)Phbk->edt_buf_name)>0) - { + // xvilliva SPR21547 We check for presence of either phone number or name. + // We add or modify the entry and flash an alert correspondingly. + if(strlen((char *) Phbk->edt_buf_number)>0 || strlen((char *)Phbk->edt_buf_name)>0) + { /* Store in the current phone book */ if ( Phbk->UpdateAction == CREATE_ENTRY ) - storeInFile( Phbk ); + storeInFile( Phbk ); else if ( Phbk->UpdateAction == MODIFY_EXISTING ) - changeInFile( Phbk ); + changeInFile( Phbk ); bookShowInformation( win, MmiBookCurrentText(), NULL,NULL ); - /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ - mmi_int_phb_store_change_completion(); - /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ + /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ + mmi_int_phb_store_change_completion(); + /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ - } - else - bookShowInformation( win, TxtInvalidInput, NULL,NULL ); + } + else + bookShowInformation( win, TxtInvalidInput, NULL,NULL ); /* And shut down, clearing the number and name windows as we go */ if ( Phbk->input_number_win ) { - AUI_edit_Destroy(Phbk->input_number_win); - Phbk->input_number_win = 0; - } - /*SPR 1752, send destroy event rather than calling destroy function*/ - SEND_EVENT( Phbk->input_name_win, E_ED_DESTROY, 0, 0 ); - Phbk->input_name_win = 0; + AUI_edit_Destroy(Phbk->input_number_win); + Phbk->input_number_win = 0; + } + /*SPR 1752, send destroy event rather than calling destroy function*/ + SEND_EVENT( Phbk->input_name_win, E_ED_DESTROY, 0, 0 ); + Phbk->input_name_win = 0; - // Jan 22, 2006 REF: OMAPS00061930 x0039928 - // Fix : Start the phonebook timer in case of trying to modify the existing entry - if ( Phbk->UpdateAction == MODIFY_EXISTING ) - timStart(PhbSearchTim); + // Jan 22, 2006 REF: OMAPS00061930 x0039928 + // Fix : Start the phonebook timer in case of trying to modify the existing entry + if ( Phbk->UpdateAction == MODIFY_EXISTING ) + timStart(PhbSearchTim); - /*MC-- get rid of search window(and options menu), if just changed a chinese entry - (prevent showing scrambled entry)*/ - if ( Phbk->UpdateAction == MODIFY_EXISTING && Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) - { - bookMenuDestroy(Phbk->menu_options_win); - Phbk->menu_options_win=0; - bookSearchDestroy( Phbk->search_win); - Phbk->search_win=0; - } + /*MC-- get rid of search window(and options menu), if just changed a chinese entry + (prevent showing scrambled entry)*/ + if ( Phbk->UpdateAction == MODIFY_EXISTING && Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) + { + bookMenuDestroy(Phbk->menu_options_win); + Phbk->menu_options_win=0; + bookSearchDestroy( Phbk->search_win); + Phbk->search_win=0; + } } - break; + break; case INFO_KCD_RIGHT: - case INFO_KCD_HUP: + case INFO_KCD_HUP: /* Both right and HUP can do the same task here */ /*SPR 1752, send destroy event rather than calling destroy function*/ SEND_EVENT( Phbk->input_name_win, E_ED_DESTROY, 0, 0 ); Phbk->input_name_win = 0; - break; + break; default: { @@ -1657,28 +1594,28 @@ void bookAddNumberCB( T_MFW_HND win, USHORT Identifier, SHORT reason ) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + tBookStandard *data = (tBookStandard *) win_data->user; - switch ( reason ) + switch ( reason ) { case INFO_KCD_LEFT: - data->phbk->input_name_win = bookInputStartNameEditor( data->win, data->phbk->edt_buf_name ); - break; + data->phbk->input_name_win = bookInputStartNameEditor( data->win, data->phbk->edt_buf_name ); + break; - case INFO_KCD_RIGHT: - case INFO_KCD_HUP: + case INFO_KCD_RIGHT: + case INFO_KCD_HUP: /* Both right and HUP can do the same task here */ AUI_edit_Destroy( data->phbk->input_number_win ); data->phbk->input_number_win = 0; - break; + break; - default: + default: /* otherwise no action to be performed */ - break; - } + break; + } } @@ -1705,18 +1642,18 @@ TRACE_FUNCTION("bookAddNameCB"); switch (reason) { - case INPUT_LEFT: + case INPUT_LEFT: { /* Construct a new entry to be written to the phone book */ #ifdef NO_ASCIIZ /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode - { //MC, if empty string, remove 0x80 at beginning - if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) - memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); - } + if (Phbk->edt_buf_name[0] == 0x80 )//MC, if unicode + { //MC, if empty string, remove 0x80 at beginning + if (Phbk->edt_buf_name[2]==0x00 && Phbk->edt_buf_name[3] == 0x00) + memset(Phbk->edt_buf_name, 0, MAX_ALPHA_LEN); + } #endif /* Store in the current phone book @@ -1729,45 +1666,45 @@ bookShowInformation( win, MmiBookCurrentText(), NULL,NULL ); - /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ - mmi_int_phb_store_change_completion(); - /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ + /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ + mmi_int_phb_store_change_completion(); + /* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ /* And shut down, clearing the number and name windows as we go */ if ( Phbk->input_number_win ) { - SEND_EVENT( Phbk->input_number_win, INPUT_DESTROY, 0, 0 ); - Phbk->input_number_win = 0; - } + SEND_EVENT( Phbk->input_number_win, INPUT_DESTROY, 0, 0 ); + Phbk->input_number_win = 0; + } - SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); - Phbk->input_name_win = 0; + SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); + Phbk->input_name_win = 0; #ifdef NO_ASCIIZ /*MC-- get rid of search window(and options menu), if just changed a chinese entry (prevent showing scrambled entry)*/ - if ( Phbk->UpdateAction == MODIFY_EXISTING &&Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) - { bookMenuDestroy(Phbk->menu_options_win); - Phbk->menu_options_win=0; - bookSearchDestroy( Phbk->search_win); - Phbk->search_win=0; + if ( Phbk->UpdateAction == MODIFY_EXISTING &&Mmi_getCurrentLanguage()==CHINESE_LANGUAGE) + { bookMenuDestroy(Phbk->menu_options_win); + Phbk->menu_options_win=0; + bookSearchDestroy( Phbk->search_win); + Phbk->search_win=0; - } + } #endif } - break; + break; case INPUT_RIGHT: - case INPUT_CLEAR: + case INPUT_CLEAR: { /* Both right and clear can do the same task here */ - SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); + SEND_EVENT( Phbk->input_name_win, INPUT_DESTROY, 0, 0 ); Phbk->input_name_win = 0; } break; @@ -1835,8 +1772,8 @@ void fdn_menu_cb(T_MFW_HND parent_win, UBYTE identifier, UBYTE reason) { - TRACE_EVENT("fdn_menu_cb"); - menuFDN=0; + TRACE_EVENT("fdn_menu_cb"); + menuFDN=0; } // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) @@ -1844,25 +1781,23 @@ int bookFDNMenu(MfwMnu* menu, MfwMnuItem* item) { - T_MFW_HND win = mfw_parent(mfw_header()); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; - - + T_MFW_HND win = mfw_parent(mfw_header()); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - menuFDN=1; - // Sep 29, 2004 REF: CRR 25041 xvilliva - // The bookMenuStart() is called with the window data->phbk->win, - // similar to the function bookFDNMenu() to avoid crash. The menu window - // thus created is stored, which will be deleted while phonebook menu is - // destroyed. - data->phbk->menu_call_options_win_2 = bookMenuStart( data->phbk->win, bookNameMenuFDNAttributes(),0); - SEND_EVENT(data->phbk->menu_call_options_win_2, ADD_CALLBACK, NULL, (void *)fdn_menu_cb); + menuFDN=1; + // Sep 29, 2004 REF: CRR 25041 xvilliva + // The bookMenuStart() is called with the window data->phbk->win, + // similar to the function bookFDNMenu() to avoid crash. The menu window + // thus created is stored, which will be deleted while phonebook menu is + // destroyed. + data->phbk->menu_call_options_win_2 = bookMenuStart( data->phbk->win, bookNameMenuFDNAttributes(),0); + SEND_EVENT(data->phbk->menu_call_options_win_2, ADD_CALLBACK, NULL, (void *)fdn_menu_cb); return 0; /* to remove warning Aug - 11 */ } -// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN +// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN // Description: Current state of FDN not highlighted // Fix: Instead of showing the submenu directly we call this function // where we set the menu and also higlight the previously selected menu item @@ -1870,22 +1805,20 @@ extern MfwMnuAttr *FDNMenu(void); void settingsFocusFDNCurSel(void) { - UBYTE CurSel; //, state; // RAVI - - + UBYTE CurSel; //, state; // RAVI - T_MFW_HND win = mfw_parent(mfw_header()); - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - tBookStandard *data = (tBookStandard *) win_data->user; + T_MFW_HND win = mfw_parent(mfw_header()); + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + tBookStandard *data = (tBookStandard *) win_data->user; - // Sep 29, 2004 REF: CRR 25041 xvilliva - // The bookMenuStart() is called with the window data->phbk->win, - // similar to the function bookFDNMenu() to avoid crash. The menu window - // thus created is stored, which will be deleted while phonebook menu is - // destroyed. - data->phbk->menu_options_win_2= bookMenuStart(data->phbk->win, FDNMenu(), 0); - CurSel = (phb_get_mode() == PHB_RESTRICTED)?FIRSTMENUITEM:SECONDMENUITEM; - SEND_EVENT(data->phbk->menu_options_win_2, DEFAULT_OPTION, NULL, &CurSel); + // Sep 29, 2004 REF: CRR 25041 xvilliva + // The bookMenuStart() is called with the window data->phbk->win, + // similar to the function bookFDNMenu() to avoid crash. The menu window + // thus created is stored, which will be deleted while phonebook menu is + // destroyed. + data->phbk->menu_options_win_2= bookMenuStart(data->phbk->win, FDNMenu(), 0); + CurSel = (phb_get_mode() == PHB_RESTRICTED)?FIRSTMENUITEM:SECONDMENUITEM; + SEND_EVENT(data->phbk->menu_options_win_2, DEFAULT_OPTION, NULL, &CurSel); } // June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 @@ -1893,28 +1826,26 @@ // Added this function to check if FDN is allocated void checkFDNSupport(void) { - T_MFW_HND win = mfw_parent(mfw_header()); - + T_MFW_HND win = mfw_parent(mfw_header()); - - UBYTE serv_stat; - T_DISPLAY_DATA display_info; + UBYTE serv_stat; + T_DISPLAY_DATA display_info; - // Check in SIM service table if FDN is allocated. If not allocated, display this info dialog - /* x0045876, 14-Aug-2006 (WR - "serv_stat" was set but never used) */ - serv_stat = sim_serv_table_check(SRV_FDN); - /*if ((serv_stat = sim_serv_table_check(SRV_FDN)) EQ NO_ALLOCATED)*/ - if (serv_stat EQ NO_ALLOCATED) - { - dlg_initDisplayData_TextId(&display_info, TxtSoftOK, NULL, TxtNotSupported, TxtNull, COLOUR_STATUS); - dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_LEFT | KEY_RIGHT); - info_dialog (win, &display_info); - } - else // Else show the FDN menu and set focus on current selection - settingsFocusFDNCurSel(); + // Check in SIM service table if FDN is allocated. If not allocated, display this info dialog + /* x0045876, 14-Aug-2006 (WR - "serv_stat" was set but never used) */ + serv_stat = sim_serv_table_check(SRV_FDN); + /*if ((serv_stat = sim_serv_table_check(SRV_FDN)) EQ NO_ALLOCATED)*/ + if (serv_stat EQ NO_ALLOCATED) + { + dlg_initDisplayData_TextId(&display_info, TxtSoftOK, NULL, TxtNotSupported, TxtNull, COLOUR_STATUS); + dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_LEFT | KEY_RIGHT); + info_dialog (win, &display_info); + } + else // Else show the FDN menu and set focus on current selection + settingsFocusFDNCurSel(); } -/* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ +/* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- Start */ /******************************************************************************* @@ -1922,29 +1853,28 @@ $Description: Reset all flags on adding / editing an Internal PHB Entry - $Returns: None + $Returns: None $Arguments: None *******************************************************************************/ static void mmi_int_phb_store_change_completion() { - /* Reset the "add" and "change" flags only incase of Internal PHB */ - if ( bookGetBookSelected() == TRUE ) - { - addname_flag = FALSE; + /* Reset the "add" and "change" flags only incase of Internal PHB */ + if ( bookGetBookSelected() == TRUE ) + { + addname_flag = FALSE; - changename_flag = FALSE; - } + changename_flag = FALSE; + } - return; + return; } -/* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ +/* Sep 20, 2006 REF: OMAPS00145786 x0080701 (Bharat) -- End */ /******************************************************************************* End of File *******************************************************************************/ -
--- a/src/ui/bmi/mmiBookShared.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookShared.c Sat Nov 14 08:43:59 2020 +0000 @@ -11,12 +11,12 @@ $Project name: Basic MMI $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookShared.c - $Revision: 1.0 - - $Author: Condat(UK) - $Date: 25/10/00 + $Module: PhoneBook + $File: MmiBookShared.c + $Revision: 1.0 + + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -30,110 +30,110 @@ $History: MmiBookShared.c - Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) - Description: Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH) - is added as part of SBuild 2.3.0 Migration + Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) + Description: Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH) + is added as part of SBuild 2.3.0 Migration April 03 2007 ER:OMAPS00116772 x0061088(Prachi) Description:Support of 1.3 Mpixel camera on Locosto Plus Solution: Auto Save option is added for the Camera Application - Apr 03, 2007 ER: OMAPS00122561 x0pleela - Description: [ACI] Phone lock feature has to be supported by ACI - Solution: Phone Lock ER implementation - - Mar 28, 2007 ER: OMAPS00106188 x0039928 - Description: Align Midi application menu choices and audio Player menu choices - - Nov 10, 2006 DRT: OMAPS000103354 x0039928 - Description: Delete all failure in LDN Phonebook - Solution: Delete all for Recent list is mapped to bookDeleteRec instead of bookDeleteAll. - - Sep 26, 2006 DR: OMAPS00095524 x0pleela - Description:Implement 2 missing SIM Lock types - Solution: Added new category "Blocked Network" as menu item in menuCategory and menuBootupCatList + Apr 03, 2007 ER: OMAPS00122561 x0pleela + Description: [ACI] Phone lock feature has to be supported by ACI + Solution: Phone Lock ER implementation + + Mar 28, 2007 ER: OMAPS00106188 x0039928 + Description: Align Midi application menu choices and audio Player menu choices + + Nov 10, 2006 DRT: OMAPS000103354 x0039928 + Description: Delete all failure in LDN Phonebook + Solution: Delete all for Recent list is mapped to bookDeleteRec instead of bookDeleteAll. + + Sep 26, 2006 DR: OMAPS00095524 x0pleela + Description:Implement 2 missing SIM Lock types + Solution: Added new category "Blocked Network" as menu item in menuCategory and menuBootupCatList Oct 8 2006 OMAPS00097714 x0039928(sumanth) TTY HCO/VCO options in MMI - xashmic 27 Sep 2006, OMAPS00096389 - ENH - a) Providing static menu for re-selection of enum options for enumeration - b) Popup menu displayed on connect event, can be enabled or disabled via menu option - - Sep 11, 2006 DR: OMAPS00094182 xrashmic - Description: midi and mp3 files is not being populated on accessing corresponding menu, but only during bootup - Solution: Populate files on accessing the "browse files" list - xrashmic 9 Sep 2006, OMAPS00092732 - USBMS ER: Added menu in phone setting to set or unset PS shutdown while enumeration of USB MS - On USB connect event, a list of possible ports that can be enumerated would be displayed. - - Aug 18, 2006 ER: OMAPS00089840 x0039928 - Description: Changes to be made in MMI for the functionality "Delete all" ADN entries - Solution: A new menu item "Delete All" is added in the phone book menu. - - Mar 15, 2006 ER: OMAPS00067709 x0pleela - Description: Voice Buffering implementation on C+ for PTT via PCM API - Solution: Defined new sub menu items for PCM voice memo and Voice buffering - Added newly created sub menu items as menu items into "Application" menu - - Feb 24, 2006 ER: OMAPS00067709 x0pleela - Description: Voice Buffering implementation on C+ for PTT via PCM API - Solution: Added new menu items for PCM voice memo and Voice buffering - Added PCM Voice memo and Voice buffering menu items into "Application" menu - Defined functions GetPcmVoiceMemoMenu, GetVoiceBufferingMenu to populate the - PCM Voice memo and Voice buffering menus - - Jun 19, 2006 DR: OMAPS00070657 xdeepadh - Description: MMI allows to MP3 and MIDI play during an active call - Solution: From the active call screen, only selected applications can be accessed now. - - July 21, 2006 ER: OMAPS00087586, OMAPS00087587 x0pleela - Description: OMAPS00087586: MasterKey funtion in TCS3.2 SW - OMAPS00087587: Time Penaly feature extend handset security - Solution:Made the following changes - 1) Included the header file "MmiPins.h" - 2) Added new menu item "Master unlock" for menu menuMEPersonalization - 3) Defined new menu "menuBootupCatList" to display during bootup for unlocking categories or unblocking ME - 4) New function SIMPCategoryListAttributes(): function to call the new menu "menuBootupCatList" from any file - - May 30, 2006 DR: OMAPS00070657 x0pleela - Description: CPHS feature on Locosto-Lite - Solution: For ALS feature, - a) Defined a new menu item for the user to customize the strings (line1 and line2) - - Apr 24, 2006 ERT: OMAPS00067603 x0043642 - Description: Engineering mode - Solution: Added new engineering mode menus to call respective functions. - - Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth) - Description: Need to reduce flash foot-print for Locosto Lite - Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile - out voice memo feature if the above flag is enabled. - - Nov 14, 2005 REF: OMAPS00044445 xdeepadh - Description: Implementation of Test Menu for AAC - Solution: The existing MP3 test Application has been enhanced to support the AAC file testing. - - Sep 27,2005 REF: SPR 34402 xdeepadh - Bug:Mono option is always highlighted even when Stereo is selected - Fix:The channel setting will be saved in the FFS, which will be retrieved later - and the selected channel will be higlighted. - - Jul 18, 2005 REF: SPR 31695 xdeepadh - Bug:Problems with MP3 test application - Fix:The window handling of MP3 Test Application has been done properly. - - - Aug 22, 2005 REF: ENH 31154 xdeepadh - Description: Application to Test Camera - Solution: Implemeted the Fileviewer to view the jpeg images.Camera Application to - preview,capture and save image has been implemented. - - July 19, 2005 REF: CRR LOCOSTO-ENH-28173 xpradipg - Description: To provide MMI Support to enable/disable/change password and - query all the Personalization locks - Solution: Integration of the changes for the same provided by the soldel - team + xashmic 27 Sep 2006, OMAPS00096389 + ENH - a) Providing static menu for re-selection of enum options for enumeration + b) Popup menu displayed on connect event, can be enabled or disabled via menu option + + Sep 11, 2006 DR: OMAPS00094182 xrashmic + Description: midi and mp3 files is not being populated on accessing corresponding menu, but only during bootup + Solution: Populate files on accessing the "browse files" list + xrashmic 9 Sep 2006, OMAPS00092732 + USBMS ER: Added menu in phone setting to set or unset PS shutdown while enumeration of USB MS + On USB connect event, a list of possible ports that can be enumerated would be displayed. + + Aug 18, 2006 ER: OMAPS00089840 x0039928 + Description: Changes to be made in MMI for the functionality "Delete all" ADN entries + Solution: A new menu item "Delete All" is added in the phone book menu. + + Mar 15, 2006 ER: OMAPS00067709 x0pleela + Description: Voice Buffering implementation on C+ for PTT via PCM API + Solution: Defined new sub menu items for PCM voice memo and Voice buffering + Added newly created sub menu items as menu items into "Application" menu + + Feb 24, 2006 ER: OMAPS00067709 x0pleela + Description: Voice Buffering implementation on C+ for PTT via PCM API + Solution: Added new menu items for PCM voice memo and Voice buffering + Added PCM Voice memo and Voice buffering menu items into "Application" menu + Defined functions GetPcmVoiceMemoMenu, GetVoiceBufferingMenu to populate the + PCM Voice memo and Voice buffering menus + + Jun 19, 2006 DR: OMAPS00070657 xdeepadh + Description: MMI allows to MP3 and MIDI play during an active call + Solution: From the active call screen, only selected applications can be accessed now. + + July 21, 2006 ER: OMAPS00087586, OMAPS00087587 x0pleela + Description: OMAPS00087586: MasterKey funtion in TCS3.2 SW + OMAPS00087587: Time Penaly feature extend handset security + Solution:Made the following changes + 1) Included the header file "MmiPins.h" + 2) Added new menu item "Master unlock" for menu menuMEPersonalization + 3) Defined new menu "menuBootupCatList" to display during bootup for unlocking categories or unblocking ME + 4) New function SIMPCategoryListAttributes(): function to call the new menu "menuBootupCatList" from any file + + May 30, 2006 DR: OMAPS00070657 x0pleela + Description: CPHS feature on Locosto-Lite + Solution: For ALS feature, + a) Defined a new menu item for the user to customize the strings (line1 and line2) + + Apr 24, 2006 ERT: OMAPS00067603 x0043642 + Description: Engineering mode + Solution: Added new engineering mode menus to call respective functions. + + Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth) + Description: Need to reduce flash foot-print for Locosto Lite + Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile + out voice memo feature if the above flag is enabled. + + Nov 14, 2005 REF: OMAPS00044445 xdeepadh + Description: Implementation of Test Menu for AAC + Solution: The existing MP3 test Application has been enhanced to support the AAC file testing. + + Sep 27,2005 REF: SPR 34402 xdeepadh + Bug:Mono option is always highlighted even when Stereo is selected + Fix:The channel setting will be saved in the FFS, which will be retrieved later + and the selected channel will be higlighted. + + Jul 18, 2005 REF: SPR 31695 xdeepadh + Bug:Problems with MP3 test application + Fix:The window handling of MP3 Test Application has been done properly. + + + Aug 22, 2005 REF: ENH 31154 xdeepadh + Description: Application to Test Camera + Solution: Implemeted the Fileviewer to view the jpeg images.Camera Application to + preview,capture and save image has been implemented. + + July 19, 2005 REF: CRR LOCOSTO-ENH-28173 xpradipg + Description: To provide MMI Support to enable/disable/change password and + query all the Personalization locks + Solution: Integration of the changes for the same provided by the soldel + team June 07, 2005 REF: CRR MMI-FIX-31545 x0021334 Issue description: SIM: wrong behavior when FDN is not allocated in SST @@ -146,7 +146,7 @@ Description: SMS Status Request in idle and dedicated mode (using Menu) setting does not work Solution: status of sms status request is read and focus is set accrodingly. - Apr 06, 2005 REF: ENH 30011 xdeepadh + Apr 06, 2005 REF: ENH 30011 xdeepadh Description: Replacing the Test Application compilation flags with new flags. Solution: The existing flags for Camera and MP3 test application have beeen replaced with the new compilation flags,FF_MMI_TEST_CAMERA and FF_MMI_TEST_MP3 respectively. @@ -162,11 +162,11 @@ xreddymn Jan-06-2004 MMI-SPR-27618: Display list of WAP push messages before displaying the Options list. - Dec 08, 2004 REF: CRR MMI-SPR-27284 + Dec 08, 2004 REF: CRR MMI-SPR-27284 Description: MIDI Player: Back Key malfunctions in MIDI application. Solution: A window is created to hold list window. When the user presses Back key, the newly - created window is deleted along with list window, bringing the control back to Midi options - screen. + created window is deleted along with list window, bringing the control back to Midi options + screen. Nov 29, 2004 REF: CRR 25051 xkundadu Description: INCALL SCREEN ?ADJUSTING THE VOLUME @@ -180,24 +180,24 @@ Description: The sent EMS is stored in unsent folder. Solution: The Outbox has been removed, instead we now have Sent folder for the sent EMS - Jul 29, 2004 REF: CRR 20898 xkundadu - Description: No identification for user whether 'Auto-Answer' is On/Off - Solution: The menu focus will be on the 'On' menu if the 'Auto-Answer' - is enabled, otherwise focus will be on 'Off' menu item. - Changed 'submenu' to 'menuItem' to call a function,which set the - focus to the selected item. + Jul 29, 2004 REF: CRR 20898 xkundadu + Description: No identification for user whether 'Auto-Answer' is On/Off + Solution: The menu focus will be on the 'On' menu if the 'Auto-Answer' + is enabled, otherwise focus will be on 'Off' menu item. + Changed 'submenu' to 'menuItem' to call a function,which set the + focus to the selected item. Jun 02, 2004 CRR:13649 - xpradipg-SASKEN subject: CBA : Management of password solution: password is promted on selecting activation/deactivation option as against the previous case where it was shown up on selecting Call May 27, 2004 REF: CRR 19186 Deepa M.D - Bug : "Setting" menu not available during a call - Fix : "Setting" menu has been provided to set the SMS settings, during the active call + Bug : "Setting" menu not available during a call + Fix : "Setting" menu has been provided to set the SMS settings, during the active call May 10, 2004 REF: CRR 15753 Deepa M.D Menuitem provided to set the validity period to maximum. - Issue Number : SPR#12822 on 31/03/04 by v vadiraj - 25/10/00 Original Condat(UK) BMI version. + Issue Number : SPR#12822 on 31/03/04 by v vadiraj + 25/10/00 Original Condat(UK) BMI version. Mar 28, 2006 REF:ER OMAPS00071798 x0043642 @@ -272,7 +272,7 @@ #ifdef FF_MMI_TEST_MIDI #include "mfw_midi.h" #endif //FF_MMI_TEST_MIDI -// Apr 06, 2005 REF: ENH 30011 xdeepadh +// Apr 06, 2005 REF: ENH 30011 xdeepadh #ifdef FF_MMI_TEST_CAMERA #include "mfw_cam.h" #endif //FF_MMI_TEST_CAMERA @@ -281,10 +281,10 @@ #include "mfw_camapp.h" #endif //FF_MMI_TEST_CAMERA -#if 0 /* FreeCalypso */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +#if 0 /* FreeCalypso */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ #include "mfw_fm.h" -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ #endif #include "dspl.h" @@ -362,14 +362,14 @@ #ifdef FF_MMI_TEST_MIDI #include "MmiMidiTest.h" #endif//#ifdef FF_MMI_TEST_MIDI -//Apr 06, 2005 REF: ENH 30011 xdeepadh +//Apr 06, 2005 REF: ENH 30011 xdeepadh #ifdef FF_MMI_TEST_CAMERA #include "MmiCameraTest.h" #endif //FF_MMI_TEST_CAMERA #ifdef FF_MMI_CAMERA_APP #include "MmiCameraApp.h" #endif //FF_MMI_TEST_CAMERA -// Nov 14, 2005 REF: OMAPS00044445 xdeepadh +// Nov 14, 2005 REF: OMAPS00044445 xdeepadh #if defined(FF_MMI_TEST_MP3) || defined(FF_MMI_TEST_AAC) #include "MmiMP3Test.h" #endif//FF_MMI_TEST_MP3 @@ -432,7 +432,6 @@ #endif - extern void soundsSetVolume(void); extern int SmsSend_R_OPTExeCentreEdit(MfwMnu* m, MfwMnuItem* i); @@ -449,7 +448,6 @@ /*GW Changed all submenus to use the same colour definitions 'COLOUR_LIST_SUBMENU' */ - /* menu buffers */ @@ -478,17 +476,17 @@ EXTERN UBYTE testSelected; #endif -extern MfwIcnAttr mainIconFrame1 ; - - -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +extern MfwIcnAttr mainIconFrame1 ; + + +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ static USHORT mmi_check_tflash( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ); static USHORT mmi_check_nand( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ); static USHORT mmi_check_nor( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ); static USHORT mmi_check_norms( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ); -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ /****************************************************************************** @@ -497,9 +495,9 @@ *******************************************************************************/ -#define DEF_MENU_STYLE (MNU_LEFT | MNU_LIST | MNU_CUR_LINE) -#define DEF_COLOUR_MENU_STYLE (MNU_LEFT | MNU_LIST_COLOUR | MNU_CUR_LINE) -#define DEF_MENU_ICON_LIST_STYLE (MNU_LEFT | MNU_LIST_ICONS | MNU_CUR_LINE) +#define DEF_MENU_STYLE (MNU_LEFT | MNU_LIST | MNU_CUR_LINE) +#define DEF_COLOUR_MENU_STYLE (MNU_LEFT | MNU_LIST_COLOUR | MNU_CUR_LINE) +#define DEF_MENU_ICON_LIST_STYLE (MNU_LEFT | MNU_LIST_ICONS | MNU_CUR_LINE) #define BEGIN_MENU( name ) \ static const MfwMnuItem name##Items [] = { @@ -587,22 +585,22 @@ #ifdef MMI_TTY_ENABLED /* SPR#1352 - SH - TTY menu */ BEGIN_MENU( menuTTY ) - MENU_ITEM( TxtOff, call_tty_menuselect, item_flag_none), - MENU_ITEM( TxtAlwaysOn, call_tty_menuselect, item_flag_none), - MENU_ITEM( TxtOnNextCall, call_tty_menuselect, item_flag_none) + MENU_ITEM( TxtOff, call_tty_menuselect, item_flag_none), + MENU_ITEM( TxtAlwaysOn, call_tty_menuselect, item_flag_none), + MENU_ITEM( TxtOnNextCall, call_tty_menuselect, item_flag_none) END_MENU( menuTTY, menuListArea, COLOUR_LIST_SUBMENU1 ) /*x0039928 OMAPS00097714 HCO/VCO option - menu items added*/ #ifdef FF_TTY_HCO_VCO BEGIN_MENU( menucoTTYAlways ) - MENU_ITEM( TxtTTYAll, call_tty_co_menuselect_always, item_flag_none), - MENU_ITEM( TxtTTYVco, call_tty_co_menuselect_always, item_flag_none), - MENU_ITEM( TxtTTYHco, call_tty_co_menuselect_always, item_flag_none) + MENU_ITEM( TxtTTYAll, call_tty_co_menuselect_always, item_flag_none), + MENU_ITEM( TxtTTYVco, call_tty_co_menuselect_always, item_flag_none), + MENU_ITEM( TxtTTYHco, call_tty_co_menuselect_always, item_flag_none) END_MENU( menucoTTYAlways, menuListArea, COLOUR_LIST_SUBMENU1 ) BEGIN_MENU( menucoTTYNextCall ) - MENU_ITEM( TxtTTYAll, call_tty_co_menuselect_nextcall, item_flag_none), - MENU_ITEM( TxtTTYVco, call_tty_co_menuselect_nextcall, item_flag_none), - MENU_ITEM( TxtTTYHco, call_tty_co_menuselect_nextcall, item_flag_none) + MENU_ITEM( TxtTTYAll, call_tty_co_menuselect_nextcall, item_flag_none), + MENU_ITEM( TxtTTYVco, call_tty_co_menuselect_nextcall, item_flag_none), + MENU_ITEM( TxtTTYHco, call_tty_co_menuselect_nextcall, item_flag_none) END_MENU( menucoTTYNextCall, menuListArea, COLOUR_LIST_SUBMENU1 ) #endif #endif @@ -613,7 +611,7 @@ BEGIN_MENU( menuEngMode ) #ifndef NEPTUNE_BOARD MENU_ITEM( TxtMobileInfo, Mmi_em_display_mobile_info_data, item_flag_none ), - MENU_ITEM( TxtServingCell, Mmi_em_display_serving_cell_params, item_flag_none ), + MENU_ITEM( TxtServingCell, Mmi_em_display_serving_cell_params, item_flag_none ), MENU_ITEM( TxtNeighbourCell, Mmi_em_display_neighbour_cell_params, item_flag_none ), MENU_ITEM( TxtLocation, Mmi_em_display_location_params, item_flag_none ), MENU_ITEM( TxtCiphHopDTX, Mmi_em_display_ciph_hop_DTX_params, item_flag_none ), @@ -646,18 +644,18 @@ #ifdef INT_PHONEBOOK BEGIN_MENU( menuSelectBook ) - MENU_ITEM( TxtSIM, bookSelectBookSIM, item_flag_none ), + MENU_ITEM( TxtSIM, bookSelectBookSIM, item_flag_none ), MENU_ITEM( TxtPhone, bookSelectBookPhone, item_flag_none ), END_MENU( menuSelectBook, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuCopy ) - MENU_ITEM( TxtThisEntry, bookCopyEntry, item_flag_none ), - MENU_ITEM( TxtAll, bookCopyAll, item_flag_none ), + MENU_ITEM( TxtThisEntry, bookCopyEntry, item_flag_none ), + MENU_ITEM( TxtAll, bookCopyAll, item_flag_none ), END_MENU( menuCopy, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuMove ) - MENU_ITEM( TxtThisEntry, bookMoveEntry, item_flag_none ), - MENU_ITEM( TxtAll, bookMoveAll, item_flag_none ), + MENU_ITEM( TxtThisEntry, bookMoveEntry, item_flag_none ), + MENU_ITEM( TxtAll, bookMoveAll, item_flag_none ), END_MENU( menuMove, menuListArea, COLOUR_LIST_SUBMENU ) #endif @@ -805,7 +803,7 @@ MENU_ITEM( TxtSaveHistory, AUI_savehist, item_flag_none ), MENU_ITEM( TxtScaleImages, AUI_scaleimages, item_flag_none ), #if defined (FF_WAP) && defined (FF_GPF_TCPIP) - MENU_ITEM( TxtShowMessages, AUI_wap_push_showmessages, item_flag_none )/*added by ellen*/ + MENU_ITEM( TxtShowMessages, AUI_wap_push_showmessages, item_flag_none )/*added by ellen*/ #endif END_MENU( menuWAPSettings, menuListArea, COLOUR_LIST_SUBMENU ) @@ -857,7 +855,7 @@ BEGIN_MENU( menuBookmarks ) MENU_ITEM( TxtList, AUI_bookmarks_list, item_flag_none ), - MENU_ITEM( TxtNewBookmark, AUI_bookmarks_add, item_flag_none ) /* SPR#1983 - SH */ + MENU_ITEM( TxtNewBookmark, AUI_bookmarks_add, item_flag_none ) /* SPR#1983 - SH */ END_MENU( menuBookmarks, menuListArea, COLOUR_LIST_SUBMENU ) /* WAP Menu @@ -897,8 +895,8 @@ MENU_ITEM( Txt1Hour, SmsValidityPeriod, item_flag_none ), MENU_ITEM( Txt12Hours, SmsValidityPeriod, item_flag_none ), MENU_ITEM( Txt24Hours, SmsValidityPeriod, item_flag_none ), - MENU_ITEM( Txt1Week, SmsValidityPeriod, item_flag_none ), - MENU_ITEM( TxtMaxTime, SmsValidityPeriod, item_flag_none ), // May 10, 2004 REF: CRR 15753 Deepa M.D .Menuitem to set the validity period to Maximum. + MENU_ITEM( Txt1Week, SmsValidityPeriod, item_flag_none ), + MENU_ITEM( TxtMaxTime, SmsValidityPeriod, item_flag_none ), // May 10, 2004 REF: CRR 15753 Deepa M.D .Menuitem to set the validity period to Maximum. END_MENU( menuSetSmsValidityPeriod, menuListArea, COLOUR_LIST_SUBMENU ) //Aug 22, 2005 REF: ENH 31154 xdeepadh @@ -926,7 +924,7 @@ MENU_ITEM( TxtHigh, mmi_camera_set_quality, item_flag_none ), END_MENU( menuSetQuality, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ BEGIN_MENU( menuStorage ) MENU_ITEM( TxtFFS, mmi_camera_set_storage, mmi_check_nor ), @@ -935,7 +933,7 @@ MENU_ITEM( TxtTflash, mmi_camera_set_storage, mmi_check_tflash ), END_MENU( menuStorage, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ /* April 03 2007 ER:OMAPS00116772 x0061088(Prachi)*/ @@ -977,15 +975,15 @@ SUB_MENU( TxtQuality, menuSetQuality, item_flag_none ), SUB_MENU( TxtFrame, menuFrameMenu , item_flag_none ), SUB_MENU( TxtRotate, menuSetRotate, item_flag_none ), - SUB_MENU( TxtShootingMode, menuSetBurstmode, item_flag_none), - SUB_MENU( TxtStorageDevice, menuStorage, item_flag_none), + SUB_MENU( TxtShootingMode, menuSetBurstmode, item_flag_none), + SUB_MENU( TxtStorageDevice, menuStorage, item_flag_none), /* April 03 2007 ER:OMAPS00116772 x0061088(Prachi)*/ - SUB_MENU( TxtAutoSave, menuAutoSave, item_flag_none), + SUB_MENU( TxtAutoSave, menuAutoSave, item_flag_none), //added by prachi add flag here #if CAM_SENSOR == 1 - SUB_MENU( TxtCamMenuResolution, menuResolution, item_flag_none), + SUB_MENU( TxtCamMenuResolution, menuResolution, item_flag_none), #endif - MENU_ITEM( TxtFilename, mmi_camera_edit_filename, item_flag_none), + MENU_ITEM( TxtFilename, mmi_camera_edit_filename, item_flag_none), END_MENU( menuSetCameraparams, menuListArea, COLOUR_LIST_SUBMENU ) @@ -995,9 +993,9 @@ //1227 - 01/10/02 - API - Sub Menu for the Concatenate Switch menu option //Sub Menu of Concatenate Switch BEGIN_MENU( menuConcatenate ) - MENU_ITEM( TxtActivate, Concatenate_Activate, item_flag_none), - MENU_ITEM( TxtDeactivate, Concatenate_DeActivate, item_flag_none), - MENU_ITEM( TxtStatus, Concatenate_Status, item_flag_none) + MENU_ITEM( TxtActivate, Concatenate_Activate, item_flag_none), + MENU_ITEM( TxtDeactivate, Concatenate_DeActivate, item_flag_none), + MENU_ITEM( TxtStatus, Concatenate_Status, item_flag_none) END_MENU( menuConcatenate, menuListArea, COLOUR_LIST_SUBMENU ) #endif /*TI_PS_FF_CONC_SMS*/ @@ -1025,7 +1023,7 @@ MENU_ITEM( TxtServiceCentre, SmsSend_R_OPTExeCentreEdit, item_flag_none ), SUB_MENU( TxtValidity, menuSetSmsValidityPeriod, item_flag_none ), #ifdef TI_PS_FF_CONC_SMS - SUB_MENU( TxtConcat, menuConcatenate, ConcatenateDisplay), + SUB_MENU( TxtConcat, menuConcatenate, ConcatenateDisplay), #endif /*TI_PS_FF_CONC_SMS*/ // May04, 2005 REF: CRR 30285 x0021334 @@ -1039,7 +1037,7 @@ SUB_MENU( TxtValidity, menuSetSmsValidityPeriod, item_flag_none ), SUB_MENU( TxtEasyText, menuEasyText, item_flag_none), #ifdef TI_PS_FF_CONC_SMS - SUB_MENU( TxtConcat, menuConcatenate, ConcatenateDisplay), + SUB_MENU( TxtConcat, menuConcatenate, ConcatenateDisplay), #endif /*TI_PS_FF_CONC_SMS*/ // May04, 2005 REF: CRR 30285 x0021334 // Changed SUB_MENU to MENU_ITEM to call function settingsStatusRequestCurSel() @@ -1061,13 +1059,13 @@ END_MENU( menuRotateActivate, menuListArea, COLOUR_LIST_SUBMENU1 ) BEGIN_MENU( menuFileViewer ) - MENU_ITEM( TxtView , mmi_fv_view_image_start, item_flag_none ), - MENU_ITEM( TxtRename, mmi_fv_reame_edit, item_flag_none ), - MENU_ITEM( TxtDelete, mmi_fv_delete_start, item_flag_none), + MENU_ITEM( TxtView , mmi_fv_view_image_start, item_flag_none ), + MENU_ITEM( TxtRename, mmi_fv_reame_edit, item_flag_none ), + MENU_ITEM( TxtDelete, mmi_fv_delete_start, item_flag_none), END_MENU( menuFileViewer, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuViewOptions ) - SUB_MENU( TxtRotate, menuRotateActivate, item_flag_none ), + SUB_MENU( TxtRotate, menuRotateActivate, item_flag_none ), END_MENU( menuViewOptions, menuListArea, COLOUR_LIST_SUBMENU ) #endif @@ -1167,7 +1165,7 @@ #else MENU_ITEM( TxtWrite, M_exeSendNew, item_flag_none ), #endif - /*MC end*/ + /*MC end*/ /* API - 03/09/03 - SPR2383 - END*/ MENU_ITEM( TxtDeleteAll, M_exeDelAll, item_flag_none ), SUB_MENU ( TxtSettings, menuSetMsg, item_flag_none ), @@ -1193,7 +1191,7 @@ #else MENU_ITEM( TxtWrite, M_exeSendNew, item_flag_none ), #endif - /*MC end*/ + /*MC end*/ /* API - 03/09/03 - SPR2383 - END*/ MENU_ITEM( TxtDeleteAll, M_exeDelAll, item_flag_none ), SUB_MENU ( TxtSettings, menuSetMsg, item_flag_none ), @@ -1208,7 +1206,7 @@ */ BEGIN_MENU( menuMsg ) #if defined (FF_MMI_EMS) || defined (FF_MMI_MMS) - //yanbin add MMS menu + //yanbin add MMS menu //TISHMMS Project SUB_MENU ( TxtMMS, menuMMS, item_flag_none ), SUB_MENU ( TxtSMS, menuSMS, item_flag_none ), @@ -1226,7 +1224,7 @@ #else MENU_ITEM( TxtWrite, M_exeSendNew, item_flag_none ), #endif - /*MC end*/ + /*MC end*/ /* API - 03/09/03 - SPR2383 - END*/ MENU_ITEM( TxtDeleteAll, M_exeDelAll, item_flag_none ), SUB_MENU ( TxtSettings, menuSetMsg, item_flag_none ), @@ -1279,10 +1277,10 @@ /* SPR#1112 - SH - Options for when internal phonebook present */ #ifdef INT_PHONEBOOK - SUB_MENU( TxtCopy, menuCopy, item_flag_none), - SUB_MENU( TxtMove, menuMove, item_flag_none), + SUB_MENU( TxtCopy, menuCopy, item_flag_none), + SUB_MENU( TxtMove, menuMove, item_flag_none), #endif - MENU_ITEM( TxtDelete, bookNameDelete, item_flag_none ), + MENU_ITEM( TxtDelete, bookNameDelete, item_flag_none ), END_MENU( menuNameOptions, menuListArea, COLOUR_LIST_SUBMENU ) /*SPR 1327, UPN number menu*/ @@ -1314,19 +1312,17 @@ MENU_ITEM( TxtDeleteAll, bookDeleteAll, item_flag_none ), /* SPR#1112 - SH - Internal Phonebook new menu option */ #ifdef INT_PHONEBOOK - MENU_ITEM( TxtSelectBook, bookSelectBook, item_flag_none ), + MENU_ITEM( TxtSelectBook, bookSelectBook, item_flag_none ), #endif #ifdef FF_MMI_CPHS - SUB_MENU( TxtEmergencyNumbers, menuEmergency, item_flag_none ), + SUB_MENU( TxtEmergencyNumbers, menuEmergency, item_flag_none ), #endif END_MENU( menuPhbk, menuListArea, COLOUR_LIST_SUBMENU ) - /*---------------------------------------------------------------------------*/ - //Sub-Menu of Call Timers BEGIN_MENU(menuCallTimers) MENU_ITEM( TxtLastCall, timerLastCall, item_flag_none), @@ -1335,7 +1331,6 @@ END_MENU(menuCallTimers, menuListArea, COLOUR_LIST_SUBMENU) - //Sub-Menu of Charge Limit / AOC BEGIN_MENU( menuLimitAOC ) MENU_ITEM( TxtView, aoc_view_limit, item_flag_none ), @@ -1366,8 +1361,6 @@ /*---------------------------------------------------------------------------*/ - - //Sub-Menu BEGIN_MENU( menuCallDivert ) MENU_ITEM ( TxtCheckStatus, servicesDivertCheck, item_flag_none ), @@ -1430,7 +1423,7 @@ MENU_ITEM( TxtYes, bookFDNActivate, item_flag_none ), MENU_ITEM( TxtNo, bookFDNDeactivate, item_flag_none ), // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// Added FDN Numbers menu +// Added FDN Numbers menu MENU_ITEM( TxtFDNName, bookFDNMenu, item_flag_none ), END_MENU( menuFixedDialSet, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1498,7 +1491,7 @@ BEGIN_MENU( menuPhLockAutomatic ) MENU_ITEM ( TxtPhLockAutoOn, phLock_Automatic_On, item_flag_none), MENU_ITEM ( TxtPhLockAutoOff, phLock_Automatic_Off, item_flag_none) - END_MENU( menuPhLockAutomatic, menuListArea, COLOUR_LIST_SUBMENU ) +END_MENU( menuPhLockAutomatic, menuListArea, COLOUR_LIST_SUBMENU ) //x0pleela 19 Feb, 2007 ER: OMAPS00122561 //Sub-menu of Phone Lock @@ -1512,7 +1505,7 @@ // Menu of Security BEGIN_MENU( menuSecurity ) -// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN +// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN // Instead of providing the submenu directly we call a function // where we set the menu and also higlight the previously selected menu item // MENU_ITEM( TxtFixedNames, settingsFocusFDNCurSel, item_flag_none ), @@ -1540,11 +1533,11 @@ //Options-Menu of Calculator BEGIN_MENU( menuCalcOptions ) - MENU_ITEM( TxtEquals, calcEquals, item_flag_none ), + MENU_ITEM( TxtEquals, calcEquals, item_flag_none ), MENU_ITEM( TxtPlus, calcPlus, item_flag_none ), MENU_ITEM( TxtMinus, calcMinus, item_flag_none ), - MENU_ITEM( TxtDivideBy, calcDivide, item_flag_none ), - MENU_ITEM( TxtMultiplyBy, calcMultiply, item_flag_none ) + MENU_ITEM( TxtDivideBy, calcDivide, item_flag_none ), + MENU_ITEM( TxtMultiplyBy, calcMultiply, item_flag_none ) END_MENU( menuCalcOptions, menuListArea, COLOUR_LIST_SUBMENU ) //Options-Menu of Melodie Generator @@ -1563,7 +1556,7 @@ //x0pleela 24 Feb, 2006 ER OMAPS00067709 #ifdef FF_PCM_VM_VB -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ BEGIN_MENU( menuPCMVoiceMemoStorage ) MENU_ITEM( TxtFFS, PCM_voice_memo_storeage, mmi_check_nor ), @@ -1579,7 +1572,7 @@ MENU_ITEM( TxtTflash, voice_buffer_storeage, mmi_check_tflash ), END_MENU( menuVoicebufferStorage, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ //Sub-Menu of PCM Voice Memo BEGIN_MENU( menuPcmVoiceMemo ) @@ -1599,8 +1592,8 @@ #endif #ifndef FF_NO_VOICE_MEMO -#if 0 /* FreeCalypso */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +#if 0 /* FreeCalypso */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ BEGIN_MENU( menuVoiceMemoStorage ) MENU_ITEM( TxtFFS, voice_memo_storeage, mmi_check_nor ), @@ -1609,14 +1602,14 @@ MENU_ITEM( TxtTflash, voice_memo_storeage, mmi_check_tflash ), END_MENU( menuVoiceMemoStorage, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ #endif //Sub-Menu of Voice Memo BEGIN_MENU( menuVoiceMemo ) MENU_ITEM( TxtPlay, voice_memo_play, item_flag_none ), MENU_ITEM( TxtRecord, voice_memo_record, item_flag_none ), -#if 0 /* FreeCalypso */ +#if 0 /* FreeCalypso */ SUB_MENU( TxtStorageDevice, menuVoiceMemoStorage, item_flag_none ) #endif END_MENU( menuVoiceMemo, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1624,8 +1617,8 @@ //e-armanetsaid 18/05/04 Add menu for Midi driver test //Sub-Menu of Loop On/Off -// Apr 06, 2005 REF: ENH 30011 xdeepadh -// Nov 14, 2005 REF: OMAPS00044445 xdeepadh +// Apr 06, 2005 REF: ENH 30011 xdeepadh +// Nov 14, 2005 REF: OMAPS00044445 xdeepadh #if defined(FF_MMI_TEST_MP3) || defined(FF_MMI_TEST_AAC) BEGIN_MENU(menuPlayerChannels) MENU_ITEM( TxtPlayerMonoChannel, mmi_audio_player_set_channel_mono, item_flag_none ), @@ -1633,13 +1626,13 @@ END_MENU( menuPlayerChannels, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuPlayerTest ) - MENU_ITEM(TxtPlayerSelectFile, mmi_audio_player_files_browse, item_flag_none), - // Sep 27,2005 REF: SPR 34402 xdeepadh - // Instead of providing the submenu directly, we call a function - // where we set the menu and also higlight the previously selected menu item - MENU_ITEM( TxtPlayerSetChannels, mmi_audio_player_set_cur_selected_channels, item_flag_none ), - //Jul 18, 2005 REF: SPR 31695 xdeepadh - MENU_ITEM( TxtPlayerPlay, mmi_audio_player_play, item_flag_none ) + MENU_ITEM(TxtPlayerSelectFile, mmi_audio_player_files_browse, item_flag_none), + // Sep 27,2005 REF: SPR 34402 xdeepadh + // Instead of providing the submenu directly, we call a function + // where we set the menu and also higlight the previously selected menu item + MENU_ITEM( TxtPlayerSetChannels, mmi_audio_player_set_cur_selected_channels, item_flag_none ), + //Jul 18, 2005 REF: SPR 31695 xdeepadh + MENU_ITEM( TxtPlayerPlay, mmi_audio_player_play, item_flag_none ) END_MENU( menuPlayerTest, menuListArea, COLOUR_LIST_SUBMENU ) #endif //FF_MMI_TEST_MP3 @@ -1681,7 +1674,7 @@ END_MENU( menuMidiChangeConfig, menuListArea, COLOUR_LIST_SUBMENU ) //Sub-Menu of Midi Test -// Dec 08, 2004 REF: CRR MMI-SPR-27284 +// Dec 08, 2004 REF: CRR MMI-SPR-27284 // Description: MIDI Player: Back Key malfunctions in MIDI application. // Solution: Calling function midi_test_files_browse() when user select "Browse Midi Files" BEGIN_MENU( menuMidiTest ) @@ -1695,9 +1688,9 @@ #ifdef BTE_MOBILE //Sub-Menu of Bluetooth Discoverable BEGIN_MENU( menuBluetoothDiscoverable ) - MENU_ITEM( TxtBtDiscoverable, mmi_bluetooth_set_discoverable_on, item_flag_none ), - MENU_ITEM( TxtBtHidden, mmi_bluetooth_set_discoverable_off, item_flag_none ), - MENU_ITEM( TxtBtTimed, mmi_bluetooth_set_discoverable_timed, item_flag_none ) + MENU_ITEM( TxtBtDiscoverable, mmi_bluetooth_set_discoverable_on, item_flag_none ), + MENU_ITEM( TxtBtHidden, mmi_bluetooth_set_discoverable_off, item_flag_none ), + MENU_ITEM( TxtBtTimed, mmi_bluetooth_set_discoverable_timed, item_flag_none ) END_MENU( menuBluetoothDiscoverable, menuListArea, COLOUR_LIST_SUBMENU ) //Sub-Menu of Bluetooth Devices @@ -1717,9 +1710,9 @@ //Sub-Menu of Bluetooth BEGIN_MENU( menuBluetooth ) - MENU_ITEM( TxtBluetoothEnable, mmi_bluetooth_on, isBluetoothActive ), + MENU_ITEM( TxtBluetoothEnable, mmi_bluetooth_on, isBluetoothActive ), MENU_ITEM( TxtAutomatic, mmi_bluetooth_automatic, isBluetoothActive ), - MENU_ITEM( TxtBluetoothDisable, mmi_bluetooth_off, isBluetoothInactive ), + MENU_ITEM( TxtBluetoothDisable, mmi_bluetooth_off, isBluetoothInactive ), MENU_ITEM( TxtBtSetLocalName, mmi_bluetooth_change_name, item_flag_none ), SUB_MENU( TxtBtDiscoverable, menuBluetoothDiscoverable, item_flag_none), SUB_MENU(TxtBtDevices, menuBluetoothDevices, item_flag_none) @@ -1729,8 +1722,8 @@ #ifdef FF_MMI_MULTIMEDIA /* Configuration Parameter Menu Items */ BEGIN_MENU( menuSelectOutputScreemode ) - MENU_ITEM( TxtHalfScreenMode, mmi_Set_ScreenMode, item_flag_none), - MENU_ITEM( TxtFullScreenMode, mmi_Set_ScreenMode , item_flag_none ) + MENU_ITEM( TxtHalfScreenMode, mmi_Set_ScreenMode, item_flag_none), + MENU_ITEM( TxtFullScreenMode, mmi_Set_ScreenMode , item_flag_none ) END_MENU( menuSelectOutputScreemode, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1743,55 +1736,55 @@ BEGIN_MENU( menuSelectAudioEncodingFormat ) SUB_MENU ( TxtPCM, menuPcmEncodeConfig, item_flag_none), - MENU_ITEM( TxtAMR, mmi_Set_AudioFormat, item_flag_none ), + MENU_ITEM( TxtAMR, mmi_Set_AudioFormat, item_flag_none ), MENU_ITEM( TxtAAC, mmi_Set_AudioFormat, item_flag_none ), - MENU_ITEM( TxtMP3, mmi_Set_AudioFormat, item_flag_none ) + MENU_ITEM( TxtMP3, mmi_Set_AudioFormat, item_flag_none ) END_MENU( menuSelectAudioEncodingFormat, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuSelectVideoEncodingFormat ) - MENU_ITEM( TxtMpeg4, mmi_Set_VideoFormat , item_flag_none ), - MENU_ITEM( TxtH263, mmi_Set_VideoFormat , item_flag_none ), - MENU_ITEM( TxtNone, mmi_Set_VideoFormat , item_flag_none ) + MENU_ITEM( TxtMpeg4, mmi_Set_VideoFormat , item_flag_none ), + MENU_ITEM( TxtH263, mmi_Set_VideoFormat , item_flag_none ), + MENU_ITEM( TxtNone, mmi_Set_VideoFormat , item_flag_none ) END_MENU( menuSelectVideoEncodingFormat, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuSelectVideoCaptureSize ) - MENU_ITEM( TxtQcif, mmi_Set_VideoSize , item_flag_none ), - MENU_ITEM( TxtCif, mmi_Set_VideoSize , item_flag_none ), - MENU_ITEM( TxtQQVga, mmi_Set_VideoSize , item_flag_none ) + MENU_ITEM( TxtQcif, mmi_Set_VideoSize , item_flag_none ), + MENU_ITEM( TxtCif, mmi_Set_VideoSize , item_flag_none ), + MENU_ITEM( TxtQQVga, mmi_Set_VideoSize , item_flag_none ) END_MENU( menuSelectVideoCaptureSize, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuSelectFrameRate ) - MENU_ITEM( Txt5fps, mmi_Set_FrameRate , item_flag_none ), - MENU_ITEM( Txt10fps, mmi_Set_FrameRate , item_flag_none ), - MENU_ITEM( Txt15fps, mmi_Set_FrameRate , item_flag_none ), - MENU_ITEM( Txt30fps, mmi_Set_FrameRate , item_flag_none ) + MENU_ITEM( Txt5fps, mmi_Set_FrameRate , item_flag_none ), + MENU_ITEM( Txt10fps, mmi_Set_FrameRate , item_flag_none ), + MENU_ITEM( Txt15fps, mmi_Set_FrameRate , item_flag_none ), + MENU_ITEM( Txt30fps, mmi_Set_FrameRate , item_flag_none ) END_MENU( menuSelectFrameRate, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuSelectAACBitRate ) - MENU_ITEM( Txt48Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt66p15Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt72Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt96pKbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt132p3Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt144Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt192Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt264p6Kbps, mmi_Set_AAC_BitRate , item_flag_none ), - MENU_ITEM( Txt288Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt48Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt66p15Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt72Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt96pKbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt132p3Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt144Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt192Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt264p6Kbps, mmi_Set_AAC_BitRate , item_flag_none ), + MENU_ITEM( Txt288Kbps, mmi_Set_AAC_BitRate , item_flag_none ), END_MENU( menuSelectAACBitRate, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuSelectAMRBitRate ) - MENU_ITEM( Txt1p80Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt4p75Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt5p15Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt5p9Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt6p7Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt7p4Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt7p95Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt10p2Kbps, mmi_Set_AMR_BitRate , item_flag_none ), - MENU_ITEM( Txt12p2Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt1p80Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt4p75Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt5p15Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt5p9Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt6p7Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt7p4Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt7p95Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt10p2Kbps, mmi_Set_AMR_BitRate , item_flag_none ), + MENU_ITEM( Txt12p2Kbps, mmi_Set_AMR_BitRate , item_flag_none ), END_MENU( menuSelectAMRBitRate, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1802,94 +1795,94 @@ BEGIN_MENU( menuSelectVideoRate ) - MENU_ITEM( Txt64Kbps, mmi_Set_VideoBitRate , item_flag_none ), - MENU_ITEM( Txt128Kbps, mmi_Set_VideoBitRate , item_flag_none ), + MENU_ITEM( Txt64Kbps, mmi_Set_VideoBitRate , item_flag_none ), + MENU_ITEM( Txt128Kbps, mmi_Set_VideoBitRate , item_flag_none ), END_MENU( menuSelectVideoRate, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuAudioPath ) - MENU_ITEM( TxtHeadset, mmi_Set_AudioPath , item_flag_none ), - MENU_ITEM( TxtSpeaker, mmi_Set_AudioPath, item_flag_none ), + MENU_ITEM( TxtHeadset, mmi_Set_AudioPath , item_flag_none ), + MENU_ITEM( TxtSpeaker, mmi_Set_AudioPath, item_flag_none ), END_MENU( menuAudioPath, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuPreferredStorage ) - MENU_ITEM( TxtFFS, mmi_Set_PreferredStorage , item_flag_none ), - MENU_ITEM( TxtMMC, mmi_Set_PreferredStorage , item_flag_none) + MENU_ITEM( TxtFFS, mmi_Set_PreferredStorage , item_flag_none ), + MENU_ITEM( TxtMMC, mmi_Set_PreferredStorage , item_flag_none) END_MENU( menuPreferredStorage, menuListArea, COLOUR_LIST_SUBMENU ) /* PCM Decode Sampling Rate */ BEGIN_MENU( menuPcmSampleRate ) - MENU_ITEM( Txt8kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt11kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt12kRate, mmi_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 12k Menu addition */ - MENU_ITEM( Txt16kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt22kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt24kRate, mmi_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 24k Menu addition */ - MENU_ITEM( Txt32kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt44kRate, mmi_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt48kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt8kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt11kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt12kRate, mmi_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 12k Menu addition */ + MENU_ITEM( Txt16kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt22kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt24kRate, mmi_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 24k Menu addition */ + MENU_ITEM( Txt32kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt44kRate, mmi_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt48kRate, mmi_set_pcm_samplerate, item_flag_none ), END_MENU( menuPcmSampleRate, menuListArea, COLOUR_LIST_SUBMENU ) /*Voice Memo PCM Sampling Rate */ BEGIN_MENU( menuVmPcmSampleRate ) - MENU_ITEM( Txt8kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt11kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt12kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 12k Menu addition */ - MENU_ITEM( Txt16kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt22kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt24kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 24k Menu addition */ - MENU_ITEM( Txt32kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt44kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), - MENU_ITEM( Txt48kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt8kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt11kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt12kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 12k Menu addition */ + MENU_ITEM( Txt16kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt22kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt24kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), /*OMAPS00081264 - 24k Menu addition */ + MENU_ITEM( Txt32kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt44kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), + MENU_ITEM( Txt48kRate, mmi_vm_set_pcm_samplerate, item_flag_none ), END_MENU( menuVmPcmSampleRate, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuPcmDecodeChanMode ) - MENU_ITEM( TxtMonoMode, mmi_Set_PcmDecodeChanMode , item_flag_none ), - MENU_ITEM( TxtStreoMode, mmi_Set_PcmDecodeChanMode, item_flag_none ), + MENU_ITEM( TxtMonoMode, mmi_Set_PcmDecodeChanMode , item_flag_none ), + MENU_ITEM( TxtStreoMode, mmi_Set_PcmDecodeChanMode, item_flag_none ), END_MENU( menuPcmDecodeChanMode, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuVmPcmDecodeChanMode ) - MENU_ITEM( TxtMonoMode, mmi_Set_VmPcmDecodeChanMode , item_flag_none ), - MENU_ITEM( TxtStreoMode, mmi_Set_VmPcmDecodeChanMode, item_flag_none ), + MENU_ITEM( TxtMonoMode, mmi_Set_VmPcmDecodeChanMode , item_flag_none ), + MENU_ITEM( TxtStreoMode, mmi_Set_VmPcmDecodeChanMode, item_flag_none ), END_MENU( menuVmPcmDecodeChanMode, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuVolumeConfig ) - MENU_ITEM( TxtLevel1, mmi_Set_VolumeConfig , item_flag_none ), - MENU_ITEM( TxtLevel2, mmi_Set_VolumeConfig , item_flag_none ), - MENU_ITEM( TxtLevel3, mmi_Set_VolumeConfig , item_flag_none ), - MENU_ITEM( TxtLevel4, mmi_Set_VolumeConfig , item_flag_none ), - MENU_ITEM( TxtLevel5, mmi_Set_VolumeConfig , item_flag_none ), + MENU_ITEM( TxtLevel1, mmi_Set_VolumeConfig , item_flag_none ), + MENU_ITEM( TxtLevel2, mmi_Set_VolumeConfig , item_flag_none ), + MENU_ITEM( TxtLevel3, mmi_Set_VolumeConfig , item_flag_none ), + MENU_ITEM( TxtLevel4, mmi_Set_VolumeConfig , item_flag_none ), + MENU_ITEM( TxtLevel5, mmi_Set_VolumeConfig , item_flag_none ), END_MENU( menuVolumeConfig, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuCamera ) - MENU_ITEM( TxtCameraCapture, mmi_Select_CameraCapture, item_flag_none ), - MENU_ITEM( TxtVideoRecording, mmi_Select_AudioVideo_Recording, item_flag_none ), - MENU_ITEM( TxtAudioRecording, mmi_Select_Audio_Recording, item_flag_none ) + MENU_ITEM( TxtCameraCapture, mmi_Select_CameraCapture, item_flag_none ), + MENU_ITEM( TxtVideoRecording, mmi_Select_AudioVideo_Recording, item_flag_none ), + MENU_ITEM( TxtAudioRecording, mmi_Select_Audio_Recording, item_flag_none ) END_MENU( menuCamera, menuListArea, COLOUR_LIST_SUBMENU ) #ifdef FF_MMI_NEPTUNE_IMAGE_VIEWER BEGIN_MENU( menuImageEdit ) - MENU_ITEM( TxtCrop, mmi_ImageEdit_Crop, item_flag_none ), - MENU_ITEM( TxtRescale, mmi_ImageEdit_Rescale, item_flag_none ), - MENU_ITEM( TxtRotate, mmi_ImageEdit_Rotate, item_flag_none ), + MENU_ITEM( TxtCrop, mmi_ImageEdit_Crop, item_flag_none ), + MENU_ITEM( TxtRescale, mmi_ImageEdit_Rescale, item_flag_none ), + MENU_ITEM( TxtRotate, mmi_ImageEdit_Rotate, item_flag_none ), END_MENU( menuImageEdit, menuListArea, COLOUR_LIST_SUBMENU ) #endif /* Image Capture Quality */ BEGIN_MENU( menuImageCaptureQuality ) - MENU_ITEM( Txt0Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt10Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt20Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt30Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt40Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt50Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt60Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt70Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt80Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt90Set, mmi_Set_ImageCaptureQuality , item_flag_none ), - MENU_ITEM( Txt100Set, mmi_Set_ImageCaptureQuality , item_flag_none ) + MENU_ITEM( Txt0Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt10Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt20Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt30Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt40Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt50Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt60Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt70Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt80Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt90Set, mmi_Set_ImageCaptureQuality , item_flag_none ), + MENU_ITEM( Txt100Set, mmi_Set_ImageCaptureQuality , item_flag_none ) END_MENU( menuImageCaptureQuality, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1906,70 +1899,70 @@ #endif /* Pcm Stero / Mono Setting Menu for Recording */ BEGIN_MENU( menuPcmChannelMode ) - MENU_ITEM( TxtMonoMode, mmi_Set_PcmChannelMode , item_flag_none ), - MENU_ITEM( TxtStreoMode, mmi_Set_PcmChannelMode, item_flag_none ), + MENU_ITEM( TxtMonoMode, mmi_Set_PcmChannelMode , item_flag_none ), + MENU_ITEM( TxtStreoMode, mmi_Set_PcmChannelMode, item_flag_none ), END_MENU( menuPcmChannelMode, menuListArea, COLOUR_LIST_SUBMENU ) /* Pcm Rate Selection for Recording */ BEGIN_MENU( menuPcmRateSelection ) - MENU_ITEM( Txt8kRate, mmi_Set_PcmRateSelection , item_flag_none ), - MENU_ITEM( Txt16kRate, mmi_Set_PcmRateSelection, item_flag_none ), + MENU_ITEM( Txt8kRate, mmi_Set_PcmRateSelection , item_flag_none ), + MENU_ITEM( Txt16kRate, mmi_Set_PcmRateSelection, item_flag_none ), END_MENU( menuPcmRateSelection, menuListArea, COLOUR_LIST_SUBMENU ) /* To Specify whether file access is from FFS / MMC */ BEGIN_MENU( menuMMStorageDevice ) - MENU_ITEM( TxtFFS, mmi_Select_AudioVideo_Files , item_flag_none ), - MENU_ITEM( TxtMMC, mmi_Select_AudioVideo_Files , item_flag_none ) + MENU_ITEM( TxtFFS, mmi_Select_AudioVideo_Files , item_flag_none ), + MENU_ITEM( TxtMMC, mmi_Select_AudioVideo_Files , item_flag_none ) END_MENU( menuMMStorageDevice, menuListArea, COLOUR_LIST_SUBMENU ) /* To Specify whether file access is from FFS / MMC for Image Viewer */ BEGIN_MENU( menuMMImageStorageDevice ) - MENU_ITEM( TxtFFS, mmi_Select_Image_Files , item_flag_none ), - MENU_ITEM( TxtMMC, mmi_Select_Image_Files , item_flag_none ) + MENU_ITEM( TxtFFS, mmi_Select_Image_Files , item_flag_none ), + MENU_ITEM( TxtMMC, mmi_Select_Image_Files , item_flag_none ) END_MENU( menuMMImageStorageDevice, menuListArea, COLOUR_LIST_SUBMENU ) /*Audio Decode configuration */ BEGIN_MENU( menuAudioDecodeConfig ) - MENU_ITEM( TxtAudioPath,(MenuFunc)FocusCurSel_AudioPath, item_flag_none ), + MENU_ITEM( TxtAudioPath,(MenuFunc)FocusCurSel_AudioPath, item_flag_none ), END_MENU( menuAudioDecodeConfig, menuListArea, COLOUR_LIST_SUBMENU ) /*Audio Encode Configuration */ BEGIN_MENU( menuAudioEncodeConfig ) - MENU_ITEM( TxtAudioEncodingFormat,(MenuFunc)FocusCurSel_AudioFormat, item_flag_none ), - SUB_MENU( TxtAudioBitRate, menuSelectAudioRate, item_flag_none ), + MENU_ITEM( TxtAudioEncodingFormat,(MenuFunc)FocusCurSel_AudioFormat, item_flag_none ), + SUB_MENU( TxtAudioBitRate, menuSelectAudioRate, item_flag_none ), END_MENU( menuAudioEncodeConfig, menuListArea, COLOUR_LIST_SUBMENU ) /*Audio & Video Sync Option */ BEGIN_MENU( menuAudioVideoSyncOption ) - MENU_ITEM( TxtAudioVideoPlay, mmi_Audio_Video_Play_Option, item_flag_none ), - MENU_ITEM( TxtVideoPlay, mmi_Audio_Video_Play_Option, item_flag_none ), + MENU_ITEM( TxtAudioVideoPlay, mmi_Audio_Video_Play_Option, item_flag_none ), + MENU_ITEM( TxtVideoPlay, mmi_Audio_Video_Play_Option, item_flag_none ), END_MENU( menuAudioVideoSyncOption, menuListArea, COLOUR_LIST_SUBMENU ) /*Audio & Video Sync Option */ BEGIN_MENU( menuVideoRecordDuration ) - MENU_ITEM( TxtNonStop, mmi_Video_Record_Duration, item_flag_none ), - MENU_ITEM( Txt10sec, mmi_Video_Record_Duration, item_flag_none ), - MENU_ITEM( Txt15sec, mmi_Video_Record_Duration, item_flag_none ), - MENU_ITEM( Txt20sec, mmi_Video_Record_Duration, item_flag_none ), + MENU_ITEM( TxtNonStop, mmi_Video_Record_Duration, item_flag_none ), + MENU_ITEM( Txt10sec, mmi_Video_Record_Duration, item_flag_none ), + MENU_ITEM( Txt15sec, mmi_Video_Record_Duration, item_flag_none ), + MENU_ITEM( Txt20sec, mmi_Video_Record_Duration, item_flag_none ), END_MENU( menuVideoRecordDuration, menuListArea, COLOUR_LIST_SUBMENU ) /*Audio & Video Record option */ BEGIN_MENU( menuAudioVideoRecordOption ) - MENU_ITEM( TxtAudioVideoRecord, mmi_Audio_Video_Record_Option, item_flag_none ), - MENU_ITEM( TxtVideoRecord, mmi_Audio_Video_Record_Option, item_flag_none ), + MENU_ITEM( TxtAudioVideoRecord, mmi_Audio_Video_Record_Option, item_flag_none ), + MENU_ITEM( TxtVideoRecord, mmi_Audio_Video_Record_Option, item_flag_none ), END_MENU( menuAudioVideoRecordOption, menuListArea, COLOUR_LIST_SUBMENU ) /* Video Encode Configuration */ BEGIN_MENU( menuVideoEncodeConfig ) - MENU_ITEM( TxtVideoEncodingFormat,(MenuFunc)FocusCurSel_VideoFormat, item_flag_none ), - MENU_ITEM( TxtVideoCaptureSize,(MenuFunc)FocusCurSel_VideoSize, item_flag_none ), - MENU_ITEM( TxtVideoFrameRateSelection,(MenuFunc)FocusCurSel_FrameRate, item_flag_none ), - MENU_ITEM( TxtVideoBitRate,(MenuFunc)FocusCurSel_VideoBitRate, item_flag_none ) + MENU_ITEM( TxtVideoEncodingFormat,(MenuFunc)FocusCurSel_VideoFormat, item_flag_none ), + MENU_ITEM( TxtVideoCaptureSize,(MenuFunc)FocusCurSel_VideoSize, item_flag_none ), + MENU_ITEM( TxtVideoFrameRateSelection,(MenuFunc)FocusCurSel_FrameRate, item_flag_none ), + MENU_ITEM( TxtVideoBitRate,(MenuFunc)FocusCurSel_VideoBitRate, item_flag_none ) END_MENU( menuVideoEncodeConfig, menuListArea, COLOUR_LIST_SUBMENU ) @@ -1987,24 +1980,24 @@ /* Multimedia Application Menu. */ BEGIN_MENU( menuMultimediaApp ) - SUB_MENU( TxtConfigurationParameters, menuConfigParam, item_flag_none ), + SUB_MENU( TxtConfigurationParameters, menuConfigParam, item_flag_none ), /* If MMC is available then show the menu, otherwise access directly from FFS */ - SUB_MENU( TxtAudioVideoPlayback, menuMMStorageDevice, item_flag_none ), - SUB_MENU( TxtImageViewer, menuMMImageStorageDevice, item_flag_none ), - SUB_MENU( TxtCamera, menuCamera, item_flag_none), - MENU_ITEM( TxtAudioRecording, mmi_Select_Audio_Recording, item_flag_none ) + SUB_MENU( TxtAudioVideoPlayback, menuMMStorageDevice, item_flag_none ), + SUB_MENU( TxtImageViewer, menuMMImageStorageDevice, item_flag_none ), + SUB_MENU( TxtCamera, menuCamera, item_flag_none), + MENU_ITEM( TxtAudioRecording, mmi_Select_Audio_Recording, item_flag_none ) END_MENU( menuMultimediaApp, menuListArea, COLOUR_LIST_SUBMENU ) /* Voice Meo Implemention */ #ifdef FF_MMI_VOICEMEMO BEGIN_MENU( menuStartRecord ) - MENU_ITEM( TxtStartRecord, mmi_Select_VM_Audio_Recording, item_flag_none ) + MENU_ITEM( TxtStartRecord, mmi_Select_VM_Audio_Recording, item_flag_none ) END_MENU( menuStartRecord, menuListArea, COLOUR_LIST_SUBMENU ) /* To Specify whether file access is from FFS / MMC for Image Viewer */ BEGIN_MENU( menuVMStorageDevice ) - MENU_ITEM( TxtFFS, mmi_VM_Select_AMR_Files , item_flag_none ), - MENU_ITEM( TxtMMC, mmi_VM_Select_AMR_Files , item_flag_none ) + MENU_ITEM( TxtFFS, mmi_VM_Select_AMR_Files , item_flag_none ), + MENU_ITEM( TxtMMC, mmi_VM_Select_AMR_Files , item_flag_none ) END_MENU( menuVMStorageDevice, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU( menuVoiceMemoUC ) @@ -2040,7 +2033,7 @@ MENU_ITEM(TxtFormat, mmi_fm_format, format_check_dev) , END_MENU( menuFMDrivesOptions, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ BEGIN_MENU( menuFMDrives ) MENU_ITEM( TxtFFS, mmi_fm_drives, mmi_check_nor), @@ -2049,14 +2042,14 @@ MENU_ITEM(TxtTflash, mmi_fm_drives, mmi_check_tflash), END_MENU( menuFMDrives, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ BEGIN_MENU( menuDestRootFolders ) MENU_ITEM( TxtImageFiles, mmi_fm_dest_display, check_source_image), MENU_ITEM( TxtAudioFiles, mmi_fm_dest_display, check_source_audio), END_MENU( menuDestRootFolders, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ BEGIN_MENU( menuDestFMDrives ) MENU_ITEM( TxtFFS, mmi_fm_dest_root_folders, mmi_check_nor), @@ -2065,7 +2058,7 @@ MENU_ITEM(TxtTflash, mmi_fm_dest_root_folders, mmi_check_tflash), END_MENU( menuDestFMDrives, menuListArea, COLOUR_LIST_SUBMENU ) -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ #endif @@ -2093,7 +2086,7 @@ MENU_ITEM( TxtMidiTest, mmi_midi_test_Application, item_flag_none ),//Sep 11, 2006 DR: OMAPS00094182 xrashmic #endif/*#ifdef FF_MMI_TEST_MIDI */ #endif /*FF_MMI_FILEMANAGER*/ - /* Apr 06, 2005 REF: ENH 30011 xdeepadh */ + /* Apr 06, 2005 REF: ENH 30011 xdeepadh */ #ifdef FF_MMI_CAMERA_APP MENU_ITEM(TxtCameraTest, mmi_camera_launch_view_finder, item_flag_none ), #endif //FF_MMI_CAMERA_APP @@ -2105,7 +2098,7 @@ #ifdef FF_MMI_FILE_VIEWER MENU_ITEM(TxtFileViewer, LaunchFileViewer, item_flag_none ), #endif //FF_MMI_FILE_VIEWER -// Nov 14, 2005 REF: OMAPS00044445 xdeepadh +// Nov 14, 2005 REF: OMAPS00044445 xdeepadh #ifndef FF_MMI_FILEMANAGER #if defined(FF_MMI_TEST_MP3) || defined(FF_MMI_TEST_AAC) MENU_ITEM( TxtPlayerTest, mmi_audio_player_Application, item_flag_none ),//Sep 11, 2006 DR: OMAPS00094182 xrashmic @@ -2126,11 +2119,11 @@ //x0pleela 24 Feb, 2006 ER OMAPS00067709 #ifdef FF_PCM_VM_VB - SUB_MENU( TxtPcmVoiceMemo, menuPcmVoiceMemo, item_flag_none ), - - //x0pleela 09 Mar, 2006 ER: OMAPS00067709 - //menu item of Voice Buffering - SUB_MENU( TxtVoiceBuffering, menuVoiceBuffering, item_flag_none ), + SUB_MENU( TxtPcmVoiceMemo, menuPcmVoiceMemo, item_flag_none ), + + //x0pleela 09 Mar, 2006 ER: OMAPS00067709 + //menu item of Voice Buffering + SUB_MENU( TxtVoiceBuffering, menuVoiceBuffering, item_flag_none ), #endif #ifdef FF_MMI_MULTIMEDIA /* Multimedia Application initial menu specification. */ @@ -2140,7 +2133,7 @@ /* Multimedia Application initial menu specification. */ SUB_MENU( TxtMultimediaApp, menuMultimediaApp, item_flag_none ), #endif -#if 0 /* FreeCalypso */ +#if 0 /* FreeCalypso */ MENU_ITEM( TxtBootTime, menuBootTimeMsmt, item_flag_none ), /*OMAPS00091029 x0039928(sumanth)*/ #endif #ifdef FF_MMI_FILEMANAGER @@ -2181,11 +2174,11 @@ #endif #ifdef FF_PCM_VM_VB - SUB_MENU( TxtPcmVoiceMemo, menuPcmVoiceMemo, item_flag_none ), - - //x0pleela 09 Mar, 2006 ER: OMAPS00067709 - //menu item of Voice Buffering - SUB_MENU( TxtVoiceBuffering, menuVoiceBuffering, item_flag_none ), + SUB_MENU( TxtPcmVoiceMemo, menuPcmVoiceMemo, item_flag_none ), + + //x0pleela 09 Mar, 2006 ER: OMAPS00067709 + //menu item of Voice Buffering + SUB_MENU( TxtVoiceBuffering, menuVoiceBuffering, item_flag_none ), #endif #ifdef FF_MMI_MULTIMEDIA @@ -2201,11 +2194,11 @@ */ /* Sub-Menu of Language */ BEGIN_MENU( menuLanguage ) - MENU_ITEM( TxtEnglish, Mmi_Set2English, item_flag_none ), + MENU_ITEM( TxtEnglish, Mmi_Set2English, item_flag_none ), #ifndef CHINESE_MMI - MENU_ITEM( TxtGerman, Mmi_Set2German, item_flag_none ) + MENU_ITEM( TxtGerman, Mmi_Set2German, item_flag_none ) #else - MENU_ITEM( TxtChinese, Mmi_Set2Chinese, item_flag_none ) + MENU_ITEM( TxtChinese, Mmi_Set2Chinese, item_flag_none ) #endif END_MENU( menuLanguage, menuListArea, COLOUR_LIST_SUBMENU ) @@ -2257,9 +2250,9 @@ #ifdef FF_TIMEZONE BEGIN_MENU( menuNITZ ) - MENU_ITEM( TxtAutomatic, settingsNITZ, item_flag_none ), - MENU_ITEM( TxtOn, settingsNITZ, item_flag_none ), - MENU_ITEM( TxtOff, settingsNITZ, item_flag_none ) + MENU_ITEM( TxtAutomatic, settingsNITZ, item_flag_none ), + MENU_ITEM( TxtOn, settingsNITZ, item_flag_none ), + MENU_ITEM( TxtOff, settingsNITZ, item_flag_none ) END_MENU( menuNITZ, menuListArea, COLOUR_LIST_SUBMENU ) #endif /* Sub-Menu of KeypadTones */ @@ -2434,7 +2427,7 @@ MENU_ITEM(TxtLockAls, CphsAlsLock, CphsALSUnlocked ), MENU_ITEM(TxtUnlockAls, CphsAlsUnlock, CphsALSLocked ) #ifdef FF_CPHS - , + , SUB_MENU(TxtEditLineName, cphs_edit_line, item_flag_none) #endif END_MENU(menuLineSelect, menuListArea,COLOUR_LIST_SUBMENU ) @@ -2474,12 +2467,12 @@ SUB_MENU ( TxtDataCount, menuDataCount, item_flag_none ), MENU_ITEM ( TxtSMS, GPRS_MenuSelectSms, item_flag_none ), /* SPR#2346 - SH - Removed GPRS test options */ -END_MENU( menuDataSettings, menuListArea, COLOUR_LIST_SUBMENU ) +END_MENU( menuDataSettings, menuListArea, COLOUR_LIST_SUBMENU ) #endif //MMI_GPRS_ENABLED //SPR#1113 - DS - New menu "Netw. Related" added //SPR#1347 - GW - Moved network menu outside of '#ifdef MMI_GPRS_ENABLED' -// Disabled 'Band selection' when GPRS is disabled. +// Disabled 'Band selection' when GPRS is disabled. //Menu of Network Related services BEGIN_MENU( menuNetwork ) //x0pleela 25 May, 2006 DR: OMAPS00070657 @@ -2491,11 +2484,11 @@ #endif SUB_MENU ( TxtCallDivert, menuDivert, item_flag_none), SUB_MENU( TxtNetworkSel, menuNetworkSet, item_flag_none ), - SUB_MENU(TxtBand, menuBandSelect, item_flag_none), + SUB_MENU(TxtBand, menuBandSelect, item_flag_none), //Jun 02,2004 CRR:13649 xpradipg-SASKEN: start //points to the menu structure of differnt callBarring services instead of calling the password entry screen - SUB_MENU(TxtCallBarringAll, menuBarringSet, item_flag_none), + SUB_MENU(TxtCallBarringAll, menuBarringSet, item_flag_none), //Jun 02,2004 CRR:13649 xpradipg-SASKEN: end SUB_MENU( TxtCallWaiting, menuCallWaitingSet, item_flag_none ), @@ -2503,8 +2496,8 @@ SUB_MENU(TxtCallBack, menuCCBS, item_flag_none ), // Marcus: CCBS: 13/11/2002 SUB_MENU(TxtCallDeflection, menuCallDeflection, item_flag_none ) //SPR 1392 #ifdef MMI_TTY_ENABLED - , /* Comma here so previous item won't report error when flag switched off */ - MENU_ITEM( TxtTTY, call_tty_menu, item_flag_none) /* SPR#1352 - SH - TTY menu */ + , /* Comma here so previous item won't report error when flag switched off */ + MENU_ITEM( TxtTTY, call_tty_menu, item_flag_none) /* SPR#1352 - SH - TTY menu */ #ifdef NEPTUNE_BOARD /* Mar 27, 2006 REF:ER OMAPS00071798 */ #ifdef MMI_TTY_ENABLED , /* Comma here so previous item won't report error when flag switched off */ @@ -2520,8 +2513,8 @@ // Menu of Settings #ifdef _TESTING__ BEGIN_MENU(menuCphsTesting) - MENU_ITEM (TxtRead, Cphs_reading_test, item_flag_none), - MENU_ITEM(TxtWrite, Cphs_writing_test, item_flag_none) + MENU_ITEM (TxtRead, Cphs_reading_test, item_flag_none), + MENU_ITEM(TxtWrite, Cphs_writing_test, item_flag_none) END_MENU(menuCphsTesting, menuListArea,COLOUR_LIST_SUBMENU) #endif @@ -2531,59 +2524,59 @@ int icon_bgdMenuSelected(MfwMnu* mnu, MfwMnuItem* mnuItem); BEGIN_MENU(menuColours) - MENU_ITEM (TxtColourBlack, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourBlue, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourCyan, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourGreen, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourMagenta, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourYellow, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourRed, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourWhite, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourPink, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourOrange, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourLightBlue, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourLightGreen, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourPaleYellow, colMenuSelected, item_flag_none), - MENU_ITEM (TxtColourTransparent, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourBlack, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourBlue, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourCyan, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourGreen, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourMagenta, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourYellow, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourRed, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourWhite, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourPink, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourOrange, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourLightBlue, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourLightGreen, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourPaleYellow, colMenuSelected, item_flag_none), + MENU_ITEM (TxtColourTransparent, colMenuSelected, item_flag_none), END_MENU_MULTICOLOUR(menuColours, menuListArea,COLOUR_LIST_COLOUR,TxtNull) BEGIN_MENU(menuColourObjects) - MENU_ITEM_SUB_MENU (TxtIdleScreenBackground, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtIdleScreenSoftKey, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtIdleScreenText, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtIdleScreenNetworkName, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtGeneralBackground , menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtMenuSoftKeyForeground , menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtMenuSoftKeyBackground , menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtSubMenuHeadingText , menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtSubMenuHeadingBackground, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtSubMenuTextForeground , menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtSubMenuTextBackground, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtSubMenuSelectionBar, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtPopUpTextForeground, menuColours, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtPopUpTextBackground , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtIdleScreenBackground, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtIdleScreenSoftKey, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtIdleScreenText, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtIdleScreenNetworkName, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtGeneralBackground , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtMenuSoftKeyForeground , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtMenuSoftKeyBackground , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtSubMenuHeadingText , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtSubMenuHeadingBackground, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtSubMenuTextForeground , menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtSubMenuTextBackground, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtSubMenuSelectionBar, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtPopUpTextForeground, menuColours, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtPopUpTextBackground , menuColours, storeMenuOption, item_flag_none), END_MENU_MULTICOLOUR(menuColourObjects, menuListArea,COLOUR_LIST_COLOUR,TxtColourMenu) BEGIN_MENU(menuBackdrops) - MENU_ITEM (TxtNone, icon_bgdMenuSelected, item_flag_none), -// MENU_ITEM (TxtBgdSunset, icon_bgdMenuSelected, item_flag_none), -// MENU_ITEM (TxtBgdSquares, icon_bgdMenuSelected, item_flag_none), -// MENU_ITEM (TxtBgdTree, icon_bgdMenuSelected, item_flag_none), - MENU_ITEM (TxtBgdEdinburgh1, icon_bgdMenuSelected, item_flag_none), - MENU_ITEM (TxtBgdEdinburgh2, icon_bgdMenuSelected, item_flag_none), - MENU_ITEM (TxtBgdEdinburgh3, icon_bgdMenuSelected, item_flag_none), - MENU_ITEM (TxtBgdEdinburgh4, icon_bgdMenuSelected, item_flag_none), - MENU_ITEM (TxtBgdTILogo, icon_bgdMenuSelected, item_flag_none) + MENU_ITEM (TxtNone, icon_bgdMenuSelected, item_flag_none), +// MENU_ITEM (TxtBgdSunset, icon_bgdMenuSelected, item_flag_none), +// MENU_ITEM (TxtBgdSquares, icon_bgdMenuSelected, item_flag_none), +// MENU_ITEM (TxtBgdTree, icon_bgdMenuSelected, item_flag_none), + MENU_ITEM (TxtBgdEdinburgh1, icon_bgdMenuSelected, item_flag_none), + MENU_ITEM (TxtBgdEdinburgh2, icon_bgdMenuSelected, item_flag_none), + MENU_ITEM (TxtBgdEdinburgh3, icon_bgdMenuSelected, item_flag_none), + MENU_ITEM (TxtBgdEdinburgh4, icon_bgdMenuSelected, item_flag_none), + MENU_ITEM (TxtBgdTILogo, icon_bgdMenuSelected, item_flag_none) END_MENU(menuBackdrops, menuListArea,COLOUR_LIST_SUBMENU) BEGIN_MENU(menuBackgroundScrSelect) - MENU_ITEM_SUB_MENU (TxtIdleScreen, menuBackdrops, storeMenuOption, item_flag_none), - MENU_ITEM_SUB_MENU (TxtMenuScreen, menuBackdrops, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtIdleScreen, menuBackdrops, storeMenuOption, item_flag_none), + MENU_ITEM_SUB_MENU (TxtMenuScreen, menuBackdrops, storeMenuOption, item_flag_none), END_MENU(menuBackgroundScrSelect, menuListArea,COLOUR_LIST_SUBMENU) BEGIN_MENU(menuProviderIconSet) - MENU_ITEM (TxtYes, icon_networkShow, item_flag_none), - MENU_ITEM (TxtNo, icon_networkDontShow, item_flag_none), + MENU_ITEM (TxtYes, icon_networkShow, item_flag_none), + MENU_ITEM (TxtNo, icon_networkDontShow, item_flag_none), END_MENU(menuProviderIconSet, menuListArea,COLOUR_LIST_SUBMENU) #endif @@ -2595,12 +2588,12 @@ //xashmic 27 Sep 2006, OMAPS00096389 #ifdef FF_MMI_USBMS BEGIN_MENU(menuPS) - MENU_ITEM (TxtPSShutdown, setUSBMSPS, item_flag_none), - MENU_ITEM (TxtNoPSShutdown, setUSBMSPS, item_flag_none), + MENU_ITEM (TxtPSShutdown, setUSBMSPS, item_flag_none), + MENU_ITEM (TxtNoPSShutdown, setUSBMSPS, item_flag_none), END_MENU(menuPS, menuListArea,COLOUR_LIST_SUBMENU) BEGIN_MENU(menuPopup) - MENU_ITEM (TxtYes, setUSBMSPopup, item_flag_none), - MENU_ITEM (TxtNo, setUSBMSPopup, item_flag_none), + MENU_ITEM (TxtYes, setUSBMSPopup, item_flag_none), + MENU_ITEM (TxtNo, setUSBMSPopup, item_flag_none), END_MENU(menuPopup, menuListArea,COLOUR_LIST_SUBMENU) BEGIN_MENU( menuUSBPortOptions ) MENU_ITEM( TxtUSBMS, mmi_usb_enumeration, item_flag_none ), @@ -2612,30 +2605,30 @@ MENU_ITEM( TxtAll, mmi_usb_enumeration, item_flag_none ), END_MENU( menuUSBPortOptions, menuListArea, COLOUR_LIST_SUBMENU ) BEGIN_MENU(menuUSBMS) - SUB_MENU (TxtPS, menuPS, item_flag_none), - SUB_MENU (TxtPopupMenu, menuPopup, item_flag_none), - SUB_MENU(TxtUSBMSPorts, menuUSBPortOptions, item_flag_none), + SUB_MENU (TxtPS, menuPS, item_flag_none), + SUB_MENU (TxtPopupMenu, menuPopup, item_flag_none), + SUB_MENU(TxtUSBMSPorts, menuUSBPortOptions, item_flag_none), END_MENU(menuUSBMS, menuListArea,COLOUR_LIST_SUBMENU) #endif /*OMAPS00098881(removing power variant) a0393213(Prabakar)*/ #ifdef FF_POWER_MANAGEMENT BEGIN_MENU(menuScreenUpdate) - MENU_ITEM(TxtOn, screenUpdateOn, item_flag_none), - MENU_ITEM(TxtOff, screenUpdateOff,item_flag_none) + MENU_ITEM(TxtOn, screenUpdateOn, item_flag_none), + MENU_ITEM(TxtOff, screenUpdateOff,item_flag_none) END_MENU(menuScreenUpdate, menuListArea, COLOUR_LIST_SUBMENU) #endif BEGIN_MENU( menuSet ) #ifdef _TESTING__ - SUB_MENU(TxtExtra, menuCphsTesting, item_flag_none), + SUB_MENU(TxtExtra, menuCphsTesting, item_flag_none), #endif SUB_MENU( TxtLanguages, menuLanguage, item_flag_none ), #ifdef MMI_GPRS_ENABLED SUB_MENU( TxtGPRS, menuDataSettings, item_flag_none ), #endif - SUB_MENU( TxtTones, menuTonesSet, item_flag_none ), + SUB_MENU( TxtTones, menuTonesSet, item_flag_none ), SUB_MENU( TxtClock, menuTypclock, item_flag_none ), SUB_MENU( TxtAutoredial, menuAutoRedialSet, item_flag_none ), #ifdef FF_TIMEZONE @@ -2656,17 +2649,17 @@ MENU_ITEM( TxtAnyKeyAnswer,(MenuFunc)settingsFocusCurSelAnyKeyAns, item_flag_none ), MENU_ITEM( TxtFactoryReset, factoryReset, item_flag_none ), #ifdef COLOURDISPLAY - SUB_MENU( TxtColourMenu, menuColourObjects, item_flag_none ), - SUB_MENU( TxtBackground, menuBackgroundScrSelect, item_flag_none ), + SUB_MENU( TxtColourMenu, menuColourObjects, item_flag_none ), + SUB_MENU( TxtBackground, menuBackgroundScrSelect, item_flag_none ), // change by Sasken (VVADIRAJ) on March 31th 2004 // Issue Number : MMI-SPR-12822 // changed submenu to menuitem to call a function -// SUB_MENU( TxtProviderIcon, menuProviderIconSet, item_flag_none ), - MENU_ITEM( TxtProviderIcon, (MenuFunc)settingsFocusNwIconCurSel, item_flag_none ), +// SUB_MENU( TxtProviderIcon, menuProviderIconSet, item_flag_none ), + MENU_ITEM( TxtProviderIcon, (MenuFunc)settingsFocusNwIconCurSel, item_flag_none ), #endif //xrashmic 9 Sep 2006, OMAPS00092732 #ifdef FF_MMI_USBMS - SUB_MENU( TxtUSBMS, menuUSBMS, item_flag_none ), + SUB_MENU( TxtUSBMS, menuUSBMS, item_flag_none ), #endif /*OMAPS00098881(removing power variant) a0393213(Prabakar)*/ #ifdef FF_POWER_MANAGEMENT @@ -2679,10 +2672,10 @@ /* SPR890 - SH - Test mode menu */ #ifdef MMI_TEST_MODE BEGIN_MENU( menuTestMode ) - MENU_ITEM_SELECT( TxtTest, test_function, item_flag_none, testSelected), - MENU_ITEM( TxtTest, test_function, item_flag_none ), - MENU_ITEM( TxtTest, test_function, item_flag_none ), - MENU_ITEM( TxtTest, test_function, item_flag_none ) + MENU_ITEM_SELECT( TxtTest, test_function, item_flag_none, testSelected), + MENU_ITEM( TxtTest, test_function, item_flag_none ), + MENU_ITEM( TxtTest, test_function, item_flag_none ), + MENU_ITEM( TxtTest, test_function, item_flag_none ) END_MENU( menuTestMode, menuListArea ) #endif /*---------------------------------------------------------------------------*/ @@ -2690,10 +2683,10 @@ /* SPR890 - SH - Test mode menu */ #ifdef MMI_TEST_MODE BEGIN_MENU( menuTestMode ) - MENU_ITEM_SELECT( TxtTest, test_function, item_flag_none, testSelected), - MENU_ITEM( TxtTest, test_function, item_flag_none ), - MENU_ITEM( TxtTest, test_function, item_flag_none ), - MENU_ITEM( TxtTest, test_function, item_flag_none ) + MENU_ITEM_SELECT( TxtTest, test_function, item_flag_none, testSelected), + MENU_ITEM( TxtTest, test_function, item_flag_none ), + MENU_ITEM( TxtTest, test_function, item_flag_none ), + MENU_ITEM( TxtTest, test_function, item_flag_none ) END_MENU( menuTestMode, menuListArea ) #endif /*---------------------------------------------------------------------------*/ @@ -2705,13 +2698,13 @@ #ifdef SIM_TOOLKIT/*MC SPR 975, added compiler switch*/ MENU_ICON_ITEM( &mainIconSimToolkit,TxtSimToolkit, menuSimItemCallback, sim_toolkit_check ), #endif - SUB_ICON_MENU ( &mainIconMessages,TxtMessages, menuMsg, item_flag_none ), + SUB_ICON_MENU ( &mainIconMessages,TxtMessages, menuMsg, item_flag_none ), SUB_ICON_MENU ( &mainIconPhonebook,TxtPhonebook, menuPhbk, item_flag_none ), SUB_ICON_MENU ( &mainIconRecentCalls,TxtRecentCalls, menuRecent, item_flag_none ), SUB_ICON_MENU ( &mainIconCallDivert,TxtNetworkServices, menuNetwork, item_flag_none ), SUB_ICON_MENU ( &mainIconSecurity,TxtSecurity, menuSecurity, item_flag_none ), SUB_ICON_MENU ( &mainIconCalculator,TxtApplications, menuApplications, item_flag_none ), - SUB_ICON_MENU ( &mainIconSettings,TxtPhoneSettings, menuSet, item_flag_none ), + SUB_ICON_MENU ( &mainIconSettings,TxtPhoneSettings, menuSet, item_flag_none ), #ifdef FF_WAP MENU_ICON_ITEM ( &mainIconWAP,TxtWAP, AUI_menu, item_flag_none ) #endif @@ -2781,7 +2774,7 @@ return (MfwMnuAttr *) &menuNameOptions; } // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// FDN Numbers menu +// FDN Numbers menu MfwMnuAttr *bookNameMenuFDNAttributes( void ) { return (MfwMnuAttr *) &bookFDNNumbers; @@ -2798,7 +2791,7 @@ MfwMnuAttr *ringerVolumeLevels( void ) { - return (MfwMnuAttr *) &menuSelectVolume; + return (MfwMnuAttr *) &menuSelectVolume; } /*MC, SPR 1327, access UPN options menu*/ @@ -2872,14 +2865,14 @@ MfwMnuAttr *fileviewerMenuAttributes( void )//file viewer { - return (MfwMnuAttr *) &menuFileViewer; + return (MfwMnuAttr *) &menuFileViewer; } #endif #ifdef FF_MMI_FILE_VIEWER MfwMnuAttr *ViewOptionsMenuAttributes( void )//file viewer { - return (MfwMnuAttr *) &menuViewOptions; + return (MfwMnuAttr *) &menuViewOptions; } #endif @@ -2967,7 +2960,7 @@ MfwMnuItem *WAPConnectionTypeItems(void) { - return (MfwMnuItem *) menuWAPConnectionTypeItems; + return (MfwMnuItem *) menuWAPConnectionTypeItems; } /* SPR#1983 - SH */ @@ -2979,7 +2972,7 @@ MfwMnuItem *WAPConnectionSpeedItems(void) { - return (MfwMnuItem *) menuWAPConnectionSpeedItems; + return (MfwMnuItem *) menuWAPConnectionSpeedItems; } /* SPR#2324 - SH - "access type" menu is now GPRS/Dialup menu */ @@ -2991,7 +2984,7 @@ MfwMnuItem *WAPGPRSDialupItems(void) { - return (MfwMnuItem *) menuWAPGPRSDialupItems; + return (MfwMnuItem *) menuWAPGPRSDialupItems; } MfwMnuAttr *WAPGPRSProfileAttributes(void) @@ -3112,12 +3105,12 @@ #if defined (FF_WAP) && defined (FF_GPF_TCPIP) MfwMnuAttr *WAPPPGAuthenticationAttributes(void) { - return (MfwMnuAttr*)&MenuPPGAuthenticationOptions; + return (MfwMnuAttr*)&MenuPPGAuthenticationOptions; } MfwMnuAttr *WAPWirelessProfiledHTTPAttributes(void) { - return (MfwMnuAttr*)&MenuWirelessProfiledHTTPOptions; + return (MfwMnuAttr*)&MenuWirelessProfiledHTTPOptions; } #endif /* SPR#1112 - SH - Menus for internal phonebook */ @@ -3189,7 +3182,7 @@ *******************************************************************************/ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ /******************************************************************************* @@ -3197,7 +3190,7 @@ $Description: Routine to check if TFlash exists or not - $Returns: 0 : Enable TFlash in all Menus; + $Returns: 0 : Enable TFlash in all Menus; MNU_ITEM_HIDE : Hide TFlash in all Menus $Arguments: MfwMnuTag* , MfwMnuAttrTag*, MfwMnuItemTag* @@ -3212,40 +3205,40 @@ /********************************************************/ #ifdef FF_MMI_TFLASH - char curDir[10]; - UINT16 curDir_uc[10]; - UINT16 objName_uc[10]; - char objName[10]; - T_RFS_DIR f_dir; - - strcpy(curDir, "/"); - convert_u8_to_unicode(curDir, curDir_uc); - - if (rfs_opendir (curDir_uc, &f_dir) < 0) - { - TRACE_EVENT_P1("Opening dir %s Failed",curDir); - return MNU_ITEM_HIDE; - } - - while(rfs_readdir (&f_dir, objName_uc, FM_MAX_OBJ_NAME_LENGTH) > 0x0 ) - { - if (objName_uc[0] == '\0') - { - return MNU_ITEM_HIDE; - } - - convert_unicode_to_u8(objName_uc, objName); - - if(strcmp(objName,"MMC")==0) - { - rfs_closedir(&f_dir); - return 0; - } - } - - rfs_closedir(&f_dir); - - return MNU_ITEM_HIDE; + char curDir[10]; + UINT16 curDir_uc[10]; + UINT16 objName_uc[10]; + char objName[10]; + T_RFS_DIR f_dir; + + strcpy(curDir, "/"); + convert_u8_to_unicode(curDir, curDir_uc); + + if (rfs_opendir (curDir_uc, &f_dir) < 0) + { + TRACE_EVENT_P1("Opening dir %s Failed",curDir); + return MNU_ITEM_HIDE; + } + + while(rfs_readdir (&f_dir, objName_uc, FM_MAX_OBJ_NAME_LENGTH) > 0x0 ) + { + if (objName_uc[0] == '\0') + { + return MNU_ITEM_HIDE; + } + + convert_unicode_to_u8(objName_uc, objName); + + if(strcmp(objName,"MMC")==0) + { + rfs_closedir(&f_dir); + return 0; + } + } + + rfs_closedir(&f_dir); + + return MNU_ITEM_HIDE; /********************************************************/ /* If the TFlash Feature Flag is disabled, then hide TFlash Item */ @@ -3253,7 +3246,7 @@ #else - return MNU_ITEM_HIDE; + return MNU_ITEM_HIDE; #endif @@ -3266,7 +3259,7 @@ $Description: Routine to check if NAND exists or not - $Returns: 0 : Enable NAND in all Menus; + $Returns: 0 : Enable NAND in all Menus; MNU_ITEM_HIDE : Hide NAND in all Menus $Arguments: MfwMnuTag* , MfwMnuAttrTag*, MfwMnuItemTag* @@ -3280,7 +3273,7 @@ /********************************************************/ #ifdef FF_MMI_NAND - return 0; + return 0; /********************************************************/ /* If the NAND Feature Flag is enabled, then hide the Menu Item */ @@ -3288,7 +3281,7 @@ #else - return MNU_ITEM_HIDE; + return MNU_ITEM_HIDE; #endif @@ -3300,7 +3293,7 @@ $Description: Routine to check if NOR exists or not - $Returns: 0 : Enable NOR in all Menus; + $Returns: 0 : Enable NOR in all Menus; MNU_ITEM_HIDE : Hide NOR in all Menus $Arguments: MfwMnuTag* , MfwMnuAttrTag*, MfwMnuItemTag* @@ -3314,7 +3307,7 @@ /********************************************************/ #ifdef FF_MMI_NOR - return 0; + return 0; /********************************************************/ /* If the NOR Feature Flag is enabled, then hide the Menu Item */ @@ -3322,7 +3315,7 @@ #else - return MNU_ITEM_HIDE; + return MNU_ITEM_HIDE; #endif @@ -3335,7 +3328,7 @@ $Description: Routine to check if NORMS exists or not - $Returns: 0 : Enable NORMS in all Menus; + $Returns: 0 : Enable NORMS in all Menus; MNU_ITEM_HIDE : Hide NORMS in all Menus $Arguments: MfwMnuTag* , MfwMnuAttrTag*, MfwMnuItemTag* @@ -3349,7 +3342,7 @@ /********************************************************/ #ifdef FF_MMI_NORMS - return 0; + return 0; /********************************************************/ /* If the NORMS Feature Flag is enabled, then hide the Menu Item */ @@ -3357,13 +3350,13 @@ #else - return MNU_ITEM_HIDE; + return MNU_ITEM_HIDE; #endif } -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ +/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ /******************************************************************************* @@ -3411,67 +3404,67 @@ *******************************************************************************/ MfwMnuAttr* create_mmi_phonebook_names_list() -{ int i; - - TRACE_EVENT("create_mmi_phonebook_names_list()"); - if (phonebook_list != NULL) - return phonebook_list; +{ int i; + + TRACE_EVENT("create_mmi_phonebook_names_list()"); + if (phonebook_list != NULL) + return phonebook_list; /*allocate memory for list of phonenumbers*/ - phonebook_list = (MfwMnuAttr*)ALLOC_MEMORY(sizeof(MfwMnuAttr)); - if (phonebook_list == NULL) - { TRACE_EVENT("Phonebook list alloc failed"); - return NULL; - } + phonebook_list = (MfwMnuAttr*)ALLOC_MEMORY(sizeof(MfwMnuAttr)); + if (phonebook_list == NULL) + { TRACE_EVENT("Phonebook list alloc failed"); + return NULL; + } /*allocate memory for the array of items in the phonebook list*/ - items_in_phonebook_list = (MfwMnuItem*)ALLOC_MEMORY(sizeof(MfwMnuItem)*NAME_LIST_SIZE); - if (items_in_phonebook_list == NULL) - { TRACE_EVENT("Phonebook list items alloc failed"); - return NULL; - } + items_in_phonebook_list = (MfwMnuItem*)ALLOC_MEMORY(sizeof(MfwMnuItem)*NAME_LIST_SIZE); + if (items_in_phonebook_list == NULL) + { TRACE_EVENT("Phonebook list items alloc failed"); + return NULL; + } /*allocate memory for the array of pointers to strings holding phonebook list text*/ - menu_item_strings = (char**)ALLOC_MEMORY(sizeof(char*)*NAME_LIST_SIZE); - if (menu_item_strings == NULL) - { TRACE_EVENT("menu item string list alloc failed"); - return NULL; - } + menu_item_strings = (char**)ALLOC_MEMORY(sizeof(char*)*NAME_LIST_SIZE); + if (menu_item_strings == NULL) + { TRACE_EVENT("menu item string list alloc failed"); + return NULL; + } /*allocate memory for each text string in turn*/ - for (i=0;i<NAME_LIST_SIZE;i++) - { menu_item_strings[i] = (char*)ALLOC_MEMORY(sizeof(char)*PHONEBOOK_ITEM_LENGTH); - if (menu_item_strings[i] == NULL) - { TRACE_EVENT(" menu item string alloc failed"); - return NULL; - } - - } + for (i=0;i<NAME_LIST_SIZE;i++) + { menu_item_strings[i] = (char*)ALLOC_MEMORY(sizeof(char)*PHONEBOOK_ITEM_LENGTH); + if (menu_item_strings[i] == NULL) + { TRACE_EVENT(" menu item string alloc failed"); + return NULL; + } + + } /*specify phonebook list menu configuration*/ - phonebook_list->area = &menuNamesArea; - phonebook_list->mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE; - phonebook_list->font = (U8)-1; - phonebook_list->items = items_in_phonebook_list; - phonebook_list->nItems = NAME_LIST_SIZE; - phonebook_list->mnuColour = COLOUR_LIST_SUBMENU; - phonebook_list->hdrId = TxtNull; - phonebook_list->bgdBitmap= NULL; - phonebook_list->unused = MNUATTRSPARE; + phonebook_list->area = &menuNamesArea; + phonebook_list->mode = MNU_LEFT | MNU_LIST | MNU_CUR_LINE; + phonebook_list->font = (U8)-1; + phonebook_list->items = items_in_phonebook_list; + phonebook_list->nItems = NAME_LIST_SIZE; + phonebook_list->mnuColour = COLOUR_LIST_SUBMENU; + phonebook_list->hdrId = TxtNull; + phonebook_list->bgdBitmap= NULL; + phonebook_list->unused = MNUATTRSPARE; /*specify configuration of each meni item*/ - for(i=0; i<NAME_LIST_SIZE; i++) - { - items_in_phonebook_list[i].icon =0; - items_in_phonebook_list[i].exta =0; - items_in_phonebook_list[i].x =0; - items_in_phonebook_list[i].str =menu_item_strings[i]; - items_in_phonebook_list[i].menu =0; - items_in_phonebook_list[i].func =0; - items_in_phonebook_list[i].flagFunc =item_flag_none; - } - - return phonebook_list; + for(i=0; i<NAME_LIST_SIZE; i++) + { + items_in_phonebook_list[i].icon =0; + items_in_phonebook_list[i].exta =0; + items_in_phonebook_list[i].x =0; + items_in_phonebook_list[i].str =menu_item_strings[i]; + items_in_phonebook_list[i].menu =0; + items_in_phonebook_list[i].func =0; + items_in_phonebook_list[i].flagFunc =item_flag_none; + } + + return phonebook_list; } /******************************************************************************* @@ -3486,33 +3479,33 @@ *******************************************************************************/ BOOL destroy_mmi_phonebook_names_list(MfwMnuAttr* pointer) -{ int i; - - - TRACE_EVENT("destroy_mmi_phonebook_names_list()"); - /*if memory not allocated for phonebook list OR the pointer passed to the function is - NOT that of the phonebook list, stop here*/ - if ((phonebook_list == NULL) || (pointer != phonebook_list)) - return FALSE; - - /*dealloacte memory for each item's text string*/ - for(i=0; i<NAME_LIST_SIZE; i++) - { FREE_MEMORY((U8*)menu_item_strings[i], sizeof(char)*PHONEBOOK_ITEM_LENGTH); - menu_item_strings[i] = NULL; - - } - /*deallocate memory for the array of pointer to text strings*/ - FREE_MEMORY((U8*)menu_item_strings, sizeof(char*)*NAME_LIST_SIZE); - - /*deallocate memory for the array of items in the phonebook list*/ - FREE_MEMORY((U8*)items_in_phonebook_list, sizeof(MfwMnuItem)*NAME_LIST_SIZE); - items_in_phonebook_list = NULL; - - /*deallocate the phonebook list menu attributes*/ - FREE_MEMORY((U8*)phonebook_list, sizeof(MfwMnuAttr)); - phonebook_list = NULL; - - return TRUE; +{ int i; + + + TRACE_EVENT("destroy_mmi_phonebook_names_list()"); + /*if memory not allocated for phonebook list OR the pointer passed to the function is + NOT that of the phonebook list, stop here*/ + if ((phonebook_list == NULL) || (pointer != phonebook_list)) + return FALSE; + + /*dealloacte memory for each item's text string*/ + for(i=0; i<NAME_LIST_SIZE; i++) + { FREE_MEMORY((U8*)menu_item_strings[i], sizeof(char)*PHONEBOOK_ITEM_LENGTH); + menu_item_strings[i] = NULL; + + } + /*deallocate memory for the array of pointer to text strings*/ + FREE_MEMORY((U8*)menu_item_strings, sizeof(char*)*NAME_LIST_SIZE); + + /*deallocate memory for the array of items in the phonebook list*/ + FREE_MEMORY((U8*)items_in_phonebook_list, sizeof(MfwMnuItem)*NAME_LIST_SIZE); + items_in_phonebook_list = NULL; + + /*deallocate the phonebook list menu attributes*/ + FREE_MEMORY((U8*)phonebook_list, sizeof(MfwMnuAttr)); + phonebook_list = NULL; + + return TRUE; } /******************************************************************************* @@ -3540,9 +3533,9 @@ */ /*SPR 2123, if memory hasn't been allocated for menu items strings return NULL*/ if (menu_item_strings != NULL) - return menu_item_strings[index]; + return menu_item_strings[index]; else - return NULL; + return NULL; } /******************************************************************************* @@ -3577,12 +3570,9 @@ MfwMnuAttr *MmiBookMenuDetailsList( void ) { - /*SPR2123, return the pointer to the phonebook list attributes, it'll be NULL - if memory has not been alloacted to it*/ - return phonebook_list; - - - + /*SPR2123, return the pointer to the phonebook list attributes, it'll be NULL + if memory has not been alloacted to it*/ + return phonebook_list; } @@ -3606,9 +3596,6 @@ } - - - /******************************************************************************* $Function: MmiBookCurrentText @@ -3633,14 +3620,14 @@ /******************************************************************************* - $Function: storeMenuOption - - $Description: Stores the ID of the text string for the currently selected menu item - - $Returns: 0 - - $Arguments: mnu - unused - numItem - selected menu item + $Function: storeMenuOption + + $Description: Stores the ID of the text string for the currently selected menu item + + $Returns: 0 + + $Arguments: mnu - unused + numItem - selected menu item GW 28/11/02 Added a general purpose storage/retrieval procedure *******************************************************************************/ @@ -3648,27 +3635,27 @@ static int storedMenuId = TxtNull; int storeMenuOption(MfwMnu* mnu, MfwMnuItem* mnuItem) { - T_MFW_HND win = mfw_parent(mfw_header()); - - storedMenuId = (int)mnuItem->str; - return(0); + T_MFW_HND win = mfw_parent(mfw_header()); + + storedMenuId = (int)mnuItem->str; + return(0); } /******************************************************************************* - $Function: MmiBook_getStoredOption - - $Description: Returns the ID of the text string stored on a menu selection - - $Returns: storedMenuId - string Id of the selected menu item - - $Arguments: none. + $Function: MmiBook_getStoredOption + + $Description: Returns the ID of the text string stored on a menu selection + + $Returns: storedMenuId - string Id of the selected menu item + + $Arguments: none. GW 28/11/02 Added a general purpose storage/retrieval procedure *******************************************************************************/ int MmiBook_getStoredOption( void) { - return (storedMenuId); + return (storedMenuId); } //SPR12822 - vvadiraj@sasken.com @@ -3683,38 +3670,38 @@ // Jul 28, 2004 REF: CRR 20899 xkundadu // Returns the 'Any Key Answer' menu to display. /******************************************************************************* - $Function: GetAnyKeyAnswerMenu - - $Description: Returns the 'Any Key Answer' menu - - $Returns: menuAnyKeySet - Menu of the 'AnyKeyAnser'. - - $Arguments: none. + $Function: GetAnyKeyAnswerMenu + + $Description: Returns the 'Any Key Answer' menu + + $Returns: menuAnyKeySet - Menu of the 'AnyKeyAnser'. + + $Arguments: none. *******************************************************************************/ MfwMnuAttr *GetAnyKeyAnswerMenu() { - return (MfwMnuAttr *) &menuAnyKeySet; + return (MfwMnuAttr *) &menuAnyKeySet; } // Jul 29, 2004 REF: CRR 20898 xkundadu // Returns the 'AutAnswer' menu to display. /******************************************************************************* - $Function: GetAutoAnswerMenu - - $Description: Returns the 'AutoAnswer' menu - - $Returns: menuAutoAnswerSet - Menu of the 'AutoKeyAnswer'. - - $Arguments: none. + $Function: GetAutoAnswerMenu + + $Description: Returns the 'AutoAnswer' menu + + $Returns: menuAutoAnswerSet - Menu of the 'AutoKeyAnswer'. + + $Arguments: none. *******************************************************************************/ MfwMnuAttr *GetAutoAnswerMenu() { - return (MfwMnuAttr *) &menuAutoAnswerSet; + return (MfwMnuAttr *) &menuAutoAnswerSet; } -// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN +// Jul 28, 2004 REF: CRR:20887 xrashmic - SASKEN // Returning the submenu for FDN submenu MfwMnuAttr *FDNMenu(void) { @@ -3729,7 +3716,7 @@ } // Sep 27,2005 REF: SPR 34402 xdeepadh // Returning the submenu for channels -// Nov 14, 2005 REF: OMAPS00044445 xdeepadh +// Nov 14, 2005 REF: OMAPS00044445 xdeepadh #if defined(FF_MMI_TEST_MP3) || defined(FF_MMI_TEST_AAC) MfwMnuAttr *PlayerChannelAttributes(void) { @@ -3737,7 +3724,7 @@ } #endif //endif FF_MMI_TEST_MP3 -// May 04, 2005 REF: CRR:30285 x0021334 +// May 04, 2005 REF: CRR:30285 x0021334 // Returning the submenu for SMS Status Report submenu MfwMnuAttr *SmsStatusReportAttributes(void) { @@ -3915,4 +3902,3 @@ End of File *******************************************************************************/ -
--- a/src/ui/bmi/mmiBookUtils.c Sat Nov 14 04:29:03 2020 +0000 +++ b/src/ui/bmi/mmiBookUtils.c Sat Nov 14 08:43:59 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: PhoneBook - $File: MmiBookUtils.c - $Revision: 1.0 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: PhoneBook + $File: MmiBookUtils.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -29,83 +29,83 @@ $History: MmiBookUtils.c $History: MmiBookUtils.c - Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) - Description: PhoneBook: Unexpected confirmation message when making changes to entries in SIM storage. - Solution: Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event. + Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) + Description: PhoneBook: Unexpected confirmation message when making changes to entries in SIM storage. + Solution: Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event. - 17 Aug, 2007 DR: OMAPS00141963 x0066814(Geetha) - Description: PhoneBook: The "Options" menu is not returned after a current entry is copied. - Solution: After copying, the menu control was not being returned back to the right window. - Added a callback, that will be called after copying an entry, where the control wil be returned to - correct window. + 17 Aug, 2007 DR: OMAPS00141963 x0066814(Geetha) + Description: PhoneBook: The "Options" menu is not returned after a current entry is copied. + Solution: After copying, the menu control was not being returned back to the right window. + Added a callback, that will be called after copying an entry, where the control wil be returned to + correct window. July 11, 2007 DR:OMAPS00137908 x00666692(Asha) Description:PHONEBOOK: changing name or number under SIM storage, Please Wait message appears instead of Saved Solution :Changes made to handle the condition MFW_PHB_EXCT in the function changeInFile() - which modifies the phone book entry. + which modifies the phone book entry. 27 June, 2007 DR: OMAPS00136608 x0073106(sundeep) Description:PHONEBOOK-Unexpected behavior when copying all entries from Phone to SIM Solution :Updated the execution state(MFW_PHB_EXCT) in the phonebook. June 27, 2007 DR:OMAPS00136627 x0062172(Syed) - Description:PHONEBOOK: Unexpected behavior when moving all entries from Phone to SIM + Description:PHONEBOOK: Unexpected behavior when moving all entries from Phone to SIM Solution : Return Proper Value after phb_store_entry() in bookCopy to move all the entries - properly. + properly. June 05, 2007 DR:OMAPS00133241 x0061560(sateeshg) Description:ASTEC29607,SIM:The sim card should not return 9240 still. Solution :MMI should not display "Saved" after db is updated but has to wait until SIM is - updated with the entry and RAT_OK is received from ACI. + updated with the entry and RAT_OK is received from ACI. - June 06, 2007 DR:OMAPS00132045 x0073106 Sundeep - Description : Phonebook- behaviour inconsistency in the MMI when move contact - Solution : changed a if condition in function bookCopyMultiple(), in the if(move). + June 06, 2007 DR:OMAPS00132045 x0073106 Sundeep + Description : Phonebook- behaviour inconsistency in the MMI when move contact + Solution : changed a if condition in function bookCopyMultiple(), in the if(move). JUNE 4,07 (sateeshg) OMAPS00131777, x0061560 Phonebook - Delete all command for phonebook contacts answer "list empty" even if there are contacts in the list - Solution:Updated the current status of the phonebook + Solution:Updated the current status of the phonebook - Apr 30,2007, OMAPS00129173, x0066814(Geetha) - Description : Phone crashes if 'Delete All' is done on SIM contacts when SIM memory is empty - Solution: Added a condition in bookDeleteBook to check the number of used entries in the seleted phonebook. - If the condition is satified then the delete operation will proceed else an 'Empty List' dialog is displayed. + Apr 30,2007, OMAPS00129173, x0066814(Geetha) + Description : Phone crashes if 'Delete All' is done on SIM contacts when SIM memory is empty + Solution: Added a condition in bookDeleteBook to check the number of used entries in the seleted phonebook. + If the condition is satified then the delete operation will proceed else an 'Empty List' dialog is displayed. Nov 17, 2006 DR:OMAPS00104376 a0393213(R.Prabakar) Description : When tried to delete the last entry either incase of SIM or Phone book (i.e. last deletion), the board resets. Solution : The crash happens because of race condition between actual deletion by ACI and status check in BMI. Now the status before deletion is stored and status check is done on this previous status. - Aug 18, 2006 ER: OMAPS00089840 x0039928 - Description: Changes to be made in MMI for the functionality "Delete all" ADN entries - Solution: A new menu item "Delete All" is added in the phone book menu and bookDeleteBook - is called to delete all the phone book entries. + Aug 18, 2006 ER: OMAPS00089840 x0039928 + Description: Changes to be made in MMI for the functionality "Delete all" ADN entries + Solution: A new menu item "Delete All" is added in the phone book menu and bookDeleteBook + is called to delete all the phone book entries. - July 17, 2006 DR: OMAPS00082792 x0039928 - Description:Changes to be done in MMI for Move all entries from SIM to FFS (Defect 76492) - Solution: Condition to delete search window in deleteFromFile is modified. + July 17, 2006 DR: OMAPS00082792 x0039928 + Description:Changes to be done in MMI for Move all entries from SIM to FFS (Defect 76492) + Solution: Condition to delete search window in deleteFromFile is modified. - June 01, 2006 DR: OMAPS00079716 - Description:Phonebook: List of entries is not refreshed after a phonebook entry move - Solution: Added a new callback function to handle the populating of phonebook entries + June 01, 2006 DR: OMAPS00079716 + Description:Phonebook: List of entries is not refreshed after a phonebook entry move + Solution: Added a new callback function to handle the populating of phonebook entries - Feb 20, 2006 REF: OMAPS00061948 x0039928 - Bug:PhoneBook-My number menu -failed. - Fix: phb_read_entries is called with used entries as the no of entries if used entries are less than - MAX_SEARCH_NAME. + Feb 20, 2006 REF: OMAPS00061948 x0039928 + Bug:PhoneBook-My number menu -failed. + Fix: phb_read_entries is called with used entries as the no of entries if used entries are less than + MAX_SEARCH_NAME. - Jan 27, 2006 REF: OMAPS00061925 x0039928 - Bug:Phonebook-Changing an entry and Immidiately deleting the entry failed. - Fix: Phonebook is populated with phone numbers after some time and not immediately after deleting an entry. + Jan 27, 2006 REF: OMAPS00061925 x0039928 + Bug:Phonebook-Changing an entry and Immidiately deleting the entry failed. + Fix: Phonebook is populated with phone numbers after some time and not immediately after deleting an entry. - Jan 22, 2006 REF: OMAPS00061930 x0039928 - Bug:PhoneBook -Change entry and view entry through Change option-failed - Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries. + Jan 22, 2006 REF: OMAPS00061930 x0039928 + Bug:PhoneBook -Change entry and view entry through Change option-failed + Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries. - 25/10/00 Original Condat(UK) BMI version. + 25/10/00 Original Condat(UK) BMI version. $End @@ -178,7 +178,6 @@ #include "MmiLists.h" - #include "MmiMenu.h" #include "mmiCall.h" #include "Mmiicons.h" @@ -205,8 +204,8 @@ // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P // Issue description: Followup from 15623, this is the BMI part of this Issue. -// At last, in the record "SSC09" the number is displayed with the "+" -// character at the beginning of the number instead of "**21*+014543877989#". +// At last, in the record "SSC09" the number is displayed with the "+" +// character at the beginning of the number instead of "**21*+014543877989#". extern int menuFDN; @@ -219,7 +218,7 @@ // Fix : Initialize Delete All flag and a window handler of please wait dialog. BOOL DeleteAll_flag = FALSE; T_MFW_HND waitWindel = NULL; - //x0061560 Date May17,07 (sateeshg) OMAPS00133241 + //x0061560 Date May17,07 (sateeshg) OMAPS00133241 BOOL addname_flag = FALSE; /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event. */ @@ -259,13 +258,13 @@ /******************************************************************************* - $Function: changeName + $Function: changeName - $Description: Change a phone book entry if we have a valid book selected + $Description: Change a phone book entry if we have a valid book selected - $Returns: status of change, or MWB_PHB_FAIL if an error occurs + $Returns: status of change, or MWB_PHB_FAIL if an error occurs - $Arguments: book, to be updated + $Arguments: book, to be updated entry, to update currentStatus, pointer to status word @@ -273,33 +272,27 @@ static UBYTE changeName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus ) { - - TRACE_FUNCTION( "changeName()" ); + TRACE_FUNCTION( "changeName()" ); - /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */ - changename_flag = TRUE; + /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */ + changename_flag = TRUE; - if ( book == PHB_SDN ) - return MFW_PHB_FAIL; + if ( book == PHB_SDN ) + return MFW_PHB_FAIL; - return phb_store_entry( book, entry, currentStatus ); + return phb_store_entry( book, entry, currentStatus ); } - - - - - /******************************************************************************* - $Function: deleteName + $Function: deleteName - $Description: Delete a phone book entry + $Description: Delete a phone book entry - $Returns: status of delete, or MWB_PHB_FAIL if an error occurs + $Returns: status of delete, or MWB_PHB_FAIL if an error occurs - $Arguments: book, to be updated + $Arguments: book, to be updated index, index of entry to delete currentStatus, pointer to status word @@ -307,32 +300,24 @@ static UBYTE deleteName( UBYTE book, UBYTE index, T_MFW_PHB_STATUS *currentStatus ) { - TRACE_FUNCTION( "deleteName()" ); - - if ( book == PHB_SDN ) - return MFW_PHB_FAIL; - - return phb_delete_entry( book, index, currentStatus ); -} + TRACE_FUNCTION( "deleteName()" ); - - - + if ( book == PHB_SDN ) + return MFW_PHB_FAIL; - - - + return phb_delete_entry( book, index, currentStatus ); +} /******************************************************************************* - $Function: addName + $Function: addName - $Description: Add a new name to the phone book + $Description: Add a new name to the phone book - $Returns: status of change, or MWB_PHB_FAIL if an error occurs + $Returns: status of change, or MWB_PHB_FAIL if an error occurs - $Arguments: book, to be updated + $Arguments: book, to be updated entry, to update currentStatus, pointer to status word @@ -340,7 +325,7 @@ static UBYTE addName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus ) { - TRACE_FUNCTION( "addName()" ); + TRACE_FUNCTION( "addName()" ); //MC-- Commented out UPN-specific code as it causes the name string in a UPN //entry to be stored incorrectly and doesn't seem to be neccessary. @@ -348,57 +333,51 @@ { /* normal store operation */ - { - char temp[120]; - memset(temp,'\0',100); - //x0061560 Date May17,07 (sateeshg) OMAPS00133241 - addname_flag = TRUE; + { + char temp[120]; + memset(temp,'\0',100); + //x0061560 Date May17,07 (sateeshg) OMAPS00133241 + addname_flag = TRUE; #ifdef NO_ASCIIZ { - T_MFW_PHB_TEXT buf; + T_MFW_PHB_TEXT buf; - /*SPR 1752 check for unicode*/ - if (entry->name.data[0] ==0x80) - { - /*MC, don't do any conversions!!*/ - TRACE_EVENT("Converting Unicode 2 SIM"); + /*SPR 1752 check for unicode*/ + if (entry->name.data[0] ==0x80) + { + /*MC, don't do any conversions!!*/ + TRACE_EVENT("Converting Unicode 2 SIM"); - sprintf(temp,"Book: %d Name %s Number %s", - book, - (char*)buf.data,(char*)entry->number); + sprintf(temp,"Book: %d Name %s Number %s", + book, + (char*)buf.data,(char*)entry->number); - } - else + } + else - { - // convert from GSM to Alpha characters - bookGsm2Alpha( (UBYTE *) entry->name.data ); + { + // convert from GSM to Alpha characters + bookGsm2Alpha( (UBYTE *) entry->name.data ); - sprintf(temp,"Book: %d Name %s Number %s", - book, - (char*)entry->name.data,(char*)entry->number); - } + sprintf(temp,"Book: %d Name %s Number %s", + book, + (char*)entry->name.data,(char*)entry->number); + } } #else - sprintf(temp,"Book: %d Name %s Number %s", - book, - (char*)entry->name,(char*)entry->number); + sprintf(temp,"Book: %d Name %s Number %s", + book, + (char*)entry->name,(char*)entry->number); #endif - TRACE_EVENT(temp); - } - entry->index = 0; + TRACE_EVENT(temp); + } + entry->index = 0; return phb_store_entry( book, entry, currentStatus ); } } - - - - - - /******************************************************************************* File Handling Utilities @@ -407,22 +386,22 @@ /******************************************************************************* - $Function: storeInFile + $Function: storeInFile - $Description: Converts the name to a storeable format and stores it + $Description: Converts the name to a storeable format and stores it in the phone book - $Returns: None + $Returns: None - $Arguments: phbk, pointer to phonebook structure + $Arguments: phbk, pointer to phonebook structure *******************************************************************************/ void storeInFile( T_phbk *phbk ) -{ int i; - UBYTE actual_length = 0; - char debug[20]; - TRACE_FUNCTION( "storeInFile()" ); +{ int i; + UBYTE actual_length = 0; + char debug[20]; + TRACE_FUNCTION( "storeInFile()" ); /* Convert the name */ @@ -434,31 +413,31 @@ if (phbk->edt_buf_name[0] == 0x80)//if unicode { - /*a0393213 lint warning:Possible creation of out-of-bounds pointer soln:PHB_MAX_LEN changed to MAX_ALPHA_LEN-1*/ - for (i =0; i < (MAX_ALPHA_LEN-1); i+=2) //work out string length - { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0) - { if (i== 0) - actual_length =0; - else - actual_length = i -2; - break; - } - } - phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string - phbk->edt_buf_name[1] = 0x00; + /*a0393213 lint warning:Possible creation of out-of-bounds pointer soln:PHB_MAX_LEN changed to MAX_ALPHA_LEN-1*/ + for (i =0; i < (MAX_ALPHA_LEN-1); i+=2) //work out string length + { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0) + { if (i== 0) + actual_length =0; + else + actual_length = i -2; + break; + } + } + phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string + phbk->edt_buf_name[1] = 0x00; /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN*/ memset(phbk->newEntry.name.data, 0,MAX_ALPHA_LEN); //convert to SIM string - mfw_Ucs2SIMStr( MFW_DCS_UCS2 , (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN, + mfw_Ucs2SIMStr( MFW_DCS_UCS2 , (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN, phbk->newEntry.name.data, &phbk->newEntry.name.len ); - TRACE_EVENT( (char*)phbk->newEntry.name.data); - sprintf(debug, "length:%d", phbk->newEntry.name.len); - TRACE_EVENT(debug); + TRACE_EVENT( (char*)phbk->newEntry.name.data); + sprintf(debug, "length:%d", phbk->newEntry.name.len); + TRACE_EVENT(debug); } else { - mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN, + mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN, phbk->newEntry.name.data, &phbk->newEntry.name.len ); } @@ -471,13 +450,13 @@ /* update the number */ strncpy( (char *) phbk->newEntry.number, (char *) phbk->edt_buf_number, PHB_MAX_LEN ); - /*SPR 1327, copy current phonebook type to new entry*/ - phbk->newEntry.book = phbk->current.status.book; - /*If current phonebook UPN, don't overwrite phonebook type*/ - // Feb 20, 2006 REF: OMAPS00061948 x0039928 - // Fix : A check is made with enum PHB_UPN of MFW instead of UPN of ACI - if( phbk->newEntry.book != PHB_UPN) - phbk->newEntry.book = bookActiveBook(WRITE); + /*SPR 1327, copy current phonebook type to new entry*/ + phbk->newEntry.book = phbk->current.status.book; + /*If current phonebook UPN, don't overwrite phonebook type*/ + // Feb 20, 2006 REF: OMAPS00061948 x0039928 + // Fix : A check is made with enum PHB_UPN of MFW instead of UPN of ACI + if( phbk->newEntry.book != PHB_UPN) + phbk->newEntry.book = bookActiveBook(WRITE); phbk->newEntry.index = 0; /* Add the name/number combination to the phone book and setup @@ -492,16 +471,16 @@ MmiBookSetCurrentText( TxtSaved ); } break; - //x0061560 Date May16,07 (sateeshg) OMAPS00133241 - case MFW_PHB_EXCT : + //x0061560 Date May16,07 (sateeshg) OMAPS00133241 + case MFW_PHB_EXCT : { /* Entry saved okay */ MmiBookSetCurrentText( TxtPleaseWait ); - // MmiBookSetCurrentText( TxtSaved ); + // MmiBookSetCurrentText( TxtSaved ); } - //end + //end break; case MFW_PHB_FULL : @@ -520,7 +499,7 @@ } break; - default: + default: { /* No other returns possible */ @@ -530,67 +509,62 @@ } - - - - - /******************************************************************************* - $Function: changeInFile + $Function: changeInFile - $Description: change the phone book entry + $Description: change the phone book entry - $Returns: none + $Returns: none - $Arguments: phbk, pointer to phonebook structure + $Arguments: phbk, pointer to phonebook structure *******************************************************************************/ void changeInFile( T_phbk *phbk ) -{ int i; - int actual_length=0; - TRACE_FUNCTION( "changeInFile()" ); +{ int i; + int actual_length=0; + TRACE_FUNCTION( "changeInFile()" ); - if(phbk->current.status.book == PHB_ADN_FDN) - phbk->current.status.book = PHB_ADN; //JVJE We can only store in ADN/FDN - else - phbk->current.status.book = phbk->current.status.book; + if(phbk->current.status.book == PHB_ADN_FDN) + phbk->current.status.book = PHB_ADN; //JVJE We can only store in ADN/FDN + else + phbk->current.status.book = phbk->current.status.book; - TRACE_EVENT_P1("Current Book = %d", phbk->current.status.book); - TRACE_EVENT_P1("Current Name = %d", phbk->current.selectedName); - TRACE_EVENT_P1("Current Buf Name = %s", phbk->edt_buf_name); + TRACE_EVENT_P1("Current Book = %d", phbk->current.status.book); + TRACE_EVENT_P1("Current Name = %d", phbk->current.selectedName); + TRACE_EVENT_P1("Current Buf Name = %s", phbk->edt_buf_name); /* Convert the name */ #ifdef NO_ASCIIZ - /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ if (phbk->edt_buf_name[0] == 0x80)//if unicode { /*a0393213 lint warning:Possible access of out-of-bounds pointer soln:MAX_ALPHA_LEN-1*/ - for (i =0; i < MAX_ALPHA_LEN-1; i+=2) //work out string length - { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0) - { if (i== 0) - actual_length =0; - else - actual_length = i -2; - break; - } - } - phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string - phbk->edt_buf_name[1] = 0x00; + for (i =0; i < MAX_ALPHA_LEN-1; i+=2) //work out string length + { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0) + { if (i== 0) + actual_length =0; + else + actual_length = i -2; + break; + } + } + phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string + phbk->edt_buf_name[1] = 0x00; memset(phbk->current.entry[phbk->current.selectedName].name.data, 0, MAX_ALPHA_LEN); //convert to SIM string - mfw_Ucs2SIMStr( MFW_DCS_UCS2, (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN, + mfw_Ucs2SIMStr( MFW_DCS_UCS2, (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN, phbk->current.entry[phbk->current.selectedName].name.data, &phbk->current.entry[phbk->current.selectedName].name.len ); } else - { mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN, + { mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN, phbk->current.entry[phbk->current.selectedName].name.data, &phbk->current.entry[phbk->current.selectedName].name.len ); - } + } #else strncpy( (char *) phbk->current.entry[ phbk->current.selectedName ].name, @@ -625,25 +599,25 @@ MmiBookSetCurrentText( TxtWriteError ); } break; - /* x0056422 on Aug 02,2007 for - OMAPS00140447 - PhoneBook: Unexpected confirmation message - when making changes to entries in SIM storage. */ + /* x0056422 on Aug 02,2007 for + OMAPS00140447 - PhoneBook: Unexpected confirmation message + when making changes to entries in SIM storage. */ // July 11, 2007 DR:OMAPS00137908 x00666692(Asha) //PHONEBOOK: changing name or number under SIM storage, Please Wait //message appears instead of Saved - case MFW_PHB_EXCT : + case MFW_PHB_EXCT : { /* Operation in progress */ MmiBookSetCurrentText( TxtPleaseWait ); - // MmiBookSetCurrentText( TxtSaved ); + // MmiBookSetCurrentText( TxtSaved ); } - //end + //end break; - default: + default: { /* No other returns possible */ @@ -653,37 +627,30 @@ } - - - - - - - /******************************************************************************* - $Function: deleteFromFile + $Function: deleteFromFile - $Description: delete an entry from a phone book + $Description: delete an entry from a phone book - $Returns: None + $Returns: None - $Arguments: phbk, phone book handle, + $Arguments: phbk, phone book handle, book, book to update, *******************************************************************************/ void deleteFromFile( T_phbk *phbk, UBYTE book ) { - int index; - T_MFW_PHB_STATUS phb_status_before_delete; /*OMAPS00104376 a0393213(R.Prabakar)*/ + int index; + T_MFW_PHB_STATUS phb_status_before_delete; /*OMAPS00104376 a0393213(R.Prabakar)*/ - TRACE_FUNCTION( "deleteFromFile()" ); + TRACE_FUNCTION( "deleteFromFile()" ); - index = phbk->current.selectedName - phbk->current.missedCallsOffset; - /*OMAPS00104376 a0393213(R.Prabakar)- getting the status of the phonebook before deletion*/ - phb_status_before_delete.book=book; - bookGetCurrentStatus( &phb_status_before_delete ); + index = phbk->current.selectedName - phbk->current.missedCallsOffset; + /*OMAPS00104376 a0393213(R.Prabakar)- getting the status of the phonebook before deletion*/ + phb_status_before_delete.book=book; + bookGetCurrentStatus( &phb_status_before_delete ); switch ( deleteName( book, phbk->current.entry[index].index, &phbk->current.status ) ) { @@ -694,52 +661,52 @@ MmiBookSetCurrentText( TxtEntryDeleted ); #ifdef NO_ASCIIZ - phbk->current.entry[index].name.len = 0; - memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); + phbk->current.entry[index].name.len = 0; + memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); #else /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - memset((char*)phbk->current.entry[index].name, '\0', MAX_ALPHA_LEN); - memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); + memset((char*)phbk->current.entry[index].name, '\0', MAX_ALPHA_LEN); + memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN); #endif /* Move the current index to the next valid entry */ - if(phbk->current.selectedName > 0) - phbk->current.selectedName --; - else - phbk->current.selectedName = 0; + if(phbk->current.selectedName > 0) + phbk->current.selectedName --; + else + phbk->current.selectedName = 0; - if(phbk->current.index > 1) - phbk->current.index--; - else - phbk->current.index = 1; + if(phbk->current.index > 1) + phbk->current.index--; + else + phbk->current.index = 1; /* And if we have a search window, perform the search to update the current valid entry */ - if ( phbk->search_win ) + if ( phbk->search_win ) { - // July 17, 2006 DR: OMAPS00082792 x0039928 - // Check used entry is 1 as delete is not complete yet as it is asynchronous. - /*Nov 17,2006 OMAPS00104376 a0393213(R.Prabakar) - Now the check is done with the status got before deletion instead of the status got after deletion*/ - if (phb_status_before_delete.used_entries == 1) + // July 17, 2006 DR: OMAPS00082792 x0039928 + // Check used entry is 1 as delete is not complete yet as it is asynchronous. + /*Nov 17,2006 OMAPS00104376 a0393213(R.Prabakar) + Now the check is done with the status got before deletion instead of the status got after deletion*/ + if (phb_status_before_delete.used_entries == 1) { /* empty phone book */ - bookSearchDestroy( phbk->search_win ); - phbk->search_win = 0; - } - else + bookSearchDestroy( phbk->search_win ); + phbk->search_win = 0; + } + else { /* perform the search */ - //Jan 27, 2006 REF: OMAPS00061925 x0039928 - // Fix : Start the phonebook timer for populating the list - timStart(PhbSearchTim); + //Jan 27, 2006 REF: OMAPS00061925 x0039928 + // Fix : Start the phonebook timer for populating the list + timStart(PhbSearchTim); } - } + } } break; @@ -751,7 +718,7 @@ } break; - default: + default: { /* No other action required */ @@ -766,107 +733,107 @@ /******************************************************************************* - $Function: bookChangePB + $Function: bookChangePB - $Description: Change the phonebook + $Description: Change the phonebook - $Returns: None + $Returns: None - $Arguments: None. + $Arguments: None. *******************************************************************************/ void bookChangePB(T_MFW_HND win, UBYTE identifier, UBYTE reason) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - T_phbk *Phbk = (T_phbk *) win_data->user; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_phbk *Phbk = (T_phbk *) win_data->user; - GI_pb_SetPhonebook(identifier); - bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000); - return; + GI_pb_SetPhonebook(identifier); + bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000); + return; } /******************************************************************************* - $Function: bookCopy + $Function: bookCopy - $Description: Copy or move a phonebook entry from one book to another + $Description: Copy or move a phonebook entry from one book to another - $Returns: status of change, or MWB_PHB_FAIL if an error occurs + $Returns: status of change, or MWB_PHB_FAIL if an error occurs - $Arguments: entry - the entry to be moved or copied - srcStatus - Status information about the source phonebook - destStatus - Status information about the destination phonebook - move - TRUE if the original record is to be deleted + $Arguments: entry - the entry to be moved or copied + srcStatus - Status information about the source phonebook + destStatus - Status information about the destination phonebook + move - TRUE if the original record is to be deleted *******************************************************************************/ -UBYTE bookCopy( T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *destStatus, T_MFW_PHB_STATUS *srcStatus, UBYTE move ) +UBYTE bookCopy( T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *destStatus, T_MFW_PHB_STATUS *srcStatus, UBYTE move ) { - T_MFW ret; - UBYTE srcIndex; - UBYTE srcBook; + T_MFW ret; + UBYTE srcIndex; + UBYTE srcBook; - TRACE_FUNCTION("bookCopy"); + TRACE_FUNCTION("bookCopy"); - if (!destStatus->avail_entries) - { - /* There's no room in the destination phonebook to add the entry */ - TRACE_EVENT("bookCopy: dest phonebook full"); - return MFW_PHB_FULL; - } + if (!destStatus->avail_entries) + { + /* There's no room in the destination phonebook to add the entry */ + TRACE_EVENT("bookCopy: dest phonebook full"); + return MFW_PHB_FULL; + } - srcIndex = entry->index; - entry->index = 0; + srcIndex = entry->index; + entry->index = 0; - if (entry->name.len>destStatus->tag_len) - { - TRACE_EVENT("bookCopy: Alpha tag cropped"); - entry->name.len = destStatus->tag_len; - entry->name.data[entry->name.len] = NULL; - } + if (entry->name.len>destStatus->tag_len) + { + TRACE_EVENT("bookCopy: Alpha tag cropped"); + entry->name.len = destStatus->tag_len; + entry->name.data[entry->name.len] = NULL; + } ret = phb_store_entry( destStatus->book, entry, destStatus ); TRACE_EVENT_P2("bookCopy: phb_store_entry book %d result %d", destStatus->book, ret); // 27 June, 2007 DR:OMAPS00136627 x0062172 Syed if ( (ret!=MFW_PHB_OK) && (ret!=MFW_PHB_EXCT) ) - return ret; + return ret; - /* Only try to delete the entry if we are moving an entry from one book - * to another. Don't try if it is an FDN entry */ + /* Only try to delete the entry if we are moving an entry from one book + * to another. Don't try if it is an FDN entry */ - TRACE_EVENT_P2("move %d, entry->book %d", move, entry->book); + TRACE_EVENT_P2("move %d, entry->book %d", move, entry->book); - if (move && entry->book!=PHB_FDN) - { - if (( srcStatus->book == PHB_UPN) || (srcStatus->book == PHB_FDN )) + if (move && entry->book!=PHB_FDN) + { + if (( srcStatus->book == PHB_UPN) || (srcStatus->book == PHB_FDN )) srcBook = srcStatus->book; - else - srcBook = bookActiveBook(WRITE); + else + srcBook = bookActiveBook(WRITE); - ret = phb_delete_entry(srcBook, srcIndex, srcStatus); - TRACE_EVENT_P3("bookCopy: phb_delete_entry book %d index %d result %d", srcStatus->book, srcIndex, ret); - } + ret = phb_delete_entry(srcBook, srcIndex, srcStatus); + TRACE_EVENT_P3("bookCopy: phb_delete_entry book %d index %d result %d", srcStatus->book, srcIndex, ret); + } /* 30 Aug ,2007 DR:OMAPS00143539 ,x0081909 ( Deepak ) */ /* If we copy an entry and then try to delete it from either SIM or Phone storage,before delete opertaion Index of an entry is restored */ - entry->index = srcIndex; + entry->index = srcIndex; - TRACE_EVENT("bookCopy: leaving function"); + TRACE_EVENT("bookCopy: leaving function"); - return ret; + return ret; } /******************************************************************************* - $Function: bookDelMoveCB + $Function: bookDelMoveCB - $Description: callback after moving a phonebook entry + $Description: callback after moving a phonebook entry $Returns: @@ -877,31 +844,31 @@ static void bookDelMoveCB( T_MFW_HND win, USHORT Identifier,UBYTE reason) { - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - T_phbk *Phbk = (T_phbk *) win_data->user; + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + T_phbk *Phbk = (T_phbk *) win_data->user; - bookGetCurrentStatus(&Phbk->current.status); - bookMenuDestroy(Phbk->menu_options_win); - if( Phbk->current.status.used_entries > 0 ) - { - SEND_EVENT( Phbk->search_win, SEARCH_STRING, 1, 0); - winShow(Phbk->search_win ); - } - else - { - if( Phbk->search_win) - { - //destroy current window - bookSearchDestroy(Phbk->search_win ); - } - } + bookGetCurrentStatus(&Phbk->current.status); + bookMenuDestroy(Phbk->menu_options_win); + if( Phbk->current.status.used_entries > 0 ) + { + SEND_EVENT( Phbk->search_win, SEARCH_STRING, 1, 0); + winShow(Phbk->search_win ); + } + else + { + if( Phbk->search_win) + { + //destroy current window + bookSearchDestroy(Phbk->search_win ); + } + } } /******************************************************************************* - $Function: bookCopyCB + $Function: bookCopyCB - $Description: callback after Copying a phonebook entry + $Description: callback after Copying a phonebook entry $Returns: @@ -912,89 +879,89 @@ static void bookCopyCB( T_MFW_HND win, USHORT Identifier,UBYTE reason) { - T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; - T_phbk *Phbk = (T_phbk *) win_data->user; + T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data; + T_phbk *Phbk = (T_phbk *) win_data->user; bookMenuDestroy(Phbk->menu_options_win); } /******************************************************************************* - $Function: bookCopySingle + $Function: bookCopySingle - $Description: Copy or move a single phonebook entry + $Description: Copy or move a single phonebook entry - $Returns: None + $Returns: None - $Arguments: None. + $Arguments: None. *******************************************************************************/ void bookCopySingle(T_MFW_HND win, UBYTE identifier, UBYTE reason) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - T_phbk *Phbk = (T_phbk *) win_data->user; - BOOL oldBook; - int txtId; - T_MFW_PHB_STATUS destStatus; - tMmiPhbData *current = &Phbk->phbk->current; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_phbk *Phbk = (T_phbk *) win_data->user; + BOOL oldBook; + int txtId; + T_MFW_PHB_STATUS destStatus; + tMmiPhbData *current = &Phbk->phbk->current; - TRACE_FUNCTION("bookCopySingle"); + TRACE_FUNCTION("bookCopySingle"); - oldBook = bookGetBookSelected(); + oldBook = bookGetBookSelected(); // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) -// While doing a copy from the FDN menu the destination should always be internal phonebook - if(menuFDN && (call_data.calls.numCalls==0)) - { - destStatus.book = PHB_IPB; - } - else - { - bookSetBookSelected(!oldBook); - destStatus.book = bookActiveBook(WRITE); - } +// While doing a copy from the FDN menu the destination should always be internal phonebook + if(menuFDN && (call_data.calls.numCalls==0)) + { + destStatus.book = PHB_IPB; + } + else + { + bookSetBookSelected(!oldBook); + destStatus.book = bookActiveBook(WRITE); + } - bookGetCurrentStatus( &destStatus ); + bookGetCurrentStatus( &destStatus ); - bookSetBookSelected(oldBook); - txtId = TxtStored; + bookSetBookSelected(oldBook); + txtId = TxtStored; - if (destStatus.avail_entries) - { - switch (bookCopy(¤t->entry[current->selectedName], &destStatus, ¤t->status, identifier)) - { - case MFW_PHB_OK: - //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep) - case MFW_PHB_EXCT: - txtId = TxtStored; - break; - case MFW_PHB_FULL: - txtId = TxtPhbkFull; - break; - default: - txtId = TxtFailed; - break; - } - } - else - { - txtId = TxtPhbkFull; - } + if (destStatus.avail_entries) + { + switch (bookCopy(¤t->entry[current->selectedName], &destStatus, ¤t->status, identifier)) + { + case MFW_PHB_OK: + //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep) + case MFW_PHB_EXCT: + txtId = TxtStored; + break; + case MFW_PHB_FULL: + txtId = TxtPhbkFull; + break; + default: + txtId = TxtFailed; + break; + } + } + else + { + txtId = TxtPhbkFull; + } - //x0pleela 01 June, 2006 DR: OMAPS00079716 - //Calling a callback for move operation - if(identifier) - bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookDelMoveCB ); - else - //x0066814(Geetha) 17 Aug, 2007 DR: OMAPS00141963 - bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookCopyCB ); - /*if (identifier) - { - // Destroy options menu and regenerate address list + //x0pleela 01 June, 2006 DR: OMAPS00079716 + //Calling a callback for move operation + if(identifier) + bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookDelMoveCB ); + else + //x0066814(Geetha) 17 Aug, 2007 DR: OMAPS00141963 + bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookCopyCB ); + /*if (identifier) + { + // Destroy options menu and regenerate address list - if(Phbk->current.status.used_entries > 0) - SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 ); - SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book ); - }*/ + if(Phbk->current.status.used_entries > 0) + SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 ); + SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book ); + }*/ return; } @@ -1002,161 +969,160 @@ /******************************************************************************* - $Function: bookCopyMultiple + $Function: bookCopyMultiple - $Description: Copy or move multiple phonebook entries + $Description: Copy or move multiple phonebook entries - $Returns: None + $Returns: None - $Arguments: None. + $Arguments: None. *******************************************************************************/ void bookCopyMultiple(T_MFW_HND win, UBYTE move, UBYTE reason) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - T_phbk *Phbk = (T_phbk *) win_data->user; - UBYTE oldBook; - T_MFW_PHB_STATUS destStatus; - T_MFW_PHB_STATUS srcStatus; - T_MFW_PHB_LIST entries; - T_MFW_PHB_ENTRY entry; - UBYTE readIndex; - int txtId; -// T_MFW_HND info_win; // RAVI - static T_MFW_HND waitWin = NULL; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_phbk *Phbk = (T_phbk *) win_data->user; + UBYTE oldBook; + T_MFW_PHB_STATUS destStatus; + T_MFW_PHB_STATUS srcStatus; + T_MFW_PHB_LIST entries; + T_MFW_PHB_ENTRY entry; + UBYTE readIndex; + int txtId; +// T_MFW_HND info_win; // RAVI + static T_MFW_HND waitWin = NULL; /* Set up some data */ TRACE_FUNCTION("bookCopyMultiple"); - entries.entry = &entry; + entries.entry = &entry; - srcStatus.book = bookActiveBook(WRITE); - bookGetCurrentStatus( &srcStatus ); + srcStatus.book = bookActiveBook(WRITE); + bookGetCurrentStatus( &srcStatus ); - oldBook = bookGetBookSelected(); - bookSetBookSelected(!oldBook); + oldBook = bookGetBookSelected(); + bookSetBookSelected(!oldBook); - destStatus.book = bookActiveBook(WRITE); - bookGetCurrentStatus( &destStatus ); + destStatus.book = bookActiveBook(WRITE); + bookGetCurrentStatus( &destStatus ); - bookSetBookSelected(oldBook); + bookSetBookSelected(oldBook); - /* First time entering function, set up values. - * Store information so this function can be called again - * when the phonebook is ready */ + /* First time entering function, set up values. + * Store information so this function can be called again + * when the phonebook is ready */ - if (ipbCopyIndex==0) - { - ipbCopyIndex = srcStatus.used_entries; - ipbWin = win; - ipbMove = move; + if (ipbCopyIndex==0) + { + ipbCopyIndex = srcStatus.used_entries; + ipbWin = win; + ipbMove = move; - if (!bookGetBookSelected() && !move) - { - /* We need to drop out of this function briefly in order to get the dialog to display - * for this particular case! Show info screen very briefly, which calls this function as - * a callback. The info screen remains until we drop out of this function a second - * time */ - waitWin = NULL; - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopyMultiple, NULL, 100); - return; - } - waitWin = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER); - } + if (!bookGetBookSelected() && !move) + { + /* We need to drop out of this function briefly in order to get the dialog to display + * for this particular case! Show info screen very briefly, which calls this function as + * a callback. The info screen remains until we drop out of this function a second + * time */ + waitWin = NULL; + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopyMultiple, NULL, 100); + return; + } + waitWin = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER); + } - TRACE_EVENT_P1("Entries in list: %d", srcStatus.used_entries); + TRACE_EVENT_P1("Entries in list: %d", srcStatus.used_entries); - /* For special case where SIM will give no E_PHB_READY response, the - * do...while operates as a loop below. Otherwise, it will only go through - * once, and this function will be called repeatedly every E_PHB_READY */ + /* For special case where SIM will give no E_PHB_READY response, the + * do...while operates as a loop below. Otherwise, it will only go through + * once, and this function will be called repeatedly every E_PHB_READY */ - do - { - txtId = TxtStored; + do + { + txtId = TxtStored; - if (!destStatus.avail_entries) - { - txtId = TxtPhbkFull; - } - else if (ipbCopyIndex==0) - { - txtId = TxtEmpty; - } - else - { - /* For moving, always delete first entry alphabetically, list moves down. - * For copying, move through the list */ + if (!destStatus.avail_entries) + { + txtId = TxtPhbkFull; + } + else if (ipbCopyIndex==0) + { + txtId = TxtEmpty; + } + else + { + /* For moving, always delete first entry alphabetically, list moves down. + * For copying, move through the list */ - if (move) - readIndex = 1; - else - readIndex = ipbCopyIndex; + if (move) + readIndex = 1; + else + readIndex = ipbCopyIndex; - TRACE_EVENT_P1("Moving entry %d", readIndex); + TRACE_EVENT_P1("Moving entry %d", readIndex); - /* Read in entry and copy/move it */ + /* Read in entry and copy/move it */ - phb_read_entries(srcStatus.book, readIndex, MFW_PHB_ALPHA, 1, &entries); + phb_read_entries(srcStatus.book, readIndex, MFW_PHB_ALPHA, 1, &entries); - switch (bookCopy(entries.entry, &destStatus, &srcStatus, move)) - { - case MFW_PHB_OK: - //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep) - case MFW_PHB_EXCT: - txtId = TxtStored; - break; - case MFW_PHB_FULL: - txtId = TxtPhbkFull; - break; - default: - txtId = TxtFailed; - break; - } + switch (bookCopy(entries.entry, &destStatus, &srcStatus, move)) + { + case MFW_PHB_OK: + //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep) + case MFW_PHB_EXCT: + txtId = TxtStored; + break; + case MFW_PHB_FULL: + txtId = TxtPhbkFull; + break; + default: + txtId = TxtFailed; + break; + } - ipbCopyIndex--; - } - }/* Is a loop in special case - see above */ - while (!bookGetBookSelected() && !move && txtId==TxtStored && ipbCopyIndex>0); + ipbCopyIndex--; + } + }/* Is a loop in special case - see above */ + while (!bookGetBookSelected() && !move && txtId==TxtStored && ipbCopyIndex>0); - /* If we've finished, or an error has occurred, show info dialog */ + /* If we've finished, or an error has occurred, show info dialog */ - if (ipbCopyIndex==0 || txtId!=TxtStored) - { - ipbCopyIndex = 0; + if (ipbCopyIndex==0 || txtId!=TxtStored) + { + ipbCopyIndex = 0; - /* Destroy the Please Wait window and show the result message */ + /* Destroy the Please Wait window and show the result message */ - bookShowInformation( win, txtId, NULL, NULL ); - if (waitWin) - { - SEND_EVENT(waitWin, DIALOG_DESTROY,0,0); - } + bookShowInformation( win, txtId, NULL, NULL ); + if (waitWin) + { + SEND_EVENT(waitWin, DIALOG_DESTROY,0,0); + } - if (move) - { - /* Destroy options menu and regenerate address list */ + if (move) + { + /* Destroy options menu and regenerate address list */ - bookMenuDestroy(Phbk->menu_options_win); - bookGetCurrentStatus( &Phbk->current.status ); - //06 June, 2007 DR: OMAPS00132045 - //changed the condition from used_entries to ipbCopyIndex - if((ipbCopyIndex > 0)) - { - SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 ); - SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book ); - } - else - bookSearchDestroy(Phbk->search_win); - } - } + bookMenuDestroy(Phbk->menu_options_win); + bookGetCurrentStatus( &Phbk->current.status ); + //06 June, 2007 DR: OMAPS00132045 + //changed the condition from used_entries to ipbCopyIndex + if((ipbCopyIndex > 0)) + { + SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 ); + SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book ); + } + else + bookSearchDestroy(Phbk->search_win); + } + } - return; + return; } #endif - /******************************************************************************* Public Methods @@ -1165,36 +1131,30 @@ - /******************************************************************************* - $Function: bookCurrentWindow + $Function: bookCurrentWindow $Description: This returns the window handle associated with the current MFW element - $Returns: window handle of current MFW item + $Returns: window handle of current MFW item - $Arguments: none. + $Arguments: none. *******************************************************************************/ tBookMfwHnd bookCurrentWindow( void ) { - return mfwParent( mfwHeader() ); + return mfwParent( mfwHeader() ); } - - - - - /******************************************************************************* - $Function: bookDefaultCallBack + $Function: bookDefaultCallBack $Description: @@ -1204,32 +1164,26 @@ this will still be callable from the info dialogs as it will use the reference we set up. - $Returns: zero, always + $Returns: zero, always - $Arguments: win, parent window + $Arguments: win, parent window identifier, of the window - reason, for the window + reason, for the window *******************************************************************************/ static tBookStatus bookDefaultCallBack( tBookMfwHnd win, UBYTE identifier, UBYTE reason ) { - if ( win ) - winShow( win ); - - return 0; -} + if ( win ) + winShow( win ); - - - - - + return 0; +} /******************************************************************************* - $Function: bookWindowData + $Function: bookWindowData $Description: @@ -1237,102 +1191,79 @@ handler or call back function and will return a pointer to the window data associated with the current MFW element. - $Returns: pointer to the data area + $Returns: pointer to the data area - $Arguments: none. + $Arguments: none. *******************************************************************************/ void *bookWindowData( void ) { - tBookMfwHnd WinPtr; + tBookMfwHnd WinPtr; - if ( ( WinPtr = bookCurrentWindow() ) == NULL ) - return (void *) NULL; + if ( ( WinPtr = bookCurrentWindow() ) == NULL ) + return (void *) NULL; - return (void *)((tBookMfwHdr *) WinPtr)->data; + return (void *)((tBookMfwHdr *) WinPtr)->data; } - - - - - - - /******************************************************************************* - $Function: bookMenuSelectedNumber + $Function: bookMenuSelectedNumber $Description: This will return the currently selected entry in the phone book, when the routine is being called from a menu handler - $Returns: pointer to the selected number buffer + $Returns: pointer to the selected number buffer - $Arguments: none. + $Arguments: none. *******************************************************************************/ char *bookMenuSelectedNumber( void ) { - - - /* Have we got a valid window ? - */ - if ( ( (tBookMfwHnd) bookWindowData() ) == NULL ) - return NULL; + /* Have we got a valid window ? + */ + if ( ( (tBookMfwHnd) bookWindowData() ) == NULL ) + return NULL; - return NULL; + return NULL; } - - - - - - - /******************************************************************************* - $Function: bookPhoneBookLoading + $Function: bookPhoneBookLoading - $Description: access routine for the local static menu area + $Description: access routine for the local static menu area Utility functions to determine if the phone book is still in the loading state - $Returns: BOOK_FAILURE if loading, otherwise BOOK_SUCCESS + $Returns: BOOK_FAILURE if loading, otherwise BOOK_SUCCESS - $Arguments: none. + $Arguments: none. *******************************************************************************/ tBookStatus bookPhoneBookLoading( void ) { - int temp; - char tempst[20]; - TRACE_FUNCTION("bookPhoneBookLoading"); - temp = phb_get_mode(); - sprintf(tempst,"phb_get_mode %d",temp); - TRACE_EVENT(tempst); - return ( (phb_get_mode() == PHB_LOADING)||(phb_get_mode() == MFW_PHB_FAIL) ) ? BOOK_FAILURE : BOOK_SUCCESS; + int temp; + char tempst[20]; + TRACE_FUNCTION("bookPhoneBookLoading"); + temp = phb_get_mode(); + sprintf(tempst,"phb_get_mode %d",temp); + TRACE_EVENT(tempst); + return ( (phb_get_mode() == PHB_LOADING)||(phb_get_mode() == MFW_PHB_FAIL) ) ? BOOK_FAILURE : BOOK_SUCCESS; } - - - - - - - /******************************************************************************* - $Function: bookInfoDialog + $Function: bookInfoDialog $Description: @@ -1341,40 +1272,33 @@ for a user input before removing the message, the non-modal will clear after three seconds - $Returns: One. + $Returns: One. - $Arguments: String1, String2, character strings to be displayed. + $Arguments: String1, String2, character strings to be displayed. *******************************************************************************/ tBookStatus bookInfoDialog( char *String1, char *String2 ) { - tBookMfwHnd Win = bookCurrentWindow(); - tBookDialogData Dialog; - - /* Initialise the dialog control block with default information - */ - dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, String1, String2, COLOUR_STATUS); - dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR); + tBookMfwHnd Win = bookCurrentWindow(); + tBookDialogData Dialog; - /* Show the dialog - */ - info_dialog( Win, &Dialog ); - - return 1; -} + /* Initialise the dialog control block with default information + */ + dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, String1, String2, COLOUR_STATUS); + dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR); - - + /* Show the dialog + */ + info_dialog( Win, &Dialog ); - - - + return 1; +} /******************************************************************************* - $Function: bookNotImplemented + $Function: bookNotImplemented $Description: @@ -1383,27 +1307,27 @@ current MFW element to detect the handle of the parent window if the incoming window handle is NULL. - $Returns: One + $Returns: One - $Arguments: Parent, window, can be NULL + $Arguments: Parent, window, can be NULL *******************************************************************************/ tBookStatus bookNotImplemented( tBookMfwHnd Parent ) { - tBookMfwHnd Win = ( Parent ) ? Parent : bookCurrentWindow(); - tBookDialogData Dialog; + tBookMfwHnd Win = ( Parent ) ? Parent : bookCurrentWindow(); + tBookDialogData Dialog; - /* Initialise the dialog control block with default information - */ - dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, MmiRsrcGetText( TxtNotImplemented ), NULL, COLOUR_STATUS); - dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR); + /* Initialise the dialog control block with default information + */ + dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, MmiRsrcGetText( TxtNotImplemented ), NULL, COLOUR_STATUS); + dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR); - /* Show the dialog - */ - info_dialog( Win, &Dialog ); + /* Show the dialog + */ + info_dialog( Win, &Dialog ); - return 1; + return 1; } @@ -1415,29 +1339,25 @@ } - - - - /* SPR#1428 - SH - New Editor changes: No longer required */ #ifndef NEW_EDITOR /******************************************************************************* - $Function: set_edt_attr + $Function: set_edt_attr $Description: Sets up the edit attribute structure with the provided parameters - $Returns: None + $Returns: None - $Arguments: winPx, winPy, winSx, winSy, positioning information + $Arguments: winPx, winPy, winSx, winSy, positioning information fgColor, colour for foreground - font, mode, controls, pretty much what they say - *text, initial text to be edited - size, of the text (in bytes) - attr, the block to be set up with the other parameters + font, mode, controls, pretty much what they say + *text, initial text to be edited + size, of the text (in bytes) + attr, the block to be set up with the other parameters GW - Changed colour from 8 bits (foreground) to 2x32bits fgd and bgd For the colour display we pass a 32 bit word that defines the size and position of the editor. @@ -1445,32 +1365,24 @@ *******************************************************************************/ void bookSetEditAttributes( int zone_id, - U32 colIndex, - U8 font, U8 mode, U8 *controls, - char *text, U16 size, - MfwEdtAttr* attr) + U32 colIndex, + U8 font, U8 mode, U8 *controls, + char *text, U16 size, + MfwEdtAttr* attr) { - /* Populate the structure with the parameters - */ - calculateWindow(attr, zone_id ); - attr->edtCol = colIndex; - attr->font = font; - attr->mode = mode; - attr->controls = controls; - attr->text = text; - attr->size = size; + /* Populate the structure with the parameters + */ + calculateWindow(attr, zone_id ); + attr->edtCol = colIndex; + attr->font = font; + attr->mode = mode; + attr->controls = controls; + attr->text = text; + attr->size = size; } #endif /* NEW_EDITOR */ - - - - - - - - /******************************************************************************* Name Handling Functions @@ -1479,51 +1391,44 @@ /******************************************************************************* - $Function: bookGetCurrentStatus + $Function: bookGetCurrentStatus - $Description: Determines the current status of the phone book + $Description: Determines the current status of the phone book - $Returns: status byte + $Returns: status byte - $Arguments: currentStatus, pointer to structure to be populated with + $Arguments: currentStatus, pointer to structure to be populated with status information *******************************************************************************/ UBYTE bookGetCurrentStatus( T_MFW_PHB_STATUS *currentStatus ) { - UBYTE temp; - TRACE_FUNCTION( "bookGetCurrentStatus()" ); - + UBYTE temp; + TRACE_FUNCTION( "bookGetCurrentStatus()" ); temp = phb_get_status( currentStatus ); { - char temp[255]; - sprintf(temp,"book %d max_entries %d used_entries %d aval_entries %d", - currentStatus->book,currentStatus->max_entries, - currentStatus->used_entries, - currentStatus->avail_entries); - TRACE_EVENT(temp); + char temp[255]; + sprintf(temp,"book %d max_entries %d used_entries %d aval_entries %d", + currentStatus->book,currentStatus->max_entries, + currentStatus->used_entries, + currentStatus->avail_entries); + TRACE_EVENT(temp); } return temp; } - - - - - - /******************************************************************************* - $Function: bookFindNames + $Function: bookFindNames - $Description: Fine name in phone book + $Description: Fine name in phone book - $Returns: status of search + $Returns: status of search - $Arguments: number, number of entries to search, current, + $Arguments: number, number of entries to search, current, pointer to structure containing search context *******************************************************************************/ @@ -1531,47 +1436,43 @@ UBYTE bookFindName( UBYTE number, tMmiPhbData *current ) { UBYTE ret; - int index; // , Count = 0; // RAVI + int index; // , Count = 0; // RAVI UBYTE book_type, index_type; - - // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P // Added these variables to Fix the Issue MMI-SPR-15813 // nondigitindex => index after which '+' sign to be added // numlength = lenght of the number array. // nondigitFound = Checks whether nondigit is present in the number array or not. - int nondigitindex = -1,j,numlength = 0, nondigitFound = -1; + int nondigitindex = -1,j,numlength = 0, nondigitFound = -1; - - TRACE_FUNCTION( "bookFindName()" ); + TRACE_FUNCTION( "bookFindName()" ); /* Firstly, check for an empty book */ - bookGetCurrentStatus( ¤t->status ); + bookGetCurrentStatus( ¤t->status ); if ( current->status.used_entries < 1 ) { current->index = 0; return MFW_PHB_OK; } - //x0066692 Date:23 April 2007 DR:OMAPS00121834 - // this condition ensures that stop index doesn't exceed max no. of entries can be added to a phonebook - number = current->status.used_entries - current->index +1; + //x0066692 Date:23 April 2007 DR:OMAPS00121834 + // this condition ensures that stop index doesn't exceed max no. of entries can be added to a phonebook + number = current->status.used_entries - current->index +1; - if ( number > MAX_SEARCH_NAME ) - number = MAX_SEARCH_NAME; - // Feb 20, 2006 REF: OMAPS00061948 x0039928 - // Fix : If used entries are less than MAX_SARCH_NAME then no. of entries - // passed to the phb_read_entries is used entries. + if ( number > MAX_SEARCH_NAME ) + number = MAX_SEARCH_NAME; + // Feb 20, 2006 REF: OMAPS00061948 x0039928 + // Fix : If used entries are less than MAX_SARCH_NAME then no. of entries + // passed to the phb_read_entries is used entries. /* Okay, we have some entries to search, so initialise the current entry buffer to empty */ - memset( current->entry, 0, MAX_SEARCH_CALL_LIST * sizeof( T_MFW_PHB_ENTRY ) ); - + memset( current->entry, 0, MAX_SEARCH_CALL_LIST * sizeof( T_MFW_PHB_ENTRY ) ); current->list.entry = current->entry; @@ -1586,40 +1487,40 @@ /* Sort out the type of search we are performing */ - if ((book_type == PHB_LDN) || (book_type == PHB_LRN)|| (book_type == PHB_LMN)) + if ((book_type == PHB_LDN) || (book_type == PHB_LRN)|| (book_type == PHB_LMN)) index_type = MFW_PHB_INDEX; else { - if ( current->KindOfSearch == SEARCH_BY_NAME ) - index_type = MFW_PHB_ALPHA; - else if ( current->KindOfSearch == SEARCH_BY_NUMBER ) - index_type = MFW_PHB_NUMBER; - else if ( current->KindOfSearch == SEARCH_BY_LOCATION ) - index_type = MFW_PHB_INDEX; + if ( current->KindOfSearch == SEARCH_BY_NAME ) + index_type = MFW_PHB_ALPHA; + else if ( current->KindOfSearch == SEARCH_BY_NUMBER ) + index_type = MFW_PHB_NUMBER; + else if ( current->KindOfSearch == SEARCH_BY_LOCATION ) + index_type = MFW_PHB_INDEX; } /* read the appropriate entries from the phone book */ - { - char temp[255]; - sprintf(temp,"book %d index %d indextype %d number %d", - book_type,current->index,index_type,number); - TRACE_EVENT(temp); - } + { + char temp[255]; + sprintf(temp,"book %d index %d indextype %d number %d", + book_type,current->index,index_type,number); + TRACE_EVENT(temp); + } // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken) //When book is ADN, we need to read only ADN entries. no need to display ADN and FDN together - if (book_type == PHB_ADN) /*Quick test */ - { - TRACE_EVENT("book_type == PHB_ADN"); - ret = phb_read_entries( PHB_ADN, current->index, index_type, number, ¤t->list ); - } - else - { - TRACE_EVENT("book_type == OTHER"); - ret = phb_read_entries( book_type, current->index, index_type, number, ¤t->list ); - } + if (book_type == PHB_ADN) /*Quick test */ + { + TRACE_EVENT("book_type == PHB_ADN"); + ret = phb_read_entries( PHB_ADN, current->index, index_type, number, ¤t->list ); + } + else + { + TRACE_EVENT("book_type == OTHER"); + ret = phb_read_entries( book_type, current->index, index_type, number, ¤t->list ); + } /* Populate the output structures */ @@ -1636,208 +1537,201 @@ /* GSM character sets */ UBYTE l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ - char debug[22]; - int i; + char debug[22]; + int i; TRACE_EVENT( (char*)current->entry[index].name.data); TRACE_EVENT("Convert from SIM to UCS2"); - TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len); - /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ - if (current->entry[index].name.data[0] == 0x80 ) - { for (i=1; i<MAX_ALPHA_LEN; i+=1) - { - l_name[i+1] = current->entry[index].name.data[i]; - } - l_name[0] = current->entry[index].name.data[0]; - l_name[1] = MAX_ALPHA_LEN; + TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len); + /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/ + if (current->entry[index].name.data[0] == 0x80 ) + { for (i=1; i<MAX_ALPHA_LEN; i+=1) + { + l_name[i+1] = current->entry[index].name.data[i]; + } + l_name[0] = current->entry[index].name.data[0]; + l_name[1] = MAX_ALPHA_LEN; - memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); - /*MC, we'll just use the length provided by the MFW*/ - if (current->entry[index].name.len%2 == 1)/*if length of string odd*/ - current->entry[index].name.len++;/* INCREASE LENGTH BY 1*/ + memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); + /*MC, we'll just use the length provided by the MFW*/ + if (current->entry[index].name.len%2 == 1)/*if length of string odd*/ + current->entry[index].name.len++;/* INCREASE LENGTH BY 1*/ - /*make sure all chars after length are 0*/ - for (i=current->entry[index].name.len; i<MAX_ALPHA_LEN; i++) - { current->entry[index].name.data[i] = 0; } + /*make sure all chars after length are 0*/ + for (i=current->entry[index].name.len; i<MAX_ALPHA_LEN; i++) + { current->entry[index].name.data[i] = 0; } - for (i=0; i < MAX_ALPHA_LEN;i++) - { - if ( current->entry[index].name.data[i]== 0 && current->entry[index].name.data[i+1] != 0) - debug[i] = '0'; - else - debug[i] = (char)current->entry[index].name.data[i]; - } + for (i=0; i < MAX_ALPHA_LEN;i++) + { + if ( current->entry[index].name.data[i]== 0 && current->entry[index].name.data[i+1] != 0) + debug[i] = '0'; + else + debug[i] = (char)current->entry[index].name.data[i]; + } - TRACE_EVENT("Decoded entry"); - TRACE_EVENT(debug); + TRACE_EVENT("Decoded entry"); + TRACE_EVENT(debug); - } + } - else + else - { /*SPR2175, use new function to convert from GSM to ASCII*/ - { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.len, - (char*)l_name, MFW_ASCII, PHB_MAX_LEN, FALSE); - current->entry[index].name.dcs = MFW_ASCII; - memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); - } + { /*SPR2175, use new function to convert from GSM to ASCII*/ + { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.len, + (char*)l_name, MFW_ASCII, PHB_MAX_LEN, FALSE); + current->entry[index].name.dcs = MFW_ASCII; + memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); + } - } - } + } + } #endif /*MC end*/ #else for ( index = 0; index < number; index++ ) - { - UBYTE l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ - TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len); - /*SPR2175, use new function to convert from GSM to ASCII*/ - { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.data.len, - l_name, MFW_ASCII, PHB_MAX_LEN); - current->entry[index].name.dcs = MFW_ASCII; - memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); - } - } + { + UBYTE l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/ + TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len); + /*SPR2175, use new function to convert from GSM to ASCII*/ + { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.data.len, + l_name, MFW_ASCII, PHB_MAX_LEN); + current->entry[index].name.dcs = MFW_ASCII; + memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN ); + } + } #endif /* Needed to make international calls from the phonebook */ - for ( index = 0; index < number; index++ ) - { - if ( current->entry[index].ton ) - { + for ( index = 0; index < number; index++ ) + { + if ( current->entry[index].ton ) + { // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P // Issue description: Followup from 15623, this is the BMI part of this Issue. -// At last, in the record "SSC09" the number is displayed with the "+" -// character at the beginning of the number instead of "**21*+014543877989#" +// At last, in the record "SSC09" the number is displayed with the "+" +// character at the beginning of the number instead of "**21*+014543877989#" // Solution: Find the location of nondigit(e.g:*, #) in the number array -// and put '+' to next position if the index is less than numlength-8. This is done -// as there can be ss strings(like *11*20#) attached to the number in the end. -// For eg: **61#+9844093515*11*20# +// and put '+' to next position if the index is less than numlength-8. This is done +// as there can be ss strings(like *11*20#) attached to the number in the end. +// For eg: **61#+9844093515*11*20# // If the total length is less than 8 assign this index to nondigitindex. // This solution is based on special sequences we have encountered till now. - // Finds the length of the number array. - numlength = strlen((char*)current->entry[ index ].number); - //checks whether the length is within the limit. - if(numlength <=PHB_MAX_LEN) + // Finds the length of the number array. + numlength = strlen((char*)current->entry[ index ].number); + //checks whether the length is within the limit. + if(numlength <=PHB_MAX_LEN) //TISH, patch for OMAPS00144985, modified by Jinshu Wang, 2007-09-07 //start if (current->entry[ index ].number[0]=='*' || current->entry[ index ].number[0]=='#') { - for( j=0; j< numlength ; j++) - { - if( !isdigit((char*)current->entry[ index ].number[j]) ) + for( j=0; j< numlength ; j++) + { + if( !isdigit((char*)current->entry[ index ].number[j]) ) { - // Found a nondigit can be */# - nondigitFound = j; - // Checking , whether the nondigit index is not at the end - // part of the number array. - if(j < (numlength-8)) - { - // Current index is less than numlength-8 - nondigitindex = j; - } - else - { - if(numlength <8) - { - // If lenght of the number array is less than 8 - // assign the index to nondigitindex - // This condition might occur when the user - // presses invalid short sequence - nondigitindex = j; - } - } - } - } + // Found a nondigit can be */# + nondigitFound = j; + // Checking , whether the nondigit index is not at the end + // part of the number array. + if(j < (numlength-8)) + { + // Current index is less than numlength-8 + nondigitindex = j; + } + else + { + if(numlength <8) + { + // If lenght of the number array is less than 8 + // assign the index to nondigitindex + // This condition might occur when the user + // presses invalid short sequence + nondigitindex = j; + } + } + } + } } //end - if((nondigitindex == -1) && (nondigitFound> -1) && (nondigitFound < 4)) - { - // Nondigit is existing and it's position is less than 4 and not met - // any of the above conditions. - nondigitindex = nondigitFound; - } + if((nondigitindex == -1) && (nondigitFound> -1) && (nondigitFound < 4)) + { + // Nondigit is existing and it's position is less than 4 and not met + // any of the above conditions. + nondigitindex = nondigitFound; + } - // Move the contents accordingly. - memmove((char *) &(current->entry[ index ].number[ nondigitindex+2]), - (char *) &(current->entry[ index ].number[nondigitindex+1]), numlength - nondigitindex+1); + // Move the contents accordingly. + memmove((char *) &(current->entry[ index ].number[ nondigitindex+2]), + (char *) &(current->entry[ index ].number[nondigitindex+1]), numlength - nondigitindex+1); - // Add the '+' sign after the appropriate nondigit character, if any. - current->entry[index].number[nondigitindex+1] = '+'; - } + // Add the '+' sign after the appropriate nondigit character, if any. + current->entry[index].number[nondigitindex+1] = '+'; + } - } - //} + } + //} return current->result = ret; } - - - - - - /******************************************************************************* - $Function: bookEvent + $Function: bookEvent - $Description: Event handler for a phone book event + $Description: Event handler for a phone book event - $Returns: MFW_EVENT_CONSUMED if recognised message, otherwise + $Returns: MFW_EVENT_CONSUMED if recognised message, otherwise MFW_EVENT_PASSED - $Arguments: e, event, para, general parameter giving context of call + $Arguments: e, event, para, general parameter giving context of call *******************************************************************************/ int bookEvent( MfwEvt e, void *para ) { - T_MFW_PHB_STATUS *status; + T_MFW_PHB_STATUS *status; TRACE_FUNCTION( "bookEvent" ); /* deal with the incoming event */ - switch( e ) + switch( e ) { case E_PHB_UPN_LIST : { - /* x0039928 - Lint warnings fix - upnList = (T_MFW_UPN_LIST *)para; */ + /* x0039928 - Lint warnings fix + upnList = (T_MFW_UPN_LIST *)para; */ /* tbd */ } break; - case E_PHB_STATUS: + case E_PHB_STATUS: { - status = (T_MFW_PHB_STATUS *)para; - if ( ( status->book == PHB_FDN ) || ( status->book == PHB_ADN ) ) - { - if ( pinsSetIsFocussed() == FOCUSSED_PINS ) - backpinFDNactdeact(); - } + status = (T_MFW_PHB_STATUS *)para; + if ( ( status->book == PHB_FDN ) || ( status->book == PHB_ADN ) ) + { + if ( pinsSetIsFocussed() == FOCUSSED_PINS ) + backpinFDNactdeact(); + } } break; - case E_PHB_ERROR: + case E_PHB_ERROR: { - //x0061560 Date May16,07 (sateeshg) OMAPS00133241 - T_MFW_HND win = mfwParent( mfw_header() ); + //x0061560 Date May16,07 (sateeshg) OMAPS00133241 + T_MFW_HND win = mfwParent( mfw_header() ); - TRACE_ERROR("E_PHB_ERROR store entry"); - bookShowInformation(win, TxtError, NULL, NULL ); - } - + TRACE_ERROR("E_PHB_ERROR store entry"); + bookShowInformation(win, TxtError, NULL, NULL ); + } break; @@ -1847,60 +1741,60 @@ { // Aug 18, 2006 ER: OMAPS00089840 x0039928 // Fix : If the E_PHB_READY is for delete all then destroy the please wait window and display the string "Deleted" - if( DeleteAll_flag == TRUE) - { - T_MFW_HND win = mfwParent( mfw_header() ); - int txtid; + if( DeleteAll_flag == TRUE) + { + T_MFW_HND win = mfwParent( mfw_header() ); + int txtid; - TRACE_EVENT("E_PHB_READY Delete all"); - if (waitWindel) - { - SEND_EVENT(waitWindel, DIALOG_DESTROY,0,0); - waitWindel = NULL; - txtid = TxtDeleted; - bookShowInformation(win, txtid, NULL, NULL ); - } - DeleteAll_flag = FALSE; - break; - } - //x0061560 Date May17,07 (sateeshg) OMAPS00133241 - if(addname_flag == TRUE) + TRACE_EVENT("E_PHB_READY Delete all"); + if (waitWindel) + { + SEND_EVENT(waitWindel, DIALOG_DESTROY,0,0); + waitWindel = NULL; + txtid = TxtDeleted; + bookShowInformation(win, txtid, NULL, NULL ); + } + DeleteAll_flag = FALSE; + break; + } + //x0061560 Date May17,07 (sateeshg) OMAPS00133241 + if(addname_flag == TRUE) { - T_MFW_HND win = mfwParent( mfw_header() ); - int txtid; + T_MFW_HND win = mfwParent( mfw_header() ); + int txtid; - TRACE_EVENT("E_PHB_READY Saved"); + TRACE_EVENT("E_PHB_READY Saved"); - txtid = TxtSaved; - bookShowInformation(win, txtid, NULL, NULL ); - addname_flag = FALSE; - break; - } - /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */ - if(TRUE == changename_flag) - { - T_MFW_HND win = mfwParent( mfw_header() ); - int txtid; + txtid = TxtSaved; + bookShowInformation(win, txtid, NULL, NULL ); + addname_flag = FALSE; + break; + } + /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */ + if(TRUE == changename_flag) + { + T_MFW_HND win = mfwParent( mfw_header() ); + int txtid; - TRACE_EVENT("Saved prompt for change entry"); - TRACE_EVENT("E_PHB_READY Saved"); + TRACE_EVENT("Saved prompt for change entry"); + TRACE_EVENT("E_PHB_READY Saved"); - txtid = TxtSaved; - bookShowInformation(win, txtid, NULL, NULL ); - changename_flag = FALSE; - break; - } + txtid = TxtSaved; + bookShowInformation(win, txtid, NULL, NULL ); + changename_flag = FALSE; + break; + } TRACE_EVENT("E_PHB_READY"); #ifdef INT_PHONEBOOK - /* SPR#1112 - SH - If we're copying or moving a list, - * the current operation has been successful - keep copying. */ + /* SPR#1112 - SH - If we're copying or moving a list, + * the current operation has been successful - keep copying. */ if (ipbCopyIndex) { - TRACE_EVENT("Copying/moving in progress."); - bookCopyMultiple(ipbWin, ipbMove, 0); + TRACE_EVENT("Copying/moving in progress."); + bookCopyMultiple(ipbWin, ipbMove, 0); } #endif } @@ -1918,7 +1812,7 @@ { /* indicate we haven't dealt with event */ - return MFW_EVENT_PASSED; + return MFW_EVENT_PASSED; } // break; // RAVI } @@ -1929,7 +1823,6 @@ } - // Aug 18, 2006 ER: OMAPS00089840 x0039928 // Fix : Added a new function to delete all the phone book entries. /******************************************************************************* @@ -1940,40 +1833,40 @@ $Returns: None - $Arguments: win - Window Handler + $Arguments: win - Window Handler *******************************************************************************/ void bookDeleteBook(T_MFW_HND win) { - T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; - T_phbk *Phbk = (T_phbk *) win_data->user; + T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data; + T_phbk *Phbk = (T_phbk *) win_data->user; Phbk ->current.status.book = bookActiveBook(READ); - //x0061560 Date JUNE 4,07 (sateeshg) OMAPS00131777 - //Updating the current status of the phonebook + //x0061560 Date JUNE 4,07 (sateeshg) OMAPS00131777 + //Updating the current status of the phonebook bookGetCurrentStatus(&Phbk ->current.status); if(Phbk ->current.status.used_entries !=0)//Apr 30,2007, OMAPS00129173, x0066814(Geetha) { if (bookGetBookSelected() ) - bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, 100); + bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, 100); else - DeleteAll_flag = TRUE; + DeleteAll_flag = TRUE; if (phb_delete_book(Phbk->current.status.book) == MFW_PHB_OK) { if (!bookGetBookSelected() ) - waitWindel = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER); - else - { - MmiBookSetCurrentText(TxtDeleted); - bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL ); - } + waitWindel = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER); + else + { + MmiBookSetCurrentText(TxtDeleted); + bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL ); + } } else { DeleteAll_flag = FALSE; - MmiBookSetCurrentText(TxtFailed); + MmiBookSetCurrentText(TxtFailed); bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL ); } Phbk ->current.status.used_entries=0;//Apr 30,2007, OMAPS00129173, x0066814(Geetha) @@ -1995,57 +1888,55 @@ $Returns: None - $Arguments: destEntry - destination phonebook entry structure - srcEntry - source phonebook entry structure - maxLen - max number oc chars to be copied + $Arguments: destEntry - destination phonebook entry structure + srcEntry - source phonebook entry structure + maxLen - max number oc chars to be copied *******************************************************************************/ //GW Created function to copy name (and length when required). void bookCopyPhbName( T_MFW_PHB_ENTRY* destEntry, T_MFW_PHB_ENTRY* srcEntry, int maxLen ) { - int len; //length of string to be copied - if ((destEntry==NULL) || (srcEntry==NULL)) - return; + int len; //length of string to be copied + if ((destEntry==NULL) || (srcEntry==NULL)) + return; #ifdef NO_ASCIIZ - //Ensure we do not copy more than the PHB array can hold. - if ((maxLen < PHB_MAX_LEN) && (maxLen >0)) - len = maxLen; - else - len = PHB_MAX_LEN; + //Ensure we do not copy more than the PHB array can hold. + if ((maxLen < PHB_MAX_LEN) && (maxLen >0)) + len = maxLen; + else + len = PHB_MAX_LEN; #else /*MC SPR1319, name string is only up to MAX_ALPHA_LEN in length*/ - //Ensure we do not copy more than the PHB array can hold. - if ((maxLen < MAX_ALPHA_LEN) && (maxLen >0)) - len = maxLen; - else - len = MAX_ALPHA_LEN; + //Ensure we do not copy more than the PHB array can hold. + if ((maxLen < MAX_ALPHA_LEN) && (maxLen >0)) + len = maxLen; + else + len = MAX_ALPHA_LEN; #endif #ifdef NO_ASCIIZ - memset (destEntry->name.data, 0, PHB_MAX_LEN); - memcpy( destEntry->name.data, srcEntry->name.data, len); - if (srcEntry->name.len < len) - destEntry->name.len = srcEntry->name.len; - else - { //we have truncated the name - add termination (if possible) - destEntry->name.len = len; - if (len < PHB_MAX_LEN) - { // there is space in array for termination - add it. - destEntry->name.data[len] = 0x00; + memset (destEntry->name.data, 0, PHB_MAX_LEN); + memcpy( destEntry->name.data, srcEntry->name.data, len); + if (srcEntry->name.len < len) + destEntry->name.len = srcEntry->name.len; + else + { //we have truncated the name - add termination (if possible) + destEntry->name.len = len; + if (len < PHB_MAX_LEN) + { // there is space in array for termination - add it. + destEntry->name.data[len] = 0x00; - } - } + } + } #else - memcpy( destEntry->name, srcEntry->name, maxLen); + memcpy( destEntry->name, srcEntry->name, maxLen); #endif } - /******************************************************************************* End of File *******************************************************************************/ -