diff options
| author | 2018-07-25 19:04:31 -0400 | |
|---|---|---|
| committer | 2018-07-25 22:13:39 -0400 | |
| commit | 821f2c03cb1a0778d2fb48abfb971357a06c5445 (patch) | |
| tree | c0ddf2d3c9ac3c7d4e470b430f4640279542222c /src/core/hle/service/erpt | |
| 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.
Diffstat (limited to 'src/core/hle/service/erpt')
| -rw-r--r-- | src/core/hle/service/erpt/erpt.cpp | 51 | ||||
| -rw-r--r-- | src/core/hle/service/erpt/erpt.h | 16 |
2 files changed, 67 insertions, 0 deletions
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 | ||