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 DATA_SWITCH_SETTINGS_H 17 #define DATA_SWITCH_SETTINGS_H 18 19 #include <stdint.h> 20 21 namespace OHOS { 22 namespace Telephony { 23 class DataSwitchSettings { 24 public: 25 DataSwitchSettings(int32_t slotId); 26 ~DataSwitchSettings() = default; 27 void LoadSwitchValue(); 28 bool IsInternalDataOn() const; 29 void SetInternalDataOn(bool internalDataOn); 30 bool IsPolicyDataOn() const; 31 void SetPolicyDataOn(bool policyDataOn); 32 bool IsCarrierDataOn() const; 33 void SetCarrierDataOn(bool carrierDataOn); 34 bool IsAllowActiveData() const; 35 bool GetUserDataOn(); 36 void SetUserDataOn(bool userDataOn); 37 bool IsUserDataRoamingOn(); 38 void SetUserDataRoamingOn(bool dataRoamingEnabled); 39 40 private: 41 bool internalDataOn_ = false; 42 bool userDataOn_ = false; 43 bool userDataRoaming_ = false; 44 bool policyDataOn_ = true; 45 bool carrierDataOn_ = false; 46 const int32_t slotId_; 47 }; 48 } // namespace Telephony 49 } // namespace OHOS 50 #endif // DATA_SWITCH_SETTINGS_H 51