/* * Copyright (C) 2024-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __MOCK_IMS_SMS_INTERFACE_H__ #define __MOCK_IMS_SMS_INTERFACE_H__ #include "ims_sms_client.h" #include "ims_sms_proxy.h" #include "ims_sms_callback_stub.h" namespace OHOS { namespace Telephony { class MockImsSms : public ImsSmsInterface { public: int32_t ImsSendMessage(int32_t slotId, const ImsMessageInfo &imsMessageInfo) override { return retImsSendMessage; } int32_t ImsSetSmsConfig(int32_t slotId, int32_t imsSmsConfig) override { return retImsSetSmsConfig; } int32_t ImsGetSmsConfig(int32_t slotId) override { return retImsGetSmsConfig; } int32_t RegisterImsSmsCallback(const sptr &callback) override { return retRegisterImsSmsCallback; } sptr AsObject() override { return retRemoteObject; } public: int32_t retImsSendMessage; int32_t retImsSetSmsConfig; int32_t retImsGetSmsConfig; int32_t retRegisterImsSmsCallback; IRemoteObject* retRemoteObject; }; class MockImsSmsProxy : public ImsSmsProxy { public: explicit MockImsSmsProxy(const sptr &impl) : ImsSmsProxy(impl) {} sptr AsObject() override { return retRemoteObject; } public: IRemoteObject* retRemoteObject; }; } } #endif