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_INTERFACE_H
17 #define TELEPHONY_SATELLITE_CALL_INTERFACE_H
18 
19 #include "cellular_call_data_struct.h"
20 #include "iremote_broker.h"
21 #include "satellite_call_callback_interface.h"
22 #include "satellite_call_types.h"
23 
24 namespace OHOS {
25 namespace Telephony {
26 class SatelliteCallInterface : public IRemoteBroker {
27 public:
28     /**
29      * @brief Satellite dial the call interface
30      *
31      * @param SatelliteCallInfo Indicates the call detail information, contains phone number, slot id,
32      * video state, call index
33      * @param CLIRMode Indicates the CLIR mode, like default, transfer, inhibition
34      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
35      */
36     virtual int32_t Dial(const SatelliteCallInfo &callInfo, CLIRMode mode) = 0;
37 
38     /**
39      * @brief Satellite HangUp the call interface
40      *
41      * @param slotId Indicates the card slot index number
42      * @param index Indicates the call id
43      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
44      */
45     virtual int32_t HangUp(int32_t slotId, int32_t index) = 0;
46 
47     /**
48      * @brief Satellite Reject the call with reason interface
49      *
50      * @param slotId Indicates the card slot index number,
51      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
52      */
53     virtual int32_t Reject(int32_t slotId) = 0;
54 
55     /**
56      * @brief Satellite Answer the call interface
57      *
58      * @param slotId Indicates the card slot index number,
59      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
60      */
61     virtual int32_t Answer(int32_t slotId) = 0;
62 
63     /**
64      * @brief Get Satellite Calls Data Request
65      *
66      * @param slotId Indicates the card slot index number,
67      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
68      */
69     virtual int32_t GetSatelliteCallsDataRequest(int32_t slotId) = 0;
70 
71     /**
72      * @brief Register CallBack ptr
73      *
74      * @param sptr<SatelliteCallCallbackInterface>
75      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
76      */
77     virtual int32_t RegisterSatelliteCallCallback(const sptr<SatelliteCallCallbackInterface> &callback) = 0;
78 
79 public:
80     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.SatelliteCallInterface");
81 };
82 } // namespace Telephony
83 } // namespace OHOS
84 
85 #endif // TELEPHONY_SATELLITE_CALL_INTERFACE_H