service: nfc: Create mifare interface

This commit is contained in:
Narr the Reg
2023-04-14 17:55:13 -06:00
committed by german77
parent a3fa64fcc4
commit 00d76fc5f5
3 changed files with 58 additions and 50 deletions

View File

@ -6,7 +6,7 @@
#include "common/logging/log.h"
#include "common/settings.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/nfc/mifare_user.h"
#include "core/hle/service/nfc/mifare_interface.h"
#include "core/hle/service/nfc/nfc.h"
#include "core/hle/service/nfc/nfc_interface.h"
#include "core/hle/service/server_manager.h"
@ -16,7 +16,7 @@ namespace Service::NFC {
class IUser final : public Interface {
public:
explicit IUser(Core::System& system_) : Interface(system_, "IUser") {
explicit IUser(Core::System& system_) : Interface(system_, "NFC::IUser") {
// clang-format off
static const FunctionInfo functions[] = {
{0, &Interface::Initialize, "InitializeOld"},
@ -50,7 +50,7 @@ public:
class ISystem final : public Interface {
public:
explicit ISystem(Core::System& system_) : Interface{system_, "ISystem"} {
explicit ISystem(Core::System& system_) : Interface{system_, "NFC::ISystem"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &Interface::Initialize, "InitializeOld"},
@ -85,6 +85,32 @@ public:
}
};
class MFIUser final : public MFInterface {
public:
explicit MFIUser(Core::System& system_) : MFInterface{system_, "NFC::MFInterface"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &MFIUser::Initialize, "Initialize"},
{1, &MFIUser::Finalize, "Finalize"},
{2, &MFIUser::ListDevices, "ListDevices"},
{3, &MFIUser::StartDetection, "StartDetection"},
{4, &MFIUser::StopDetection, "StopDetection"},
{5, &MFIUser::Read, "Read"},
{6, &MFIUser::Write, "Write"},
{7, &MFIUser::GetTagInfo, "GetTagInfo"},
{8, &MFIUser::GetActivateEventHandle, "GetActivateEventHandle"},
{9, &MFIUser::GetDeactivateEventHandle, "GetDeactivateEventHandle"},
{10, &MFIUser::GetState, "GetState"},
{11, &MFIUser::GetDeviceState, "GetDeviceState"},
{12, &MFIUser::GetNpadId, "GetNpadId"},
{13, &MFIUser::GetAvailabilityChangeEventHandle, "GetAvailabilityChangeEventHandle"},
};
// clang-format on
RegisterHandlers(functions);
}
};
class IAm final : public ServiceFramework<IAm> {
public:
explicit IAm(Core::System& system_) : ServiceFramework{system_, "NFC::IAm"} {