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 CALL_ABILITY_CALLBACK_PROXY_H 17 #define CALL_ABILITY_CALLBACK_PROXY_H 18 19 #include "iremote_proxy.h" 20 21 #include "call_ability_callback_ipc_interface_code.h" 22 #include "i_call_ability_callback.h" 23 #include "telephony_log_wrapper.h" 24 25 namespace OHOS { 26 namespace Telephony { 27 class CallAbilityCallbackProxy : public IRemoteProxy<ICallAbilityCallback> { 28 public: 29 explicit CallAbilityCallbackProxy(const sptr<IRemoteObject> &impl); 30 virtual ~CallAbilityCallbackProxy() = default; 31 32 int32_t OnCallDetailsChange(const CallAttributeInfo &info) override; 33 int32_t OnCallEventChange(const CallEventInfo &info) override; 34 int32_t OnCallDisconnectedCause(const DisconnectedDetails &details) override; 35 int32_t OnReportAsyncResults(CallResultReportId reportId, AppExecFwk::PacMap &resultInfo) override; 36 int32_t OnOttCallRequest(OttCallRequestId requestId, AppExecFwk::PacMap &info) override; 37 int32_t OnReportMmiCodeResult(const MmiCodeInfo &info) override; 38 int32_t OnReportAudioDeviceChange(const AudioDeviceInfo &info) override; 39 int32_t OnReportPostDialDelay(const std::string &str) override; 40 int32_t OnReportImsCallModeChange(const CallMediaModeInfo &imsCallModeInfo) override; 41 int32_t OnReportCallSessionEventChange(const CallSessionEvent &callSessionEventOptions) override; 42 int32_t OnReportPeerDimensionsChange(const PeerDimensionsDetail &peerDimensionsDetail) override; 43 int32_t OnReportCallDataUsageChange(const int64_t dataUsage) override; 44 int32_t OnReportCameraCapabilities(const CameraCapabilities &cameraCapabilities) override; 45 46 private: 47 void PackDataParcel(CallResultReportId reportId, AppExecFwk::PacMap &resultInfo, MessageParcel &dataParcel); 48 49 private: 50 static inline BrokerDelegator<CallAbilityCallbackProxy> delegator_; 51 }; 52 } // namespace Telephony 53 } // namespace OHOS 54 55 #endif 56