diff options
| author | 2018-08-03 11:00:27 -0400 | |
|---|---|---|
| committer | 2018-08-03 11:00:27 -0400 | |
| commit | 40e78b9a893316e7377ec03ca42fd21bfc6c452d (patch) | |
| tree | 622d2dbd11eae9d9da36e9a53a9dfb93137bfe42 /src/core | |
| parent | Merge pull request #900 from lioncash/init (diff) | |
| parent | service: Add migration services (diff) | |
| download | yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.gz yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.xz yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.zip | |
Merge pull request #898 from lioncash/mig
service: Add migration services
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/mig/mig.cpp | 34 | ||||
| -rw-r--r-- | src/core/hle/service/mig/mig.h | 15 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
4 files changed, 53 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index d29f6a84f..780a3affe 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -206,6 +206,8 @@ add_library(core STATIC | |||
| 206 | hle/service/ldr/ldr.h | 206 | hle/service/ldr/ldr.h |
| 207 | hle/service/lm/lm.cpp | 207 | hle/service/lm/lm.cpp |
| 208 | hle/service/lm/lm.h | 208 | hle/service/lm/lm.h |
| 209 | hle/service/mig/mig.cpp | ||
| 210 | hle/service/mig/mig.h | ||
| 209 | hle/service/mii/mii.cpp | 211 | hle/service/mii/mii.cpp |
| 210 | hle/service/mii/mii.h | 212 | hle/service/mii/mii.h |
| 211 | hle/service/mm/mm_u.cpp | 213 | hle/service/mm/mm_u.cpp |
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 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | |||
| 7 | #include "core/hle/service/mig/mig.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::Migration { | ||
| 12 | |||
| 13 | class MIG_USR final : public ServiceFramework<MIG_USR> { | ||
| 14 | public: | ||
| 15 | explicit MIG_USR() : ServiceFramework{"mig:usr"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {10, nullptr, "TryGetLastMigrationInfo"}, | ||
| 19 | {100, nullptr, "CreateServer"}, | ||
| 20 | {101, nullptr, "ResumeServer"}, | ||
| 21 | {200, nullptr, "CreateClient"}, | ||
| 22 | {201, nullptr, "ResumeClient"}, | ||
| 23 | }; | ||
| 24 | // clang-format on | ||
| 25 | |||
| 26 | RegisterHandlers(functions); | ||
| 27 | } | ||
| 28 | }; | ||
| 29 | |||
| 30 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 31 | std::make_shared<MIG_USR>()->InstallAsService(sm); | ||
| 32 | } | ||
| 33 | |||
| 34 | } // 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 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::Migration { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::Migration | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 025f0c696..61e0c34a0 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include "core/hle/service/ldn/ldn.h" | 38 | #include "core/hle/service/ldn/ldn.h" |
| 39 | #include "core/hle/service/ldr/ldr.h" | 39 | #include "core/hle/service/ldr/ldr.h" |
| 40 | #include "core/hle/service/lm/lm.h" | 40 | #include "core/hle/service/lm/lm.h" |
| 41 | #include "core/hle/service/mig/mig.h" | ||
| 41 | #include "core/hle/service/mii/mii.h" | 42 | #include "core/hle/service/mii/mii.h" |
| 42 | #include "core/hle/service/mm/mm_u.h" | 43 | #include "core/hle/service/mm/mm_u.h" |
| 43 | #include "core/hle/service/ncm/ncm.h" | 44 | #include "core/hle/service/ncm/ncm.h" |
| @@ -225,6 +226,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 225 | LDN::InstallInterfaces(*sm); | 226 | LDN::InstallInterfaces(*sm); |
| 226 | LDR::InstallInterfaces(*sm); | 227 | LDR::InstallInterfaces(*sm); |
| 227 | LM::InstallInterfaces(*sm); | 228 | LM::InstallInterfaces(*sm); |
| 229 | Migration::InstallInterfaces(*sm); | ||
| 228 | Mii::InstallInterfaces(*sm); | 230 | Mii::InstallInterfaces(*sm); |
| 229 | MM::InstallInterfaces(*sm); | 231 | MM::InstallInterfaces(*sm); |
| 230 | NCM::InstallInterfaces(*sm); | 232 | NCM::InstallInterfaces(*sm); |