4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 * @ingroup TelephonyAPI
24 * @addtogroup SIM_TAPI SIM
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.
36 #include <TelDefines.h>
43 /** Maximum ICCID Length */
44 #define TAPI_SIM_ICCID_LEN_MAX 20
46 /** Alpha Id max length */
47 #define TAPI_SIM_XDN_ALPHA_ID_MAX_LEN 30
49 /** Dialing number max length */
50 #define TAPI_SIM_XDN_DIALING_NUMBER_LEN 20
52 /** MSISDN number max length */
53 #define TAPI_SIM_MSISDN_DIALING_NUMBER_LEN 26
55 /** CSP profile entry count max length */
56 #define TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX 11
58 /** Authentication code max length */
59 #define TAPI_SIM_AUTH_MAX_REQ_DATA_LEN 256
61 /** Authentication response data max length */
62 #define TAPI_SIM_AUTH_MAX_RESP_DATA_LEN 128
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
68 /** SIM 3G Phone book EF Max count */
69 #define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
71 /** SIM Phone book Record name max length */
72 #define TAPI_SIM_PB_RECORD_NAME_MAX_LEN 255
74 /** SIM Phone book Record number max length */
75 #define TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN 255
77 /** SIM Phone book Record email max length */
78 #define TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN 255
80 /** SAP Answer to Reset data max length */
81 #define TAPI_SIM_SAP_ATR_DATA 256
83 #define TAPI_SIM_NET_FULL_NAME_MAX_LEN 40
85 #define TAPI_SIM_NET_SHORT_NAME_MAX_LEN 10
87 #define TAPI_SIM_MSP_CNT_MAX 2
89 #define TAPI_SIM_OPERATION_TIMEOUT 1234
91 #define TAPI_SIM_SST_SERVICE_CNT_MAX 56
93 #define TAPI_SIM_UST_SERVICE_CNT_MAX 64
96 * @enum TelSimCardType_t
97 * This enumeration defines the card type.
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,
108 * @enum TelSimFileID_t
109 * This enumeration defines the card type.
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 */
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 */
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 */
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*/
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 */
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.*/
161 * @enum TelSimFacilityStatus_t
162 * This enumeration defines the pin status.
165 TAPI_SIM_FACILITY_DISABLED = 0x00,
166 TAPI_SIM_FACILITY_ENABLED = 0x01,
167 TAPI_SIM_FACILITY_UNKNOWN = 0xFF
168 } TelSimFacilityStatus_t;
171 * @enum TelSimPinOperationResult_t
172 * This enumeration defines the pin operation result from the lower layers.
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;
192 * @enum TelSimAccessResult_t
193 * This enumeration defines the SIM access result from the lower layers.
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;
204 * @enum TelSimPinType_t
205 * This enumeration defines the pin type.
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 */
218 * @enum TelSimTypeOfNum_t
219 * This enumeration defines the type of number.
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 */
233 * @enum TelSimTextEncrypt_t
234 * This enumeration defines the text encryption types
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;
244 * @enum TelSimNumberingPlanIdentity_t
245 * This enumeration defines the numbering plan identifier.
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;
261 * @enum TelSimEccEmergencyServiceInfo_t
262 * This enumeration defines the emergency service type.
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;
274 * @enum TelSimLanguagePreferenceCode_t
275 * This enumeration defines the language indication code.
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;
301 * @enum TelSimCardStatus_t
302 * This enumeration defines the SIM card status
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;
323 * @enum TelSimCphsPhaseType_t
324 * This enum gives the current CPHS phase of SIM card.
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;
333 * @enum TelSimCphsIndexLevelIndicator_t
334 * This struct gives CPHS index level indication.
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;
344 * @enum TelSimCphsCustomerServiceGroup_t
345 * This struct gives CPHS group service type information .
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;
362 * @enum TelSimMailboxType_t
363 * This enum gives mailbox type.
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;
375 * @enum TelSimDynamicFlagsSelectedLineId_t
376 * This enum gives dynamics flag selected line information.
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;
385 * @enum tapi_sim_dynamic2_flag_als_status_t
386 * This enum gives dynamics2 flag selected line information.
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;
396 * @enum TelSimAuthenticationType_t
397 * This is used for Authentication Procedure by using SIM.
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;
407 * @enum TelSimAuthenticationResult_t
408 * This is used for Authentication Procedure.
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;
422 * @enum TelSimLockType_t
423 * This structure gives security lock type enum values
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
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
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
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 */
447 * @enum TelSimLockKey_t
448 * This structure gives security lock key information enum values
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;
460 * @enum TelSimSapPowerMode_t
461 * This enum gives the SAP message Ids between SAP client and SAP server.
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;
470 * @enum TelSimSapConnectionStatus_t
471 * This enum gives the SAP connection status information .
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;
481 * @enum TelSimSapDissconnectType_t
482 * This enum gives the SAP disconnect type information.
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;
490 * @enum TelSimSapStatusInfo_t
491 * This enum gives the SAP current connection status information
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;
502 * @enum TelSimSapCardStatus_t
503 * This enum gives the SIM card status if server`s status changed about connection with subscription module
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;
515 * @enum TelSimSapResultCode_t
516 * This enum gives the SAP result information.
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;
530 * @enum TelSimSapProtocol_t
531 * This enum gives SAP transport protocol type
534 TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character*/
535 TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block*/
536 } TelSimSapProtocol_t;
539 * @enum TelSimPbAccessResult_t
540 * This enumeration defines the Phone book access result
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;
552 * @enum TelSimPbFileType_t
553 * This enumeration defines different storage types to be selected in SIM or USIM
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 */
566 * @enum TelSimPb3GFileType_t
567 * This enumeration defines the different storage field types in 3G Phone book.
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;
586 * @enum TelSimSSTService_t
587 * This enumeration defines the list of SST services in SIM Service Table. (GSM)
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 */
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 */
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 */
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 */
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 */
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 */
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;
662 * @enum TelSimUSTService_t
663 * This enumeration defines the list of UST services in SIM Service Table. (USIM)
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 */
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 */
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 */
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 */
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 */
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*/
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) */
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;
748 char service[TAPI_SIM_SST_SERVICE_CNT_MAX]; // should access with 'enum TelSimSSTService_t' as index
752 char service[TAPI_SIM_UST_SERVICE_CNT_MAX]; // should access with 'enum TelSimUSTService_t' as index
756 TelSimCardType_t sim_type;
761 } TelSimServiceTable_t;
764 * This data structure defines the data for the Imsi information.
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 */
775 TelSimEccEmergencyServiceInfo_t category;
780 TelSimEcc_t list[15];
784 int icc_length; /**< Integrated Circuit Card number length */
785 char icc_num[TAPI_SIM_ICCID_LEN_MAX]; /**< Integrated Circuit Card number */
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;
804 TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5]; //max is 10
805 }TelSimMailboxList_t;
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 */
820 TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];
824 int b_line1; /**< CallForwardUnconditionalLine 1 */
825 int b_line2; /**< CallForwardUnconditionalLine 2 */
826 int b_fax; /**< CallForwardUnconditional FAX */
827 int b_data; /**<CallForwardUnconditional data*/
832 TelSimCfisList_t cf_list;
833 TelSimCphsCf_t cphs_cf;
834 }TelSimCallForwardingResp_t;
840 TelSimCphsCf_t cphs_cf;
842 }TelSimCallForwardingReq_t;
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*/
856 TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];
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 */
868 TelSimMwisList_t mw_list;
869 TelSimCphsMw_t cphs_mw;
870 }TelSimMessageWaitingResp_t;
876 TelSimCphsMw_t cphs_mw;
878 }TelSimMessageWaitingReq_t;
881 * This data structure represents MSISDN information
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;
890 TelSimSubscriberInfo_t list[3]; //max is 3
901 TelSimOplmnwact_t list[30]; //max is 30
902 }TelSimOplmnwactList_t;
905 unsigned char display_condition; /**< display condition (1 byte) */
906 unsigned char spn[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1]; /**< SPN */
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;
915 *This is used for authentication request procedure.
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;
926 * This is used for result data of authentication.
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;
943 * This structure contains information about pin data.
944 * SIM PIN DATA. For PIN handling (Change, UnBlock) & for Type of PIN information.
947 TelSimPinType_t type; /**< Pin type */
948 unsigned char* pw; /**< PIN code */
949 unsigned int pw_len; /**< PIN code length*/
953 * This data structure defines the data for the PIN Information.
956 TelSimPinType_t type; /**< Specifies the PIN or PUK type.*/
957 int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
961 * This structure is used to en/disable facility
964 TelSimLockType_t lock_type; /**< Facility type */
965 unsigned char *pw; /**< password */
966 int pw_len; /**< password length */
967 } TelSimFacilityPw_t;
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;
975 TelSimLockType_t type;
976 TelSimFacilityStatus_t f_status;
977 }TelSimFacilityInfo_t;
981 * This structure is used to get information about LOCK_TYPE
984 TelSimLockType_t lock_type; /**< Lock type */
985 TelSimLockStatus_t lock_status; /**< Lock key */
986 int retry_count; /**< retry counts */
990 * This data structure defines the data for the apdu.
993 unsigned short apdu_len;
998 * This data structure defines the data for the Response of sending apdu.
1001 unsigned short apdu_resp_len;
1002 unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN];
1006 * This data structure defines the data for the Response of sending apdu.
1009 unsigned short atr_resp_len;
1010 unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];
1014 * This sturcture gives information of available optional CPHS SIM files.
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;
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.
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 :-
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)
1047 DATA FIELD - 6F 16: CPHS INFORMATION
1054 *This structure gives CPHS information data.
1057 TelSimCphsPhaseType_t CphsPhase; /**< CPHS phase type */
1058 TelSimCphsServiceTable_t CphsServiceTable; /**< CPHS service table */
1062 DATA FIELD -6F 19: Information Numbers
1068 * This struct gives CPHS information numbers data.
1071 int bUsed; /**< SIM CPHS index level one */
1072 unsigned char AlphaIdLength; /**< length of alpha identifier */
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 */
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;
1087 DATA FIELD- 6F 15: Customer Service Profile (Storing a list of service options which are relevant to that specific customer)
1094 * This struct gives CPHS service call offering information.
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;
1106 * This struct gives CPHS service call restriction information.
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;
1118 * This struct gives CPHS service SS information.
1121 int bMultiPartyService; /**< MultiPartyService*/
1122 int bClosedUserGroup; /**< ClosedUserGroup*/
1123 int bAdviceOfCharge; /**< AdviceOfCharge*/
1124 int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
1125 int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
1126 } TelSimCphsServiceOtherSupplimentaryService_t;
1130 * This struct gives CPHS service call complete information.
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;
1141 * This struct gives CPHS service teleservices information.
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;
1155 * This struct gives CPHS alternative line service information.
1158 int bAlternativeLineService; /**< Alternative Line Service*/
1159 } TelSimCphsServiceCphsTeleservices_t;
1163 * This struct gives CPHS string service table information.
1166 int bStringServiceTable; /**< String Service Table*/
1167 } TelSimCphsServiceCphsFeatures_t;
1171 * This struct gives CPHS service number identifier information.
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;
1184 * This struct gives CPHS service phase services information.
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;
1197 * This struct gives CPHS value added service information.
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;
1211 * This struct gives CPHS service information number data.
1214 int bInformationNumbers; /**< Information Numbers*/
1215 } TelSimCphsServiceInformationNumbers_t;
1219 * This struct gives CPHS service profile entry information.
1222 TelSimCphsCustomerServiceGroup_t CustomerServiceGroup; /**< customer service group*/
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*/
1236 } TelSimCphsCustomerServiceProfileEntry_t;
1240 * This struct gives CPHS service profile information.
1243 TelSimCphsCustomerServiceProfileEntry_t ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< service profile entry*/
1244 } TelSimCphsCustomerServiceProfileInfo_t;
1248 * This struct gives dynamics flag selected line information.
1251 TelSimDynamicFlagsSelectedLineId_t DynamicFlags; /**< Dynamic flags information */
1252 } TelSimDynamicFlagsInfo_t;
1256 * This struct gives dynamics flag selected line information.
1259 TelSimDynamic2FlagAlsStatus_t Dynamic2Flag; /**< Dynamic flags status */
1260 } TelSimDynamic2FlagsInfo_t;
1264 * This data structure gives the phone book availability of current SIM.
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 */
1276 * This data structure gives the phone book status of current SIM.
1280 TelSimPbList_t pb_list;
1284 TelSimPbType_t phonebook_type;
1285 unsigned short index;
1286 unsigned short next_index; //this field is not used in add/update case
1288 unsigned char name[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
1289 TelSimTextEncrypt_t dcs;
1291 unsigned char number[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1292 TelSimTypeOfNum_t ton;
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;
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];
1309 unsigned short group_index; //GRP
1310 unsigned short pb_control; //PBC
1314 * This data structure defines the phone book storage count information.
1317 TelSimPbType_t StorageFileType; /**< Storage file type */
1318 unsigned short TotalRecordCount; /**< Total record count */
1319 unsigned short UsedRecordCount; /**< Used record count */
1320 } TelSimPbStorageInfo_t;
1323 * This data structure gives the phone book entry information.
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;
1336 This structure gives 3G phone book capability information.
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;
1347 * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
1348 * It refers to EF_PBR
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;
1357 /* SAP (SIM Access Profile) related interface structures and enum */
1359 * This struct gives the SAP ATR response data information.
1362 int atr_len; /**< SAP ATR response data length */
1363 unsigned char atr_data[TAPI_SIM_SAP_ATR_DATA]; /**< SAP ATR response data */
1366 /* SAP transfer APDU request */
1369 * This data structure gives the SAP APDU data information.
1372 int apdu_len; /**< SAP APDU length */
1373 unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**< SAP APDU data */
1381 #endif // _TELSIM_H_