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_SMS_CALLBACK_PROXY_H 17 #define TELEPHONY_IMS_SMS_CALLBACK_PROXY_H 18 19 #include "ims_sms_callback_interface.h" 20 #include "iremote_proxy.h" 21 #include "telephony_errors.h" 22 #include "telephony_log_wrapper.h" 23 24 namespace OHOS { 25 namespace Telephony { 26 class ImsSmsCallbackProxy : public IRemoteProxy<ImsSmsCallbackInterface> { 27 public: 28 explicit ImsSmsCallbackProxy(const sptr<IRemoteObject> &impl); 29 virtual ~ImsSmsCallbackProxy() = default; 30 31 /****************** sms basic ******************/ 32 int32_t ImsSendMessageResponse(int32_t slotId, const SendSmsResultInfo &result) override; 33 int32_t ImsSendMessageResponse(int32_t slotId, const HRilRadioResponseInfo &info) override; 34 int32_t ImsSetSmsConfigResponse(int32_t slotId, const HRilRadioResponseInfo &info) override; 35 int32_t ImsGetSmsConfigResponse(int32_t slotId, int32_t imsSmsConfig) override; 36 int32_t ImsGetSmsConfigResponse(int32_t slotId, const HRilRadioResponseInfo &info) override; 37 38 private: 39 int32_t WriteCommonInfo(std::string funcName, MessageParcel &in, int32_t slotId); 40 int32_t SendHRilRadioResponseInfo( 41 std::string funcName, int32_t slotId, int32_t eventId, const HRilRadioResponseInfo &info); 42 int32_t SendRequest(MessageParcel &in, int32_t slotId, int32_t eventId); 43 44 private: 45 static inline BrokerDelegator<ImsSmsCallbackProxy> delegator_; 46 }; 47 } // namespace Telephony 48 } // namespace OHOS 49 50 #endif // TELEPHONY_IMS_SMS_CALLBACK_PROXY_H 51