mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-22 07:42:52 +00:00
bb94cff886
Co-authored-by: Jarrod Norwell <official.antique@gmail.com> Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/398 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: Gamer64 <gamer64@eden-emu.dev> Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
|
|
#include "core/frontend/applets/applet.h"
|
|
#include "core/hle/service/nfp/nfp_types.h"
|
|
|
|
namespace Service::NFC {
|
|
class NfcDevice;
|
|
} // namespace Service::NFC
|
|
|
|
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 Applet {
|
|
public:
|
|
virtual ~CabinetApplet();
|
|
virtual void ShowCabinetApplet(const CabinetCallback& callback,
|
|
const CabinetParameters& parameters,
|
|
std::shared_ptr<Service::NFC::NfcDevice> nfp_device) const = 0;
|
|
};
|
|
|
|
class DefaultCabinetApplet final : public CabinetApplet {
|
|
public:
|
|
void Close() const override;
|
|
void ShowCabinetApplet(const CabinetCallback& callback, const CabinetParameters& parameters,
|
|
std::shared_ptr<Service::NFC::NfcDevice> nfp_device) const override;
|
|
};
|
|
|
|
} // namespace Core::Frontend
|