/* * Copyright (c) 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 IMF_MOCK_IREMOTE_OBJECT_H #define IMF_MOCK_IREMOTE_OBJECT_H #include "iremote_broker.h" #include "iremote_object.h" namespace OHOS { class MockIRemoteObject : public IRemoteObject { public: MockIRemoteObject() : IRemoteObject(u"mock_i_remote_object") { } ~MockIRemoteObject() { } int32_t GetObjectRefCount() override { return 0; } int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override { (void)code; (void)data; (void)reply; (void)option; return 0; } bool IsProxyObject() const override { return true; } bool CheckObjectLegality() const override { return true; } bool AddDeathRecipient(const sptr &recipient) override { (void)recipient; return true; } bool RemoveDeathRecipient(const sptr &recipient) override { (void)recipient; return true; } bool Marshalling(Parcel &parcel) const override { (void)parcel; return true; } sptr AsInterface() override { return nullptr; } int Dump(int fd, const std::vector &args) override { (void)fd; return 0; } }; } // namespace OHOS #endif // IMF_MOCK_IREMOTE_OBJECT_H