summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/prepo/prepo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/prepo/prepo.cpp')
-rw-r--r--src/core/hle/service/prepo/prepo.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
index 90c5f8756..ec4a84989 100644
--- a/src/core/hle/service/prepo/prepo.cpp
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -4,9 +4,10 @@
#include "common/hex_util.h"
#include "common/logging/log.h"
#include "core/core.h"
-#include "core/hle/ipc_helpers.h"
#include "core/hle/service/acc/profile_manager.h"
+#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/prepo/prepo.h"
+#include "core/hle/service/server_manager.h"
#include "core/hle/service/service.h"
#include "core/reporter.h"
@@ -53,7 +54,7 @@ public:
private:
template <Core::Reporter::PlayReportType Type>
- void SaveReport(Kernel::HLERequestContext& ctx) {
+ void SaveReport(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto process_id = rp.PopRaw<u64>();
@@ -79,7 +80,7 @@ private:
}
template <Core::Reporter::PlayReportType Type>
- void SaveReportWithUser(Kernel::HLERequestContext& ctx) {
+ void SaveReportWithUser(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto user_id = rp.PopRaw<u128>();
const auto process_id = rp.PopRaw<u64>();
@@ -106,14 +107,14 @@ private:
rb.Push(ResultSuccess);
}
- void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) {
+ void RequestImmediateTransmission(HLERequestContext& ctx) {
LOG_WARNING(Service_PREPO, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
- void GetTransmissionStatus(Kernel::HLERequestContext& ctx) {
+ void GetTransmissionStatus(HLERequestContext& ctx) {
LOG_WARNING(Service_PREPO, "(STUBBED) called");
constexpr s32 status = 0;
@@ -123,7 +124,7 @@ private:
rb.Push(status);
}
- void GetSystemSessionId(Kernel::HLERequestContext& ctx) {
+ void GetSystemSessionId(HLERequestContext& ctx) {
LOG_WARNING(Service_PREPO, "(STUBBED) called");
constexpr u64 system_session_id = 0;
@@ -132,7 +133,7 @@ private:
rb.Push(system_session_id);
}
- void SaveSystemReport(Kernel::HLERequestContext& ctx) {
+ void SaveSystemReport(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto title_id = rp.PopRaw<u64>();
@@ -155,7 +156,7 @@ private:
rb.Push(ResultSuccess);
}
- void SaveSystemReportWithUser(Kernel::HLERequestContext& ctx) {
+ void SaveSystemReportWithUser(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto user_id = rp.PopRaw<u128>();
const auto title_id = rp.PopRaw<u64>();
@@ -183,12 +184,20 @@ private:
}
};
-void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
- std::make_shared<PlayReport>("prepo:a", system)->InstallAsService(service_manager);
- std::make_shared<PlayReport>("prepo:a2", system)->InstallAsService(service_manager);
- std::make_shared<PlayReport>("prepo:m", system)->InstallAsService(service_manager);
- std::make_shared<PlayReport>("prepo:s", system)->InstallAsService(service_manager);
- std::make_shared<PlayReport>("prepo:u", system)->InstallAsService(service_manager);
+void LoopProcess(Core::System& system) {
+ auto server_manager = std::make_unique<ServerManager>(system);
+
+ server_manager->RegisterNamedService("prepo:a",
+ std::make_shared<PlayReport>("prepo:a", system));
+ server_manager->RegisterNamedService("prepo:a2",
+ std::make_shared<PlayReport>("prepo:a2", system));
+ server_manager->RegisterNamedService("prepo:m",
+ std::make_shared<PlayReport>("prepo:m", system));
+ server_manager->RegisterNamedService("prepo:s",
+ std::make_shared<PlayReport>("prepo:s", system));
+ server_manager->RegisterNamedService("prepo:u",
+ std::make_shared<PlayReport>("prepo:u", system));
+ ServerManager::RunServer(std::move(server_manager));
}
} // namespace Service::PlayReport