// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include #include "common/common_types.h" #include "core/hle/service/nvnflinger/binder.h" namespace Core { class System; } namespace Service::Nvnflinger { class HosBinderDriverServer final { public: explicit HosBinderDriverServer(); ~HosBinderDriverServer(); s32 RegisterBinder(std::shared_ptr&& binder); void UnregisterBinder(s32 binder_id); std::shared_ptr TryGetBinder(s32 id) const; private: std::unordered_map> binders; mutable std::mutex lock; s32 last_id{}; }; } // namespace Service::Nvnflinger