annotate src/ui/bmi/mmiHomezone.h @ 275:79cfefc1e2b4

audio mode load: gracefully handle mode files of wrong AEC version Unfortunately our change of enabling L1_NEW_AEC (which is necessary in order to bring our Calypso ARM fw into match with the underlying DSP reality) brings along a change in the audio mode file binary format and file size - all those new tunable AEC parameters do need to be stored somewhere, after all. But we already have existing mode files in the old format, and setting AEC config to garbage when loading old audio modes (which is what would happen without the present change) is not an appealing proposition. The solution implemented in the present change is as follows: the audio mode loading code checks the file size, and if it differs from the active version of T_AUDIO_MODE, the T_AUDIO_AEC_CFG structure is cleared - set to the default (disabled AEC) for the compiled type of AEC. We got lucky in that this varying T_AUDIO_AEC_CFG structure sits at the end of T_AUDIO_MODE!
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 30 Jul 2021 02:55:48 +0000
parents 4d3d71a22b9d
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 #ifndef _DEF_MMI_HOMEZONE_H_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 #define _DEF_MMI_HOMEZONE_H_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
6 CONDAT (UK)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 ********************************************************************************
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 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
11 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
12
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $Project name: Basic MMI
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
16 $Project code: BMI
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
17 $Module: SMS
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $File: MmiHomezone.h
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
19 $Revision: 1.0
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
21 $Author: Condat(UK)
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
22 $Date: 25/10/00
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
23
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
25
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Description: Homezone functionality in MMI
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
27
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
28
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
29
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 $History: MmiHomezone.h
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
34 15/02/02 Original Condat(UK) BMI version.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
36 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
37 Description: The homezone/cityzone tags were not being displayed properly.
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
38 Solution: Modified to save the tags properly in caches and also made the
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
39 appropriate modifications to update the same properly during mobility.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
40
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 /****************************************************************************
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
46 * *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
47 * CONSTANTS *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
48 * *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 ****************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
51 #define HZ_ZONES_MAX 4 // Max number of homezones the user can have
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
52 #define HZ_RECENT_MAX 5 // Number of recent cells to be stored
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
53 #define HZ_CACHE_MAX 21 // Size of cache for each homezone
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
54 #define HZ_DISTANCE_MAX 100000 // Maximum distance in metres that user can be from centre of homezone
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
56 #define HZ_IDENTIFIER 221 // Message ID that identifies a homezone CB
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
57 #define HZ_COORD_DIGITS 6 // Number of digits in coordinates received in CB message
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
58 #define HZ_ACTIVE_FLAG 0x01 // If homezone is active, first bit in byte is set
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
59 #define HZ_CITYZONE_FLAG 0x02 // If homezone is a cityzone, second bit in byte is set
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
61 #define HZ_SIM_PARAMETERS 0x6F60 // Field in SIM storing homezone parameters
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
62 #define HZ_SIM_PARAMETERS_SIZE 123 // Size of this field in bytes
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
63 #define HZ_SIM_FIRST_ZONE 17 // Offset from start of parameters file that first zone is found
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
64 #define HZ_SIM_ZONE_SIZE 27 // Size of each zone in bytes
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
65 #define HZ_SIM_CELL_CACHE 0x6F61 // First of series of caches storing homezone cells
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
66 #define HZ_SIM_CELL_CACHE_SIZE 4 // Size of each cache entry (there will be HZ_CACHE_MAX of these per zone)
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
67 #define HZ_NAME_LENGTH 12 // Length of homezone name tag
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
69 #define HZ_NOT_IN_ZONE 0xFF // Value for current_zone when we aren't in a homezone
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
71 #define HZ_CB_NAME "Homezone" // Homezone cell broadcast channel name
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 /****************************************************************************
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
74 * *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
75 * Permitted Network Names *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
76 * *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 ****************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
79 #define HZ_PERMITTED_NETWORKS 1
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 /****************************************************************************
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
83 * *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
84 * Information storage for individual homezone *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
85 * T_homezone *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
86 * *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 ****************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 typedef struct
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 {
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
91 UBYTE zoneID; // The ID of the homezone
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
92 BOOL active; // Whether the homezone is activated at the moment
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
93 BOOL cityzone; // TRUE if the zone is a cityzone
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
94 U32 X; // The X position of its centre
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
95 U32 Y; // The Y position of its centre
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
96 U32 Rsquared; // The radius of the homezone, squared
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
97 char Tag[13]; // The text tag to be displayed when in the homezone
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
98 USHORT lac[HZ_CACHE_MAX]; // The cache of location area codes of cells known to be in this homezone
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
99 USHORT cid[HZ_CACHE_MAX]; // The cache of cell IDs known to be in this homezone
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 } T_homezone;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 /****************************************************************************
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
104 * *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
105 * General homezone information storage *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
106 * T_homezone_data *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
107 * *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 ****************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 typedef struct
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
111 {
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
112 UBYTE current_zone; // Current zone number (1 to HZ_ZONES_MAX). 0 if none.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
113
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
114 U32 current_X; // Coordinates (received from CB) of centre of current cell
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
115 U32 current_Y;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
117 UBYTE received; // Makes sure we have received all necessary data
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
118 UBYTE new_cell_res; // TRUE if a new cell reselection has just occurred
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
119 USHORT lac;
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
120 USHORT cid;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
122 UBYTE recent_cell_index; // Location of recent cells that are within one of the user's homezones.
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
123 USHORT recent_cell[HZ_RECENT_MAX]; // These are used for quick lookup
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
124 UBYTE recent_cell_zone[HZ_RECENT_MAX]; // The homezone/cityzone of the recent cell
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
126 T_homezone homezone[HZ_ZONES_MAX]; // The user's homezones, up to HZ_ZONES_MAX
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
128 UBYTE buffer[HZ_SIM_PARAMETERS_SIZE]; // Buffers for reading from or writing to the SIM
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
129 UBYTE buffer2[HZ_SIM_CELL_CACHE_SIZE];
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 } T_homezone_data;
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 typedef enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 {
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
134 HZ_RECEIVED_CB = 1,
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
135 HZ_RECEIVED_CELLRES = 2,
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
136 HZ_RECEIVED_SIMDATA = 4,
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
137 HZ_RECEIVED_ALL = 7,
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
138 HZ_RECEIVED_HZ_OFF = 128 /* Homezone is switched off */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 } HZ_RECEIVED_TYPE; /*a0393213 warnings removal-declaration requires a typedef name*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 typedef enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 {
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
144 HZ_READ_ONCE_ONLY = 0, /* Only read SIM first time this function is called */
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
145 HZ_READ_SIM_AGAIN = 1 /* Read SIM any number of times */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 } HZ_READ_TYPE;/*a0393213 warnings removal-declaration requires a typedef name*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 /****************************************************************************
111
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
149 * *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
150 * FUNCTION PROTOTYPES *
4d3d71a22b9d mmiHomezone.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
151 * *
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 ****************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 void homezoneInit();
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 void homezoneCBData(char *message);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 void homezoneReadSim(UBYTE read_again);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 void homezoneReadSimCb(USHORT field, USHORT record, USHORT result);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 void homezoneWriteSim(USHORT field, USHORT record);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 void homezoneWriteSimCb(USHORT field, USHORT record, USHORT result);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 // Added third argument to the function
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 //begin 30439
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 void homezoneUpdate(USHORT lac, USHORT cid, UBYTE keep);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 //end 30439
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 void homezoneUpdateDisplay(void);
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 void homezoneActivateCB(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #endif