FreeCalypso > hg > tcs211-c139
comparison g23m/condat/ms/src/aci_ext/aci_ext_pers.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : J:\g23m-aci\aci_ext\aci_ext_pers.h | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 #ifndef ACI_EXT_PERS_H | |
21 #define ACI_EXT_PERS_H | |
22 | |
23 /* ACI extension definitions */ | |
24 #define PERSONALISATION_MAX 15 /* maximal amount of personalisation variants per personalisation check */ | |
25 | |
26 #ifdef SIM_PERS | |
27 enum E_AUTO_DEPENDECY_FLAG | |
28 { | |
29 NW_AUTO_LOCK = 0x01, | |
30 NS_AUTO_LOCK = 0x02, | |
31 SP_AUTO_LOCK = 0x04, | |
32 CP_AUTO_LOCK = 0x08, | |
33 SIM_AUTO_LOCK= 0x10 | |
34 }; | |
35 #endif | |
36 /* Globals ------------------------------------------------------------------------------ */ | |
37 | |
38 | |
39 typedef enum | |
40 { | |
41 MMILOCK_FAIL = -1, | |
42 MMILOCK_DISABLED, /* No lock check to be done */ | |
43 MMILOCK_ENABLED, /* A lock check to be executed*/ | |
44 MMILOCK_BLOCKED, /* MMI lock failed */ | |
45 MMILOCK_VERIFIED /* MMI lock verified */ | |
46 } T_MMILOCK_STATUS; | |
47 | |
48 typedef enum | |
49 { | |
50 SIMLOCK_FAIL = -1, | |
51 SIMLOCK_DISABLED, /* No SIM lock check has to be done */ | |
52 SIMLOCK_PERM_DISABLED, | |
53 SIMLOCK_ENABLED, /* A SIM lock check has to be executed*/ | |
54 SIMLOCK_BLOCKED, /* The SIM is blocked, i.e. because of a (or to many) wrong PIN(s) */ | |
55 SIMLOCK_LOCKED, /* The ME is locked because of wrong SIM */ | |
56 SIMLOCK_WAIT /* Wait to read EF gid1 and gid2 */ | |
57 } T_SIMLOCK_STATUS; | |
58 | |
59 typedef enum | |
60 { | |
61 AUTOLOCK_FAIL = -1, | |
62 AUTOLOCK_CMPL, /* No SIM lock check has to be done */ | |
63 AUTOLOCK_EXCT | |
64 } T_AUTOLOCK_STATUS; | |
65 | |
66 typedef enum | |
67 { | |
68 SIMLOCK_CHECK_LOCK =0, | |
69 SIMLOCK_CHECK_PERS, | |
70 SIMLOCK_CHECK_RESET_FC | |
71 }T_SIMLOCK_CHECK; | |
72 | |
73 typedef enum | |
74 { | |
75 SIMLOCK_NETWORK = 0, /* Network personalisation */ | |
76 SIMLOCK_NETWORK_SUBSET, /* Network subset personalisation */ | |
77 SIMLOCK_SERVICE_PROVIDER, /* Service provider personalisation */ | |
78 SIMLOCK_CORPORATE, /* Corporate personalisation */ | |
79 SIMLOCK_SIM, /* SIM personalisation */ | |
80 SIMLOCK_FIRST_SIM /* ME is not personalized and will be personalisation to first | |
81 SIM inserted into the ME */ | |
82 } T_SIMLOCK_TYPE; | |
83 | |
84 | |
85 typedef enum | |
86 { | |
87 OPER_FAIL = -1, | |
88 OPER_SUCCESS | |
89 } T_OPER_RET_STATUS; | |
90 | |
91 | |
92 #define NO_SP_DEFINED 255 /* If service provider (SP) code holds FF, no SP code is defined */ | |
93 #define NO_CORP_DEFINED 255 /* If corporate code holds FF, no corporate code is defined */ | |
94 | |
95 | |
96 | |
97 | |
98 #define T_ACI_PERS_STATUS_LEN 44 | |
99 #define T_ACI_PERS_STATUS_PUK_LEN 52 | |
100 | |
101 | |
102 typedef struct | |
103 { | |
104 UBYTE State; | |
105 UBYTE cnt; // No of retries | |
106 UBYTE maxcnt; // Max count allowed | |
107 UBYTE PwdLength; | |
108 UBYTE Cur_code[3]; // Current lock | |
109 UBYTE Org_code[3]; // Original lock | |
110 } T_ACI_PERS_MMI_DATAS; | |
111 | |
112 | |
113 /* prototypes of the aci_personalisation functions.-------------------------------------- */ | |
114 | |
115 /* | |
116 Initialisation of this extension. Might be used to initialise variables, set temporary data to default values and so on. | |
117 This method will be called before any other public method of this extension. | |
118 */ | |
119 void aci_ext_personalisation_init( void ); | |
120 | |
121 | |
122 | |
123 /* | |
124 ACI extension method for retrieving the status of a single personalisation type. | |
125 The personalisation status is stored in a separate customer managed memory area | |
126 and the customer has to implement this extension method to return the actual status | |
127 of the questioned personalisation type. | |
128 */ | |
129 T_SIMLOCK_STATUS aci_ext_personalisation_get_status( T_SIMLOCK_TYPE personalisation_type ); | |
130 | |
131 // ACI extension to Get desired password length | |
132 UBYTE aci_ext_personalisation_get_MMI_PwdLen( void ); | |
133 | |
134 /* | |
135 ACI extension method for verifying the passowrd. | |
136 If the password is false then the counter is increased. If maxcnt is reached then the key | |
137 will been blocked. | |
138 If the password is correct then the counter is set to 0 | |
139 */ | |
140 T_SIMLOCK_STATUS aci_ext_personalisation_verify_password( T_SIMLOCK_TYPE personalisation_type, char *passwd); | |
141 | |
142 /* | |
143 ACI extension method for changind the password. | |
144 */ | |
145 T_SIMLOCK_STATUS aci_ext_personalisation_change_password( T_SIMLOCK_TYPE personalisation_type, char *passwd, char *new_passwd ); | |
146 | |
147 | |
148 /* | |
149 ACI extension method for retrieving the status of a single personalisation type. | |
150 The personalisation status is stored in a separate customer managed memory area | |
151 and the customer has to implement this extension method to return the actual status | |
152 of the questioned personalisation type. | |
153 */ | |
154 T_SIMLOCK_STATUS aci_ext_personalisation_set_status( T_SIMLOCK_TYPE personalisation_type, | |
155 T_SIMLOCK_STATUS lock, char* passwd); | |
156 | |
157 | |
158 #ifdef SIM_PERS | |
159 /*--------------------------------------------------- | |
160 For Failure Counter reset. Uses Security Drv. method to reset FC | |
161 added on 11/03/2005 | |
162 -----------------------------------------------------*/ | |
163 T_OPER_RET_STATUS aci_ext_slock_reset_fc(char *fckey); | |
164 | |
165 /*-------------------------------------- | |
166 For Supplementary Info( e.g. FC MAX, MC Current value). | |
167 Uses Security Drv api sec_get_CFG | |
168 added on 11/03/2005 | |
169 ----------------------------------------*/ | |
170 T_OPER_RET_STATUS aci_ext_slock_sup_info (T_SUP_INFO *sup_info); | |
171 | |
172 /* auto personalisation for first sim */ | |
173 T_AUTOLOCK_STATUS aci_ext_auto_personalise(); | |
174 void aci_ext_add_code(T_SIMLOCK_TYPE type); | |
175 | |
176 #endif //SIM_PERS | |
177 | |
178 | |
179 /* MMI Lock handling functions */ | |
180 T_SIMLOCK_STATUS aci_ext_personalisation_CS_change_password( char *passwd, char *new_passwd ); | |
181 T_SIMLOCK_STATUS aci_ext_personalisation_CS_set_status(T_SIMLOCK_STATUS lock , char * passwd); | |
182 T_SIMLOCK_STATUS aci_ext_personalisation_CS_get_status(); | |
183 | |
184 | |
185 #ifdef SIM_PERS | |
186 void aci_ext_personalisation_free( void ); | |
187 #endif //SIM_PERS | |
188 | |
189 #endif /* ACI_EXT_PERS_H */ |