1 /* 2 * Copyright (C) 2024 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 OHOS_TEL_RIL_ENUM_H 17 #define OHOS_TEL_RIL_ENUM_H 18 namespace OHOS { 19 namespace Telephony { 20 enum TelRilRegStatus { 21 NO_REG_MT_NO_SEARCH = 0, 22 REG_MT_HOME = 1, 23 NO_REG_MT_SEARCHING = 2, 24 REG_MT_REJECTED = 3, 25 REG_MT_UNKNOWN = 4, 26 REG_MT_ROAMING = 5, 27 REG_MT_EMERGENCY = 6, 28 }; 29 30 enum RegNotifyMode { 31 REG_NOT_NOTIFY = 0, /* AT command: +CREG,+CGREG,+CEREG,+C5GREG,n=0,Turn off notify function */ 32 REG_NOTIFY_STAT_ONLY, /* AT command: +CREG,+CGREG,+CEREG,+C5GREG,n=1,notify data format type 1 */ 33 REG_NOTIFY_STAT_LAC_CELLID, /* AT command: +CREG,+CGREG,+CEREG,+C5GREG,n=2,notify data format type 2 */ 34 }; 35 36 enum PinPukResultType { 37 UNLOCK_SUCCESS = 0, 38 UNLOCK_PASSWORD_ERR = 1, 39 UNLOCK_OTHER_ERR = 2, 40 }; 41 42 enum TelRilRatType { 43 NETWORK_TYPE_UNKNOWN = 0, /* indicates no cell information */ 44 NETWORK_TYPE_GSM, 45 NETWORK_TYPE_CDMA, 46 NETWORK_TYPE_WCDMA, 47 NETWORK_TYPE_TDSCDMA, 48 NETWORK_TYPE_LTE, 49 NETWORK_TYPE_NR 50 }; /* Radio Access Technology */ 51 52 enum SimStatus { 53 USIM_INVALID = 0, 54 USIM_VALID = 1, 55 USIM_CS_INVALID = 2, 56 USIM_PS_INVALID = 3, 57 USIM_CS_PS_INVALID = 4, 58 ROM_SIM = 240, 59 NO_USIM = 255, 60 }; 61 62 enum SimLockStatus { 63 SIM_CARD_UNLOCK = 0, 64 SIM_CARD_LOCK = 1, 65 }; 66 67 enum RoamStatus { 68 NO_ROAM = 0, 69 ROAMING = 1, 70 ROAM_UNKNOWN = 2, 71 }; 72 73 enum SrvStatus { 74 NO_SRV_SERVICE = 0, 75 RESTRICTED_SERVICE = 1, 76 SERVICE_VALID = 2, 77 REGIONAL_SERVICE = 3, 78 ENERGY_SAVING_SERVICE = 4, 79 }; 80 81 enum SrvDomain { 82 NO_DOMAIN_SERVICE = 0, 83 CS_SERVICE = 1, 84 PS_SERVICE = 2, 85 CS_PS_SERVICE = 3, 86 CS_PS_SEARCHING = 4, 87 CDMA_NOT_SUPPORT = 255, 88 }; 89 90 enum SysMode { 91 NO_SYSMODE_SERVICE = 0, 92 GSM_MODE = 1, 93 CDMA_MODE = 2, 94 WCDMA_MODE = 3, 95 TDSCDMA_MODE = 4, 96 WIMAX_MODE = 5, 97 LTE_MODE = 6, 98 LTE_CA_MODE = 7, 99 NR_MODE = 8, 100 }; 101 102 enum TelRilRadioTech { 103 RADIO_TECHNOLOGY_UNKNOWN = 0, 104 RADIO_TECHNOLOGY_GSM = 1, 105 RADIO_TECHNOLOGY_1XRTT = 2, 106 RADIO_TECHNOLOGY_WCDMA = 3, 107 RADIO_TECHNOLOGY_HSPA = 4, 108 RADIO_TECHNOLOGY_HSPAP = 5, 109 RADIO_TECHNOLOGY_TD_SCDMA = 6, 110 RADIO_TECHNOLOGY_EVDO = 7, 111 RADIO_TECHNOLOGY_EHRPD = 8, 112 RADIO_TECHNOLOGY_LTE = 9, 113 RADIO_TECHNOLOGY_LTE_CA = 10, 114 RADIO_TECHNOLOGY_IWLAN = 11, 115 RADIO_TECHNOLOGY_NR = 12, 116 RADIO_TECHNOLOGY_INVALID = 65535, 117 }; 118 119 /* reference 3GPP TS 24.008 V17.4.0 (2021-09) 120 * Unsuccessful PDP context activation initiated by the MS */ 121 enum PdpErrorReason { 122 PDP_ERR_NONE = 0, 123 PDP_ERR_RETRY, 124 PDP_ERR_UNKNOWN = 65535, /* Unknown error */ 125 PDP_ERR_OPERATOR_DETERMINED_BARRING = 8, /* Operator Determined Barring---No need to retry */ 126 PDP_ERR_SHORTAGE_RESOURCES = 26, /* insufficient resources */ 127 PDP_ERR_MISSING_OR_UNKNOWN_APN, /* missing or unknown APN---No need to retry */ 128 PDP_ERR_UNKNOWN_PDP_ADDR_OR_TYPE, /* unknown PDP address or PDP type---No need to retry */ 129 PDP_ERR_USER_VERIFICATION, /* user authentication failed---No need to retry */ 130 PDP_ERR_ACTIVATION_REJECTED_GGSN, /* activation rejected by GGSN, Serving GW or PDN GW---No need to retry */ 131 PDP_ERR_ACTIVATION_REJECTED_UNSPECIFIED, /* activation rejected, unspecified */ 132 PDP_ERR_SERVICE_OPTION_NOT_SUPPORTED, /* service option not supported---No need to retry */ 133 PDP_ERR_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED, /* requested service option not subscribed 134 * ---No need to retry */ 135 PDP_ERR_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER, /* service option temporarily out of order */ 136 PDP_ERR_NSAPI_ALREADY_USED, /* NSAPI already used---No need to retry */ 137 PDP_ERR_IPV4_ONLY_ALLOWED = 50, /* PDP type IPv4 only allowed---No need to retry */ 138 PDP_ERR_IPV6_ONLY_ALLOWED, /* PDP type IPv6 only allowed---No need to retry */ 139 PDP_ERR_IPV4V6_ONLY_ALLOWED = 57, /* PDP type IPv4v6 only allowed---No need to retry */ 140 PDP_ERR_NON_IP_ONLY_ALLOWED, /* PDP type non IP only allowed---No need to retry */ 141 PDP_ERR_MAX_NUM_OF_PDP_CONTEXTS = 65, /* maximum number of PDP contexts reached---No need to retry */ 142 PDP_ERR_APN_NOT_SUPPORTED_IN_CURRENT_RAT_PLMN, /* requested APN not supported in current RAT 143 * and PLMN combination */ 144 PDP_ERR_PROTOCOL_ERRORS = 95, /* #95 - 111: protocol errors---No need to retry */ 145 PDP_ERR_APN_RESTRICTION_VALUE_INCOMPATIBLE = 112, /* APN restriction value incompatible 146 * with active PDP context */ 147 PDP_ERR_MULT_ACCESSES_PDN_NOT_ALLOWED = 113, /* Multiple accesses to a PDN connection not allowed */ 148 }; 149 150 enum NotificationFilter { 151 NOTIFICATION_FILTER_ALL = -1, 152 NOTIFICATION_FILTER_NONE = 0, 153 NOTIFICATION_FILTER_SIGNAL_STRENGTH = 1, 154 NOTIFICATION_FILTER_NETWORK_STATE = 2, 155 NOTIFICATION_FILTER_DATA_CALL = 4, 156 NOTIFICATION_FILTER_LINK_CAPACITY = 8, 157 NOTIFICATION_FILTER_PHYSICAL_CHANNEL_CONFIG = 16 158 }; 159 160 enum DeviceStateType { 161 TEL_POWER_SAVE_MODE, 162 TEL_CHARGING_STATE, 163 TEL_LOW_DATA_STATE 164 }; 165 166 enum CellConnectionStatus { 167 SERVING_CELL_UNKNOWN, 168 SERVING_CELL_PRIMARY, 169 SERVING_CELL_SECONDARY 170 }; 171 } // namespace Telephony 172 } // namespace OHOS 173 #endif // OHOS_TEL_RIL_ENUM_H 174