1 /* 2 * Copyright (C) 2021-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 CELLULAR_CALL_REGISTER_H 17 #define CELLULAR_CALL_REGISTER_H 18 19 #include <map> 20 21 #include "cellular_call_connection_cs.h" 22 #include "i_call_status_callback.h" 23 #include "singleton.h" 24 #include "ims_call_interface.h" 25 26 namespace OHOS { 27 namespace Telephony { 28 class CellularCallRegister { 29 DECLARE_DELAYED_SINGLETON(CellularCallRegister); 30 31 public: 32 void ReportCallsInfo(const CallsReportInfo &callsReportInfo); 33 34 void ReportSingleCallInfo(const CallReportInfo &info, TelCallState callState); 35 36 void ReportEventResultInfo(const CellularCallEventInfo &info); 37 38 void ReportGetWaitingResult(const CallWaitResponse &response); 39 40 void ReportSetWaitingResult(int32_t result); 41 42 void ReportGetRestrictionResult(const CallRestrictionResponse &response); 43 44 void ReportSetRestrictionResult(int32_t result); 45 46 void ReportGetTransferResult(const CallTransferResponse &response); 47 48 void ReportSetTransferResult(int32_t result); 49 50 void ReportGetClipResult(const ClipResponse &response); 51 52 void ReportGetClirResult(const ClirResponse &response); 53 54 void ReportSetClirResult(int32_t result); 55 56 void ReportGetImsConfigResult(const GetImsConfigResponse &response); 57 58 void ReportSetImsConfigResult(int32_t result); 59 60 void ReportGetImsFeatureResult(const GetImsFeatureValueResponse &response); 61 62 void ReportSetImsFeatureResult(int32_t result); 63 64 void ReportCallRingBackResult(int32_t status); 65 66 void ReportSetMuteResult(const MuteControlResponse &response); 67 68 void ReportGetMuteResult(const MuteControlResponse &response); 69 70 void ReportCallFailReason(const DisconnectedDetails &details); 71 72 void ReportInviteToConferenceResult(int32_t result); 73 74 void ReportUpdateCallMediaModeResult(int32_t result); 75 76 void ReportGetCallDataResult(int32_t result); 77 78 void ReportStartDtmfResult(int32_t result); 79 80 void ReportStopDtmfResult(int32_t result); 81 82 void ReportStartRttResult(int32_t result); 83 84 void ReportStopRttResult(int32_t result); 85 86 void ReportSendUssdResult(int32_t result); 87 88 int32_t RegisterCallManagerCallBack(const sptr<ICallStatusCallback> &callback); 89 90 int32_t UnRegisterCallManagerCallBack(); 91 92 void ReportMmiCodeResult(const MmiCodeInfo &info); 93 94 void ReportSetEmergencyCallListResponse(const SetEccListResponse &response); 95 96 bool IsCallManagerCallBackRegistered(); 97 98 private: 99 sptr<ICallStatusCallback> callManagerCallBack_; 100 }; 101 } // namespace Telephony 102 } // namespace OHOS 103 104 #endif // CELLULAR_CALL_REGISTER_H 105