• 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 IMS_CALLBACK_H
17 #define IMS_CALLBACK_H
18 
19 #include "iremote_broker.h"
20 
21 #include "hril_call_parcel.h"
22 #include "ims_types.h"
23 
24 namespace OHOS {
25 namespace Telephony {
26 class ImsCallback : public IRemoteBroker {
27 public:
28     virtual ~ImsCallback() = default;
29 
30     /**
31      * UpdateDialResponse
32      *
33      * @param ImsResponseInfo
34      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
35      */
36     virtual int32_t UpdateDialResponse(const ImsResponseInfo &info) = 0;
37 
38     /**
39      * UpdateHangUpResponse
40      *
41      * @param ImsResponseInfo
42      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
43      */
44     virtual int32_t UpdateHangUpResponse(const ImsResponseInfo &info) = 0;
45 
46     /**
47      * UpdateRejectResponse
48      *
49      * @param ImsResponseInfo
50      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
51      */
52     virtual int32_t UpdateRejectResponse(const ImsResponseInfo &info) = 0;
53 
54     /**
55      * UpdateAnswerResponse
56      *
57      * @param ImsResponseInfo
58      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
59      */
60     virtual int32_t UpdateAnswerResponse(const ImsResponseInfo &info) = 0;
61 
62     /**
63      * UpdateHoldResponse
64      *
65      * @param ImsResponseInfo
66      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
67      */
68     virtual int32_t UpdateHoldResponse(const ImsResponseInfo &info) = 0;
69 
70     /**
71      * UpdateUnHoldResponse
72      *
73      * @param ImsResponseInfo
74      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
75      */
76     virtual int32_t UpdateUnHoldResponse(const ImsResponseInfo &info) = 0;
77 
78     /**
79      * UpdateSwitchResponse
80      *
81      * @param ImsResponseInfo
82      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
83      */
84     virtual int32_t UpdateSwitchResponse(const ImsResponseInfo &info) = 0;
85 
86     /**
87      * UpdateCombineConferenceResponse
88      *
89      * @param ImsResponseInfo
90      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
91      */
92     virtual int32_t UpdateCombineConferenceResponse(const ImsResponseInfo &info) = 0;
93 
94     /**
95      * UpdateInviteToConferenceResponse
96      *
97      * @param ImsResponseInfo
98      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
99      */
100     virtual int32_t UpdateInviteToConferenceResponse(const ImsResponseInfo &info) = 0;
101 
102     /**
103      * UpdateKickOutFromConferenceResponse
104      *
105      * @param ImsResponseInfo
106      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
107      */
108     virtual int32_t UpdateKickOutFromConferenceResponse(const ImsResponseInfo &info) = 0;
109 
110     /**
111      * UpdateCallMediaModeResponse
112      *
113      * @param ImsResponseInfo
114      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
115      */
116     virtual int32_t UpdateCallMediaModeResponse(const ImsResponseInfo &info) = 0;
117 
118     /**
119      * UpdateIsEmergencyPhoneNumberResponse
120      *
121      * @param ImsResponseInfo
122      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
123      */
124     virtual int32_t UpdateIsEmergencyPhoneNumberResponse(const ImsResponseInfo &info) = 0;
125 
126     /**
127      * UpdateIsEmergencyPhoneNumberResponse
128      *
129      * @param bool
130      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
131      */
132     virtual int32_t UpdateIsEmergencyPhoneNumberResponse(bool value) = 0;
133 
134     /**
135      * UpdateStartDtmfResponse
136      *
137      * @param ImsResponseInfo
138      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
139      */
140     virtual int32_t UpdateStartDtmfResponse(const ImsResponseInfo &info) = 0;
141     /**
142      * UpdateSendDtmfResponse
143      *
144      * @param ImsResponseInfo
145      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
146      */
147 
148     virtual int32_t UpdateSendDtmfResponse(const ImsResponseInfo &info) = 0;
149 
150     /**
151      * UpdateStopDtmfResponse
152      *
153      * @param ImsResponseInfo
154      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
155      */
156     virtual int32_t UpdateStopDtmfResponse(const ImsResponseInfo &info) = 0;
157 
158     /**
159      * UpdateStartRttResponse
160      *
161      * @param ImsResponseInfo
162      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
163      */
164     virtual int32_t UpdateStartRttResponse(const ImsResponseInfo &info) = 0;
165 
166     /**
167      * UpdateStopRttResponse
168      *
169      * @param ImsResponseInfo
170      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
171      */
172     virtual int32_t UpdateStopRttResponse(const ImsResponseInfo &info) = 0;
173 
174     /**
175      * UpdateCallStatusResponse
176      *
177      * @param slotId
178      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
179      */
180     virtual int32_t UpdateCallStatusResponse(int32_t slotId) = 0;
181 
182     /**
183      * UpdateServiceStatusResponse
184      *
185      * @param slotId
186      * @param CallImsServiceStatus
187      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
188      */
189     virtual int32_t UpdateServiceStatusResponse(int32_t slotId, const CallImsServiceStatus &callImsServiceStatus) = 0;
190 
191     /**
192      * UpdateSetPreModeResponse
193      *
194      * @param slotId
195      * @param ImsResponseInfo
196      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
197      */
198     virtual int32_t UpdateSetPreModeResponse(int32_t slotId, const ImsResponseInfo &info) = 0;
199 
200     /**
201      * UpdateGetPreModeResponse
202      *
203      * @param ImsResponseInfo
204      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
205      */
206     virtual int32_t UpdateGetPreModeResponse(const ImsResponseInfo &info) = 0;
207 
208     /**
209      * UpdateGetPreModeResponse
210      *
211      * @param slotId
212      * @param int32_t
213      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
214      */
215     virtual int32_t UpdateGetPreModeResponse(int32_t slotId, int32_t mode) = 0;
216 
217     /**
218      * UpdateSetImsSwitchResponse
219      *
220      * @param ImsResponseInfo
221      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
222      */
223     virtual int32_t UpdateSetImsSwitchResponse(const ImsResponseInfo &info) = 0;
224 
225     /**
226      * UpdateGetImsSwitchResponse
227      *
228      * @param ImsResponseInfo
229      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
230      */
231     virtual int32_t UpdateGetImsSwitchResponse(const ImsResponseInfo &info) = 0;
232 
233     /**
234      * UpdateGetImsSwitchResponse
235      *
236      * @param slotId
237      * @param int32_t
238      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
239      */
240     virtual int32_t UpdateGetImsSwitchResponse(int32_t slotId, int32_t active) = 0;
241 
242     /**
243      * UpdateImsCallsDataResponse
244      *
245      * @param ImsResponseInfo
246      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
247      */
248     virtual int32_t UpdateImsCallsDataResponse(const ImsResponseInfo &info) = 0;
249 
250     /**
251      * UpdateImsCallsDataResponse
252      *
253      * @param slotId
254      * @param CallInfoList
255      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
256      */
257     virtual int32_t UpdateImsCallsDataResponse(int32_t slotId, const CallInfoList &callList) = 0;
258 
259     /**
260      * UpdateSetImsConfigResponse
261      *
262      * @param ImsResponseInfo
263      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
264      */
265     virtual int32_t UpdateSetImsConfigResponse(const ImsResponseInfo &info) = 0;
266 
267     /**
268      * UpdateGetImsConfigResponse
269      *
270      * @param value
271      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
272      */
273     virtual int32_t UpdateGetImsConfigResponse(int32_t value) = 0;
274 
275     /**
276      * UpdateGetImsConfigResponse
277      *
278      * @param ImsResponseInfo
279      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
280      */
281     virtual int32_t UpdateGetImsConfigResponse(const ImsResponseInfo &info) = 0;
282 
283     /**
284      * UpdateSetImsFeatureValueResponse
285      *
286      * @param ImsResponseInfo
287      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
288      */
289     virtual int32_t UpdateSetImsFeatureValueResponse(const ImsResponseInfo &info) = 0;
290 
291     /**
292      * UpdateGetImsFeatureValueResponse
293      *
294      * @param value
295      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
296      */
297     virtual int32_t UpdateGetImsFeatureValueResponse(int32_t value) = 0;
298 
299     /**
300      * UpdateGetImsFeatureValueResponse
301      *
302      * @param ImsResponseInfo
303      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
304      */
305     virtual int32_t UpdateGetImsFeatureValueResponse(const ImsResponseInfo &info) = 0;
306 
307     /**
308      * UpdateSetImsSwitchEnhanceModeResponse
309      *
310      * @param ImsResponseInfo
311      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
312      */
313     virtual int32_t UpdateSetImsSwitchEnhanceModeResponse(const ImsResponseInfo &info) = 0;
314 
315     /**
316      * UpdateGetImsSwitchEnhanceModeResponse
317      *
318      * @param value
319      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
320      */
321     virtual int32_t UpdateGetImsSwitchEnhanceModeResponse(int32_t value) = 0;
322 
323     /**
324      * UpdateGetImsSwitchEnhanceModeResponse
325      *
326      * @param ImsResponseInfo
327      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
328      */
329     virtual int32_t UpdateGetImsSwitchEnhanceModeResponse(const ImsResponseInfo &info) = 0;
330 
331     /**
332      * UpdateCtrlCameraResponse
333      *
334      * @param ImsResponseInfo
335      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
336      */
337     virtual int32_t UpdateCtrlCameraResponse(const ImsResponseInfo &info) = 0;
338 
339     /**
340      * UpdateSetPreviewWindowResponse
341      *
342      * @param ImsResponseInfo
343      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
344      */
345     virtual int32_t UpdateSetPreviewWindowResponse(const ImsResponseInfo &info) = 0;
346 
347     /**
348      * UpdateSetDisplayWindowResponse
349      *
350      * @param ImsResponseInfo
351      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
352      */
353     virtual int32_t UpdateSetDisplayWindowResponse(const ImsResponseInfo &info) = 0;
354 
355     /**
356      * UpdateSetCameraZoomResponse
357      *
358      * @param ImsResponseInfo
359      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
360      */
361     virtual int32_t UpdateSetCameraZoomResponse(const ImsResponseInfo &info) = 0;
362 
363     /**
364      * UpdateSetPauseImageResponse
365      *
366      * @param ImsResponseInfo
367      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
368      */
369     virtual int32_t UpdateSetPauseImageResponse(const ImsResponseInfo &info) = 0;
370 
371     /**
372      * UpdateSetDeviceDirectionResponse
373      *
374      * @param ImsResponseInfo
375      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
376      */
377     virtual int32_t UpdateSetDeviceDirectionResponse(const ImsResponseInfo &info) = 0;
378 
379     /**
380      * UpdateSrvccStateReport
381      *
382      * @param slotId
383      * @param SrvccState
384      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
385      */
386     virtual int32_t UpdateSrvccStateReport(int32_t slotId, SrvccState srvccState) = 0;
387 
388     /**
389      * UpdateVtWfcReport
390      *
391      * @param slotId
392      * @param TransferState
393      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
394      */
395     virtual int32_t UpdateVtWfcReport(int32_t slotId, TransferState transferState) = 0;
396 
397     /**
398      * UpdateCallRingBackResponse
399      *
400      * @param RingbackVoice
401      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
402      */
403     virtual int32_t UpdateCallRingBackResponse(const RingbackVoice &info) = 0;
404 
405     /**
406      * UpdateSetMuteResponse
407      *
408      * @param MuteControlResponse
409      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
410      */
411     virtual int32_t UpdateSetMuteResponse(const MuteControlResponse &response) = 0;
412 
413     /**
414      * UpdateGetMuteResponse
415      *
416      * @param MuteControlResponse
417      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
418      */
419     virtual int32_t UpdateGetMuteResponse(const MuteControlResponse &response) = 0;
420 
421     /**
422      * UpdateGetEccCallListResponse
423      *
424      * @param EmergencyInfoList
425      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
426      */
427     virtual int32_t UpdateGetEccCallListResponse(const EmergencyInfoList &callList) = 0;
428 
429     /**
430      * UpdateCallFailReasonResponse
431      *
432      * @param int32_t
433      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
434      */
435     virtual int32_t UpdateCallFailReasonResponse(int32_t reason) = 0;
436 
437     /**
438      * UpdateGetClipResponse
439      *
440      * @param ClipResponse
441      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
442      */
443     virtual int32_t UpdateGetClipResponse(const ClipResponse &response) = 0;
444 
445     /**
446      * UpdateGetClirResponse
447      *
448      * @param ClirResponse
449      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
450      */
451     virtual int32_t UpdateGetClirResponse(const ClirResponse &response) = 0;
452 
453     /**
454      * UpdateSetClirResponse
455      *
456      * @param HRilErrType
457      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
458      */
459     virtual int32_t UpdateSetClirResponse(HRilErrType errType) = 0;
460 
461     /**
462      * UpdateGetCallTransferResponse
463      *
464      * @param CallTransferResponse
465      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
466      */
467     virtual int32_t UpdateGetCallTransferResponse(const CallTransferResponse &response) = 0;
468 
469     /**
470      * UpdateSetCallTransferResponse
471      *
472      * @param HRilErrType
473      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
474      */
475     virtual int32_t UpdateSetCallTransferResponse(HRilErrType errType) = 0;
476 
477     /**
478      * UpdateGetCallRestrictionResponse
479      *
480      * @param CallRestrictionResponse
481      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
482      */
483     virtual int32_t UpdateGetCallRestrictionResponse(const CallRestrictionResponse &response) = 0;
484 
485     /**
486      * UpdateSetCallRestrictionResponse
487      *
488      * @param HRilErrType
489      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
490      */
491     virtual int32_t UpdateSetCallRestrictionResponse(HRilErrType errType) = 0;
492 
493     /**
494      * UpdateGetCallWaitingResponse
495      *
496      * @param CallWaitResponse
497      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
498      */
499     virtual int32_t UpdateGetCallWaitingResponse(const CallWaitResponse &response) = 0;
500 
501     /**
502      * UpdateSetCallWaitingResponse
503      *
504      * @param HRilErrType
505      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
506      */
507     virtual int32_t UpdateSetCallWaitingResponse(HRilErrType errType) = 0;
508 
509     enum {
510         /****************** basic ******************/
511         UPDATE_IMS_DIAL = 0,
512         UPDATE_IMS_HANG_UP,
513         UPDATE_IMS_REJECT,
514         UPDATE_IMS_ANSWER,
515         UPDATE_IMS_HOLD,
516         UPDATE_IMS_UN_HOLD,
517         UPDATE_IMS_SWITCH,
518         UPDATE_IMS_COMBINE_CONFERENCE,
519         UPDATE_IMS_INVITE_TO_CONFERENCE,
520         UPDATE_IMS_KICK_OUT_CONFERENCE,
521         UPDATE_IMS_UPDATE_CALL_MEDIA_MODE,
522         UPDATE_IMS_EMERGENCY_CALL,
523         UPDATE_IMS_CALL_STATUS,
524         UPDATE_IMS_SERVICE_STATUS,
525         UPDATE_CALL_FAIL_REASON,
526         UPDATE_IMS_GET_CALLS_DATA,
527         UPDATE_SRVCC_STATE,
528         UPDATE_VT_OR_WFC,
529         UPDATE_CALL_CRING,
530 
531         /****************** dtmf、rtt ******************/
532         UPDATE_IMS_START_DTMF,
533         UPDATE_IMS_SEND_DTMF,
534         UPDATE_IMS_STOP_DTMF,
535         UPDATE_START_RTT,
536         UPDATE_STOP_RTT,
537 
538         /****************** ims config ******************/
539         UPDATE_IMS_SET_PRE_MODE,
540         UPDATE_IMS_GET_PRE_MODE,
541         UPDATE_IMS_SET_LTE_SWITCH,
542         UPDATE_IMS_GET_LTE_SWITCH,
543         UPDATE_SET_CONFIG,
544         UPDATE_GET_CONFIG,
545         UPDATE_SET_FEATURE,
546         UPDATE_GET_FEATURE,
547         UPDATE_SET_IMS_SWITCH_ENHANCE,
548         UPDATE_GET_IMS_SWITCH_ENHANCE,
549         UPDATE_SET_MUTE,
550         UPDATE_GET_MUTE,
551         UPDATE_GET_EMERGENCY_CALL_LIST,
552 
553         /****************** video settings ******************/
554         UPDATE_CONTROL_CAMERA,
555         UPDATE_SET_PREVIEW_WINDOW,
556         UPDATE_SET_DISPLAY_WINDOW,
557         UPDATE_SET_CAMERA_ZOOM,
558         UPDATE_SET_PAUSE_IMAGE,
559         UPDATE_SET_DEVICE_DIRECTION,
560 
561         /****************** supplement ******************/
562         UPDATE_GET_CALL_CLIP,
563         UPDATE_GET_CALL_CLIR,
564         UPDATE_SET_CALL_CLIR,
565         UPDATE_GET_CALL_FORWARD,
566         UPDATE_SET_CALL_FORWARD,
567         UPDATE_GET_CALL_RESTRICTION,
568         UPDATE_SET_CALL_RESTRICTION,
569         UPDATE_GET_CALL_WAIT,
570         UPDATE_SET_CALL_WAIT,
571     };
572 
573 public:
574     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCallback");
575 };
576 } // namespace Telephony
577 } // namespace OHOS
578 
579 #endif
580