annotate src/ui/bmi/mmiBookUtils.c @ 177:2cd1c1abdbb5

mmiSounds.c: basic white space fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 03:44:17 +0000
parents ec9f955fc487
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
3 CONDAT (UK)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
5 ********************************************************************************
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 This software product is the property of Condat (UK) Ltd and may not be
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 disclosed to any third party without the express permission of the owner.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
9
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
12 $Project name: Basic MMI
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
13 $Project code: BMI (6349)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
14 $Module: PhoneBook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $File: MmiBookUtils.c
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
16 $Revision: 1.0
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
17
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $Author: Condat(UK)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
19 $Date: 25/10/00
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Description:
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
24
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 This module provides utility function for use in the
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 phone book application
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
27
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 $History: MmiBookUtils.c
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 $History: MmiBookUtils.c
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
31
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
32 Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
33 Description: PhoneBook: Unexpected confirmation message when making changes to entries in SIM storage.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
34 Solution: Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
36 17 Aug, 2007 DR: OMAPS00141963 x0066814(Geetha)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
37 Description: PhoneBook: The "Options" menu is not returned after a current entry is copied.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
38 Solution: After copying, the menu control was not being returned back to the right window.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
39 Added a callback, that will be called after copying an entry, where the control wil be returned to
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
40 correct window.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 July 11, 2007 DR:OMAPS00137908 x00666692(Asha)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
43 Description:PHONEBOOK: changing name or number under SIM storage, Please Wait message
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 appears instead of Saved
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
45 Solution :Changes made to handle the condition MFW_PHB_EXCT in the function changeInFile()
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
46 which modifies the phone book entry.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
47
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
48 27 June, 2007 DR: OMAPS00136608 x0073106(sundeep)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 Description:PHONEBOOK-Unexpected behavior when copying all entries from Phone to SIM
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Solution :Updated the execution state(MFW_PHB_EXCT) in the phonebook.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
51
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 June 27, 2007 DR:OMAPS00136627 x0062172(Syed)
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
53 Description:PHONEBOOK: Unexpected behavior when moving all entries from Phone to SIM
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
54 Solution : Return Proper Value after phb_store_entry() in bookCopy to move all the entries
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
55 properly.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
56
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 June 05, 2007 DR:OMAPS00133241 x0061560(sateeshg)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Description:ASTEC29607,SIM:The sim card should not return 9240 still.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
59 Solution :MMI should not display "Saved" after db is updated but has to wait until SIM is
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
60 updated with the entry and RAT_OK is received from ACI.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
61
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
63 June 06, 2007 DR:OMAPS00132045 x0073106 Sundeep
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
64 Description : Phonebook- behaviour inconsistency in the MMI when move contact
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
65 Solution : changed a if condition in function bookCopyMultiple(), in the if(move).
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
66
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
67
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
68 JUNE 4,07 (sateeshg) OMAPS00131777, x0061560
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 Phonebook - Delete all command for phonebook contacts answer "list empty" even if there are contacts in the list
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
70 Solution:Updated the current status of the phonebook
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
71
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
72 Apr 30,2007, OMAPS00129173, x0066814(Geetha)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
73 Description : Phone crashes if 'Delete All' is done on SIM contacts when SIM memory is empty
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
74 Solution: Added a condition in bookDeleteBook to check the number of used entries in the seleted phonebook.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
75 If the condition is satified then the delete operation will proceed else an 'Empty List' dialog is displayed.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
76
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 Nov 17, 2006 DR:OMAPS00104376 a0393213(R.Prabakar)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 Description : When tried to delete the last entry either incase of SIM or Phone book (i.e. last deletion), the board resets.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
79 Solution : The crash happens because of race condition between actual deletion by ACI and status check in BMI.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 Now the status before deletion is stored and status check is done on this previous status.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
82 Aug 18, 2006 ER: OMAPS00089840 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
83 Description: Changes to be made in MMI for the functionality "Delete all" ADN entries
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
84 Solution: A new menu item "Delete All" is added in the phone book menu and bookDeleteBook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
85 is called to delete all the phone book entries.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
87 July 17, 2006 DR: OMAPS00082792 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
88 Description:Changes to be done in MMI for Move all entries from SIM to FFS (Defect 76492)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
89 Solution: Condition to delete search window in deleteFromFile is modified.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
91 June 01, 2006 DR: OMAPS00079716
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
92 Description:Phonebook: List of entries is not refreshed after a phonebook entry move
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
93 Solution: Added a new callback function to handle the populating of phonebook entries
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
94
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
95 Feb 20, 2006 REF: OMAPS00061948 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
96 Bug:PhoneBook-My number menu -failed.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
97 Fix: phb_read_entries is called with used entries as the no of entries if used entries are less than
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
98 MAX_SEARCH_NAME.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
100 Jan 27, 2006 REF: OMAPS00061925 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
101 Bug:Phonebook-Changing an entry and Immidiately deleting the entry failed.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
102 Fix: Phonebook is populated with phone numbers after some time and not immediately after deleting an entry.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
104 Jan 22, 2006 REF: OMAPS00061930 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
105 Bug:PhoneBook -Change entry and view entry through Change option-failed
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
106 Fix: Phonebook is populated with phone numbers after some time and not immediately while saving the changed entries.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
107
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
108 25/10/00 Original Condat(UK) BMI version.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
109
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 // Issue Number : SPR#15671 on 24/03/04 by Ajith K.P
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
113
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
119
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 Include Files
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
121
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 /* includes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #if defined (NEW_FRAME)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 #include "STDDEFS.H"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #include "mfw_sys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 /* SPR#1428 - SH - New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #include "mfw_edt.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #include "mfw_sim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #include "mfw_cm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 #include "mfw_mme.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 #include "psa.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #include "MmiMain.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #include "MmiBookController.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 #include "MmiDummy.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 #include "MmiMenu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 #include "mmiCall.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 #include "Mmiicons.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 #include "MmiSoftKeys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #include "MmiSounds.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #include "MmiIdle.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 #include "MmiNetwork.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 #include "mmiSat_i.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 #include "MmiAoc.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 #include "gdi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 #include "audio.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 #include "mfw_ffs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 #include "MmiTimers.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 #include "MmiBookShared.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 #include "mmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 #include "mmiSmsRead.h"/*MC , SPR 1242 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 // Issue description: Followup from 15623, this is the BMI part of this Issue.
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
207 // At last, in the record "SSC09" the number is displayed with the "+"
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
208 // character at the beginning of the number instead of "**21*+014543877989#".
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
209
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 extern int menuFDN;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 extern T_call call_data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 // Jan 27, 2006 REF: OMAPS00061925 x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 // Fix : Declare a extern phonebook timer handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 extern T_MFW_HND PhbSearchTim;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 // Aug 18, 2006 ER: OMAPS00089840 x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 // Fix : Initialize Delete All flag and a window handler of please wait dialog.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 BOOL DeleteAll_flag = FALSE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 T_MFW_HND waitWindel = NULL;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
221 //x0061560 Date May17,07 (sateeshg) OMAPS00133241
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 BOOL addname_flag = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
223 /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 Added a new flag changename_flag to handle the Phonebook-SIM Memory entry changed event. */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 BOOL changename_flag = FALSE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
228
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 Private data elements
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
230
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 /* x0039928 - Lint warnings fix
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 static T_MFW_UPN_LIST *upnList = NULL; */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 /* SPR#1112 - SH - This is redundant */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 //static T_phbk *GlobalPhoneBookHandle = NULL;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 /* SPR#1112 - SH - Internal phonebook flag */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #ifdef INT_PHONEBOOK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 static UBYTE ipbCopyIndex = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 static UBYTE ipbMove = FALSE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 static T_MFW_HND ipbWin = NULL;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 // ADDED BY RAVI - 28-11-2005
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
247 EXTERN T_MFW mfw_Ucs2SIMStr(T_MFW_DCS outMode, U16 *inUcsStr, UBYTE maxOutSize,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 UBYTE *outMfwStr, UBYTE *outLen);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
250 EXTERN T_MFW mfw_Gsm2SIMStr(T_MFW_DCS outMode, UBYTE *inGsmStr, UBYTE maxOutSize,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 UBYTE *outMfwStr,UBYTE *outLen);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 // END RAVI - 28-11-2005
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
254
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 Private Methods
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
256
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
261 $Function: changeName
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 $Description: Change a phone book entry if we have a valid book selected
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
264
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
265 $Returns: status of change, or MWB_PHB_FAIL if an error occurs
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
267 $Arguments: book, to be updated
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 entry, to update
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 currentStatus, pointer to status word
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
270
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 static UBYTE changeName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
275 TRACE_FUNCTION( "changeName()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
277 /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
278 changename_flag = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
280 if ( book == PHB_SDN )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
281 return MFW_PHB_FAIL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
283 return phb_store_entry( book, entry, currentStatus );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
289 $Function: deleteName
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
291 $Description: Delete a phone book entry
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
292
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
293 $Returns: status of delete, or MWB_PHB_FAIL if an error occurs
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
295 $Arguments: book, to be updated
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 index, index of entry to delete
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 currentStatus, pointer to status word
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
298
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 static UBYTE deleteName( UBYTE book, UBYTE index, T_MFW_PHB_STATUS *currentStatus )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
303 TRACE_FUNCTION( "deleteName()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
305 if ( book == PHB_SDN )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
306 return MFW_PHB_FAIL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
308 return phb_delete_entry( book, index, currentStatus );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
309 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
314 $Function: addName
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
316 $Description: Add a new name to the phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
317
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
318 $Returns: status of change, or MWB_PHB_FAIL if an error occurs
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
320 $Arguments: book, to be updated
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 entry, to update
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 currentStatus, pointer to status word
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
323
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 static UBYTE addName( UBYTE book, T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *currentStatus )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
328 TRACE_FUNCTION( "addName()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 //MC-- Commented out UPN-specific code as it causes the name string in a UPN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 //entry to be stored incorrectly and doesn't seem to be neccessary.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 //Generic code here seems to work fine for UPN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 /* normal store operation
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
336 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
337 char temp[120];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
338 memset(temp,'\0',100);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
339 //x0061560 Date May17,07 (sateeshg) OMAPS00133241
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
340 addname_flag = TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 #ifdef NO_ASCIIZ
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
343 T_MFW_PHB_TEXT buf;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
345 /*SPR 1752 check for unicode*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
346 if (entry->name.data[0] ==0x80)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
347 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
348 /*MC, don't do any conversions!!*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
349 TRACE_EVENT("Converting Unicode 2 SIM");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
351 sprintf(temp,"Book: %d Name %s Number %s",
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
352 book,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
353 (char*)buf.data,(char*)entry->number);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
355 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
356 else
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
357
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
358 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
359 // convert from GSM to Alpha characters
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
360 bookGsm2Alpha( (UBYTE *) entry->name.data );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
362 sprintf(temp,"Book: %d Name %s Number %s",
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
363 book,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
364 (char*)entry->name.data,(char*)entry->number);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
365 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 #else
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
368 sprintf(temp,"Book: %d Name %s Number %s",
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
369 book,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
370 (char*)entry->name,(char*)entry->number);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 #endif
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
372 TRACE_EVENT(temp);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
373 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
374 entry->index = 0;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
375
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 return phb_store_entry( book, entry, currentStatus );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
382
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 File Handling Utilities
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
384
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
389 $Function: storeInFile
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
391 $Description: Converts the name to a storeable format and stores it
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 in the phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
393
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
394 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
396 $Arguments: phbk, pointer to phonebook structure
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
397
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 void storeInFile( T_phbk *phbk )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
401 { int i;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
402 UBYTE actual_length = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
403 char debug[20];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
404 TRACE_FUNCTION( "storeInFile()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 /* Convert the name
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 #ifdef NO_ASCIIZ
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 /* if the pattern is GSM default format, use the function mfw_Gsm2SIMStr() here
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 if (phbk->edt_buf_name[0] == 0x80)//if unicode
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
416 /*a0393213 lint warning:Possible creation of out-of-bounds pointer soln:PHB_MAX_LEN changed to MAX_ALPHA_LEN-1*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
417 for (i =0; i < (MAX_ALPHA_LEN-1); i+=2) //work out string length
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
418 { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
419 { if (i== 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
420 actual_length =0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
421 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
422 actual_length = i -2;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
424 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
425 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
426 phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
427 phbk->edt_buf_name[1] = 0x00;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 memset(phbk->newEntry.name.data, 0,MAX_ALPHA_LEN);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 //convert to SIM string
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
431 mfw_Ucs2SIMStr( MFW_DCS_UCS2 , (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN,
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
432
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 phbk->newEntry.name.data, &phbk->newEntry.name.len );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
434 TRACE_EVENT( (char*)phbk->newEntry.name.data);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
435 sprintf(debug, "length:%d", phbk->newEntry.name.len);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
436 TRACE_EVENT(debug);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
440 mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN,
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
441 phbk->newEntry.name.data, &phbk->newEntry.name.len );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
443
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 strncpy( (char *)phbk->newEntry.name, (char *)phbk->edt_buf_name, MAX_ALPHA_LEN );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 /* update the number
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 strncpy( (char *) phbk->newEntry.number, (char *) phbk->edt_buf_number, PHB_MAX_LEN );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
453 /*SPR 1327, copy current phonebook type to new entry*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
454 phbk->newEntry.book = phbk->current.status.book;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
455 /*If current phonebook UPN, don't overwrite phonebook type*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
456 // Feb 20, 2006 REF: OMAPS00061948 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
457 // Fix : A check is made with enum PHB_UPN of MFW instead of UPN of ACI
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
458 if( phbk->newEntry.book != PHB_UPN)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
459 phbk->newEntry.book = bookActiveBook(WRITE);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 phbk->newEntry.index = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 /* Add the name/number combination to the phone book and setup
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 the current text status string
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 switch ( addName( phbk->newEntry.book, &phbk->newEntry, &phbk->current.status ) )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 case MFW_PHB_OK :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 /* Entry saved okay
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 MmiBookSetCurrentText( TxtSaved );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 break;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
474 //x0061560 Date May16,07 (sateeshg) OMAPS00133241
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
475 case MFW_PHB_EXCT :
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 /* Entry saved okay
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 MmiBookSetCurrentText( TxtPleaseWait );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
480 // MmiBookSetCurrentText( TxtSaved );
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
481
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 }
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
483 //end
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 case MFW_PHB_FULL :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 /* Phone book full
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 MmiBookSetCurrentText( TxtPhbkFull );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 case MFW_PHB_FAIL :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 /* Write failure
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 MmiBookSetCurrentText( TxtWriteError );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
502 default:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 /* No other returns possible
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
514 $Function: changeInFile
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
516 $Description: change the phone book entry
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
517
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
518 $Returns: none
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
520 $Arguments: phbk, pointer to phonebook structure
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
521
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 void changeInFile( T_phbk *phbk )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
525 { int i;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
526 int actual_length=0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
527 TRACE_FUNCTION( "changeInFile()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
529 if(phbk->current.status.book == PHB_ADN_FDN)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
530 phbk->current.status.book = PHB_ADN; //JVJE We can only store in ADN/FDN
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
531 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
532 phbk->current.status.book = phbk->current.status.book;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
533
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
534 TRACE_EVENT_P1("Current Book = %d", phbk->current.status.book);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
535 TRACE_EVENT_P1("Current Name = %d", phbk->current.selectedName);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
536 TRACE_EVENT_P1("Current Buf Name = %s", phbk->edt_buf_name);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 /* Convert the name
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 #ifdef NO_ASCIIZ
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
542 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 if (phbk->edt_buf_name[0] == 0x80)//if unicode
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 /*a0393213 lint warning:Possible access of out-of-bounds pointer soln:MAX_ALPHA_LEN-1*/
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
546 for (i =0; i < MAX_ALPHA_LEN-1; i+=2) //work out string length
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
547 { if (phbk->edt_buf_name[i] == 0 && phbk->edt_buf_name[i+1] == 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
548 { if (i== 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
549 actual_length =0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
550 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
551 actual_length = i -2;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
552 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
553 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
554 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
555 phbk->edt_buf_name[0] = (UBYTE)(actual_length/2);//add string length to beginning of string
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
556 phbk->edt_buf_name[1] = 0x00;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
557
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 memset(phbk->current.entry[phbk->current.selectedName].name.data, 0, MAX_ALPHA_LEN);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 //convert to SIM string
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
560 mfw_Ucs2SIMStr( MFW_DCS_UCS2, (U16*)phbk->edt_buf_name, MAX_ALPHA_LEN,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 phbk->current.entry[phbk->current.selectedName].name.data,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 &phbk->current.entry[phbk->current.selectedName].name.len );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 else
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
565 { mfw_Gsm2SIMStr( MFW_DCS_7bits, (U8*)phbk->edt_buf_name, MAX_ALPHA_LEN,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 phbk->current.entry[phbk->current.selectedName].name.data, &phbk->current.entry[phbk->current.selectedName].name.len );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
567 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 strncpy( (char *) phbk->current.entry[ phbk->current.selectedName ].name,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 (char *) phbk->edt_buf_name, MAX_ALPHA_LEN );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 /* update the number
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 strncpy( (char *) phbk->current.entry[ phbk->current.selectedName ].number,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 (char *) phbk->edt_buf_number, PHB_MAX_LEN );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 /* Add the name/number combination to the phone book and setup
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 the current text status string
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 switch ( changeName( phbk->current.status.book,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 &phbk->current.entry[ phbk->current.selectedName ], &phbk->current.status ) )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 case MFW_PHB_OK :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 /* Entry saved okay
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 MmiBookSetCurrentText( TxtSaved );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 case MFW_PHB_FAIL :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 /* Write failure
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 MmiBookSetCurrentText( TxtWriteError );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 break;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
602 /* x0056422 on Aug 02,2007 for
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
603 OMAPS00140447 - PhoneBook: Unexpected confirmation message
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
604 when making changes to entries in SIM storage. */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 // July 11, 2007 DR:OMAPS00137908 x00666692(Asha)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
607 //PHONEBOOK: changing name or number under SIM storage, Please Wait
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 //message appears instead of Saved
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
609 case MFW_PHB_EXCT :
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 /* Operation in progress
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 MmiBookSetCurrentText( TxtPleaseWait );
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
614 // MmiBookSetCurrentText( TxtSaved );
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
615
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 }
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
617 //end
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
620 default:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 /* No other returns possible
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
632 $Function: deleteFromFile
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
634 $Description: delete an entry from a phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
635
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
636 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
638 $Arguments: phbk, phone book handle,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 book, book to update,
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
640
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 void deleteFromFile( T_phbk *phbk, UBYTE book )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
645 int index;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
646 T_MFW_PHB_STATUS phb_status_before_delete; /*OMAPS00104376 a0393213(R.Prabakar)*/
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
647
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
648 TRACE_FUNCTION( "deleteFromFile()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
650 index = phbk->current.selectedName - phbk->current.missedCallsOffset;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
651 /*OMAPS00104376 a0393213(R.Prabakar)- getting the status of the phonebook before deletion*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
652 phb_status_before_delete.book=book;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
653 bookGetCurrentStatus( &phb_status_before_delete );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 switch ( deleteName( book,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 phbk->current.entry[index].index, &phbk->current.status ) )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 case MFW_PHB_OK :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 /* Entry saved okay
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 MmiBookSetCurrentText( TxtEntryDeleted );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 #ifdef NO_ASCIIZ
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
664 phbk->current.entry[index].name.len = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
665 memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
669 memset((char*)phbk->current.entry[index].name, '\0', MAX_ALPHA_LEN);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
670 memset((char*)phbk->current.entry[index].number, '\0', PHB_MAX_LEN);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 /* Move the current index to the next valid entry
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
674 if(phbk->current.selectedName > 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
675 phbk->current.selectedName --;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
676 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
677 phbk->current.selectedName = 0;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
678
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
679 if(phbk->current.index > 1)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
680 phbk->current.index--;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
681 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
682 phbk->current.index = 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 /* And if we have a search window, perform the search to
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 update the current valid entry
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
687 if ( phbk->search_win )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
690 // July 17, 2006 DR: OMAPS00082792 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
691 // Check used entry is 1 as delete is not complete yet as it is asynchronous.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
692 /*Nov 17,2006 OMAPS00104376 a0393213(R.Prabakar)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
693 Now the check is done with the status got before deletion instead of the status got after deletion*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
694 if (phb_status_before_delete.used_entries == 1)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 /* empty phone book
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
698 bookSearchDestroy( phbk->search_win );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
699 phbk->search_win = 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
700 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
701 else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 /* perform the search
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
705 //Jan 27, 2006 REF: OMAPS00061925 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
706 // Fix : Start the phonebook timer for populating the list
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
707 timStart(PhbSearchTim);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708 }
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
709 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 case MFW_PHB_FAIL :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 /* Write failure
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 MmiBookSetCurrentText( TxtWriteError );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
721 default:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 /* No other action required
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 /* SPR#1112 - SH - Internal phonebook use */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 #ifdef INT_PHONEBOOK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
736 $Function: bookChangePB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
738 $Description: Change the phonebook
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
739
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
740 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
742 $Arguments: None.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
743
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 void bookChangePB(T_MFW_HND win, UBYTE identifier, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
748 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
749 T_phbk *Phbk = (T_phbk *) win_data->user;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
750
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
751 GI_pb_SetPhonebook(identifier);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
752 bookShowInfoScreen( Phbk->win, TxtPhonebook, TxtChanged, NULL, NULL, 3000);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
753 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
759 $Function: bookCopy
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
761 $Description: Copy or move a phonebook entry from one book to another
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
762
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
763 $Returns: status of change, or MWB_PHB_FAIL if an error occurs
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
765 $Arguments: entry - the entry to be moved or copied
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
766 srcStatus - Status information about the source phonebook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
767 destStatus - Status information about the destination phonebook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
768 move - TRUE if the original record is to be deleted
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
769
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
772 UBYTE bookCopy( T_MFW_PHB_ENTRY *entry, T_MFW_PHB_STATUS *destStatus, T_MFW_PHB_STATUS *srcStatus, UBYTE move )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
774 T_MFW ret;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
775 UBYTE srcIndex;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
776 UBYTE srcBook;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
777
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
778 TRACE_FUNCTION("bookCopy");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
779
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
780 if (!destStatus->avail_entries)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
781 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
782 /* There's no room in the destination phonebook to add the entry */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
783 TRACE_EVENT("bookCopy: dest phonebook full");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
784 return MFW_PHB_FULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
785 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
787 srcIndex = entry->index;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
788 entry->index = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
790 if (entry->name.len>destStatus->tag_len)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
791 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
792 TRACE_EVENT("bookCopy: Alpha tag cropped");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
793 entry->name.len = destStatus->tag_len;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
794 entry->name.data[entry->name.len] = NULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
795 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
796
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 ret = phb_store_entry( destStatus->book, entry, destStatus );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798 TRACE_EVENT_P2("bookCopy: phb_store_entry book %d result %d", destStatus->book, ret);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
799
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 // 27 June, 2007 DR:OMAPS00136627 x0062172 Syed
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
801 if ( (ret!=MFW_PHB_OK) && (ret!=MFW_PHB_EXCT) )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
802 return ret;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
804 /* Only try to delete the entry if we are moving an entry from one book
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
805 * to another. Don't try if it is an FDN entry */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
807 TRACE_EVENT_P2("move %d, entry->book %d", move, entry->book);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
808
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
809 if (move && entry->book!=PHB_FDN)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
810 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
811 if (( srcStatus->book == PHB_UPN) || (srcStatus->book == PHB_FDN ))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 srcBook = srcStatus->book;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
813 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
814 srcBook = bookActiveBook(WRITE);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
816 ret = phb_delete_entry(srcBook, srcIndex, srcStatus);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
817 TRACE_EVENT_P3("bookCopy: phb_delete_entry book %d index %d result %d", srcStatus->book, srcIndex, ret);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
818 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 /* 30 Aug ,2007 DR:OMAPS00143539 ,x0081909 ( Deepak ) */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 /* 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 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
823
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
824 entry->index = srcIndex;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
825
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
826 TRACE_EVENT("bookCopy: leaving function");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
827
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
828 return ret;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
834 $Function: bookDelMoveCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
836 $Description: callback after moving a phonebook entry
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
837
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
838 $Returns:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
839
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
840 $Arguments:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
841
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843 //x0pleela 01 june, 2006 DR: OMAPS00079716
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 static void bookDelMoveCB( T_MFW_HND win, USHORT Identifier,UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
847 T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
848 T_phbk *Phbk = (T_phbk *) win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
850 bookGetCurrentStatus(&Phbk->current.status);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
851 bookMenuDestroy(Phbk->menu_options_win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
852 if( Phbk->current.status.used_entries > 0 )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
853 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
854 SEND_EVENT( Phbk->search_win, SEARCH_STRING, 1, 0);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
855 winShow(Phbk->search_win );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
856 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
857 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
858 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
859 if( Phbk->search_win)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
860 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
861 //destroy current window
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
862 bookSearchDestroy(Phbk->search_win );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
863 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
864 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
869 $Function: bookCopyCB
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
871 $Description: callback after Copying a phonebook entry
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
872
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
873 $Returns:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
874
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
875 $Arguments:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
876
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 //x0066814(Geetha) 17 Aug, 2007 DR: OMAPS00141963
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 static void bookCopyCB( T_MFW_HND win, USHORT Identifier,UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
882 T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
883 T_phbk *Phbk = (T_phbk *) win_data->user;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
884
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 bookMenuDestroy(Phbk->menu_options_win);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
886
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888 /*******************************************************************************
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
889 $Function: bookCopySingle
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
891 $Description: Copy or move a single phonebook entry
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
892
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
893 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
895 $Arguments: None.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
896
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 void bookCopySingle(T_MFW_HND win, UBYTE identifier, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
901 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
902 T_phbk *Phbk = (T_phbk *) win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
903 BOOL oldBook;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
904 int txtId;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
905 T_MFW_PHB_STATUS destStatus;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
906 tMmiPhbData *current = &Phbk->phbk->current;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
908 TRACE_FUNCTION("bookCopySingle");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
909
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
910 oldBook = bookGetBookSelected();
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
911 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken)
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
912 // While doing a copy from the FDN menu the destination should always be internal phonebook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
913 if(menuFDN && (call_data.calls.numCalls==0))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
914 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
915 destStatus.book = PHB_IPB;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
916 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
917 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
918 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
919 bookSetBookSelected(!oldBook);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
920 destStatus.book = bookActiveBook(WRITE);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
921 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
923 bookGetCurrentStatus( &destStatus );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
925 bookSetBookSelected(oldBook);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
926 txtId = TxtStored;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
928 if (destStatus.avail_entries)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
929 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
930 switch (bookCopy(&current->entry[current->selectedName], &destStatus, &current->status, identifier))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
931 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
932 case MFW_PHB_OK:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
933 //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
934 case MFW_PHB_EXCT:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
935 txtId = TxtStored;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
936 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
937 case MFW_PHB_FULL:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
938 txtId = TxtPhbkFull;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
939 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
940 default:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
941 txtId = TxtFailed;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
942 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
943 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
944 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
945 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
946 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
947 txtId = TxtPhbkFull;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
948 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
950 //x0pleela 01 June, 2006 DR: OMAPS00079716
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
951 //Calling a callback for move operation
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
952 if(identifier)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
953 bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookDelMoveCB );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
954 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
955 //x0066814(Geetha) 17 Aug, 2007 DR: OMAPS00141963
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
956 bookShowInformation( win, txtId, NULL, (T_VOID_FUNC)bookCopyCB );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
957 /*if (identifier)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
958 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
959 // Destroy options menu and regenerate address list
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
960
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
961 if(Phbk->current.status.used_entries > 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
962 SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
963 SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
964 }*/
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
965
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
966 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
967 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
968
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
969
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
970 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
971
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
972 $Function: bookCopyMultiple
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
973
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
974 $Description: Copy or move multiple phonebook entries
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
975
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
976 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
978 $Arguments: None.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
979
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982 void bookCopyMultiple(T_MFW_HND win, UBYTE move, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
984 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
985 T_phbk *Phbk = (T_phbk *) win_data->user;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
986 UBYTE oldBook;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
987 T_MFW_PHB_STATUS destStatus;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
988 T_MFW_PHB_STATUS srcStatus;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
989 T_MFW_PHB_LIST entries;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
990 T_MFW_PHB_ENTRY entry;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
991 UBYTE readIndex;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
992 int txtId;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
993 // T_MFW_HND info_win; // RAVI
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
994 static T_MFW_HND waitWin = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995 /* Set up some data */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997 TRACE_FUNCTION("bookCopyMultiple");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
998
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
999 entries.entry = &entry;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1001 srcStatus.book = bookActiveBook(WRITE);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1002 bookGetCurrentStatus( &srcStatus );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1003
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1004 oldBook = bookGetBookSelected();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1005 bookSetBookSelected(!oldBook);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1007 destStatus.book = bookActiveBook(WRITE);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1008 bookGetCurrentStatus( &destStatus );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1009
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1010 bookSetBookSelected(oldBook);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1011
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1012 /* First time entering function, set up values.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1013 * Store information so this function can be called again
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1014 * when the phonebook is ready */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1015
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1016 if (ipbCopyIndex==0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1017 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1018 ipbCopyIndex = srcStatus.used_entries;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1019 ipbWin = win;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1020 ipbMove = move;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1021
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1022 if (!bookGetBookSelected() && !move)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1023 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1024 /* We need to drop out of this function briefly in order to get the dialog to display
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1025 * for this particular case! Show info screen very briefly, which calls this function as
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1026 * a callback. The info screen remains until we drop out of this function a second
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1027 * time */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1028 waitWin = NULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1029 bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, (T_VOID_FUNC)bookCopyMultiple, NULL, 100);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1030 return;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1031 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1032 waitWin = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1033 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1034
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1035 TRACE_EVENT_P1("Entries in list: %d", srcStatus.used_entries);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1037 /* For special case where SIM will give no E_PHB_READY response, the
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1038 * do...while operates as a loop below. Otherwise, it will only go through
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1039 * once, and this function will be called repeatedly every E_PHB_READY */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1041 do
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1042 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1043 txtId = TxtStored;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1045 if (!destStatus.avail_entries)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1046 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1047 txtId = TxtPhbkFull;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1048 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1049 else if (ipbCopyIndex==0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1050 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1051 txtId = TxtEmpty;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1052 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1053 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1054 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1055 /* For moving, always delete first entry alphabetically, list moves down.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1056 * For copying, move through the list */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1057
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1058 if (move)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1059 readIndex = 1;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1060 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1061 readIndex = ipbCopyIndex;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1062
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1063 TRACE_EVENT_P1("Moving entry %d", readIndex);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1064
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1065 /* Read in entry and copy/move it */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1066
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1067 phb_read_entries(srcStatus.book, readIndex, MFW_PHB_ALPHA, 1, &entries);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1068
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1069 switch (bookCopy(entries.entry, &destStatus, &srcStatus, move))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1070 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1071 case MFW_PHB_OK:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1072 //27 June, 2007 DR: OMAPS00136608 x0073106(sundeep)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1073 case MFW_PHB_EXCT:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1074 txtId = TxtStored;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1075 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1076 case MFW_PHB_FULL:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1077 txtId = TxtPhbkFull;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1078 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1079 default:
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1080 txtId = TxtFailed;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1081 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1082 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1083
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1084 ipbCopyIndex--;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1085 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1086 }/* Is a loop in special case - see above */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1087 while (!bookGetBookSelected() && !move && txtId==TxtStored && ipbCopyIndex>0);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1088
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1089 /* If we've finished, or an error has occurred, show info dialog */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1090
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1091 if (ipbCopyIndex==0 || txtId!=TxtStored)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1092 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1093 ipbCopyIndex = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1095 /* Destroy the Please Wait window and show the result message */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1096
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1097 bookShowInformation( win, txtId, NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1098 if (waitWin)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1099 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1100 SEND_EVENT(waitWin, DIALOG_DESTROY,0,0);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1101 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1102
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1103 if (move)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1104 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1105 /* Destroy options menu and regenerate address list */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1106
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1107 bookMenuDestroy(Phbk->menu_options_win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1108 bookGetCurrentStatus( &Phbk->current.status );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1109 //06 June, 2007 DR: OMAPS00132045
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1110 //changed the condition from used_entries to ipbCopyIndex
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1111 if((ipbCopyIndex > 0))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1112 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1113 SEND_EVENT(Phbk->search_win, SEARCH_SCROLL_UP, 0, 0 );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1114 SEND_EVENT(Phbk->search_win, SEARCH_UPDATE, 0, (void*)Phbk->current.status.book );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1115 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1116 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1117 bookSearchDestroy(Phbk->search_win);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1118 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1119 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1120
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1121 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1123 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1127
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 Public Methods
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1129
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1130 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1131
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1132
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1133
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1134 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1135
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1136 $Function: bookCurrentWindow
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1137
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138 $Description:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140 This returns the window handle associated with the current
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141 MFW element
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1142
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1143 $Returns: window handle of current MFW item
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1144
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1145 $Arguments: none.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1146
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1147 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1148
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1149 tBookMfwHnd bookCurrentWindow( void )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1150 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1151 return mfwParent( mfwHeader() );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1157 $Function: bookDefaultCallBack
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1159 $Description:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 This is a simple call back function which is invoked when
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 a not implemented dialog is displayed. We don't want anyone
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163 outside of this module using it so define it as static,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1164 this will still be callable from the info dialogs as it
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 will use the reference we set up.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1166
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1167 $Returns: zero, always
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1169 $Arguments: win, parent window
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 identifier, of the window
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1171 reason, for the window
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1172
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175 static tBookStatus bookDefaultCallBack( tBookMfwHnd win, UBYTE identifier, UBYTE reason )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1177 if ( win )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1178 winShow( win );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1180 return 0;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1181 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1186 $Function: bookWindowData
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1188 $Description:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 This routine is designed to be invoked from within a menu
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191 handler or call back function and will return a pointer to
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192 the window data associated with the current MFW element.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1193
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1194 $Returns: pointer to the data area
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1195
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1196 $Arguments: none.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1197
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1198 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1199
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1200 void *bookWindowData( void )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1201 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1202 tBookMfwHnd WinPtr;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1203
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1204 if ( ( WinPtr = bookCurrentWindow() ) == NULL )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1205 return (void *) NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1207 return (void *)((tBookMfwHdr *) WinPtr)->data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1213 $Function: bookMenuSelectedNumber
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1215 $Description:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1216
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1217 This will return the currently selected entry in the phone
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218 book, when the routine is being called from a menu handler
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1219
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1220 $Returns: pointer to the selected number buffer
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1221
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1222 $Arguments: none.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1223
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1224 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1225
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1226 char *bookMenuSelectedNumber( void )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1228 /* Have we got a valid window ?
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1229 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1230 if ( ( (tBookMfwHnd) bookWindowData() ) == NULL )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1231 return NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1233 return NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1234 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1235
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1237 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1238
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1239 $Function: bookPhoneBookLoading
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1240
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1241 $Description: access routine for the local static menu area
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1242
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1243 Utility functions to determine if the phone book is
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1244 still in the loading state
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1245
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1246 $Returns: BOOK_FAILURE if loading, otherwise BOOK_SUCCESS
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1248 $Arguments: none.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1249
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1250 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1251
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1252 tBookStatus bookPhoneBookLoading( void )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1254 int temp;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1255 char tempst[20];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1256 TRACE_FUNCTION("bookPhoneBookLoading");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1257 temp = phb_get_mode();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1258 sprintf(tempst,"phb_get_mode %d",temp);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1259 TRACE_EVENT(tempst);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1260 return ( (phb_get_mode() == PHB_LOADING)||(phb_get_mode() == MFW_PHB_FAIL) ) ? BOOK_FAILURE : BOOK_SUCCESS;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1261 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1264 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1265
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1266 $Function: bookInfoDialog
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1268 $Description:
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1269
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1270 Utility functions just to throw a string onto the screen
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1271 primarily for debug purposes, the modal version will wait
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 for a user input before removing the message, the non-modal
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1273 will clear after three seconds
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1274
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1275 $Returns: One.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1276
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1277 $Arguments: String1, String2, character strings to be displayed.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1278
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1279 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1280
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1281 tBookStatus bookInfoDialog( char *String1, char *String2 )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1282 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1283 tBookMfwHnd Win = bookCurrentWindow();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1284 tBookDialogData Dialog;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1285
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1286 /* Initialise the dialog control block with default information
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1287 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1288 dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, String1, String2, COLOUR_STATUS);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1289 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1291 /* Show the dialog
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1292 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1293 info_dialog( Win, &Dialog );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1294
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1295 return 1;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1296 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1300
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1301 $Function: bookNotImplemented
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1302
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1303 $Description:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1304
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1305 This will present an information dialog indicating the current
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1306 feature is still under development. This routine will use the
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307 current MFW element to detect the handle of the parent window
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308 if the incoming window handle is NULL.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1309
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1310 $Returns: One
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1312 $Arguments: Parent, window, can be NULL
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1313
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1314 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1315
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316 tBookStatus bookNotImplemented( tBookMfwHnd Parent )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1318 tBookMfwHnd Win = ( Parent ) ? Parent : bookCurrentWindow();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1319 tBookDialogData Dialog;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1321 /* Initialise the dialog control block with default information
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1322 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1323 dlg_initDisplayData_TextStr( &Dialog, TxtNull, TxtNull, MmiRsrcGetText( TxtNotImplemented ), NULL, COLOUR_STATUS);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1324 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC)bookDefaultCallBack, THREE_SECS, KEY_CLEAR);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1326 /* Show the dialog
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1327 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1328 info_dialog( Win, &Dialog );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1329
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1330 return 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1332 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1333
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1334 /* Menu handler to invoke the routine above
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1335 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1336 tBookStatus bookMenuNotImplemented( tBookMfwMenu *Menu, tBookMfwMenuItem *Item )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1337 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1338 return bookNotImplemented( NULL );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1339 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1340
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1341
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 /* SPR#1428 - SH - New Editor changes: No longer required */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1345 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1346
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1347 $Function: set_edt_attr
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1348
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1349 $Description:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1350
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351 Sets up the edit attribute structure with the provided parameters
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1352
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1353 $Returns: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1354
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1355 $Arguments: winPx, winPy, winSx, winSy, positioning information
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1356 fgColor, colour for foreground
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1357 font, mode, controls, pretty much what they say
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1358 *text, initial text to be edited
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1359 size, of the text (in bytes)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1360 attr, the block to be set up with the other parameters
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1361
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362 GW - Changed colour from 8 bits (foreground) to 2x32bits fgd and bgd
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1363 For the colour display we pass a 32 bit word that defines the size and position of the editor.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1364 This can be either a specific size or a more generic ('middle of the screen'/full width of display)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1366 void bookSetEditAttributes(
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1367 int zone_id,
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1368 U32 colIndex,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1369 U8 font, U8 mode, U8 *controls,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1370 char *text, U16 size,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1371 MfwEdtAttr* attr)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1372 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1373 /* Populate the structure with the parameters
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1374 */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1375 calculateWindow(attr, zone_id );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1376 attr->edtCol = colIndex;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1377 attr->font = font;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1378 attr->mode = mode;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1379 attr->controls = controls;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1380 attr->text = text;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1381 attr->size = size;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1382 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1383 #endif /* NEW_EDITOR */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1384
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1385
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1386 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1387
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1388 Name Handling Functions
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1389
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1390 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1391
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1392 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1393
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1394 $Function: bookGetCurrentStatus
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1395
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1396 $Description: Determines the current status of the phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1397
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1398 $Returns: status byte
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1399
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1400 $Arguments: currentStatus, pointer to structure to be populated with
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1401 status information
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1402
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1403 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1404
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1405 UBYTE bookGetCurrentStatus( T_MFW_PHB_STATUS *currentStatus )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1406 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1407 UBYTE temp;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1408 TRACE_FUNCTION( "bookGetCurrentStatus()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1409
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1410 temp = phb_get_status( currentStatus );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1411 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1412 char temp[255];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1413 sprintf(temp,"book %d max_entries %d used_entries %d aval_entries %d",
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1414 currentStatus->book,currentStatus->max_entries,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1415 currentStatus->used_entries,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1416 currentStatus->avail_entries);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1417 TRACE_EVENT(temp);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1418 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1419 return temp;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1420 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1421
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1422
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1423 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1424
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1425 $Function: bookFindNames
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1427 $Description: Fine name in phone book
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1428
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1429 $Returns: status of search
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1430
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1431 $Arguments: number, number of entries to search, current,
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1432 pointer to structure containing search context
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1433
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1434 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1435
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1436 UBYTE bookFindName( UBYTE number, tMmiPhbData *current )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 UBYTE ret;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1439 int index; // , Count = 0; // RAVI
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1440
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441 UBYTE book_type, index_type;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1442
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1443 // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1444 // Added these variables to Fix the Issue MMI-SPR-15813
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1445 // nondigitindex => index after which '+' sign to be added
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1446 // numlength = lenght of the number array.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1447 // nondigitFound = Checks whether nondigit is present in the number array or not.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1448
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1449 int nondigitindex = -1,j,numlength = 0, nondigitFound = -1;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1450
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1451 TRACE_FUNCTION( "bookFindName()" );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1452
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1453 /* Firstly, check for an empty book
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1455 bookGetCurrentStatus( &current->status );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1456 if ( current->status.used_entries < 1 )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1457 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458 current->index = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1459 return MFW_PHB_OK;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1460 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1461
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1462 //x0066692 Date:23 April 2007 DR:OMAPS00121834
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1463 // this condition ensures that stop index doesn't exceed max no. of entries can be added to a phonebook
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1464 number = current->status.used_entries - current->index +1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1465
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1466 if ( number > MAX_SEARCH_NAME )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1467 number = MAX_SEARCH_NAME;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1468 // Feb 20, 2006 REF: OMAPS00061948 x0039928
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1469 // Fix : If used entries are less than MAX_SARCH_NAME then no. of entries
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1470 // passed to the phb_read_entries is used entries.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1471
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1472 /* Okay, we have some entries to search, so initialise the current
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1473 entry buffer to empty
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1474 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1475 memset( current->entry, 0, MAX_SEARCH_CALL_LIST * sizeof( T_MFW_PHB_ENTRY ) );
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1476
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1477
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1478 current->list.entry = current->entry;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1479 current->list.num_entries = number;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1480
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1481 /* Sort out how we index the information
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1482 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1483 book_type = current->status.book;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1484 index_type = MFW_PHB_INDEX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1485 if ( ( book_type == bookActiveBook(WRITE) ) || ( book_type == PHB_SDN ) )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1486 index_type = MFW_PHB_ALPHA;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1487
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1488 /* Sort out the type of search we are performing
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1489 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1490 if ((book_type == PHB_LDN) || (book_type == PHB_LRN)|| (book_type == PHB_LMN))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1491 index_type = MFW_PHB_INDEX;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1492 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1493 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1494 if ( current->KindOfSearch == SEARCH_BY_NAME )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1495 index_type = MFW_PHB_ALPHA;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1496 else if ( current->KindOfSearch == SEARCH_BY_NUMBER )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1497 index_type = MFW_PHB_NUMBER;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1498 else if ( current->KindOfSearch == SEARCH_BY_LOCATION )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1499 index_type = MFW_PHB_INDEX;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1500 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1501
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1502
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1503 /* read the appropriate entries from the phone book
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1504 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1505 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1506 char temp[255];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1507 sprintf(temp,"book %d index %d indextype %d number %d",
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1508 book_type,current->index,index_type,number);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1509 TRACE_EVENT(temp);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1510 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1511 // May 3, 2004 REF: CRR MMI-SPR-18555 Rashmi C N(Sasken)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1512 //When book is ADN, we need to read only ADN entries. no need to display ADN and FDN together
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1513
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1514 if (book_type == PHB_ADN) /*Quick test */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1515 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1516 TRACE_EVENT("book_type == PHB_ADN");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1517 ret = phb_read_entries( PHB_ADN, current->index, index_type, number, &current->list );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1518 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1519 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1520 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1521 TRACE_EVENT("book_type == OTHER");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1522 ret = phb_read_entries( book_type, current->index, index_type, number, &current->list );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1523 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1524
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1525 /* Populate the output structures
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1526 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1527 if (current->list.result == MFW_NO_ENTRY)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528 current->index = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1529
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1530
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1531 #ifdef NO_ASCIIZ
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1532
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1533 #ifdef EASY_TEXT_ENABLED
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1534 for ( index = 0; index < number; index++ )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1535 {/*MC , SPR 1242 merged in this section from b-sample build*/
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1536
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1537 /* GSM character sets
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1538 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1539 UBYTE l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1540 char debug[22];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1541 int i;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1542 TRACE_EVENT( (char*)current->entry[index].name.data);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1543 TRACE_EVENT("Convert from SIM to UCS2");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1544
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1545 TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1546 /*MC SPR 1257, replacing PHB_MAX_LEN with MAX_ALPHA_LEN for name strings*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1547 if (current->entry[index].name.data[0] == 0x80 )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1548 { for (i=1; i<MAX_ALPHA_LEN; i+=1)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1549 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1550 l_name[i+1] = current->entry[index].name.data[i];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1551 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1552 l_name[0] = current->entry[index].name.data[0];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1553 l_name[1] = MAX_ALPHA_LEN;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1554
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1555 memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1556 /*MC, we'll just use the length provided by the MFW*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1557 if (current->entry[index].name.len%2 == 1)/*if length of string odd*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1558 current->entry[index].name.len++;/* INCREASE LENGTH BY 1*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1559
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1560 /*make sure all chars after length are 0*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1561 for (i=current->entry[index].name.len; i<MAX_ALPHA_LEN; i++)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1562 { current->entry[index].name.data[i] = 0; }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1563
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1564 for (i=0; i < MAX_ALPHA_LEN;i++)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1565 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1566 if ( current->entry[index].name.data[i]== 0 && current->entry[index].name.data[i+1] != 0)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1567 debug[i] = '0';
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1568 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1569 debug[i] = (char)current->entry[index].name.data[i];
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1570 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1571
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1572
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1573 TRACE_EVENT("Decoded entry");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1574 TRACE_EVENT(debug);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1575
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1576 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1577
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1578 else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1579
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1580 { /*SPR2175, use new function to convert from GSM to ASCII*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1581 { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.len,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1582 (char*)l_name, MFW_ASCII, PHB_MAX_LEN, FALSE);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1583 current->entry[index].name.dcs = MFW_ASCII;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1584 memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1585 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1586
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1587
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1588 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1589 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1590
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1591 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1592 /*MC end*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1593 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1594 for ( index = 0; index < number; index++ )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1595 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1596 UBYTE l_name[MAX_ALPHA_LEN];/*MC SPR 1257, name strings should use MAX_ALPHA_LEN*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1597 TRACE_EVENT_P1("length of name string: %d", current->entry[index].name.len);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1598 /*SPR2175, use new function to convert from GSM to ASCII*/
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1599 { ATB_convert_String((char*)current->entry[index].name.data, MFW_DCS_8bits, current->entry[index].name.data.len,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1600 l_name, MFW_ASCII, PHB_MAX_LEN);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1601 current->entry[index].name.dcs = MFW_ASCII;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1602 memcpy( current->entry[index].name.data, (char*)l_name, MAX_ALPHA_LEN );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1603 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1604 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1605 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1606
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1607 /* Needed to make international calls from the phonebook
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1608 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1609 for ( index = 0; index < number; index++ )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1610 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1611 if ( current->entry[index].ton )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1612 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1613
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1614 // May 24, 2004 REF: CRR MMI-SPR-15813 Ajith K P
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1615
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1616 // Issue description: Followup from 15623, this is the BMI part of this Issue.
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1617 // At last, in the record "SSC09" the number is displayed with the "+"
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1618 // character at the beginning of the number instead of "**21*+014543877989#"
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1619
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1620 // Solution: Find the location of nondigit(e.g:*, #) in the number array
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1621 // and put '+' to next position if the index is less than numlength-8. This is done
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1622 // as there can be ss strings(like *11*20#) attached to the number in the end.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1623 // For eg: **61#+9844093515*11*20#
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1624 // If the total length is less than 8 assign this index to nondigitindex.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1625 // This solution is based on special sequences we have encountered till now.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1626
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1627 // Finds the length of the number array.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1628 numlength = strlen((char*)current->entry[ index ].number);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1629 //checks whether the length is within the limit.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1630 if(numlength <=PHB_MAX_LEN)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1631 //TISH, patch for OMAPS00144985, modified by Jinshu Wang, 2007-09-07
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1632 //start
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1633 if (current->entry[ index ].number[0]=='*' || current->entry[ index ].number[0]=='#')
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1634 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1635 for( j=0; j< numlength ; j++)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1636 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1637 if( !isdigit((char*)current->entry[ index ].number[j]) )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1638 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1639 // Found a nondigit can be */#
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1640 nondigitFound = j;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1641 // Checking , whether the nondigit index is not at the end
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1642 // part of the number array.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1643 if(j < (numlength-8))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1644 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1645 // Current index is less than numlength-8
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1646 nondigitindex = j;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1647 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1648 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1649 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1650 if(numlength <8)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1651 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1652 // If lenght of the number array is less than 8
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1653 // assign the index to nondigitindex
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1654 // This condition might occur when the user
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1655 // presses invalid short sequence
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1656 nondigitindex = j;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1657 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1658 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1659 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1660 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1661 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1662 //end
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1663 if((nondigitindex == -1) && (nondigitFound> -1) && (nondigitFound < 4))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1664 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1665 // Nondigit is existing and it's position is less than 4 and not met
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1666 // any of the above conditions.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1667 nondigitindex = nondigitFound;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1668 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1669
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1670 // Move the contents accordingly.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1671 memmove((char *) &(current->entry[ index ].number[ nondigitindex+2]),
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1672 (char *) &(current->entry[ index ].number[nondigitindex+1]), numlength - nondigitindex+1);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1673
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1674 // Add the '+' sign after the appropriate nondigit character, if any.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1675 current->entry[index].number[nondigitindex+1] = '+';
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1676 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1677
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1678 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1679 //}
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1680
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1681 return current->result = ret;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1682 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1683
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1684
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1685 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1686
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1687 $Function: bookEvent
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1688
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1689 $Description: Event handler for a phone book event
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1690
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1691 $Returns: MFW_EVENT_CONSUMED if recognised message, otherwise
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1692 MFW_EVENT_PASSED
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1693
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1694 $Arguments: e, event, para, general parameter giving context of call
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1695
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1696 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1697
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1698 int bookEvent( MfwEvt e, void *para )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1699 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1700 T_MFW_PHB_STATUS *status;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1701
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1702 TRACE_FUNCTION( "bookEvent" );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1703
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1704 /* deal with the incoming event
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1705 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1706 switch( e )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1707 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1708 case E_PHB_UPN_LIST :
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1709 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1710 /* x0039928 - Lint warnings fix
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1711 upnList = (T_MFW_UPN_LIST *)para; */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1712 /* tbd */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1713 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1714 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1715
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1716 case E_PHB_STATUS:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1717 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1718 status = (T_MFW_PHB_STATUS *)para;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1719 if ( ( status->book == PHB_FDN ) || ( status->book == PHB_ADN ) )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1720 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1721 if ( pinsSetIsFocussed() == FOCUSSED_PINS )
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1722 backpinFDNactdeact();
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1723 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1724 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1725 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1726
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1727 case E_PHB_ERROR:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1728 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1729 //x0061560 Date May16,07 (sateeshg) OMAPS00133241
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1730 T_MFW_HND win = mfwParent( mfw_header() );
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1731
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1732 TRACE_ERROR("E_PHB_ERROR store entry");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1733 bookShowInformation(win, TxtError, NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1734 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1735
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1736 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1737
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1738 /* SPR#1112 - SH - New events to indicate status of phonebook */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1739
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1740 case E_PHB_READY:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1741 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1742 // Aug 18, 2006 ER: OMAPS00089840 x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1743 // Fix : If the E_PHB_READY is for delete all then destroy the please wait window and display the string "Deleted"
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1744 if( DeleteAll_flag == TRUE)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1745 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1746 T_MFW_HND win = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1747 int txtid;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1748
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1749 TRACE_EVENT("E_PHB_READY Delete all");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1750 if (waitWindel)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1751 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1752 SEND_EVENT(waitWindel, DIALOG_DESTROY,0,0);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1753 waitWindel = NULL;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1754 txtid = TxtDeleted;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1755 bookShowInformation(win, txtid, NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1756 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1757 DeleteAll_flag = FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1758 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1759 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1760 //x0061560 Date May17,07 (sateeshg) OMAPS00133241
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1761 if(addname_flag == TRUE)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1762 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1763
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1764 T_MFW_HND win = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1765 int txtid;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1766
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1767 TRACE_EVENT("E_PHB_READY Saved");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1768
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1769 txtid = TxtSaved;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1770 bookShowInformation(win, txtid, NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1771 addname_flag = FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1772 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1773 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1774 /* Aug 09, 2007 DR:OMAPS00140447 x0056422(Srilekha) */
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1775 if(TRUE == changename_flag)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1776 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1777 T_MFW_HND win = mfwParent( mfw_header() );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1778 int txtid;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1779
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1780 TRACE_EVENT("Saved prompt for change entry");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1781 TRACE_EVENT("E_PHB_READY Saved");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1782
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1783 txtid = TxtSaved;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1784 bookShowInformation(win, txtid, NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1785 changename_flag = FALSE;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1786 break;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1787 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1788
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1789
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1790 TRACE_EVENT("E_PHB_READY");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1791 #ifdef INT_PHONEBOOK
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1792 /* SPR#1112 - SH - If we're copying or moving a list,
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1793 * the current operation has been successful - keep copying. */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1794 if (ipbCopyIndex)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1795 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1796 TRACE_EVENT("Copying/moving in progress.");
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1797 bookCopyMultiple(ipbWin, ipbMove, 0);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1798 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1799 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1800 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1801 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1802
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1803 case E_PHB_BUSY:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1804 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1805 TRACE_EVENT("E_PHB_BUSY");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1806 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1807 break;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1808
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1809 /* end SPR#1112 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1810
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1811 default:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1812 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1813 /* indicate we haven't dealt with event
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1814 */
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1815 return MFW_EVENT_PASSED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1816 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1817 // break; // RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1818 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1819
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1820 /* got to here, we have dealt with the event
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1821 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1822 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1823 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1824
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1825
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1826 // Aug 18, 2006 ER: OMAPS00089840 x0039928
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1827 // Fix : Added a new function to delete all the phone book entries.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1828 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1829
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1830 $Function: bookDeleteBook
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1831
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1832 $Description: Delete the complete phone book entries
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1833
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1834 $Returns: None
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1835
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1836 $Arguments: win - Window Handler
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1837
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1838 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1839
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1840 void bookDeleteBook(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1841 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1842 T_MFW_WIN *win_data = ( (T_MFW_HDR *) win )->data;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1843 T_phbk *Phbk = (T_phbk *) win_data->user;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1844
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1845 Phbk ->current.status.book = bookActiveBook(READ);
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1846 //x0061560 Date JUNE 4,07 (sateeshg) OMAPS00131777
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1847 //Updating the current status of the phonebook
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1848 bookGetCurrentStatus(&Phbk ->current.status);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1849 if(Phbk ->current.status.used_entries !=0)//Apr 30,2007, OMAPS00129173, x0066814(Geetha)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1850 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1851 if (bookGetBookSelected() )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1852 bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, 100);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1853 else
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1854 DeleteAll_flag = TRUE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1855
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1856 if (phb_delete_book(Phbk->current.status.book) == MFW_PHB_OK)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1857 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1858 if (!bookGetBookSelected() )
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1859 waitWindel = bookShowInfoScreen( Phbk->win, TxtPleaseWait, NULL, NULL, NULL, FOREVER);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1860 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1861 {
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1862 MmiBookSetCurrentText(TxtDeleted);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1863 bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL );
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1864 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1865 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1866 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1867 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1868 DeleteAll_flag = FALSE;
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1869 MmiBookSetCurrentText(TxtFailed);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1870 bookShowInformation( Phbk->win, MmiBookCurrentText(),NULL, NULL );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1871 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1872 Phbk ->current.status.used_entries=0;//Apr 30,2007, OMAPS00129173, x0066814(Geetha)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1873 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1874 else//Apr 30,2007, OMAPS00129173, x0066814(Geetha)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1875 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1876 bookShowInformation( idle_get_window(), TxtEmptyList, NULL, NULL );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1877 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1878
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1879 return;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1880 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1881
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1882
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1883 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1884
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1885 $Function: bookCopyPhbName
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1886
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1887 $Description: Copiers a phonebook name structure (for NO_ASCII set or cleared)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1888
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1889 $Returns: None
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1890
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1891 $Arguments: destEntry - destination phonebook entry structure
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1892 srcEntry - source phonebook entry structure
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1893 maxLen - max number oc chars to be copied
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1894
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1895 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1896 //GW Created function to copy name (and length when required).
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1897 void bookCopyPhbName( T_MFW_PHB_ENTRY* destEntry, T_MFW_PHB_ENTRY* srcEntry, int maxLen )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1898 {
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1899 int len; //length of string to be copied
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1900 if ((destEntry==NULL) || (srcEntry==NULL))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1901 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1902 #ifdef NO_ASCIIZ
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1903 //Ensure we do not copy more than the PHB array can hold.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1904 if ((maxLen < PHB_MAX_LEN) && (maxLen >0))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1905 len = maxLen;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1906 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1907 len = PHB_MAX_LEN;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1908
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1909 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1910 /*MC SPR1319, name string is only up to MAX_ALPHA_LEN in length*/
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1911 //Ensure we do not copy more than the PHB array can hold.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1912 if ((maxLen < MAX_ALPHA_LEN) && (maxLen >0))
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1913 len = maxLen;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1914 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1915 len = MAX_ALPHA_LEN;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1916 #endif
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1917 #ifdef NO_ASCIIZ
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1918 memset (destEntry->name.data, 0, PHB_MAX_LEN);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1919 memcpy( destEntry->name.data, srcEntry->name.data, len);
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1920 if (srcEntry->name.len < len)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1921 destEntry->name.len = srcEntry->name.len;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1922 else
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1923 { //we have truncated the name - add termination (if possible)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1924 destEntry->name.len = len;
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1925 if (len < PHB_MAX_LEN)
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1926 { // there is space in array for termination - add it.
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1927 destEntry->name.data[len] = 0x00;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1928
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1929 }
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1930 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1931 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1932
142
ec9f955fc487 mmiBook*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1933 memcpy( destEntry->name, srcEntry->name, maxLen);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1934 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1935 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1936
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1937
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1938 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1939
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1940 End of File
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1941
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1942 *******************************************************************************/