summaryrefslogtreecommitdiffstats
path: root/src/core/frontend
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-11-13 18:07:48 +0100
committergerman77 <juangerman-13@hotmail.com>2022-11-13 18:07:48 +0100
commitfb57cd26a1219a5c91d2cb4dec402528f8ba308e (patch)
treeb9120fd3ea1a5572687025aa70e6e6ff4bccdacb /src/core/frontend
parentinput_common: Add amiibo applet functions (diff)
downloadyuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar.gz
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar.bz2
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar.lz
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar.xz
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.tar.zst
yuzu-fb57cd26a1219a5c91d2cb4dec402528f8ba308e.zip
Diffstat (limited to 'src/core/frontend')
-rw-r--r--src/core/frontend/applets/cabinet.cpp20
-rw-r--r--src/core/frontend/applets/cabinet.h36
2 files changed, 56 insertions, 0 deletions
diff --git a/src/core/frontend/applets/cabinet.cpp b/src/core/frontend/applets/cabinet.cpp
new file mode 100644
index 000000000..5ade75de0
--- /dev/null
+++ b/src/core/frontend/applets/cabinet.cpp
@@ -0,0 +1,20 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "common/logging/log.h"
+#include "core/frontend/applets/cabinet.h"
+
+#include <thread>
+
+namespace Core::Frontend {
+
+CabinetApplet::~CabinetApplet() = default;
+
+void DefaultCabinetApplet::ShowCabinetApplet(
+ std::function<void(bool, const std::string&)> callback, const CabinetParameters& parameters,
+ std::shared_ptr<Service::NFP::NfpDevice> nfp_device) const {
+ LOG_WARNING(Service_AM, "(STUBBED) called");
+ callback(false, {});
+}
+
+} // namespace Core::Frontend
diff --git a/src/core/frontend/applets/cabinet.h b/src/core/frontend/applets/cabinet.h
new file mode 100644
index 000000000..1c68bf57d
--- /dev/null
+++ b/src/core/frontend/applets/cabinet.h
@@ -0,0 +1,36 @@
+// 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;
+};
+
+class CabinetApplet {
+public:
+ virtual ~CabinetApplet();
+ virtual void ShowCabinetApplet(std::function<void(bool, const std::string&)> callback,
+ const CabinetParameters& parameters,
+ std::shared_ptr<Service::NFP::NfpDevice> nfp_device) const = 0;
+};
+
+class DefaultCabinetApplet final : public CabinetApplet {
+public:
+ void ShowCabinetApplet(std::function<void(bool, const std::string&)> callback,
+ const CabinetParameters& parameters,
+ std::shared_ptr<Service::NFP::NfpDevice> nfp_device) const override;
+};
+
+} // namespace Core::Frontend