diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/es/es.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index d183e5829..446f46b3c 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp @@ -2,8 +2,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "core/crypto/key_manager.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/service/es/es.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" namespace Service::ES { @@ -109,7 +110,7 @@ public: } private: - bool CheckRightsId(Kernel::HLERequestContext& ctx, const u128& rights_id) { + bool CheckRightsId(HLERequestContext& ctx, const u128& rights_id) { if (rights_id == u128{}) { LOG_ERROR(Service_ETicket, "The rights ID was invalid!"); IPC::ResponseBuilder rb{ctx, 2}; @@ -120,9 +121,9 @@ private: return true; } - void ImportTicket(Kernel::HLERequestContext& ctx) { + void ImportTicket(HLERequestContext& ctx) { const auto ticket = ctx.ReadBuffer(); - const auto cert = ctx.ReadBuffer(1); + [[maybe_unused]] const auto cert = ctx.ReadBuffer(1); if (ticket.size() < sizeof(Core::Crypto::Ticket)) { LOG_ERROR(Service_ETicket, "The input buffer is not large enough!"); @@ -145,7 +146,7 @@ private: rb.Push(ResultSuccess); } - void GetTitleKey(Kernel::HLERequestContext& ctx) { + void GetTitleKey(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto rights_id = rp.PopRaw<u128>(); @@ -171,7 +172,7 @@ private: rb.Push(ResultSuccess); } - void CountCommonTicket(Kernel::HLERequestContext& ctx) { + void CountCommonTicket(HLERequestContext& ctx) { LOG_DEBUG(Service_ETicket, "called"); const u32 count = static_cast<u32>(keys.GetCommonTickets().size()); @@ -181,7 +182,7 @@ private: rb.Push<u32>(count); } - void CountPersonalizedTicket(Kernel::HLERequestContext& ctx) { + void CountPersonalizedTicket(HLERequestContext& ctx) { LOG_DEBUG(Service_ETicket, "called"); const u32 count = static_cast<u32>(keys.GetPersonalizedTickets().size()); @@ -191,7 +192,7 @@ private: rb.Push<u32>(count); } - void ListCommonTicketRightsIds(Kernel::HLERequestContext& ctx) { + void ListCommonTicketRightsIds(HLERequestContext& ctx) { size_t out_entries = 0; if (!keys.GetCommonTickets().empty()) { out_entries = ctx.GetWriteBufferNumElements<u128>(); @@ -212,7 +213,7 @@ private: rb.Push<u32>(static_cast<u32>(out_entries)); } - void ListPersonalizedTicketRightsIds(Kernel::HLERequestContext& ctx) { + void ListPersonalizedTicketRightsIds(HLERequestContext& ctx) { size_t out_entries = 0; if (!keys.GetPersonalizedTickets().empty()) { out_entries = ctx.GetWriteBufferNumElements<u128>(); @@ -234,7 +235,7 @@ private: rb.Push<u32>(static_cast<u32>(out_entries)); } - void GetCommonTicketSize(Kernel::HLERequestContext& ctx) { + void GetCommonTicketSize(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto rights_id = rp.PopRaw<u128>(); @@ -250,7 +251,7 @@ private: rb.Push<u64>(ticket.GetSize()); } - void GetPersonalizedTicketSize(Kernel::HLERequestContext& ctx) { + void GetPersonalizedTicketSize(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto rights_id = rp.PopRaw<u128>(); @@ -266,7 +267,7 @@ private: rb.Push<u64>(ticket.GetSize()); } - void GetCommonTicketData(Kernel::HLERequestContext& ctx) { + void GetCommonTicketData(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto rights_id = rp.PopRaw<u128>(); @@ -285,7 +286,7 @@ private: rb.Push<u64>(write_size); } - void GetPersonalizedTicketData(Kernel::HLERequestContext& ctx) { + void GetPersonalizedTicketData(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto rights_id = rp.PopRaw<u128>(); @@ -307,8 +308,11 @@ private: Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance(); }; -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { - std::make_shared<ETicket>(system)->InstallAsService(service_manager); +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("es", std::make_shared<ETicket>(system)); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::ES |