• 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_CALL_PARCEL_H
17 #define OHOS_RIL_CALL_PARCEL_H
18 
19 #include "hril_base_parcel.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 /* From 3GPP TS 27.007 V4.3.0 (2001-12) 7.7, AT + ATD */
24 struct DialInfo {
25     int32_t serial;
26     std::string address;
27     int32_t clir; /* Calling Line Identification Restriction. From TS 27.007 V3.4.0 (2000-03) */
28 };
29 
30 struct GetClipResult {
31     int32_t result; /* query results */
32     int32_t action; /* parameter sets/shows the result code presentation status in the TA */
33     int32_t clipStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
34 };
35 
36 struct GetClirResult {
37     int32_t result; /* query results */
38     int32_t action; /* parameter sets/shows the result code presentation status in the TA */
39     int32_t clirStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
40 };
41 
42 struct CallWaitResult {
43     int32_t result; /* query results */
44     int32_t status; /* parameter sets/shows the result code presentation status in the TA */
45     int32_t classCw; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
46 };
47 
48 struct CallRestrictionResult {
49     int32_t result; /* query results */
50     int32_t status; /* parameter sets/shows the result code presentation status in the TA */
51     int32_t classCw; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
52 };
53 
54 struct CallInfo {
55     int32_t index;
56     int32_t dir;
57     int32_t state;
58     int32_t mode;
59     int32_t mpty;
60     int32_t voiceDomain;
61     int32_t callType;
62     std::string number;
63     int32_t type;
64     std::string alpha;
65 };
66 
67 struct CallInfoList {
68     int32_t callSize;
69     int32_t flag;
70     std::vector<CallInfo> calls;
71 };
72 
73 struct EmergencyInfo {
74     int32_t index;
75     int32_t total;
76     std::string eccNum;
77     int32_t category;
78     int32_t simpresent;
79     std::string mcc;
80     int32_t abnormalService;
81 };
82 
83 struct EmergencyInfoList {
84     int32_t callSize;
85     int32_t flag;
86     std::vector<EmergencyInfo> calls;
87 };
88 
89 struct CallForwardSetInfo {
90     int32_t serial;
91     int32_t reason;
92     int32_t mode;
93     std::string number;
94     int32_t classx;
95 };
96 
97 struct CallForwardQueryResult {
98     int32_t serial;
99     int32_t result; /* query results */
100     int32_t status;
101     int32_t classx;
102     std::string number;
103     int32_t type;
104     int32_t reason;
105     int32_t time;
106 };
107 
108 struct CallForwardQueryInfoList {
109     int32_t callSize;
110     int32_t flag;
111     std::vector<CallForwardQueryResult> calls;
112 };
113 
114 struct UssdNoticeInfo {
115     int32_t m; /* Integer value.
116                             0: The network does not require a TE reply (USSD-Notify initiated by the network or TE
117                             The network does not need further information after starting operation);
118                             1: The network needs a TE reply (USSD-Request initiated by the network, or TE sent
119                             After starting the operation, the network needs further information);
120                             2: The USSD session is released by the network;
121                             3: Other local clients have responded;
122                             4: The operation is not supported;
123                             5: The network timed out. */
124     std::string str; /* USSD string, the maximum length is 160 characters. */
125 };
126 
127 struct SsNoticeInfo {
128     int32_t serviceType;
129     int32_t requestType;
130     int32_t serviceClass;
131     int32_t result; /* the result of the SS request */
132 };
133 
134 /*
135  * Active reporting of SRVCC status is controlled by the +CIREP command.
136  * This command complies with the 3GPP TS 27.007 protocol.
137  */
138 struct SrvccStatus {
139     /*
140      * SRVCC status.
141      *  1: SRVCC starts;
142      *   2: SRVCC is successful;
143      *   3: SRVCC is cancelled;
144      *   4: SRVCC failed.
145      */
146     int32_t status;
147 };
148 
149 /*
150  * The ringback voice event reported by the modem during dialing.
151  * Note: Modem private commands, not a reported field specified by the 3gpp protocol.
152  */
153 struct RingbackVoice {
154     /* 0 network alerting; 1 local alerting */
155     int32_t status;
156 };
157 } // namespace Telephony
158 } // namespace OHOS
159 #endif // OHOS_RIL_CALL_PARCEL_H
160