annotate src/ui3/bmi/mmiHomezone.h @ 421:6a4d9f47793e

src/ui3/bmi: file renames to make the case consistent
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:28:53 +0000
parents src/ui3/bmi/MmiHomezone.h@e8ddbb0837ed
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
420
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #ifndef _DEF_MMI_HOMEZONE_H_
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 #define _DEF_MMI_HOMEZONE_H_
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 /*******************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 CONDAT (UK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ********************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 This software product is the property of Condat (UK) Ltd and may not be
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 disclosed to any third party without the express permission of the owner.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ********************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 $Project name: Basic MMI
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 $Project code: BMI
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 $Module: SMS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 $File: MmiHomezone.h
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 $Revision: 1.0
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 $Author: Condat(UK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 $Date: 25/10/00
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 ********************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Description: Homezone functionality in MMI
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ********************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 $History: MmiHomezone.h
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 15/02/02 Original Condat(UK) BMI version.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Description: The homezone/cityzone tags were not being displayed properly.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 Solution: Modified to save the tags properly in caches and also made the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 appropriate modifications to update the same properly during mobility.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 $End
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 *******************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 /****************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 * CONSTANTS *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 ****************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define HZ_ZONES_MAX 4 // Max number of homezones the user can have
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #define HZ_RECENT_MAX 5 // Number of recent cells to be stored
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #define HZ_CACHE_MAX 21 // Size of cache for each homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #define HZ_DISTANCE_MAX 100000 // Maximum distance in metres that user can be from centre of homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define HZ_IDENTIFIER 221 // Message ID that identifies a homezone CB
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #define HZ_COORD_DIGITS 6 // Number of digits in coordinates received in CB message
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #define HZ_ACTIVE_FLAG 0x01 // If homezone is active, first bit in byte is set
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #define HZ_CITYZONE_FLAG 0x02 // If homezone is a cityzone, second bit in byte is set
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #define HZ_SIM_PARAMETERS 0x6F60 // Field in SIM storing homezone parameters
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #define HZ_SIM_PARAMETERS_SIZE 123 // Size of this field in bytes
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #define HZ_SIM_FIRST_ZONE 17 // Offset from start of parameters file that first zone is found
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #define HZ_SIM_ZONE_SIZE 27 // Size of each zone in bytes
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #define HZ_SIM_CELL_CACHE 0x6F61 // First of series of caches storing homezone cells
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
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)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #define HZ_NAME_LENGTH 12 // Length of homezone name tag
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #define HZ_NOT_IN_ZONE 0xFF // Value for current_zone when we aren't in a homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 #define HZ_CB_NAME "Homezone" // Homezone cell broadcast channel name
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 /****************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 * Permitted Network Names *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 ****************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #define HZ_PERMITTED_NETWORKS 1
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 /****************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 * Information storage for individual homezone *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 * T_homezone *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 ****************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 typedef struct
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 UBYTE zoneID; // The ID of the homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 BOOL active; // Whether the homezone is activated at the moment
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 BOOL cityzone; // TRUE if the zone is a cityzone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 U32 X; // The X position of its centre
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 U32 Y; // The Y position of its centre
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 U32 Rsquared; // The radius of the homezone, squared
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 char Tag[13]; // The text tag to be displayed when in the homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 USHORT lac[HZ_CACHE_MAX]; // The cache of location area codes of cells known to be in this homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 USHORT cid[HZ_CACHE_MAX]; // The cache of cell IDs known to be in this homezone
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 } T_homezone;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 /****************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 * General homezone information storage *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 * T_homezone_data *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 ****************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 typedef struct
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 UBYTE current_zone; // Current zone number (1 to HZ_ZONES_MAX). 0 if none.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 U32 current_X; // Coordinates (received from CB) of centre of current cell
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 U32 current_Y;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 UBYTE received; // Makes sure we have received all necessary data
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 UBYTE new_cell_res; // TRUE if a new cell reselection has just occurred
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 USHORT lac;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 USHORT cid;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 UBYTE recent_cell_index; // Location of recent cells that are within one of the user's homezones.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 USHORT recent_cell[HZ_RECENT_MAX]; // These are used for quick lookup
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 UBYTE recent_cell_zone[HZ_RECENT_MAX]; // The homezone/cityzone of the recent cell
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 T_homezone homezone[HZ_ZONES_MAX]; // The user's homezones, up to HZ_ZONES_MAX
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 UBYTE buffer[HZ_SIM_PARAMETERS_SIZE]; // Buffers for reading from or writing to the SIM
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 UBYTE buffer2[HZ_SIM_CELL_CACHE_SIZE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 } T_homezone_data;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 typedef enum
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 HZ_RECEIVED_CB = 1,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 HZ_RECEIVED_CELLRES = 2,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 HZ_RECEIVED_SIMDATA = 4,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 HZ_RECEIVED_ALL = 7,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 HZ_RECEIVED_HZ_OFF = 128 /* Homezone is switched off */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 } HZ_RECEIVED_TYPE; /*a0393213 warnings removal-declaration requires a typedef name*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 typedef enum
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 HZ_READ_ONCE_ONLY = 0, /* Only read SIM first time this function is called */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 HZ_READ_SIM_AGAIN = 1 /* Read SIM any number of times */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 } HZ_READ_TYPE;/*a0393213 warnings removal-declaration requires a typedef name*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 /****************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 * FUNCTION PROTOTYPES *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 * *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 ****************************************************************************/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 void homezoneInit();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 void homezoneCBData(char *message);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 void homezoneReadSim(UBYTE read_again);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 void homezoneReadSimCb(USHORT field, USHORT record, USHORT result);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 void homezoneWriteSim(USHORT field, USHORT record);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 void homezoneWriteSimCb(USHORT field, USHORT record, USHORT result);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 // Added third argument to the function
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 //begin 30439
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 void homezoneUpdate(USHORT lac, USHORT cid, UBYTE keep);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 //end 30439
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 void homezoneUpdateDisplay(void);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 void homezoneActivateCB(void);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #endif