summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nim
diff options
context:
space:
mode:
authorpurpasmart96 <kanzoconfigz@hotmail.com>2015-06-12 00:12:16 +0200
committerpurpasmart96 <kanzoconfigz@hotmail.com>2015-06-12 05:41:59 +0200
commit7933dbe6a0eee766a64b26f7d4461a40e473fcdc (patch)
tree91ae37d96b1e508f63055f285c64225811237b8a /src/core/hle/service/nim
parentMerge pull request #848 from lioncash/ldm (diff)
downloadyuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.gz
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.bz2
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.lz
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.xz
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.zst
yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nim/nim.cpp42
-rw-r--r--src/core/hle/service/nim/nim.h30
-rw-r--r--src/core/hle/service/nim/nim_aoc.cpp (renamed from src/core/hle/service/nim_aoc.cpp)16
-rw-r--r--src/core/hle/service/nim/nim_aoc.h22
-rw-r--r--src/core/hle/service/nim/nim_s.cpp22
-rw-r--r--src/core/hle/service/nim/nim_s.h22
-rw-r--r--src/core/hle/service/nim/nim_u.cpp27
-rw-r--r--src/core/hle/service/nim/nim_u.h22
-rw-r--r--src/core/hle/service/nim_aoc.h23
-rw-r--r--src/core/hle/service/nim_u.cpp48
-rw-r--r--src/core/hle/service/nim_u.h23
11 files changed, 194 insertions, 103 deletions
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
new file mode 100644
index 000000000..73b0ee52a
--- /dev/null
+++ b/src/core/hle/service/nim/nim.cpp
@@ -0,0 +1,42 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "common/logging/log.h"
+
+#include "core/hle/service/service.h"
+#include "core/hle/service/nim/nim.h"
+#include "core/hle/service/nim/nim_aoc.h"
+#include "core/hle/service/nim/nim_s.h"
+#include "core/hle/service/nim/nim_u.h"
+
+#include "core/hle/kernel/event.h"
+#include "core/hle/kernel/shared_memory.h"
+#include "core/hle/hle.h"
+
+namespace Service {
+namespace NIM {
+
+void CheckSysUpdateAvailable(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0; // No update available
+
+ LOG_WARNING(Service_NWM, "(STUBBED) called");
+}
+
+void Init() {
+ using namespace Kernel;
+
+ AddService(new NIM_AOC_Interface);
+ AddService(new NIM_S_Interface);
+ AddService(new NIM_U_Interface);
+}
+
+void Shutdown() {
+}
+
+} // namespace NIM
+
+} // namespace Service
diff --git a/src/core/hle/service/nim/nim.h b/src/core/hle/service/nim/nim.h
new file mode 100644
index 000000000..f7635c747
--- /dev/null
+++ b/src/core/hle/service/nim/nim.h
@@ -0,0 +1,30 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/kernel/kernel.h"
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace NIM {
+
+/**
+ * NIM::CheckSysUpdateAvailable service function
+ * Inputs:
+ * 1 : None
+ * Outputs:
+ * 1 : Result of function, 0 on success, otherwise error code
+ * 2 : flag, 0 = no system update available, 1 = system update available.
+ */
+void CheckSysUpdateAvailable(Service::Interface* self);
+
+/// Initialize NIM service(s)
+void Init();
+
+/// Shutdown NIM service(s)
+void Shutdown();
+
+} // namespace NIM
+} // namespace Service
diff --git a/src/core/hle/service/nim_aoc.cpp b/src/core/hle/service/nim/nim_aoc.cpp
index 7a6aea91a..e6b1b6145 100644
--- a/src/core/hle/service/nim_aoc.cpp
+++ b/src/core/hle/service/nim/nim_aoc.cpp
@@ -3,12 +3,11 @@
// Refer to the license.txt file included.
#include "core/hle/hle.h"
-#include "core/hle/service/nim_aoc.h"
+#include "core/hle/service/nim/nim.h"
+#include "core/hle/service/nim/nim_aoc.h"
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Namespace NIM_AOC
-
-namespace NIM_AOC {
+namespace Service {
+namespace NIM {
const Interface::FunctionInfo FunctionTable[] = {
{0x00030042, nullptr, "SetApplicationId"},
@@ -20,11 +19,10 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00240282, nullptr, "CalculateContentsRequiredSize"},
{0x00250000, nullptr, "RefreshServerTime"},
};
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Interface class
-Interface::Interface() {
+NIM_AOC_Interface::NIM_AOC_Interface() {
Register(FunctionTable);
}
-} // namespace
+} // namespace NIM
+} // namespace Service
diff --git a/src/core/hle/service/nim/nim_aoc.h b/src/core/hle/service/nim/nim_aoc.h
new file mode 100644
index 000000000..aace45b5a
--- /dev/null
+++ b/src/core/hle/service/nim/nim_aoc.h
@@ -0,0 +1,22 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace NIM {
+
+class NIM_AOC_Interface : public Service::Interface {
+public:
+ NIM_AOC_Interface();
+
+ std::string GetPortName() const override {
+ return "nim:aoc";
+ }
+};
+
+} // namespace NIM
+} // namespace Service
diff --git a/src/core/hle/service/nim/nim_s.cpp b/src/core/hle/service/nim/nim_s.cpp
new file mode 100644
index 000000000..5d8bc059f
--- /dev/null
+++ b/src/core/hle/service/nim/nim_s.cpp
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/nim/nim.h"
+#include "core/hle/service/nim/nim_s.h"
+
+namespace Service {
+namespace NIM {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x000A0000, nullptr, "CheckSysupdateAvailableSOAP"},
+};
+
+NIM_S_Interface::NIM_S_Interface() {
+ Register(FunctionTable);
+}
+
+} // namespace NIM
+} // namespace Service
+
diff --git a/src/core/hle/service/nim/nim_s.h b/src/core/hle/service/nim/nim_s.h
new file mode 100644
index 000000000..f4bf73d26
--- /dev/null
+++ b/src/core/hle/service/nim/nim_s.h
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace NIM {
+
+class NIM_S_Interface : public Service::Interface {
+public:
+ NIM_S_Interface();
+
+ std::string GetPortName() const override {
+ return "nim:s";
+ }
+};
+
+} // namespace NIM
+} // namespace Service
diff --git a/src/core/hle/service/nim/nim_u.cpp b/src/core/hle/service/nim/nim_u.cpp
new file mode 100644
index 000000000..066570a85
--- /dev/null
+++ b/src/core/hle/service/nim/nim_u.cpp
@@ -0,0 +1,27 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/nim/nim.h"
+#include "core/hle/service/nim/nim_u.h"
+
+namespace Service {
+namespace NIM {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x00010000, nullptr, "StartSysUpdate"},
+ {0x00020000, nullptr, "GetUpdateDownloadProgress"},
+ {0x00040000, nullptr, "FinishTitlesInstall"},
+ {0x00050000, nullptr, "CheckForSysUpdateEvent"},
+ {0x00090000, CheckSysUpdateAvailable, "CheckSysUpdateAvailable"},
+ {0x000A0000, nullptr, "GetState"},
+};
+
+NIM_U_Interface::NIM_U_Interface() {
+ Register(FunctionTable);
+}
+
+} // namespace NIM
+} // namespace Service
+
diff --git a/src/core/hle/service/nim/nim_u.h b/src/core/hle/service/nim/nim_u.h
new file mode 100644
index 000000000..bc89dc0f3
--- /dev/null
+++ b/src/core/hle/service/nim/nim_u.h
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace NIM {
+
+class NIM_U_Interface : public Service::Interface {
+public:
+ NIM_U_Interface();
+
+ std::string GetPortName() const override {
+ return "nim:u";
+ }
+};
+
+} // namespace NIM
+} // namespace Service
diff --git a/src/core/hle/service/nim_aoc.h b/src/core/hle/service/nim_aoc.h
deleted file mode 100644
index aeb71eed2..000000000
--- a/src/core/hle/service/nim_aoc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 Citra Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include "core/hle/service/service.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Namespace NIM_AOC
-
-namespace NIM_AOC {
-
-class Interface : public Service::Interface {
-public:
- Interface();
-
- std::string GetPortName() const override {
- return "nim:aoc";
- }
-};
-
-} // namespace
diff --git a/src/core/hle/service/nim_u.cpp b/src/core/hle/service/nim_u.cpp
deleted file mode 100644
index 5f13bd98e..000000000
--- a/src/core/hle/service/nim_u.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 Citra Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#include "common/logging/log.h"
-
-#include "core/hle/hle.h"
-#include "core/hle/service/nim_u.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Namespace NIM_U
-
-namespace NIM_U {
-
-/**
- * NIM_U::CheckSysUpdateAvailable service function
- * Inputs:
- * 1 : None
- * Outputs:
- * 1 : Result of function, 0 on success, otherwise error code
- * 2 : flag, 0 = no system update available, 1 = system update available.
- */
-static void CheckSysUpdateAvailable(Service::Interface* self) {
- u32* cmd_buff = Kernel::GetCommandBuffer();
-
- cmd_buff[1] = RESULT_SUCCESS.raw;
- cmd_buff[2] = 0; // No update available
-
- LOG_WARNING(Service_NWM, "(STUBBED) called");
-}
-
-const Interface::FunctionInfo FunctionTable[] = {
- {0x00010000, nullptr, "StartSysUpdate"},
- {0x00020000, nullptr, "GetUpdateDownloadProgress"},
- {0x00040000, nullptr, "FinishTitlesInstall"},
- {0x00050000, nullptr, "CheckForSysUpdateEvent"},
- {0x00090000, CheckSysUpdateAvailable, "CheckSysUpdateAvailable"},
- {0x000A0000, nullptr, "GetState"},
-};
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Interface class
-
-Interface::Interface() {
- Register(FunctionTable);
-}
-
-} // namespace
diff --git a/src/core/hle/service/nim_u.h b/src/core/hle/service/nim_u.h
deleted file mode 100644
index 57a1f6acf..000000000
--- a/src/core/hle/service/nim_u.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 Citra Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include "core/hle/service/service.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// Namespace NIM_U
-
-namespace NIM_U {
-
-class Interface : public Service::Interface {
-public:
- Interface();
-
- std::string GetPortName() const override {
- return "nim:u";
- }
-};
-
-} // namespace