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 * @struct TelSimInitInfo_t
324 * This struct has informations that card_status and whether it is changed.
327 TelSimCardStatus_t card_status;
328 unsigned char b_is_changed;
332 * @enum TelSimCphsPhaseType_t
333 * This enum gives the current CPHS phase of SIM card.
336 TAPI_SIM_CPHS_PHASE1 = 0x01, /**< phase1 */
337 TAPI_SIM_CPHS_PHASE2 = 0x02, /**< phase2 */
338 TAPI_SIM_CPHS_PHASE_RFU = 0xff /**< RFU */
339 } TelSimCphsPhaseType_t;
342 * @enum TelSimCphsIndexLevelIndicator_t
343 * This struct gives CPHS index level indication.
346 TAPI_SIM_CPHS_INDEX_LEVEL_ONE = 0x01, /**< SIM cphs index level one */
347 TAPI_SIM_CPHS_INDEX_LEVEL_TWO = 0x02, /**< SIM cphs index level two */
348 TAPI_SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM cphs index level three */
349 TAPI_SIM_CPHS_INDEX_LEVEL_RFU = 0xff /**< SIM cphs index level rfu */
350 } TelSimCphsIndexLevelIndicator_t;
353 * @enum TelSimCphsCustomerServiceGroup_t
354 * This struct gives CPHS group service type information .
357 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING = 0x01, /**< Group csp offering*/
358 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_RESTRICTION = 0x02, /**< Group csp restriction*/
359 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES = 0x03, /**< Group csp supplementary services*/
360 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION = 0x04, /**< Group csp completion*/
361 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_TELESERVICES = 0x05, /**< Group csp teleservices*/
362 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES = 0x06, /**< Group csp cphs teleservies*/
363 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_FEATURES = 0x07, /**< Group csp cphs features*/
364 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_NUMBER_IDENTIFIERS = 0x08, /**< Group csp number identifiers*/
365 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_PHASE_SERVICES = 0x09, /**< Group csp phase services*/
366 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_VALUE_ADDED_SERVICES = 0xC0, /**< Group csp value added services*/
367 TAPI_SIM_CPHS_CSP_SERVICE_GROUP_INFORMATION_NUMBERS = 0xD5 /**< Group csp information numbers*/
368 } TelSimCphsCustomerServiceGroup_t;
371 * @enum TelSimMailboxType_t
372 * This enum gives mailbox type.
375 TAPI_SIM_MAILBOX_VOICE = 0x01, /**< Voicemail*/
376 TAPI_SIM_MAILBOX_FAX = 0x02, /**< Fax*/
377 TAPI_SIM_MAILBOX_EMAIL = 0x03, /**< Email*/
378 TAPI_SIM_MAILBOX_OTHER = 0x04, /**< Other*/
379 TAPI_SIM_MAILBOX_VIDEO = 0x05, /**< Videomail*/
380 TAPI_SIM_MAILBOX_DATA = 0x06, /**< Data*/
381 } TelSimMailboxType_t;
384 * @enum TelSimDynamicFlagsSelectedLineId_t
385 * This enum gives dynamics flag selected line information.
388 TAPI_SIM_DYNAMIC_FLAGS_LINE1 = 0x01, /**< line 1 */
389 TAPI_SIM_DYNAMIC_FLAGS_LINE2 = 0x00, /**< line 2*/
390 TAPI_SIM_DYNAMIC_FLAGS_RFU = 0xff /**< rfu*/
391 } TelSimDynamicFlagsSelectedLineId_t;
394 * @enum tapi_sim_dynamic2_flag_als_status_t
395 * This enum gives dynamics2 flag selected line information.
398 TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED = 0x01, /**< Dynamic flags locked */
399 TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
400 TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_RFU = 0xff /**< rfu */
401 } TelSimDynamic2FlagAlsStatus_t;
405 * @enum TelSimAuthenticationType_t
406 * This is used for Authentication Procedure by using SIM.
409 TAPI_SIM_AUTH_TYPE_IMS = 0x00, /**< IMS Authentication */
410 TAPI_SIM_AUTH_TYPE_GSM, /**< GSM Authentication */
411 TAPI_SIM_AUTH_TYPE_3G, /**< 3G Authentication */
412 TAPI_SIM_AUTH_TYPE_MAX /**< TBD */
413 } TelSimAuthenticationType_t;
416 * @enum TelSimAuthenticationResult_t
417 * This is used for Authentication Procedure.
420 TAPI_SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
421 TAPI_SIM_AUTH_CANNOT_PERFORM, /**< status - can't perform authentication */
422 TAPI_SIM_AUTH_SKIP_RESPONSE, /**< status - skip authentication response */
423 TAPI_SIM_AUTH_MAK_CODE_FAILURE, /**< status - MAK(Multiple Activation Key) code failure */
424 TAPI_SIM_AUTH_SQN_FAILURE, /**< status - SQN(SeQuenceNumber) failure */
425 TAPI_SIM_AUTH_SYNCH_FAILURE, /**< status - synch failure */
426 TAPI_SIM_AUTH_UNSUPPORTED_CONTEXT, /**< status - unsupported context */
427 TAPI_SIM_AUTH_MAX /**< TBD */
428 } TelSimAuthenticationResult_t;
431 * @enum TelSimLockType_t
432 * This structure gives security lock type enum values
435 TAPI_SIM_LOCK_PS = 0x01, /** < PH-SIM (phone-SIM) locked.Lock Phone to SIM/UICC card
436 * (MT asks password when other than current SIM/UICC card inserted;
437 * MT may remember certain amount of previously used cards thus not
438 * requiring password when they are inserted
440 TAPI_SIM_LOCK_PF, /** < PH-FSIM (phone-first-SIM) Lock Phone to the very
441 * First inserted SIM/UICC card(MT asks password when other than the first SIM/UICC
444 TAPI_SIM_LOCK_SC, /** < SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks password in ME power-up and
445 * when this command is issued
447 TAPI_SIM_LOCK_FD, /** < FDN - SIM card or active application in the UICC (GSM or USIM)
448 * fixed dialing memory feature */
449 TAPI_SIM_LOCK_PN, /**< Network Personalization */
450 TAPI_SIM_LOCK_PU, /** < network subset Personalization */
451 TAPI_SIM_LOCK_PP, /** < service Provider Personalization */
452 TAPI_SIM_LOCK_PC, /** < Corporate Personalization */
456 * @enum TelSimLockKey_t
457 * This structure gives security lock key information enum values
460 TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< key not need */
461 TAPI_SIM_LOCK_KEY_PIN = 0x01, /**< PIN required */
462 TAPI_SIM_LOCK_KEY_PUK = 0x02, /**< PUK required */
463 TAPI_SIM_LOCK_KEY_PIN2 = 0x03, /**< PIN2 required */
464 TAPI_SIM_LOCK_KEY_PUK2 = 0x04, /**< PUK2 required */
465 TAPI_SIM_LOCK_PERM_BLOCKED = 0x05, /**< Permanent block SIM */
466 } TelSimLockStatus_t;
469 * @enum TelSimSapPowerMode_t
470 * This enum gives the SAP message Ids between SAP client and SAP server.
473 TAPI_SIM_SAP_POWER_SIM_ON_REQ, /**< SAP Client request about power SIM on in Server */
474 TAPI_SIM_SAP_POWER_SIM_OFF_REQ, /**< SAP Client request about power SIM off in Server */
475 TAPI_SIM_SAP_RESET_SIM_REQ, /**< SAP Client request about SIM reset in Server */
476 } TelSimSapPowerMode_t;
479 * @enum TelSimSapConnectionStatus_t
480 * This enum gives the SAP connection status information .
483 TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00, /**< connect successfully */
484 TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH, /**< unable to establish connection */
485 TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE, /**< when server does not support message length that client want send */
486 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 */
487 } TelSimSapConnectionStatus_t;
490 * @enum TelSimSapDissconnectType_t
491 * This enum gives the SAP disconnect type information.
494 TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL = 0x00, /**< disconnection procedure ends after finishing current work */
495 TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE /**< disconnection procedure ends immediately*/
496 } TelSimSapDissconnectType_t;
499 * @enum TelSimSapStatusInfo_t
500 * This enum gives the SAP current connection status information
503 TAPI_SIM_SAP_STATUS_UNKNOWN = 0x00, /**< SAP server connection status - unknown*/
504 TAPI_SIM_SAP_STATUS_NO_SIM, /**< SAP server connection status - no SIM*/
505 TAPI_SIM_SAP_STATUS_NOT_READY, /**< SAP server connection status - not ready*/
506 TAPI_SIM_SAP_STATUS_READY, /**< SAP server connection status - ready*/
507 TAPI_SIM_SAP_STATUS_CONNECTED /**< SAP server connection status - connected*/
508 } TelSimSapStatusInfo_t;
511 * @enum TelSimSapCardStatus_t
512 * This enum gives the SIM card status if server`s status changed about connection with subscription module
515 TAPI_SIM_SAP_CARD_STATUS_UNKNOWN = 0x00, /**< SAP server status(card reader status) - unknown*/
516 TAPI_SIM_SAP_CARD_STATUS_RESET, /**< SAP server status(card reader status) - reset*/
517 TAPI_SIM_SAP_CARD_STATUS_NOT_ACCESSIBLE, /**< SAP server status(card reader status) - not accessible*/
518 TAPI_SIM_SAP_CARD_STATUS_REMOVED, /**< SAP server status(card reader status) - removed*/
519 TAPI_SIM_SAP_CARD_STATUS_INSERTED, /**< SAP server status(card reader status) - inserted*/
520 TAPI_SIM_SAP_CARD_STATUS_RECOVERED /**< SAP server status(card reader status) - recovered*/
521 } TelSimSapCardStatus_t;
524 * @enum TelSimSapResultCode_t
525 * This enum gives the SAP result information.
528 TAPI_SIM_SAP_RESULT_CODE_OK = 0x00, /**< SAP operation result - ok*/
529 TAPI_SIM_SAP_RESULT_CODE_NO_REASON, /**< SAP operation result - no reason*/
530 TAPI_SIM_SAP_RESULT_CODE_CARD_NOT_ACCESSIBLE, /**< SAP operation result - not accessible*/
531 TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_OFF, /**< SAP operation result - card already power off*/
532 TAPI_SIM_SAP_RESULT_CODE_CARD_REMOVED, /**< SAP operation result - card removed*/
533 TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_ON, /**< SAP operation result - card already power on*/
534 TAPI_SIM_SAP_RESULT_CODE_DATA_NOT_AVAILABLE, /**< SAP operation result - data not available*/
535 TAPI_SIM_SAP_RESULT_CODE_NOT_SUPPORT /**< SAP operation result - not support*/
536 } TelSimSapResultCode_t;
539 * @enum TelSimSapProtocol_t
540 * This enum gives SAP transport protocol type
543 TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character*/
544 TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block*/
545 } TelSimSapProtocol_t;
548 * @enum TelSimPbAccessResult_t
549 * This enumeration defines the Phone book access result
552 TAPI_SIM_PB_SUCCESS, /**< SIM phonebook operation successful. */
553 TAPI_SIM_PB_FAIL, /**< SIM phonebook operation failure. */
554 TAPI_SIM_PB_INVALID_INDEX, /**< The index passed was not a valid index. */
555 TAPI_SIM_PB_INVALID_NUMBER_LENGTH, /**< The number length is exceeds the max length allowed (or 0). */
556 TAPI_SIM_PB_INVALID_NAME_LENGTH, /**< The name length is exceeds the max length allowed (or 0). */
557 TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition for PB file is not satisfied. */
558 } TelSimPbAccessResult_t;
561 * @enum TelSimPbFileType_t
562 * This enumeration defines different storage types to be selected in SIM or USIM
565 TAPI_SIM_PB_FDN, /**< Fixed Dialing Number */
566 TAPI_SIM_PB_ADN, /**< SIM - ADN */
567 TAPI_SIM_PB_SDN, /**< Service Dialing Number */
568 TAPI_SIM_PB_3GSIM, /**< USIM - 3G phone book */
569 TAPI_SIM_PB_AAS, /**< Additional number Alpha String */
570 TAPI_SIM_PB_GAS, /**< Grouping identifier Alpha String */
571 TAPI_SIM_PB_UNKNOWNN = 0xFF, /**< Unknown file type */
575 * @enum TelSimPb3GFileType_t
576 * This enumeration defines the different storage field types in 3G Phone book.
579 /* for 3G phone storage field type */
580 TAPI_PB_3G_NAME = 0x01, /**< Name */
581 TAPI_PB_3G_NUMBER, /**< Number */
582 TAPI_PB_3G_ANR1, /**< First Another number*/
583 TAPI_PB_3G_ANR2, /**< Second Another number */
584 TAPI_PB_3G_ANR3, /**< Third Another number */
585 TAPI_PB_3G_EMAIL1, /**< First Email */
586 TAPI_PB_3G_EMAIL2, /**< Second Email */
587 TAPI_PB_3G_EMAIL3, /**< Third Email */
588 TAPI_PB_3G_EMAIL4, /**< Fourth Email */
589 TAPI_PB_3G_SNE, /**< Second name entry of main name*/
590 TAPI_PB_3G_GRP, /**< Group */
591 TAPI_PB_3G_PBC, /** <1 byte control info and 1 byte hidden info*/
592 } TelSimPb3GFileType_t;
595 * @enum TelSimSSTService_t
596 * This enumeration defines the list of SST services in SIM Service Table. (GSM)
600 TAPI_SIM_SST_CHV1_DISABLE_FUNC = 0, /**< CHV1 disable function */
601 TAPI_SIM_SST_ADN, /**< abbreviated Dialing number */
602 TAPI_SIM_SST_FDN, /**< fixed Dialing number */
603 TAPI_SIM_SST_SMS, /**< short message storage */
604 TAPI_SIM_SST_AOC, /**< advice of charge */
605 TAPI_SIM_SST_CCP, /**< capability configuration parameters */
606 TAPI_SIM_SST_PLMN_SELECTOR, /**< plmn selector */
607 TAPI_SIM_SST_RFU1, /**< rfu */
610 TAPI_SIM_SST_MSISDN = 8, /**< msisdn */
611 TAPI_SIM_SST_EXT1, /**< extension1 */
612 TAPI_SIM_SST_EXT2, /**< extension2 */
613 TAPI_SIM_SST_SMS_PARAMS, /**< sms parameteres */
614 TAPI_SIM_SST_LND, /**< last number dialed */
615 TAPI_SIM_SST_CELL_BROADCAST_MSG_ID, /**< cell broadcast message identifier */
616 TAPI_SIM_SST_GID_LV1, /**< group identifier level 1 */
617 TAPI_SIM_SST_GID_LV2, /**< group identifier level 2 */
620 TAPI_SIM_SST_SPN = 16, /**< service provider name */
621 TAPI_SIM_SST_SDN, /**< service Dialing number */
622 TAPI_SIM_SST_EXT3, /**< extension3 */
623 TAPI_SIM_SST_RFU2, /**< rfu */
624 TAPI_SIM_SST_VGCS_GID_LIST, /**< vgcs group identifier (EF-VGCS, EF-VGCSS) */
625 TAPI_SIM_SST_VBS_GID_LIST, /**< vbs group identifier (EF-VBS, EF-VBSS) */
626 TAPI_SIM_SST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC, /**< enhanced multi-level precedence and pre-emption service */
627 TAPI_SIM_SST_AUTO_ANSWER_FOR_EMLPP, /**< automatic answer fro eMLPP */
630 TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_CB = 24, /**< data download via sms-cb */
631 TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_PP, /**< data download via sms-pp */
632 TAPI_SIM_SST_MENU_SELECTION, /**< menu selection */
633 TAPI_SIM_SST_CALL_CTRL, /**< call control */
634 TAPI_SIM_SST_PROACTIVE_SIM, /**< proactive sim command */
635 TAPI_SIM_SST_CELL_BROADCAST_MSG_ID_RANGES, /**< cell broadcast message identifier ranges */
636 TAPI_SIM_SST_BDN, /**< barred Dialing numbers */
637 TAPI_SIM_SST_EXT4, /**< extension 4 */
640 TAPI_SIM_SST_DEPERSONALIZATION_CTRL_KEYS = 32, /**< de-personalization control keys */
641 TAPI_SIM_SST_COOPERATIVE_NETWORK_LIST, /**< co-operative network list */
642 TAPI_SIM_SST_SMS_STATUS_REPORTS, /**< short message status reports */
643 TAPI_SIM_SST_NIA, /**< network's indication of alerting in the MS (NIA) */
644 TAPI_SIM_SST_MO_SMS_CTRL_BY_SIM, /**< mobile-originated short message control by sim */
645 TAPI_SIM_SST_GPRS, /**< gprs */
646 TAPI_SIM_SST_IMG, /**< image */
647 TAPI_SIM_SST_SOLSA, /**< support of local service area */
650 TAPI_SIM_SST_USSD_STR_DATA_OBJECT_SUPPORTED_IN_CALL_CTRL = 40, /**< ussd string data object supported in call control */
651 TAPI_SIM_SST_RUN_AT_CMD_CMD, /**< RUN AT COMMAND command */
652 TAPI_SIM_SST_USER_CTRLED_PLMN_SELECTOR_WACT, /**< user controlled PLMN selector with Access technology */
653 TAPI_SIM_SST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT, /**< operator controlled PLMN selector with Access technology */
654 TAPI_SIM_SST_HPLMN_SELECTOR_WACT, /**< HPLMN selector with access technology */
655 TAPI_SIM_SST_CPBCCH_INFO, /**< CPBCCH information */
656 TAPI_SIM_SST_INVESTIGATION_SCAN, /**< investigation scan */
657 TAPI_SIM_SST_EXTENDED_CAPA_CONF_PARAMS, /**< extended capability configuration parameters */
660 TAPI_SIM_SST_MEXE = 48, /**< MExE */
661 TAPI_SIM_SST_RPLMN_LAST_USED_ACCESS_TECH, /**< RPLMN last used access technology */
662 TAPI_SIM_SST_PLMN_NETWORK_NAME, /*PLMN Network Name*/
663 TAPI_SIM_SST_OPERATOR_PLMN_LIST, /*Operator PLMN List*/
664 TAPI_SIM_SST_MBDN, /*Mailbox Dialling Numbers*/
665 TAPI_SIM_SST_MWIS, /*Message Waiting Indication Status*/
666 TAPI_SIM_SST_CFIS, /*Call Forwarding Indication Status*/
667 TAPI_SIM_SST_SPDI, /*Service Provider Display Information*/
668 } TelSimSSTService_t;
671 * @enum TelSimUSTService_t
672 * This enumeration defines the list of UST services in SIM Service Table. (USIM)
676 TAPI_SIM_UST_LOCAL_PB = 0, /**< local phone book */
677 TAPI_SIM_UST_FDN, /**< fixed Dialing number */
678 TAPI_SIM_UST_EXT2, /**< extension2 */
679 TAPI_SIM_UST_SDN, /**< service Dialing number */
680 TAPI_SIM_UST_EXT3, /**< extension3 */
681 TAPI_SIM_UST_BDN, /**< barred Dialing numbers */
682 TAPI_SIM_UST_EXT4, /**< extension 4 */
683 TAPI_SIM_UST_OUTGOING_CALL_INFO, /**< outgoing call information */
686 TAPI_SIM_UST_INCOMING_CALL_INFO = 8, /**< incoming call information */
687 TAPI_SIM_UST_SMS, /**< short message storage */
688 TAPI_SIM_UST_SMS_STATUS_REPORTS, /**< short message status reports */
689 TAPI_SIM_UST_SMS_PARAMS, /**< sms parameteres */
690 TAPI_SIM_UST_AOC, /**< advice of charge */
691 TAPI_SIM_UST_CCP, /**< capability configuration parameters */
692 TAPI_SIM_UST_CELL_BROADCAST_MSG_ID, /**< cell broadcast message identifier */
693 TAPI_SIM_UST_CELL_BROADCAST_MSG_ID_RANGES, /**< cell broadcast message identifier ranges */
696 TAPI_SIM_UST_GID_LV1 = 16, /**< group identifier level 1 */
697 TAPI_SIM_UST_GID_LV2, /**< group identifier level 2 */
698 TAPI_SIM_UST_SPN, /**< service provider name */
699 TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_WACT, /**< user controlled PLMN selector with Access technology */
700 TAPI_SIM_UST_MSISDN, /**< msisdn */
701 TAPI_SIM_UST_IMG, /**< image */
702 TAPI_SIM_UST_SOLSA, /**< support of local service area */
703 TAPI_SIM_UST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC, /**< enhanced multi-level precedence and pre-emption service */
706 TAPI_SIM_UST_AUTO_ANSWER_FOR_EMLPP = 24, /**< automatic answer fro eMLPP */
707 TAPI_SIM_UST_RFU1, /**< rfu */
708 TAPI_SIM_UST_GSM_ACCESS, /**< gsm access */
709 TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_PP, /**< data download via sms-pp */
710 TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_CB, /**< data download via sms-cb */
711 TAPI_SIM_UST_CALL_CTRL, /**< call control by usim*/
712 TAPI_SIM_UST_MO_SMS_CTRL, /**< mobile-originated short message control by usim */
713 TAPI_SIM_UST_RUN_AT_CMD_CMD, /**< RUN AT COMMAND command */
716 TAPI_SIM_UST_SHALL_BE_SET_TO_ONE = 32, /**< shall be set to 1 */
717 TAPI_SIM_UST_ENABLED_SRVC_TABLE, /**< enabled service table */
718 TAPI_SIM_UST_ACL, /**< APN control list */
719 TAPI_SIM_UST_DEPERSONALIZATION_CTRL_KEYS, /**< de-personalization control keys */
720 TAPI_SIM_UST_COOPERATIVE_NETWORK_LIST, /**< co-operative network list */
721 TAPI_SIM_UST_GSM_SEC_CONTEXT, /**< gsm security context */
722 TAPI_SIM_UST_CPBCCH_INFO, /**< CPBCCH information */
723 TAPI_SIM_UST_INVESTIGATION_SCAN, /**< investigation scan */
726 TAPI_SIM_UST_MEXE = 40, /**< MExE */
727 TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT, /**< operator controlled PLMN selector with Access technology */
728 TAPI_SIM_UST_HPLMN_SELECTOR_WACT, /**< HPLMN selector with access technology */
729 TAPI_SIM_UST_EXT5, /**< extension 5 */
730 TAPI_SIM_UST_PLMN_NETWORK_NAME, /*PLMN Network Name*/
731 TAPI_SIM_UST_OPERATOR_PLMN_LIST, /*Operator PLMN List*/
732 TAPI_SIM_UST_MBDN, /*Mailbox Dialling Numbers*/
733 TAPI_SIM_UST_MWIS, /*Message Waiting Indication Status*/
736 TAPI_SIM_UST_CFIS = 48, /*Call Forwarding Indication Status*/
737 TAPI_SIM_UST_RPLMN_LAST_USED_ACCESS_TECH, /**< RPLMN last used access technology */
738 TAPI_SIM_UST_SPDI, /*Service Provider Display Information*/
739 TAPI_SIM_UST_MMS, /**< multi media messaging service */
740 TAPI_SIM_UST_EXT8, /**< extension 8 */
741 TAPI_SIM_UST_CALL_CTRL_ON_GPRS, /**< call control on gprs by usim */
742 TAPI_SIM_UST_MMS_USER_CONNECTIVITY_PARAMS, /**< mms user connectivity parameters */
743 TAPI_SIM_UST_NIA, /**< network's indication of alerting in the MS (NIA) */
746 TAPI_SIM_UST_VGCS_GID_LIST = 56, /**< vgcs group identifier List (EF-VGCS, EF-VGCSS) */
747 TAPI_SIM_UST_VBS_GID_LIST, /**< vbs group identifier List (EF-VBS, EF-VBSS) */
748 TAPI_SIM_UST_PSEUDONYM,
749 TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_IWLAN, /**< user controlled PLMN selector for I-WLAN access */
750 TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_IWLAN, /**< operator controlled PLMN selector for I-WLAN access */
751 TAPI_SIM_UST_USER_CTRLED_WSID_LIST,
752 TAPI_SIM_UST_OPERATOR_CTRLED_WSID_LIST,
753 TAPI_SIM_UST_VGCS_SEC,
754 } TelSimUSTService_t;
757 * @enum TelSimTapiOperation_t
758 * This enumeration defines the list of TAPI-SIM Operations.
761 TAPI_SIM_GET_INIT_STATUS = 1,
762 TAPI_SIM_GET_CARD_TYPE,
765 TAPI_SIM_GET_ICCID = 5,
766 TAPI_SIM_GET_LANGUAGE,
767 TAPI_SIM_SET_LANGUAGE,
768 TAPI_SIM_GET_CALL_FORWARDING,
769 TAPI_SIM_SET_CALL_FORWARDING,
770 TAPI_SIM_GET_MESSAGE_WAITING = 10,
771 TAPI_SIM_SET_MESSAGE_WAITING,
772 TAPI_SIM_GET_MAILBOX,
773 TAPI_SIM_SET_MAILBOX,
774 TAPI_SIM_GET_CPHS_INFO,
775 TAPI_SIM_GET_SVCT = 15,
777 TAPI_SIM_GET_OPLMWACT,
779 TAPI_SIM_GET_CPHS_NET_NAME,
780 TAPI_SIM_AUTHENTICATION = 20,
784 TAPI_SIM_DISABLE_FACILITY,
785 TAPI_SIM_ENABLE_FACILITY = 25,
786 TAPI_SIM_GET_FACILITY,
787 TAPI_SIM_GET_LOCK_INFO,
788 TAPI_SIM_TRANSFER_APDU,
790 TAPI_SIM_GET_FIELDS = 30, //for get various data at once
793 TAPI_SIM_STATUS = 100,
795 } TelSimTapiOperation_t;
798 char service[TAPI_SIM_SST_SERVICE_CNT_MAX]; // should access with 'enum TelSimSSTService_t' as index
802 char service[TAPI_SIM_UST_SERVICE_CNT_MAX]; // should access with 'enum TelSimUSTService_t' as index
806 TelSimCardType_t sim_type;
811 } TelSimServiceTable_t;
814 * This data structure defines the data for the Imsi information.
817 char szMcc[3 + 1]; /**< mobile country code */
818 char szMnc[3 + 1]; /**< mobile network code */
819 char szMsin[10 + 1]; /**< mobile station identification number */
825 TelSimEccEmergencyServiceInfo_t category;
830 TelSimEcc_t list[15];
834 int icc_length; /**< Integrated Circuit Card number length */
835 char icc_num[TAPI_SIM_ICCID_LEN_MAX]; /**< Integrated Circuit Card number */
840 int rec_index; /**< index which stands for the location where record is saved in SIM*/
841 int profile_num; /**< SIM profile index*/
842 TelSimMailboxType_t mb_type;
843 int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/
844 char alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
845 TelSimTypeOfNum_t ton; /**< Type Of Number */
846 TelSimNumberingPlanIdentity_t npi; /**< Number Plan Identity */
847 char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
848 unsigned char cc_id; /**< Capability/Configuration Identifier */
849 unsigned char ext1_id; /**< Extensiion1 Record Identifier */
850 }TelSimMailBoxNumber_t;
854 TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5]; //max is 10
855 }TelSimMailboxList_t;
859 unsigned char msp_num; /**< MSP number*/
860 unsigned char cfu_status; /**< call forwarding unconditional indication status*/
861 TelSimTypeOfNum_t ton; /**< TON*/
862 TelSimNumberingPlanIdentity_t npi; /**< NPI*/
863 char cfu_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1];/**< Dialing Number/SSC String*/
864 unsigned char cc2_id; /**< Capability/Configuration2 Record Identifier */
865 unsigned char ext7_id; /**< Extension 7 Record Identifier */
870 TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];
874 int b_line1; /**< CallForwardUnconditionalLine 1 */
875 int b_line2; /**< CallForwardUnconditionalLine 2 */
876 int b_fax; /**< CallForwardUnconditional FAX */
877 int b_data; /**<CallForwardUnconditional data*/
882 TelSimCfisList_t cf_list;
883 TelSimCphsCf_t cphs_cf;
884 }TelSimCallForwardingResp_t;
890 TelSimCphsCf_t cphs_cf;
892 }TelSimCallForwardingReq_t;
896 unsigned char indicator_status; /**< Indicator Type*/
897 int voice_count; /**< VoiceMail Count*/
898 int fax_count; /**< FAX Count*/
899 int email_count; /**< Email Count*/
900 int other_count; /**< Other Count*/
901 int video_count; /**< VideoMail Count*/
906 TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];
910 int b_voice1; /**< VoiceMsgLine1 message waiting flag */
911 int b_voice2; /**< VoiceMsgLine2 message waiting flag */
912 int b_fax; /**< FAX message waiting flag */
913 int b_data; /**< Data message waiting flag */
918 TelSimMwisList_t mw_list;
919 TelSimCphsMw_t cphs_mw;
920 }TelSimMessageWaitingResp_t;
926 TelSimCphsMw_t cphs_mw;
928 }TelSimMessageWaitingReq_t;
931 * This data structure represents MSISDN information
934 char num[TAPI_SIM_MSISDN_DIALING_NUMBER_LEN + 1]; /**< MSISDN number. If not exist, Null string will be returned*/
935 char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< MSISDN name. If not exist, Null string will be returned*/
936 } TelSimSubscriberInfo_t;
940 TelSimSubscriberInfo_t list[3]; //max is 3
951 TelSimOplmnwact_t list[30]; //max is 30
952 }TelSimOplmnwactList_t;
955 unsigned char display_condition; /**< display condition (1 byte) */
956 unsigned char spn[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1]; /**< SPN */
960 unsigned char full_name[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1];
961 unsigned char short_name[TAPI_SIM_NET_SHORT_NAME_MAX_LEN + 1];
962 }TelSimCphsNetName_t;
965 *This is used for authentication request procedure.
968 TelSimAuthenticationType_t auth_type; /**< Authentication type */
969 int rand_length; /**< the length of RAND */
970 int autn_length; /**< the length of AUTN. it is not used in case of GSM AUTH */
971 char rand_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< RAND data */
972 char autn_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< AUTN data. it is not used in case of GSM AUTH */
973 } TelSimAuthenticationData_t;
976 * This is used for result data of authentication.
979 TelSimAuthenticationType_t auth_type; /**< authentication type */
980 TelSimAuthenticationResult_t auth_result; /**< authentication result */
981 int resp_length; /**< response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES. */
982 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. */
983 int authentication_key_length; /**< the length of authentication key, Kc*/
984 char authentication_key[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< the data of of authentication key, Kc*/
985 int cipher_length; /**< the length of cipher key length */
986 char cipher_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< cipher key */
987 int integrity_length; /**< the length of integrity key length */
988 char integrity_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< integrity key */
989 } TelSimAuthenticationResponse_t;
993 * This structure contains information about pin data.
994 * SIM PIN DATA. For PIN handling (Change, UnBlock) & for Type of PIN information.
997 TelSimPinType_t type; /**< Pin type */
998 unsigned char* pw; /**< PIN code */
999 unsigned int pw_len; /**< PIN code length*/
1003 * This data structure defines the data for the PIN Information.
1006 TelSimPinType_t type; /**< Specifies the PIN or PUK type.*/
1007 int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
1008 } TelSimSecResult_t;
1011 * This structure is used to en/disable facility
1014 TelSimLockType_t lock_type; /**< Facility type */
1015 unsigned char *pw; /**< password */
1016 int pw_len; /**< password length */
1017 } TelSimFacilityPw_t;
1020 TelSimLockType_t type; /**< Specifies the PIN or PUK type.*/
1021 int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
1022 } TelSimFacilityResult_t;
1025 TelSimLockType_t type;
1026 TelSimFacilityStatus_t f_status;
1027 }TelSimFacilityInfo_t;
1031 * This structure is used to get information about LOCK_TYPE
1034 TelSimLockType_t lock_type; /**< Lock type */
1035 TelSimLockStatus_t lock_status; /**< Lock key */
1036 int retry_count; /**< retry counts */
1040 * This data structure defines the data for the apdu.
1043 unsigned short apdu_len;
1044 unsigned char* apdu;
1048 * This data structure defines the data for the Response of sending apdu.
1051 unsigned short apdu_resp_len;
1052 unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN];
1056 * This data structure defines the data for the Response of sending apdu.
1059 unsigned short atr_resp_len;
1060 unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];
1064 * This sturcture gives information of available optional CPHS SIM files.
1067 /* Byte 2 - bit1 & 2*/
1068 int bCustomerServiceProfile; /**< Customer Service Profile (CSP) */
1069 /* Byte 2 - bit3 & 4*/
1070 int bServiceStringTable; /**< Service String Table (SST) */
1071 /* Byte 2 - bit5 & 6*/
1072 int bMailBoxNumbers; /**< MailBoxNumbers */
1073 /* Byte 2 - bit7 & 8*/
1074 int bOperatorNameShortForm; /**< Short form of operator name */
1075 /* Byte 3 - bit1 & 2*/
1076 int bInformationNumbers; /**< Information numbers */
1077 } TelSimCphsServiceTable_t;
1080 These requirements are additional to the GSM 900 and DCS1800 recommendations.
1081 They apply to all products which are to be compliant with the CPHS specification.
1083 In addition to those SIM storage fields previously defined in DCS1800 to support
1084 existing MS features and services, the Association has defined the following fields :-
1086 1) Call Forwarding flag (mandatory)
1087 2) Voice message waiting flag (mandatory)
1088 3) PLMN operator name (mandatory)
1089 4) Customer Service Profile (CSP) (optional)
1090 5) CPHS Information (mandatory)
1091 6) Mailbox Numbers (optional)
1092 7) Information Numbers (optional)
1097 DATA FIELD - 6F 16: CPHS INFORMATION
1104 *This structure gives CPHS information data.
1107 TelSimCphsPhaseType_t CphsPhase; /**< CPHS phase type */
1108 TelSimCphsServiceTable_t CphsServiceTable; /**< CPHS service table */
1112 DATA FIELD -6F 19: Information Numbers
1118 * This struct gives CPHS information numbers data.
1121 int bUsed; /**< SIM CPHS index level one */
1122 unsigned char AlphaIdLength; /**< length of alpha identifier */
1124 TelSimCphsIndexLevelIndicator_t IndexLevelIndicator; /**< SIM CPHS index level one */
1125 int PremiumServiceIndicator; /**< SIM CPHS index level one */
1126 int NetworkSpecificIndicator; /**< SIM CPHS index level one */
1127 unsigned char Alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
1129 unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
1130 TelSimTypeOfNum_t TypeOfNumber; /**< TON */
1131 TelSimNumberingPlanIdentity_t NumberingPlanIdentity; /**< NPI */
1132 char DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< dialing Number/SSC String */
1133 unsigned char Ext1RecordId; /**< Extensiion1 Record Identifier */
1134 } TelSimCphsInformationNum_t;
1137 DATA FIELD- 6F 15: Customer Service Profile (Storing a list of service options which are relevant to that specific customer)
1144 * This struct gives CPHS service call offering information.
1147 int bCallForwardingUnconditional; /**< CallForwarding Unconditional */
1148 int bCallForwardingOnUserBusy; /**< CallForwarding On UserBusy */
1149 int bCallForwardingOnNoReply; /**< CallForwarding On NoReply */
1150 int bCallForwardingOnUserNotReachable; /**< CallForwarding On User Not Reachable */
1151 int bCallTransfer; /**< Call Transfer */
1152 } TelSimCphsServiceCallOffering_t;
1156 * This struct gives CPHS service call restriction information.
1159 int bBarringOfAllOutgoingCalls; /**< Barring Of All Outgoing Calls*/
1160 int bBarringOfOutgoingInternationalCalls; /**< Barring Of Outgoing International Calls */
1161 int bBarringOfOutgoingInternationalCallsExceptHplmn; /**< Barring Of Outgoing International Calls Except HPLMN */
1162 int bBarringOfAllIncomingCallsRoamingOutsideHplmn; /**< Barring Of All Incoming Calls Roaming Outside HPLMN */
1163 int bBarringOfIncomingCallsWhenRoaming; /**< Barring Of IncomingCalls When Roaming */
1164 } TelSimCphsServiceCallRestriction_t;
1168 * This struct gives CPHS service SS information.
1171 int bMultiPartyService; /**< MultiPartyService*/
1172 int bClosedUserGroup; /**< ClosedUserGroup*/
1173 int bAdviceOfCharge; /**< AdviceOfCharge*/
1174 int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
1175 int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
1176 } TelSimCphsServiceOtherSupplimentaryService_t;
1180 * This struct gives CPHS service call complete information.
1183 int bCallHold; /**< Call Hold*/
1184 int bCallWaiting; /**< Call Waiting*/
1185 int bCompletionOfCallToBusySubscriber; /**< Completion Of Call To Busy Subscriber*/
1186 int bUserUserSignalling; /**< User User Signaling*/
1187 } TelSimCphsServiceCallComplete_t;
1191 * This struct gives CPHS service teleservices information.
1194 int bShortMessageMobileOriginated; /**< Short Message Mobile Originated*/
1195 int bShortMessageMobileTerminated; /**< Short Message Mobile Terminated*/
1196 int bShortMessageCellBroadcast; /**< Short Message Cell Broadcast*/
1197 int bShortMessageReplyPath; /**< Short Message Reply Path*/
1198 int bShortMessageDeliveryConf; /**< Short Message Delivery Conf*/
1199 int bShortMessageProtocolIdentifier; /**< Short Message Protocol Identifier*/
1200 int bShortMessageValidityPeriod; /**< Short Message Validity Period*/
1201 } TelSimCphsServiceTeleservices_t;
1205 * This struct gives CPHS alternative line service information.
1208 int bAlternativeLineService; /**< Alternative Line Service*/
1209 } TelSimCphsServiceCphsTeleservices_t;
1213 * This struct gives CPHS string service table information.
1216 int bStringServiceTable; /**< String Service Table*/
1217 } TelSimCphsServiceCphsFeatures_t;
1221 * This struct gives CPHS service number identifier information.
1224 int bCallingLineIdentificationPresent; /**< Calling Line Identification Present*/
1225 int bConnectedLineIdentificationRestrict; /**< Connected Line Identification Restrict*/
1226 int bConnectedLineIdentificationPresent; /**< Connected Line Identification Present*/
1227 int bMaliciousCallIdentifier; /**< Malicious Call Identifier*/
1228 int bCallingLineIdentificationSend; /**< Calling Line Identification Send*/
1229 int bCallingLineIdentificationBlock; /**< Calling Line Identification Block*/
1230 } TelSimCphsServiceNumberIdentifier_t;
1234 * This struct gives CPHS service phase services information.
1237 int bMenuForGprs; /**< Menu For GPRS*/
1238 int bMenuForHighSpeedCsd; /**< Menu For HighSpeedCsd*/
1239 int bMenuForVoiceGroupCall; /**< Menu For VoiceGroupCall*/
1240 int bMenuForVoiceBroadcastService; /**< Menu For VoiceBroadcastService*/
1241 int bMenuForMultipleSubscriberProfile; /**< Menu For MultipleSubscriberProfile*/
1242 int bMenuForMultipleBand; /**< Menu For MultipleBand*/
1243 } TelSimCphsServicePhaseServices_t;
1247 * This struct gives CPHS value added service information.
1250 int bRestrictMenuForManualSelection; /**< RestrictMenu For ManualSelection*/
1251 int bRestrictMenuForVoiceMail; /**< RestrictMenu For VoiceMail*/
1252 int bRestrictMenuForMoSmsAndPaging; /**< RestrictMenu For MoSmsAndPaging*/
1253 int bRestrictMenuForMoSmsWithEmialType; /**< RestrictMenu For MoSmsWithEmialType*/
1254 int bRestrictMenuForFaxCalls; /**< RestrictMenu For FaxCalls*/
1255 int bRestrictMenuForDataCalls; /**< RestrictMenu For DataCalls*/
1256 int bRestrictMenuForChangeLanguage; /**< RestrictMenu For ChangeLanguage*/
1257 } TelSimCphsServiceValueAddedServices_t;
1261 * This struct gives CPHS service information number data.
1264 int bInformationNumbers; /**< Information Numbers*/
1265 } TelSimCphsServiceInformationNumbers_t;
1269 * This struct gives CPHS service profile entry information.
1272 TelSimCphsCustomerServiceGroup_t CustomerServiceGroup; /**< customer service group*/
1274 TelSimCphsServiceCallOffering_t CallOffering; /**< call offering*/
1275 TelSimCphsServiceCallRestriction_t CallRestriction; /**< call restriction*/
1276 TelSimCphsServiceOtherSupplimentaryService_t OtherSuppServices; /**< other SS services*/
1277 TelSimCphsServiceCallComplete_t CallComplete; /**< call complete*/
1278 TelSimCphsServiceTeleservices_t Teleservices; /**< teleservices*/
1279 TelSimCphsServiceCphsTeleservices_t CphsTeleservices; /**< CPHS teleservices*/
1280 TelSimCphsServiceCphsTeleservices_t CphsFeatures; /**< CPHS features*/
1281 TelSimCphsServiceNumberIdentifier_t NumberIdentifiers; /**< number identifiers*/
1282 TelSimCphsServicePhaseServices_t PhaseServices; /**< phase services*/
1283 TelSimCphsServiceValueAddedServices_t ValueAddedServices; /**< value added services*/
1284 TelSimCphsServiceInformationNumbers_t InformationNumbers; /**< information numbers*/
1286 } TelSimCphsCustomerServiceProfileEntry_t;
1290 * This struct gives CPHS service profile information.
1293 TelSimCphsCustomerServiceProfileEntry_t ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< service profile entry*/
1294 } TelSimCphsCustomerServiceProfileInfo_t;
1298 * This struct gives dynamics flag selected line information.
1301 TelSimDynamicFlagsSelectedLineId_t DynamicFlags; /**< Dynamic flags information */
1302 } TelSimDynamicFlagsInfo_t;
1306 * This struct gives dynamics flag selected line information.
1309 TelSimDynamic2FlagAlsStatus_t Dynamic2Flag; /**< Dynamic flags status */
1310 } TelSimDynamic2FlagsInfo_t;
1314 * This data structure gives the phone book availability of current SIM.
1317 int b_fdn; /**< Fixed Dialing Number */
1318 int b_adn; /**< SIM - ADN(2G phonebook, Under DF phonebook */
1319 int b_sdn; /**< Service Dialing Number */
1320 int b_3g; /**< USIM - 3G phonebook */
1321 int b_aas; /**< Additional number Alpha String phonebook */
1322 int b_gas; /**< Grouping information Alpha String phonebook */
1326 * This data structure gives the phone book status of current SIM.
1330 TelSimPbList_t pb_list;
1334 TelSimPbType_t phonebook_type;
1335 unsigned short index;
1336 unsigned short next_index; //this field is not used in add/update case
1338 unsigned char name[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
1339 TelSimTextEncrypt_t dcs;
1341 unsigned char number[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1342 TelSimTypeOfNum_t ton;
1344 /* following field is valid in only USIM*/
1345 unsigned char sne[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];
1346 TelSimTextEncrypt_t sne_dcs;
1347 unsigned char anr1[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1348 TelSimTypeOfNum_t anr1_ton;
1349 unsigned char anr2[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1350 TelSimTypeOfNum_t anr2_ton;
1351 unsigned char anr3[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];
1352 TelSimTypeOfNum_t anr3_ton;
1354 unsigned char email1[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1355 unsigned char email2[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1356 unsigned char email3[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1357 unsigned char email4[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];
1359 unsigned short group_index; //GRP
1360 unsigned short pb_control; //PBC
1364 * This data structure defines the phone book storage count information.
1367 TelSimPbType_t StorageFileType; /**< Storage file type */
1368 unsigned short TotalRecordCount; /**< Total record count */
1369 unsigned short UsedRecordCount; /**< Used record count */
1370 } TelSimPbStorageInfo_t;
1373 * This data structure gives the phone book entry information.
1376 TelSimPbType_t StorageFileType; /**< Storage file type */
1377 unsigned short PbIndexMin; /**< Phone book minimum index*/
1378 unsigned short PbIndexMax; /**< Phone book maximum index */
1379 unsigned short PbNumLenMax; /**< Phone number maximum length */
1380 unsigned short PbTextLenMax; /**< Text maximum length */
1381 unsigned short PbUsedCount; /**< Phone book used record count */
1382 } TelSimPbEntryInfo_t;
1386 This structure gives 3G phone book capability information.
1389 TelSimPb3GFileType_t field_type; /**< 3G phonebook file type */
1390 unsigned short index_max; /**< max index */
1391 unsigned short text_max; /**< max text length */
1392 unsigned short used_count; /**< used record count */
1393 } TelSimPb3GFileTypeCapabiltyInfo_t;
1397 * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
1398 * It refers to EF_PBR
1401 unsigned short FileTypeCount; /**< phonebook file type count */
1402 TelSimPb3GFileTypeCapabiltyInfo_t FileTypeInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT]; /**< phonebook file type information */
1403 } TelSimPbCapabilityInfo_t;
1407 /* SAP (SIM Access Profile) related interface structures and enum */
1409 * This struct gives the SAP ATR response data information.
1412 int atr_len; /**< SAP ATR response data length */
1413 unsigned char atr_data[TAPI_SIM_SAP_ATR_DATA]; /**< SAP ATR response data */
1416 /* SAP transfer APDU request */
1419 * This data structure gives the SAP APDU data information.
1422 int apdu_len; /**< SAP APDU length */
1423 unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**< SAP APDU data */
1427 * This union data contains RESPONSE data types for all supported operations of tel_call_sim_sync().
1430 TelSimInitInfo_t init_info;
1431 TelSimCardType_t card_type;
1432 TelSimImsiInfo_t imsi_info;
1433 TelSimEccList_t ecc_list;
1434 TelSimIccIdInfo_t iccid_info;
1435 TelSimCphsNetName_t cphs_netname;
1437 TelSimMsisdnList_t msisdn_list;
1438 TelSimApduResp_t apdu_resp;
1439 TelSimAtrResp_t atr_resp;
1440 }TelSimResponseData_t;
1443 * This union data contains REQUEST data types for all supported operations of tel_call_sim_sync().
1447 }TelSimRequestData_t;
1453 #endif // _TELSIM_H_