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
21namespace OHOS {
22namespace Telephony {
23class DataSwitchSettings {
24public:
25    explicit 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 IsUserDataOn();
36    bool IsUserDataRoamingOn();
37    void UpdateUserDataRoamingOn(bool dataRoaming);
38    int32_t SetUserDataOn(bool userDataOn);
39    int32_t SetIntelliSwitchOn(bool userSwitchOn);
40    int32_t SetUserDataRoamingOn(bool dataRoamingEnabled);
41    int32_t QueryIntelligenceSwitchStatus(bool &switchEnabled);
42    int32_t QueryUserDataStatus(bool &dataEnabled);
43    int32_t QueryUserDataRoamingStatus(bool &dataRoamingEnabled);
44
45private:
46    bool internalDataOn_ = true;
47    bool userDataOn_ = true;
48    bool userDataRoaming_ = false;
49    bool policyDataOn_ = true;
50    bool carrierDataOn_ = false;
51    bool intelliSwitchOn_ = false;
52    const int32_t slotId_;
53};
54} // namespace Telephony
55} // namespace OHOS
56#endif // DATA_SWITCH_SETTINGS_H
57