1 /*
2  * Copyright (C) 2023 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 TELEPHONY_SATELLITE_CALL_TYPES_H
17 #define TELEPHONY_SATELLITE_CALL_TYPES_H
18 
19 #include "call_manager_errors.h"
20 #include "call_manager_inner_type.h"
21 #include "tel_ril_call_parcel.h"
22 
23 namespace OHOS {
24 namespace Telephony {
25 
26 /**
27  * @brief Indicates the information of SatelliteCall.
28  */
29 struct SatelliteCallInfo {
30     /**
31      * Indicates the call phone number,its initial value is 0.
32      */
33     char phoneNum[kMaxNumberLen] = { 0 };
34     /**
35      * Indicates the slotId.
36      */
37     int32_t slotId = 0;
38     /**
39      * Indicates the call index and its initial value is 0.
40      */
41     int32_t index = 0;
42 };
43 
44 /**
45  * @brief Indicates the call status information.
46  */
47 struct SatelliteCurrentCall {
48     /**
49      * Indicates connection Index for use with, eg, AT+CHLD.
50      */
51     int32_t index = 0;
52     /**
53      * Indicates the call direction, The value 0 indicates mobile originated (MO) call,
54      * and the value 1 indicates mobile terminated (MT) call.
55      */
56     int32_t dir = 0;
57     /**
58      * Indicates the call state:
59      * - 0: activated state
60      * - 1: holding state
61      * - 2: MO call, dialing state
62      * - 3: MO call, alerting state
63      * - 4: MT call, incoming call state
64      * - 5: MT call, call waiting state
65      */
66     int32_t state = 0;
67     /**
68      * Indicates the call mode:
69      * - 0: voice call
70      * - 1: data call
71      * - 2: fax
72      */
73     int32_t mode = 0;
74     /**
75      * Indicates the multiparty call status:
76      * - 0: not one of multiparty (conference) call parties
77      * - 1: one of multiparty (conference) call parties
78      */
79     int32_t mpty = 0;
80     /**
81      * Identifies the service domain:
82      * - 0: CS domain phone
83      * - 1: IMS domain phone
84      */
85     int32_t voiceDomain = 0;
86     /**
87      * Indicates the call type:
88      * - 0: Voice call
89      * - 1: VT_TX Video call: send one-way video, two-way voice
90      * - 2: VT_RX Video call: one-way receiving video, two-way voice
91      * - 3: VT Video call: two-way video, two-way voice
92      */
93     int32_t callType = 0;
94     /**
95      * Indicates remote party number.
96      */
97     std::string number = "";
98     /**
99      * Indicates the type of address octet in integer format.
100      */
101     int32_t type = 0;
102     /**
103      * Indicates alphanumeric representation of <number> corresponding to the entry found in phonebook;
104      */
105     std::string alpha = "";
106     /**
107      * Indicates the type of address, eg 145 = intl.
108      */
109     int32_t toa = 0;
110 };
111 
112 /**
113  * @brief Indicates the call status information list.
114  */
115 struct SatelliteCurrentCallList {
116     /**
117      * Indicates the size of call status information list.
118      */
119     int32_t callSize = 0;
120     /**
121      * Indicates the ID of call status information list.
122      */
123     int32_t flag = 0;
124     /**
125      * Indicates the call status information list.
126      */
127     std::vector<SatelliteCurrentCall> calls {};
128 };
129 } // namespace Telephony
130 } // namespace OHOS
131 
132 #endif // TELEPHONY_SATELLITE_CALL_TYPES_H