tizen 2.3.1 release
[framework/telephony/tel-plugin-dbus_tapi.git] / src / sat_ui_support / TelSim.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 /**
22  * @open
23  * @ingroup             TelephonyAPI
24  * @addtogroup  SIM_TAPI        SIM
25  * @{
26  *
27  * @file TelSim.h
28
29  @brief This file serves as a "C" header file defines structures for Tapi SIM Services. \n
30  It contains a sample set of constants, enums, structs that would be required by applications.
31  */
32
33 #ifndef _TELSIM_H_
34 #define _TELSIM_H_
35
36 #include <TelDefines.h>
37
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42
43 /** Maximum ICCID Length */
44 #define TAPI_SIM_ICCID_LEN_MAX 20
45
46 /** Alpha Id  max length */
47 #define TAPI_SIM_XDN_ALPHA_ID_MAX_LEN 30
48
49 /** Dialing number max length */
50 #define TAPI_SIM_XDN_DIALING_NUMBER_LEN 20
51
52 /** MSISDN number max length */
53 #define TAPI_SIM_MSISDN_DIALING_NUMBER_LEN      26
54
55 /** CSP profile entry count max length */
56 #define TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX  11
57
58 /** Authentication code max length */
59 #define TAPI_SIM_AUTH_MAX_REQ_DATA_LEN 256
60
61 /** Authentication response data max length */
62 #define TAPI_SIM_AUTH_MAX_RESP_DATA_LEN 128
63
64 /** SAP APDU max length */
65 /** 2048 is for QMI definition. (1024 : general length, 1024 : extra length for additional response) */
66 #define TAPI_SIM_APDU_MAX_LEN 2048
67
68 /** SIM 3G Phone book EF Max count */
69 #define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
70
71 /** SIM Phone book Record name max length */
72 #define TAPI_SIM_PB_RECORD_NAME_MAX_LEN 255
73
74 /** SIM Phone book Record number max length */
75 #define TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN 255
76
77 /** SIM Phone book Record email max length */
78 #define TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN 255
79
80 /** SAP Answer to Reset data max length */
81 #define TAPI_SIM_SAP_ATR_DATA   256
82
83 #define TAPI_SIM_NET_FULL_NAME_MAX_LEN 40
84
85 #define TAPI_SIM_NET_SHORT_NAME_MAX_LEN 10
86
87 #define TAPI_SIM_MSP_CNT_MAX 2
88
89 #define TAPI_SIM_OPERATION_TIMEOUT 1234
90
91 #define TAPI_SIM_SST_SERVICE_CNT_MAX 56
92
93 #define TAPI_SIM_UST_SERVICE_CNT_MAX 64
94
95 /**
96  * @enum TelSimCardType_t
97  * This enumeration defines the card type.
98  */
99 typedef enum {
100         TAPI_SIM_CARD_TYPE_UNKNOWN, /**< Unknown card */
101         TAPI_SIM_CARD_TYPE_GSM, /**< SIm(GSM) card*/
102         TAPI_SIM_CARD_TYPE_USIM, /**< USIM card */
103         TAPI_SIM_CARD_TYPE_RUIM,
104         TAPI_SIM_CARD_TYPE_IMS,
105 } TelSimCardType_t;
106
107 /**
108  * @enum TelSimFileID_t
109  * This enumeration defines the card type.
110  */
111 typedef enum {
112         TAPI_SIM_EF_DIR = 0x2F00, /**< Root Directory for the USIM */
113         TAPI_SIM_EF_ICCID = 0x2FE2, /**< the ICC Identification file    */
114         TAPI_SIM_EF_IMSI = 0x6F07, /**< the IMSI file                */
115         TAPI_SIM_EF_SST = 0x6F38, /**< the SIM Service Table file   */
116         TAPI_SIM_EF_EST = 0x6F56, /**< the Enabled Service Table file   */
117         TAPI_SIM_EF_OPLMN_ACT = 0x6F61, /**< the OPLMN List file*/
118         TAPI_SIM_EF_GID1 = 0x6F3E, /**< the Group Identifier Level 1 */
119         TAPI_SIM_EF_GID2 = 0x6F3F, /**< the Group Identifier Level 2 */
120
121         TAPI_SIM_EF_ELP = 0x2F05, /**< the Extended Language Preference file */
122         TAPI_SIM_EF_LP = 0x6F05, /**< SIM: Language preference */
123         TAPI_SIM_EF_ECC = 0x6FB7, /**< the Emergency Call Codes     */
124         TAPI_SIM_EF_SPN = 0x6F46, /**< the Service Provider Name    */
125         TAPI_SIM_EF_SPDI = 0x6FCD, /**< the Service provider display information*/
126         TAPI_SIM_EF_PNN = 0x6FC5, /**< the PLMN Network Name File*/
127         TAPI_SIM_EF_OPL = 0x6FC6, /**< the Operator PLMN List File*/
128         TAPI_SIM_EF_MSISDN = 0x6F40, /**< MSISDN */
129
130         TAPI_SIM_EF_SMS = 0x6F3C, /** < Short Messages file */
131         TAPI_SIM_EF_SMSP = 0x6F42, /** < SMS Parameter */
132         TAPI_SIM_EF_SMSS = 0x6F43, /** < SMS Status */
133         TAPI_SIM_EF_CBMI = 0x6F45, /** < Cell Broadcast Message Identifier */
134         TAPI_SIM_EF_MBDN = 0x6FC7, /** < SIM Mail Box Dialing Number file */
135
136         TAPI_SIM_EF_USIM_MBI = 0x6FC9, /** < Mailbox Identifier -linear fixed*/
137         TAPI_SIM_EF_USIM_MWIS = 0x6FCA, /** < Message Waiting Indication Status -linear fixed*/
138         TAPI_SIM_EF_USIM_CFIS = 0x6FCB, /** < Call forward indication status -linear fixed*/
139
140         /* CPHS FILE ID */
141         TAPI_SIM_EF_CPHS_VOICE_MSG_WAITING = 0x6F11, /** < CPHS voice MSG waiting indication  */
142         TAPI_SIM_EF_CPHS_SERVICE_STRING_TABLE = 0x6F12, /** < CPHS service string table  */
143         TAPI_SIM_EF_CPHS_CALL_FORWARD_FLAGS = 0x6F13, /** < CPHS call forward flags  */
144         TAPI_SIM_EF_CPHS_OPERATOR_NAME_STRING = 0x6F14, /** < CPHS operator name string  */
145         TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE = 0x6F15, /** < CPHS customer service profile  */
146         TAPI_SIM_EF_CPHS_CPHS_INFO = 0x6F16, /** < CPHS information  */
147         TAPI_SIM_EF_CPHS_MAILBOX_NUMBERS = 0x6F17, /** < CPHS mail box numbers  */
148         TAPI_SIM_EF_CPHS_OPERATOR_NAME_SHORT_FORM_STRING = 0x6F18, /** < CPHS operator name short form string  */
149         TAPI_SIM_EF_CPHS_INFORMATION_NUMBERS = 0x6F19, /** < CPHS information numbers  */
150         /*  CPHS ALS FILE ID */
151         TAPI_SIM_EF_CPHS_DYNAMICFLAGS = 0x6F9F, /** < CPHS Dynamics flags  */
152         TAPI_SIM_EF_CPHS_DYNAMIC2FLAG = 0x6F92, /** < CPHS Dynamics2 flags  */
153         TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2 = 0x6F98, /** < CPHS CSP2  */
154
155         /* Invalid File ID, All the file ID are less than this Value*/
156         TAPI_SIM_EF_INVALID = 0xFFFF, /**< Invalid file.*/
157         TAPI_SIM_EF_OTHERS, /**< Element to indicate an unknown file.*/
158 }TelSimFileID_t;
159
160 /**
161  * @enum TelSimFacilityStatus_t
162  * This enumeration defines the pin status.
163  */
164 typedef enum {
165         TAPI_SIM_FACILITY_DISABLED = 0x00,
166         TAPI_SIM_FACILITY_ENABLED = 0x01,
167         TAPI_SIM_FACILITY_UNKNOWN = 0xFF
168 } TelSimFacilityStatus_t;
169
170 /**
171  * @enum TelSimPinOperationResult_t
172  * This enumeration defines the pin operation result from the lower layers.
173  */
174 typedef enum {
175         TAPI_SIM_PIN_OPERATION_SUCCESS, /**< Operation involving PIN (verification/change/enable/disable, etc) is successful.  */
176         TAPI_SIM_BUSY, /**< SIM is busy  */
177         TAPI_SIM_CARD_ERROR, /**< SIM card error - General errors   */
178         TAPI_SIM_INCOMPATIBLE_PIN_OPERATION, /**< SIM Incompatible pin operation that is in case when invalid SIM command is given or incorrect parameters are supplied to the SIM. */
179         TAPI_SIM_PIN_INCORRECT_PASSWORD, /**< SIM PIN  Incorrect password */
180         TAPI_SIM_PUK_INCORRECT_PASSWORD, /**< SIM PUK Incorrect Password */
181         TAPI_SIM_PUK_REQUIRED, /**< PUK Required */
182         TAPI_SIM_PIN_REQUIRED, /**< PIN Required */
183         TAPI_SIM_NCK_REQUIRED, /**< Network Control Key Required */
184         TAPI_SIM_NSCK_REQUIRED, /**< Network Subset Control Key Required */
185         TAPI_SIM_SPCK_REQUIRED, /**< Service Provider Control Key Required */
186         TAPI_SIM_CCK_REQUIRED, /**< Corporate Control Key Required */
187         TAPI_SIM_LOCK_REQUIRED, /**<  PH-SIM (phone-SIM) locked state **/
188         TAPI_SIM_PERM_BLOCKED /**< Permanently Blocked **/
189 } TelSimPinOperationResult_t;
190
191 /**
192  * @enum TelSimAccessResult_t
193  * This enumeration defines the SIM access result from the lower layers.
194  */
195 typedef enum {
196         TAPI_SIM_ACCESS_SUCCESS, /**< Access to file successful.  */
197         TAPI_SIM_ACCESS_CARD_ERROR, /**< SIM card error    */
198         TAPI_SIM_ACCESS_FILE_NOT_FOUND, /**< File not found  */
199         TAPI_SIM_ACCESS_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition is not fulfilled  */
200         TAPI_SIM_ACCESS_FAILED, /**< Access failed.  */
201 } TelSimAccessResult_t;
202
203 /**
204  * @enum TelSimPinType_t
205  * This enumeration defines the pin type.
206  */
207 typedef enum {
208         TAPI_SIM_PTYPE_PIN1 = 0x00, /**< PIN 1 code */
209         TAPI_SIM_PTYPE_PIN2 = 0x01, /**< PIN 2 code */
210         TAPI_SIM_PTYPE_PUK1 = 0x02, /**< PUK 1 code */
211         TAPI_SIM_PTYPE_PUK2 = 0x03, /**< PUK 2 code */
212         TAPI_SIM_PTYPE_UPIN = 0x04, /**< Universal PIN - Unused now */
213         TAPI_SIM_PTYPE_ADM = 0x05, /**< Administrator - Unused now */
214         TAPI_SIM_PTYPE_SIM = 0x06 /**< SIM Lock code */
215 } TelSimPinType_t;
216
217 /**
218  * @enum TelSimTypeOfNum_t
219  * This enumeration defines the type of number.
220  */
221 typedef enum {
222         TAPI_SIM_TON_UNKNOWN = 0, /**< unknown */
223         TAPI_SIM_TON_INTERNATIONAL = 1, /**< international number */
224         TAPI_SIM_TON_NATIONAL = 2, /**< national number */
225         TAPI_SIM_TON_NETWORK_SPECIFIC = 3, /**< network specific number */
226         TAPI_SIM_TON_DEDICATED_ACCESS = 4, /**< subscriber number */
227         TAPI_SIM_TON_ALPHA_NUMERIC = 5, /**< alphanumeric, GSM 7-bit default alphabet) */
228         TAPI_SIM_TON_ABBREVIATED_NUMBER = 6, /**< abbreviated number */
229         TAPI_SIM_TON_RESERVED_FOR_EXT = 7 /**< reserved for extension */
230 } TelSimTypeOfNum_t;
231
232 /**
233  *  @enum TelSimTextEncrypt_t
234  *   This enumeration defines the text encryption types
235  */
236 typedef enum {
237         TAPI_SIM_TEXT_ENC_ASCII, /**< ASCII Encoding */
238         TAPI_SIM_TEXT_ENC_GSM7BIT, /**< GSM 7 Bit Encoding */
239         TAPI_SIM_TEXT_ENC_UCS2, /**< UCS2 Encoding */
240         TAPI_SIM_TEXT_ENC_HEX, /**< HEX Encoding */
241 } TelSimTextEncrypt_t;
242
243 /**
244  * @enum TelSimNumberingPlanIdentity_t
245  * This enumeration defines the numbering plan identifier.
246  */
247 typedef enum {
248         TAPI_SIM_NPI_UNKNOWN = 0, /**< Unknown */
249         TAPI_SIM_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
250         TAPI_SIM_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
251         TAPI_SIM_NPI_TELEX = 4, /**< Telex numbering plan */
252         TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
253         TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
254         TAPI_SIM_NPI_NATIONAL = 8, /**< National numbering plan */
255         TAPI_SIM_NPI_PRIVATE = 9, /**< Private numbering plan */
256         TAPI_SIM_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
257         TAPI_SIM_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
258 } TelSimNumberingPlanIdentity_t;
259
260 /**
261  * @enum TelSimEccEmergencyServiceInfo_t
262  * This enumeration defines the emergency service type.
263  */
264 typedef enum {
265         TAPI_SIM_ECC_ESC_POLICE = 0x01, /**< Police */
266         TAPI_SIM_ECC_ESC_AMBULANCE = 0x02, /**< Ambulance */
267         TAPI_SIM_ECC_ESC_FIREBRIGADE = 0x04, /**< Fire brigade */
268         TAPI_SIM_ECC_ESC_MARAINEGUARD = 0x08, /**< Marine guard */
269         TAPI_SIM_ECC_ESC_MOUTAINRESCUE = 0x10, /**< Mountain rescue */
270         TAPI_SIM_ECC_ESC_SPARE = 0x00 /**< Spare */
271 } TelSimEccEmergencyServiceInfo_t;
272
273 /**
274  * @enum TelSimLanguagePreferenceCode_t
275  * This enumeration defines the language indication code.
276  */
277 typedef enum {
278         TAPI_SIM_LP_GERMAN = 0x00, /**< German */
279         TAPI_SIM_LP_ENGLISH = 0x01, /**< English */
280         TAPI_SIM_LP_ITALIAN = 0x02, /**< Italian */
281         TAPI_SIM_LP_FRENCH = 0x03, /**< French */
282         TAPI_SIM_LP_SPANISH = 0x04, /**< Spanish */
283         TAPI_SIM_LP_DUTCH = 0x05, /**< Dutch */
284         TAPI_SIM_LP_SWEDISH = 0x06, /**< Swedish */
285         TAPI_SIM_LP_DANISH = 0x07, /**< Danish */
286         TAPI_SIM_LP_PORTUGUESE = 0x08, /**< Portuguese */
287         TAPI_SIM_LP_FINNISH = 0x09, /**< Finnish */
288         TAPI_SIM_LP_NORWEGIAN = 0x0A, /**< Norwegian */
289         TAPI_SIM_LP_GREEK = 0x0B, /**< Greek */
290         TAPI_SIM_LP_TURKISH = 0x0C, /**< Turkish */
291         TAPI_SIM_LP_HUNGARIAN = 0x0D, /**< Hungarian */
292         TAPI_SIM_LP_POLISH = 0x0E, /**< Polish */
293         TAPI_SIM_LP_KOREAN = 0x0F, /**< Korean */
294         TAPI_SIM_LP_CHINESE = 0x10, /**< Chinese */
295         TAPI_SIM_LP_RUSSIAN = 0x11, /**< Russian */
296         TAPI_SIM_LP_JAPANESE = 0x12, /**< Japanese */
297         TAPI_SIM_LP_LANG_UNSPECIFIED = 0xFF /**< Unspecified */
298 } TelSimLanguagePreferenceCode_t;
299
300 /**
301  * @enum TelSimCardStatus_t
302  * This enumeration defines the SIM card status
303  */
304 typedef enum {
305         TAPI_SIM_STATUS_CARD_ERROR = 0x00, /**< Bad card / On the fly SIM gone bad **/
306         TAPI_SIM_STATUS_CARD_NOT_PRESENT = 0x01, /**<  Card not present **/
307         TAPI_SIM_STATUS_SIM_INITIALIZING = 0x02, /**<  SIM is Initializing state **/
308         TAPI_SIM_STATUS_SIM_INIT_COMPLETED = 0x03, /**<  SIM Initialization ok **/
309         TAPI_SIM_STATUS_SIM_PIN_REQUIRED = 0x04, /**<  PIN  required state **/
310         TAPI_SIM_STATUS_SIM_PUK_REQUIRED = 0x05, /**<  PUK required state **/
311         TAPI_SIM_STATUS_CARD_BLOCKED = 0x06, /**<  PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
312         TAPI_SIM_STATUS_SIM_NCK_REQUIRED = 0x07, /**<  Network Control Key required state **/
313         TAPI_SIM_STATUS_SIM_NSCK_REQUIRED = 0x08, /**<  Network Subset Control Key required state **/
314         TAPI_SIM_STATUS_SIM_SPCK_REQUIRED = 0x09, /**<  Service Provider Control Key required state **/
315         TAPI_SIM_STATUS_SIM_CCK_REQUIRED = 0x0a, /**<  Corporate Control Key required state **/
316         TAPI_SIM_STATUS_CARD_REMOVED = 0x0b, /**<  Card removed **/
317         TAPI_SIM_STATUS_SIM_LOCK_REQUIRED = 0x0c, /**<  PH-SIM (phone-SIM) locked state **/
318         TAPI_SIM_STATUS_CARD_CRASHED = 0x0d, /**< Runtime SIM card error **/
319         TAPI_SIM_STATUS_UNKNOWN = 0xff /**<  Unknown status. It can be initial status **/
320 } TelSimCardStatus_t;
321
322 /**
323  * @enum TelSimCphsPhaseType_t
324  * This enum gives the current CPHS phase of SIM card.
325  */
326 typedef enum {
327         TAPI_SIM_CPHS_PHASE1 = 0x01, /**< phase1  */
328         TAPI_SIM_CPHS_PHASE2 = 0x02, /**< phase2  */
329         TAPI_SIM_CPHS_PHASE_RFU = 0xff /**< RFU  */
330 } TelSimCphsPhaseType_t;
331
332 /**
333  * @enum TelSimCphsIndexLevelIndicator_t
334  * This struct gives CPHS index level indication.
335  */
336 typedef enum {
337         TAPI_SIM_CPHS_INDEX_LEVEL_ONE = 0x01, /**< SIM cphs index level one */
338         TAPI_SIM_CPHS_INDEX_LEVEL_TWO = 0x02, /**< SIM cphs index level two */
339         TAPI_SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM cphs index level three */
340         TAPI_SIM_CPHS_INDEX_LEVEL_RFU = 0xff /**< SIM cphs index level rfu */
341 } TelSimCphsIndexLevelIndicator_t;
342
343 /**
344  * @enum TelSimCphsCustomerServiceGroup_t
345  * This struct gives CPHS group service type information .
346  */
347 typedef enum {
348         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING = 0x01, /**< Group csp offering*/
349         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_RESTRICTION = 0x02, /**< Group csp restriction*/
350         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES = 0x03, /**< Group csp supplementary services*/
351         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION = 0x04, /**< Group csp completion*/
352         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_TELESERVICES = 0x05, /**< Group csp teleservices*/
353         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES = 0x06, /**< Group csp cphs teleservies*/
354         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_FEATURES = 0x07, /**< Group csp cphs features*/
355         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_NUMBER_IDENTIFIERS = 0x08, /**< Group csp number identifiers*/
356         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_PHASE_SERVICES = 0x09, /**< Group csp phase services*/
357         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_VALUE_ADDED_SERVICES = 0xC0, /**< Group csp value added services*/
358         TAPI_SIM_CPHS_CSP_SERVICE_GROUP_INFORMATION_NUMBERS = 0xD5 /**< Group csp information numbers*/
359 } TelSimCphsCustomerServiceGroup_t;
360
361 /**
362  * @enum TelSimMailboxType_t
363  * This enum gives mailbox type.
364  */
365 typedef enum {
366         TAPI_SIM_MAILBOX_VOICE = 0x01, /**< Voicemail*/
367         TAPI_SIM_MAILBOX_FAX = 0x02, /**< Fax*/
368         TAPI_SIM_MAILBOX_EMAIL = 0x03, /**< Email*/
369         TAPI_SIM_MAILBOX_OTHER = 0x04, /**< Other*/
370         TAPI_SIM_MAILBOX_VIDEO = 0x05, /**< Videomail*/
371         TAPI_SIM_MAILBOX_DATA = 0x06, /**< Data*/
372 } TelSimMailboxType_t;
373
374 /**
375  * @enum TelSimDynamicFlagsSelectedLineId_t
376  * This enum gives dynamics flag selected line  information.
377  */
378 typedef enum {
379         TAPI_SIM_DYNAMIC_FLAGS_LINE1 = 0x01, /**< line 1 */
380         TAPI_SIM_DYNAMIC_FLAGS_LINE2 = 0x00, /**< line 2*/
381         TAPI_SIM_DYNAMIC_FLAGS_RFU = 0xff /**< rfu*/
382 } TelSimDynamicFlagsSelectedLineId_t;
383
384 /**
385  * @enum tapi_sim_dynamic2_flag_als_status_t
386  * This enum gives dynamics2 flag selected line  information.
387  */
388 typedef enum {
389         TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED = 0x01, /**< Dynamic flags locked */
390         TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
391         TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_RFU = 0xff /**< rfu */
392 } TelSimDynamic2FlagAlsStatus_t;
393
394
395 /**
396  * @enum TelSimAuthenticationType_t
397  * This is used for Authentication Procedure by using SIM.
398  */
399 typedef enum {
400         TAPI_SIM_AUTH_TYPE_IMS = 0x00, /**< IMS Authentication */
401         TAPI_SIM_AUTH_TYPE_GSM, /**< GSM Authentication */
402         TAPI_SIM_AUTH_TYPE_3G, /**< 3G Authentication */
403         TAPI_SIM_AUTH_TYPE_MAX /**< TBD */
404 } TelSimAuthenticationType_t;
405
406 /**
407  * @enum TelSimAuthenticationResult_t
408  * This is used for Authentication Procedure.
409  */
410 typedef enum {
411         TAPI_SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
412         TAPI_SIM_AUTH_CANNOT_PERFORM, /**< status - can't perform authentication */
413         TAPI_SIM_AUTH_SKIP_RESPONSE, /**< status - skip authentication response */
414         TAPI_SIM_AUTH_MAK_CODE_FAILURE, /**< status - MAK(Multiple Activation Key) code failure */
415         TAPI_SIM_AUTH_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
416         TAPI_SIM_AUTH_SYNCH_FAILURE, /**< status - synch failure */
417         TAPI_SIM_AUTH_UNSUPPORTED_CONTEXT, /**< status - unsupported context */
418         TAPI_SIM_AUTH_MAX /**< TBD */
419 } TelSimAuthenticationResult_t;
420
421 /**
422  * @enum TelSimLockType_t
423  *      This structure gives security lock type enum values
424  */
425 typedef enum {
426         TAPI_SIM_LOCK_PS = 0x01, /** < PH-SIM (phone-SIM) locked.Lock Phone to SIM/UICC card
427          *      (MT asks password when other than current SIM/UICC card inserted;
428          *      MT may remember certain amount of previously used cards thus not
429          *      requiring password when they are inserted
430          */
431         TAPI_SIM_LOCK_PF, /** < PH-FSIM (phone-first-SIM) Lock Phone to the very
432          * First inserted SIM/UICC card(MT asks password when other than the first SIM/UICC
433          * card is inserted
434          */
435         TAPI_SIM_LOCK_SC, /** < SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks password in ME power-up and
436          *      when this command is issued
437          */
438         TAPI_SIM_LOCK_FD, /** < FDN - SIM card or active application in the UICC (GSM or USIM)
439          *      fixed dialing memory feature */
440         TAPI_SIM_LOCK_PN, /**< Network Personalization */
441         TAPI_SIM_LOCK_PU, /** < network subset Personalization */
442         TAPI_SIM_LOCK_PP, /** < service Provider Personalization */
443         TAPI_SIM_LOCK_PC, /** < Corporate Personalization */
444 } TelSimLockType_t;
445
446 /**
447  * @enum TelSimLockKey_t
448  *      This structure gives security lock key information enum values
449  */
450 typedef enum {
451         TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< key not need */
452         TAPI_SIM_LOCK_KEY_PIN = 0x01, /**< PIN required */
453         TAPI_SIM_LOCK_KEY_PUK = 0x02, /**< PUK required */
454         TAPI_SIM_LOCK_KEY_PIN2 = 0x03, /**< PIN2 required */
455         TAPI_SIM_LOCK_KEY_PUK2 = 0x04, /**< PUK2 required */
456         TAPI_SIM_LOCK_PERM_BLOCKED = 0x05, /**< Permanent block SIM */
457 } TelSimLockStatus_t;
458
459 /**
460  * @enum TelSimSapPowerMode_t
461  * This enum gives the SAP message Ids between SAP client and SAP server.
462  */
463 typedef enum {
464         TAPI_SIM_SAP_POWER_SIM_ON_REQ, /**< SAP Client request about power SIM on in Server */
465         TAPI_SIM_SAP_POWER_SIM_OFF_REQ, /**< SAP Client request about power SIM off in Server */
466         TAPI_SIM_SAP_RESET_SIM_REQ, /**< SAP Client request about SIM reset in Server */
467 } TelSimSapPowerMode_t;
468
469 /**
470  * @enum TelSimSapConnectionStatus_t
471  * This enum gives the SAP connection status information .
472  */
473 typedef enum {
474         TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00, /**< connect successfully */
475         TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH, /**< unable to establish connection */
476         TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE, /**< when server does not support message length that client want send */
477         TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE /**< when client want to connect with very small message length which is not supported by Server */
478 } TelSimSapConnectionStatus_t;
479
480 /**
481  * @enum TelSimSapDissconnectType_t
482  * This enum gives the SAP  disconnect type information.
483  */
484 typedef enum {
485         TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL = 0x00, /**< disconnection procedure ends after finishing current work */
486         TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE /**<  disconnection procedure ends immediately*/
487 } TelSimSapDissconnectType_t;
488
489 /**
490  * @enum TelSimSapStatusInfo_t
491  * This enum gives the SAP current connection status information
492  */
493 typedef enum {
494         TAPI_SIM_SAP_STATUS_UNKNOWN = 0x00, /**<  SAP server connection status - unknown*/
495         TAPI_SIM_SAP_STATUS_NO_SIM, /**<  SAP server connection status - no SIM*/
496         TAPI_SIM_SAP_STATUS_NOT_READY, /**<  SAP server connection status - not ready*/
497         TAPI_SIM_SAP_STATUS_READY, /**<  SAP server connection status - ready*/
498         TAPI_SIM_SAP_STATUS_CONNECTED /**<  SAP server connection status - connected*/
499 } TelSimSapStatusInfo_t;
500
501 /**
502  * @enum TelSimSapCardStatus_t
503  * This enum gives the SIM card status if server`s status changed about connection with subscription module
504  */
505 typedef enum {
506         TAPI_SIM_SAP_CARD_STATUS_UNKNOWN = 0x00, /**<  SAP server status(card reader status) - unknown*/
507         TAPI_SIM_SAP_CARD_STATUS_RESET, /**<  SAP server status(card reader status) - reset*/
508         TAPI_SIM_SAP_CARD_STATUS_NOT_ACCESSIBLE, /**<  SAP server status(card reader status) - not accessible*/
509         TAPI_SIM_SAP_CARD_STATUS_REMOVED, /**<  SAP server status(card reader status) - removed*/
510         TAPI_SIM_SAP_CARD_STATUS_INSERTED, /**<  SAP server status(card reader status) - inserted*/
511         TAPI_SIM_SAP_CARD_STATUS_RECOVERED /**<  SAP server status(card reader status) - recovered*/
512 } TelSimSapCardStatus_t;
513
514 /**
515  * @enum TelSimSapResultCode_t
516  * This enum gives the SAP result information.
517  */
518 typedef enum {
519         TAPI_SIM_SAP_RESULT_CODE_OK = 0x00, /**<  SAP operation result - ok*/
520         TAPI_SIM_SAP_RESULT_CODE_NO_REASON, /**<  SAP operation result - no reason*/
521         TAPI_SIM_SAP_RESULT_CODE_CARD_NOT_ACCESSIBLE, /**<  SAP operation result - not accessible*/
522         TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_OFF, /**<  SAP operation result - card already power off*/
523         TAPI_SIM_SAP_RESULT_CODE_CARD_REMOVED, /**<  SAP operation result - card removed*/
524         TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_ON, /**<  SAP operation result - card already power on*/
525         TAPI_SIM_SAP_RESULT_CODE_DATA_NOT_AVAILABLE, /**<  SAP operation result - data not available*/
526         TAPI_SIM_SAP_RESULT_CODE_NOT_SUPPORT /**<  SAP operation result - not support*/
527 } TelSimSapResultCode_t;
528
529 /**
530  * @enum TelSimSapProtocol_t
531  * This enum gives SAP transport protocol type
532  */
533 typedef enum {
534         TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character*/
535         TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block*/
536 } TelSimSapProtocol_t;
537
538 /**
539  * @enum TelSimPbAccessResult_t
540  * This enumeration defines the Phone book access result
541  */
542 typedef enum {
543         TAPI_SIM_PB_SUCCESS, /**< SIM phonebook operation successful. */
544         TAPI_SIM_PB_FAIL, /**< SIM phonebook operation failure. */
545         TAPI_SIM_PB_INVALID_INDEX, /**< The index passed was not a valid index. */
546         TAPI_SIM_PB_INVALID_NUMBER_LENGTH, /**< The number length is exceeds the max length allowed (or 0). */
547         TAPI_SIM_PB_INVALID_NAME_LENGTH, /**< The name length is exceeds the max length allowed (or 0). */
548         TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition for PB file is not satisfied. */
549 } TelSimPbAccessResult_t;
550
551 /**
552  * @enum TelSimPbFileType_t
553  * This enumeration defines  different storage types to be selected in SIM or USIM
554  */
555 typedef enum {
556         TAPI_SIM_PB_FDN, /**< Fixed Dialing Number */
557         TAPI_SIM_PB_ADN, /**< SIM - ADN  */
558         TAPI_SIM_PB_SDN, /**< Service Dialing Number  */
559         TAPI_SIM_PB_3GSIM, /**< USIM - 3G phone book */
560         TAPI_SIM_PB_AAS, /**< Additional number Alpha String */
561         TAPI_SIM_PB_GAS, /**< Grouping identifier Alpha String */
562         TAPI_SIM_PB_UNKNOWNN = 0xFF, /**< Unknown file type */
563 } TelSimPbType_t;
564
565 /**
566  * @enum TelSimPb3GFileType_t
567  *  This enumeration defines the different storage field types in 3G Phone book.
568  */
569 typedef enum {
570         /* for 3G phone storage field type */
571         TAPI_PB_3G_NAME = 0x01, /**< Name */
572         TAPI_PB_3G_NUMBER, /**< Number */
573         TAPI_PB_3G_ANR1, /**< First Another number*/
574         TAPI_PB_3G_ANR2, /**< Second Another number */
575         TAPI_PB_3G_ANR3, /**< Third Another number */
576         TAPI_PB_3G_EMAIL1, /**< First Email */
577         TAPI_PB_3G_EMAIL2, /**< Second Email */
578         TAPI_PB_3G_EMAIL3, /**< Third Email */
579         TAPI_PB_3G_EMAIL4, /**< Fourth Email */
580         TAPI_PB_3G_SNE, /**< Second name entry of main name*/
581         TAPI_PB_3G_GRP, /**< Group  */
582         TAPI_PB_3G_PBC, /** <1 byte control info and 1 byte hidden info*/
583 } TelSimPb3GFileType_t;
584
585 /**
586  * @enum TelSimSSTService_t
587  *  This enumeration defines the list of SST services in SIM Service Table. (GSM)
588  */
589 typedef enum {
590         // service 1 ~ 8
591         TAPI_SIM_SST_CHV1_DISABLE_FUNC = 0,     /**< CHV1 disable function */
592         TAPI_SIM_SST_ADN,                                       /**< abbreviated Dialing number */
593         TAPI_SIM_SST_FDN,                                       /**< fixed Dialing number */
594         TAPI_SIM_SST_SMS,                                       /**< short message storage */
595         TAPI_SIM_SST_AOC,                                       /**< advice of charge */
596         TAPI_SIM_SST_CCP,                                       /**< capability configuration parameters */
597         TAPI_SIM_SST_PLMN_SELECTOR,                     /**< plmn selector */
598         TAPI_SIM_SST_RFU1,                                      /**< rfu */
599
600         // service 9 ~ 16
601         TAPI_SIM_SST_MSISDN = 8,                        /**< msisdn */
602         TAPI_SIM_SST_EXT1,                                      /**< extension1 */
603         TAPI_SIM_SST_EXT2,                                      /**< extension2 */
604         TAPI_SIM_SST_SMS_PARAMS,                                /**< sms parameteres */
605         TAPI_SIM_SST_LND,                                       /**< last number dialed */
606         TAPI_SIM_SST_CELL_BROADCAST_MSG_ID,     /**< cell broadcast message identifier */
607         TAPI_SIM_SST_GID_LV1,                           /**< group identifier level 1 */
608         TAPI_SIM_SST_GID_LV2,                           /**< group identifier level 2 */
609
610         // service 17 ~ 24
611         TAPI_SIM_SST_SPN = 16,                          /**< service provider name */
612         TAPI_SIM_SST_SDN,                                       /**< service Dialing number */
613         TAPI_SIM_SST_EXT3,                                      /**< extension3 */
614         TAPI_SIM_SST_RFU2,                                      /**< rfu */
615         TAPI_SIM_SST_VGCS_GID_LIST,                     /**< vgcs group identifier (EF-VGCS, EF-VGCSS) */
616         TAPI_SIM_SST_VBS_GID_LIST,                      /**< vbs group identifier (EF-VBS, EF-VBSS) */
617         TAPI_SIM_SST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< enhanced multi-level precedence and pre-emption service */
618         TAPI_SIM_SST_AUTO_ANSWER_FOR_EMLPP,     /**< automatic answer fro eMLPP */
619
620         // service 25 ~ 32,
621         TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_CB = 24,     /**< data download via sms-cb */
622         TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_PP,          /**< data download via sms-pp */
623         TAPI_SIM_SST_MENU_SELECTION,                                    /**< menu selection */
624         TAPI_SIM_SST_CALL_CTRL,                                         /**< call control */
625         TAPI_SIM_SST_PROACTIVE_SIM,                                     /**< proactive sim command */
626         TAPI_SIM_SST_CELL_BROADCAST_MSG_ID_RANGES,      /**< cell broadcast message identifier ranges */
627         TAPI_SIM_SST_BDN,                                                       /**< barred Dialing numbers */
628         TAPI_SIM_SST_EXT4,                                                      /**< extension 4 */
629
630         // service 33 ~ 40
631         TAPI_SIM_SST_DEPERSONALIZATION_CTRL_KEYS = 32,  /**< de-personalization control keys */
632         TAPI_SIM_SST_COOPERATIVE_NETWORK_LIST,                  /**< co-operative network list */
633         TAPI_SIM_SST_SMS_STATUS_REPORTS,                                        /**< short message status reports */
634         TAPI_SIM_SST_NIA,                                       /**< network's indication of alerting in the MS (NIA) */
635         TAPI_SIM_SST_MO_SMS_CTRL_BY_SIM,                /**< mobile-originated short message control by sim */
636         TAPI_SIM_SST_GPRS,                                      /**< gprs */
637         TAPI_SIM_SST_IMG,                                       /**< image */
638         TAPI_SIM_SST_SOLSA,                                     /**< support of local service area */
639
640         // service 41 ~ 48
641         TAPI_SIM_SST_USSD_STR_DATA_OBJECT_SUPPORTED_IN_CALL_CTRL = 40,  /**< ussd string data object supported in call control */
642         TAPI_SIM_SST_RUN_AT_CMD_CMD,                                                    /**< RUN AT COMMAND command */
643         TAPI_SIM_SST_USER_CTRLED_PLMN_SELECTOR_WACT,                    /**< user controlled PLMN selector with Access technology */
644         TAPI_SIM_SST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< operator controlled PLMN selector with Access technology */
645         TAPI_SIM_SST_HPLMN_SELECTOR_WACT,                       /**< HPLMN selector with access technology */
646         TAPI_SIM_SST_CPBCCH_INFO,                                       /**< CPBCCH information */
647         TAPI_SIM_SST_INVESTIGATION_SCAN,                                /**< investigation scan */
648         TAPI_SIM_SST_EXTENDED_CAPA_CONF_PARAMS,         /**< extended capability configuration parameters */
649
650         //      service 49 ~ 56
651         TAPI_SIM_SST_MEXE = 48,                         /**< MExE */
652         TAPI_SIM_SST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
653         TAPI_SIM_SST_PLMN_NETWORK_NAME,         /*PLMN Network Name*/
654         TAPI_SIM_SST_OPERATOR_PLMN_LIST,                /*Operator PLMN List*/
655         TAPI_SIM_SST_MBDN,                                      /*Mailbox Dialling Numbers*/
656         TAPI_SIM_SST_MWIS,                                      /*Message Waiting Indication Status*/
657         TAPI_SIM_SST_CFIS,                                      /*Call Forwarding Indication Status*/
658         TAPI_SIM_SST_SPDI,                                      /*Service Provider Display Information*/
659 } TelSimSSTService_t;
660
661 /**
662  * @enum TelSimUSTService_t
663  *  This enumeration defines the list of UST services in SIM Service Table. (USIM)
664  */
665 typedef enum {
666         // service 1 ~ 8
667         TAPI_SIM_UST_LOCAL_PB = 0,              /**< local phone book */
668         TAPI_SIM_UST_FDN,                               /**< fixed Dialing number */
669         TAPI_SIM_UST_EXT2,                              /**< extension2 */
670         TAPI_SIM_UST_SDN,                               /**< service Dialing number */
671         TAPI_SIM_UST_EXT3,                              /**< extension3 */
672         TAPI_SIM_UST_BDN,                               /**< barred Dialing numbers */
673         TAPI_SIM_UST_EXT4,                              /**< extension 4 */
674         TAPI_SIM_UST_OUTGOING_CALL_INFO,        /**< outgoing call information */
675
676         // service 9 ~ 16
677         TAPI_SIM_UST_INCOMING_CALL_INFO = 8,            /**< incoming call information */
678         TAPI_SIM_UST_SMS,                                               /**< short message storage */
679         TAPI_SIM_UST_SMS_STATUS_REPORTS,                        /**< short message status reports */
680         TAPI_SIM_UST_SMS_PARAMS,                                        /**< sms parameteres */
681         TAPI_SIM_UST_AOC,                                               /**< advice of charge */
682         TAPI_SIM_UST_CCP,                                               /**< capability configuration parameters */
683         TAPI_SIM_UST_CELL_BROADCAST_MSG_ID,             /**< cell broadcast message identifier */
684         TAPI_SIM_UST_CELL_BROADCAST_MSG_ID_RANGES,      /**< cell broadcast message identifier ranges */
685
686         // service 17 ~ 24
687         TAPI_SIM_UST_GID_LV1 = 16,                                              /**< group identifier level 1 */
688         TAPI_SIM_UST_GID_LV2,                                                   /**< group identifier level 2 */
689         TAPI_SIM_UST_SPN,                                                               /**< service provider name */
690         TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_WACT,            /**< user controlled PLMN selector with Access technology */
691         TAPI_SIM_UST_MSISDN,                                                                                    /**< msisdn */
692         TAPI_SIM_UST_IMG,                                                                                       /**< image */
693         TAPI_SIM_UST_SOLSA,                                                                                     /**< support of local service area */
694         TAPI_SIM_UST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< enhanced multi-level precedence and pre-emption service */
695
696         // service 25 ~ 32
697         TAPI_SIM_UST_AUTO_ANSWER_FOR_EMLPP = 24,        /**< automatic answer fro eMLPP */
698         TAPI_SIM_UST_RFU1,                                              /**< rfu */
699         TAPI_SIM_UST_GSM_ACCESS,                                        /**< gsm access */
700         TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_PP,  /**< data download via sms-pp */
701         TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_CB,  /**< data download via sms-cb */
702         TAPI_SIM_UST_CALL_CTRL,                                 /**< call control by usim*/
703         TAPI_SIM_UST_MO_SMS_CTRL,                               /**< mobile-originated short message control by usim */
704         TAPI_SIM_UST_RUN_AT_CMD_CMD,                            /**< RUN AT COMMAND command */
705
706         // service 33 ~ 40
707         TAPI_SIM_UST_SHALL_BE_SET_TO_ONE = 32,  /**< shall be set to 1 */
708         TAPI_SIM_UST_ENABLED_SRVC_TABLE,                        /**< enabled service table */
709         TAPI_SIM_UST_ACL,                                               /**< APN control list */
710         TAPI_SIM_UST_DEPERSONALIZATION_CTRL_KEYS,       /**< de-personalization control keys */
711         TAPI_SIM_UST_COOPERATIVE_NETWORK_LIST,          /**< co-operative network list */
712         TAPI_SIM_UST_GSM_SEC_CONTEXT,                           /**< gsm security context */
713         TAPI_SIM_UST_CPBCCH_INFO,                                       /**< CPBCCH information */
714         TAPI_SIM_UST_INVESTIGATION_SCAN,                                /**< investigation scan */
715
716         // service 41 ~ 48
717         TAPI_SIM_UST_MEXE = 40,                                                         /**< MExE */
718         TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< operator controlled PLMN selector with Access technology */
719         TAPI_SIM_UST_HPLMN_SELECTOR_WACT,       /**< HPLMN selector with access technology */
720         TAPI_SIM_UST_EXT5,                                      /**< extension 5 */
721         TAPI_SIM_UST_PLMN_NETWORK_NAME,         /*PLMN Network Name*/
722         TAPI_SIM_UST_OPERATOR_PLMN_LIST,                /*Operator PLMN List*/
723         TAPI_SIM_UST_MBDN,                                      /*Mailbox Dialling Numbers*/
724         TAPI_SIM_UST_MWIS,                                      /*Message Waiting Indication Status*/
725
726         // service 49 ~ 56
727         TAPI_SIM_UST_CFIS = 48,                                         /*Call Forwarding Indication Status*/
728         TAPI_SIM_UST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
729         TAPI_SIM_UST_SPDI,                                                      /*Service Provider Display Information*/
730         TAPI_SIM_UST_MMS,                                                       /**< multi media messaging service */
731         TAPI_SIM_UST_EXT8,                                                      /**< extension 8 */
732         TAPI_SIM_UST_CALL_CTRL_ON_GPRS,                         /**< call control on gprs by usim */
733         TAPI_SIM_UST_MMS_USER_CONNECTIVITY_PARAMS,      /**< mms user connectivity parameters */
734         TAPI_SIM_UST_NIA,                                                       /**< network's indication of alerting in the MS (NIA) */
735
736         // service 57 ~ 64
737         TAPI_SIM_UST_VGCS_GID_LIST = 56,                /**< vgcs group identifier List (EF-VGCS, EF-VGCSS) */
738         TAPI_SIM_UST_VBS_GID_LIST,                      /**< vbs group identifier List (EF-VBS, EF-VBSS) */
739         TAPI_SIM_UST_PSEUDONYM,
740         TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_IWLAN,                   /**< user controlled PLMN selector for I-WLAN access */
741         TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_IWLAN,               /**< operator controlled PLMN selector for I-WLAN access */
742         TAPI_SIM_UST_USER_CTRLED_WSID_LIST,
743         TAPI_SIM_UST_OPERATOR_CTRLED_WSID_LIST,
744         TAPI_SIM_UST_VGCS_SEC,
745 } TelSimUSTService_t;
746
747 typedef struct {
748         char service[TAPI_SIM_SST_SERVICE_CNT_MAX];     // should access with 'enum TelSimSSTService_t' as index
749 } TelSimSST_t;
750
751 typedef struct {
752         char service[TAPI_SIM_UST_SERVICE_CNT_MAX];     // should access with 'enum TelSimUSTService_t' as index
753 } TelSimUST_t;
754
755 typedef struct {
756         TelSimCardType_t sim_type;
757         union {
758                 TelSimSST_t sst;
759                 TelSimUST_t ust;
760         } table;
761 } TelSimServiceTable_t;
762
763 /**
764  * This data structure defines the data for the Imsi information.
765  */
766 typedef struct {
767         char szMcc[3 + 1]; /**< mobile country code */
768         char szMnc[3 + 1]; /**< mobile network code */
769         char szMsin[10 + 1]; /**< mobile station identification number */
770 } TelSimImsiInfo_t;
771
772 typedef struct {
773         char name[30+1];
774         char number[6+1];
775         TelSimEccEmergencyServiceInfo_t category;
776 }TelSimEcc_t;
777
778 typedef struct {
779         int ecc_count;
780         TelSimEcc_t list[15];
781 }TelSimEccList_t;
782
783 typedef struct {
784         int icc_length; /**< Integrated Circuit Card number length */
785         char icc_num[TAPI_SIM_ICCID_LEN_MAX]; /**< Integrated Circuit Card number */
786 } TelSimIccIdInfo_t;
787
788 typedef struct {
789         int b_cphs;
790         int rec_index; /**< index which stands for the location where record is saved in SIM*/
791         int profile_num; /**< SIM profile index*/
792         TelSimMailboxType_t mb_type;
793         int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/
794         char alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
795         TelSimTypeOfNum_t ton; /**< Type Of Number */
796         TelSimNumberingPlanIdentity_t npi; /**< Number Plan Identity */
797         char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
798         unsigned char cc_id; /**< Capability/Configuration Identifier */
799         unsigned char ext1_id; /**< Extensiion1 Record Identifier */
800 }TelSimMailBoxNumber_t;
801
802 typedef struct {
803         int count;
804         TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5]; //max is 10
805 }TelSimMailboxList_t;
806
807 typedef struct {
808         int rec_index;
809         unsigned char msp_num; /**< MSP number*/
810         unsigned char cfu_status; /**< call forwarding unconditional indication status*/
811         TelSimTypeOfNum_t ton; /**< TON*/
812         TelSimNumberingPlanIdentity_t npi; /**< NPI*/
813         char cfu_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1];/**< Dialing Number/SSC String*/
814         unsigned char cc2_id; /**< Capability/Configuration2 Record Identifier */
815         unsigned char ext7_id; /**< Extension 7 Record Identifier */
816 }TelSimCfis_t;
817
818 typedef struct {
819         int profile_count;
820         TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];
821 }TelSimCfisList_t;
822
823 typedef struct {
824         int b_line1; /**< CallForwardUnconditionalLine 1 */
825         int b_line2; /**< CallForwardUnconditionalLine 2 */
826         int b_fax; /**< CallForwardUnconditional FAX */
827         int b_data; /**<CallForwardUnconditional data*/
828 }TelSimCphsCf_t;
829
830 typedef struct {
831         int b_cphs;
832         TelSimCfisList_t cf_list;
833         TelSimCphsCf_t cphs_cf;
834 }TelSimCallForwardingResp_t;
835
836 typedef struct {
837         int b_cphs;
838         union {
839                 TelSimCfis_t cf;
840                 TelSimCphsCf_t cphs_cf;
841         } cf_data_u;
842 }TelSimCallForwardingReq_t;
843
844 typedef struct {
845         int rec_index;
846         unsigned char indicator_status; /**< Indicator Type*/
847         int voice_count; /**< VoiceMail Count*/
848         int fax_count; /**< FAX Count*/
849         int email_count; /**< Email Count*/
850         int other_count; /**< Other Count*/
851         int video_count; /**< VideoMail Count*/
852 }TelSimMwis_t;
853
854 typedef struct {
855         int profile_count;
856         TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];
857 }TelSimMwisList_t;
858
859 typedef struct {
860         int b_voice1; /**< VoiceMsgLine1 message waiting flag */
861         int b_voice2; /**< VoiceMsgLine2 message waiting flag */
862         int b_fax; /**< FAX message waiting flag */
863         int b_data; /**< Data message waiting flag */
864 }TelSimCphsMw_t;
865
866 typedef struct {
867         int b_cphs;
868         TelSimMwisList_t mw_list;
869         TelSimCphsMw_t cphs_mw;
870 }TelSimMessageWaitingResp_t;
871
872 typedef struct {
873         int b_cphs;
874         union {
875                 TelSimMwis_t mw;
876                 TelSimCphsMw_t cphs_mw;
877         } mw_data_u;
878 }TelSimMessageWaitingReq_t;
879
880 /**
881  *      This data structure represents MSISDN information
882  */
883 typedef struct {
884         char num[TAPI_SIM_MSISDN_DIALING_NUMBER_LEN + 1]; /**< MSISDN number. If not exist, Null string will be returned*/
885         char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< MSISDN name. If not exist, Null string will be returned*/
886 } TelSimSubscriberInfo_t;
887
888 typedef struct {
889         int count;
890         TelSimSubscriberInfo_t list[3]; //max is 3
891 }TelSimMsisdnList_t;
892
893 typedef struct {
894         char plmn[6+1];
895         int b_umts;
896         int b_gsm;
897 }TelSimOplmnwact_t;
898
899 typedef struct {
900         int count;
901         TelSimOplmnwact_t list[30]; //max is 30
902 }TelSimOplmnwactList_t;
903
904 typedef struct {
905         unsigned char display_condition; /**< display condition (1 byte) */
906         unsigned char spn[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1]; /**< SPN */
907 }TelSimSpn_t;
908
909 typedef struct {
910         unsigned char full_name[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1];
911         unsigned char short_name[TAPI_SIM_NET_SHORT_NAME_MAX_LEN + 1];
912 }TelSimCphsNetName_t;
913
914 /**
915  *This is used for authentication request procedure.
916  */
917 typedef struct {
918         TelSimAuthenticationType_t auth_type; /**< Authentication type */
919         int rand_length; /**< the length of RAND */
920         int autn_length; /**< the length of AUTN. it is not used in case of GSM AUTH */
921         char rand_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< RAND data */
922         char autn_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< AUTN data. it is not used in case of GSM AUTH */
923 } TelSimAuthenticationData_t;
924
925 /**
926  * This is used for result data of authentication.
927  */
928 typedef struct {
929         TelSimAuthenticationType_t auth_type; /**< authentication type */
930         TelSimAuthenticationResult_t auth_result; /**< authentication result */
931         int resp_length; /**< response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
932         char resp_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< response data. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
933         int authentication_key_length; /**< the length of authentication key, Kc*/
934         char authentication_key[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< the data of of authentication key, Kc*/
935         int cipher_length; /**< the length of cipher key length */
936         char cipher_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< cipher key */
937         int integrity_length; /**< the length of integrity key length */
938         char integrity_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< integrity key */
939 } TelSimAuthenticationResponse_t;
940
941
942 /**
943  * This structure contains information about pin data.
944  * SIM PIN DATA. For PIN handling (Change, UnBlock) & for Type of PIN information.
945  */
946 typedef struct {
947         TelSimPinType_t type; /**< Pin type */
948         unsigned char* pw; /**< PIN code */
949         unsigned int pw_len; /**< PIN code length*/
950 } TelSimSecPw_t;
951
952 /**
953  * This data structure defines the data for the PIN Information.
954  */
955 typedef struct {
956         TelSimPinType_t type; /**< Specifies the PIN or PUK type.*/
957         int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
958 } TelSimSecResult_t;
959
960 /**
961  * This structure is used to en/disable facility
962  */
963 typedef struct {
964         TelSimLockType_t lock_type; /**< Facility type */
965         unsigned char *pw; /**< password */
966         int pw_len; /**< password length */
967 } TelSimFacilityPw_t;
968
969 typedef struct {
970         TelSimLockType_t type; /**< Specifies the PIN or PUK type.*/
971         int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
972 } TelSimFacilityResult_t;
973
974 typedef struct {
975         TelSimLockType_t type;
976         TelSimFacilityStatus_t f_status;
977 }TelSimFacilityInfo_t;
978
979 /**
980  *
981  * This structure is used to get information about LOCK_TYPE
982  */
983 typedef struct {
984         TelSimLockType_t lock_type; /**< Lock type */
985         TelSimLockStatus_t lock_status; /**< Lock key */
986         int retry_count; /**< retry counts */
987 } TelSimLockInfo_t;
988
989 /**
990  * This data structure defines the data for the apdu.
991  */
992 typedef struct {
993         unsigned short apdu_len;
994         unsigned char* apdu;
995 } TelSimApdu_t;
996
997 /**
998  * This data structure defines the data for the Response of sending apdu.
999  */
1000 typedef struct {
1001         unsigned short apdu_resp_len;
1002         unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN];
1003 } TelSimApduResp_t;
1004
1005 /**
1006  * This data structure defines the data for the Response of sending apdu.
1007  */
1008 typedef struct {
1009         unsigned short atr_resp_len;
1010         unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];
1011 } TelSimAtrResp_t;
1012
1013 /**
1014  *      This sturcture gives information of available optional CPHS SIM files.
1015  */
1016 typedef struct {
1017         /* Byte 2 - bit1 & 2*/
1018         int bCustomerServiceProfile; /**< Customer Service Profile (CSP)  */
1019         /* Byte 2 - bit3 & 4*/
1020         int bServiceStringTable; /**< Service String Table (SST) */
1021         /* Byte 2 - bit5 & 6*/
1022         int bMailBoxNumbers; /**< MailBoxNumbers */
1023         /* Byte 2 - bit7 & 8*/
1024         int bOperatorNameShortForm; /**< Short form of operator name */
1025         /* Byte 3 - bit1 & 2*/
1026         int bInformationNumbers; /**< Information numbers */
1027 } TelSimCphsServiceTable_t;
1028
1029 /*
1030  These requirements are additional to the GSM 900 and DCS1800 recommendations.
1031  They apply to all products which are to be compliant with the CPHS specification.
1032
1033  In addition to those SIM storage fields previously defined in DCS1800 to support
1034  existing MS features and services, the Association has defined the following fields  :-
1035
1036  1)     Call Forwarding flag                                            (mandatory)
1037  2)     Voice message waiting flag                                      (mandatory)
1038  3)     PLMN operator name                                              (mandatory)
1039  4)     Customer Service Profile (CSP)                          (optional)
1040  5)     CPHS Information                                                        (mandatory)
1041  6)     Mailbox Numbers                                                 (optional)
1042  7)     Information Numbers                                             (optional)
1043
1044  */
1045
1046 /*
1047  DATA FIELD - 6F 16: CPHS INFORMATION
1048  Access Conditions:
1049  READ   CHV1
1050  UPDATE ADM
1051  */
1052 /**
1053  *
1054  *This structure gives CPHS information data.
1055  */
1056 typedef struct {
1057         TelSimCphsPhaseType_t CphsPhase; /**< CPHS phase type */
1058         TelSimCphsServiceTable_t CphsServiceTable; /**< CPHS service table */
1059 } TelSimCphsInfo_t;
1060
1061 /*
1062  DATA FIELD -6F 19: Information Numbers
1063  Access Conditions:
1064  READ   CHV1
1065  UPDATE CHV1
1066  */
1067 /**
1068  * This struct gives CPHS information numbers data.
1069  */
1070 typedef struct {
1071         int bUsed; /**< SIM CPHS index level one */
1072         unsigned char AlphaIdLength; /**< length of alpha identifier */
1073
1074         TelSimCphsIndexLevelIndicator_t IndexLevelIndicator; /**< SIM CPHS index level one */
1075         int PremiumServiceIndicator; /**< SIM CPHS index level one */
1076         int NetworkSpecificIndicator; /**< SIM CPHS index level one */
1077         unsigned char Alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**<  Alpha Identifier */
1078
1079         unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
1080         TelSimTypeOfNum_t TypeOfNumber; /**< TON */
1081         TelSimNumberingPlanIdentity_t NumberingPlanIdentity; /**< NPI */
1082         char DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< dialing Number/SSC String */
1083         unsigned char Ext1RecordId; /**< Extensiion1 Record Identifier */
1084 } TelSimCphsInformationNum_t;
1085
1086 /*
1087  DATA FIELD- 6F 15: Customer Service Profile (Storing a list of service options which are relevant to that specific customer)
1088  Access Conditions:
1089  READ   CHV1
1090  UPDATE CHV1
1091  */
1092 /**
1093  *
1094  * This struct gives CPHS service call offering information.
1095  */
1096 typedef struct {
1097         int bCallForwardingUnconditional; /**< CallForwarding Unconditional */
1098         int bCallForwardingOnUserBusy; /**< CallForwarding On UserBusy */
1099         int bCallForwardingOnNoReply; /**< CallForwarding On NoReply */
1100         int bCallForwardingOnUserNotReachable; /**< CallForwarding On User Not Reachable */
1101         int bCallTransfer; /**< Call Transfer */
1102 } TelSimCphsServiceCallOffering_t;
1103
1104 /**
1105  *
1106  * This struct gives CPHS service call restriction information.
1107  */
1108 typedef struct {
1109         int bBarringOfAllOutgoingCalls; /**< Barring Of All Outgoing Calls*/
1110         int bBarringOfOutgoingInternationalCalls; /**< Barring Of Outgoing International Calls */
1111         int bBarringOfOutgoingInternationalCallsExceptHplmn; /**< Barring Of Outgoing International Calls Except HPLMN */
1112         int bBarringOfAllIncomingCallsRoamingOutsideHplmn; /**< Barring Of All Incoming Calls Roaming Outside HPLMN */
1113         int bBarringOfIncomingCallsWhenRoaming; /**< Barring Of IncomingCalls When Roaming */
1114 } TelSimCphsServiceCallRestriction_t;
1115
1116 /**
1117  *
1118  * This struct gives CPHS service SS  information.
1119  */
1120 typedef struct {
1121         int bMultiPartyService; /**< MultiPartyService*/
1122         int bClosedUserGroup; /**< ClosedUserGroup*/
1123         int bAdviceOfCharge; /**< AdviceOfCharge*/
1124         int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
1125         int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
1126 } TelSimCphsServiceOtherSupplimentaryService_t;
1127
1128 /**
1129  *
1130  * This struct gives CPHS service call complete information.
1131  */
1132 typedef struct {
1133         int bCallHold; /**< Call Hold*/
1134         int bCallWaiting; /**< Call Waiting*/
1135         int bCompletionOfCallToBusySubscriber; /**< Completion Of Call To Busy Subscriber*/
1136         int bUserUserSignalling; /**< User User Signaling*/
1137 } TelSimCphsServiceCallComplete_t;
1138
1139 /**
1140  *
1141  * This struct gives CPHS service teleservices  information.
1142  */
1143 typedef struct {
1144         int bShortMessageMobileOriginated; /**< Short Message Mobile Originated*/
1145         int bShortMessageMobileTerminated; /**< Short Message Mobile Terminated*/
1146         int bShortMessageCellBroadcast; /**< Short Message Cell Broadcast*/
1147         int bShortMessageReplyPath; /**< Short  Message Reply Path*/
1148         int bShortMessageDeliveryConf; /**< Short Message Delivery Conf*/
1149         int bShortMessageProtocolIdentifier; /**< Short Message Protocol Identifier*/
1150         int bShortMessageValidityPeriod; /**< Short Message Validity Period*/
1151 } TelSimCphsServiceTeleservices_t;
1152
1153 /**
1154  *
1155  * This struct gives CPHS alternative line service  information.
1156  */
1157 typedef struct {
1158         int bAlternativeLineService; /**< Alternative Line Service*/
1159 } TelSimCphsServiceCphsTeleservices_t;
1160
1161 /**
1162  *
1163  * This struct gives CPHS string service table information.
1164  */
1165 typedef struct {
1166         int bStringServiceTable; /**< String Service Table*/
1167 } TelSimCphsServiceCphsFeatures_t;
1168
1169 /**
1170  *
1171  * This struct gives CPHS service number identifier  information.
1172  */
1173 typedef struct {
1174         int bCallingLineIdentificationPresent; /**< Calling Line Identification Present*/
1175         int bConnectedLineIdentificationRestrict; /**< Connected Line Identification Restrict*/
1176         int bConnectedLineIdentificationPresent; /**< Connected Line Identification Present*/
1177         int bMaliciousCallIdentifier; /**< Malicious Call Identifier*/
1178         int bCallingLineIdentificationSend; /**< Calling Line Identification Send*/
1179         int bCallingLineIdentificationBlock; /**< Calling Line Identification Block*/
1180 } TelSimCphsServiceNumberIdentifier_t;
1181
1182 /**
1183  *
1184  * This struct gives CPHS service phase services information.
1185  */
1186 typedef struct {
1187         int bMenuForGprs; /**< Menu For GPRS*/
1188         int bMenuForHighSpeedCsd; /**< Menu For HighSpeedCsd*/
1189         int bMenuForVoiceGroupCall; /**< Menu For VoiceGroupCall*/
1190         int bMenuForVoiceBroadcastService; /**< Menu For VoiceBroadcastService*/
1191         int bMenuForMultipleSubscriberProfile; /**< Menu For MultipleSubscriberProfile*/
1192         int bMenuForMultipleBand; /**< Menu For MultipleBand*/
1193 } TelSimCphsServicePhaseServices_t;
1194
1195 /**
1196  *
1197  * This struct gives CPHS value added service   information.
1198  */
1199 typedef struct {
1200         int bRestrictMenuForManualSelection; /**< RestrictMenu For ManualSelection*/
1201         int bRestrictMenuForVoiceMail; /**< RestrictMenu For VoiceMail*/
1202         int bRestrictMenuForMoSmsAndPaging; /**< RestrictMenu For MoSmsAndPaging*/
1203         int bRestrictMenuForMoSmsWithEmialType; /**< RestrictMenu For MoSmsWithEmialType*/
1204         int bRestrictMenuForFaxCalls; /**< RestrictMenu For FaxCalls*/
1205         int bRestrictMenuForDataCalls; /**< RestrictMenu For DataCalls*/
1206         int bRestrictMenuForChangeLanguage; /**< RestrictMenu For ChangeLanguage*/
1207 } TelSimCphsServiceValueAddedServices_t;
1208
1209 /**
1210  *
1211  * This struct gives CPHS service information number data.
1212  */
1213 typedef struct {
1214         int bInformationNumbers; /**< Information Numbers*/
1215 } TelSimCphsServiceInformationNumbers_t;
1216
1217 /**
1218  *
1219  * This struct gives CPHS service profile entry  information.
1220  */
1221 typedef struct {
1222         TelSimCphsCustomerServiceGroup_t CustomerServiceGroup; /**< customer service group*/
1223         union {
1224                 TelSimCphsServiceCallOffering_t CallOffering; /**< call offering*/
1225                 TelSimCphsServiceCallRestriction_t CallRestriction; /**< call restriction*/
1226                 TelSimCphsServiceOtherSupplimentaryService_t OtherSuppServices; /**< other SS services*/
1227                 TelSimCphsServiceCallComplete_t CallComplete; /**< call complete*/
1228                 TelSimCphsServiceTeleservices_t Teleservices; /**< teleservices*/
1229                 TelSimCphsServiceCphsTeleservices_t CphsTeleservices; /**< CPHS teleservices*/
1230                 TelSimCphsServiceCphsTeleservices_t CphsFeatures; /**< CPHS features*/
1231                 TelSimCphsServiceNumberIdentifier_t NumberIdentifiers; /**< number identifiers*/
1232                 TelSimCphsServicePhaseServices_t PhaseServices; /**< phase services*/
1233                 TelSimCphsServiceValueAddedServices_t ValueAddedServices; /**< value added services*/
1234                 TelSimCphsServiceInformationNumbers_t InformationNumbers; /**< information numbers*/
1235         } u;
1236 } TelSimCphsCustomerServiceProfileEntry_t;
1237
1238 /**
1239  *
1240  * This struct gives CPHS service profile information.
1241  */
1242 typedef struct {
1243         TelSimCphsCustomerServiceProfileEntry_t ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< service profile entry*/
1244 } TelSimCphsCustomerServiceProfileInfo_t;
1245
1246 /**
1247  *
1248  * This struct gives dynamics flag selected line  information.
1249  */
1250 typedef struct {
1251         TelSimDynamicFlagsSelectedLineId_t DynamicFlags; /**< Dynamic flags information */
1252 } TelSimDynamicFlagsInfo_t;
1253
1254 /**
1255  *
1256  * This struct gives dynamics flag selected line  information.
1257  */
1258 typedef struct {
1259         TelSimDynamic2FlagAlsStatus_t Dynamic2Flag; /**< Dynamic flags status */
1260 } TelSimDynamic2FlagsInfo_t;
1261
1262
1263 /**
1264  * This data structure gives the phone book availability of current SIM.
1265  */
1266 typedef struct {
1267         int b_fdn; /**< Fixed Dialing Number */
1268         int b_adn; /**< SIM - ADN(2G phonebook, Under DF phonebook       */
1269         int b_sdn; /**< Service Dialing Number  */
1270         int b_3g; /**< USIM - 3G phonebook */
1271         int b_aas; /**< Additional number Alpha String phonebook */
1272         int b_gas; /**< Grouping information Alpha String phonebook */
1273 } TelSimPbList_t;
1274
1275 /**
1276  * This data structure gives the phone book status of current SIM.
1277  */
1278 typedef struct {
1279         int init_completed;
1280         TelSimPbList_t pb_list;
1281 } TelSimPbStatus_t;
1282
1283 typedef struct {
1284         TelSimPbType_t phonebook_type;
1285         unsigned short index;
1286         unsigned short next_index; //this field is not used in add/update case
1287
1288         unsigned char name[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
1289         TelSimTextEncrypt_t dcs;
1290
1291         unsigned char number[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1292         TelSimTypeOfNum_t ton;
1293
1294         /* following field is valid in only USIM*/
1295         unsigned char sne[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
1296         TelSimTextEncrypt_t sne_dcs;
1297         unsigned char anr1[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1298         TelSimTypeOfNum_t anr1_ton;
1299         unsigned char anr2[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1300         TelSimTypeOfNum_t anr2_ton;
1301         unsigned char anr3[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1302         TelSimTypeOfNum_t anr3_ton;
1303
1304         unsigned char email1[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1305         unsigned char email2[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1306         unsigned char email3[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1307         unsigned char email4[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1308
1309         unsigned short group_index; //GRP
1310         unsigned short pb_control; //PBC
1311 } TelSimPbRecord_t;
1312
1313 /**
1314  *      This data structure defines the phone book storage count information.
1315  */
1316 typedef struct {
1317         TelSimPbType_t StorageFileType; /**< Storage  file type */
1318         unsigned short TotalRecordCount; /**< Total record count */
1319         unsigned short UsedRecordCount; /**< Used record count */
1320 } TelSimPbStorageInfo_t;
1321
1322 /**
1323  * This data structure gives the phone book entry information.
1324  */
1325 typedef struct {
1326         TelSimPbType_t StorageFileType; /**< Storage  file type */
1327         unsigned short PbIndexMin; /**< Phone book minimum index*/
1328         unsigned short PbIndexMax; /**< Phone book maximum index */
1329         unsigned short PbNumLenMax; /**< Phone number maximum length */
1330         unsigned short PbTextLenMax; /**< Text maximum length */
1331         unsigned short PbUsedCount; /**< Phone book used record count */
1332 } TelSimPbEntryInfo_t;
1333
1334 /**
1335  *
1336  This structure gives 3G phone book capability information.
1337  */
1338 typedef struct {
1339         TelSimPb3GFileType_t field_type; /**< 3G phonebook file type */
1340         unsigned short index_max; /**< max index */
1341         unsigned short text_max; /**< max text length */
1342         unsigned short used_count; /**< used record count */
1343 } TelSimPb3GFileTypeCapabiltyInfo_t;
1344
1345 /**
1346  *
1347  * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
1348  * It refers to EF_PBR
1349  */
1350 typedef struct {
1351         unsigned short FileTypeCount; /**< phonebook file type count */
1352         TelSimPb3GFileTypeCapabiltyInfo_t FileTypeInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT]; /**< phonebook file type information */
1353 } TelSimPbCapabilityInfo_t;
1354
1355
1356
1357 /* SAP (SIM Access Profile) related interface structures and enum */
1358 /**
1359  * This struct gives the SAP ATR response data information.
1360  */
1361 typedef struct {
1362         int atr_len; /**<  SAP ATR response data length */
1363         unsigned char atr_data[TAPI_SIM_SAP_ATR_DATA]; /**<  SAP ATR response data */
1364 } TelSapAtrInfo_t;
1365
1366 /* SAP transfer APDU request */
1367
1368 /**
1369  * This data structure gives the SAP APDU data information.
1370  */
1371 typedef struct {
1372         int apdu_len; /**<  SAP APDU length */
1373         unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**<  SAP APDU data */
1374 } TelSapApduData_t;
1375
1376
1377 #ifdef __cplusplus
1378 }
1379 #endif
1380
1381 #endif // _TELSIM_H_
1382 /**
1383  * @}
1384  */