diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfc/nfc.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index b17b18ab9..6595e34ed 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp @@ -5,12 +5,12 @@ #include "common/logging/log.h" #include "common/settings.h" -#include "core/hle/ipc_helpers.h" +#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/nfc/mifare_user.h" #include "core/hle/service/nfc/nfc.h" #include "core/hle/service/nfc/nfc_user.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" -#include "core/hle/service/sm/sm.h" namespace Service::NFC { @@ -42,7 +42,7 @@ public: } private: - void CreateAmInterface(Kernel::HLERequestContext& ctx) { + void CreateAmInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -64,7 +64,7 @@ public: } private: - void CreateUserInterface(Kernel::HLERequestContext& ctx) { + void CreateUserInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -86,7 +86,7 @@ public: } private: - void CreateUserInterface(Kernel::HLERequestContext& ctx) { + void CreateUserInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -145,7 +145,7 @@ public: } private: - void CreateSystemInterface(Kernel::HLERequestContext& ctx) { + void CreateSystemInterface(HLERequestContext& ctx) { LOG_DEBUG(Service_NFC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -154,11 +154,14 @@ private: } }; -void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { - std::make_shared<NFC_AM>(system)->InstallAsService(sm); - std::make_shared<NFC_MF_U>(system)->InstallAsService(sm); - std::make_shared<NFC_U>(system)->InstallAsService(sm); - std::make_shared<NFC_SYS>(system)->InstallAsService(sm); +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("nfc:am", std::make_shared<NFC_AM>(system)); + server_manager->RegisterNamedService("nfc:mf:u", std::make_shared<NFC_MF_U>(system)); + server_manager->RegisterNamedService("nfc:user", std::make_shared<NFC_U>(system)); + server_manager->RegisterNamedService("nfc:sys", std::make_shared<NFC_SYS>(system)); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::NFC |