NVRAM_LID_Parsing.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:6k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * NVRAM_LID_Parsing.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * META NVRAM LID parsing source
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- //------------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "NVRAM_LID_Parsing.h"
- //------------------------------------------------------------------------------
- char LID_String[][50] ={
- // system LID
- "NVRAM_EF_SYS_EXCEPTION_LID", // 0
- "NVRAM_EF_SYS_STATISTICS_LID",// 1
- "NVRAM_EF_SYS_RESERVED0_LID", // 2
- "NVRAM_EF_SYS_RESERVED1_LID", // 3
- "NVRAM_EF_SYS_RESERVED2_LID", // 4
- "NVRAM_EF_SYS_RESERVED3_LID", // 5
- "NVRAM_EF_SYS_RESERVED4_LID", // 6
- "NVRAM_EF_SYS_RESERVED5_LID", // 7
- "NVRAM_EF_SYS_RESERVED6_LID", // 8
- "NVRAM_EF_SYS_RESERVED7_LID", // 9
- "NVRAM_EF_SYS_RESERVED8_LID", // 10
- "NVRAM_EF_SYS_RESERVED9_LID", // 11
- // L1 LID
- "NVRAM_EF_L1_AGCPATHLOSS_LID", // 12
- "NVRAM_EF_L1_RAMPTABLE_GSM900_LID", // 13
- "NVRAM_EF_L1_RAMPTABLE_DCS1800_LID", // 14
- "NVRAM_EF_L1_RAMPTABLE_PCS1900_LID", // 15
- "NVRAM_EF_L1_AFCDATA_LID", // 15
- "NVRAM_EF_L1_L1SPFC_LID", // 16
- "NVRAM_EF_L1_TXIQ_LID", // 17
- // other LID
- "NVRAM_EF_TST_FILTER_LID", // 18
- "NVRAM_EF_MSCAP_LID", // 19
- "NVRAM_EF_IMEI_IMEISV_LID",// 20
- "NVRAM_EF_IMSI_LID", // 21
- "NVRAM_EF_CLASSMARK1_LID", // 22
- "NVRAM_EF_CLASSMARK2_LID", // 23
- "NVRAM_EF_CLASSMARK3_LID", // 24
- "NVRAM_EF_EXTBCCH1_LID", // 25
- "NVRAM_EF_EXTBCCH2_LID", // 26
- "NVRAM_EF_MS_SECURITY_LID",// 27
- "NVRAM_EF_DRX_PARAM_LID", // 28
- "NVRAM_EF_MS_RA_CAP_LID", // 29
- "NVRAM_EF_MS_NW_CAP_LID", // 30
- "NVRAM_EF_ADC_LID", // 31
- "NVRAM_EF_PHB_LID", // 32
- "NVRAM_EF_UEM_MANUFACTURE_DATA_LID", // 33
- "NVRAM_EF_UEM_RMI_DATA_LID", // 34
- "NVRAM_EF_UEM_ACOUSTIC_DATA_LID", // 35
- "NVRAM_EF_SMSAL_COMMON_PARAM_LID", // 36
- "NVRAM_EF_SMSAL_MWIS_LID", // 37
- "NVRAM_EF_SMSAL_MAILBOX_ADDR_LID", // 38
- "NVRAM_EF_SMSAL_SMS_LID", // 39
- "NVRAM_EF_SMS_LIB_LID", // 40
- "NVRAM_EF_RAC_PREFERENCE_LID", // 41
- "NVRAM_EF_TCM_STATISTICS_LID", // 42
- "NVRAM_EF_TCM_PDP_PROFILE_LID", // 43
- "NVRAM_EF_LAST_LID_VENDOR" // 44
- } ;
- #if 0
- //--------------------------------------------------------------------------
- int Determine_LID_Category(char *LID_Name_para)
- {
- int i;
- for(i = 0; i < LAST_LID_NUM; i++)
- {
- if(strcmp(LID_Name_para, LID_String[i]) == STRING_EQUAL)
- {
- if( i >= SYSTEM_LID_MIN_NUM && i<= SYSTEM_LID_MAX_NUM)
- return SYSTEM_RELATED_LID_CATEGORY;
- else if( i >= L1_CALIBRATION_LID_MIN_NUM && i<= L1_CALIBRATION_LID_MAX_NUM)
- return L1_CALIBRATION_LID_CATEGORY;
- else
- return OTHER_LID_CATEGORY;
- }
- }
- return OTHER_LID_CATEGORY;
- }
- #endif
- //--------------------------------------------------------------------------
- int Determine_LID_Category(char *LID_Name_para)
- {
- AnsiString as_LID_Name = LID_Name_para;
- if( as_LID_Name.Pos("NVRAM_EF_SYS") )
- {
- return SYSTEM_RELATED_LID_CATEGORY;
- }
- else if( as_LID_Name.Pos("NVRAM_EF_L1") )
- {
- return L1_CALIBRATION_LID_CATEGORY;
- }
- else
- return OTHER_LID_CATEGORY;
- }