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 CELLULAR_DATA_TYPES_H 17 #define CELLULAR_DATA_TYPES_H 18 19 #include <cstdint> 20 21 namespace OHOS { 22 namespace Telephony { 23 enum class DataConnectionStatus : int32_t { 24 DATA_STATE_DISCONNECTED = 11, 25 DATA_STATE_CONNECTING = 12, 26 DATA_STATE_CONNECTED = 13, 27 DATA_STATE_SUSPENDED = 14 28 }; 29 30 enum class CellDataFlowType : int32_t { 31 DATA_FLOW_TYPE_NONE = 0, 32 DATA_FLOW_TYPE_DOWN = 1, 33 DATA_FLOW_TYPE_UP = 2, 34 DATA_FLOW_TYPE_UP_DOWN = 3, 35 DATA_FLOW_TYPE_DORMANT = 4 36 }; 37 38 enum class DataSwitchCode : int32_t { 39 CELLULAR_DATA_DISABLED = 0, 40 CELLULAR_DATA_ENABLED = 1 41 }; 42 43 enum class RoamingSwitchCode : int32_t { 44 CELLULAR_DATA_ROAMING_DISABLED = 0, 45 CELLULAR_DATA_ROAMING_ENABLED = 1 46 }; 47 48 enum class DataRespondCode : int32_t { 49 SET_FAILED = 0, 50 SET_SUCCESS = 1 51 }; 52 53 enum class RequestNetCode : int32_t { 54 REQUEST_FAILED = 0, 55 REQUEST_SUCCESS = 1 56 }; 57 } // namespace Telephony 58 } // namespace OHOS 59 #endif // CELLULAR_DATA_TYPES_H