summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/applets/cabinet.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-11-20 09:48:39 +0100
committerGitHub <noreply@github.com>2022-11-20 09:48:39 +0100
commit57a05b1653b316412492b7cf83738b702865b47e (patch)
treecb76a9aead5f545250301eb7928ecfb03e706931 /src/core/frontend/applets/cabinet.h
parentMerge pull request #9249 from goldenx86/available-vram (diff)
parentgeneral: Address review comments (diff)
downloadyuzu-57a05b1653b316412492b7cf83738b702865b47e.tar
yuzu-57a05b1653b316412492b7cf83738b702865b47e.tar.gz
yuzu-57a05b1653b316412492b7cf83738b702865b47e.tar.bz2
yuzu-57a05b1653b316412492b7cf83738b702865b47e.tar.lz
yuzu-57a05b1653b316412492b7cf83738b702865b47e.tar.xz
yuzu-57a05b1653b316412492b7cf83738b702865b47e.tar.zst
yuzu-57a05b1653b316412492b7cf83738b702865b47e.zip
Diffstat (limited to 'src/core/frontend/applets/cabinet.h')
-rw-r--r--src/core/frontend/applets/cabinet.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/core/frontend/applets/cabinet.h b/src/core/frontend/applets/cabinet.h
new file mode 100644
index 000000000..c28a235c1
--- /dev/null
+++ b/src/core/frontend/applets/cabinet.h
@@ -0,0 +1,37 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <functional>
+#include "core/hle/service/nfp/nfp_types.h"
+
+namespace Service::NFP {
+class NfpDevice;
+} // namespace Service::NFP
+
+namespace Core::Frontend {
+
+struct CabinetParameters {
+ Service::NFP::TagInfo tag_info;
+ Service::NFP::RegisterInfo register_info;
+ Service::NFP::CabinetMode mode;
+};
+
+using CabinetCallback = std::function<void(bool, const std::string&)>;
+
+class CabinetApplet {
+public:
+ virtual ~CabinetApplet();
+ virtual void ShowCabinetApplet(const CabinetCallback& callback,
+ const CabinetParameters& parameters,
+ std::shared_ptr<Service::NFP::NfpDevice> nfp_device) const = 0;
+};
+
+class DefaultCabinetApplet final : public CabinetApplet {
+public:
+ void ShowCabinetApplet(const CabinetCallback& callback, const CabinetParameters& parameters,
+ std::shared_ptr<Service::NFP::NfpDevice> nfp_device) const override;
+};
+
+} // namespace Core::Frontend