• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 OHOS_RIL_DATA_PARCEL_H
17 #define OHOS_RIL_DATA_PARCEL_H
18 
19 #include "hril_base_parcel.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 struct SetupDataCallResultInfo {
24     int32_t flag;
25     int32_t reason; /* Data call fail reason. success is 0 */
26     int32_t retryTime; /* if errorCode != 0, suggested retry time */
27     int32_t cid; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
28                   * specifies a particular PDP context definition. The parameter is local to the TE-MT interface
29                   * and is used in other PDP context-related commands. */
30     int32_t active; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
31                      * indicates the state of PDP context activation
32                      * 0 - deactivated
33                      * 1 - activated */
34     std::string type; /* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
35                        * specifies the type of packet data protocol. The default value is manufacturer specific. */
36     std::string netPortName; /* Network interface name */
37     std::string address; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
38                           * <local_addr and subnet_mask>: string type;
39                           * shows the IP address and subnet mask of the MT. The string is given as dot-separated
40                           * numeric (0-255) parameters on the form: "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
41                           * "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
42                           * m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
43                           * When +CGPIAF is supported, its settings can influence the format of this parameter
44                           * returned with the execute form of +CGCONTRDP */
45     std::string dns; /* If the MT indicates more than two IP addresses of P-CSCF servers
46                       * string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported, its
47                       * settings can influence the format of this parameter returned with the execute form of
48                       * +CGCONTRDP. */
49     std::string dnsSec; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
50                          * string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported,
51                          * its settings can influence the format of this parameter returned with the execute form of
52                          * +CGCONTRDP. */
53     std::string gateway; /* network gateway address */
54     int32_t maxTransferUnit; /* Maximum Transfer Unit. The range of permitted values (minimum value = 1
55                               * or if the initial PDP context is supported minimum value = 0)
56                               * is returned by the test form of the command. */
57     std::string pCscfPrimAddr; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
58                                 * string type; shows the IP address of the primary P-CSCF server.When +CGPIAF is
59                                 * supported, its settings can influence the format of this parameter returned with
60                                 * the execute form of +CGCONTRDP. */
61     std::string pCscfSecAddr; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
62                                * string type; shows the IP address of the secondary P-CSCF server. When +CGPIAF is
63                                * supported, its settings can influence the format of this parameter returned with the
64                                * execute form of +CGCONTRDP. */
65     int32_t pduSessionId; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
66                            * integer type; identifies the PDU session, see 3GPP TS 24.501 [161]. */
67 };
68 
69 struct DataCallResultList {
70     size_t size; /* Size of DataCall List */
71     std::vector<SetupDataCallResultInfo> dcList; /* DataCall List */
72 };
73 
74 /* from 3GPP TS 27.007 10.1 V4.3.0 (2001-12) */
75 struct DataProfileDataInfo {
76     int32_t serial;
77     int32_t profileId; /* Id of data profiles */
78     std::string apn; /* (Access Point Name) a string parameter
79                       * which is a logical name that is used to select the GGSN or the */
80     std::string protocol; /* (Packet Data Protocol type) a string parameter which
81                            * specifies the type of packet data protocol */
82     std::string roamingProtocol;
83     int32_t verType; /* APN verification type */
84     std::string userName;
85     std::string password;
86 };
87 
88 struct DataProfilesInfo {
89     int32_t serial;
90     int32_t profilesSize;
91     std::vector<DataProfileDataInfo> profiles;
92     bool isRoaming;
93 };
94 
95 struct DataCallInfo {
96     int32_t serial;
97     int32_t radioTechnology; /* Voice radio technology */
98     DataProfileDataInfo dataProfileInfo;
99     bool modemCognitive; /* 1: APN setting setDataProfile. 0: no */
100     bool roamingAllowed;
101     bool isRoaming;
102 };
103 
104 struct DataLinkBandwidthInfo {
105     int32_t serial;
106     int32_t cid; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
107                   * integer type; specifies a particular QoS flow definition, Traffic Flows
108                   * definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT commands). */
109     int32_t qi; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
110                  * 0 5QI is selected by network
111                  * [1 - 4]	value range for guaranteed bit rate QoS flows
112                  * 65, 66, 67 values for guaranteed bit rate QoS flows
113                  * [71 - 76] value range for guaranteed bit rate QoS flows
114                  * [5 - 9] value range for non-guaranteed bit rate QoS flows
115                  * 69, 70, 79, 80 values for non-guaranteed bit rate QoS flows
116                  * [82 - 85] value range for delay critical guaranteed bit rate QoS flows
117                  * [128 - 254] value range for Operator-specific 5QIs */
118     int32_t dlGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
119                      * integer type; indicates DL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
120                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]) */
121     int32_t ulGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
122                      * integer type; indicates UL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
123                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
124     int32_t dlMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
125                      * integer type; indicates DL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
126                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
127     int32_t ulMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
128                      * integer type; indicates UL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
129                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
130     int32_t ulSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
131                       * integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
132                       * The value is in kbit /s. */
133     int32_t dlSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
134                       * integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
135                       * The value is in kbit/ s. */
136     int32_t averagingWindow; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
137                               * integer type; indicates the averaging window(see 3GPP TS 24.501 [161]) .The value is
138                               * in milliseconds. */
139 };
140 
141 struct DataLinkBandwidthReportingRule {
142     int32_t serial;
143     int32_t rat;
144     int32_t delayMs;
145     int32_t delayUplinkKbps;
146     int32_t delayDownlinkKbps;
147     int32_t maximumUplinkKbpsSize;
148     int32_t maximumDownlinkKbpsSize;
149     std::vector<int32_t> maximumUplinkKbps;
150     std::vector<int32_t> maximumDownlinkKbps;
151 };
152 
153 struct DataPerformanceInfo {
154     int32_t performanceEnable; /* Data Performance Enable. eg: 1-enable, 0-disable */
155     int32_t enforce; /* Whether Enforce Data Performance. eg: 1-enable, 0-disable */
156 };
157 
158 struct DataSleepInfo {
159     int32_t sleepEnable; /* Sleep Mode Enable. eg: 1-enable, 0-disable */
160 };
161 } // namespace Telephony
162 } // namespace OHOS
163 #endif // OHOS_RIL_DATA_PARCEL_H
164