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_STORAGE_PDP_PROFILE_DATA_H 17 #define DATA_STORAGE_PDP_PROFILE_DATA_H 18 19 namespace OHOS { 20 namespace Telephony { 21 class PdpProfileData { 22 public: 23 static constexpr const char *PROFILE_ID = "profile_id"; 24 static constexpr const char *PROFILE_NAME = "profile_name"; 25 static constexpr const char *MCC = "mcc"; 26 static constexpr const char *MNC = "mnc"; 27 static constexpr const char *MCCMNC = "mccmnc"; 28 static constexpr const char *APN = "apn"; 29 static constexpr const char *AUTH_TYPE = "auth_type"; 30 static constexpr const char *AUTH_USER = "auth_user"; 31 static constexpr const char *AUTH_PWD = "auth_pwd"; 32 static constexpr const char *APN_TYPES = "apn_types"; 33 static constexpr const char *IS_ROAMING_APN = "is_roaming_apn"; 34 static constexpr const char *PROFILE_ENABLE = "profile_enable"; 35 static constexpr const char *HOME_URL = "home_url"; 36 static constexpr const char *PROXY_IP_ADDRESS = "proxy_ip_address"; 37 static constexpr const char *MMS_IP_ADDRESS = "mms_ip_address"; 38 static constexpr const char *APN_PROTOCOL = "apn_protocol"; 39 static constexpr const char *APN_ROAM_PROTOCOL = "apn_roam_protocol"; 40 static constexpr const char *BEARING_SYSTEM_TYPE = "bearing_system_type"; 41 }; 42 43 struct PdpProfile { 44 int profileId; 45 std::string profileName; 46 std::string mcc; 47 std::string mnc; 48 std::string apn; 49 int authType; 50 std::string authUser; 51 std::string authPwd; 52 std::string apnTypes; // see ApnType 53 int isRoamingApn; 54 std::string homeUrl; 55 std::string proxyIpAddress; 56 std::string mmsIpAddress; 57 std::string pdpProtocol; // see PdpProtocol 58 std::string roamPdpProtocol; 59 int bearingSystemType; // see BearingSystemType 60 }; 61 62 63 enum class ApnType { 64 DEFAULT, IMS, MMS, ALL 65 }; 66 67 enum class ApnAuthType { 68 None = 0, PAP, CHAP, PAP_OR_CHAP 69 }; 70 71 enum class PdpProtocol { 72 IPV4 = 0, IPV6, IPV4V6 73 }; 74 75 enum class BearingSystemType { 76 UNKNOWN = 0, 77 LTE, 78 HSPAP, 79 HSPA, 80 HSUPA, 81 HSDPA, 82 UMTS, 83 EDGE, 84 GPRS, 85 eHRPD, 86 EVDO_B, 87 EVDO_A, 88 EVDO_0, 89 xRTT, 90 IS95B, 91 IS95AS 92 }; 93 94 constexpr const char *TABLE_PDP_PROFILE = "pdp_profile"; 95 constexpr const char *TEMP_TABLE_PDP_PROFILE = "temp_pdp_profile"; 96 constexpr const char *PDP_PROFILE_URI = "dataability:///com.ohos.pdpprofileability"; 97 } // namespace Telephony 98 } // namespace OHOS 99 #endif // DATA_STORAGE_PDP_PROFILE_DATA_H 100