1 /* 2 * Copyright (C) 2021-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 REPORT_CALL_INFO_HANDLER_H 17 #define REPORT_CALL_INFO_HANDLER_H 18 19 #include <memory> 20 21 #include "call_status_manager.h" 22 #include "singleton.h" 23 #include "voip_call_manager_info.h" 24 25 namespace OHOS { 26 namespace Telephony { 27 class ReportCallInfoHandler : public std::enable_shared_from_this<ReportCallInfoHandler> { 28 DECLARE_DELAYED_SINGLETON(ReportCallInfoHandler) 29 public: 30 void Init(); 31 int32_t UpdateCallReportInfo(const CallDetailInfo &info); 32 int32_t UpdateCallsReportInfo(CallDetailsInfo &info); 33 int32_t UpdateDisconnectedCause(const DisconnectedDetails &details); 34 int32_t UpdateEventResultInfo(const CellularCallEventInfo &info); 35 int32_t UpdateOttEventInfo(const OttCallEventInfo &info); 36 int32_t ReceiveImsCallModeRequest(const CallModeReportInfo &response); 37 int32_t ReceiveImsCallModeResponse(const CallModeReportInfo &response); 38 int32_t UpdateVoipEventInfo(const VoipCallEventInfo &info); 39 40 private: 41 void BuildCallDetailsInfo(CallDetailsInfo &info, CallDetailsInfo &callDetailsInfo); 42 43 private: 44 std::shared_ptr<CallStatusManager> callStatusManagerPtr_; 45 }; 46 } // namespace Telephony 47 } // namespace OHOS 48 49 #endif // REPORT_CALL_INFO_HANDLER_H 50