summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-03 11:00:27 -0400
committerGravatar GitHub2018-08-03 11:00:27 -0400
commit40e78b9a893316e7377ec03ca42fd21bfc6c452d (patch)
tree622d2dbd11eae9d9da36e9a53a9dfb93137bfe42 /src/core
parentMerge pull request #900 from lioncash/init (diff)
parentservice: Add migration services (diff)
downloadyuzu-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.txt2
-rw-r--r--src/core/hle/service/mig/mig.cpp34
-rw-r--r--src/core/hle/service/mig/mig.h15
-rw-r--r--src/core/hle/service/service.cpp2
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
11namespace Service::Migration {
12
13class MIG_USR final : public ServiceFramework<MIG_USR> {
14public:
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
30void 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
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::Migration {
12
13void 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);