yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2016 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS (""MEDIATEK SOFTWARE"") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN ""AS-IS"" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | /************************************************************* |
| 36 | * |
| 37 | * This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc. |
| 38 | * |
| 39 | * Any unauthorized use inconsistent with the terms of such license is strictly prohibited. |
| 40 | * |
| 41 | * Copyright (c) 2005-2010 VIA Telecom, Inc. All rights reserved. |
| 42 | * |
| 43 | *************************************************************/ |
| 44 | #ifndef VALPSW_H |
| 45 | #define VALPSW_H |
| 46 | /***************************************************************************** |
| 47 | * |
| 48 | * FILE NAME : valpswapi.h |
| 49 | * |
| 50 | * DESCRIPTION : |
| 51 | * |
| 52 | * This is the internal interface include file for PSW. |
| 53 | * |
| 54 | * HISTORY : |
| 55 | * |
| 56 | * See Log at end of file |
| 57 | * |
| 58 | *****************************************************************************/ |
| 59 | #include "sysdefs.h" |
| 60 | #include "valapi.h" |
| 61 | #include "pswapi.h" |
| 62 | #ifdef SYS_PTION_RLP |
| 63 | #include "rlpwapi.h" |
| 64 | #endif |
| 65 | /*for call control*/ |
| 66 | #ifdef FEATURE_UTK |
| 67 | #include "valutkapi.h" |
| 68 | #endif |
| 69 | |
| 70 | #ifdef __cplusplus |
| 71 | extern "C" { |
| 72 | #endif /* __cplusplus */ |
| 73 | |
| 74 | #define VAL_PSW_MAX_REG_TASK 5 |
| 75 | #define BYTE_MASK(offset, len) \ |
| 76 | ((0xff >> offset) & (0xff << (8 - (offset + len)))) |
| 77 | |
| 78 | /*************************************************************************** |
| 79 | VAL PSW event definitions |
| 80 | ****************************************************************************/ |
| 81 | |
| 82 | typedef enum |
| 83 | { |
| 84 | VAL_PSW_EVT_INCOMING_CALL_ALERT_WITH_INFO_MSG, |
| 85 | VAL_PSW_EVT_INCOMING_CALL_ALERT_WITH_MORE_INFO_MSG, |
| 86 | VAL_PSW_EVT_CALL_DIALING_MSG, /*A new event added by Chengzhen Huang. MS is on dialing.*/ |
| 87 | VAL_PSW_EVT_CALL_CONNECTED_MSG, |
| 88 | VAL_PSW_EVT_CALL_ANSWERED_MSG, /*MS is on conversation.*/ |
| 89 | VAL_PSW_EVT_CALL_ENDED_MSG, /*The call is ended.*/ |
| 90 | VAL_PSW_EVT_NWK_RPT_BURST_DTMF_MSG, |
| 91 | VAL_PSW_EVT_FLASH_ALERT_WITH_INFO_MSG, |
| 92 | VAL_PSW_EVT_FLASH_ALERT_WITH_MORE_INFO_MSG, |
| 93 | VAL_PSW_EVT_FEATURE_NOTIFICATION_MSG, |
| 94 | VAL_PSW_EVT_FEAT_NOTIF_MORE_INFO_MSG, |
| 95 | VAL_PSW_EVT_NWK_RPT_HANDOFF_MSG, |
| 96 | VAL_PSW_EVT_NWK_RPT_LOCK_MSG, |
| 97 | VAL_PSW_EVT_NWK_RPT_UNLOCK_MSG, |
| 98 | VAL_PSW_EVT_NWK_RPT_MAINTENANCE_REQUIRED_MSG, |
| 99 | VAL_PSW_EVT_NWK_RPT_START_CONTINUOUS_DTMF_MSG, |
| 100 | VAL_PSW_EVT_NWK_RPT_STOP_CONTINUOUS_DTMF_MSG, |
| 101 | VAL_PSW_EVT_ROAM_INDICATION_MSG, |
| 102 | VAL_PSW_EVT_PSW_E911_MODE_MSG, |
| 103 | VAL_PSW_EVT_SERVICE_MSG, |
| 104 | VAL_PSW_EVT_IN_SERVICE_MSG, |
| 105 | VAL_PSW_EVT_VOICE_PRIVACY_MSG, |
| 106 | VAL_PSW_EVT_FLASH_STATUS_MSG, |
| 107 | VAL_PSW_EVT_PSSTACK_STATUS_MSG, |
| 108 | VAL_PSW_EVT_AKEY_CHANGE_RSP_MSG, |
| 109 | VAL_PSW_EVT_NAM_MSG, |
| 110 | VAL_PSW_EVT_BS_CO_ORD_MSG, |
| 111 | VAL_PSW_EVT_L1D_RSSI_RPT_MSG, |
| 112 | VAL_PSW_EVT_EV_MAINTENANCE_MSG, |
| 113 | VAL_PSW_EVT_EV_PAGE_RECEIVED, |
| 114 | VAL_PSW_EVT_REGISTRATION_ACCEPT_MSG, |
| 115 | VAL_PSW_EVT_REGISTRATION_REJECT_MSG, |
| 116 | VAL_PSW_EVT_ADC_MEAS_RESPONSE_MSG, |
| 117 | /*HDQ ADDED for Keypad service provisioning module on 20040622*/ |
| 118 | VAL_PSW_EVT_SERVICE_CONFIG_MSG, |
| 119 | VAL_PSW_EVT_NAM_RPT_ACTIVE_NAM_MSG, |
| 120 | VAL_PSW_EVT_NAM_RPT_LOCKSTATUS_MSG, |
| 121 | VAL_PSW_EVT_LOCK_NAM_RSP_MSG, |
| 122 | VAL_PSW_EVT_ACTIVE_NAM_RSP_MSG, |
| 123 | VAL_PSW_EVT_GET_AKEY_CHECKSUM_RSP_MSG, |
| 124 | /*end*/ |
| 125 | VAL_PSW_EVT_OTASP_IND_MSG, |
| 126 | VAL_PSW_EVT_OTASP_CON_MSG, |
| 127 | VAL_PSW_EVT_OTASP_DISCON_MSG, |
| 128 | VAL_PSW_EVT_SYSTEM_ERROR_IND_MSG, |
| 129 | VAL_PSW_EVT_NETWOKR_PRE_MSG, |
| 130 | VAL_PSW_EVT_CUR_PRL_INFO_MSG, |
| 131 | VAL_PSW_EVT_NONACTIVE_PRL_INFO_MSG, |
| 132 | VAL_PSW_EVT_SERVICE_STATUS_MSG, |
| 133 | VAL_PSW_EVT_AMPS_EXT_PROTO_MSG, |
| 134 | VAL_PSW_EVT_NWK_RPT_MCC_MNC_MSG, |
| 135 | |
| 136 | VAL_PSW_EVT_LOC_RESP_MSG, |
| 137 | VAL_PSW_EVT_LOC_ERROR_MSG, |
| 138 | VAL_PSW_EVT_RPT_DATA_INFO_MSG, |
| 139 | VAL_PSW_EVT_LOC_PILOT_PHASE_MEAS_MSG, |
| 140 | VAL_PSW_EVT_LOC_PSEUDO_RANGE_MSG, |
| 141 | VAL_PSW_EVT_RPT_PKT_STATE_MSG, |
| 142 | |
| 143 | VAL_PSW_EVT_PSWPOWERON_IND_MSG, |
| 144 | VAL_PSW_EVT_PSWPOWEROFF_IND_MSG, |
| 145 | VAL_PSW_EVT_REG_SUCCESS_MSG, |
| 146 | VAL_PSW_EVT_ENTER_OOSA, |
| 147 | VAL_PSW_EVT_RPT_DATA_CALL_EVT_MSG, |
| 148 | |
| 149 | VAL_PSW_RLP_RATE_INFO_MSG, |
| 150 | VAL_PSW_EVT_RPT_DATA_PREARRANGE_MSG, |
| 151 | |
| 152 | VAL_PSW_EVT_GET_MOBILE_ID_RSP_MSG, |
| 153 | |
| 154 | |
| 155 | VAL_PSW_EVT_PKT_ACTIVE_IND_MSG, /*VAL_PSW_EVT_NOT_DORMANT_IND_MSG,*/ |
| 156 | VAL_PSW_EVT_PKT_DORMANT_IND_MSG, |
| 157 | VAL_PSW_EVT_PKT_RELEASED_IND_MSG, |
| 158 | |
| 159 | VAL_PSW_EVT_NOT_DORMANT_IND_MSG, |
| 160 | VAL_PSW_EVT_DORMANT_IND_MSG, |
| 161 | VAL_PSW_EVT_CP_STATUS_MSG, |
| 162 | VAL_PSW_EVT_EV_CHECK_FEATURE_LOCK, |
| 163 | VAL_PSW_EVT_RPT_RLP_STAT_MSG, /* Message definition: RlpQueryStatIndMsgT */ |
| 164 | VAL_PSW_EVT_POWERUP_NV_READ_COMPLETE, |
| 165 | VAL_PSW_TRANSMIT_INFO_MSG, |
| 166 | VAL_PSW_EVT_NWK_RPT_CP_RESPONSE_MSG, |
| 167 | #ifdef FEATURE_UTK |
| 168 | VAL_PSW_EVT_CALL_CONTROL_RSP_MSG, |
| 169 | #endif |
| 170 | VAL_PSW_EVT_TIME_ZONE_CHANGED_MSG, |
| 171 | #ifdef MTK_CBP |
| 172 | VAL_PSW_EVT_NWK_EXISTENCE_INFO_MSG, |
| 173 | VAL_PSW_EVT_EV_ASSIGNED_MSG, |
| 174 | VAL_PSW_EVT_PRL_LIST_ID_UPDATED_MSG, |
| 175 | #endif |
| 176 | #ifdef MTK_CBP_ENCRYPT_VOICE |
| 177 | VAL_PSW_EVT_TC_ASSIGNED, |
| 178 | VAL_SMS_EVENT_CALLED_SEC_IND_MSG, |
| 179 | VAL_SMS_EVENT_SECURITY_INFO_ERASE_MSG, |
| 180 | VAL_SMS_EVENT_PASSWORD_RESET_MSG, |
| 181 | VAL_SMS_EVENT_SEND_STATUS_SPESMS_MSG, |
| 182 | VAL_SMS_EVENT_GET_ENCRYPT_KEY_SUCESS_IND, |
| 183 | VAL_SMS_EVENT_MT_ENCRYPT_NOTIFICATION_MSG_RECVD_IND, |
| 184 | VAL_SMS_EVENT_P101_MSG, |
| 185 | VAL_SMS_EVENT_P201_MSG, |
| 186 | VAL_SMS_EVENT_P301_MSG, |
| 187 | VAL_SMS_EVENT_P401_MSG, |
| 188 | #endif |
| 189 | VAL_PSW_EVT_MAX |
| 190 | } ValPswEventIdT; |
| 191 | |
| 192 | typedef enum |
| 193 | { |
| 194 | VAL_PSW_OTASP_A_BAND, |
| 195 | VAL_PSW_OTASP_B_BAND, |
| 196 | VAL_PSW_OTASP_A_BLOCK, |
| 197 | VAL_PSW_OTASP_B_BLOCK, |
| 198 | VAL_PSW_OTASP_C_BLOCK, |
| 199 | VAL_PSW_OTASP_D_BLOCK, |
| 200 | VAL_PSW_OTASP_E_BLOCK, |
| 201 | VAL_PSW_OTASP_F_BLOCK, |
| 202 | VAL_PSW_OTASP_PREFERRED, |
| 203 | VAL_PSW_MAX_OTASP_CODE |
| 204 | } ValPswOtaspCodeT; |
| 205 | |
| 206 | typedef struct |
| 207 | { |
| 208 | const kal_char *OtaspDigits; |
| 209 | ValPswOtaspCodeT SystemCode; |
| 210 | } OtaspItemT; |
| 211 | |
| 212 | typedef enum { |
| 213 | VAL_PSW_DISABLED, |
| 214 | VAL_PSW_NO_SERVICE_STATE, |
| 215 | VAL_PSW_IDLE_STATE, |
| 216 | VAL_PSW_CALL_ORIGINATE_WAIT_STATE, |
| 217 | VAL_PSW_DEDICATED_CALL_STATE, |
| 218 | VAL_PSW_CALL_ALERT_WAIT_STATE, |
| 219 | /*for call control*/ |
| 220 | #ifdef FEATURE_UTK |
| 221 | VAL_PSW_CALL_CONTROL_WAIT_STATE, |
| 222 | #endif |
| 223 | VAL_PSW_CALL_ORIGINATE_SEND_STATE, |
| 224 | VAL_PSW_STATE_NUM |
| 225 | } ValPswStateT; |
| 226 | |
| 227 | #ifdef MTK_CBP |
| 228 | /* Item of NAM */ |
| 229 | typedef enum |
| 230 | { |
| 231 | VAL_NV_ITEM_ID_UNKNOWN = 0, |
| 232 | VAL_NV_ITEM_ID_P_PREV, |
| 233 | VAL_NV_ITEM_ID_MDN, |
| 234 | VAL_NV_ITEM_ID_HOME_SID, |
| 235 | VAL_NV_ITEM_ID_MCC, |
| 236 | VAL_NV_ITEM_ID_MNC, /*5*/ |
| 237 | VAL_NV_ITEM_ID_MIN_1, |
| 238 | VAL_NV_ITEM_ID_MIN_2, |
| 239 | VAL_NV_ITEM_ID_IMSI_T_MCC, |
| 240 | VAL_NV_ITEM_ID_IMSI_T_MNC, |
| 241 | VAL_NV_ITEM_ID_IMSI_T_S_1, /*10*/ |
| 242 | VAL_NV_ITEM_ID_IMSI_T_S_2, /*11*/ |
| 243 | VAL_NV_ITEM_ID_TEST_CALL, |
| 244 | VAL_NV_ITEM_ID_EVRC_CAPABLE, |
| 245 | VAL_NV_ITEM_ID_HOME_PAGE_SO, |
| 246 | VAL_NV_ITEM_ID_HOME_ORIG_SO, /*15*/ |
| 247 | VAL_NV_ITEM_ID_ROAM_ORIG_SO, |
| 248 | VAL_NV_ITEM_ID_EVDO_REVISION, |
| 249 | VAL_NV_ITEM_ID_PREF_FWD_RC, |
| 250 | VAL_NV_ITEM_ID_ACCOLC, |
| 251 | VAL_NV_ITEM_ID_SCI, /*20*/ |
| 252 | VAL_NV_ITEM_ID_SCM, |
| 253 | VAL_NV_ITEM_ID_EVRCB_SWITCH,/*22*/ |
| 254 | VAL_NV_ITEM_ID_SLOTTED_MODE, |
| 255 | VAL_NV_ITEM_ID_HOME_NID, |
| 256 | VAL_NV_ITEM_ID_HOME_SID_REG,/*25*/ |
| 257 | VAL_NV_ITEM_ID_FSID_REG, |
| 258 | VAL_NV_ITEM_ID_FNID_REG, |
| 259 | VAL_NV_ITEM_ID_LOCK_CODE, /*28*/ |
| 260 | VAL_NV_ITEM_ID_EVRC_SWITCH, /*29*/ |
| 261 | |
| 262 | VAL_NV_ITEM_ID_INVALID |
| 263 | }ValNvIden; |
| 264 | |
| 265 | typedef enum |
| 266 | { |
| 267 | VAL_MSID_MCC_FIELD = 0, |
| 268 | VAL_MSID_MNC_FIELD, |
| 269 | VAL_MSID_IMSI_S1_FIELD, |
| 270 | VAL_MSID_IMSI_S2_FIELD, |
| 271 | VAL_MSID_IMSI_CLASS_FIELD, |
| 272 | VAL_MSID_ADDR_NUM_FIELD, |
| 273 | |
| 274 | VAL_MSID_INVAILD_FIELD |
| 275 | }ValMSidField; |
| 276 | |
| 277 | typedef enum |
| 278 | { |
| 279 | VAL_PREF_RC_1 = 1, |
| 280 | VAL_PREF_RC_2 = 2, |
| 281 | VAL_PREF_RC_3 = 3, |
| 282 | VAL_PREF_RC_4 = 4, |
| 283 | VAL_PREF_RC_5 = 5, |
| 284 | |
| 285 | VAL_PREF_RC_11 = 11, |
| 286 | |
| 287 | VAL_PREF_RC_INVAILD |
| 288 | }ValPrefRC; |
| 289 | |
| 290 | typedef enum |
| 291 | { |
| 292 | VAL_TEST_CALL_DEFAULT = 0, /*defualt */ |
| 293 | VAL_TEST_CALL_SIMPLE_TDSO = 1, /*Simple TDSO(32776) NOT Support*/ |
| 294 | VAL_TEST_CALL_FULL_TDSO = 2, /*FULL TDSO(32)*/ |
| 295 | VAL_TEST_CALL_LOOP_BACK_8K = 3, /*loopback 8k(2)*/ |
| 296 | VAL_TEST_CALL_LOOP_BACK_13K = 4, /*loopback 13k(9)*/ |
| 297 | VAL_TEST_CALL_LOOP_BACK_SO55 = 5, /*loopback SO55*/ |
| 298 | VAL_TEST_CALL_MARKOV_8K = 6, /*Markov 8k(32798) Not Support*/ |
| 299 | VAL_TEST_CALL_MARKOV_13K = 7, /*Markov 13k(32798) Not Support*/ |
| 300 | VAL_TEST_CALL_MARKOV_SO54 = 8, /*Markov SO54 Not Support*/ |
| 301 | |
| 302 | VAL_TEST_CALL_INVALID |
| 303 | }ValTestCallSo; |
| 304 | |
| 305 | |
| 306 | #define VAL_SO_FULL_TDSO 32 |
| 307 | #define VAL_SO_LOOP_BACK_8K 2 |
| 308 | #define VAL_SO_LOOP_BACK_13K 9 |
| 309 | #define VAL_SO_LOOP_BACK_SO55 55 |
| 310 | #define VAL_SO_8K_EVRC 3 |
| 311 | #define VAL_SO_13K_QCELP 17 |
| 312 | #define VAL_SO_WILD_CARD 0 |
| 313 | #define VAL_SO_EVRCB 68 |
| 314 | |
| 315 | /*the bit 5 is Slotted Class of Station Class Mark |
| 316 | Non-Slotted xx0xxxxx |
| 317 | slotted xx1xxxxx |
| 318 | */ |
| 319 | #define VAL_SLOTTED_MODE_ENABLE_MASK 0x20 |
| 320 | #define VAL_SLOTTED_MODE_DISABLE_MASK 0xDF |
| 321 | |
| 322 | #endif |
| 323 | |
| 324 | |
| 325 | /*************************************************************************** |
| 326 | |
| 327 | Basic Data Types for PSWF events |
| 328 | |
| 329 | ***************************************************************************/ |
| 330 | /* Cellular System types */ |
| 331 | #define VAL_PSW_CP_SYSTEM_PCS 0 /* Band 1 and Band 4 CDMA */ |
| 332 | #define VAL_PSW_CP_SYSTEM_CELLULAR 1 /* Band 0 CDMA */ |
| 333 | #define VAL_PSW_CP_SYSTEM_ANALOG 2 /* Band 0 Analog */ |
| 334 | |
| 335 | /* CDMA Blocks */ |
| 336 | #define VAL_PSW_A_BLOCK 0 |
| 337 | #define VAL_PSW_D_BLOCK 1 |
| 338 | #define VAL_PSW_B_BLOCK 2 |
| 339 | #define VAL_PSW_E_BLOCK 3 |
| 340 | #define VAL_PSW_F_BLOCK 4 |
| 341 | #define VAL_PSW_C_BLOCK 5 |
| 342 | #define VAL_PSW_G_BLOCK 6 |
| 343 | #define VAL_PSW_H_BLOCK 7 |
| 344 | #define VAL_PSW_I_BLOCK 8 |
| 345 | #define VAL_PSW_J_BLOCK 9 |
| 346 | #define VAL_PSW_K_BLOCK 10 |
| 347 | #define VAL_PSW_L_BLOCK 11 |
| 348 | #define VAL_PSW_M_BLOCK 12 |
| 349 | #define VAL_PSW_N_BLOCK 13 |
| 350 | |
| 351 | |
| 352 | #define VAL_PSW_ALL_BLOCKS 255 |
| 353 | #define OTA_ALERT_WITH_INFO_MESSAGE 1 |
| 354 | |
| 355 | #ifdef MTK_CBP |
| 356 | #define VAL_PSW_MAX_CALLING_PARTY_NUMBER_SIZE 50 |
| 357 | #else |
| 358 | #define VAL_PSW_MAX_CALLING_PARTY_NUMBER_SIZE 32 |
| 359 | #endif |
| 360 | |
| 361 | /* Call Processing Response Types */ |
| 362 | #define VAL_PSW_RSP_BURST_DTMF 1 |
| 363 | #define VAL_PSW_RSP_CONT_DTMF_ON 2 |
| 364 | #define VAL_PSW_RSP_CONT_DTMF_OFF 3 |
| 365 | #define VAL_PSW_RSP_DATA_BURST 4 |
| 366 | #define VAL_PSW_RSP_DATA_BURST_SENT 5 |
| 367 | #define VAL_PSW_RSP_FLASH 6 |
| 368 | #define VAL_PSW_RSP_VP 7 |
| 369 | #define VAL_PSW_REJ_INVALID_STATE 8 |
| 370 | #define VAL_PSW_REJ_TC_TXQ_FULL 9 |
| 371 | #define VAL_PSW_REJ_FC_ERROR 10 |
| 372 | #define VAL_PSW_REJ_ORDER_ERROR 11 |
| 373 | #define VAL_PSW_REJ_FMT_OVERFLOW 12 |
| 374 | |
| 375 | #ifdef MTK_DEV_C2K_IRAT |
| 376 | #define VAL_CSS_BOTH_POWER_OFF 0x0 /*defualt */ |
| 377 | #define VAL_CSS_1X_POWER_ON 0x1 /*CSS_1X is powered on*/ |
| 378 | #define VAL_CSS_DO_POWER_ON 0x2 /*CSS_DO is powered on*/ |
| 379 | #define VAL_CSS_BOTH_POWER_ON (VAL_CSS_1X_POWER_ON | VAL_CSS_DO_POWER_ON) |
| 380 | |
| 381 | #define VAL_LOCATION_ALL_RECVED 0x7 |
| 382 | #define VAL_LOCATION_SID_NID_RECVED 0x1 |
| 383 | #define VAL_LOCATION_MCC_MNC_RECVED 0x2 |
| 384 | #define VAL_LOCATION_BASE_INFO_RECVED 0x4 |
| 385 | |
| 386 | #define ValSetLocationMask(X) (ValLocationMask |= (0x7 & X)) |
| 387 | #define ValClearLocationMask(X) (ValLocationMask &= ~(0x7 & X)) |
| 388 | |
| 389 | #define POWER_OFF_SPEECH_TIMEOUT (8000) /* # of msec before power off speech driver */ |
| 390 | #endif |
| 391 | #define BURST_TYPE_SMS 0x03 |
| 392 | |
| 393 | #define C2K_XCAL_SMS_DEFAULT_MSG_NUMBER 1 |
| 394 | |
| 395 | #define C2K_XCAL_SMS_DEFAULT_NUM_MSGS 1 |
| 396 | |
| 397 | /*************************************************************************** |
| 398 | |
| 399 | EVENT NAME: VAL_PSW_EVT_CALL_ENDED_MSG |
| 400 | DESCRIPTION: |
| 401 | Sent when the call is ended for any reason. |
| 402 | MESSAGE TYPE: |
| 403 | PswFCallEndedMsgT - Contains reason for the call ending. |
| 404 | |
| 405 | ****************************************************************************/ |
| 406 | typedef enum |
| 407 | { |
| 408 | VAL_PSW_ORIG_FAIL=0, |
| 409 | VAL_PSW_ORIG_CANCELED_NDSS, |
| 410 | VAL_PSW_ORIG_CANCELED, |
| 411 | VAL_PSW_INTERCEPT, |
| 412 | VAL_PSW_REORDER, |
| 413 | VAL_PSW_CC_RELEASE, |
| 414 | VAL_PSW_CC_RELEASE_SO_REJ, |
| 415 | VAL_PSW_FNM_RELEASE, |
| 416 | VAL_PSW_DIALING_COMPLETE, |
| 417 | VAL_PSW_DIALING_CONTINUE, |
| 418 | VAL_PSW_MAINTENANCE, |
| 419 | VAL_PSW_VP_ON, |
| 420 | VAL_PSW_VP_OFF, |
| 421 | VAL_PSW_PSIST_FAIL, |
| 422 | VAL_PSW_TC_RELEASE_MS, |
| 423 | VAL_PSW_TC_RELEASE_PDOWN, |
| 424 | VAL_PSW_TC_RELEASE_DISABLE, |
| 425 | VAL_PSW_TC_RELEASE_BS, |
| 426 | VAL_PSW_TC_RELEASE_SO_REJECT, |
| 427 | VAL_PSW_TC_RELEASE_TIMEOUT, |
| 428 | VAL_PSW_TC_RELEASE_ACK_FAIL, |
| 429 | VAL_PSW_TC_RELEASE_FADE, |
| 430 | VAL_PSW_TC_RELEASE_LOCK, |
| 431 | VAL_PSW_PAGE_FAIL, |
| 432 | VAL_PSW_RETRY_TIMER_ACTIVE, |
| 433 | VAL_PSW_RETRY_TIMER_INACTIVE, |
| 434 | VAL_PSW_AMPS_INSVC, |
| 435 | VAL_PSW_ORIG_REJECTED, |
| 436 | VAL_PSW_ORIG_REJECTED_SO_NOT_SUPPORTED, |
| 437 | VAL_PSW_EV_ORIG_RETRY_ORDER, |
| 438 | VAL_PSW_BUSY_ORIG_FAIL, |
| 439 | VAL_PSW_LOCKED_ORIG_FAIL, |
| 440 | VAL_PSW_TC_RELEASE_MT_CALL, |
| 441 | VAL_PSW_ORIG_BLOCKED_BY_IRAT, |
| 442 | VAL_PSW_ACCT_ORIG_FAIL, |
| 443 | #ifdef MTK_CBP |
| 444 | VAL_PSW_SMS_CANCEL_BY_PWRDOWN, |
| 445 | #endif |
| 446 | VAL_PSW_CALL_FAIL_MAX_PROBE, |
| 447 | VAL_PSW_SR_FINISHED_MSG=100, |
| 448 | } ValPswCallEndReasonT; |
| 449 | |
| 450 | typedef struct |
| 451 | { |
| 452 | ValPswCallEndReasonT CallEndReason; |
| 453 | PswServiceT CallType; |
| 454 | kal_uint8 SO; |
| 455 | } ValPswCallEndedMsgT; |
| 456 | |
| 457 | typedef enum |
| 458 | { |
| 459 | VAL_SO_ACCEPT = 0, |
| 460 | VAL_SO_REJECT |
| 461 | }ValPswSoActionT; |
| 462 | |
| 463 | /* message type for VAL_SET_DEFAULT_SO_MSG */ |
| 464 | typedef struct |
| 465 | { |
| 466 | ValPswSoActionT Action; |
| 467 | PswServiceOptionT ServiceOption; |
| 468 | PswServiceT ServiceType; |
| 469 | } ValSetDefaultSOMsgT; |
| 470 | |
| 471 | /*************************************************************************** |
| 472 | |
| 473 | EVENT NAME: VAL_PSW_EVT_VOICE_PRIVACY_MSG |
| 474 | DESCRIPTION: |
| 475 | This message is used by VAL to UI callback interface to indicate whether |
| 476 | voice privacy is on or off based on VAL_EV_VP_ON/VAL_EV_VP_OFF PSW events |
| 477 | MESSAGE TYPE: |
| 478 | PswVoicePrivacyMsgT - Indicates whether voice privacy is on or off. |
| 479 | |
| 480 | ****************************************************************************/ |
| 481 | typedef struct |
| 482 | { |
| 483 | kal_bool VoicePrivacyOn; |
| 484 | } ValPswVoicePrivacyMsgT; |
| 485 | |
| 486 | |
| 487 | /*************************************************************************** |
| 488 | |
| 489 | EVENT NAME: VAL_PSW_EVT_PSSTACK_STATUS_MSG |
| 490 | DESCRIPTION: |
| 491 | This message is used by PSW to indicate the current protocol stack status. |
| 492 | MESSAGE TYPE: |
| 493 | PswPsStackStatusMsgT - Indicates the protocol stack status. |
| 494 | |
| 495 | ****************************************************************************/ |
| 496 | typedef enum |
| 497 | { |
| 498 | VAL_PSW_CP_ENABLED, |
| 499 | VAL_PSW_CP_SHUTTING_DOWN, |
| 500 | VAL_PSW_CP_SHUTDOWN_COMPLETE |
| 501 | } ValPswPsStackStatusT; |
| 502 | |
| 503 | /* VAL_PSW_OTASP_IND_MSG */ |
| 504 | typedef enum |
| 505 | { |
| 506 | VAL_PSW_OTASP_Connect, |
| 507 | VAL_PSW_OTA_Disconnect, |
| 508 | VAL_PSW_OTAPA_SessionStart, |
| 509 | VAL_PSW_OTAPA_SessionStop, |
| 510 | VAL_PSW_OTAPA_VerifyOK, |
| 511 | VAL_PSW_OTA_AkeyEx, |
| 512 | VAL_PSW_OTA_SPLUnlock, |
| 513 | VAL_PSW_OTA_SSDUpd, |
| 514 | VAL_PSW_OTA_NAMDownload, |
| 515 | VAL_PSW_OTA_MDNDownload, |
| 516 | VAL_PSW_OTA_IMSIDownload, |
| 517 | VAL_PSW_OTA_PRLDownload, |
| 518 | VAL_PSW_OTA_DataMaskCommitToNVRAM, |
| 519 | VAL_PSW_OTA_CommitOK, |
| 520 | VAL_PSW_OTA_ExcessSPCFailure, |
| 521 | VAL_PSW_OTA_AnalogCDMADownload |
| 522 | } ValPswOtaStatusIndT; |
| 523 | |
| 524 | typedef struct |
| 525 | { |
| 526 | kal_uint16 ServiceOption; |
| 527 | kal_bool ToNegotiate; |
| 528 | kal_uint8 forRc; |
| 529 | kal_uint8 revRc; |
| 530 | } ValPswUpdateServiceConfigMsgT; |
| 531 | |
| 532 | typedef struct |
| 533 | { |
| 534 | ValPswOtaStatusIndT status; |
| 535 | } ValPswOtaspIndMsgT; |
| 536 | |
| 537 | typedef struct |
| 538 | { |
| 539 | ValPswPsStackStatusT PsStackStatus; |
| 540 | } ValPswPsStackStatusMsgT; |
| 541 | |
| 542 | /*************************************************************************** |
| 543 | |
| 544 | EVENT NAME: VAL_PSW_EVT_FLASH_STATUS_MSG |
| 545 | DESCRIPTION: |
| 546 | This message is used by PSW to indicate whether flash succeeded or not. |
| 547 | MESSAGE TYPE: |
| 548 | PswFlashStatuMsgT - Indicates whether flash succeeded or not. |
| 549 | |
| 550 | ****************************************************************************/ |
| 551 | typedef struct |
| 552 | { |
| 553 | kal_bool Succeeded; |
| 554 | } ValPswFlashStatusMsgT; |
| 555 | |
| 556 | /*************************************************************************** |
| 557 | |
| 558 | EVENT NAME: VAL_PSW_EVT_SERVICE_MSG |
| 559 | DESCRIPTION: |
| 560 | This message is used by PSW to indicate whether we have service or not. |
| 561 | MESSAGE TYPE: |
| 562 | PswServiceMsgT - Indicates the type of service we have acquired. |
| 563 | |
| 564 | ****************************************************************************/ |
| 565 | |
| 566 | |
| 567 | /*---------------------------------------------------------------------------------------- |
| 568 | |Question: | |
| 569 | | what's the difference between PSW_NO_SERVICE and PSW_OOSA? | |
| 570 | ---------------------------------------------------------------------------------------| */ |
| 571 | |
| 572 | typedef enum |
| 573 | { |
| 574 | VAL_PSW_CDMA_SERVICE_TYPE, |
| 575 | VAL_PSW_AMPS_SERVICE_TYPE |
| 576 | } ValUIPswServiceT; |
| 577 | |
| 578 | typedef struct |
| 579 | { |
| 580 | ValPswServiceStatusT ServiceStatus; |
| 581 | ValUIPswServiceT ServiceType; |
| 582 | kal_uint8 Roam; /* ROAM Status */ |
| 583 | kal_uint16 Band; /* Current Operating Band */ |
| 584 | kal_uint16 Channel; /* Current Channel Number */ |
| 585 | kal_uint8 Mode; /* current mode: PCS/CellularAnalog */ |
| 586 | kal_uint8 Block; /* current CDMA block (if CDMA system) */ |
| 587 | kal_uint8 ServingSystem; /* Serving System/Block */ |
| 588 | kal_uint16 SysID; /* Last-Received System ID (sid) */ |
| 589 | kal_uint16 LocArea; /* Current Location Area ID (nid) */ |
| 590 | kal_uint16 PilotPn; /* PILOT_PN */ |
| 591 | kal_uint8 pRevInUse; /* CDMA Protocol Revision that MS uses */ |
| 592 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 593 | kal_uint16 RegZone; |
| 594 | #endif |
| 595 | } ValPswServiceMsgT; |
| 596 | |
| 597 | typedef struct |
| 598 | { |
| 599 | PswServiceT CallType; |
| 600 | PswServiceOptionT ServiceOption; |
| 601 | } ValPswEvtCallConnectedMsgT; |
| 602 | |
| 603 | typedef struct _VALRECORD_INDEX |
| 604 | { |
| 605 | kal_uint8* pByteOffset; |
| 606 | kal_uint16 bitOffset; |
| 607 | kal_uint16 recNum; |
| 608 | kal_uint16 recSize; |
| 609 | } VALRECORD_INDEX; |
| 610 | |
| 611 | typedef struct |
| 612 | { |
| 613 | kal_bool valid; |
| 614 | kal_uint16 PR_LIST_SIZEs; |
| 615 | kal_uint16 PR_LIST_IDs; |
| 616 | kal_bool PREF_ONLYs; |
| 617 | kal_uint8 DEF_ROAM_INDs; |
| 618 | kal_uint16 NUM_ACQ_RECSs; |
| 619 | kal_uint16 NUM_SYS_RECSs; |
| 620 | VALRECORD_INDEX acquireTableStart; |
| 621 | VALRECORD_INDEX systemTableStart; |
| 622 | kal_uint16 PR_LIST_CRCs; |
| 623 | kal_uint16 NUM_GEO_AREASs; |
| 624 | } VALPRL_HEADER; |
| 625 | |
| 626 | typedef struct |
| 627 | { |
| 628 | kal_uint32 RegId; |
| 629 | PswCallModeT CallMode; |
| 630 | PswRequestModeT RequestMode; |
| 631 | PswServiceOptionT ServiceOpt; |
| 632 | kal_uint8 NumDigits; |
| 633 | kal_uint8 DigitsP[32]; |
| 634 | PswServiceT ServiceType; |
| 635 | ValPswOtaspCodeT OtaspCode; |
| 636 | } ValInitiateCallMsgT; |
| 637 | |
| 638 | /* ETS Message Types |
| 639 | */ |
| 640 | typedef struct |
| 641 | { |
| 642 | RegIdT RegId; |
| 643 | kal_uint64 Akey; |
| 644 | kal_uint32 Checksum; |
| 645 | } ValChangeAkeyMsgT; |
| 646 | |
| 647 | typedef struct |
| 648 | { |
| 649 | NamNumber NamId; |
| 650 | PswNamChangedMsgT Nam; |
| 651 | } ValWriteNamMsgT; |
| 652 | |
| 653 | typedef struct |
| 654 | { |
| 655 | kal_bool PrlEnable; |
| 656 | } ValSetPrlEnableMsgT; |
| 657 | |
| 658 | typedef struct |
| 659 | { |
| 660 | NamNumber NamId; |
| 661 | } ValSetActiveNamMsgT; |
| 662 | |
| 663 | typedef struct |
| 664 | { |
| 665 | kal_uint64 Akey; |
| 666 | kal_uint32 Esn; |
| 667 | } ValGetAkeyChecksumMsgT; |
| 668 | |
| 669 | typedef struct |
| 670 | { |
| 671 | kal_uint8 numRetries; |
| 672 | kal_uint8 timeBetweenAttempts; |
| 673 | kal_uint8 timeBeforeAbort; |
| 674 | } ValAutoRetryEnableMsgT; |
| 675 | |
| 676 | typedef struct |
| 677 | { |
| 678 | kal_bool TxtMsgStatus; |
| 679 | kal_bool VoiceMsgStatus; |
| 680 | kal_bool RingAlertStatus; |
| 681 | } ValAlertStatusRspMsgT; |
| 682 | |
| 683 | typedef struct |
| 684 | { |
| 685 | kal_uint16 PrefHomeMOServiceOption; |
| 686 | kal_uint16 PrefHomeMTServiceOption; |
| 687 | kal_uint16 PrefRoamMOServiceOption; |
| 688 | } ValPrefVoiceServiceOptionT; |
| 689 | |
| 690 | typedef struct |
| 691 | { |
| 692 | kal_uint8 Response; |
| 693 | kal_uint8 Request; |
| 694 | } ValPswNwkRptCpResponseMsgT; |
| 695 | |
| 696 | /*for call control*/ |
| 697 | #ifdef FEATURE_UTK |
| 698 | typedef enum |
| 699 | { |
| 700 | CALL_CONTROL_ALLOW_NOT_MODIFY_MSG = 0, /* the UICC responds with "allowed, no modification"*/ |
| 701 | CALL_CONTROL_NOT_ALLOW_MSG, /*the UICC responds with "not allowed"*/ |
| 702 | CALL_CONTROL_ALLOW_MODIFY_NOT_BEYOND_MSG,/*the UICC responds with "allowed, with modifications", and the modified request is within the terminal's capabilities*/ |
| 703 | CALL_CONTROL_ALLOW_MODIFY_BEYOND_MSG, /*the UICC responds with "allowed, with modifications" , and the modified user request is beyond the terminal's capabilities,*/ |
| 704 | CALL_CONTROL_RESULT_NUM |
| 705 | } ValPswCallControlResultT; |
| 706 | typedef struct |
| 707 | { |
| 708 | ValPswCallControlResultT Result; |
| 709 | kal_bool AlphaPre; /*KAL_TRUE: alpha exist, KAL_FALSE: not exist*/ |
| 710 | ValUtkTextT Alpha; |
| 711 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 712 | kal_bool AddressPre; |
| 713 | ValUtkAddressT Address; |
| 714 | kal_bool CapCfgParamPre1; |
| 715 | ValUtkCapCfgParamT CapCfgParam1;/*Capability configuration parameters*/ |
| 716 | kal_bool SubaddressPre; |
| 717 | ValUtkSubaddressT Subaddress; |
| 718 | kal_bool BC_RepeatIndPresent; |
| 719 | ValUtkBC_RepeatIndT BC_RepeatIndTLV; |
| 720 | kal_bool CapCfgParamPre2; |
| 721 | ValUtkCapCfgParamT CapCfgParam2;/*Capability configuration parameters*/ |
| 722 | #endif |
| 723 | } ValPswEvtCallControlRspMsgT; |
| 724 | typedef struct |
| 725 | { |
| 726 | RegIdT RegId; /* the client ID */ |
| 727 | PswCallModeT CallMode; /* Voice call type */ |
| 728 | PswRequestModeT RequestMode; /* requested call type - cast to PswRequestModeT */ |
| 729 | PswServiceOptionT ServiceOption; /* requested service option - cast to PswServiceOptionT */ |
| 730 | ValUtkAddressT Address; |
| 731 | PswServiceT ServiceType; /* cast to PswServiceT */ |
| 732 | ValPswOtaspCodeT otasp_code; |
| 733 | }VapPswInitiateCallParaT; |
| 734 | |
| 735 | #endif |
| 736 | |
| 737 | typedef struct |
| 738 | { |
| 739 | kal_bool (*CheckFunc)(kal_char*) ; |
| 740 | } ValDialNumCheckRegMsgT; |
| 741 | #ifdef MTK_DEV_C2K_IRAT |
| 742 | typedef enum |
| 743 | { |
| 744 | VAL_BOOT_UP_NORMAL = 0, |
| 745 | VAL_BOOT_UP_EXCEPTION, |
| 746 | VAL_BOOT_UP_NUM |
| 747 | } ValBootUpModeE; |
| 748 | #endif |
| 749 | |
| 750 | #ifdef MTK_CBP_REL_OPTIMIZE |
| 751 | typedef struct |
| 752 | { |
| 753 | kal_bool isMoCall; /* to indicate the released call is MO call or MT call |
| 754 | TRUE: MO call |
| 755 | FALSE:MT call |
| 756 | */ |
| 757 | |
| 758 | ValPswCallEndReasonT eReason;/* to indicate the release reason */ |
| 759 | }ValPswVsRelIndMsgT; |
| 760 | #endif |
| 761 | |
| 762 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 763 | /* Enhanced Roaming Indicators (ERI) */ |
| 764 | #define VAL_ERI_VERSION_WIDTH 16 |
| 765 | #define VAL_ERI_NUM_ENTRIES_WIDTH 6 |
| 766 | #define VAL_ERI_TYPE_WIDTH 3 |
| 767 | #define VAL_NUM_ICON_IMAGES_WIDTH 4 |
| 768 | #define VAL_ICON_IMAGE_TYPE_WIDTH 3 |
| 769 | #define VAL_ERI_INDICATOR_ID_WIDTH 8 |
| 770 | #define VAL_ERI_ICON_IMAGE_ID_WIDTH 4 |
| 771 | #define VAL_ERI_ICON_MODE_WIDTH 2 |
| 772 | #define VAL_ERI_CALL_PROMPT_ID_WIDTH 2 |
| 773 | #define VAL_ERI_ALERT_CALL_COUNTER_ID_WIDTH 3 |
| 774 | #define VAL_ERI_CHAR_ENCODING_TYPE_WIDTH 5 |
| 775 | #define VAL_ERI_TEXT_LENGTH_WIDTH 8 |
| 776 | #define VAL_ERI_RESERVED_FOR_CALL_PROMPT_TABLE_WIDTH 96 |
| 777 | |
| 778 | #define VAL_MAX_ERI_TEXT_LENGTH 49 |
| 779 | #define VAL_MAX_ERI_ENTRIES 30 |
| 780 | |
| 781 | /* Enhanced Roaming Indicator Parms */ |
| 782 | typedef struct |
| 783 | { |
| 784 | kal_bool valid_entry; /* Indicates Valid Entry */ |
| 785 | kal_uint8 indicator_id; |
| 786 | kal_uint8 icon_image_id; |
| 787 | kal_uint8 icon_mode; |
| 788 | kal_uint8 call_prompt_id; |
| 789 | kal_uint8 alert_call_counter_id; |
| 790 | kal_uint8 char_encoding_type; |
| 791 | kal_uint8 text_length; |
| 792 | kal_uint8 text[VAL_MAX_ERI_TEXT_LENGTH]; |
| 793 | }ValRoamIndicatorTable; |
| 794 | |
| 795 | typedef struct |
| 796 | { |
| 797 | kal_uint16 version_number; |
| 798 | kal_uint8 num_entries; |
| 799 | kal_uint8 eriType; |
| 800 | kal_uint8 num_icon_images; |
| 801 | kal_uint8 icon_image_type; |
| 802 | ValRoamIndicatorTable table[VAL_MAX_ERI_ENTRIES] ; |
| 803 | }ValEriFileContents; |
| 804 | #endif |
| 805 | /*=========================================================================== |
| 806 | FUNCTION API |
| 807 | ===========================================================================*/ |
| 808 | |
| 809 | /*=========================================================================== |
| 810 | |
| 811 | FUNCTION ValPswInit |
| 812 | |
| 813 | DESCRIPTION |
| 814 | Initialize the Val PSW module. |
| 815 | |
| 816 | DEPENDENCIES |
| 817 | None |
| 818 | |
| 819 | RETURN VALUE |
| 820 | None |
| 821 | |
| 822 | ===========================================================================*/ |
| 823 | void ValPswInit( void ); |
| 824 | |
| 825 | /*=========================================================================== |
| 826 | |
| 827 | FUNCTION ValPswRegister |
| 828 | |
| 829 | DESCRIPTION |
| 830 | register ui to the VAL PSW module |
| 831 | |
| 832 | DEPENDENCIES |
| 833 | None |
| 834 | |
| 835 | RETURN VALUE |
| 836 | register id |
| 837 | |
| 838 | ===========================================================================*/ |
| 839 | RegIdT ValPswRegister( ValEventFunc CallBack ); |
| 840 | |
| 841 | /*=========================================================================== |
| 842 | |
| 843 | FUNCTION ValPswUnregister |
| 844 | |
| 845 | DESCRIPTION |
| 846 | Deregister ui to the VAL PSW module |
| 847 | |
| 848 | DEPENDENCIES |
| 849 | None |
| 850 | |
| 851 | RETURN VALUE |
| 852 | None |
| 853 | |
| 854 | ===========================================================================*/ |
| 855 | void ValPswUnregister( RegIdT RegId ); |
| 856 | |
| 857 | /*************************************************************************** |
| 858 | FUNCTION NAME: ValPswProtocolStackEnable |
| 859 | DESCRIPTION: |
| 860 | Enables or disables the protocol stack. |
| 861 | |
| 862 | PARAMETERS: |
| 863 | Enable - Whether to enable or disable the protocol stack. |
| 864 | RETURNS: |
| 865 | None. |
| 866 | ***************************************************************************/ |
| 867 | void ValPswProtocolStackEnable( kal_bool Enable ); |
| 868 | |
| 869 | /***************************************************************************** |
| 870 | |
| 871 | FUNCTION NAME: ValPswChangeServiceOption |
| 872 | DESCRIPTION: Sends a message to PSW to change the prefered service option |
| 873 | PARAMETERS: ServiceOption, |
| 874 | ToNegotiate - KAL_TRUE enables negotiation |
| 875 | forRc, |
| 876 | revRc |
| 877 | RETURNS: None |
| 878 | |
| 879 | *****************************************************************************/ |
| 880 | void ValPswChangeServiceOption( kal_uint16 ServiceOption, |
| 881 | kal_bool ToNegotiate, |
| 882 | kal_uint8 forRc, |
| 883 | kal_uint8 revRc ); |
| 884 | kal_bool ValPswRegDataDialNumCheckFunc(kal_bool (*CheckFunc) (kal_char*)); |
| 885 | void ValPswGetMobileId(void); |
| 886 | |
| 887 | /*************************************************************************** |
| 888 | FUNCTION NAME: ValPswInitiateCall |
| 889 | DESCRIPTION: |
| 890 | Originates a phone call. |
| 891 | PARAMETERS: |
| 892 | RegId - the client ID |
| 893 | CallMode - voice call type (e.g. Normal, E911, OTASP, WPS) |
| 894 | RequestMode - requested call type |
| 895 | NumDigits - number of digits to be dialled |
| 896 | DigitsP - CP_MAX_CALLING_PARTY_NUMBER_SIZE + 1 array of ascii digits, |
| 897 | null terminated string |
| 898 | ServiceType - call type (e.g. voice, async, fax, hspd, SMS, loopback) |
| 899 | otasp_code - target system for OTASP Orig. |
| 900 | RETURNS: |
| 901 | True if the message for originating call is sent to PSW |
| 902 | ***************************************************************************/ |
| 903 | kal_bool ValPswInitiateCall(RegIdT RegId, /* the client ID */ |
| 904 | PswRequestModeT RequestMode, /* requested call type*/ |
| 905 | PswServiceOptionT SO, /* requested service option */ |
| 906 | kal_bool PrivacyMode, /* voice privacy indicator */ |
| 907 | kal_bool DigitMode, /* digit encoding indicator */ |
| 908 | PswNumberTypeT NumberType, /* type of number */ |
| 909 | PswNumberPlanT NumberPlan, /* numbering plan */ |
| 910 | kal_uint8 NumDigits, /* number of digits to be dialled */ |
| 911 | kal_uint8* DigitsP, /* CP_MAX_CALLING_PARTY_NUMBER_SIZE + 1 array */ |
| 912 | /* of ascii digits, null terminated string */ |
| 913 | PswServiceT SrvTyp, |
| 914 | kal_bool E911, |
| 915 | kal_bool Otasp, |
| 916 | ValPswOtaspCodeT OtaspCode ); |
| 917 | |
| 918 | /*************************************************************************** |
| 919 | FUNCTION NAME: ValPswAnswerCall |
| 920 | DESCRIPTION: |
| 921 | Answer the incoming call. |
| 922 | |
| 923 | PARAMETERS: |
| 924 | RegId - the client ID. |
| 925 | |
| 926 | RETURNS: |
| 927 | True if the message for answering call is sent to PSW |
| 928 | ***************************************************************************/ |
| 929 | kal_bool ValPswAnswerCall( RegIdT RegId ); |
| 930 | |
| 931 | /*************************************************************************** |
| 932 | FUNCTION NAME: ValPswHangupCall |
| 933 | DESCRIPTION: |
| 934 | End the current call. |
| 935 | PARAMETERS: |
| 936 | RegId - the client ID. |
| 937 | RETURNS: |
| 938 | True if the Nam could be written. |
| 939 | ***************************************************************************/ |
| 940 | kal_bool ValPswHangupCall( RegIdT RegId ); |
| 941 | |
| 942 | /*************************************************************************** |
| 943 | FUNCTION NAME: ValPswHookFlash |
| 944 | DESCRIPTION: |
| 945 | Sends a hookflash message with parameters to the base station |
| 946 | (CDMA 2000 Layer 3 2.7.4). |
| 947 | VAL_PSW_FLASH_STATUS_MSG returns the status. |
| 948 | PARAMETERS: |
| 949 | RegId - the client ID |
| 950 | KeypadFacilityP - the information to be sent in the message "flash with information" |
| 951 | RETURNS |
| 952 | True if the message for ending call is sent to PSW |
| 953 | ***************************************************************************/ |
| 954 | kal_bool ValPswHookFlash( RegIdT RegId, /* the client ID */ |
| 955 | kal_uint8* KeypadFacilityP ); /* Incl NULL terminator */ |
| 956 | |
| 957 | |
| 958 | /*************************************************************************** |
| 959 | FUNCTION NAME: ValPswSendBurstDTMF |
| 960 | DESCRIPTION: |
| 961 | Send burst DTMF tone to the base station. |
| 962 | PARAMETERS: |
| 963 | RegId - the client ID. |
| 964 | NumDigits - Number of digits in the Digits array. |
| 965 | DtmfOnLength - Length each tone/digit should be on for. |
| 966 | DtmfOffLength - Length the tone generator should be off for between tones |
| 967 | Digits - Which digits should be sent. |
| 968 | RETURNS: |
| 969 | True if the message for playing burst DTMF is sent to PSW |
| 970 | ***************************************************************************/ |
| 971 | kal_bool ValPswSendBurstDTMF( RegIdT RegId, |
| 972 | kal_uint8 NumDigits, |
| 973 | kal_uint8 DtmfOnLength, |
| 974 | kal_uint8 DtmfOffLength, |
| 975 | kal_uint8* DigitsP ); |
| 976 | |
| 977 | /*************************************************************************** |
| 978 | FUNCTION NAME: ValPswSendContDTMFOn |
| 979 | DESCRIPTION: |
| 980 | Send a continuous DTMF tone to the base station. |
| 981 | PARAMETERS: |
| 982 | RegId - the client ID. |
| 983 | Digit - Which digit should be sent. |
| 984 | RETURNS: |
| 985 | True if the message for playing continual DTMF is sent to PSW |
| 986 | ***************************************************************************/ |
| 987 | kal_bool ValPswSendContDTMFOn( RegIdT RegId, |
| 988 | kal_uint8 Digit ); |
| 989 | |
| 990 | /*************************************************************************** |
| 991 | FUNCTION NAME: ValPswSendContDTMFOff |
| 992 | DESCRIPTION: |
| 993 | Stop sending a continuous DTMF tone to the base station. |
| 994 | PARAMETERS: |
| 995 | RegId - the client ID. |
| 996 | RETURNS: |
| 997 | True if the Nam could be written. |
| 998 | ***************************************************************************/ |
| 999 | kal_bool ValPswSendContDTMFOff(); |
| 1000 | |
| 1001 | kal_bool ValContinualDtmfStatus(void); |
| 1002 | |
| 1003 | /*************************************************************************** |
| 1004 | FUNCTION NAME: ValPswReadNam |
| 1005 | DESCRIPTION: |
| 1006 | Fills in the given NAM structure with the NAM information |
| 1007 | ---------------------------------------------------------------------------------------- |
| 1008 | | The procedure is as follows: | |
| 1009 | | 1. VAL sends message to get NAM and return. | |
| 1010 | | 2. After getting NAM PSW sends a message to VAL. | |
| 1011 | | 3. VAL forwords this message to UI | |
| 1012 | ---------------------------------------------------------------------------------------| |
| 1013 | PARAMETERS: |
| 1014 | RegId - the client ID. |
| 1015 | NamNumber - Number of the NAM requested starting at NAM 0. |
| 1016 | RETURNS: |
| 1017 | True if the message for stopping burst DTMF is sent to PSW |
| 1018 | ***************************************************************************/ |
| 1019 | kal_bool ValPswReadNam( RegIdT RegId, |
| 1020 | NamNumber NamId ); |
| 1021 | |
| 1022 | /*************************************************************************** |
| 1023 | FUNCTION NAME: ValPswWriteNam |
| 1024 | DESCRIPTION: |
| 1025 | Writes the given NAM structure. |
| 1026 | ---------------------------------------------------------------------------------------- |
| 1027 | |Attention: | |
| 1028 | | The procedure is as follows: | |
| 1029 | | 1. VAL sends message to update Akey and return. | |
| 1030 | | 2. After updating Akey PSW sends a message to VAL. | |
| 1031 | | 3. VAL forwards this message to UI | |
| 1032 | ---------------------------------------------------------------------------------------| |
| 1033 | PARAMETERS: |
| 1034 | RegId - the client ID. |
| 1035 | NamP - a pointer to the NAM structure that needs to be filled in. |
| 1036 | |
| 1037 | RETURNS: |
| 1038 | True if the Nam is read. |
| 1039 | ***************************************************************************/ |
| 1040 | kal_bool ValPswWriteNam( RegIdT RegId, |
| 1041 | PswNamChangedMsgT* NamP ); |
| 1042 | |
| 1043 | void ValPswGetActiveNam( void ); |
| 1044 | |
| 1045 | void ValPswSetActiveNam( NamNumber NamId ); |
| 1046 | |
| 1047 | void ValPswCPPowerCtrl (kal_bool PowerUpCtrl); |
| 1048 | |
| 1049 | #ifdef MTK_DEV_C2K_IRAT |
| 1050 | kal_bool ValPswGetPowerCycleInfo(void); |
| 1051 | kal_bool ValPswGetPowerOnNeedInfo(void); |
| 1052 | void ValPswSetPowerCycleInfo(kal_bool Needed); |
| 1053 | void ValPswSetPowerOnNeedInfo(kal_bool Needed); |
| 1054 | #endif |
| 1055 | |
| 1056 | #if 0 |
| 1057 | /* under construction !*/ |
| 1058 | #endif |
| 1059 | |
| 1060 | /*************************************************************************** |
| 1061 | FUNCTION NAME: |
| 1062 | ValPswGetAKeyChecksum |
| 1063 | |
| 1064 | DESCRIPTION: |
| 1065 | Send a message to the protocol stack to get the Akey Checksum. |
| 1066 | This is necessary to provide the UI with a mechanism to check the checksum |
| 1067 | input by the user versus the calculated checksum produced by this interface. |
| 1068 | |
| 1069 | PARAMETERS: |
| 1070 | Akey - 20 digit Authentication KEY |
| 1071 | Esn - Electronic Serial Number |
| 1072 | |
| 1073 | RETURN VALUE: |
| 1074 | <NONE> |
| 1075 | ***************************************************************************/ |
| 1076 | void ValPswGetAKeyChecksum( kal_uint64 AKey, |
| 1077 | kal_uint32 Esn ); |
| 1078 | |
| 1079 | /*************************************************************************** |
| 1080 | FUNCTION NAME: ValPswChangeAKey |
| 1081 | DESCRIPTION: |
| 1082 | Change the Akey and Akey checksum |
| 1083 | ---------------------------------------------------------------------------------------- |
| 1084 | |Attention: | |
| 1085 | | The procedure is as follows: | |
| 1086 | | 1. VAL sends message to write NAM and return. | |
| 1087 | | 2. After writting NAM PSW sends a message to VAL. | |
| 1088 | | 3. VAL forwords this message to UI | |
| 1089 | ---------------------------------------------------------------------------------------| |
| 1090 | PARAMETERS: |
| 1091 | RegId - the client ID. |
| 1092 | Akey - The new Akey. |
| 1093 | Checksum - The new Checksum that corresponds to the Akey and ESN combo. |
| 1094 | RETURNS: |
| 1095 | True if the Nam is written. |
| 1096 | ***************************************************************************/ |
| 1097 | kal_bool ValPswChangeAKey( RegIdT RegId, |
| 1098 | kal_uint64 Akey, |
| 1099 | kal_uint32 Checksum ); |
| 1100 | |
| 1101 | /*************************************************************************** |
| 1102 | FUNCTION NAME: |
| 1103 | ValPswSetPrlEnable |
| 1104 | |
| 1105 | DESCRIPTION: |
| 1106 | Send a message to the protocol stack to enable/disable Preferred Roaming List(s). |
| 1107 | |
| 1108 | PARAMETERS: |
| 1109 | Nam1PrlEnable - KAL_TRUE to enable PRL for NAM 1 |
| 1110 | Nam2PrlEnable - KAL_TRUE to enable PRL for NAM 2 |
| 1111 | |
| 1112 | RETURN VALUE: |
| 1113 | <NONE> |
| 1114 | ***************************************************************************/ |
| 1115 | void ValPswSetPrlEnable( kal_bool PrlEnable ); |
| 1116 | |
| 1117 | /*=========================================================================== |
| 1118 | |
| 1119 | FUNCTION ValPswDeliverMail |
| 1120 | |
| 1121 | DESCRIPTION |
| 1122 | Callback to support CP messages from PSW. |
| 1123 | |
| 1124 | DEPENDENCIES |
| 1125 | None |
| 1126 | |
| 1127 | RETURN VALUE |
| 1128 | kal_boolean indicating whether the message was handled. |
| 1129 | |
| 1130 | ===========================================================================*/ |
| 1131 | kal_bool ValPswDeliverMail( kal_uint32 msg_id, |
| 1132 | void* msg_buffer, |
| 1133 | kal_uint32 msg_size ); |
| 1134 | |
| 1135 | /*=========================================================================== |
| 1136 | |
| 1137 | FUNCTION ValPswE911Disable |
| 1138 | |
| 1139 | DESCRIPTION: |
| 1140 | Send a message to the protocol stack to disable Emergency 911 Mode. |
| 1141 | |
| 1142 | PARAMETERS: |
| 1143 | <NONE> |
| 1144 | |
| 1145 | RETURN VALUE: |
| 1146 | <NONE> |
| 1147 | ===========================================================================*/ |
| 1148 | void ValPswE911Disable( void ); |
| 1149 | void ValPswE911Enable( void ); |
| 1150 | /*=========================================================================== |
| 1151 | |
| 1152 | FUNCTION ValTstModeSetMobPRev |
| 1153 | |
| 1154 | DESCRIPTION: |
| 1155 | Send a message to the protocol stack to force the Mobile PREV to a certain revision. |
| 1156 | |
| 1157 | PARAMETERS: |
| 1158 | <kal_uint8 PRev> |
| 1159 | |
| 1160 | RETURN VALUE: |
| 1161 | <NONE> |
| 1162 | ===========================================================================*/ |
| 1163 | void ValTstModeSetMobPRev(kal_uint8 p_rev); |
| 1164 | |
| 1165 | #ifdef MTK_CBP |
| 1166 | /*************************************************************************** |
| 1167 | FUNCTION NAME: ValPswModeSetMobPRev() |
| 1168 | |
| 1169 | DESCRIPTION: the API to set MS Prev Supported in the Nam |
| 1170 | |
| 1171 | PARAMETERS: p_rev |
| 1172 | |
| 1173 | RETURNS: void |
| 1174 | ***************************************************************************/ |
| 1175 | void ValPswModeSetMobPRev(kal_uint8 uPrev); |
| 1176 | |
| 1177 | #endif |
| 1178 | |
| 1179 | /*=========================================================================== |
| 1180 | |
| 1181 | FUNCTION ValPswAutoRetryEnable |
| 1182 | |
| 1183 | DESCRIPTION: |
| 1184 | Send a message to the protocol stack to Enable Auto Retry and set the retry |
| 1185 | attempt parameters. |
| 1186 | |
| 1187 | PARAMETERS: |
| 1188 | numRetries - number of times to attempt to retry origination before |
| 1189 | aborting |
| 1190 | timeBetweenAttempts - time (in seconds) between retries |
| 1191 | timeBeforeAbort - total time (in seconds) between original origination |
| 1192 | request and abort. |
| 1193 | |
| 1194 | NOTE: Abortion is determined by whichever comes first - number of retries |
| 1195 | reaches numRetries OR time from original request reaches timeBeforeAbort. |
| 1196 | |
| 1197 | RETURN VALUE: |
| 1198 | <NONE> |
| 1199 | ===========================================================================*/ |
| 1200 | void ValPswAutoRetryEnable( kal_uint8 numAttempts, |
| 1201 | kal_uint8 timeBetweenAttempts, |
| 1202 | kal_uint8 timeBeforeAbort ); |
| 1203 | |
| 1204 | /*=========================================================================== |
| 1205 | FUNCTION |
| 1206 | ValPswAutoRetryDisable |
| 1207 | |
| 1208 | DESCRIPTION: |
| 1209 | Send a message to the protocol stack to disable Auto Retry |
| 1210 | |
| 1211 | PARAMETERS: |
| 1212 | <NONE> |
| 1213 | |
| 1214 | RETURN VALUE: |
| 1215 | <NONE> |
| 1216 | ===========================================================================*/ |
| 1217 | void ValPswAutoRetryDisable( void ); |
| 1218 | |
| 1219 | /*=========================================================================== |
| 1220 | FUNCTION |
| 1221 | ValPswAutoRetryDisable |
| 1222 | |
| 1223 | DESCRIPTION: |
| 1224 | Check the Silent Retry status. |
| 1225 | |
| 1226 | PARAMETERS: |
| 1227 | <NONE> |
| 1228 | |
| 1229 | RETURN VALUE: |
| 1230 | Boolean indicating whether Silent Retry is enabled. |
| 1231 | ===========================================================================*/ |
| 1232 | kal_bool ValPswIsSilentRetryEnabled( void ); |
| 1233 | |
| 1234 | /*=========================================================================== |
| 1235 | FUNCTION |
| 1236 | ValPswSetPrivacyMode |
| 1237 | |
| 1238 | DESCRIPTION: |
| 1239 | Enable/Disable Call Privacy Mode. |
| 1240 | |
| 1241 | PARAMETERS: |
| 1242 | Mode - call privacy mode enable(KAL_TRUE)/disable(KAL_FALSE) |
| 1243 | |
| 1244 | RETURNS: |
| 1245 | <NONE> |
| 1246 | ===========================================================================*/ |
| 1247 | void ValPswSetPrivacyMode( kal_bool Mode ); |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | /*=========================================================================== |
| 1252 | FUNCTION |
| 1253 | ValPswSetDDTMMode |
| 1254 | |
| 1255 | DESCRIPTION: |
| 1256 | Enable/Disable DDTM Mode. |
| 1257 | |
| 1258 | PARAMETERS: |
| 1259 | Mode - DDTM mode enable(TRUE)/disable(FALSE) |
| 1260 | |
| 1261 | RETURNS: |
| 1262 | <NONE> |
| 1263 | ===========================================================================*/ |
| 1264 | |
| 1265 | void ValPswSetDDTMMode( kal_bool Mode ); |
| 1266 | |
| 1267 | |
| 1268 | /*=========================================================================== |
| 1269 | FUNCTION |
| 1270 | ValPswServiceOption |
| 1271 | |
| 1272 | DESCRIPTION: |
| 1273 | Get the current service option |
| 1274 | |
| 1275 | PARAMETERS: |
| 1276 | <NONE> |
| 1277 | |
| 1278 | RETURN VALUE: |
| 1279 | the current service option |
| 1280 | ===========================================================================*/ |
| 1281 | PswServiceOptionT ValPswServiceOption( void ); |
| 1282 | #if (defined(__TC10__) && defined(MTK_CBP)) |
| 1283 | |
| 1284 | void ValPswSetServiceOption( PswServiceOptionT SO ); |
| 1285 | |
| 1286 | #endif |
| 1287 | |
| 1288 | /*=========================================================================== |
| 1289 | FUNCTION |
| 1290 | ValPswServiceType |
| 1291 | |
| 1292 | DESCRIPTION: |
| 1293 | Send a message to the protocol stack to disable Auto Retry |
| 1294 | |
| 1295 | PARAMETERS: |
| 1296 | <NONE> |
| 1297 | |
| 1298 | RETURN VALUE: |
| 1299 | the current Service Type |
| 1300 | ===========================================================================*/ |
| 1301 | PswServiceT ValPswServiceType( void ); |
| 1302 | |
| 1303 | /*=========================================================================== |
| 1304 | |
| 1305 | FUNCTION ValPswLocationSvcCfg |
| 1306 | |
| 1307 | DESCRIPTION |
| 1308 | Set location privacy flag in loc_svc |
| 1309 | |
| 1310 | DEPENDENCIES |
| 1311 | Mode - KAL_TRUE if privacy is on |
| 1312 | |
| 1313 | RETURN VALUE |
| 1314 | void |
| 1315 | |
| 1316 | ===========================================================================*/ |
| 1317 | extern void ValPswLocationSvcCfg( kal_bool Mode ); |
| 1318 | |
| 1319 | /*=========================================================================== |
| 1320 | |
| 1321 | FUNCTION ValHrpPswProtocolStackEnable |
| 1322 | |
| 1323 | DESCRIPTION |
| 1324 | |
| 1325 | DEPENDENCIES |
| 1326 | |
| 1327 | RETURN VALUE |
| 1328 | |
| 1329 | ===========================================================================*/ |
| 1330 | void ValHrpPswProtocolStackEnable(kal_bool enable); |
| 1331 | |
| 1332 | /*=========================================================================== |
| 1333 | |
| 1334 | FUNCTION ValPswIsEmergencyCall |
| 1335 | |
| 1336 | DESCRIPTION |
| 1337 | Check to see if it's an emergency call. |
| 1338 | |
| 1339 | DEPENDENCIES |
| 1340 | Valid input parameters. |
| 1341 | |
| 1342 | RETURN VALUE |
| 1343 | kal_bool - KAL_TRUE : if in the table; KAL_FALSE : otherwise |
| 1344 | |
| 1345 | ===========================================================================*/ |
| 1346 | kal_bool ValPswIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP); |
| 1347 | kal_bool ValPswAndUimIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP); |
| 1348 | #ifdef MTK_CBP |
| 1349 | kal_bool ValNumIsEmergencyCall(kal_uint8 NumDigits, kal_uint8 *DigitsP); |
| 1350 | #endif |
| 1351 | |
| 1352 | void ValPswCustomFeature(kal_uint32 MsgCustomFeature); |
| 1353 | void ValPswHangupDataCall(RegIdT RegId); |
| 1354 | void ValPswDataCallPreArrange(RegIdT RegId,DsPreArangT paType); |
| 1355 | /*=========================================================================== |
| 1356 | FUNCTION ValGetAlertStatusMsg |
| 1357 | DESCRIPTION UTS Alert Status API support. |
| 1358 | DEPENDENCIES ValGetAlertStatusMsgT* MsgDataP |
| 1359 | RETURN VALUE None |
| 1360 | ===========================================================================*/ |
| 1361 | void ValGetAlertStatusMsg(ValGetAlertStatusMsgT* MsgDataP); |
| 1362 | |
| 1363 | /*************************************************************************** |
| 1364 | FUNCTION NAME: ValPswPowerCycle |
| 1365 | |
| 1366 | DESCRIPTION: Execute virtual power down then power up |
| 1367 | |
| 1368 | PARAMETERS: None |
| 1369 | |
| 1370 | RETURNS: kal_uint8 |
| 1371 | ***************************************************************************/ |
| 1372 | void ValPswPowerCycle(void); |
| 1373 | kal_int32 PswFGetTimeZone(void); |
| 1374 | /*for call control*/ |
| 1375 | #ifdef FEATURE_UTK |
| 1376 | /*=========================================================================== |
| 1377 | FUNCTION ValPswSetCallControl |
| 1378 | |
| 1379 | DESCRIPTION: Set the call control enable or disable flag; |
| 1380 | |
| 1381 | DEPENDENCIES: |
| 1382 | flag - true means user enable call control, false means user disable call control. |
| 1383 | RETURN VALUE: |
| 1384 | null |
| 1385 | ===========================================================================*/ |
| 1386 | void ValPswSetCallControl(kal_bool flag); |
| 1387 | /*=========================================================================== |
| 1388 | FUNCTION ValPswSetCallControl |
| 1389 | |
| 1390 | DESCRIPTION: get the call control enable or disable flag; |
| 1391 | |
| 1392 | DEPENDENCIES: |
| 1393 | null |
| 1394 | RETURN VALUE: |
| 1395 | KAL_TRUE or KAL_FALSE |
| 1396 | ===========================================================================*/ |
| 1397 | kal_bool ValPswGetCallControl(void); |
| 1398 | |
| 1399 | /*=========================================================================== |
| 1400 | FUNCTION ValPswProCallControlRsp |
| 1401 | |
| 1402 | DESCRIPTION: process the call control rsp |
| 1403 | |
| 1404 | DEPENDENCIES: |
| 1405 | null |
| 1406 | RETURN VALUE: |
| 1407 | KAL_TRUE or KAL_FALSE |
| 1408 | ===========================================================================*/ |
| 1409 | void ValPswProCallControlRsp(ValUtkCallControlIndT* pCallControl ); |
| 1410 | |
| 1411 | /*************************************************************************** |
| 1412 | FUNCTION NAME: ValPswGetLocationInfo |
| 1413 | |
| 1414 | DESCRIPTION: Return the Current Local Information in PSW. |
| 1415 | |
| 1416 | PARAMETERS: |
| 1417 | ValUtkLocInfoCmdQualT Type, |
| 1418 | ValUtkLocalInfoT * Info |
| 1419 | |
| 1420 | RETURNS: ValUtkGenResultT |
| 1421 | ***************************************************************************/ |
| 1422 | ValUtkGenResultT ValPswGetLocationInfo( ValUtkLocInfoCmdQualT Type, ValUtkLocalInfoT * Info); |
| 1423 | |
| 1424 | /*************************************************************************** |
| 1425 | FUNCTION NAME: ValPswGetProRevInUse |
| 1426 | |
| 1427 | DESCRIPTION: Return the Current protocol revision in use |
| 1428 | |
| 1429 | PARAMETERS: |
| 1430 | None |
| 1431 | |
| 1432 | RETURNS: kal_uint8 |
| 1433 | ***************************************************************************/ |
| 1434 | kal_uint8 ValPswGetProRevInUse(void); |
| 1435 | |
| 1436 | /*=========================================================================== |
| 1437 | FUNCTION: ValPswGetAccInfo() |
| 1438 | DESCRIPTION: Transfer Location format from structure to array. |
| 1439 | DEPENDENCIES: None |
| 1440 | RETURN VALUE None |
| 1441 | ===========================================================================*/ |
| 1442 | void ValPswGetAccInfo(kal_uint8 *AccessInfo); |
| 1443 | #endif |
| 1444 | |
| 1445 | kal_bool ValGetNeedSleepReqFlag(void); |
| 1446 | void ValSetNeedSleepReqFlag(kal_bool needCall); |
| 1447 | kal_int32 ValPswGetTimeZone(void); |
| 1448 | #ifdef SYS_OPTION_ENHANCEDAT |
| 1449 | kal_int32 ValATPswGetTimeZone(void); /* Time Zone -47~48 (uint 30 minutes) */ |
| 1450 | kal_bool ValPswGetVP(void); |
| 1451 | kal_int8 ValATGetLtm(void); |
| 1452 | kal_uint8 ValATGetDaylt(void); |
| 1453 | #endif |
| 1454 | void ValSetATUimState(ATUimStateT stat); |
| 1455 | #ifdef MTK_CBP |
| 1456 | ATUimStateT ValMapCardStatusToATUimState(kal_uint32 uimCardType); |
| 1457 | #endif |
| 1458 | void ValDeepSleepRequest( kal_int32 SleepDuration); |
| 1459 | ATUimStateT ValGetATUimState(void); |
| 1460 | #ifdef MTK_CBP |
| 1461 | extern kal_bool EpofReceived; |
| 1462 | void ValFlightModeSleep(kal_int32 SleepDuration); |
| 1463 | #endif |
| 1464 | #ifdef MTK_DEV_C2K_IRAT |
| 1465 | extern kal_bool CcIrqClosed; |
| 1466 | extern kal_bool ValIsDefaultEmdstatusFlowVersion(void); |
| 1467 | extern void ValCssCsRegStatusNotifyIndMsg(ValCssCsRegStatusNotifyIndMsgT* csRegStatusP); |
| 1468 | #endif |
| 1469 | |
| 1470 | #ifdef MTK_CBP |
| 1471 | ATUimStateT ValATConvertUimStateForApUse(void); |
| 1472 | #endif |
| 1473 | CTATUimStateT ATtoCTUimState(ATUimStateT uimState); |
| 1474 | void SendSIMSTToAtc(ATUimStateT uimState); |
| 1475 | #if 0 |
| 1476 | /* under construction !*/ |
| 1477 | #endif |
| 1478 | #ifdef MTK_DEV_FACTORY_MODE |
| 1479 | void SendESIMSToAtc(ATUimStateT uimState); |
| 1480 | #endif |
| 1481 | #ifdef MTK_CBP |
| 1482 | void SendEvocdToAtc (EvocdCodec codec); |
| 1483 | #endif |
| 1484 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 1485 | ValCarrierIdEnumT ValGetCarrierIdFromMccMnc(void); |
| 1486 | #endif |
| 1487 | kal_uint32 TimeDivide(kal_uint32 Second, kal_uint32 value, kal_uint32 *returnValue); |
| 1488 | kal_uint8 ValGetMonthFromDays(kal_uint32 days,kal_uint32 year, kal_uint32 *returnDays); |
| 1489 | void GetDateFromSeconds (kal_uint32 totalSeconds, kal_uint32* yearP, kal_uint32* dayP, kal_uint32* monthP); |
| 1490 | void ValMccToAsc(kal_uint8 *buf, kal_uint16 mcc); |
| 1491 | void ValMncToAsc(kal_uint8 *buf, kal_uint16 mnc); |
| 1492 | void ValMin2ToAsc(kal_uint8 *buf, kal_uint16 area_code); |
| 1493 | void ValMin1ToAsc(kal_uint8 *buf, kal_uint32 phone_no); |
| 1494 | kal_uint8 ValAscToMnc(kal_uint8 *buf); |
| 1495 | kal_uint16 ValAscToMcc(kal_uint8 *buf); |
| 1496 | kal_uint16 ValAscToMin2(kal_uint8 *buf); |
| 1497 | kal_uint32 ValAscToMin1(kal_uint8 *buf); |
| 1498 | kal_int32 text_to_7bit_char_stream (kal_uint8* p_dest, const kal_uint8* p_src, kal_int32 numFields); |
| 1499 | void ValCssMarkCurrent1XSystemAsNegative(CssMarkSystemMsgT * MsgP ); |
| 1500 | ValPswStateT ValPswGetPswState(void); |
| 1501 | void ValPswProcessRssiReport(kal_int16 Rssi); |
| 1502 | void ValSet_LTETxPwrInfoReportMode(kal_uint8 Mode); |
| 1503 | void ValGet_LTETxPwrInfo(void); |
| 1504 | void ValPswOosaWakeupReq(void); |
| 1505 | void ValPswManualAvoid(void); |
| 1506 | #ifdef SYS_OPTION_ENHANCEDAT |
| 1507 | void ATCmdSmsRegister(void); |
| 1508 | #endif |
| 1509 | #ifdef SYS_OPTION_RLP |
| 1510 | void ValPswResetRlpStat( void ); |
| 1511 | void ValPswQueryRlpStat( void ); |
| 1512 | void ValPswGetRlpStat(RlpQueryStatIndMsgT *DataP); |
| 1513 | |
| 1514 | #endif |
| 1515 | void ValPswSetEmergenceCardInit(kal_uint8 IsEmergence); |
| 1516 | void ValPswRegResume(void); |
| 1517 | #ifdef MTK_CBP |
| 1518 | void ValPswOtaSetPowerUpMode(kal_uint8 mode ); |
| 1519 | kal_bool ValIsActivedBand(SysCdmaBandT band); |
| 1520 | kal_bool ValIsBandChannelActivate(SysBandChannelT *bandChannel); |
| 1521 | kal_uint32 ValGetAllSupportedBand(void); |
| 1522 | kal_uint32 ValGetAllActivedBand(void); |
| 1523 | kal_bool ValSetActivedBand(kal_uint32 uBandMask); |
| 1524 | |
| 1525 | kal_bool ValIsRegTypeEnabled(reg_type_enum enRegType); |
| 1526 | kal_bool ValSetRegTypeValue(reg_type_enum enRegType, kal_uint8 regTypeValue); |
| 1527 | |
| 1528 | |
| 1529 | void ValPswModeSetMobPRev(kal_uint8 uPrev); |
| 1530 | kal_uint8* ValPswModeGetMobPRev(void); |
| 1531 | kal_uint8 ValPswGetMdn(kal_char *pMdnStr); |
| 1532 | kal_bool ValPswSetMdn(kal_char *pMdnStr); |
| 1533 | //kal_uint16 ValPswGetHomeSid(void); |
| 1534 | kal_bool ValPswSetHomeSid(kal_uint16 uSid); |
| 1535 | |
| 1536 | kal_bool ValPswSetIMSIS1(kal_char* pImsiS1Str, PswMsidFieldToUpdate UpdateField); |
| 1537 | kal_bool ValPswSetIMSIS2(kal_char* pImsiS2Str, PswMsidFieldToUpdate UpdateField); |
| 1538 | void ValPswSetMSIDUpdateField |
| 1539 | ( |
| 1540 | PswSetEncodedMSID_APIStruct *stEnCodeMSid, |
| 1541 | kal_uint8 enMSidField, |
| 1542 | kal_uint32 uMSidValue |
| 1543 | ); |
| 1544 | |
| 1545 | kal_bool ValPswSetMSID |
| 1546 | ( |
| 1547 | PswMsidFieldToUpdate UpdateField, |
| 1548 | kal_uint8 enMSidField, |
| 1549 | kal_uint32 uMSidValue |
| 1550 | ); |
| 1551 | |
| 1552 | kal_bool ValPswSetAccolc |
| 1553 | ( |
| 1554 | kal_uint8 uAccolc |
| 1555 | ); |
| 1556 | |
| 1557 | kal_bool ValPswSetSCI |
| 1558 | ( |
| 1559 | kal_uint8 uSci |
| 1560 | ); |
| 1561 | |
| 1562 | kal_bool ValPswSetSCM |
| 1563 | ( |
| 1564 | kal_uint8 *pScm |
| 1565 | ); |
| 1566 | |
| 1567 | kal_bool ValPswSetPrefHomeMTSo |
| 1568 | ( |
| 1569 | kal_uint16 uHomeMtSo |
| 1570 | ); |
| 1571 | |
| 1572 | kal_bool ValPswSetPrefHomeMOSo |
| 1573 | ( |
| 1574 | kal_uint16 uHomeMoSo |
| 1575 | ); |
| 1576 | |
| 1577 | kal_bool ValPswSetPrefRoamMOSo |
| 1578 | ( |
| 1579 | kal_uint16 uRoamMoSo |
| 1580 | ); |
| 1581 | |
| 1582 | kal_bool ValPswSetPrefSo |
| 1583 | ( |
| 1584 | kal_uint16 uPrefSo |
| 1585 | ); |
| 1586 | |
| 1587 | kal_bool ValPswSetPrefRC |
| 1588 | ( |
| 1589 | kal_uint8 uPrefRC |
| 1590 | ); |
| 1591 | |
| 1592 | kal_bool GetEVRCState(void); |
| 1593 | |
| 1594 | kal_bool ValPswSetEVRCape |
| 1595 | ( |
| 1596 | kal_bool bEvrcCape |
| 1597 | ); |
| 1598 | |
| 1599 | kal_bool ValPswSetEvrcbSwitch |
| 1600 | ( |
| 1601 | kal_bool bSupport |
| 1602 | ); |
| 1603 | kal_bool ValPswSetEvrcSwitch |
| 1604 | ( |
| 1605 | kal_bool bSupport |
| 1606 | ); |
| 1607 | |
| 1608 | |
| 1609 | void ValUpdateSoForVoiceCall(kal_uint16 ServiceOption, kal_bool bSupport); |
| 1610 | |
| 1611 | kal_bool ValPswSetSlottedMode |
| 1612 | ( |
| 1613 | kal_bool bSlottedModeAllowed |
| 1614 | ); |
| 1615 | |
| 1616 | void ValPswGetSlottedMode |
| 1617 | ( |
| 1618 | void |
| 1619 | ); |
| 1620 | |
| 1621 | void ValPswSetSltModeBitOfScm |
| 1622 | ( |
| 1623 | kal_uint8 *pScm, |
| 1624 | kal_bool bSltModeflag |
| 1625 | ); |
| 1626 | |
| 1627 | kal_bool ValPswSetHomeSysReg |
| 1628 | ( |
| 1629 | kal_bool bHomeSysReg |
| 1630 | ); |
| 1631 | |
| 1632 | void ValPswGetHomeSysReg |
| 1633 | ( |
| 1634 | void |
| 1635 | ); |
| 1636 | |
| 1637 | kal_bool ValPswSetForeignSidReg |
| 1638 | ( |
| 1639 | kal_bool bFSidReg |
| 1640 | ); |
| 1641 | |
| 1642 | void ValPswGetForeignSidReg |
| 1643 | ( |
| 1644 | void |
| 1645 | ); |
| 1646 | |
| 1647 | kal_bool ValPswSetForeignNidReg |
| 1648 | ( |
| 1649 | kal_bool bFNidReg |
| 1650 | ); |
| 1651 | |
| 1652 | void ValPswGetForeignNidReg |
| 1653 | ( |
| 1654 | void |
| 1655 | ); |
| 1656 | kal_bool ValPswSetHomeNid(kal_uint16 uNid); |
| 1657 | |
| 1658 | kal_uint16 ValPswGetPrefHomeMTSo(void); |
| 1659 | kal_uint16 ValPswGetPrefHomeMOSo(void); |
| 1660 | kal_uint16 ValPswGetPrefRoamMOSo(void); |
| 1661 | kal_uint16 ValPswGetPrefSo(void); |
| 1662 | kal_bool ValIsLTEActivate(void); |
| 1663 | |
| 1664 | extern void UpdatePrefFwdRCForVoiceCall(kal_uint8 forRc); |
| 1665 | extern void UpdatePrefTestSO(kal_uint16 ServiceOption); |
| 1666 | |
| 1667 | kal_bool ValNoNeedPowerOffRegister(void); |
| 1668 | |
| 1669 | #endif |
| 1670 | |
| 1671 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 1672 | /*ERI feature*/ |
| 1673 | void ValEriTableInit(void); |
| 1674 | #endif |
| 1675 | #ifdef __cplusplus |
| 1676 | } |
| 1677 | #endif /* __cplusplus */ |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | /***************************************************************************** |
| 1682 | * removed! |
| 1683 | * removed! |
| 1684 | * removed! |
| 1685 | * removed! |
| 1686 | * removed! |
| 1687 | * removed! |
| 1688 | * removed! |
| 1689 | * removed! |
| 1690 | * removed! |
| 1691 | * removed! |
| 1692 | * removed! |
| 1693 | * removed! |
| 1694 | * removed! |
| 1695 | * removed! |
| 1696 | * removed! |
| 1697 | * removed! |
| 1698 | * removed! |
| 1699 | * removed! |
| 1700 | * removed! |
| 1701 | * removed! |
| 1702 | * removed! |
| 1703 | *****************************************************************************/ |
| 1704 | |
| 1705 | /***************************************************************************** |
| 1706 | * End of File |
| 1707 | *****************************************************************************/ |
| 1708 | #endif |
| 1709 | /**Log information: \main\CBP80\cbp80_cshen_scbp10098\1 2012-07-26 06:27:51 GMT cshen |
| 1710 | ** cbp80_cshen_scbp10098**/ |
| 1711 | /**Log information: \main\CBP80\cbp80_gdeng_scbp10325\1 2012-09-20 06:30:03 GMT gdeng |
| 1712 | ** HREF#10325**/ |
| 1713 | /**Log information: \main\Trophy\Trophy_hjin_href1623\1 2013-04-03 02:28:49 GMT hjin |
| 1714 | ** HANDROID#1623: bug fix for MO,MT call conflict**/ |
| 1715 | /**Log information: \main\Trophy\1 2013-04-03 02:43:01 GMT cshen |
| 1716 | ** href#1623**/ |
| 1717 | /**Log information: \main\Trophy\SMART\1 2013-04-25 09:46:47 GMT yxma |
| 1718 | ** HREF#22182, add custom lock feature to smartfren |
| 1719 | |**/ |
| 1720 | |