prepo.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <cinttypes>
  2. #include "common/logging/log.h"
  3. #include "core/hle/ipc_helpers.h"
  4. #include "core/hle/kernel/event.h"
  5. #include "core/hle/service/prepo/prepo.h"
  6. namespace Service::PlayReport {
  7. PlayReport::PlayReport(const char* name) : ServiceFramework(name) {
  8. static const FunctionInfo functions[] = {
  9. {10100, nullptr, "SaveReport"},
  10. {10101, &PlayReport::SaveReportWithUser, "SaveReportWithUser"},
  11. {10200, nullptr, "RequestImmediateTransmission"},
  12. {10300, nullptr, "GetTransmissionStatus"},
  13. {20100, nullptr, "SaveSystemReport"},
  14. {20200, nullptr, "SetOperationMode"},
  15. {20101, nullptr, "SaveSystemReportWithUser"},
  16. {30100, nullptr, "ClearStorage"},
  17. {40100, nullptr, "IsUserAgreementCheckEnabled"},
  18. {40101, nullptr, "SetUserAgreementCheckEnabled"},
  19. {90100, nullptr, "GetStorageUsage"},
  20. {90200, nullptr, "GetStatistics"},
  21. {90201, nullptr, "GetThroughputHistory"},
  22. {90300, nullptr, "GetLastUploadError"},
  23. };
  24. RegisterHandlers(functions);
  25. };
  26. void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) {
  27. // TODO(ogniK): Do we want to add play report?
  28. NGLOG_WARNING(Service_PREPO, "(STUBBED) called");
  29. IPC::ResponseBuilder rb{ctx, 2};
  30. rb.Push(RESULT_SUCCESS);
  31. };
  32. void InstallInterfaces(SM::ServiceManager& service_manager) {
  33. std::make_shared<PlayReport>("prepo:a")->InstallAsService(service_manager);
  34. std::make_shared<PlayReport>("prepo:m")->InstallAsService(service_manager);
  35. std::make_shared<PlayReport>("prepo:s")->InstallAsService(service_manager);
  36. std::make_shared<PlayReport>("prepo:u")->InstallAsService(service_manager);
  37. }
  38. } // namespace Service::PlayReport