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_CONNECTION_PARAMS_H
17#define DATA_CONNECTION_PARAMS_H
18
19#include <utility>
20
21#include "inner_event.h"
22
23#include "apn_holder.h"
24
25namespace OHOS {
26namespace Telephony {
27class DataConnectionParams {
28public:
29    DataConnectionParams(
30        sptr<ApnHolder> apnHolder, int32_t profileId, int32_t radioTechnology, bool nonTrafficUseOnly,
31        bool roamingState, bool userDataRoaming)
32        : apnHolder_(std::move(apnHolder)), profileId_(profileId), rat_(radioTechnology), roamingState_(roamingState),
33        userRoaming_(userDataRoaming), nonTrafficUseOnly_(nonTrafficUseOnly)
34    {}
35
36    ~DataConnectionParams() = default;
37
38    const sptr<ApnHolder> &GetApnHolder() const
39    {
40        return apnHolder_;
41    }
42
43    void SetApnHolder(const sptr<ApnHolder> &apnHolder)
44    {
45        apnHolder_ = apnHolder;
46    }
47
48    int32_t GetProfileId() const
49    {
50        return profileId_;
51    }
52
53    void SetProfileId(int32_t profileId)
54    {
55        profileId_ = profileId;
56    }
57
58    int32_t GetRat() const
59    {
60        return rat_;
61    }
62
63    void SetRat(int32_t rat)
64    {
65        rat_ = rat;
66    }
67
68    bool IsNonTrafficUseOnly() const
69    {
70        return nonTrafficUseOnly_;
71    }
72
73    void SetNonTrafficUseOnly(bool nonTrafficUseOnly)
74    {
75        nonTrafficUseOnly_ = nonTrafficUseOnly;
76    }
77
78    bool GetRoamingState() const
79    {
80        return roamingState_;
81    }
82
83    void SetRoamingState(bool roamingState)
84    {
85        roamingState_ = roamingState;
86    }
87
88    bool GetUserDataRoaming() const
89    {
90        return userRoaming_;
91    }
92
93    void GetUserDataRoaming(bool userDataRoaming)
94    {
95        userRoaming_ = userDataRoaming;
96    }
97private:
98    DataConnectionParams(const DataConnectionParams &dataConnectionParams) = default;
99    DataConnectionParams &operator=(const DataConnectionParams &dataConnectionParams) = default;
100
101private:
102    sptr<ApnHolder> apnHolder_;
103    int32_t profileId_;
104    int32_t rat_;
105    bool roamingState_;
106    bool userRoaming_;
107    bool nonTrafficUseOnly_;
108};
109} // namespace Telephony
110} // namespace OHOS
111#endif // DATA_CONNECTION_PARAMS_H
112