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) 2005 |
| 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 | * Filename: |
| 38 | * --------- |
| 39 | * l4c2phb_struct.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * MAUI |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * This file is intends for structure definition between PHB and L4C. |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | *============================================================================== |
| 54 | *******************************************************************************/ |
| 55 | |
| 56 | /******************************************************************************** |
| 57 | * Copyright Statement: |
| 58 | * -------------------- |
| 59 | * |
| 60 | * This product has been developed using a protocol stack |
| 61 | * developed by Sasken Communication Technologies Limited. |
| 62 | * |
| 63 | ********************************************************************************/ |
| 64 | |
| 65 | |
| 66 | /******************************************************************************* |
| 67 | * Copyright Statement: |
| 68 | * -------------------- |
| 69 | * This software is protected by Copyright and the information contained |
| 70 | * herein is confidential. The software may not be copied and the information |
| 71 | * contained herein may not be used or disclosed except with the written |
| 72 | * permission of MediaTek Inc. (C) 2002 |
| 73 | * |
| 74 | ******************************************************************************* |
| 75 | * FILENAME : l4c2phb_struct.h |
| 76 | * SYNOPSIS : Functions for encoding/decoding. |
| 77 | * |
| 78 | * R E V I S I O N H I S T O R Y |
| 79 | * |
| 80 | */ |
| 81 | #ifndef _L4C2PHB_STRUCT_H |
| 82 | #define _L4C2PHB_STRUCT_H |
| 83 | |
| 84 | //#include "l4c2uem_struct.h" |
| 85 | #include "l4c_aux_struct.h" |
| 86 | //#include "kal_non_specific_general_types.h" |
| 87 | //#include "common_nvram_editor_data_item.h" |
| 88 | #include "l4c2phb_enums.h" |
| 89 | |
| 90 | #include "ps_public_enum.h" |
| 91 | #include "kal_general_types.h" |
| 92 | #include "nvram_editor_data_item.h" |
| 93 | #include "l4_nvram_editor.h" |
| 94 | #include "ps_public_struct.h" |
| 95 | #include "kal_public_defs.h" |
| 96 | |
| 97 | #include "sim_ps_enum.h" |
| 98 | |
| 99 | #ifndef NVRAM_PHB_SIZE |
| 100 | #define NVRAM_PHB_SIZE (54+MAX_PS_NAME_SIZE) |
| 101 | #endif |
| 102 | #ifndef PHB_EMAIL_SIZE |
| 103 | #define PHB_EMAIL_SIZE 66 |
| 104 | #endif |
| 105 | |
| 106 | #ifndef PHB_ANR_SIZE |
| 107 | #define PHB_ANR_SIZE 49 |
| 108 | #endif |
| 109 | |
| 110 | typedef struct { |
| 111 | kal_uint16 index; /* index maintained by PHB*/ |
| 112 | phb_storage_enum storage; /* phb_storage_enum; Physical storage*/ |
| 113 | phb_type_enum type; /* amanda add */ |
| 114 | kal_uint8 num_index; |
| 115 | kal_uint8 aas_id; |
| 116 | kal_uint16 record_index; /* Record index in physical storage*/ |
| 117 | l4_name_struct alpha_id; /* Alpha identifier*/ |
| 118 | l4_addr_bcd_struct tel_number; /* Telephone number*/ |
| 119 | kal_uint8 cap_cnf_id; /* Capability/Configuration identifier*/ |
| 120 | } phb_entry_struct; |
| 121 | |
| 122 | typedef struct { |
| 123 | kal_uint16 no_array; |
| 124 | kal_uint16 array_size; |
| 125 | phb_entry_struct *array; /* Array of raw data entry(ies), each element is type of phb_entry_struct.*/ |
| 126 | } l4cphb_phb_entry_array_struct; |
| 127 | |
| 128 | typedef struct { |
| 129 | kal_uint16 record_index; /* Record index in physical storage*/ |
| 130 | kal_uint16 adn_record_index; /* adn record index */ |
| 131 | kal_uint8 anr_type; /* ANRA, ANRB or ANRC */ |
| 132 | kal_uint8 aas_id; /* anr alhpha id identifier */ |
| 133 | l4_addr_bcd_struct tel_number; /* Telephone number*/ |
| 134 | kal_uint8 cap_cnf_id; /* Capability/Configuration identifier*/ |
| 135 | } phb_anr_struct; |
| 136 | |
| 137 | typedef struct { |
| 138 | LOCAL_PARA_HDR |
| 139 | sim_dn_enum dn_type; /* Dial number type*/ |
| 140 | kal_bool is_fdn_change; |
| 141 | } l4cphb_startup_req_struct; |
| 142 | |
| 143 | /* EF descriptor */ |
| 144 | |
| 145 | typedef struct { |
| 146 | LOCAL_PARA_HDR |
| 147 | kal_uint8 result; /* phb_errno_enum; Operation result*/ |
| 148 | /* obsolete */ |
| 149 | kal_uint16 adn_size; |
| 150 | kal_uint16 phb_size; |
| 151 | kal_uint8 adn_alpha_length; |
| 152 | kal_uint8 fdn_alpha_length; |
| 153 | kal_uint8 bdn_alpha_length; |
| 154 | kal_uint8 msisdn_alpha_length; |
| 155 | kal_uint8 email_length; |
| 156 | /* obsolete */ |
| 157 | kal_uint8 is_sim_refresh; |
| 158 | l4c_phb_desc_struct desc[PHB_TYPE_TOTAL]; /* start from (PHB_NONE + 1) */ |
| 159 | } l4cphb_startup_cnf_struct; |
| 160 | |
| 161 | typedef struct { |
| 162 | LOCAL_PARA_HDR |
| 163 | l4c_phb_desc_struct desc[PHB_TYPE_TOTAL]; |
| 164 | } l4cphb_startup_begin_ind_struct; |
| 165 | |
| 166 | typedef struct { |
| 167 | LOCAL_PARA_HDR |
| 168 | kal_uint8 src_id; /* Required for L4C*/ |
| 169 | phb_type_enum type; /* phb_type_enum; Type of phone number entries*/ |
| 170 | phb_storage_enum storage; /* Specifies storage*/ |
| 171 | kal_uint8 num_index; |
| 172 | kal_uint16 index; /* Index of phone number entries*/ |
| 173 | kal_uint16 record_index; /* Record index of physical storage*/ |
| 174 | kal_uint16 total; /* Number of entries to read*/ |
| 175 | } l4cphb_read_req_struct; |
| 176 | |
| 177 | typedef struct { |
| 178 | LOCAL_PARA_HDR |
| 179 | kal_uint8 src_id; /* The 'src_id' of the corresponding reqest is forwarded back in this field.*/ |
| 180 | phb_errno_enum result; /* phb_errno_enum; Operation result*/ |
| 181 | kal_uint16 cause; |
| 182 | kal_uint16 total; /* Number of entries*/ |
| 183 | } l4cphb_read_cnf_struct; |
| 184 | |
| 185 | typedef struct { |
| 186 | LOCAL_PARA_HDR |
| 187 | kal_uint8 src_id; /* Required for L4C*/ |
| 188 | phb_type_enum type; /* phb_type_enum; Type of phone number entries*/ |
| 189 | kal_uint16 total; /* Number of entires to piggyback*/ |
| 190 | } l4cphb_write_req_struct; |
| 191 | |
| 192 | typedef struct { |
| 193 | LOCAL_PARA_HDR |
| 194 | kal_uint8 src_id; /* The `src_id' of the corresponding reqest is forwarded back in this field.*/ |
| 195 | phb_errno_enum result; /* phb_errno_enum; Operation result*/ |
| 196 | kal_uint16 cause; |
| 197 | kal_uint16 total; /* Number of entries*/ |
| 198 | kal_uint16 old_index; |
| 199 | } l4cphb_write_cnf_struct; |
| 200 | |
| 201 | typedef struct { |
| 202 | LOCAL_PARA_HDR |
| 203 | kal_uint8 src_id; /* Required for L4C*/ |
| 204 | phb_type_enum type; /* phb_type_enum; Type of phone number entries*/ |
| 205 | kal_uint8 num_index; |
| 206 | phb_storage_enum storage; |
| 207 | kal_uint8 total_piggyback; /* Number of entires to piggyback*/ |
| 208 | kal_uint16 index; /* Index of phone number entries*/ |
| 209 | kal_uint16 total; /* Number of entries*/ |
| 210 | kal_uint16 record_index; |
| 211 | } l4cphb_delete_req_struct; |
| 212 | |
| 213 | typedef struct { |
| 214 | LOCAL_PARA_HDR |
| 215 | kal_uint8 src_id; /* The 'src_id' of the corresponding reqest is forwarded back in this field.*/ |
| 216 | phb_errno_enum result; /* phb_errno_enum; Operation result*/ |
| 217 | kal_uint16 cause; |
| 218 | kal_uint16 total; /* Number of entries*/ |
| 219 | phb_type_enum type; |
| 220 | kal_uint16 old_index; |
| 221 | } l4cphb_delete_cnf_struct; |
| 222 | |
| 223 | typedef struct { |
| 224 | LOCAL_PARA_HDR |
| 225 | kal_uint8 src_id; /* Required for L4C*/ |
| 226 | kal_uint16 total; /* Number of entires to piggyback*/ |
| 227 | phb_type_enum type; /* phb_type_enum; Type of phone number entries*/ |
| 228 | phb_query_method_enum pattern_tag; |
| 229 | union { |
| 230 | l4_name_struct alpha_id; |
| 231 | l4_addr_bcd_struct tel_number; |
| 232 | } pattern_value; |
| 233 | } l4cphb_search_req_struct; |
| 234 | |
| 235 | typedef struct { |
| 236 | LOCAL_PARA_HDR |
| 237 | kal_uint8 src_id; /* The 'src_id' of the corresponding reqest is forwarded back in this field.*/ |
| 238 | phb_errno_enum result; /* phb_errno_enum; Operation result*/ |
| 239 | kal_uint16 cause; |
| 240 | kal_uint16 total; /* Number of entries*/ |
| 241 | } l4cphb_search_cnf_struct; |
| 242 | |
| 243 | typedef struct { |
| 244 | LOCAL_PARA_HDR |
| 245 | kal_uint8 src_id; /* Required for L4C*/ |
| 246 | l4_addr_bcd_struct tel_number; /* The telephone number to be approved*/ |
| 247 | kal_uint8 is_retrieve; /* Whether retrieving the hit entry of the given number is required*/ |
| 248 | l4c_phb_approval_type_enum approval_type; /* l4c_phb_approval_type_enum */ |
| 249 | } l4cphb_approve_req_struct; |
| 250 | |
| 251 | typedef struct { |
| 252 | LOCAL_PARA_HDR |
| 253 | kal_uint8 src_id; /* The `src_id' of the corresponding reqest is forwarded back in this field.*/ |
| 254 | phb_errno_enum result; /* phb_errno_enum; Operation result*/ |
| 255 | kal_uint16 cause; |
| 256 | phb_type_enum type; /* phb_type_enum; Type of phone number entries*/ |
| 257 | kal_uint8 esc; |
| 258 | } l4cphb_approve_cnf_struct; |
| 259 | |
| 260 | |
| 261 | typedef struct |
| 262 | { |
| 263 | LOCAL_PARA_HDR |
| 264 | kal_uint8 src_id; |
| 265 | l4_addr_bcd_struct number; |
| 266 | } l4cphb_fdn_get_name_req_struct; |
| 267 | |
| 268 | typedef struct |
| 269 | { |
| 270 | LOCAL_PARA_HDR |
| 271 | kal_uint8 src_id; |
| 272 | phb_errno_enum result; |
| 273 | kal_uint16 cause; |
| 274 | l4_name_struct alpha_id; |
| 275 | } l4cphb_fdn_get_name_cnf_struct; |
| 276 | |
| 277 | /* __REL5__ */ |
| 278 | typedef struct { |
| 279 | kal_uint8 category; |
| 280 | l4_addr_bcd_struct tel_number; |
| 281 | }l4_ecc_number_struct; |
| 282 | |
| 283 | typedef struct { |
| 284 | LOCAL_PARA_HDR |
| 285 | kal_uint8 no_ecc; |
| 286 | l4_ecc_number_struct ecc_list[16]; |
| 287 | }l4cphb_update_nw_ecc_req_struct; |
| 288 | |
| 289 | typedef struct { |
| 290 | kal_uint8 max_name_len; |
| 291 | kal_uint8 max_num_len; |
| 292 | kal_uint16 free_num; |
| 293 | kal_uint16 total_num; |
| 294 | kal_uint16 ext_free_num; |
| 295 | }l4cphb_file_info_struct; |
| 296 | |
| 297 | typedef struct |
| 298 | { |
| 299 | LOCAL_PARA_HDR |
| 300 | kal_uint8 src_id; |
| 301 | phb_type_enum type; |
| 302 | kal_uint16 record_index; |
| 303 | kal_uint8 occurrence; |
| 304 | } l4cphb_read_usim_req_struct; |
| 305 | |
| 306 | typedef l4cphb_read_usim_req_struct l4cphb_write_usim_req_struct; |
| 307 | typedef l4cphb_read_usim_req_struct l4cphb_delete_usim_req_struct; |
| 308 | |
| 309 | typedef struct |
| 310 | { |
| 311 | LOCAL_PARA_HDR |
| 312 | kal_uint8 src_id; |
| 313 | phb_errno_enum result; |
| 314 | kal_uint16 cause; |
| 315 | phb_type_enum type; |
| 316 | kal_uint16 record_index; |
| 317 | kal_uint8 occurrence; |
| 318 | } l4cphb_read_usim_cnf_struct; |
| 319 | |
| 320 | typedef l4cphb_read_usim_cnf_struct l4cphb_write_usim_cnf_struct; |
| 321 | typedef l4cphb_read_usim_cnf_struct l4cphb_delete_usim_cnf_struct; |
| 322 | |
| 323 | typedef struct |
| 324 | { |
| 325 | LOCAL_PARA_HDR |
| 326 | kal_uint8 src_id; |
| 327 | kal_uint8 file_bitmap[PHB_TYPE_TOTAL]; |
| 328 | kal_uint16 record_index; |
| 329 | } l4cphb_check_write_usim_entry_req_struct; |
| 330 | |
| 331 | typedef struct |
| 332 | { |
| 333 | LOCAL_PARA_HDR |
| 334 | kal_uint8 src_id; |
| 335 | phb_errno_enum result; |
| 336 | kal_uint8 occurrence; |
| 337 | kal_uint16 record_index; |
| 338 | } l4cphb_check_write_usim_entry_cnf_struct; |
| 339 | |
| 340 | |
| 341 | //MSG_ID_L4C_PHB_UT_REQ |
| 342 | typedef struct |
| 343 | { |
| 344 | LOCAL_PARA_HDR |
| 345 | kal_bool update_phb_user; |
| 346 | kal_uint32 phb_user; |
| 347 | |
| 348 | kal_bool update_phb_current_action; |
| 349 | kal_uint16 phb_current_action; |
| 350 | |
| 351 | kal_bool update_phb_ready_flag; |
| 352 | kal_bool phb_ready_flag; |
| 353 | |
| 354 | //l4_number_struct l4cphb_approve_req_string; |
| 355 | |
| 356 | kal_bool update_phb_update_from_crsm; |
| 357 | kal_bool phb_update_from_crsm; // update PHB record if CRSM is used |
| 358 | |
| 359 | kal_bool update_phb_approve_ussd; |
| 360 | kal_bool phb_approve_ussd; |
| 361 | |
| 362 | kal_bool update_is_fdn_change; |
| 363 | kal_bool is_fdn_change; |
| 364 | |
| 365 | }l4c_phb_ut_req_struct; |
| 366 | |
| 367 | |
| 368 | #endif |
| 369 | |
| 370 | |