mig.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include <memory>
  4. #include "core/hle/service/mig/mig.h"
  5. #include "core/hle/service/server_manager.h"
  6. #include "core/hle/service/service.h"
  7. namespace Service::Migration {
  8. class MIG_USR final : public ServiceFramework<MIG_USR> {
  9. public:
  10. explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {
  11. // clang-format off
  12. static const FunctionInfo functions[] = {
  13. {10, nullptr, "TryGetLastMigrationInfo"},
  14. {100, nullptr, "CreateServer"},
  15. {101, nullptr, "ResumeServer"},
  16. {200, nullptr, "CreateClient"},
  17. {201, nullptr, "ResumeClient"},
  18. {1001, nullptr, "Unknown1001"},
  19. {1010, nullptr, "Unknown1010"},
  20. {1100, nullptr, "Unknown1100"},
  21. {1101, nullptr, "Unknown1101"},
  22. {1200, nullptr, "Unknown1200"},
  23. {1201, nullptr, "Unknown1201"}
  24. };
  25. // clang-format on
  26. RegisterHandlers(functions);
  27. }
  28. };
  29. void LoopProcess(Core::System& system) {
  30. auto server_manager = std::make_unique<ServerManager>(system);
  31. server_manager->RegisterNamedService("mig:user", std::make_shared<MIG_USR>(system));
  32. ServerManager::RunServer(std::move(server_manager));
  33. }
  34. } // namespace Service::Migration