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