blob: 2b215cda668ba210e59d505cb911768b14271b46 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* Copyright Statement:
2 *
3 * This software/firmware and related documentation ("MediaTek Software") are
4 * protected under relevant copyright laws. The information contained herein
5 * is confidential and proprietary to MediaTek Inc. and/or its licensors.
6 * Without the prior written permission of MediaTek inc. and/or its licensors,
7 * any reproduction, modification, use or disclosure of MediaTek Software,
8 * and information contained herein, in whole or in part, shall be strictly prohibited.
9 *
10 * MediaTek Inc. (C) 2016. All rights reserved.
11 *
12 * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
13 * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
14 * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
15 * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
18 * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
19 * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
20 * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
21 * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
22 * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
23 * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
24 * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
25 * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
26 * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
27 * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
28 * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
29 * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
30 *
31 * The following software/firmware and/or related documentation ("MediaTek Software")
32 * have been modified by MediaTek Inc. All revisions are subject to any receiver's
33 * applicable license agreements with MediaTek Inc.
34 */
35
36#ifndef SRC_UTIL_WORLDPHONEUTIL_H_
37#define SRC_UTIL_WORLDPHONEUTIL_H_
38
39#include <string>
40
41class WorldPhoneUtil {
42private:
43 static const int ACTIVE_MD_TYPE_UNKNOWN;
44 static const int ACTIVE_MD_TYPE_WG;//3G(WCDMA)+2G(GSM)
45 static const int ACTIVE_MD_TYPE_TG;//3G(TDS-CDMA)+2G(GSM)
46 static const int ACTIVE_MD_TYPE_LWG;//4G(TDD-LTE+FDD-LTE)+3G(WCDMA)+2G(GSM)
47 static const int ACTIVE_MD_TYPE_LTG;//4G(TDD-LTE+FDD-LTE)+3G(TDS-CDMA)+2G(GSM)
48 //4G(TDD-LTE+FDD-LTE)+3G(WCDMA+EVDO)+2G(GSM+CDMA2000)
49 static const int ACTIVE_MD_TYPE_LWCG;
50 static const int ACTIVE_MD_TYPE_LtTG;//4G(TDD-LTE)+3G(TDS-CDMA)+2G(GSM)
51 static const int ACTIVE_MD_TYPE_LfWG;//4G(FDD-LTE)+3G(WCDMA)+2G(GSM)
52
53
54 static const int MD_TYPE_UNKNOWN;
55 static const int MD_TYPE_WG;
56 static const int MD_TYPE_TG;
57 static const int MD_TYPE_LWG;
58 static const int MD_TYPE_LTG;
59 static const int MD_TYPE_FDD;
60 static const int MD_TYPE_TDD;
61
62 static const int MD_WORLD_MODE_UNKNOWN;
63 static const int MD_WORLD_MODE_LTG; //uLTG
64 static const int MD_WORLD_MODE_LWG; //uLWG
65 static const int MD_WORLD_MODE_LWTG; //uLWTG
66 static const int MD_WORLD_MODE_LWCG; //uLWCG
67 static const int MD_WORLD_MODE_LWCTG; //uLWTCG(Auto mode)
68 static const int MD_WORLD_MODE_LTTG; //LtTG
69 static const int MD_WORLD_MODE_LFWG; //LfWG
70 static const int MD_WORLD_MODE_LFWCG; //uLfWCG
71 static const int MD_WORLD_MODE_LCTG; //uLCTG
72 static const int MD_WORLD_MODE_LTCTG; //uLtCTG
73 static const int MD_WORLD_MODE_LTWG; //uLtWG
74 static const int MD_WORLD_MODE_LTWCG; //uLTWCG
75 static const int MD_WORLD_MODE_LFTG; //uLfTG
76 static const int MD_WORLD_MODE_LFCTG; //uLfCTG
77
78 static std::string PROPERTY_RAT_CONFIG;
79 static std::string PROPERTY_ACTIVE_MD;
80 static std::string WCDMA;
81 static std::string TDSCDMA;
82 static std::string CDMA;
83 static const int UTRAN_DIVISION_DUPLEX_MODE_UNKNOWN;
84 static const int UTRAN_DIVISION_DUPLEX_MODE_FDD;
85 static const int UTRAN_DIVISION_DUPLEX_MODE_TDD;
86
87 // World mode result cause for EN.
88 static const int WORLD_MODE_RESULT_SUCCESS;
89 static const int WORLD_MODE_RESULT_ERROR;
90 static const int WORLD_MODE_RESULT_WM_ID_NOT_SUPPORT;
91
92 /* bitmask */
93 /* the defination must be sync with ratconfig.c */
94 static const int MASK_CDMA;
95 static const int MASK_LTEFDD;
96 static const int MASK_LTETDD;
97 static const int MASK_WCDMA;
98 static const int MASK_TDSCDMA;
99 static const int MASK_GSM;
100
101private:
102 static int getActiveModemType();
103public:
104 static const int MODEM_FDD;
105 static const int MODEM_TD;
106 static const int MODEM_NO3G;
107public:
108 WorldPhoneUtil();
109 virtual ~WorldPhoneUtil();
110 static bool isWorldPhoneSupport();
111 static bool isLteSupport();
112 static bool isWorldModeSupport();
113 static int get3GDivisionDuplexMode();
114 static int getWorldModeId();
115 static int getModemType();
116
117};
118
119#endif /* SRC_UTIL_WORLDPHONEUTIL_H_ */