2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-07-25 19:04:31 -04:00
|
|
|
|
|
|
|
#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 15:19:08 -05:00
|
|
|
explicit ErrorReportContext(Core::System& system_) : ServiceFramework{system_, "erpt:c"} {
|
2018-07-25 19:04:31 -04:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{0, nullptr, "SubmitContext"},
|
2021-04-07 10:34:31 -04:00
|
|
|
{1, nullptr, "CreateReportV0"},
|
2018-12-02 15:46:42 -05: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 08:54:58 -05:00
|
|
|
{9, nullptr, "SubmitAttachment"},
|
|
|
|
{10, nullptr, "CreateReportWithAttachments"},
|
2021-04-07 10:34:31 -04:00
|
|
|
{11, nullptr, "CreateReport"},
|
|
|
|
{20, nullptr, "RegisterRunningApplet"},
|
|
|
|
{21, nullptr, "UnregisterRunningApplet"},
|
|
|
|
{22, nullptr, "UpdateAppletSuspendedDuration"},
|
|
|
|
{30, nullptr, "InvalidateForcedShutdownDetection"},
|
2018-07-25 19:04:31 -04:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ErrorReportSession final : public ServiceFramework<ErrorReportSession> {
|
|
|
|
public:
|
2020-11-26 15:19:08 -05:00
|
|
|
explicit ErrorReportSession(Core::System& system_) : ServiceFramework{system_, "erpt:r"} {
|
2018-07-25 19:04:31 -04:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{0, nullptr, "OpenReport"},
|
|
|
|
{1, nullptr, "OpenManager"},
|
2019-11-12 08:54:58 -05:00
|
|
|
{2, nullptr, "OpenAttachment"},
|
2018-07-25 19:04:31 -04:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-26 15:19:08 -05: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-25 19:04:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Service::ERPT
|