/* * Copyright (c) 2023 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 TEST_FUZZTEST_MOCK_MOCK_I_REMOTE_OBJECT_H #define TEST_FUZZTEST_MOCK_MOCK_I_REMOTE_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 { return 0; } bool IsProxyObject() const override { return true; } bool CheckObjectLegality() const override { return true; } bool AddDeathRecipient(const sptr &recipient) override { return true; } bool RemoveDeathRecipient(const sptr &recipient) override { return true; } bool Marshalling(Parcel &parcel) const override { return true; } sptr AsInterface() override { return nullptr; } int Dump(int fd, const std::vector &args) override { return 0; } std::u16string GetObjectDescriptor() const { std::u16string descriptor = std::u16string(); return descriptor; } }; } // namespace OHOS #endif // TEST_FUZZTEST_MOCK_MOCK_I_REMOTE_OBJECT_H