diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-08-02 09:59:08 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-08-02 10:09:45 -0400 |
| commit | 7469e26e5e1a224aaeee4eccc86079c82f9c326d (patch) | |
| tree | 55b3441d54a431fcb454a12ec17173ba882918ba /src/core/hle/service/mig | |
| parent | a03c644aed943397f7a4e44715a167e0471b6262 (diff) | |
service: Add migration services
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
Diffstat (limited to 'src/core/hle/service/mig')
| -rw-r--r-- | src/core/hle/service/mig/mig.cpp | 34 | ||||
| -rw-r--r-- | src/core/hle/service/mig/mig.h | 15 |
2 files changed, 49 insertions, 0 deletions
diff --git a/src/core/hle/service/mig/mig.cpp b/src/core/hle/service/mig/mig.cpp new file mode 100644 index 000000000..d16367f2c --- /dev/null +++ b/src/core/hle/service/mig/mig.cpp @@ -0,0 +1,34 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <memory> + +#include "core/hle/service/mig/mig.h" +#include "core/hle/service/service.h" +#include "core/hle/service/sm/sm.h" + +namespace Service::Migration { + +class MIG_USR final : public ServiceFramework<MIG_USR> { +public: + explicit MIG_USR() : ServiceFramework{"mig:usr"} { + // clang-format off + static const FunctionInfo functions[] = { + {10, nullptr, "TryGetLastMigrationInfo"}, + {100, nullptr, "CreateServer"}, + {101, nullptr, "ResumeServer"}, + {200, nullptr, "CreateClient"}, + {201, nullptr, "ResumeClient"}, + }; + // clang-format on + + RegisterHandlers(functions); + } +}; + +void InstallInterfaces(SM::ServiceManager& sm) { + std::make_shared<MIG_USR>()->InstallAsService(sm); +} + +} // namespace Service::Migration diff --git a/src/core/hle/service/mig/mig.h b/src/core/hle/service/mig/mig.h new file mode 100644 index 000000000..288c1c1b3 --- /dev/null +++ b/src/core/hle/service/mig/mig.h @@ -0,0 +1,15 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +namespace Service::SM { +class ServiceManager; +} + +namespace Service::Migration { + +void InstallInterfaces(SM::ServiceManager& sm); + +} // namespace Service::Migration |
