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 VALUTKAPI_H |
| 45 | #define VALUTKAPI_H |
| 46 | /***************************************************************************** |
| 47 | * |
| 48 | * FILE NAME : valutkapi.h |
| 49 | * |
| 50 | * DESCRIPTION : |
| 51 | * |
| 52 | * This file contains all constants and typedefs needed to interface with the |
| 53 | * VAL SMS unit and the UI task. |
| 54 | * |
| 55 | * HISTORY: |
| 56 | * |
| 57 | * See Log at end of file |
| 58 | * |
| 59 | *****************************************************************************/ |
| 60 | |
| 61 | /*---------------------------------------------------------------------------- |
| 62 | Include Files |
| 63 | ----------------------------------------------------------------------------*/ |
| 64 | #ifdef FEATURE_UTK |
| 65 | #include "sysdefs.h" |
| 66 | #include "valapi.h" |
| 67 | |
| 68 | #ifdef __cplusplus |
| 69 | extern "C" { |
| 70 | #endif |
| 71 | /*---------------------------------------------------------------------------- |
| 72 | Local Defines and Macros |
| 73 | ----------------------------------------------------------------------------*/ |
| 74 | #define UTK_ITEM_MAX_COUNT 20 |
| 75 | #define UTK_SMS_ADDRESS_LEN 30 |
| 76 | #define UTK_SMS_SUBADDRESS_LEN 30 |
| 77 | |
| 78 | |
| 79 | /*---------------------------------------------------------------------------- |
| 80 | Local Typedefs |
| 81 | ----------------------------------------------------------------------------*/ |
| 82 | |
| 83 | /* UTK genernal result type */ |
| 84 | typedef enum |
| 85 | { |
| 86 | VAL_UTK_RST_CMD_OK = 0x00, /*Command performed successfully*/ |
| 87 | VAL_UTK_RST_CMD_PART_OK, /*Command performed with partial comprehension*/ |
| 88 | VAL_UTK_RST_CMD_MISS_OK, /*Command performed, with missing information*/ |
| 89 | VAL_UTK_RST_EF_REFRESH, /*REFRESH performed with additional EFs read*/ |
| 90 | VAL_UTK_RST_CMD_OK_NO_ICON, /*Command performed successfully, |
| 91 | but requested icon could not be displayed*/ |
| 92 | VAL_UTK_RST_CMD_OK_LTD_SERV = 0x06, /*Command performed successfully, limited service*/ |
| 93 | VAL_UTK_RST_CMD_OK_NOTIFY, /*Command performed with notification*/ |
| 94 | VAL_UTK_RST_REF_NO_NAA, /*REFRESH performed but indicated NAA was not active*/ |
| 95 | |
| 96 | VAL_UTK_RST_USER_TERMINATE = 0x10, /*Proactive UICC session terminated by the user*/ |
| 97 | VAL_UTK_RST_USER_BACK_MOVE, /*Backward move in the proactive UICC session |
| 98 | requested by the user*/ |
| 99 | VAL_UTK_RST_USER_NO_RSP, /*No response from user*/ |
| 100 | VAL_UTK_RST_USER_REQ_HELP, /*Help information required by the user*/ |
| 101 | |
| 102 | VAL_UTK_RST_ME_UNABLE = 0x20, /*terminal currently unable to process command*/ |
| 103 | VAL_UTK_RST_NET_UNABLE, /*Network currently unable to process command*/ |
| 104 | VAL_UTK_RST_USER_NOT_ACCEPT, /*User did not accept the proactive command*/ |
| 105 | VAL_UTK_RST_USER_CLEAR_CALL, /*User cleared down call before connection or network release*/ |
| 106 | VAL_UTK_RST_ACTION_CONT, /*Action in contradiction with the current timer state*/ |
| 107 | VAL_UTK_RST_NAA_CC_TEMP_PROBLEM, /* Interaction with call control by NAA, temporary problem; */ |
| 108 | VAL_UTK_RST_BROW_ERR, /* Launch browser generic error code */ |
| 109 | |
| 110 | VAL_UTK_RST_CMD_BYD_CAP = 0x30, /*Command beyond terminal's capabilities*/ |
| 111 | VAL_UTK_RST_CMD_TYPE_NOT_UND, /*Command type not understood by terminal*/ |
| 112 | VAL_UTK_RST_CMD_DATA_NOT_UND, /*Command data not understood by terminal*/ |
| 113 | VAL_UTK_RST_CMD_NUM_UNK, /*Command number not known by terminal*/ |
| 114 | |
| 115 | VAL_UTK_RST_REQ_VAL_MISS = 0x36, /*Error, required values are missing*/ |
| 116 | |
| 117 | VAL_UTK_RST_NULTICARD_CMD_ERR = 0x38, /* MultipleCard commands error */ |
| 118 | VAL_UTK_RST_NAA_CC_PERM_PROBLEM, /* Interaction with call control by NAA by NAA, permanent problem */ |
| 119 | VAL_UTK_RST_BEARER_PROTOCOL_ERR, /* Bearer Independent Protocol error */ |
| 120 | VAL_UTK_RST_ACCESS_TECH_UNABLE /* Bearer Independent Protocol error */ |
| 121 | } ValUtkGenResultT; |
| 122 | |
| 123 | /* Addition information on result when UtkGenResult = VAL_UTK_RST_ME_UNABLE */ |
| 124 | typedef enum |
| 125 | { |
| 126 | VAL_UTK_ADD_INF_NO_CAUSE = 0x00, /*No specific cause can be given*/ |
| 127 | VAL_UTK_ADD_INF_SCR_BUSY, /*Screen is busy*/ |
| 128 | VAL_UTK_ADD_INF_BUSY_CALL, /*terminal currently busy on call*/ |
| 129 | /*0x03 reserved for GSM/3G;*/ |
| 130 | VAL_UTK_ADD_INF_NO_SERVICE = 0x04, /*No service*/ |
| 131 | VAL_UTK_ADD_INF_ACC_CLASS_BAR, /*Access control class bar*/ |
| 132 | VAL_UTK_ADD_INF_RADIO_RES_NOT_GRANT, /*Radio resource not granted*/ |
| 133 | VAL_UTK_ADD_INF_NOT_SPEECH_CALL, /*Not in speech call*/ |
| 134 | /*0x08 reserved for GSM/3G;*/ |
| 135 | VAL_UTK_ADD_INF_BUSY_SEND_DTMF = 0x09, /*ME currently busy on SEND DTMF command*/ |
| 136 | VAL_UTK_ADD_INF_NO_NAA /*No NAA active*/ |
| 137 | } ValUtkAddInfoT; |
| 138 | |
| 139 | /* UTK result type */ |
| 140 | typedef struct |
| 141 | { |
| 142 | ValUtkGenResultT GenResult;/* General result */ |
| 143 | kal_bool AddInfoPre; /* AddInfo present */ |
| 144 | ValUtkAddInfoT AddInfo; /* Additional information on result */ |
| 145 | } ValUtkResultT; |
| 146 | |
| 147 | /*command detail (8.6) */ |
| 148 | typedef struct |
| 149 | { |
| 150 | kal_uint8 CmdNum; /* Command number */ |
| 151 | kal_uint8 CmdType; /* Command type */ |
| 152 | kal_uint8 CmdQualifier; /* Command qualifier */ |
| 153 | kal_uint16 CmdId; |
| 154 | } ValUtkCmdDetailT; |
| 155 | |
| 156 | typedef enum |
| 157 | { |
| 158 | VAL_UTK_CODE_GSM_7BIT_PACKED = 0, /* SMS default 7-bit coded alphabet, packed into 8-bit octets,;*/ |
| 159 | VAL_UTK_CODE_GSM_7BIT_CODED_UNPACKED = 4, /* SMS default 7-bit coded alphabet with bit 8 set to 0.;*/ |
| 160 | VAL_UTK_CODE_UNICODE_80 = 8, /* 16 bit unicode, formatting character is 0x80*/ |
| 161 | VAL_UTK_CODE_UNICODE_81, /* 16 bit unicode, formatting character is 0x81*/ |
| 162 | VAL_UTK_CODE_UNICODE_82 /* 16 bit unicode, formatting character is 0x82*/ |
| 163 | } ValUtkCodeSchemeT; |
| 164 | |
| 165 | /* text string(8.15), Alpha identifier (8.2) */ |
| 166 | typedef struct |
| 167 | { |
| 168 | ValUtkCodeSchemeT CodeScheme; /*Data coding scheme */ |
| 169 | kal_uint8 Len; /* length of Text, A null text string shall be coded with Len = 0 */ |
| 170 | kal_uint8* TextP; |
| 171 | } ValUtkTextT; |
| 172 | |
| 173 | typedef enum |
| 174 | { |
| 175 | VAL_UTK_TECH_GSM, |
| 176 | VAL_UTK_TECH_TE533, /*TIA/EIA-533*/ |
| 177 | VAL_UTK_TECH_TE136, /*TIA/EIA-136*/ |
| 178 | VAL_UTK_TECH_UTRAN, |
| 179 | VAL_UTK_TECH_TETRA, |
| 180 | VAL_UTK_TECH_TE95 = 5, /*TIA/EIA-95*/ |
| 181 | VAL_UTK_TECH_IS2000 = 6, |
| 182 | VAL_UTK_TECH_IS2000_HRPD = 7, /*TIA/EIA/IS-856*/ |
| 183 | VAL_UTK_EUTRAN = 8, |
| 184 | #ifdef MTK_DEV_C2K_IRAT |
| 185 | VAL_UTK_EHRPD, |
| 186 | #endif |
| 187 | VAL_UTK_TECH_NOUSE |
| 188 | }ValUtkTechT; |
| 189 | |
| 190 | /*CMD_QUALIFIER for UTK Provide Location information */ |
| 191 | typedef enum |
| 192 | { |
| 193 | VAL_UTK_LOC_INFO_CMD_QUAL_LOC, |
| 194 | VAL_UTK_LOC_INFO_CMD_QUAL_DATE_TIME = 3, |
| 195 | VAL_UTK_LOC_INFO_CMD_QUAL_LAN = 4, |
| 196 | VAL_UTK_LOC_INFO_CMD_QUAL_ACC_TECH = 6, |
| 197 | VAL_UTK_LOC_INFO_CMD_QUAL_ESN = 7, |
| 198 | VAL_UTK_LOC_INFO_CMD_QUAL_MEID = 0xB |
| 199 | }ValUtkLocInfoCmdQualT; |
| 200 | |
| 201 | typedef union |
| 202 | { |
| 203 | /*Location info, 17Bytes include tag and len */ |
| 204 | struct |
| 205 | { |
| 206 | kal_uint16 MCC; /**/ |
| 207 | kal_uint8 IMSI_11_12; /* */ |
| 208 | kal_uint16 SID; |
| 209 | kal_uint16 NID; |
| 210 | kal_uint16 BASE_ID; |
| 211 | kal_int32 BASE_LAT; |
| 212 | kal_int32 BASE_LONG; |
| 213 | } UtkLocation; /*CMD_QUALIFIER = 0, see ValUtkLocInfoCmdQualT */ |
| 214 | /*Date-time and time zone, Year='01'---2001*/ |
| 215 | struct |
| 216 | { |
| 217 | kal_uint8 Year; |
| 218 | kal_uint8 Month; |
| 219 | kal_uint8 Day; |
| 220 | kal_uint8 Hour; |
| 221 | kal_uint8 Minute; |
| 222 | kal_uint8 Second; |
| 223 | kal_int8 TimeZone; |
| 224 | } DateTime; |
| 225 | /*Language,4 bytes include tag and len */ |
| 226 | /*Each language code is a pair of alpha-numeric characters, defined in ISO 639 [12]. |
| 227 | Each alpha-numeric character shall be coded on one byte using the SMS default 7-bit |
| 228 | coded alphabet as defined in TS 123 038 [3] with bit 8 set to 0.*/ |
| 229 | kal_uint8 Language[2]; /*English :"en", Chinese:"zh" */ |
| 230 | /*Access Technology,3 byets include tag and len */ |
| 231 | ValUtkTechT Technology; /*Access technology */ |
| 232 | kal_uint32 ESN; |
| 233 | kal_uint8 MEID[7]; |
| 234 | } ValUtkLocalInfoT; |
| 235 | /*for CALL control envelop command*/ |
| 236 | typedef union |
| 237 | { |
| 238 | kal_uint8 Len; |
| 239 | kal_uint8 AccessInfo[15]; |
| 240 | } ValUtkLocalInfoT1; |
| 241 | /* Item (8.9) */ |
| 242 | typedef struct |
| 243 | { |
| 244 | kal_uint8 ItemId; /* Identifier of item */ |
| 245 | ValUtkCodeSchemeT CodeScheme; |
| 246 | kal_uint8 Len; |
| 247 | kal_uint8* ItemTextP; /* Item */ |
| 248 | } ValUtkItemT; |
| 249 | |
| 250 | /* Items Next Action Indicator (8.24) */ |
| 251 | typedef struct |
| 252 | { |
| 253 | kal_uint8 Len; |
| 254 | kal_uint8* NaiListP; /* Items Next Action Indicator list */ |
| 255 | } ValUtkNaiT; |
| 256 | |
| 257 | /* Icon Identifier(8.31) |
| 258 | (at present, icon is not supported, its parameters are not full ) */ |
| 259 | typedef enum |
| 260 | { |
| 261 | UTK_ICON_SELF_EXPLANATORY = 0, /*if displayed, it replaces the item text*/ |
| 262 | UTK_ICON_NOT_SELF_EXPLANATORY /*if displayed, it shall be displayed together with the item text.*/ |
| 263 | } ValUtkIconQualiferT; |
| 264 | |
| 265 | typedef struct |
| 266 | { |
| 267 | ValUtkIconQualiferT IconQualifier; /* Icon qualifier */ |
| 268 | kal_uint8 IconId; /* Icon identifier */ |
| 269 | } ValUtkIconT; |
| 270 | |
| 271 | /* Item Icon List (8.32) */ |
| 272 | typedef struct |
| 273 | { |
| 274 | ValUtkIconQualiferT IconQualifier; |
| 275 | kal_uint8 Len; |
| 276 | kal_uint8* IconListIdP; |
| 277 | } ValUtkItemIconListT; |
| 278 | |
| 279 | /* Numbering plan identification (NPI) */ |
| 280 | typedef enum |
| 281 | { |
| 282 | UTK_NPI_UNKNOWN = 0, |
| 283 | UTK_NPI_ISDN_OR_TELEP_NUM_PLAN =1, /* ISDN/telephony numbering plan (ITU-T Recommendations E.164 [22] and E.163 [21]) */ |
| 284 | UTK_NPI_DATA_NUM_PLAN = 3, /*ISDN/telephony numbering plan (ITU-T Recommendations E.164 [22] and E.163 [21])*/ |
| 285 | UTK_NPI_TELEX_NUM_PLAN = 4,/*Telex numbering plan (ITU-T Recommendation F.69 [24]);*/ |
| 286 | UTK_NPI_PRIVATE_NUM_PLAN = 9,/*Private numbering plan;*/ |
| 287 | UTK_NPI_RESERVE_EXTENSION = 15 /*Reserved for extension;*/ |
| 288 | /* All other values are reserved. */ |
| 289 | } ValUtkNpiT; |
| 290 | |
| 291 | /* Type of number (TON) */ |
| 292 | typedef enum |
| 293 | { |
| 294 | UTK_TON_UNKNOWN = 0, |
| 295 | UTK_TON_INTERNATIONAL_NUM = 1, /* International Number;*/ |
| 296 | UTK_TON_NATIONAL_NUM = 2, /* national Number; */ |
| 297 | UTK_TON_NETWORK_NUM = 3 /* Network Specific Number; */ |
| 298 | /* All other values are reserved. */ |
| 299 | } ValUtkTonT; |
| 300 | |
| 301 | /* Address (8.1) */ |
| 302 | typedef struct |
| 303 | { |
| 304 | ValUtkNpiT Npi; |
| 305 | ValUtkTonT Ton; |
| 306 | kal_uint8 Len; |
| 307 | kal_uint8* DialNumberP; |
| 308 | } ValUtkAddressT; |
| 309 | |
| 310 | /*UTK Set Up Menu Command(6.6.7) */ |
| 311 | typedef struct |
| 312 | { |
| 313 | ValUtkCmdDetailT CmdDetail; |
| 314 | ValUtkTextT Alpha; |
| 315 | kal_uint8 ItemNum; /* =0, indicates delete existed menu */ |
| 316 | ValUtkItemT Item[UTK_ITEM_MAX_COUNT]; |
| 317 | kal_bool NaiPre; /* if Items Next Action Indicator is present, KAL_TRUE: present*/ |
| 318 | ValUtkNaiT Nai; |
| 319 | kal_bool IconPre; |
| 320 | ValUtkIconT Icon; |
| 321 | kal_bool ItemIconListPre; |
| 322 | ValUtkItemIconListT ItemIconList; |
| 323 | } ValUtkSetUpMenuCmdT; |
| 324 | |
| 325 | /*utk select item Command(6.6.8) */ |
| 326 | typedef struct |
| 327 | { |
| 328 | ValUtkCmdDetailT CmdDetail; |
| 329 | kal_bool AlphaPre; |
| 330 | ValUtkTextT Alpha; |
| 331 | kal_uint8 ItemNum; |
| 332 | ValUtkItemT Item[UTK_ITEM_MAX_COUNT]; |
| 333 | kal_bool NaiPre; |
| 334 | ValUtkNaiT Nai; |
| 335 | kal_bool DefItemIdPre; |
| 336 | kal_uint8 DefItemId; /*default selected item */ |
| 337 | kal_bool IconPre; |
| 338 | ValUtkIconT Icon; |
| 339 | kal_bool ItemIconListPre; |
| 340 | ValUtkItemIconListT ItemIconList; |
| 341 | } ValUtkSelectItemCmdT; |
| 342 | |
| 343 | /* Capability configuration parameters(8.4) */ |
| 344 | typedef struct |
| 345 | { |
| 346 | kal_uint8 Len; |
| 347 | kal_uint8* CapCfgParamP; |
| 348 | } ValUtkCapCfgParamT; |
| 349 | |
| 350 | /* Subaddress */ |
| 351 | typedef struct |
| 352 | { |
| 353 | kal_uint8 Len; |
| 354 | kal_uint8* SubaddressP; |
| 355 | } ValUtkSubaddressT; |
| 356 | |
| 357 | typedef enum |
| 358 | { |
| 359 | UTK_TIME_UNIT_MINUTES = 0, /* minute; */ |
| 360 | UTK_TIME_UNIT_SECONDS = 1, /* second; */ |
| 361 | UTK_TIME_UNIT_TENTH_OF_SECONDS = 2 /* tenths of seconds*/ |
| 362 | } ValUtkTimeUnitT; |
| 363 | |
| 364 | /* Druation (8.8) */ |
| 365 | typedef struct |
| 366 | { |
| 367 | ValUtkTimeUnitT TimeUnit; |
| 368 | kal_uint8 TimeInterval; |
| 369 | } ValUtkDurationT; |
| 370 | |
| 371 | /*Event list*/ |
| 372 | typedef struct |
| 373 | { |
| 374 | kal_uint8 len; |
| 375 | kal_uint8* EventList; |
| 376 | } ValUtkEventListT; |
| 377 | |
| 378 | |
| 379 | /* UTK Set Up call Command */ |
| 380 | typedef struct |
| 381 | { |
| 382 | ValUtkCmdDetailT CmdDetail; |
| 383 | kal_bool ConfirmAlphaPre; |
| 384 | ValUtkTextT ConfirmAlpha;/*Alpha identifier (user confirmation phase)*/ |
| 385 | ValUtkAddressT Address; |
| 386 | kal_bool CapCfgParamPre; |
| 387 | ValUtkCapCfgParamT CapCfgParam;/*Capability configuration parameters*/ |
| 388 | kal_bool SubaddressPre; |
| 389 | ValUtkSubaddressT Subaddress; |
| 390 | kal_bool DurationPre; |
| 391 | ValUtkDurationT Duration; |
| 392 | kal_bool ConfirmIconPre; |
| 393 | ValUtkIconT ConfirmIcon;/*Icon identifier (user confirmation phase)*/ |
| 394 | kal_bool SetupAlphaPre; |
| 395 | ValUtkTextT SetupAlpha;/* Alpha identifier (call set up phase) */ |
| 396 | kal_bool SetupIconPre; |
| 397 | ValUtkIconT SetupIcon;/*Icon identifier (call set up phase)*/ |
| 398 | } ValUtkSetUpCallCmdT; |
| 399 | |
| 400 | /*UTK display text Command */ |
| 401 | typedef struct |
| 402 | { |
| 403 | ValUtkCmdDetailT CmdDetail; |
| 404 | ValUtkTextT TextString; |
| 405 | kal_bool IconPre; |
| 406 | ValUtkIconT Icon; |
| 407 | kal_bool ImmediateRsp; /* Immediate response KAL_TRUE*/ |
| 408 | kal_bool DurationPre; |
| 409 | ValUtkDurationT Duration; |
| 410 | } ValUtkDisplayTextCmdT; |
| 411 | |
| 412 | /* Response length (8.11)*/ |
| 413 | typedef struct |
| 414 | { |
| 415 | kal_uint8 RspLenMin;/* Minimum length of response */ |
| 416 | kal_uint8 RspLenMax;/* Maximum length of response */ |
| 417 | } ValUtkRspLenT;/*The range of length is between '00' and 'FF'. A minimum length coding |
| 418 | of '00' indicates that there is no minimum length requirement; a maximum length coding |
| 419 | of 'FF' indicates that there is no maximum length requirement. If a fixed length is |
| 420 | required the minimum and maximum values are identical.*/ |
| 421 | |
| 422 | /*UTK get input Command(6.6.3) */ |
| 423 | typedef struct |
| 424 | { |
| 425 | ValUtkCmdDetailT CmdDetail; |
| 426 | ValUtkTextT TextString; /*text for the Terminal to display in conjunction with asking the user to respond.*/ |
| 427 | ValUtkRspLenT RspLen; /* Response length */ |
| 428 | kal_bool DefaultTextPre; /* if default text is present */ |
| 429 | ValUtkTextT DefaultText; /*corresponds to a default text string offered by the UIM.*/ |
| 430 | kal_bool IconPre; |
| 431 | ValUtkIconT Icon; |
| 432 | } ValUtkGetInputCmdT; |
| 433 | |
| 434 | typedef enum |
| 435 | { |
| 436 | /* Standard supervisory tones: */ |
| 437 | UTK_TONE_DIAL = 0x01, /* Dial tone */ |
| 438 | UTK_TONE_CALLED_BUSY, /*Called subscriber busy*/ |
| 439 | UTK_TONE_CONGESTION, /*Congestion*/ |
| 440 | UTK_TONE_RADIO_PATH_ACK, /*Radio path acknowledge;*/ |
| 441 | UTK_TONE_RADIO_PATH_UNAVAIL_OR_CALL_DROP, /*Radio path not available/Call dropped*/ |
| 442 | UTK_TONE_ERROR_OR_SPEC_INFO, /*Error/Special information*/ |
| 443 | UTK_TONE_CALL_WAITING, /*Call waiting tone*/ |
| 444 | UTK_TONE_RINGING, /*Ringing tone*/ |
| 445 | /*Terminal proprietary tones*/ |
| 446 | UTK_TONE_BEEP = 0x10, /*General beep*/ |
| 447 | UTK_TONE_POSITIVE_ACK, /*Positive acknowledgement tone*/ |
| 448 | UTK_TONE_NEG_ACK_OR_ERROR, /*Negative acknowledgement or error tone*/ |
| 449 | UTK_TONE_USER_SELECTED_RINGING, /*Ringing tone as selected by the user for incoming speech call;*/ |
| 450 | UTK_TONE_USER_SELECTED_ALERT /*Alert tone as selected by the user for incoming SMS*/ |
| 451 | /* All other values are reserved. */ |
| 452 | } ValUtkToneT; |
| 453 | |
| 454 | /*utk play tone Command(6.6.5) */ |
| 455 | typedef struct |
| 456 | { |
| 457 | ValUtkCmdDetailT CmdDetail; |
| 458 | kal_bool AlphaPre; |
| 459 | ValUtkTextT Alpha; |
| 460 | kal_bool TonePre; /*if Tone is present. If no tone is specified, then the Terminal shall default to "general beep"*/ |
| 461 | ValUtkToneT Tone; |
| 462 | kal_bool DurationPre; |
| 463 | ValUtkDurationT Duration; |
| 464 | kal_bool IconPre; |
| 465 | ValUtkIconT Icon; |
| 466 | } ValUtkPlayToneCmdT; |
| 467 | |
| 468 | |
| 469 | /*utk send sms Command (6.6.9) */ |
| 470 | typedef struct |
| 471 | { |
| 472 | ValUtkCmdDetailT CmdDetail; |
| 473 | kal_bool AlphaPre; |
| 474 | ValUtkTextT Alpha; |
| 475 | kal_bool AddressPre; |
| 476 | ValUtkAddressT Address; |
| 477 | kal_uint8 SmsLen; /* Length of SMS TPDU */ |
| 478 | kal_uint8* SmsTpduP; /* SMS TPDU Buffer */ |
| 479 | } ValUtkSendSmsCmdT; |
| 480 | typedef struct |
| 481 | { |
| 482 | ValUtkCmdDetailT CmdDetail; |
| 483 | kal_uint8 DtmfLen; |
| 484 | kal_uint8* DtmfStrP; |
| 485 | kal_bool AlphaPre; |
| 486 | ValUtkTextT Alpha;/* Alpha identifier (call set up phase) */ |
| 487 | kal_bool IconPre; |
| 488 | ValUtkIconT Icon;/*Icon identifier (call set up phase)*/ |
| 489 | } ValUtkSendDtmfCmdT; |
| 490 | |
| 491 | typedef struct |
| 492 | { |
| 493 | ValUtkCmdDetailT CmdDetail; |
| 494 | } ValUtkProvideLocalInformationCmdT; |
| 495 | |
| 496 | |
| 497 | typedef enum |
| 498 | { |
| 499 | VAL_UTK_FILE_SMS, /*UIM SMS is updated*/ |
| 500 | VAL_UTK_FILE_PHB, /*UIM Phone book is updated*/ |
| 501 | VAL_UTK_FILE_UNKNOWN, |
| 502 | VAL_UTK_FILE_MAX |
| 503 | }ValUtkFileT; |
| 504 | |
| 505 | typedef struct |
| 506 | { |
| 507 | kal_uint8 FileCount; |
| 508 | ValUtkFileT File[VAL_UTK_FILE_MAX]; |
| 509 | } ValUtkFileListT; |
| 510 | |
| 511 | |
| 512 | |
| 513 | /*utk refresh command (6.6.13) */ |
| 514 | typedef struct |
| 515 | { |
| 516 | ValUtkCmdDetailT CmdDetail; |
| 517 | kal_bool FilelistPre; |
| 518 | ValUtkFileListT FileList; |
| 519 | kal_bool AidPre; |
| 520 | kal_uint8 Aid[16]; |
| 521 | } ValUtkRefreshCmdT; |
| 522 | |
| 523 | /*UTK SetUp EVENT List Command */ |
| 524 | typedef struct |
| 525 | { |
| 526 | ValUtkCmdDetailT CmdDetail; |
| 527 | ValUtkEventListT EventList; |
| 528 | } ValUtkSetUpEventListCmdT; |
| 529 | |
| 530 | |
| 531 | /*UTK get inkey Command(6.6.2) */ |
| 532 | typedef struct |
| 533 | { |
| 534 | ValUtkCmdDetailT CmdDetail; |
| 535 | ValUtkTextT TextString; /*text for the Terminal to display in conjunction with asking the user to respond.*/ |
| 536 | kal_bool IconPre; |
| 537 | ValUtkIconT Icon; |
| 538 | } ValUtkGetInkeyCmdT; |
| 539 | |
| 540 | typedef enum |
| 541 | { |
| 542 | UTK_NOT_SUPPORT, /*UIM card can't support UTK */ |
| 543 | UTK_MSG_MISSING_PARAM, /* Message received from UIM card misses necessary parameter*/ |
| 544 | UTK_MSG_MISMATCH_LENGTH,/*Length of message received from UIM card is mismatch */ |
| 545 | UTK_MSG_PARAM_ERR,/*Parameter received from UIM card is error */ |
| 546 | UTK_UIM_CARD_BUSY,/* UIM card UIM tollkit is busy */ |
| 547 | UTK_MSG_SW_ERR, /* Status word of message received from UIM card is unexpected */ |
| 548 | UTK_SESSION_NORMAL_END /* UTK session is end normally*/ |
| 549 | } ValUtkSessionEndCmdT; |
| 550 | |
| 551 | |
| 552 | /*sms parameters used by sms unit via utk sms download*/ |
| 553 | /* message identifier */ |
| 554 | typedef struct |
| 555 | { |
| 556 | kal_uint8 MsgType; |
| 557 | kal_uint16 MsgId; |
| 558 | kal_bool HeaderInd; |
| 559 | } ValUtkSmsMsgIdT; |
| 560 | |
| 561 | /* address */ |
| 562 | typedef struct |
| 563 | { |
| 564 | kal_bool DigitMode; |
| 565 | kal_bool NumMode; |
| 566 | kal_uint8 NumType; |
| 567 | kal_uint8 NumPlan; |
| 568 | kal_uint8 NumFields; |
| 569 | kal_uint8 Address[UTK_SMS_ADDRESS_LEN]; |
| 570 | } ValUtkSmsAddressT; |
| 571 | |
| 572 | /* Subaddress */ |
| 573 | typedef struct |
| 574 | { |
| 575 | kal_uint8 Type; |
| 576 | kal_bool Odd; |
| 577 | kal_uint8 NumFields; |
| 578 | kal_uint8 Subaddress[UTK_SMS_SUBADDRESS_LEN]; |
| 579 | } ValUtkSmsSubaddressT; |
| 580 | /*sms parameters end */ |
| 581 | |
| 582 | |
| 583 | /* utk events */ |
| 584 | typedef enum |
| 585 | { |
| 586 | UTK_EVENT_DISPLAY_TEXT, |
| 587 | UTK_EVENT_GET_INPUT, |
| 588 | UTK_EVENT_PLAY_TONE, |
| 589 | UTK_EVENT_SETUP_MENU, |
| 590 | UTK_EVENT_SELECT_ITEM, |
| 591 | UTK_EVENT_SEND_SMS, |
| 592 | UTK_EVENT_SETUP_CALL, |
| 593 | UTK_EVENT_PROVIDE_LOCAL_INFORMATION, |
| 594 | UTK_EVENT_REFRESH, |
| 595 | UTK_EVENT_GET_INKEY, |
| 596 | UTK_EVENT_END, |
| 597 | |
| 598 | UTK_EVENT_SETUP_EVENT_LIST, |
| 599 | UTK_EVENT_SEND_DTMF, |
| 600 | UTK_EVENT_CALL_CONTROL_RSP, |
| 601 | |
| 602 | UTK_MAX_EVENT |
| 603 | } ValUtkEventIdT; |
| 604 | |
| 605 | typedef union |
| 606 | { |
| 607 | ValUtkDisplayTextCmdT DispTextCmd; |
| 608 | ValUtkSetUpMenuCmdT SetUpMenuCmd; |
| 609 | ValUtkSetUpCallCmdT SetUpCallCmd; |
| 610 | ValUtkGetInputCmdT GetInputCmd; |
| 611 | ValUtkSendSmsCmdT SendSmsCmd; |
| 612 | ValUtkPlayToneCmdT PlayToneCmd; |
| 613 | ValUtkSelectItemCmdT SelectItemCmd; |
| 614 | ValUtkSessionEndCmdT SessionEndCmd; |
| 615 | ValUtkProvideLocalInformationCmdT ProvideLocInfoCmd; |
| 616 | ValUtkRefreshCmdT RefreshCmd; |
| 617 | ValUtkSetUpEventListCmdT SetUpEventCmd; |
| 618 | ValUtkGetInkeyCmdT GetInkeyCmd; |
| 619 | } ValUtkEventDataT; |
| 620 | |
| 621 | /* Callback to support UI needs to handle UTK events */ |
| 622 | typedef void (*UtkEventFunc) |
| 623 | ( |
| 624 | RegIdT RegId, |
| 625 | ValUtkEventIdT EventId, /* UTK Event which invokes the callback */ |
| 626 | ValUtkEventDataT* EventDataP /* Transmitted data pointer */ |
| 627 | ); |
| 628 | |
| 629 | typedef struct |
| 630 | { |
| 631 | kal_bool SoftKeyForSelItem; /* Soft keys support for SELECT ITEM */ |
| 632 | kal_bool SoftKeyForSetUpMenu; /* Soft Keys support for SET UP MENU */ |
| 633 | kal_uint8 SoftKeyMaxNum; /* Maximum number of soft keys available,'FF' is reserved */ |
| 634 | } ValUtkSoftKeyT; |
| 635 | |
| 636 | typedef struct |
| 637 | { |
| 638 | kal_uint8 CharNum;/* 5 bits,Number of characters supported down the terminal display*/ |
| 639 | kal_bool SizingParam; /*Screen Sizing Parameters supported*/ |
| 640 | } ValUtkDispHeightT; |
| 641 | |
| 642 | typedef struct |
| 643 | { |
| 644 | kal_uint8 CharNum;/* 7 bits,Number of characters supported across the terminal display*/ |
| 645 | kal_bool VarSizeFont;/*Variable size fonts Supported*/ |
| 646 | } ValUtkDispWidthT; |
| 647 | |
| 648 | typedef struct |
| 649 | { |
| 650 | ValUtkDispHeightT DispHightParam; |
| 651 | ValUtkDispWidthT DispWidthParam; |
| 652 | kal_bool Resized; /*Display can be resized*/ |
| 653 | kal_bool TextWrap; /*Text Wrapping supported*/ |
| 654 | kal_bool TextScroll; /*Text Scrolling supported*/ |
| 655 | kal_bool ExtText; /*Extended text supported */ |
| 656 | kal_uint8 WidthReduction; /* 3 bits, Width reduction when in a menu, this value |
| 657 | is the number of characters available across the |
| 658 | display due to a DISPLAY TEXT proactive |
| 659 | command without scrolling (using the default character |
| 660 | set specified in TS 123 038 [3]) minus the number of |
| 661 | characters available across the display due |
| 662 | to a SELECT ITEM proactive command without scrolling */ |
| 663 | } ValUtkDispParamT; |
| 664 | |
| 665 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 666 | typedef struct |
| 667 | { |
| 668 | kal_uint8 Len; |
| 669 | kal_uint8 BC_RepeatIndValue; |
| 670 | } ValUtkBC_RepeatIndT; |
| 671 | #endif |
| 672 | |
| 673 | #if 1 |
| 674 | /* UTK Set Up call Command */ |
| 675 | typedef struct |
| 676 | { |
| 677 | kal_uint8 Result; |
| 678 | kal_uint8 Len; |
| 679 | kal_bool AddressPre; |
| 680 | ValUtkAddressT Address; |
| 681 | kal_bool CapCfgParamPre1; |
| 682 | ValUtkCapCfgParamT CapCfgParam1;/*Capability configuration parameters*/ |
| 683 | kal_bool SubaddressPre; |
| 684 | ValUtkSubaddressT Subaddress; |
| 685 | kal_bool AlphaPre; |
| 686 | ValUtkTextT Alpha;/* Alpha identifier (call set up phase) */ |
| 687 | #if defined (__TC10__) && defined (__TC10_IPC_CDMA_SUPPORT__) |
| 688 | kal_bool BC_RepeatIndPresent; |
| 689 | ValUtkBC_RepeatIndT BC_RepeatIndTLV; |
| 690 | kal_bool CapCfgParamPre2; |
| 691 | ValUtkCapCfgParamT CapCfgParam2;/*Capability configuration parameters*/ |
| 692 | #endif |
| 693 | } ValUtkCallControlIndT; |
| 694 | #endif |
| 695 | |
| 696 | typedef enum |
| 697 | { |
| 698 | UTK_SETUPEVT_MT_CALL = 0, /* 00 MT call; */ |
| 699 | UTK_SETUPEVT_CALL_CONNECTED, /* 01 Call connected; */ |
| 700 | UTK_SETUPEVT_CALL_DISCONNECTED, /* 02 Call disconnected;*/ |
| 701 | UTK_SETUPEVT_LOCATION_STATUS, /* 03 Location status; */ |
| 702 | UTK_SETUPEVT_USER_ACTIVITY, /* 04 User activity;*/ |
| 703 | UTK_SETUPEVT_IDLE_SCN_AVAILABLE, /* 05 Idle screen available;*/ |
| 704 | UTK_SETUPEVT_CARD_READER_STATUS, /* 06 Card reader status;*/ |
| 705 | UTK_SETUPEVT_LANGUAGE_SELECTION, /* 07 Language selection;*/ |
| 706 | UTK_SETUPEVT_BROWSER_TERMINATION, /* 08 Browser termination; */ |
| 707 | UTK_SETUPEVT_DATA_AVAILABLE, /* 09 Data available;*/ |
| 708 | UTK_SETUPEVT_CHANNEL_STATUS, /* 0A Channel status;*/ |
| 709 | UTK_SETUPEVT_SACC_TECH_CHANGE, /* 0B Access Technology Change (single access technology);*/ |
| 710 | UTK_SETUPEVT_DISP_PARAM_CHANGE, /* 0C Display parameters changed;*/ |
| 711 | UTK_SETUPEVT_LOCAL_CONNECTION, /* 0D Local connection;*/ |
| 712 | UTK_SETUPEVT_NTWK_SERACH_MODE, /* 0E Network Search Mode Change;*/ |
| 713 | UTK_SETUPEVT_BROWSING_STATUS, /* 0F Browsing status; */ |
| 714 | UTK_SETUPEVT_FRAMES_INFO_CHANGE, /* 10 Frames Information Change;*/ |
| 715 | UTK_SETUPEVT_RSV_IWLAN, /* 11 reserved for 3GPP (I-WLAN Access Status);*/ |
| 716 | UTK_SETUPEVT_RSV_NTWK_REJ, /* 12 reserved for 3GPP (Network Rejection)*/ |
| 717 | UTK_SETUPEVT_HCI_CONNECTIVITY, /* 13 HCI connectivity event.*/ |
| 718 | UTK_SETUPEVT_MACC_TECH_CHANGE, /* 14 Access Technology Change (multiple access technologies).*/ |
| 719 | UTK_SETUPEVT_CSG_CELL_SELECTION, /* 15 reserved for 3GPP (CSG cell selection). */ |
| 720 | UTK_SETUPEVT_CONTACTLESS_STATE_REQ,/* 16 Contactless state request. */ |
| 721 | NUM_UTK_SETUP_EVENT |
| 722 | }ValUtkSetupEvtT; |
| 723 | |
| 724 | /*Transaction identifier*/ |
| 725 | typedef struct |
| 726 | { |
| 727 | kal_uint8 Len; |
| 728 | kal_uint8 List[VAL_MAX_CON_REC]; |
| 729 | } ValUtkTransIdT; |
| 730 | |
| 731 | /* MT Call Event */ |
| 732 | typedef struct |
| 733 | { |
| 734 | kal_bool AddressPre; |
| 735 | ValUtkAddressT Address; |
| 736 | kal_bool SubaddressPre; |
| 737 | ValUtkSubaddressT Subaddress; |
| 738 | ValUtkTransIdT TransId; |
| 739 | } ValUtkMTCallEvtT; |
| 740 | |
| 741 | /* Call Connected Event */ |
| 742 | typedef struct |
| 743 | { |
| 744 | kal_uint8 DeviceType; /*0 termial initiate, 1 network initiate*/ |
| 745 | ValUtkTransIdT TransId; |
| 746 | } ValUtkCallConnT; |
| 747 | |
| 748 | /* Call Disconnected Event */ |
| 749 | typedef struct |
| 750 | { |
| 751 | kal_uint8 DeviceType;/*0 termial initiate, 1 network initiate*/ |
| 752 | ValUtkTransIdT TransId; |
| 753 | kal_bool CausePre; |
| 754 | kal_uint8 CauseLen; |
| 755 | kal_uint8* CauseP; |
| 756 | } ValUtkCallDiscT; |
| 757 | |
| 758 | /* Location Status Event */ |
| 759 | typedef struct |
| 760 | { |
| 761 | kal_uint8 LocStatus; |
| 762 | kal_uint8 AccessInfo[15]; |
| 763 | } ValUtkLocStatusT; |
| 764 | |
| 765 | /* Access Technology Change Event */ |
| 766 | typedef struct |
| 767 | { |
| 768 | ValUtkTechT Technology; |
| 769 | } ValUtkAccTechChangeEvtT; |
| 770 | |
| 771 | /* Access Technology Change Event */ |
| 772 | typedef struct |
| 773 | { |
| 774 | kal_uint16 ChannelStatus; |
| 775 | kal_uint8 ChannelDataLen; |
| 776 | } ValUtkDataAvailableEvt; |
| 777 | |
| 778 | typedef union |
| 779 | { |
| 780 | ValUtkMTCallEvtT MtCallEvt; |
| 781 | ValUtkCallConnT CallConnEvt; |
| 782 | ValUtkCallDiscT CallDiscEvt; |
| 783 | ValUtkLocStatusT LocStatus; |
| 784 | ValUtkAccTechChangeEvtT AccTechChangeEvt; |
| 785 | ValUtkDataAvailableEvt DataAvailableEvt; |
| 786 | } ValUtkSetupEventDataT; |
| 787 | #ifdef MTK_DEV_C2K_IRAT |
| 788 | |
| 789 | typedef struct{ |
| 790 | kal_uint8 ValImsRegStatus; |
| 791 | kal_uint8 IsImsTimerExpired; |
| 792 | }ValImsRegInfoT; |
| 793 | #endif |
| 794 | |
| 795 | /***************************************************************************** |
| 796 | |
| 797 | FUNCTION NAME: ValUtkRegister |
| 798 | |
| 799 | DESCRIPTION: |
| 800 | |
| 801 | Other task invokes this function to register event functions in UTK unit. |
| 802 | |
| 803 | PARAMETERS: |
| 804 | EventFunc: Callback function |
| 805 | |
| 806 | RETURNED VALUES: |
| 807 | |
| 808 | TRegister ID |
| 809 | -1: failed. |
| 810 | |
| 811 | *****************************************************************************/ |
| 812 | extern RegIdT ValUtkRegister(UtkEventFunc EventFunc); |
| 813 | |
| 814 | /***************************************************************************** |
| 815 | |
| 816 | FUNCTION NAME: ValUtkUnregister |
| 817 | |
| 818 | DESCRIPTION: |
| 819 | |
| 820 | Other task invokes this function to unregister event functions in UTK unit. |
| 821 | |
| 822 | PARAMETERS: |
| 823 | RegId: Assigned Register ID |
| 824 | |
| 825 | RETURNED VALUES: |
| 826 | |
| 827 | None |
| 828 | |
| 829 | *****************************************************************************/ |
| 830 | extern void ValUtkUnregister(RegIdT RegId); |
| 831 | |
| 832 | |
| 833 | /***************************************************************************** |
| 834 | |
| 835 | FUNCTION NAME: ValUtkProfileInit |
| 836 | |
| 837 | DESCRIPTION: |
| 838 | |
| 839 | UTK initialization. UIM card revision is obtained to determine whether or not UIM card |
| 840 | supports UTK functionality. After sending read message to UIM, UTK init returns. Other |
| 841 | operations (e.g. read image file and sending Terminal Profile command ) will be done |
| 842 | after receiving response from UIM. |
| 843 | |
| 844 | PARAMETERS: |
| 845 | |
| 846 | DispParamP: Display parameter pointer |
| 847 | SoftKeyP: Soft key parameter poniter |
| 848 | used to construct UTK Profile |
| 849 | |
| 850 | RETURNED VALUES: |
| 851 | |
| 852 | None. |
| 853 | |
| 854 | *****************************************************************************/ |
| 855 | extern void ValUtkProfileInit(ValUtkDispParamT* DispParamP, ValUtkSoftKeyT* SoftKeyP); |
| 856 | |
| 857 | |
| 858 | |
| 859 | /***************************************************************************** |
| 860 | |
| 861 | FUNCTION NAME: ValUtkSmsDownload |
| 862 | |
| 863 | DESCRIPTION: |
| 864 | |
| 865 | handles SMS-PP data download Command received from the network. |
| 866 | |
| 867 | PARAMETERS: |
| 868 | |
| 869 | ApduP: utk sms transport layer buffer |
| 870 | Len: length of sms transport layer buffer |
| 871 | OrigAddressP: original address buffer (utk uses it when sending ack) |
| 872 | OrigSubaddressP: original subaddress buffer NULL: absent (utk uses it when sending ack) |
| 873 | BearerReplyOption: REPLY_SEQ of Bearer replay option parameter (utk uses it when sending ack) |
| 874 | MsgIdP: Message Identifier buffer (utk uses it when sending ack) |
| 875 | TeleSrvId: TeleSrvId (utk uses it when sending ack) |
| 876 | |
| 877 | RETURNED VALUES: |
| 878 | |
| 879 | None |
| 880 | |
| 881 | *****************************************************************************/ |
| 882 | void ValUtkSmsDownload( kal_uint8* ApduP, |
| 883 | kal_uint8 Len, |
| 884 | ValUtkSmsAddressT* OrigAddressP, |
| 885 | ValUtkSmsSubaddressT* OrigSubaddressP, |
| 886 | kal_uint16 MsgId, |
| 887 | kal_uint16 TeleSrvId, |
| 888 | kal_bool IsImsPPdownLoad, |
| 889 | kal_uint8 seq_id); |
| 890 | |
| 891 | /***************************************************************************** |
| 892 | |
| 893 | FUNCTION NAME: ValUtkSelectMenu |
| 894 | |
| 895 | DESCRIPTION: |
| 896 | |
| 897 | handles Selection Menu Command received from UI. |
| 898 | |
| 899 | PARAMETERS: |
| 900 | |
| 901 | ItemId : item identifier |
| 902 | help: if help is needed, KAL_TRUE: needed |
| 903 | |
| 904 | RETURNED VALUES: |
| 905 | |
| 906 | None |
| 907 | |
| 908 | *****************************************************************************/ |
| 909 | extern void ValUtkSelectMenu(kal_uint8 ItemId, kal_bool Help); |
| 910 | |
| 911 | /***************************************************************************** |
| 912 | |
| 913 | FUNCTION NAME: ValUtkCommCmdResult |
| 914 | |
| 915 | DESCRIPTION: |
| 916 | |
| 917 | If UIM sends command to UI, UI just has result value, no other return value, uses this function. |
| 918 | |
| 919 | PARAMETERS: |
| 920 | |
| 921 | CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail |
| 922 | ResultP: Result |
| 923 | |
| 924 | RETURNED VALUES: |
| 925 | |
| 926 | None |
| 927 | |
| 928 | *****************************************************************************/ |
| 929 | extern void ValUtkCommCmdResult(ValUtkCmdDetailT *CmdDetailP, ValUtkResultT *ResultP); |
| 930 | |
| 931 | /***************************************************************************** |
| 932 | |
| 933 | FUNCTION NAME: ValUtkGetInkeyDone |
| 934 | |
| 935 | DESCRIPTION: |
| 936 | |
| 937 | If UIM sends get inkey command to UI, UI uses this function to return text string to UIM. |
| 938 | |
| 939 | PARAMETERS: |
| 940 | |
| 941 | CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail |
| 942 | TextStrP: input text by the user |
| 943 | |
| 944 | RETURNED VALUES: |
| 945 | |
| 946 | None |
| 947 | |
| 948 | *****************************************************************************/ |
| 949 | void ValUtkGetInkeyDone( ValUtkCmdDetailT* CmdDetailP, |
| 950 | ValUtkTextT* TextStrP ); |
| 951 | |
| 952 | /***************************************************************************** |
| 953 | FUNCTION NAME: ValUtkGetInputDone |
| 954 | |
| 955 | DESCRIPTION: |
| 956 | |
| 957 | If UIM sends get input command to UI, UI uses this function to return text string to UIM. |
| 958 | |
| 959 | PARAMETERS: |
| 960 | |
| 961 | CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail |
| 962 | TextStrP: input text by the user |
| 963 | |
| 964 | RETURNED VALUES: |
| 965 | |
| 966 | None |
| 967 | |
| 968 | *****************************************************************************/ |
| 969 | extern void ValUtkGetInputDone(ValUtkCmdDetailT *CmdDetailP, ValUtkTextT *TextStrP); |
| 970 | |
| 971 | /***************************************************************************** |
| 972 | |
| 973 | FUNCTION NAME: ValUtkSelectItemDone |
| 974 | |
| 975 | DESCRIPTION: |
| 976 | |
| 977 | if UIM sends select item command to UI, UI uses this function to return item to UIM. |
| 978 | |
| 979 | PARAMETERS: |
| 980 | |
| 981 | CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail |
| 982 | ItemId: Identifier of item chosen |
| 983 | Help: if user requests the help information for this item |
| 984 | |
| 985 | RETURNED VALUES: |
| 986 | |
| 987 | None |
| 988 | |
| 989 | *****************************************************************************/ |
| 990 | extern void ValUtkSelectItemDone(ValUtkCmdDetailT *CmdDetailP, kal_uint8 ItemId, kal_bool Help); |
| 991 | /***************************************************************************** |
| 992 | |
| 993 | FUNCTION NAME: ValUtkProvideLocalInformationDone |
| 994 | |
| 995 | DESCRIPTION: |
| 996 | |
| 997 | If UIM sends Provide Local Information command to UI, UI uses this function to return local info to UIM. |
| 998 | |
| 999 | PARAMETERS: |
| 1000 | |
| 1001 | CmdDetailP: Command detail, if it is NULL, the UTK filled it with the last command detail |
| 1002 | TextStrP: input text by the user |
| 1003 | |
| 1004 | RETURNED VALUES: |
| 1005 | |
| 1006 | None |
| 1007 | |
| 1008 | *****************************************************************************/ |
| 1009 | extern void ValUtkProvideLocalInformationDone(ValUtkCmdDetailT *CmdDetailP,ValUtkResultT *ResultP, ValUtkLocalInfoT *InfoP); |
| 1010 | |
| 1011 | #if defined(FEATURE_CALL_CONTROL) || defined(MTK_DEV_C2K_IRAT) |
| 1012 | /***************************************************************************** |
| 1013 | |
| 1014 | FUNCTION NAME: ValUtkCallControl |
| 1015 | |
| 1016 | DESCRIPTION: |
| 1017 | |
| 1018 | handles Call Control Command received from UI. |
| 1019 | |
| 1020 | PARAMETERS: |
| 1021 | |
| 1022 | AddressP : point to DiallingNumber |
| 1023 | CapCfgParaP1: point to Capability configure parameters 1 |
| 1024 | SubAddressP: pointer to subaddress |
| 1025 | LocalInfoP: pinter to location infor. |
| 1026 | CapCfgParaP2: point to Capability configure parameters 1 |
| 1027 | BcRepeatInd: BC repeater indicator |
| 1028 | RETURNED VALUES: |
| 1029 | |
| 1030 | None |
| 1031 | |
| 1032 | *****************************************************************************/ |
| 1033 | extern void ValUtkCallControl(ValUtkAddressT *AddressP, ValUtkCapCfgParamT *CapCfgParaP1,ValUtkSubaddressT *SubAddressP, kal_uint8 *LocalInfoP); |
| 1034 | #endif |
| 1035 | |
| 1036 | /***************************************************************************** |
| 1037 | |
| 1038 | FUNCTION NAME: ValUtkProSetupEvtList |
| 1039 | |
| 1040 | DESCRIPTION: |
| 1041 | |
| 1042 | Handles Proactive Command SET UP EVENT LIST. |
| 1043 | |
| 1044 | PARAMETERS: |
| 1045 | |
| 1046 | MsgP: response message from UIM |
| 1047 | |
| 1048 | RETURNED VALUES: |
| 1049 | |
| 1050 | None |
| 1051 | |
| 1052 | *****************************************************************************/ |
| 1053 | extern ValUtkGenResultT ValUtkProSetupEvtList(ValUtkSetUpEventListCmdT * SetUpEventCmd); |
| 1054 | |
| 1055 | /***************************************************************************** |
| 1056 | |
| 1057 | FUNCTION NAME: ValUtkCheckEvtList |
| 1058 | |
| 1059 | DESCRIPTION: |
| 1060 | |
| 1061 | Check if a specific event is enabled or not . |
| 1062 | |
| 1063 | PARAMETERS: |
| 1064 | |
| 1065 | ValUtkSetupEvtT Evt |
| 1066 | |
| 1067 | RETURNED VALUES: |
| 1068 | |
| 1069 | KAL_TRUE/KAL_FALSE |
| 1070 | |
| 1071 | *****************************************************************************/ |
| 1072 | extern kal_bool ValUtkCheckEvtList(ValUtkSetupEvtT Evt); |
| 1073 | |
| 1074 | /***************************************************************************** |
| 1075 | |
| 1076 | FUNCTION NAME: ValUtkEventDownload |
| 1077 | |
| 1078 | DESCRIPTION: |
| 1079 | |
| 1080 | UTK sends ENVELOPE(EVENT DOWNLOAD) command to UIM. |
| 1081 | |
| 1082 | PARAMETERS: |
| 1083 | ValUtkSetupEvtT Evt, |
| 1084 | ValUtkSetupEventDataT * data |
| 1085 | |
| 1086 | RETURNED VALUES: |
| 1087 | None |
| 1088 | *****************************************************************************/ |
| 1089 | extern void ValUtkEventDownload(ValUtkSetupEvtT Evt, ValUtkSetupEventDataT * data); |
| 1090 | /*get the current event status*/ |
| 1091 | extern kal_bool UtkGetEvt(ValUtkSetupEvtT Evt); |
| 1092 | /***************************************************************************** |
| 1093 | |
| 1094 | FUNCTION NAME: ValUtkInit |
| 1095 | |
| 1096 | DESCRIPTION: |
| 1097 | |
| 1098 | Create UtkEventsLock. this function is invoked by valtask |
| 1099 | |
| 1100 | PARAMETERS: |
| 1101 | |
| 1102 | None. |
| 1103 | |
| 1104 | RETURNED VALUES: |
| 1105 | |
| 1106 | None |
| 1107 | |
| 1108 | *****************************************************************************/ |
| 1109 | extern void ValUtkInit(void); |
| 1110 | |
| 1111 | /***************************************************************************** |
| 1112 | |
| 1113 | FUNCTION NAME: ValAtUtkProfileInit |
| 1114 | |
| 1115 | DESCRIPTION: |
| 1116 | |
| 1117 | UTK initialization for AT application. UIM card revision is obtained to determine whether or not UIM card |
| 1118 | supports UTK functionality. After sending read message to UIM, UTK init returns. Other |
| 1119 | operations (e.g. read image file and sending Terminal Profile command ) will be done |
| 1120 | after receiving response from UIM. |
| 1121 | |
| 1122 | PARAMETERS: |
| 1123 | |
| 1124 | profile: |
| 1125 | |
| 1126 | RETURNED VALUES: |
| 1127 | |
| 1128 | None. |
| 1129 | |
| 1130 | *****************************************************************************/ |
| 1131 | void ValAtUtkProfileInit( kal_uint8* profile ); |
| 1132 | |
| 1133 | /***************************************************************************** |
| 1134 | |
| 1135 | FUNCTION NAME: UtkDeliverMail |
| 1136 | |
| 1137 | DESCRIPTION: |
| 1138 | |
| 1139 | Delivers UTK response message. It is used by valtask. |
| 1140 | |
| 1141 | PARAMETERS: |
| 1142 | |
| 1143 | MsgId: received message id |
| 1144 | MsgP: message |
| 1145 | MsgSize: message size |
| 1146 | |
| 1147 | RETURNED VALUES: |
| 1148 | |
| 1149 | None |
| 1150 | |
| 1151 | *****************************************************************************/ |
| 1152 | extern void ValUtkDeliverMsg(kal_uint32 MsgId, void * MsgP, kal_uint32 MsgSize); |
| 1153 | extern UtkEventFunc CallbackFunc; |
| 1154 | extern RegIdT RegId; |
| 1155 | |
| 1156 | /***************************************************************************** |
| 1157 | |
| 1158 | FUNCTION NAME: ValUtkUimAppInitTerm |
| 1159 | |
| 1160 | DESCRIPTION: |
| 1161 | |
| 1162 | CCAT cases, for proactive command reresh. uim initialization or terminate |
| 1163 | |
| 1164 | PARAMETERS: |
| 1165 | |
| 1166 | none |
| 1167 | RETURNED VALUES: |
| 1168 | |
| 1169 | None |
| 1170 | |
| 1171 | *****************************************************************************/ |
| 1172 | extern void ValUtkUimAppInitTerm(kal_uint8 OperMode, kal_uint8* Aid); |
| 1173 | |
| 1174 | #ifdef MTK_DEV_C2K_IRAT |
| 1175 | /***************************************************************************** |
| 1176 | |
| 1177 | FUNCTION NAME: ValUimSetUpEventList |
| 1178 | |
| 1179 | DESCRIPTION: |
| 1180 | |
| 1181 | Translates uim proactive Set up Event List command. |
| 1182 | |
| 1183 | PARAMETERS: |
| 1184 | |
| 1185 | BufDataP: proactive command(Set Up Event List) buffer |
| 1186 | Len: Length of buffer |
| 1187 | |
| 1188 | RETURNED VALUES: |
| 1189 | |
| 1190 | None |
| 1191 | |
| 1192 | *****************************************************************************/ |
| 1193 | extern kal_int8 ValUimSetUpEventList(kal_uint8 *BufDataP,kal_uint8 Len); |
| 1194 | /***************************************************************************** |
| 1195 | |
| 1196 | FUNCTION NAME: ValUimMoreTimeProcess |
| 1197 | |
| 1198 | DESCRIPTION: |
| 1199 | |
| 1200 | Translates uim proactive Set up Event List command. |
| 1201 | |
| 1202 | PARAMETERS: |
| 1203 | |
| 1204 | BufDataP: proactive command(Set Up Event List) buffer |
| 1205 | Len: Length of buffer |
| 1206 | |
| 1207 | RETURNED VALUES: |
| 1208 | |
| 1209 | None |
| 1210 | |
| 1211 | *****************************************************************************/ |
| 1212 | void ValUimMoreTimeProcess(kal_uint8 *BufDataP,kal_uint8 Len); |
| 1213 | extern kal_uint8 UtkParseCmdDetail(kal_uint8* DataP, ValUtkCmdDetailT* CmdDetailP); |
| 1214 | extern kal_uint8 UtkParseDeviceId(kal_uint8* DataP, kal_uint8* OrigDeviceP, kal_uint8* DestDeviceP); |
| 1215 | extern kal_uint8 UtkParseTimerId(kal_uint8* DataP, kal_uint8* TimerIdP); |
| 1216 | extern kal_uint8 UtkParseTimerValue(kal_uint8* DataP, kal_uint32* TimerValue); |
| 1217 | extern kal_uint32 ValUimStopUtkTimer(kal_uint8 TimerId); |
| 1218 | extern void ValUimStartUtkTimer(kal_uint8 TimerId,kal_uint32 TimerValue); |
| 1219 | extern kal_uint32 ValUimGetRemainTimer(kal_uint8 TimerId); |
| 1220 | extern kal_uint32 ValGetSystemTimeInSec(void); |
| 1221 | extern void ValUimTimerManagerProcess(kal_uint8 *BufDataP,kal_uint8 Len); |
| 1222 | |
| 1223 | #endif |
| 1224 | #ifdef __cplusplus |
| 1225 | } |
| 1226 | #endif |
| 1227 | #endif /* FEATURE_UTK*/ |
| 1228 | #endif /* VALUTKAPI_H */ |
| 1229 | /***************************************************************************** |
| 1230 | * removed! |
| 1231 | * removed! |
| 1232 | * removed! |
| 1233 | * removed! |
| 1234 | * removed! |
| 1235 | * removed! |
| 1236 | *****************************************************************************/ |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | |