diff options
| author | 2016-02-14 19:53:32 +0800 | |
|---|---|---|
| committer | 2016-03-15 00:42:47 +0800 | |
| commit | dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23 (patch) | |
| tree | 091058af51d0edc57650bd72b2dca54b0703fde2 /src | |
| parent | Merge pull request #1509 from lioncash/noncopy (diff) | |
| download | yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.tar.gz yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.tar.xz yuzu-dd0b8047eb8985ff398fd6e5e4fa11d1ea111e23.zip | |
Reorganize the ndm service path for dummy implement function
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons
The NDM file move to /core/hle/service/ndm/ now!
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm.cpp | 47 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm.h | 52 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm_u.cpp (renamed from src/core/hle/service/ndm_u.cpp) | 23 | ||||
| -rw-r--r-- | src/core/hle/service/ndm/ndm_u.h (renamed from src/core/hle/service/ndm_u.h) | 15 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 5 |
8 files changed, 124 insertions, 26 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 54291429a..4c86151ab 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -42,6 +42,7 @@ namespace Log { | |||
| 42 | SUB(Service, AM) \ | 42 | SUB(Service, AM) \ |
| 43 | SUB(Service, PTM) \ | 43 | SUB(Service, PTM) \ |
| 44 | SUB(Service, LDR) \ | 44 | SUB(Service, LDR) \ |
| 45 | SUB(Service, NDM) \ | ||
| 45 | SUB(Service, NIM) \ | 46 | SUB(Service, NIM) \ |
| 46 | SUB(Service, NWM) \ | 47 | SUB(Service, NWM) \ |
| 47 | SUB(Service, CAM) \ | 48 | SUB(Service, CAM) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 4b01805ae..e4c39c308 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -57,6 +57,7 @@ enum class Class : ClassType { | |||
| 57 | Service_AM, ///< The AM (Application manager) service | 57 | Service_AM, ///< The AM (Application manager) service |
| 58 | Service_PTM, ///< The PTM (Power status & misc.) service | 58 | Service_PTM, ///< The PTM (Power status & misc.) service |
| 59 | Service_LDR, ///< The LDR (3ds dll loader) service | 59 | Service_LDR, ///< The LDR (3ds dll loader) service |
| 60 | Service_NDM, ///< The NDM (Network daemon manager) service | ||
| 60 | Service_NIM, ///< The NIM (Network interface manager) service | 61 | Service_NIM, ///< The NIM (Network interface manager) service |
| 61 | Service_NWM, ///< The NWM (Network wlan manager) service | 62 | Service_NWM, ///< The NWM (Network wlan manager) service |
| 62 | Service_CAM, ///< The CAM (Camera) service | 63 | Service_CAM, ///< The CAM (Camera) service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 35b61dada..3473e2f5b 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -87,7 +87,8 @@ set(SRCS | |||
| 87 | hle/service/ir/ir_user.cpp | 87 | hle/service/ir/ir_user.cpp |
| 88 | hle/service/ldr_ro.cpp | 88 | hle/service/ldr_ro.cpp |
| 89 | hle/service/mic_u.cpp | 89 | hle/service/mic_u.cpp |
| 90 | hle/service/ndm_u.cpp | 90 | hle/service/ndm/ndm.cpp |
| 91 | hle/service/ndm/ndm_u.cpp | ||
| 91 | hle/service/news/news.cpp | 92 | hle/service/news/news.cpp |
| 92 | hle/service/news/news_s.cpp | 93 | hle/service/news/news_s.cpp |
| 93 | hle/service/news/news_u.cpp | 94 | hle/service/news/news_u.cpp |
| @@ -218,7 +219,8 @@ set(HEADERS | |||
| 218 | hle/service/ir/ir_user.h | 219 | hle/service/ir/ir_user.h |
| 219 | hle/service/ldr_ro.h | 220 | hle/service/ldr_ro.h |
| 220 | hle/service/mic_u.h | 221 | hle/service/mic_u.h |
| 221 | hle/service/ndm_u.h | 222 | hle/service/ndm/ndm.h |
| 223 | hle/service/ndm/ndm_u.h | ||
| 222 | hle/service/news/news.h | 224 | hle/service/news/news.h |
| 223 | hle/service/news/news_s.h | 225 | hle/service/news/news_s.h |
| 224 | hle/service/news/news_u.h | 226 | hle/service/news/news_u.h |
diff --git a/src/core/hle/service/ndm/ndm.cpp b/src/core/hle/service/ndm/ndm.cpp new file mode 100644 index 000000000..47076a7b8 --- /dev/null +++ b/src/core/hle/service/ndm/ndm.cpp | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/common_types.h" | ||
| 6 | #include "common/logging/log.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | #include "core/hle/service/ndm/ndm.h" | ||
| 9 | #include "core/hle/service/ndm/ndm_u.h" | ||
| 10 | |||
| 11 | namespace Service { | ||
| 12 | namespace NDM { | ||
| 13 | |||
| 14 | void SuspendDaemons(Service::Interface* self) { | ||
| 15 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 16 | |||
| 17 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 18 | |||
| 19 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 20 | } | ||
| 21 | |||
| 22 | void ResumeDaemons(Service::Interface* self) { | ||
| 23 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 24 | |||
| 25 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 26 | |||
| 27 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 28 | } | ||
| 29 | |||
| 30 | void OverrideDefaultDaemons(Service::Interface* self) { | ||
| 31 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 32 | |||
| 33 | LOG_WARNING(Service_NDM, "(STUBBED) bit_mask=0x%08X ", cmd_buff[1]); | ||
| 34 | |||
| 35 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | ||
| 36 | } | ||
| 37 | |||
| 38 | void Init() { | ||
| 39 | AddService(new NDM_U_Interface); | ||
| 40 | } | ||
| 41 | |||
| 42 | void Shutdown() { | ||
| 43 | |||
| 44 | } | ||
| 45 | |||
| 46 | }// namespace NDM | ||
| 47 | }// namespace Service | ||
diff --git a/src/core/hle/service/ndm/ndm.h b/src/core/hle/service/ndm/ndm.h new file mode 100644 index 000000000..734730f8c --- /dev/null +++ b/src/core/hle/service/ndm/ndm.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | namespace Service { | ||
| 10 | |||
| 11 | class Interface; | ||
| 12 | |||
| 13 | namespace NDM { | ||
| 14 | |||
| 15 | /** | ||
| 16 | * SuspendDaemons | ||
| 17 | * Inputs: | ||
| 18 | * 0 : Command header (0x00020082) | ||
| 19 | * 1 : Daemon bit mask | ||
| 20 | * Outputs: | ||
| 21 | * 1 : Result, 0 on success, otherwise error code | ||
| 22 | */ | ||
| 23 | void SuspendDaemons(Service::Interface* self); | ||
| 24 | |||
| 25 | /** | ||
| 26 | * ResumeDaemons | ||
| 27 | * Inputs: | ||
| 28 | * 0 : Command header (0x00020082) | ||
| 29 | * 1 : Daemon bit mask | ||
| 30 | * Outputs: | ||
| 31 | * 1 : Result, 0 on success, otherwise error code | ||
| 32 | */ | ||
| 33 | void ResumeDaemons(Service::Interface* self); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * OverrideDefaultDaemons | ||
| 37 | * Inputs: | ||
| 38 | * 0 : Command header (0x00020082) | ||
| 39 | * 1 : Daemon bit mask | ||
| 40 | * Outputs: | ||
| 41 | * 1 : Result, 0 on success, otherwise error code | ||
| 42 | */ | ||
| 43 | void OverrideDefaultDaemons(Service::Interface* self); | ||
| 44 | |||
| 45 | /// Initialize NDM service | ||
| 46 | void Init(); | ||
| 47 | |||
| 48 | /// Shutdown NDM service | ||
| 49 | void Shutdown(); | ||
| 50 | |||
| 51 | }// namespace NDM | ||
| 52 | }// namespace Service | ||
diff --git a/src/core/hle/service/ndm_u.cpp b/src/core/hle/service/ndm/ndm_u.cpp index 8fdf1ef90..bf95cc7aa 100644 --- a/src/core/hle/service/ndm_u.cpp +++ b/src/core/hle/service/ndm/ndm_u.cpp | |||
| @@ -2,12 +2,11 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/service/ndm_u.h" | 5 | #include "core/hle/service/ndm/ndm.h" |
| 6 | #include "core/hle/service/ndm/ndm_u.h" | ||
| 6 | 7 | ||
| 7 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 8 | namespace Service { |
| 8 | // Namespace NDM_U | 9 | namespace NDM { |
| 9 | |||
| 10 | namespace NDM_U { | ||
| 11 | 10 | ||
| 12 | const Interface::FunctionInfo FunctionTable[] = { | 11 | const Interface::FunctionInfo FunctionTable[] = { |
| 13 | {0x00010042, nullptr, "EnterExclusiveState"}, | 12 | {0x00010042, nullptr, "EnterExclusiveState"}, |
| @@ -15,8 +14,8 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 15 | {0x00030000, nullptr, "QueryExclusiveMode"}, | 14 | {0x00030000, nullptr, "QueryExclusiveMode"}, |
| 16 | {0x00040002, nullptr, "LockState"}, | 15 | {0x00040002, nullptr, "LockState"}, |
| 17 | {0x00050002, nullptr, "UnlockState"}, | 16 | {0x00050002, nullptr, "UnlockState"}, |
| 18 | {0x00060040, nullptr, "SuspendDaemons"}, | 17 | {0x00060040, SuspendDaemons, "SuspendDaemons"}, |
| 19 | {0x00070040, nullptr, "ResumeDaemons"}, | 18 | {0x00070040, ResumeDaemons, "ResumeDaemons"}, |
| 20 | {0x00080040, nullptr, "DisableWifiUsage"}, | 19 | {0x00080040, nullptr, "DisableWifiUsage"}, |
| 21 | {0x00090000, nullptr, "EnableWifiUsage"}, | 20 | {0x00090000, nullptr, "EnableWifiUsage"}, |
| 22 | {0x000A0000, nullptr, "GetCurrentState"}, | 21 | {0x000A0000, nullptr, "GetCurrentState"}, |
| @@ -29,17 +28,15 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 29 | {0x00110000, nullptr, "GetScanInterval"}, | 28 | {0x00110000, nullptr, "GetScanInterval"}, |
| 30 | {0x00120040, nullptr, "SetRetryInterval"}, | 29 | {0x00120040, nullptr, "SetRetryInterval"}, |
| 31 | {0x00130000, nullptr, "GetRetryInterval"}, | 30 | {0x00130000, nullptr, "GetRetryInterval"}, |
| 32 | {0x00140040, nullptr, "OverrideDefaultDaemons"}, | 31 | {0x00140040, OverrideDefaultDaemons, "OverrideDefaultDaemons"}, |
| 33 | {0x00150000, nullptr, "ResetDefaultDaemons"}, | 32 | {0x00150000, nullptr, "ResetDefaultDaemons"}, |
| 34 | {0x00160000, nullptr, "GetDefaultDaemons"}, | 33 | {0x00160000, nullptr, "GetDefaultDaemons"}, |
| 35 | {0x00170000, nullptr, "ClearHalfAwakeMacFilter"}, | 34 | {0x00170000, nullptr, "ClearHalfAwakeMacFilter"}, |
| 36 | }; | 35 | }; |
| 37 | 36 | ||
| 38 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 37 | NDM_U_Interface::NDM_U_Interface() { |
| 39 | // Interface class | ||
| 40 | |||
| 41 | Interface::Interface() { | ||
| 42 | Register(FunctionTable); | 38 | Register(FunctionTable); |
| 43 | } | 39 | } |
| 44 | 40 | ||
| 45 | } // namespace | 41 | } // namespace NDM |
| 42 | } // namespace Service | ||
diff --git a/src/core/hle/service/ndm_u.h b/src/core/hle/service/ndm/ndm_u.h index 51c4b3902..d567abc84 100644 --- a/src/core/hle/service/ndm_u.h +++ b/src/core/hle/service/ndm/ndm_u.h | |||
| @@ -6,20 +6,17 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 9 | namespace Service { |
| 10 | // Namespace NDM | 10 | namespace NDM { |
| 11 | 11 | ||
| 12 | // No idea what this is | 12 | class NDM_U_Interface : public Service::Interface { |
| 13 | |||
| 14 | namespace NDM_U { | ||
| 15 | |||
| 16 | class Interface : public Service::Interface { | ||
| 17 | public: | 13 | public: |
| 18 | Interface(); | 14 | NDM_U_Interface(); |
| 19 | 15 | ||
| 20 | std::string GetPortName() const override { | 16 | std::string GetPortName() const override { |
| 21 | return "ndm:u"; | 17 | return "ndm:u"; |
| 22 | } | 18 | } |
| 23 | }; | 19 | }; |
| 24 | 20 | ||
| 25 | } // namespace | 21 | } // namespace NDM |
| 22 | } // namespace Service | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 0de0b13a3..35b648409 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | #include "core/hle/service/http_c.h" | 16 | #include "core/hle/service/http_c.h" |
| 17 | #include "core/hle/service/ldr_ro.h" | 17 | #include "core/hle/service/ldr_ro.h" |
| 18 | #include "core/hle/service/mic_u.h" | 18 | #include "core/hle/service/mic_u.h" |
| 19 | #include "core/hle/service/ndm_u.h" | ||
| 20 | #include "core/hle/service/ns_s.h" | 19 | #include "core/hle/service/ns_s.h" |
| 21 | #include "core/hle/service/nwm_uds.h" | 20 | #include "core/hle/service/nwm_uds.h" |
| 22 | #include "core/hle/service/pm_app.h" | 21 | #include "core/hle/service/pm_app.h" |
| @@ -35,6 +34,7 @@ | |||
| 35 | #include "core/hle/service/cfg/cfg.h" | 34 | #include "core/hle/service/cfg/cfg.h" |
| 36 | #include "core/hle/service/hid/hid.h" | 35 | #include "core/hle/service/hid/hid.h" |
| 37 | #include "core/hle/service/ir/ir.h" | 36 | #include "core/hle/service/ir/ir.h" |
| 37 | #include "core/hle/service/ndm/ndm.h" | ||
| 38 | #include "core/hle/service/news/news.h" | 38 | #include "core/hle/service/news/news.h" |
| 39 | #include "core/hle/service/nim/nim.h" | 39 | #include "core/hle/service/nim/nim.h" |
| 40 | #include "core/hle/service/ptm/ptm.h" | 40 | #include "core/hle/service/ptm/ptm.h" |
| @@ -114,6 +114,7 @@ void Init() { | |||
| 114 | Service::HID::Init(); | 114 | Service::HID::Init(); |
| 115 | Service::IR::Init(); | 115 | Service::IR::Init(); |
| 116 | Service::NEWS::Init(); | 116 | Service::NEWS::Init(); |
| 117 | Service::NDM::Init(); | ||
| 117 | Service::NIM::Init(); | 118 | Service::NIM::Init(); |
| 118 | Service::PTM::Init(); | 119 | Service::PTM::Init(); |
| 119 | 120 | ||
| @@ -126,7 +127,6 @@ void Init() { | |||
| 126 | AddService(new HTTP_C::Interface); | 127 | AddService(new HTTP_C::Interface); |
| 127 | AddService(new LDR_RO::Interface); | 128 | AddService(new LDR_RO::Interface); |
| 128 | AddService(new MIC_U::Interface); | 129 | AddService(new MIC_U::Interface); |
| 129 | AddService(new NDM_U::Interface); | ||
| 130 | AddService(new NS_S::Interface); | 130 | AddService(new NS_S::Interface); |
| 131 | AddService(new NWM_UDS::Interface); | 131 | AddService(new NWM_UDS::Interface); |
| 132 | AddService(new PM_APP::Interface); | 132 | AddService(new PM_APP::Interface); |
| @@ -141,6 +141,7 @@ void Init() { | |||
| 141 | void Shutdown() { | 141 | void Shutdown() { |
| 142 | 142 | ||
| 143 | Service::PTM::Shutdown(); | 143 | Service::PTM::Shutdown(); |
| 144 | Service::NDM::Shutdown(); | ||
| 144 | Service::NIM::Shutdown(); | 145 | Service::NIM::Shutdown(); |
| 145 | Service::NEWS::Shutdown(); | 146 | Service::NEWS::Shutdown(); |
| 146 | Service::IR::Shutdown(); | 147 | Service::IR::Shutdown(); |