1d95e75fdSopenharmony_ci/*
2d95e75fdSopenharmony_ci * Copyright (C) 2022-2023 Huawei Device Co., Ltd.
3d95e75fdSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4d95e75fdSopenharmony_ci * you may not use this file except in compliance with the License.
5d95e75fdSopenharmony_ci * You may obtain a copy of the License at
6d95e75fdSopenharmony_ci *
7d95e75fdSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8d95e75fdSopenharmony_ci *
9d95e75fdSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10d95e75fdSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11d95e75fdSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12d95e75fdSopenharmony_ci * See the License for the specific language governing permissions and
13d95e75fdSopenharmony_ci * limitations under the License.
14d95e75fdSopenharmony_ci */
15d95e75fdSopenharmony_ci
16d95e75fdSopenharmony_ci#ifndef TELEPHONY_IMS_CALL_INTERFACE_H
17d95e75fdSopenharmony_ci#define TELEPHONY_IMS_CALL_INTERFACE_H
18d95e75fdSopenharmony_ci
19d95e75fdSopenharmony_ci#include "cellular_call_data_struct.h"
20d95e75fdSopenharmony_ci#include "ims_call_callback_interface.h"
21d95e75fdSopenharmony_ci#include "ims_call_types.h"
22d95e75fdSopenharmony_ci#include "ims_feature.h"
23d95e75fdSopenharmony_ci#include "iremote_broker.h"
24d95e75fdSopenharmony_ci#include "surface.h"
25d95e75fdSopenharmony_ci
26d95e75fdSopenharmony_cinamespace OHOS {
27d95e75fdSopenharmony_cinamespace Telephony {
28d95e75fdSopenharmony_ciclass ImsCallInterface : public IRemoteBroker {
29d95e75fdSopenharmony_cipublic:
30d95e75fdSopenharmony_ci    /**
31d95e75fdSopenharmony_ci     * @brief IMS dial the call interface
32d95e75fdSopenharmony_ci     *
33d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
34d95e75fdSopenharmony_ci     * video state, call index
35d95e75fdSopenharmony_ci     * @param CLIRMode Indicates the CLIR mode, like default, transfer, inhibition
36d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
37d95e75fdSopenharmony_ci     */
38d95e75fdSopenharmony_ci    virtual int32_t Dial(const ImsCallInfo &callInfo, CLIRMode mode) = 0;
39d95e75fdSopenharmony_ci
40d95e75fdSopenharmony_ci    /**
41d95e75fdSopenharmony_ci     * @brief IMS HangUp the call interface
42d95e75fdSopenharmony_ci     *
43d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
44d95e75fdSopenharmony_ci     * video state, call index
45d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
46d95e75fdSopenharmony_ci     */
47d95e75fdSopenharmony_ci    virtual int32_t HangUp(const ImsCallInfo &callInfo) = 0;
48d95e75fdSopenharmony_ci
49d95e75fdSopenharmony_ci    /**
50d95e75fdSopenharmony_ci     * @brief IMS Reject the call with reason interface
51d95e75fdSopenharmony_ci     *
52d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
53d95e75fdSopenharmony_ci     * video state, call index
54d95e75fdSopenharmony_ci     * @param ImsRejectReason Indicated the reject reason, like user is busy or user decline
55d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
56d95e75fdSopenharmony_ci     */
57d95e75fdSopenharmony_ci    virtual int32_t RejectWithReason(const ImsCallInfo &callInfo, const ImsRejectReason &reason) = 0;
58d95e75fdSopenharmony_ci
59d95e75fdSopenharmony_ci    /**
60d95e75fdSopenharmony_ci     * @brief IMS Answer the call interface
61d95e75fdSopenharmony_ci     *
62d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
63d95e75fdSopenharmony_ci     * video state, call index
64d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
65d95e75fdSopenharmony_ci     */
66d95e75fdSopenharmony_ci    virtual int32_t Answer(const ImsCallInfo &callInfo) = 0;
67d95e75fdSopenharmony_ci
68d95e75fdSopenharmony_ci    /**
69d95e75fdSopenharmony_ci     * @brief Hold the Call
70d95e75fdSopenharmony_ci     *
71d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
72d95e75fdSopenharmony_ci     * @param callType Indicates the call type,
73d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
74d95e75fdSopenharmony_ci     */
75d95e75fdSopenharmony_ci    virtual int32_t HoldCall(int32_t slotId, int32_t callType) = 0;
76d95e75fdSopenharmony_ci
77d95e75fdSopenharmony_ci    /**
78d95e75fdSopenharmony_ci     * @brief UnHold the Call
79d95e75fdSopenharmony_ci     *
80d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
81d95e75fdSopenharmony_ci     * @param callType Indicates the type of video state, 0: voice, 1: video
82d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
83d95e75fdSopenharmony_ci     */
84d95e75fdSopenharmony_ci    virtual int32_t UnHoldCall(int32_t slotId, int32_t callType) = 0;
85d95e75fdSopenharmony_ci
86d95e75fdSopenharmony_ci    /**
87d95e75fdSopenharmony_ci     * @brief Switch the phone call between hold and unhold
88d95e75fdSopenharmony_ci     *
89d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
90d95e75fdSopenharmony_ci     * @param callType Indicates the type of video state, 0: voice, 1: video
91d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
92d95e75fdSopenharmony_ci     */
93d95e75fdSopenharmony_ci    virtual int32_t SwitchCall(int32_t slotId, int32_t callType) = 0;
94d95e75fdSopenharmony_ci
95d95e75fdSopenharmony_ci    /**
96d95e75fdSopenharmony_ci     * @brief Merge calls to form a conference
97d95e75fdSopenharmony_ci     *
98d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
99d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
100d95e75fdSopenharmony_ci     */
101d95e75fdSopenharmony_ci    virtual int32_t CombineConference(int32_t slotId) = 0;
102d95e75fdSopenharmony_ci
103d95e75fdSopenharmony_ci    /**
104d95e75fdSopenharmony_ci     * @brief Invite someone to conference
105d95e75fdSopenharmony_ci     *
106d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number
107d95e75fdSopenharmony_ci     * @param numberList phone number list which will be invited to the conference call
108d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
109d95e75fdSopenharmony_ci     */
110d95e75fdSopenharmony_ci    virtual int32_t InviteToConference(int32_t slotId, const std::vector<std::string> &numberList) = 0;
111d95e75fdSopenharmony_ci
112d95e75fdSopenharmony_ci    /**
113d95e75fdSopenharmony_ci     * @brief Kick out someone from conference
114d95e75fdSopenharmony_ci     *
115d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number
116d95e75fdSopenharmony_ci     * @param index Call index which will be kicked out from the conference call
117d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
118d95e75fdSopenharmony_ci     */
119d95e75fdSopenharmony_ci    virtual int32_t KickOutFromConference(int32_t slotId, int32_t index) = 0;
120d95e75fdSopenharmony_ci
121d95e75fdSopenharmony_ci    /**
122d95e75fdSopenharmony_ci     * @brief IMS SendUpdateCallMediaModeRequest interface
123d95e75fdSopenharmony_ci     *
124d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
125d95e75fdSopenharmony_ci     * video state, call index
126d95e75fdSopenharmony_ci     * @param ImsCallType Indicates the call media mode, like audio only, send only .etc.
127d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
128d95e75fdSopenharmony_ci     */
129d95e75fdSopenharmony_ci    virtual int32_t SendUpdateCallMediaModeRequest(const ImsCallInfo &callInfo, ImsCallType callType) = 0;
130d95e75fdSopenharmony_ci
131d95e75fdSopenharmony_ci    /**
132d95e75fdSopenharmony_ci     * @brief IMS SendUpdateCallMediaModeResponse interface
133d95e75fdSopenharmony_ci     *
134d95e75fdSopenharmony_ci     * @param ImsCallInfo Indicates the call detail information, contains phone number, slot id,
135d95e75fdSopenharmony_ci     * video state, call index
136d95e75fdSopenharmony_ci     * @param ImsCallType Indicates the call media mode, like audio only, send only .etc.
137d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
138d95e75fdSopenharmony_ci     */
139d95e75fdSopenharmony_ci    virtual int32_t SendUpdateCallMediaModeResponse(const ImsCallInfo &callInfo, ImsCallType callType) = 0;
140d95e75fdSopenharmony_ci
141d95e75fdSopenharmony_ci    /**
142d95e75fdSopenharmony_ci     * @brief Cancel Call Upgrade
143d95e75fdSopenharmony_ci     *
144d95e75fdSopenharmony_ci     * @param slotId Indicates the slot id
145d95e75fdSopenharmony_ci     * @param Indicates Indicates the call index number.
146d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
147d95e75fdSopenharmony_ci     */
148d95e75fdSopenharmony_ci    virtual int32_t CancelCallUpgrade(int32_t slotId, int32_t callIndex) = 0;
149d95e75fdSopenharmony_ci
150d95e75fdSopenharmony_ci    /**
151d95e75fdSopenharmony_ci     * @brief Request Camera Capabilities
152d95e75fdSopenharmony_ci     *
153d95e75fdSopenharmony_ci     * @param slotId Indicates the slot id
154d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
155d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
156d95e75fdSopenharmony_ci     */
157d95e75fdSopenharmony_ci    virtual int32_t RequestCameraCapabilities(int32_t slotId, int32_t callIndex) = 0;
158d95e75fdSopenharmony_ci
159d95e75fdSopenharmony_ci    /**
160d95e75fdSopenharmony_ci     * @brief Get Ims Calls Data Request
161d95e75fdSopenharmony_ci     *
162d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
163d95e75fdSopenharmony_ci     * @param lastCallsDataFlag The ims call data id, is a number in milliseconds
164d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
165d95e75fdSopenharmony_ci     */
166d95e75fdSopenharmony_ci    virtual int32_t GetImsCallsDataRequest(int32_t slotId, int64_t lastCallsDataFlag) = 0;
167d95e75fdSopenharmony_ci
168d95e75fdSopenharmony_ci    /**
169d95e75fdSopenharmony_ci     * @brief Get Last Call Fail Reason
170d95e75fdSopenharmony_ci     *
171d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
172d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
173d95e75fdSopenharmony_ci     */
174d95e75fdSopenharmony_ci    virtual int32_t GetLastCallFailReason(int32_t slotId) = 0;
175d95e75fdSopenharmony_ci
176d95e75fdSopenharmony_ci    /**
177d95e75fdSopenharmony_ci     * @brief start to paly a dtmf tone
178d95e75fdSopenharmony_ci     *
179d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
180d95e75fdSopenharmony_ci     * @param cDTMFCode A character indicate the DTMF digit for which to play the tone. This
181d95e75fdSopenharmony_ci     * value must be one of {0~9}, {*} or {#}.
182d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
183d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
184d95e75fdSopenharmony_ci     */
185d95e75fdSopenharmony_ci    virtual int32_t StartDtmf(int32_t slotId, char cDtmfCode, int32_t index) = 0;
186d95e75fdSopenharmony_ci
187d95e75fdSopenharmony_ci    /**
188d95e75fdSopenharmony_ci     * @brief play a dtmf tone
189d95e75fdSopenharmony_ci     *
190d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
191d95e75fdSopenharmony_ci     * @param cDtmfCode A character indicate the DTMF digit for which to play the tone. This
192d95e75fdSopenharmony_ci     * value must be one of {0~9}, {*} or {#}.
193d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
194d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
195d95e75fdSopenharmony_ci     */
196d95e75fdSopenharmony_ci    virtual int32_t SendDtmf(int32_t slotId, char cDtmfCode, int32_t index) = 0;
197d95e75fdSopenharmony_ci
198d95e75fdSopenharmony_ci    /**
199d95e75fdSopenharmony_ci     * @brief stop the playing dtmf tone
200d95e75fdSopenharmony_ci     *
201d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
202d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
203d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
204d95e75fdSopenharmony_ci     */
205d95e75fdSopenharmony_ci    virtual int32_t StopDtmf(int32_t slotId, int32_t index) = 0;
206d95e75fdSopenharmony_ci
207d95e75fdSopenharmony_ci    /**
208d95e75fdSopenharmony_ci     * @brief Start a RTT session
209d95e75fdSopenharmony_ci     *
210d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
211d95e75fdSopenharmony_ci     * @param msg the specific RTT msg
212d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
213d95e75fdSopenharmony_ci     */
214d95e75fdSopenharmony_ci    virtual int32_t StartRtt(int32_t slotId, const std::string &msg) = 0;
215d95e75fdSopenharmony_ci
216d95e75fdSopenharmony_ci    /**
217d95e75fdSopenharmony_ci     * @brief Terminate the current RTT session
218d95e75fdSopenharmony_ci     *
219d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
220d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
221d95e75fdSopenharmony_ci     */
222d95e75fdSopenharmony_ci    virtual int32_t StopRtt(int32_t slotId) = 0;
223d95e75fdSopenharmony_ci
224d95e75fdSopenharmony_ci    /**
225d95e75fdSopenharmony_ci     * @brief Set Domain Preference Mode
226d95e75fdSopenharmony_ci     *
227d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
228d95e75fdSopenharmony_ci     * @param mode indicate the domain preference, 1: CS only, 2: CS prefer, 3: PS prefer, 4: PS only
229d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
230d95e75fdSopenharmony_ci     */
231d95e75fdSopenharmony_ci    virtual int32_t SetDomainPreferenceMode(int32_t slotId, int32_t mode) = 0;
232d95e75fdSopenharmony_ci
233d95e75fdSopenharmony_ci    /**
234d95e75fdSopenharmony_ci     * @brief Get Domain Preference Mode
235d95e75fdSopenharmony_ci     *
236d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
237d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
238d95e75fdSopenharmony_ci     */
239d95e75fdSopenharmony_ci    virtual int32_t GetDomainPreferenceMode(int32_t slotId) = 0;
240d95e75fdSopenharmony_ci
241d95e75fdSopenharmony_ci    /**
242d95e75fdSopenharmony_ci     * @brief Set the ims switch status
243d95e75fdSopenharmony_ci     *
244d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
245d95e75fdSopenharmony_ci     * @param active 1: enable ims, 0: disable ims
246d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
247d95e75fdSopenharmony_ci     */
248d95e75fdSopenharmony_ci    virtual int32_t SetImsSwitchStatus(int32_t slotId, int32_t active) = 0;
249d95e75fdSopenharmony_ci
250d95e75fdSopenharmony_ci    /**
251d95e75fdSopenharmony_ci     * @brief IMS GetImsSwitchStatus interface
252d95e75fdSopenharmony_ci     *
253d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
254d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
255d95e75fdSopenharmony_ci     */
256d95e75fdSopenharmony_ci    virtual int32_t GetImsSwitchStatus(int32_t slotId) = 0;
257d95e75fdSopenharmony_ci
258d95e75fdSopenharmony_ci    /**
259d95e75fdSopenharmony_ci     * @brief IMS SetImsConfig interface
260d95e75fdSopenharmony_ci     *
261d95e75fdSopenharmony_ci     * @param ImsConfigItem Identify specific item, like ITEM_VIDEO_QUALITY, ITEM_IMS_SWITCH_STATUS
262d95e75fdSopenharmony_ci     * @param value The specific value corresponding to the item
263d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
264d95e75fdSopenharmony_ci     */
265d95e75fdSopenharmony_ci    virtual int32_t SetImsConfig(ImsConfigItem item, const std::string &value) = 0;
266d95e75fdSopenharmony_ci
267d95e75fdSopenharmony_ci    /**
268d95e75fdSopenharmony_ci     * @brief IMS SetImsConfig interface
269d95e75fdSopenharmony_ci     *
270d95e75fdSopenharmony_ci     * @param ImsConfigItem Identify specific item, like ITEM_VIDEO_QUALITY, ITEM_IMS_SWITCH_STATUS
271d95e75fdSopenharmony_ci     * @param value The specific value corresponding to the item
272d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
273d95e75fdSopenharmony_ci     */
274d95e75fdSopenharmony_ci    virtual int32_t SetImsConfig(ImsConfigItem item, int32_t value) = 0;
275d95e75fdSopenharmony_ci
276d95e75fdSopenharmony_ci    /**
277d95e75fdSopenharmony_ci     * @brief IMS GetImsConfig interface
278d95e75fdSopenharmony_ci     *
279d95e75fdSopenharmony_ci     * @param ImsConfigItem Identify specific item, like ITEM_VIDEO_QUALITY, ITEM_IMS_SWITCH_STATUS
280d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
281d95e75fdSopenharmony_ci     */
282d95e75fdSopenharmony_ci    virtual int32_t GetImsConfig(ImsConfigItem item) = 0;
283d95e75fdSopenharmony_ci
284d95e75fdSopenharmony_ci    /**
285d95e75fdSopenharmony_ci     * @brief IMS SetImsFeatureValue interface
286d95e75fdSopenharmony_ci     *
287d95e75fdSopenharmony_ci     * @param FeatureType the ims feature item, like VoLTE, ViLTE, SS over UT
288d95e75fdSopenharmony_ci     * @param value The specific value corresponding to the item
289d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
290d95e75fdSopenharmony_ci     */
291d95e75fdSopenharmony_ci    virtual int32_t SetImsFeatureValue(FeatureType type, int32_t value) = 0;
292d95e75fdSopenharmony_ci
293d95e75fdSopenharmony_ci    /**
294d95e75fdSopenharmony_ci     * @brief IMS GetImsFeatureValue interface
295d95e75fdSopenharmony_ci     *
296d95e75fdSopenharmony_ci     * @param FeatureType Indicate which feature type to query.
297d95e75fdSopenharmony_ci     * @param value Indicate the return value of the query feature type.
298d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
299d95e75fdSopenharmony_ci     */
300d95e75fdSopenharmony_ci    virtual int32_t GetImsFeatureValue(FeatureType type, int32_t &value) = 0;
301d95e75fdSopenharmony_ci
302d95e75fdSopenharmony_ci    /**
303d95e75fdSopenharmony_ci     * @brief Set the mute state of the call
304d95e75fdSopenharmony_ci     *
305d95e75fdSopenharmony_ci     * @param mute 0: not mute, 1:mute
306d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
307d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
308d95e75fdSopenharmony_ci     */
309d95e75fdSopenharmony_ci    virtual int32_t SetMute(int32_t slotId, int32_t mute) = 0;
310d95e75fdSopenharmony_ci
311d95e75fdSopenharmony_ci    /**
312d95e75fdSopenharmony_ci     * @brief IMS GetMute interface
313d95e75fdSopenharmony_ci     *
314d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
315d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
316d95e75fdSopenharmony_ci     */
317d95e75fdSopenharmony_ci    virtual int32_t GetMute(int32_t slotId) = 0;
318d95e75fdSopenharmony_ci
319d95e75fdSopenharmony_ci    /**
320d95e75fdSopenharmony_ci     * @brief IMS CtrlCamera interface
321d95e75fdSopenharmony_ci     *
322d95e75fdSopenharmony_ci     * @param slotId[in], The slot id
323d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
324d95e75fdSopenharmony_ci     * @param cameraId The id of the camera
325d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
326d95e75fdSopenharmony_ci     */
327d95e75fdSopenharmony_ci    virtual int32_t ControlCamera(int32_t slotId, int32_t callIndex, const std::string &cameraId) = 0;
328d95e75fdSopenharmony_ci
329d95e75fdSopenharmony_ci    /**
330d95e75fdSopenharmony_ci     * @brief Set a window which used to display a preview of camera capturing
331d95e75fdSopenharmony_ci     *
332d95e75fdSopenharmony_ci     * @param slotId[in], The slot id
333d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
334d95e75fdSopenharmony_ci     * @param surfaceID Surface id of window object
335d95e75fdSopenharmony_ci     * @param surface The surface object of window
336d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
337d95e75fdSopenharmony_ci     */
338d95e75fdSopenharmony_ci    virtual int32_t SetPreviewWindow(
339d95e75fdSopenharmony_ci        int32_t slotId, int32_t callIndex, const std::string &surfaceID, sptr<Surface> surface) = 0;
340d95e75fdSopenharmony_ci
341d95e75fdSopenharmony_ci    /**
342d95e75fdSopenharmony_ci     * @brief Set a window which used to display the viedo which is received from remote
343d95e75fdSopenharmony_ci     *
344d95e75fdSopenharmony_ci     * @param slotId[in], The slot id
345d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
346d95e75fdSopenharmony_ci     * @param surfaceID Surface id of window object
347d95e75fdSopenharmony_ci     * @param surface The surface object of window
348d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
349d95e75fdSopenharmony_ci     */
350d95e75fdSopenharmony_ci    virtual int32_t SetDisplayWindow(
351d95e75fdSopenharmony_ci        int32_t slotId, int32_t callIndex, const std::string &surfaceID, sptr<Surface> surface) = 0;
352d95e75fdSopenharmony_ci
353d95e75fdSopenharmony_ci    /**
354d95e75fdSopenharmony_ci     * @brief Set camera zoom ratio
355d95e75fdSopenharmony_ci     *
356d95e75fdSopenharmony_ci     * @param zoomRatio the camera zoom ratio
357d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
358d95e75fdSopenharmony_ci     */
359d95e75fdSopenharmony_ci    virtual int32_t SetCameraZoom(float zoomRatio) = 0;
360d95e75fdSopenharmony_ci
361d95e75fdSopenharmony_ci    /**
362d95e75fdSopenharmony_ci     * @brief Set a picture which will be displayed when the video signal is paused
363d95e75fdSopenharmony_ci     *
364d95e75fdSopenharmony_ci     * @param slotId[in], The slot id
365d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
366d95e75fdSopenharmony_ci     * @param path the dispalyed image path
367d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
368d95e75fdSopenharmony_ci     */
369d95e75fdSopenharmony_ci    virtual int32_t SetPausePicture(int32_t slotId, int32_t callIndex, const std::string &path) = 0;
370d95e75fdSopenharmony_ci
371d95e75fdSopenharmony_ci    /**
372d95e75fdSopenharmony_ci     * @brief Set the device orientation
373d95e75fdSopenharmony_ci     *
374d95e75fdSopenharmony_ci     * @param slotId[in], The slot id
375d95e75fdSopenharmony_ci     * @param callIndex Indicates the call index number.
376d95e75fdSopenharmony_ci     * @param rotation The device orientation, in degrees
377d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
378d95e75fdSopenharmony_ci     */
379d95e75fdSopenharmony_ci    virtual int32_t SetDeviceDirection(int32_t slotId, int32_t callIndex, int32_t rotation) = 0;
380d95e75fdSopenharmony_ci
381d95e75fdSopenharmony_ci    /**
382d95e75fdSopenharmony_ci     * @brief SetClip IMS SetClip interface
383d95e75fdSopenharmony_ci     *
384d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
385d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
386d95e75fdSopenharmony_ci     * @param action Indicates the action for SetClip,
387d95e75fdSopenharmony_ci     * 1, means turn on clip; 0, means turn off clip.
388d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
389d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
390d95e75fdSopenharmony_ci     */
391d95e75fdSopenharmony_ci    virtual int32_t SetClip(int32_t slotId, int32_t action, int32_t index) = 0;
392d95e75fdSopenharmony_ci
393d95e75fdSopenharmony_ci    /**
394d95e75fdSopenharmony_ci     * @brief GetClip IMS GetClip interface
395d95e75fdSopenharmony_ci     *
396d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
397d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
398d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
399d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
400d95e75fdSopenharmony_ci     */
401d95e75fdSopenharmony_ci    virtual int32_t GetClip(int32_t slotId, int32_t index) = 0;
402d95e75fdSopenharmony_ci
403d95e75fdSopenharmony_ci    /**
404d95e75fdSopenharmony_ci     * @brief SetClir IMS SetClir interface
405d95e75fdSopenharmony_ci     *
406d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
407d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
408d95e75fdSopenharmony_ci     * @param action Indicates the action for SetClir,
409d95e75fdSopenharmony_ci     * 1, means turn on clir; 0, means turn off clir.
410d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
411d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
412d95e75fdSopenharmony_ci     */
413d95e75fdSopenharmony_ci    virtual int32_t SetClir(int32_t slotId, int32_t action, int32_t index) = 0;
414d95e75fdSopenharmony_ci
415d95e75fdSopenharmony_ci    /**
416d95e75fdSopenharmony_ci     * @brief GetClir IMS GetClir interface
417d95e75fdSopenharmony_ci     *
418d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
419d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
420d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
421d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
422d95e75fdSopenharmony_ci     */
423d95e75fdSopenharmony_ci    virtual int32_t GetClir(int32_t slotId, int32_t index) = 0;
424d95e75fdSopenharmony_ci
425d95e75fdSopenharmony_ci    /**
426d95e75fdSopenharmony_ci     * @brief SetCallTransfer Set Call Transfer Request
427d95e75fdSopenharmony_ci     *
428d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
429d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
430d95e75fdSopenharmony_ci     * @param cfInfo Indicates the reason/mode/transferNum/timer of the set call transfer.
431d95e75fdSopenharmony_ci     * @param classType Indicates a sum of service class for setting call transfer.
432d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
433d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
434d95e75fdSopenharmony_ci     */
435d95e75fdSopenharmony_ci    virtual int32_t SetCallTransfer(
436d95e75fdSopenharmony_ci        int32_t slotId, const CallTransferInfo &cfInfo, int32_t classType, int32_t index) = 0;
437d95e75fdSopenharmony_ci
438d95e75fdSopenharmony_ci    /**
439d95e75fdSopenharmony_ci     * @brief confirm whether IMS can set call transfer time.
440d95e75fdSopenharmony_ci     *
441d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
442d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
443d95e75fdSopenharmony_ci     * @param result, The result of can set or not
444d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
445d95e75fdSopenharmony_ci     */
446d95e75fdSopenharmony_ci    virtual int32_t CanSetCallTransferTime(int32_t slotId, bool &result) = 0;
447d95e75fdSopenharmony_ci
448d95e75fdSopenharmony_ci    /**
449d95e75fdSopenharmony_ci     * @brief GetCallTransfer IMS GetCallTransfer interface
450d95e75fdSopenharmony_ci     *
451d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
452d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
453d95e75fdSopenharmony_ci     * @param reason Indicates the reason of the get call transfer.
454d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
455d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
456d95e75fdSopenharmony_ci     */
457d95e75fdSopenharmony_ci    virtual int32_t GetCallTransfer(int32_t slotId, int32_t reason, int32_t index) = 0;
458d95e75fdSopenharmony_ci
459d95e75fdSopenharmony_ci    /**
460d95e75fdSopenharmony_ci     * @brief SetCallRestriction IMS SetCallRestriction interface
461d95e75fdSopenharmony_ci     *
462d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
463d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
464d95e75fdSopenharmony_ci     * @param fac Indicates the facility of the set call restriction.
465d95e75fdSopenharmony_ci     * @param mode Indicates the mode of the set call restriction.
466d95e75fdSopenharmony_ci     * @param pw Indicates password or "" if not required.
467d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
468d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
469d95e75fdSopenharmony_ci     */
470d95e75fdSopenharmony_ci    virtual int32_t SetCallRestriction(
471d95e75fdSopenharmony_ci        int32_t slotId, const std::string &fac, int32_t mode, const std::string &pw, int32_t index) = 0;
472d95e75fdSopenharmony_ci
473d95e75fdSopenharmony_ci    /**
474d95e75fdSopenharmony_ci     * @brief GetCallRestriction IMS GetCallRestriction interface
475d95e75fdSopenharmony_ci     *
476d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
477d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
478d95e75fdSopenharmony_ci     * @param fac Indicates the facility of the get call restriction.
479d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
480d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
481d95e75fdSopenharmony_ci     */
482d95e75fdSopenharmony_ci    virtual int32_t GetCallRestriction(int32_t slotId, const std::string &fac, int32_t index) = 0;
483d95e75fdSopenharmony_ci
484d95e75fdSopenharmony_ci    /**
485d95e75fdSopenharmony_ci     * @brief SetCallWaiting IMS SetCallWaiting interface
486d95e75fdSopenharmony_ci     *
487d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
488d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
489d95e75fdSopenharmony_ci     * @param activate Indicates the action for SetCallWaiting,
490d95e75fdSopenharmony_ci     * true, means turn on CallWaiting; false, means turn off CallWaiting.
491d95e75fdSopenharmony_ci     * @param classType Call waiting and conditions +CCWA,
492d95e75fdSopenharmony_ci     * the value was {@code ServiceClassType}, See 3GPP TS 22.083.
493d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
494d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
495d95e75fdSopenharmony_ci     */
496d95e75fdSopenharmony_ci    virtual int32_t SetCallWaiting(int32_t slotId, bool activate, int32_t classType, int32_t index) = 0;
497d95e75fdSopenharmony_ci
498d95e75fdSopenharmony_ci    /**
499d95e75fdSopenharmony_ci     * @brief GetCallWaiting IMS GetCallWaiting interface
500d95e75fdSopenharmony_ci     *
501d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
502d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
503d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
504d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
505d95e75fdSopenharmony_ci     */
506d95e75fdSopenharmony_ci    virtual int32_t GetCallWaiting(int32_t slotId, int32_t index) = 0;
507d95e75fdSopenharmony_ci
508d95e75fdSopenharmony_ci    /**
509d95e75fdSopenharmony_ci     * @brief SetColr IMS SetColr interface
510d95e75fdSopenharmony_ci     *
511d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
512d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
513d95e75fdSopenharmony_ci     * @param presentation Indicates the action for SetColr,
514d95e75fdSopenharmony_ci     * 1, means turn on colr; 0, means turn off colr.
515d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
516d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
517d95e75fdSopenharmony_ci     */
518d95e75fdSopenharmony_ci    virtual int32_t SetColr(int32_t slotId, int32_t presentation, int32_t index) = 0;
519d95e75fdSopenharmony_ci
520d95e75fdSopenharmony_ci    /**
521d95e75fdSopenharmony_ci     * @brief GetColr IMS GetColr interface
522d95e75fdSopenharmony_ci     *
523d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
524d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
525d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
526d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
527d95e75fdSopenharmony_ci     */
528d95e75fdSopenharmony_ci    virtual int32_t GetColr(int32_t slotId, int32_t index) = 0;
529d95e75fdSopenharmony_ci
530d95e75fdSopenharmony_ci    /**
531d95e75fdSopenharmony_ci     * @brief SetColp IMS SetColp interface
532d95e75fdSopenharmony_ci     *
533d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
534d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
535d95e75fdSopenharmony_ci     * @param action Indicates the action for SetColp,
536d95e75fdSopenharmony_ci     * 1, means turn on colp; 0, means turn off colp.
537d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
538d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
539d95e75fdSopenharmony_ci     */
540d95e75fdSopenharmony_ci    virtual int32_t SetColp(int32_t slotId, int32_t action, int32_t index) = 0;
541d95e75fdSopenharmony_ci
542d95e75fdSopenharmony_ci    /**
543d95e75fdSopenharmony_ci     * @brief GetColp IMS GetColp interface
544d95e75fdSopenharmony_ci     *
545d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
546d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
547d95e75fdSopenharmony_ci     * @param index Indicates the index of command.
548d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
549d95e75fdSopenharmony_ci     */
550d95e75fdSopenharmony_ci    virtual int32_t GetColp(int32_t slotId, int32_t index) = 0;
551d95e75fdSopenharmony_ci
552d95e75fdSopenharmony_ci    /**
553d95e75fdSopenharmony_ci     * @brief Register CallBack ptr
554d95e75fdSopenharmony_ci     *
555d95e75fdSopenharmony_ci     * @param sptr<ImsCallback>
556d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
557d95e75fdSopenharmony_ci     */
558d95e75fdSopenharmony_ci    virtual int32_t RegisterImsCallCallback(const sptr<ImsCallCallbackInterface> &callback) = 0;
559d95e75fdSopenharmony_ci
560d95e75fdSopenharmony_ci    /**
561d95e75fdSopenharmony_ci     * @brief Update Ims Capabilities
562d95e75fdSopenharmony_ci     *
563d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
564d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
565d95e75fdSopenharmony_ci     * @param imsCapabilityList Indicates the related ims capability
566d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
567d95e75fdSopenharmony_ci     */
568d95e75fdSopenharmony_ci    virtual int32_t UpdateImsCapabilities(int32_t slotId, const ImsCapabilityList &imsCapabilityList) = 0;
569d95e75fdSopenharmony_ci
570d95e75fdSopenharmony_ci    /**
571d95e75fdSopenharmony_ci     * @brief Get impu which come form network
572d95e75fdSopenharmony_ci     *
573d95e75fdSopenharmony_ci     * @param slotId Indicates the card slot index number,
574d95e75fdSopenharmony_ci     * ranging from 0 to the maximum card slot index number supported by the device.
575d95e75fdSopenharmony_ci     * @param impu the result of impu
576d95e75fdSopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
577d95e75fdSopenharmony_ci     */
578d95e75fdSopenharmony_ci    virtual int32_t GetUtImpuFromNetwork(int32_t slotId, std::string &impu) = 0;
579d95e75fdSopenharmony_ci
580d95e75fdSopenharmony_cipublic:
581d95e75fdSopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCallInterface");
582d95e75fdSopenharmony_ci};
583d95e75fdSopenharmony_ci} // namespace Telephony
584d95e75fdSopenharmony_ci} // namespace OHOS
585d95e75fdSopenharmony_ci
586d95e75fdSopenharmony_ci#endif // TELEPHONY_IMS_CALL_INTERFACE_H
587