• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 #ifndef APN_ATTRIBUTE_H
16 #define APN_ATTRIBUTE_H
17 
18 #include "apn_item.h"
19 #include "parcel.h"
20 namespace OHOS {
21 namespace Telephony {
22 constexpr static int ALL_APN_ITEM_CHAR_LENGTH = 256;
23 struct ApnAttribute final : public Parcelable {
24     std::string types_;
25     std::string numeric_;
26     int32_t profileId_ = 0;
27     std::string protocol_;
28     std::string roamingProtocol_;
29     int32_t authType_ = 0;
30     std::string apn_;
31     std::string apnName_;
32     std::string user_;
33     std::string password_;
34     bool isRoamingApn_ = false;
35     std::string homeUrl_;
36     std::string proxyIpAddress_;
37     std::string mmsIpAddress_;
38     bool isEdited_ = false;
39 
40     bool Marshalling(Parcel &parcel) const override;
41     static ApnAttribute* Unmarshalling(Parcel &parcel);
42 
43     static void TransferApnAttributeBeforeIpc(ApnItem::Attribute &apnAttr, ApnAttribute &apnAfterTrans);
44     static void TransferApnAttributeAfterIpc(ApnItem::Attribute &apnAttr, ApnAttribute &apnAfterTrans);
45 };
46 }
47 }
48 #endif //APN_ATTRIBUTE_H
49