summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-03 17:00:27 +0200
committerGitHub <noreply@github.com>2018-08-03 17:00:27 +0200
commit40e78b9a893316e7377ec03ca42fd21bfc6c452d (patch)
tree622d2dbd11eae9d9da36e9a53a9dfb93137bfe42 /src/core
parentMerge pull request #900 from lioncash/init (diff)
parentservice: Add migration services (diff)
downloadyuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.gz
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.bz2
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.lz
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.xz
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.tar.zst
yuzu-40e78b9a893316e7377ec03ca42fd21bfc6c452d.zip
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
hle/service/ldr/ldr.h
hle/service/lm/lm.cpp
hle/service/lm/lm.h
+ hle/service/mig/mig.cpp
+ hle/service/mig/mig.h
hle/service/mii/mii.cpp
hle/service/mii/mii.h
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 @@
+// 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
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 @@
#include "core/hle/service/ldn/ldn.h"
#include "core/hle/service/ldr/ldr.h"
#include "core/hle/service/lm/lm.h"
+#include "core/hle/service/mig/mig.h"
#include "core/hle/service/mii/mii.h"
#include "core/hle/service/mm/mm_u.h"
#include "core/hle/service/ncm/ncm.h"
@@ -225,6 +226,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
LDN::InstallInterfaces(*sm);
LDR::InstallInterfaces(*sm);
LM::InstallInterfaces(*sm);
+ Migration::InstallInterfaces(*sm);
Mii::InstallInterfaces(*sm);
MM::InstallInterfaces(*sm);
NCM::InstallInterfaces(*sm);