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