summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/applets
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-11-20 16:31:20 +0100
committerGitHub <noreply@github.com>2022-11-20 16:31:20 +0100
commitdb7bcd51ae09c4ef25e08096de563903f61e2380 (patch)
tree5ae9977b48e1aff118fae3ebffb215b0b4afa887 /src/core/frontend/applets
parentservice: nfc: Implement nfc user (diff)
parentMerge pull request #9238 from german77/cabinet_applet (diff)
downloadyuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.gz
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.bz2
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.lz
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.xz
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.zst
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.zip
Diffstat (limited to 'src/core/frontend/applets')
-rw-r--r--src/core/frontend/applets/cabinet.cpp20
-rw-r--r--src/core/frontend/applets/cabinet.h37
2 files changed, 57 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..26c7fefe3
--- /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(
+ const CabinetCallback& 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..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