summaryrefslogtreecommitdiff
path: root/src/core/hle/service/erpt
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-25 19:04:31 -0400
committerGravatar Lioncash2018-07-25 22:13:39 -0400
commit821f2c03cb1a0778d2fb48abfb971357a06c5445 (patch)
treec0ddf2d3c9ac3c7d4e470b430f4640279542222c /src/core/hle/service/erpt
parentMerge pull request #820 from lioncash/es (diff)
downloadyuzu-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.cpp51
-rw-r--r--src/core/hle/service/erpt/erpt.h16
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
11namespace Service::ERPT {
12
13class ErrorReportContext final : public ServiceFramework<ErrorReportContext> {
14public:
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
32class ErrorReportSession final : public ServiceFramework<ErrorReportSession> {
33public:
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
46void 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
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::ERPT {
12
13/// Registers all ERPT services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& sm);
15
16} // namespace Service::ERPT