diff options
| author | 2018-07-25 19:04:31 -0400 | |
|---|---|---|
| committer | 2018-07-25 22:13:39 -0400 | |
| commit | 821f2c03cb1a0778d2fb48abfb971357a06c5445 (patch) | |
| tree | c0ddf2d3c9ac3c7d4e470b430f4640279542222c | |
| parent | Merge pull request #820 from lioncash/es (diff) | |
| download | yuzu-821f2c03cb1a0778d2fb48abfb971357a06c5445.tar.gz yuzu-821f2c03cb1a0778d2fb48abfb971357a06c5445.tar.xz yuzu-821f2c03cb1a0778d2fb48abfb971357a06c5445.zip | |
service: Add the erpt services
Adds the basic skeleton of the erpt service based off information on
Switch Brew.
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/erpt/erpt.cpp | 51 | ||||
| -rw-r--r-- | src/core/hle/service/erpt/erpt.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
4 files changed, 71 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 87e381055..755a8a7ee 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -136,6 +136,8 @@ add_library(core STATIC | |||
| 136 | hle/service/bcat/bcat.h | 136 | hle/service/bcat/bcat.h |
| 137 | hle/service/bcat/module.cpp | 137 | hle/service/bcat/module.cpp |
| 138 | hle/service/bcat/module.h | 138 | hle/service/bcat/module.h |
| 139 | hle/service/erpt/erpt.cpp | ||
| 140 | hle/service/erpt/erpt.h | ||
| 139 | hle/service/es/es.cpp | 141 | hle/service/es/es.cpp |
| 140 | hle/service/es/es.h | 142 | hle/service/es/es.h |
| 141 | hle/service/fatal/fatal.cpp | 143 | hle/service/fatal/fatal.cpp |
diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp new file mode 100644 index 000000000..ee11cd78e --- /dev/null +++ b/src/core/hle/service/erpt/erpt.cpp | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/service/erpt/erpt.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::ERPT { | ||
| 12 | |||
| 13 | class ErrorReportContext final : public ServiceFramework<ErrorReportContext> { | ||
| 14 | public: | ||
| 15 | explicit ErrorReportContext() : ServiceFramework{"erpt:c"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {0, nullptr, "SubmitContext"}, | ||
| 19 | {1, nullptr, "CreateReport"}, | ||
| 20 | {2, nullptr, "Unknown1"}, | ||
| 21 | {3, nullptr, "Unknown2"}, | ||
| 22 | {4, nullptr, "Unknown3"}, | ||
| 23 | {5, nullptr, "Unknown4"}, | ||
| 24 | {6, nullptr, "Unknown5"}, | ||
| 25 | }; | ||
| 26 | // clang-format on | ||
| 27 | |||
| 28 | RegisterHandlers(functions); | ||
| 29 | } | ||
| 30 | }; | ||
| 31 | |||
| 32 | class ErrorReportSession final : public ServiceFramework<ErrorReportSession> { | ||
| 33 | public: | ||
| 34 | explicit ErrorReportSession() : ServiceFramework{"erpt:r"} { | ||
| 35 | // clang-format off | ||
| 36 | static const FunctionInfo functions[] = { | ||
| 37 | {0, nullptr, "OpenReport"}, | ||
| 38 | {1, nullptr, "OpenManager"}, | ||
| 39 | }; | ||
| 40 | // clang-format on | ||
| 41 | |||
| 42 | RegisterHandlers(functions); | ||
| 43 | } | ||
| 44 | }; | ||
| 45 | |||
| 46 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 47 | std::make_shared<ErrorReportContext>()->InstallAsService(sm); | ||
| 48 | std::make_shared<ErrorReportSession>()->InstallAsService(sm); | ||
| 49 | } | ||
| 50 | |||
| 51 | } // namespace Service::ERPT | ||
diff --git a/src/core/hle/service/erpt/erpt.h b/src/core/hle/service/erpt/erpt.h new file mode 100644 index 000000000..de439ab6d --- /dev/null +++ b/src/core/hle/service/erpt/erpt.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::ERPT { | ||
| 12 | |||
| 13 | /// Registers all ERPT services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 15 | |||
| 16 | } // namespace Service::ERPT | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index b70d0d517..1f17ee7c8 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include "core/hle/service/apm/apm.h" | 21 | #include "core/hle/service/apm/apm.h" |
| 22 | #include "core/hle/service/audio/audio.h" | 22 | #include "core/hle/service/audio/audio.h" |
| 23 | #include "core/hle/service/bcat/bcat.h" | 23 | #include "core/hle/service/bcat/bcat.h" |
| 24 | #include "core/hle/service/erpt/erpt.h" | ||
| 24 | #include "core/hle/service/es/es.h" | 25 | #include "core/hle/service/es/es.h" |
| 25 | #include "core/hle/service/fatal/fatal.h" | 26 | #include "core/hle/service/fatal/fatal.h" |
| 26 | #include "core/hle/service/filesystem/filesystem.h" | 27 | #include "core/hle/service/filesystem/filesystem.h" |
| @@ -188,6 +189,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 188 | APM::InstallInterfaces(*sm); | 189 | APM::InstallInterfaces(*sm); |
| 189 | BCAT::InstallInterfaces(*sm); | 190 | BCAT::InstallInterfaces(*sm); |
| 190 | Audio::InstallInterfaces(*sm); | 191 | Audio::InstallInterfaces(*sm); |
| 192 | ERPT::InstallInterfaces(*sm); | ||
| 191 | ES::InstallInterfaces(*sm); | 193 | ES::InstallInterfaces(*sm); |
| 192 | Fatal::InstallInterfaces(*sm); | 194 | Fatal::InstallInterfaces(*sm); |
| 193 | FileSystem::InstallInterfaces(*sm); | 195 | FileSystem::InstallInterfaces(*sm); |