2022-04-23 08:59:50 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-08-02 13:59:08 +00:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "core/hle/service/mig/mig.h"
|
2023-02-18 21:26:48 +00:00
|
|
|
#include "core/hle/service/server_manager.h"
|
2018-08-02 13:59:08 +00:00
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
|
|
|
namespace Service::Migration {
|
|
|
|
|
|
|
|
class MIG_USR final : public ServiceFramework<MIG_USR> {
|
|
|
|
public:
|
2020-11-26 20:19:08 +00:00
|
|
|
explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {
|
2018-08-02 13:59:08 +00:00
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{10, nullptr, "TryGetLastMigrationInfo"},
|
|
|
|
{100, nullptr, "CreateServer"},
|
|
|
|
{101, nullptr, "ResumeServer"},
|
|
|
|
{200, nullptr, "CreateClient"},
|
|
|
|
{201, nullptr, "ResumeClient"},
|
2020-06-27 10:53:59 +00:00
|
|
|
{1001, nullptr, "Unknown1001"},
|
|
|
|
{1010, nullptr, "Unknown1010"},
|
|
|
|
{1100, nullptr, "Unknown1100"},
|
|
|
|
{1101, nullptr, "Unknown1101"},
|
|
|
|
{1200, nullptr, "Unknown1200"},
|
|
|
|
{1201, nullptr, "Unknown1201"}
|
2018-08-02 13:59:08 +00:00
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-02-18 21:26:48 +00:00
|
|
|
void LoopProcess(Core::System& system) {
|
|
|
|
auto server_manager = std::make_unique<ServerManager>(system);
|
|
|
|
|
|
|
|
server_manager->RegisterNamedService("mig:user", std::make_shared<MIG_USR>(system));
|
|
|
|
ServerManager::RunServer(std::move(server_manager));
|
2018-08-02 13:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Service::Migration
|