// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/cmif_types.h" #include "core/hle/service/service.h" namespace Kernel { class KReadableEvent; } namespace Service::Nvnflinger { class HosBinderDriverServer; class SurfaceFlinger; class IHOSBinderDriver final : public ServiceFramework { public: explicit IHOSBinderDriver(Core::System& system_, std::shared_ptr server, std::shared_ptr surface_flinger); ~IHOSBinderDriver() override; std::shared_ptr GetSurfaceFlinger() { return m_surface_flinger; } std::shared_ptr GetServer() { return m_server; } private: Result TransactParcel(s32 binder_id, u32 transaction_id, InBuffer parcel_data, OutBuffer parcel_reply, u32 flags); Result AdjustRefcount(s32 binder_id, s32 addval, s32 type); Result GetNativeHandle(s32 binder_id, u32 type_id, OutCopyHandle out_handle); Result TransactParcelAuto(s32 binder_id, u32 transaction_id, InBuffer parcel_data, OutBuffer parcel_reply, u32 flags); private: const std::shared_ptr m_server; const std::shared_ptr m_surface_flinger; }; } // namespace Service::Nvnflinger