eupld.cpp 1.6 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/eupld/eupld.h"
  6. #include "core/hle/service/service.h"
  7. #include "core/hle/service/sm/sm.h"
  8. namespace Service::EUPLD {
  9. class ErrorUploadContext final : public ServiceFramework<ErrorUploadContext> {
  10. public:
  11. explicit ErrorUploadContext(Core::System& system_) : ServiceFramework{system_, "eupld:c"} {
  12. // clang-format off
  13. static const FunctionInfo functions[] = {
  14. {0, nullptr, "SetUrl"},
  15. {1, nullptr, "ImportCrt"},
  16. {2, nullptr, "ImportPki"},
  17. {3, nullptr, "SetAutoUpload"},
  18. {4, nullptr, "GetAutoUpload"},
  19. };
  20. // clang-format on
  21. RegisterHandlers(functions);
  22. }
  23. };
  24. class ErrorUploadRequest final : public ServiceFramework<ErrorUploadRequest> {
  25. public:
  26. explicit ErrorUploadRequest(Core::System& system_) : ServiceFramework{system_, "eupld:r"} {
  27. // clang-format off
  28. static const FunctionInfo functions[] = {
  29. {0, nullptr, "Initialize"},
  30. {1, nullptr, "UploadAll"},
  31. {2, nullptr, "UploadSelected"},
  32. {3, nullptr, "GetUploadStatus"},
  33. {4, nullptr, "CancelUpload"},
  34. {5, nullptr, "GetResult"},
  35. };
  36. // clang-format on
  37. RegisterHandlers(functions);
  38. }
  39. };
  40. void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
  41. std::make_shared<ErrorUploadContext>(system)->InstallAsService(sm);
  42. std::make_shared<ErrorUploadRequest>(system)->InstallAsService(sm);
  43. }
  44. } // namespace Service::EUPLD