1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef NAPI_RADIO_TYPES_H 17 #define NAPI_RADIO_TYPES_H 18 19 #include <cstdint> 20 21 #include "signal_information.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 enum class NetworkType : int32_t { 26 /** 27 * Indicates unknown network type. 28 */ 29 NETWORK_TYPE_UNKNOWN, 30 31 /** 32 * Indicates that the network type is GSM. 33 */ 34 NETWORK_TYPE_GSM, 35 36 /** 37 * Indicates that the network type is CDMA. 38 */ 39 NETWORK_TYPE_CDMA, 40 41 /** 42 * Indicates that the network type is WCDMA. 43 */ 44 NETWORK_TYPE_WCDMA, 45 46 /** 47 * Indicates that the network type is TD-SCDMA. 48 */ 49 NETWORK_TYPE_TDSCDMA, 50 51 /** 52 * Indicates that the network type is LTE. 53 */ 54 NETWORK_TYPE_LTE, 55 56 /** 57 * Indicates that the network type is 5G NR. 58 */ 59 NETWORK_TYPE_NR 60 }; 61 62 enum class RatType : int32_t { 63 /** 64 * Indicates unknown radio access technology (RAT). 65 */ 66 RADIO_TECHNOLOGY_UNKNOWN = 0, 67 68 /** 69 * Indicates that RAT is global system for mobile communications (GSM), 70 * including GSM, general packet radio system (GPRS), and enhanced data rates 71 * for GSM evolution (EDGE). 72 */ 73 RADIO_TECHNOLOGY_GSM = 1, 74 75 /** 76 * Indicates that RAT is code division multiple access (CDMA), including 77 * Interim Standard 95 (IS95) and Single-Carrier Radio Transmission Technology 78 * (1xRTT). 79 */ 80 RADIO_TECHNOLOGY_1XRTT = 2, 81 82 /** 83 * Indicates that RAT is wideband code division multiple address (WCDMA). 84 */ 85 RADIO_TECHNOLOGY_WCDMA = 3, 86 87 /** 88 * Indicates that RAT is high-speed packet access (HSPA), including HSPA, 89 * high-speed downlink packet access (HSDPA), and high-speed uplink packet 90 * access (HSUPA). 91 */ 92 RADIO_TECHNOLOGY_HSPA = 4, 93 94 /** 95 * Indicates that RAT is evolved high-speed packet access (HSPA+), including 96 * HSPA+ and dual-carrier HSPA+ (DC-HSPA+). 97 */ 98 RADIO_TECHNOLOGY_HSPAP = 5, 99 100 /** 101 * Indicates that RAT is time division-synchronous code division multiple 102 * access (TD-SCDMA). 103 */ 104 RADIO_TECHNOLOGY_TD_SCDMA = 6, 105 106 /** 107 * Indicates that RAT is evolution data only (EVDO), including EVDO Rev.0, 108 * EVDO Rev.A, and EVDO Rev.B. 109 */ 110 RADIO_TECHNOLOGY_EVDO = 7, 111 112 /** 113 * Indicates that RAT is evolved high rate packet data (EHRPD). 114 */ 115 RADIO_TECHNOLOGY_EHRPD = 8, 116 117 /** 118 * Indicates that RAT is long term evolution (LTE). 119 */ 120 RADIO_TECHNOLOGY_LTE = 9, 121 122 /** 123 * Indicates that RAT is LTE carrier aggregation (LTE-CA). 124 */ 125 RADIO_TECHNOLOGY_LTE_CA = 10, 126 127 /** 128 * Indicates that RAT is interworking WLAN (I-WLAN). 129 */ 130 RADIO_TECHNOLOGY_IWLAN = 11, 131 132 /** 133 * Indicates that RAT is 5G new radio (NR). 134 */ 135 RADIO_TECHNOLOGY_NR = 12 136 }; 137 138 enum class NsaState : int32_t { 139 /** 140 * Indicates that a device is idle under or is connected to an LTE cell that does not support NSA. 141 */ 142 NSA_STATE_NOT_SUPPORT = 1, 143 144 /** 145 * Indicates that a device is idle under an LTE cell supporting NSA but not NR coverage detection. 146 */ 147 NSA_STATE_NO_DETECT = 2, 148 149 /** 150 * Indicates that a device is connected to an LTE network under an LTE cell 151 * that supports NSA and NR coverage detection. 152 */ 153 NSA_STATE_CONNECTED_DETECT = 3, 154 155 /** 156 * Indicates that a device is idle under an LTE cell supporting NSA and NR coverage detection. 157 */ 158 NSA_STATE_IDLE_DETECT = 4, 159 160 /** 161 * Indicates that a device is connected to an LTE + NR network under an LTE cell that supports NSA. 162 */ 163 NSA_STATE_DUAL_CONNECTED = 5, 164 165 /** 166 * Indicates that a device is idle under or is connected to an NG-RAN cell while being attached to 5GC. 167 */ 168 NSA_STATE_SA_ATTACHED = 6 169 }; 170 171 enum RegStatus { 172 /** 173 * Indicates a state in which a device cannot use any service. 174 */ 175 REGISTRATION_STATE_NO_SERVICE = 0, 176 177 /** 178 * Indicates a state in which a device can use services properly. 179 */ 180 REGISTRATION_STATE_IN_SERVICE = 1, 181 182 /** 183 * Indicates a state in which a device can use only the emergency call service. 184 */ 185 REGISTRATION_STATE_EMERGENCY_CALL_ONLY = 2, 186 187 /** 188 * Indicates that the cellular radio is powered off. 189 */ 190 REGISTRATION_STATE_POWER_OFF = 3 191 }; 192 } // namespace Telephony 193 } // namespace OHOS 194 #endif // NAPI_RADIO_TYPES_H