diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 63 | ||||
| -rw-r--r-- | src/core/hle/service/prepo/prepo.h | 16 |
2 files changed, 40 insertions, 39 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 3c43b8d8c..6a9eccfb5 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp | |||
| @@ -1,36 +1,47 @@ | |||
| 1 | #include <cinttypes> | 1 | // Copyright 2018 yuzu emulator team |
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 2 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 3 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/ipc_helpers.h" |
| 4 | #include "core/hle/kernel/event.h" | ||
| 5 | #include "core/hle/service/prepo/prepo.h" | 7 | #include "core/hle/service/prepo/prepo.h" |
| 8 | #include "core/hle/service/service.h" | ||
| 6 | 9 | ||
| 7 | namespace Service::PlayReport { | 10 | namespace Service::PlayReport { |
| 8 | PlayReport::PlayReport(const char* name) : ServiceFramework(name) { | ||
| 9 | static const FunctionInfo functions[] = { | ||
| 10 | {10100, nullptr, "SaveReport"}, | ||
| 11 | {10101, &PlayReport::SaveReportWithUser, "SaveReportWithUser"}, | ||
| 12 | {10200, nullptr, "RequestImmediateTransmission"}, | ||
| 13 | {10300, nullptr, "GetTransmissionStatus"}, | ||
| 14 | {20100, nullptr, "SaveSystemReport"}, | ||
| 15 | {20200, nullptr, "SetOperationMode"}, | ||
| 16 | {20101, nullptr, "SaveSystemReportWithUser"}, | ||
| 17 | {30100, nullptr, "ClearStorage"}, | ||
| 18 | {40100, nullptr, "IsUserAgreementCheckEnabled"}, | ||
| 19 | {40101, nullptr, "SetUserAgreementCheckEnabled"}, | ||
| 20 | {90100, nullptr, "GetStorageUsage"}, | ||
| 21 | {90200, nullptr, "GetStatistics"}, | ||
| 22 | {90201, nullptr, "GetThroughputHistory"}, | ||
| 23 | {90300, nullptr, "GetLastUploadError"}, | ||
| 24 | }; | ||
| 25 | RegisterHandlers(functions); | ||
| 26 | }; | ||
| 27 | 11 | ||
| 28 | void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) { | 12 | class PlayReport final : public ServiceFramework<PlayReport> { |
| 29 | // TODO(ogniK): Do we want to add play report? | 13 | public: |
| 30 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); | 14 | explicit PlayReport(const char* name) : ServiceFramework{name} { |
| 15 | // clang-format off | ||
| 16 | static const FunctionInfo functions[] = { | ||
| 17 | {10100, nullptr, "SaveReport"}, | ||
| 18 | {10101, &PlayReport::SaveReportWithUser, "SaveReportWithUser"}, | ||
| 19 | {10200, nullptr, "RequestImmediateTransmission"}, | ||
| 20 | {10300, nullptr, "GetTransmissionStatus"}, | ||
| 21 | {20100, nullptr, "SaveSystemReport"}, | ||
| 22 | {20200, nullptr, "SetOperationMode"}, | ||
| 23 | {20101, nullptr, "SaveSystemReportWithUser"}, | ||
| 24 | {30100, nullptr, "ClearStorage"}, | ||
| 25 | {40100, nullptr, "IsUserAgreementCheckEnabled"}, | ||
| 26 | {40101, nullptr, "SetUserAgreementCheckEnabled"}, | ||
| 27 | {90100, nullptr, "GetStorageUsage"}, | ||
| 28 | {90200, nullptr, "GetStatistics"}, | ||
| 29 | {90201, nullptr, "GetThroughputHistory"}, | ||
| 30 | {90300, nullptr, "GetLastUploadError"}, | ||
| 31 | }; | ||
| 32 | // clang-format on | ||
| 33 | |||
| 34 | RegisterHandlers(functions); | ||
| 35 | } | ||
| 36 | |||
| 37 | private: | ||
| 38 | void SaveReportWithUser(Kernel::HLERequestContext& ctx) { | ||
| 39 | // TODO(ogniK): Do we want to add play report? | ||
| 40 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); | ||
| 31 | 41 | ||
| 32 | IPC::ResponseBuilder rb{ctx, 2}; | 42 | IPC::ResponseBuilder rb{ctx, 2}; |
| 33 | rb.Push(RESULT_SUCCESS); | 43 | rb.Push(RESULT_SUCCESS); |
| 44 | } | ||
| 34 | }; | 45 | }; |
| 35 | 46 | ||
| 36 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 47 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
diff --git a/src/core/hle/service/prepo/prepo.h b/src/core/hle/service/prepo/prepo.h index f5a6aba6d..0e7b01331 100644 --- a/src/core/hle/service/prepo/prepo.h +++ b/src/core/hle/service/prepo/prepo.h | |||
| @@ -4,22 +4,12 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | namespace Service::SM { |
| 8 | #include <string> | 8 | class ServiceManager; |
| 9 | #include "core/hle/kernel/event.h" | 9 | } |
| 10 | #include "core/hle/service/service.h" | ||
| 11 | 10 | ||
| 12 | namespace Service::PlayReport { | 11 | namespace Service::PlayReport { |
| 13 | 12 | ||
| 14 | class PlayReport final : public ServiceFramework<PlayReport> { | ||
| 15 | public: | ||
| 16 | explicit PlayReport(const char* name); | ||
| 17 | ~PlayReport() = default; | ||
| 18 | |||
| 19 | private: | ||
| 20 | void SaveReportWithUser(Kernel::HLERequestContext& ctx); | ||
| 21 | }; | ||
| 22 | |||
| 23 | void InstallInterfaces(SM::ServiceManager& service_manager); | 13 | void InstallInterfaces(SM::ServiceManager& service_manager); |
| 24 | 14 | ||
| 25 | } // namespace Service::PlayReport | 15 | } // namespace Service::PlayReport |