2018-07-26 01:04:31 +02:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "core/hle/service/erpt/erpt.h"
|
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
#include "core/hle/service/sm/sm.h"
|
|
|
|
|
|
|
|
namespace Service::ERPT {
|
|
|
|
|
|
|
|
class ErrorReportContext final : public ServiceFramework<ErrorReportContext> {
|
|
|
|
public:
|
2020-11-26 21:19:08 +01:00
|
|
|
explicit ErrorReportContext(Core::System& system_) : ServiceFramework{system_, "erpt:c"} {
|
2018-07-26 01:04:31 +02:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{0, nullptr, "SubmitContext"},
|
2021-04-07 16:34:31 +02:00
|
|
|
{1, nullptr, "CreateReportV0"},
|
2018-12-02 21:46:42 +01:00
|
|
|
{2, nullptr, "SetInitialLaunchSettingsCompletionTime"},
|
|
|
|
{3, nullptr, "ClearInitialLaunchSettingsCompletionTime"},
|
|
|
|
{4, nullptr, "UpdatePowerOnTime"},
|
|
|
|
{5, nullptr, "UpdateAwakeTime"},
|
|
|
|
{6, nullptr, "SubmitMultipleCategoryContext"},
|
|
|
|
{7, nullptr, "UpdateApplicationLaunchTime"},
|
|
|
|
{8, nullptr, "ClearApplicationLaunchTime"},
|
2019-11-12 14:54:58 +01:00
|
|
|
{9, nullptr, "SubmitAttachment"},
|
|
|
|
{10, nullptr, "CreateReportWithAttachments"},
|
2021-04-07 16:34:31 +02:00
|
|
|
{11, nullptr, "CreateReport"},
|
|
|
|
{20, nullptr, "RegisterRunningApplet"},
|
|
|
|
{21, nullptr, "UnregisterRunningApplet"},
|
|
|
|
{22, nullptr, "UpdateAppletSuspendedDuration"},
|
|
|
|
{30, nullptr, "InvalidateForcedShutdownDetection"},
|
2018-07-26 01:04:31 +02:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ErrorReportSession final : public ServiceFramework<ErrorReportSession> {
|
|
|
|
public:
|
2020-11-26 21:19:08 +01:00
|
|
|
explicit ErrorReportSession(Core::System& system_) : ServiceFramework{system_, "erpt:r"} {
|
2018-07-26 01:04:31 +02:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{0, nullptr, "OpenReport"},
|
|
|
|
{1, nullptr, "OpenManager"},
|
2019-11-12 14:54:58 +01:00
|
|
|
{2, nullptr, "OpenAttachment"},
|
2018-07-26 01:04:31 +02:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-26 21:19:08 +01:00
|
|
|
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
|
|
|
|
std::make_shared<ErrorReportContext>(system)->InstallAsService(sm);
|
|
|
|
std::make_shared<ErrorReportSession>(system)->InstallAsService(sm);
|
2018-07-26 01:04:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Service::ERPT
|