1 /* 2 * Copyright (C) 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 TELEPHONY_SATELLITE_CALL_CALLBACK_PROXY_H 17 #define TELEPHONY_SATELLITE_CALL_CALLBACK_PROXY_H 18 19 #include "iremote_proxy.h" 20 #include "satellite_call_callback_interface.h" 21 #include "satellite_call_callback_ipc_interface_code.h" 22 #include "telephony_errors.h" 23 24 namespace OHOS { 25 namespace Telephony { 26 class SatelliteCallCallbackProxy : public IRemoteProxy<SatelliteCallCallbackInterface> { 27 public: 28 explicit SatelliteCallCallbackProxy(const sptr<IRemoteObject> &impl); 29 virtual ~SatelliteCallCallbackProxy() = default; 30 31 /****************** call basic ******************/ 32 int32_t DialSatelliteResponse(int32_t slotId, const RadioResponseInfo &info) override; 33 int32_t HangUpSatelliteResponse(int32_t slotId, const RadioResponseInfo &info) override; 34 int32_t RejectSatelliteResponse(int32_t slotId, const RadioResponseInfo &info) override; 35 int32_t AnswerSatelliteResponse(int32_t slotId, const RadioResponseInfo &info) override; 36 int32_t CallStateChangeReport(int32_t slotId) override; 37 int32_t GetSatelliteCallsDataResponse(int32_t slotId, const RadioResponseInfo &info) override; 38 int32_t GetSatelliteCallsDataResponse(int32_t slotId, const SatelliteCurrentCallList &callList) override; 39 40 private: 41 int32_t SendResponseInfo(int32_t eventId, MessageParcel &in); 42 int32_t WriteCommonInfo(int32_t slotId, const std::string &funcName, MessageParcel &in); 43 int32_t WriteCommonInfo( 44 int32_t slotId, const std::string &funcName, MessageParcel &in, const RadioResponseInfo &info); 45 int32_t WriteSsBaseResultCommonInfo( 46 int32_t slotId, const std::string &funcName, MessageParcel &in, const SsBaseResult &ssResult); 47 48 private: 49 static inline BrokerDelegator<SatelliteCallCallbackProxy> delegator_; 50 }; 51 } // namespace Telephony 52 } // namespace OHOS 53 54 #endif // TELEPHONY_SATELLITE_CALL_CALLBACK_PROXY_H