summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-09-11 20:46:49 -0400
committerGravatar Lioncash2018-09-11 20:49:01 -0400
commit325c259fc590d54924a4b60ba61b0c4078c7ea66 (patch)
tree4f480f9b0f852e17339b68c3aecdabde1dcaf4a0
parentMerge pull request #1291 from lioncash/default (diff)
downloadyuzu-325c259fc590d54924a4b60ba61b0c4078c7ea66.tar.gz
yuzu-325c259fc590d54924a4b60ba61b0c4078c7ea66.tar.xz
yuzu-325c259fc590d54924a4b60ba61b0c4078c7ea66.zip
service/prepo: Move class into the cpp file
This doesn't need to be exposed within the header and be kept in the translation unit, eliminating the need to include anything within the header.
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/prepo/prepo.cpp63
-rw-r--r--src/core/hle/service/prepo/prepo.h16
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
7namespace Service::PlayReport { 10namespace Service::PlayReport {
8PlayReport::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
28void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) { 12class PlayReport final : public ServiceFramework<PlayReport> {
29 // TODO(ogniK): Do we want to add play report? 13public:
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
37private:
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
36void InstallInterfaces(SM::ServiceManager& service_manager) { 47void 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> 7namespace Service::SM {
8#include <string> 8class ServiceManager;
9#include "core/hle/kernel/event.h" 9}
10#include "core/hle/service/service.h"
11 10
12namespace Service::PlayReport { 11namespace Service::PlayReport {
13 12
14class PlayReport final : public ServiceFramework<PlayReport> {
15public:
16 explicit PlayReport(const char* name);
17 ~PlayReport() = default;
18
19private:
20 void SaveReportWithUser(Kernel::HLERequestContext& ctx);
21};
22
23void InstallInterfaces(SM::ServiceManager& service_manager); 13void InstallInterfaces(SM::ServiceManager& service_manager);
24 14
25} // namespace Service::PlayReport 15} // namespace Service::PlayReport