erpt.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include <memory>
  5. #include "core/hle/service/erpt/erpt.h"
  6. #include "core/hle/service/service.h"
  7. #include "core/hle/service/sm/sm.h"
  8. namespace Service::ERPT {
  9. class ErrorReportContext final : public ServiceFramework<ErrorReportContext> {
  10. public:
  11. explicit ErrorReportContext() : ServiceFramework{"erpt:c"} {
  12. // clang-format off
  13. static const FunctionInfo functions[] = {
  14. {0, nullptr, "SubmitContext"},
  15. {1, nullptr, "CreateReport"},
  16. {2, nullptr, "SetInitialLaunchSettingsCompletionTime"},
  17. {3, nullptr, "ClearInitialLaunchSettingsCompletionTime"},
  18. {4, nullptr, "UpdatePowerOnTime"},
  19. {5, nullptr, "UpdateAwakeTime"},
  20. {6, nullptr, "SubmitMultipleCategoryContext"},
  21. {7, nullptr, "UpdateApplicationLaunchTime"},
  22. {8, nullptr, "ClearApplicationLaunchTime"},
  23. };
  24. // clang-format on
  25. RegisterHandlers(functions);
  26. }
  27. };
  28. class ErrorReportSession final : public ServiceFramework<ErrorReportSession> {
  29. public:
  30. explicit ErrorReportSession() : ServiceFramework{"erpt:r"} {
  31. // clang-format off
  32. static const FunctionInfo functions[] = {
  33. {0, nullptr, "OpenReport"},
  34. {1, nullptr, "OpenManager"},
  35. };
  36. // clang-format on
  37. RegisterHandlers(functions);
  38. }
  39. };
  40. void InstallInterfaces(SM::ServiceManager& sm) {
  41. std::make_shared<ErrorReportContext>()->InstallAsService(sm);
  42. std::make_shared<ErrorReportSession>()->InstallAsService(sm);
  43. }
  44. } // namespace Service::ERPT