diff options
| author | 2018-03-16 18:26:02 -0400 | |
|---|---|---|
| committer | 2018-03-16 18:26:02 -0400 | |
| commit | 07ae1f972d5f41f6d5287750f05596b0b29fb6bd (patch) | |
| tree | 12ed6aa7b4860080373a9a163e222f89430603d2 /src | |
| parent | Merge pull request #236 from bunnei/refactor-process-creation (diff) | |
| parent | IGeneralService: fix function list (diff) | |
| download | yuzu-07ae1f972d5f41f6d5287750f05596b0b29fb6bd.tar.gz yuzu-07ae1f972d5f41f6d5287750f05596b0b29fb6bd.tar.xz yuzu-07ae1f972d5f41f6d5287750f05596b0b29fb6bd.zip | |
Merge pull request #237 from mailwl/nifm-module
Service/NIFM: convert to module
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 96 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm.h | 20 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_a.cpp | 19 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_a.h | 12 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_s.cpp | 19 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_s.h | 12 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_u.cpp | 19 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm_u.h | 12 |
8 files changed, 84 insertions, 125 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index e6f05eae5..dd2d5fe63 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -32,7 +32,7 @@ public: | |||
| 32 | {0, &IRequest::GetRequestState, "GetRequestState"}, | 32 | {0, &IRequest::GetRequestState, "GetRequestState"}, |
| 33 | {1, &IRequest::GetResult, "GetResult"}, | 33 | {1, &IRequest::GetResult, "GetResult"}, |
| 34 | {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, | 34 | {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, |
| 35 | {3, nullptr, "Cancel"}, | 35 | {3, &IRequest::Cancel, "Cancel"}, |
| 36 | {4, nullptr, "Submit"}, | 36 | {4, nullptr, "Submit"}, |
| 37 | {5, nullptr, "SetRequirement"}, | 37 | {5, nullptr, "SetRequirement"}, |
| 38 | {6, nullptr, "SetRequirementPreset"}, | 38 | {6, nullptr, "SetRequirementPreset"}, |
| @@ -80,6 +80,11 @@ private: | |||
| 80 | rb.Push(RESULT_SUCCESS); | 80 | rb.Push(RESULT_SUCCESS); |
| 81 | rb.PushCopyObjects(event1, event2); | 81 | rb.PushCopyObjects(event1, event2); |
| 82 | } | 82 | } |
| 83 | void Cancel(Kernel::HLERequestContext& ctx) { | ||
| 84 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 85 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 86 | rb.Push(RESULT_SUCCESS); | ||
| 87 | } | ||
| 83 | 88 | ||
| 84 | Kernel::SharedPtr<Kernel::Event> event1, event2; | 89 | Kernel::SharedPtr<Kernel::Event> event1, event2; |
| 85 | }; | 90 | }; |
| @@ -96,13 +101,56 @@ public: | |||
| 96 | } | 101 | } |
| 97 | }; | 102 | }; |
| 98 | 103 | ||
| 104 | class IGeneralService final : public ServiceFramework<IGeneralService> { | ||
| 105 | public: | ||
| 106 | IGeneralService(); | ||
| 107 | |||
| 108 | private: | ||
| 109 | void GetClientId(Kernel::HLERequestContext& ctx) { | ||
| 110 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 111 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 112 | rb.Push(RESULT_SUCCESS); | ||
| 113 | rb.Push<u64>(0); | ||
| 114 | } | ||
| 115 | void CreateScanRequest(Kernel::HLERequestContext& ctx) { | ||
| 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 117 | |||
| 118 | rb.Push(RESULT_SUCCESS); | ||
| 119 | rb.PushIpcInterface<IScanRequest>(); | ||
| 120 | |||
| 121 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 122 | } | ||
| 123 | void CreateRequest(Kernel::HLERequestContext& ctx) { | ||
| 124 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 125 | |||
| 126 | rb.Push(RESULT_SUCCESS); | ||
| 127 | rb.PushIpcInterface<IRequest>(); | ||
| 128 | |||
| 129 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 130 | } | ||
| 131 | void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { | ||
| 132 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 133 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 134 | rb.Push(RESULT_SUCCESS); | ||
| 135 | } | ||
| 136 | void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) { | ||
| 137 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 138 | |||
| 139 | rb.Push(RESULT_SUCCESS); | ||
| 140 | rb.PushIpcInterface<INetworkProfile>(); | ||
| 141 | |||
| 142 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 143 | } | ||
| 144 | }; | ||
| 145 | |||
| 99 | IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") { | 146 | IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") { |
| 100 | static const FunctionInfo functions[] = { | 147 | static const FunctionInfo functions[] = { |
| 101 | {1, &IGeneralService::GetClientId, "GetClientId"}, | 148 | {1, &IGeneralService::GetClientId, "GetClientId"}, |
| 102 | {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, | 149 | {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, |
| 103 | {4, &IGeneralService::CreateRequest, "CreateRequest"}, | 150 | {4, &IGeneralService::CreateRequest, "CreateRequest"}, |
| 104 | {6, nullptr, "GetCurrentNetworkProfile"}, | 151 | {5, nullptr, "GetCurrentNetworkProfile"}, |
| 105 | {7, nullptr, "EnumerateNetworkInterfaces"}, | 152 | {6, nullptr, "EnumerateNetworkInterfaces"}, |
| 153 | {7, nullptr, "EnumerateNetworkProfiles"}, | ||
| 106 | {8, nullptr, "GetNetworkProfile"}, | 154 | {8, nullptr, "GetNetworkProfile"}, |
| 107 | {9, nullptr, "SetNetworkProfile"}, | 155 | {9, nullptr, "SetNetworkProfile"}, |
| 108 | {10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"}, | 156 | {10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"}, |
| @@ -137,50 +185,28 @@ IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") { | |||
| 137 | RegisterHandlers(functions); | 185 | RegisterHandlers(functions); |
| 138 | } | 186 | } |
| 139 | 187 | ||
| 140 | void IGeneralService::GetClientId(Kernel::HLERequestContext& ctx) { | 188 | void Module::Interface::CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) { |
| 141 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 142 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 143 | rb.Push(RESULT_SUCCESS); | ||
| 144 | rb.Push<u64>(0); | ||
| 145 | } | ||
| 146 | |||
| 147 | void IGeneralService::CreateScanRequest(Kernel::HLERequestContext& ctx) { | ||
| 148 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 189 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 149 | |||
| 150 | rb.Push(RESULT_SUCCESS); | 190 | rb.Push(RESULT_SUCCESS); |
| 151 | rb.PushIpcInterface<IScanRequest>(); | 191 | rb.PushIpcInterface<IGeneralService>(); |
| 152 | |||
| 153 | LOG_DEBUG(Service_NIFM, "called"); | 192 | LOG_DEBUG(Service_NIFM, "called"); |
| 154 | } | 193 | } |
| 155 | 194 | ||
| 156 | void IGeneralService::CreateRequest(Kernel::HLERequestContext& ctx) { | 195 | void Module::Interface::CreateGeneralService(Kernel::HLERequestContext& ctx) { |
| 157 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 196 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 158 | |||
| 159 | rb.Push(RESULT_SUCCESS); | 197 | rb.Push(RESULT_SUCCESS); |
| 160 | rb.PushIpcInterface<IRequest>(); | 198 | rb.PushIpcInterface<IGeneralService>(); |
| 161 | |||
| 162 | LOG_DEBUG(Service_NIFM, "called"); | 199 | LOG_DEBUG(Service_NIFM, "called"); |
| 163 | } | 200 | } |
| 164 | 201 | ||
| 165 | void IGeneralService::RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { | 202 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
| 166 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 203 | : ServiceFramework(name), module(std::move(module)) {} |
| 167 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 168 | rb.Push(RESULT_SUCCESS); | ||
| 169 | } | ||
| 170 | |||
| 171 | void IGeneralService::CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) { | ||
| 172 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 173 | |||
| 174 | rb.Push(RESULT_SUCCESS); | ||
| 175 | rb.PushIpcInterface<INetworkProfile>(); | ||
| 176 | |||
| 177 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 178 | } | ||
| 179 | 204 | ||
| 180 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 205 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 181 | std::make_shared<NIFM_A>()->InstallAsService(service_manager); | 206 | auto module = std::make_shared<Module>(); |
| 182 | std::make_shared<NIFM_S>()->InstallAsService(service_manager); | 207 | std::make_shared<NIFM_A>(module)->InstallAsService(service_manager); |
| 183 | std::make_shared<NIFM_U>()->InstallAsService(service_manager); | 208 | std::make_shared<NIFM_S>(module)->InstallAsService(service_manager); |
| 209 | std::make_shared<NIFM_U>(module)->InstallAsService(service_manager); | ||
| 184 | } | 210 | } |
| 185 | 211 | ||
| 186 | } // namespace NIFM | 212 | } // namespace NIFM |
diff --git a/src/core/hle/service/nifm/nifm.h b/src/core/hle/service/nifm/nifm.h index 6edbfe4a4..11d263b12 100644 --- a/src/core/hle/service/nifm/nifm.h +++ b/src/core/hle/service/nifm/nifm.h | |||
| @@ -9,16 +9,18 @@ | |||
| 9 | namespace Service { | 9 | namespace Service { |
| 10 | namespace NIFM { | 10 | namespace NIFM { |
| 11 | 11 | ||
| 12 | class IGeneralService final : public ServiceFramework<IGeneralService> { | 12 | class Module final { |
| 13 | public: | 13 | public: |
| 14 | IGeneralService(); | 14 | class Interface : public ServiceFramework<Interface> { |
| 15 | 15 | public: | |
| 16 | private: | 16 | Interface(std::shared_ptr<Module> module, const char* name); |
| 17 | void GetClientId(Kernel::HLERequestContext& ctx); | 17 | |
| 18 | void CreateScanRequest(Kernel::HLERequestContext& ctx); | 18 | void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx); |
| 19 | void CreateRequest(Kernel::HLERequestContext& ctx); | 19 | void CreateGeneralService(Kernel::HLERequestContext& ctx); |
| 20 | void RemoveNetworkProfile(Kernel::HLERequestContext& ctx); | 20 | |
| 21 | void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx); | 21 | protected: |
| 22 | std::shared_ptr<Module> module; | ||
| 23 | }; | ||
| 22 | }; | 24 | }; |
| 23 | 25 | ||
| 24 | void InstallInterfaces(SM::ServiceManager& service_manager); | 26 | void InstallInterfaces(SM::ServiceManager& service_manager); |
diff --git a/src/core/hle/service/nifm/nifm_a.cpp b/src/core/hle/service/nifm/nifm_a.cpp index ee61d8ff4..f75df8c04 100644 --- a/src/core/hle/service/nifm/nifm_a.cpp +++ b/src/core/hle/service/nifm/nifm_a.cpp | |||
| @@ -2,29 +2,12 @@ | |||
| 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 "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/nifm/nifm.h" | ||
| 8 | #include "core/hle/service/nifm/nifm_a.h" | 5 | #include "core/hle/service/nifm/nifm_a.h" |
| 9 | 6 | ||
| 10 | namespace Service { | 7 | namespace Service { |
| 11 | namespace NIFM { | 8 | namespace NIFM { |
| 12 | 9 | ||
| 13 | void NIFM_A::CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) { | 10 | NIFM_A::NIFM_A(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "nifm:a") { |
| 14 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 15 | rb.Push(RESULT_SUCCESS); | ||
| 16 | rb.PushIpcInterface<IGeneralService>(); | ||
| 17 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 18 | } | ||
| 19 | |||
| 20 | void NIFM_A::CreateGeneralService(Kernel::HLERequestContext& ctx) { | ||
| 21 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 22 | rb.Push(RESULT_SUCCESS); | ||
| 23 | rb.PushIpcInterface<IGeneralService>(); | ||
| 24 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 25 | } | ||
| 26 | |||
| 27 | NIFM_A::NIFM_A() : ServiceFramework("nifm:a") { | ||
| 28 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 29 | {4, &NIFM_A::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, | 12 | {4, &NIFM_A::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, |
| 30 | {5, &NIFM_A::CreateGeneralService, "CreateGeneralService"}, | 13 | {5, &NIFM_A::CreateGeneralService, "CreateGeneralService"}, |
diff --git a/src/core/hle/service/nifm/nifm_a.h b/src/core/hle/service/nifm/nifm_a.h index 06a92a93c..eaea14e29 100644 --- a/src/core/hle/service/nifm/nifm_a.h +++ b/src/core/hle/service/nifm/nifm_a.h | |||
| @@ -4,20 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "core/hle/kernel/hle_ipc.h" | 7 | #include "core/hle/service/nifm/nifm.h" |
| 8 | #include "core/hle/service/service.h" | ||
| 9 | 8 | ||
| 10 | namespace Service { | 9 | namespace Service { |
| 11 | namespace NIFM { | 10 | namespace NIFM { |
| 12 | 11 | ||
| 13 | class NIFM_A final : public ServiceFramework<NIFM_A> { | 12 | class NIFM_A final : public Module::Interface { |
| 14 | public: | 13 | public: |
| 15 | NIFM_A(); | 14 | explicit NIFM_A(std::shared_ptr<Module> module); |
| 16 | ~NIFM_A() = default; | ||
| 17 | |||
| 18 | private: | ||
| 19 | void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx); | ||
| 20 | void CreateGeneralService(Kernel::HLERequestContext& ctx); | ||
| 21 | }; | 15 | }; |
| 22 | 16 | ||
| 23 | } // namespace NIFM | 17 | } // namespace NIFM |
diff --git a/src/core/hle/service/nifm/nifm_s.cpp b/src/core/hle/service/nifm/nifm_s.cpp index c38b2a4c7..9c0b300e4 100644 --- a/src/core/hle/service/nifm/nifm_s.cpp +++ b/src/core/hle/service/nifm/nifm_s.cpp | |||
| @@ -2,29 +2,12 @@ | |||
| 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 "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/nifm/nifm.h" | ||
| 8 | #include "core/hle/service/nifm/nifm_s.h" | 5 | #include "core/hle/service/nifm/nifm_s.h" |
| 9 | 6 | ||
| 10 | namespace Service { | 7 | namespace Service { |
| 11 | namespace NIFM { | 8 | namespace NIFM { |
| 12 | 9 | ||
| 13 | void NIFM_S::CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) { | 10 | NIFM_S::NIFM_S(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "nifm:s") { |
| 14 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 15 | rb.Push(RESULT_SUCCESS); | ||
| 16 | rb.PushIpcInterface<IGeneralService>(); | ||
| 17 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 18 | } | ||
| 19 | |||
| 20 | void NIFM_S::CreateGeneralService(Kernel::HLERequestContext& ctx) { | ||
| 21 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 22 | rb.Push(RESULT_SUCCESS); | ||
| 23 | rb.PushIpcInterface<IGeneralService>(); | ||
| 24 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 25 | } | ||
| 26 | |||
| 27 | NIFM_S::NIFM_S() : ServiceFramework("nifm:s") { | ||
| 28 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 29 | {4, &NIFM_S::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, | 12 | {4, &NIFM_S::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, |
| 30 | {5, &NIFM_S::CreateGeneralService, "CreateGeneralService"}, | 13 | {5, &NIFM_S::CreateGeneralService, "CreateGeneralService"}, |
diff --git a/src/core/hle/service/nifm/nifm_s.h b/src/core/hle/service/nifm/nifm_s.h index d11a1ec29..f9e2d8039 100644 --- a/src/core/hle/service/nifm/nifm_s.h +++ b/src/core/hle/service/nifm/nifm_s.h | |||
| @@ -4,20 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "core/hle/kernel/hle_ipc.h" | 7 | #include "core/hle/service/nifm/nifm.h" |
| 8 | #include "core/hle/service/service.h" | ||
| 9 | 8 | ||
| 10 | namespace Service { | 9 | namespace Service { |
| 11 | namespace NIFM { | 10 | namespace NIFM { |
| 12 | 11 | ||
| 13 | class NIFM_S final : public ServiceFramework<NIFM_S> { | 12 | class NIFM_S final : public Module::Interface { |
| 14 | public: | 13 | public: |
| 15 | NIFM_S(); | 14 | explicit NIFM_S(std::shared_ptr<Module> module); |
| 16 | ~NIFM_S() = default; | ||
| 17 | |||
| 18 | private: | ||
| 19 | void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx); | ||
| 20 | void CreateGeneralService(Kernel::HLERequestContext& ctx); | ||
| 21 | }; | 15 | }; |
| 22 | 16 | ||
| 23 | } // namespace NIFM | 17 | } // namespace NIFM |
diff --git a/src/core/hle/service/nifm/nifm_u.cpp b/src/core/hle/service/nifm/nifm_u.cpp index a5895c13c..44e6f483d 100644 --- a/src/core/hle/service/nifm/nifm_u.cpp +++ b/src/core/hle/service/nifm/nifm_u.cpp | |||
| @@ -2,29 +2,12 @@ | |||
| 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 "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/service/nifm/nifm.h" | ||
| 8 | #include "core/hle/service/nifm/nifm_u.h" | 5 | #include "core/hle/service/nifm/nifm_u.h" |
| 9 | 6 | ||
| 10 | namespace Service { | 7 | namespace Service { |
| 11 | namespace NIFM { | 8 | namespace NIFM { |
| 12 | 9 | ||
| 13 | void NIFM_U::CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) { | 10 | NIFM_U::NIFM_U(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "nifm:u") { |
| 14 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 15 | rb.Push(RESULT_SUCCESS); | ||
| 16 | rb.PushIpcInterface<IGeneralService>(); | ||
| 17 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 18 | } | ||
| 19 | |||
| 20 | void NIFM_U::CreateGeneralService(Kernel::HLERequestContext& ctx) { | ||
| 21 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 22 | rb.Push(RESULT_SUCCESS); | ||
| 23 | rb.PushIpcInterface<IGeneralService>(); | ||
| 24 | LOG_DEBUG(Service_NIFM, "called"); | ||
| 25 | } | ||
| 26 | |||
| 27 | NIFM_U::NIFM_U() : ServiceFramework("nifm:u") { | ||
| 28 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 29 | {4, &NIFM_U::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, | 12 | {4, &NIFM_U::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, |
| 30 | {5, &NIFM_U::CreateGeneralService, "CreateGeneralService"}, | 13 | {5, &NIFM_U::CreateGeneralService, "CreateGeneralService"}, |
diff --git a/src/core/hle/service/nifm/nifm_u.h b/src/core/hle/service/nifm/nifm_u.h index da40b604f..912006775 100644 --- a/src/core/hle/service/nifm/nifm_u.h +++ b/src/core/hle/service/nifm/nifm_u.h | |||
| @@ -4,20 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "core/hle/kernel/hle_ipc.h" | 7 | #include "core/hle/service/nifm/nifm.h" |
| 8 | #include "core/hle/service/service.h" | ||
| 9 | 8 | ||
| 10 | namespace Service { | 9 | namespace Service { |
| 11 | namespace NIFM { | 10 | namespace NIFM { |
| 12 | 11 | ||
| 13 | class NIFM_U final : public ServiceFramework<NIFM_U> { | 12 | class NIFM_U final : public Module::Interface { |
| 14 | public: | 13 | public: |
| 15 | NIFM_U(); | 14 | explicit NIFM_U(std::shared_ptr<Module> module); |
| 16 | ~NIFM_U() = default; | ||
| 17 | |||
| 18 | private: | ||
| 19 | void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx); | ||
| 20 | void CreateGeneralService(Kernel::HLERequestContext& ctx); | ||
| 21 | }; | 15 | }; |
| 22 | 16 | ||
| 23 | } // namespace NIFM | 17 | } // namespace NIFM |