summaryrefslogtreecommitdiff
path: root/src/core/hle/service/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/service.cpp')
-rw-r--r--src/core/hle/service/service.cpp52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index c5490c1ae..08ce29677 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -145,7 +145,7 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
145 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead); 145 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
146 } 146 }
147 case IPC::CommandType::Control: { 147 case IPC::CommandType::Control: {
148 SM::g_service_manager->InvokeControlRequest(context); 148 Core::System::GetInstance().ServiceManager().InvokeControlRequest(context);
149 break; 149 break;
150 } 150 }
151 case IPC::CommandType::Request: { 151 case IPC::CommandType::Request: {
@@ -170,42 +170,40 @@ void AddNamedPort(std::string name, SharedPtr<ClientPort> port) {
170} 170}
171 171
172/// Initialize ServiceManager 172/// Initialize ServiceManager
173void Init() { 173void Init(std::shared_ptr<SM::ServiceManager>& sm) {
174 // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it 174 // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it
175 // here and pass it into the respective InstallInterfaces functions. 175 // here and pass it into the respective InstallInterfaces functions.
176 auto nv_flinger = std::make_shared<NVFlinger::NVFlinger>(); 176 auto nv_flinger = std::make_shared<NVFlinger::NVFlinger>();
177 177
178 SM::g_service_manager = std::make_shared<SM::ServiceManager>(); 178 SM::ServiceManager::InstallInterfaces(sm);
179 SM::ServiceManager::InstallInterfaces(SM::g_service_manager); 179
180 180 Account::InstallInterfaces(*sm);
181 Account::InstallInterfaces(*SM::g_service_manager); 181 AM::InstallInterfaces(*sm, nv_flinger);
182 AM::InstallInterfaces(*SM::g_service_manager, nv_flinger); 182 AOC::InstallInterfaces(*sm);
183 AOC::InstallInterfaces(*SM::g_service_manager); 183 APM::InstallInterfaces(*sm);
184 APM::InstallInterfaces(*SM::g_service_manager); 184 Audio::InstallInterfaces(*sm);
185 Audio::InstallInterfaces(*SM::g_service_manager); 185 Fatal::InstallInterfaces(*sm);
186 Fatal::InstallInterfaces(*SM::g_service_manager); 186 FileSystem::InstallInterfaces(*sm);
187 FileSystem::InstallInterfaces(*SM::g_service_manager); 187 Friend::InstallInterfaces(*sm);
188 Friend::InstallInterfaces(*SM::g_service_manager); 188 HID::InstallInterfaces(*sm);
189 HID::InstallInterfaces(*SM::g_service_manager); 189 LM::InstallInterfaces(*sm);
190 LM::InstallInterfaces(*SM::g_service_manager); 190 NFP::InstallInterfaces(*sm);
191 NFP::InstallInterfaces(*SM::g_service_manager); 191 NIFM::InstallInterfaces(*sm);
192 NIFM::InstallInterfaces(*SM::g_service_manager); 192 NS::InstallInterfaces(*sm);
193 NS::InstallInterfaces(*SM::g_service_manager); 193 Nvidia::InstallInterfaces(*sm);
194 Nvidia::InstallInterfaces(*SM::g_service_manager); 194 PCTL::InstallInterfaces(*sm);
195 PCTL::InstallInterfaces(*SM::g_service_manager); 195 Sockets::InstallInterfaces(*sm);
196 Sockets::InstallInterfaces(*SM::g_service_manager); 196 SPL::InstallInterfaces(*sm);
197 SPL::InstallInterfaces(*SM::g_service_manager); 197 SSL::InstallInterfaces(*sm);
198 SSL::InstallInterfaces(*SM::g_service_manager); 198 Time::InstallInterfaces(*sm);
199 Time::InstallInterfaces(*SM::g_service_manager); 199 VI::InstallInterfaces(*sm, nv_flinger);
200 VI::InstallInterfaces(*SM::g_service_manager, nv_flinger); 200 Set::InstallInterfaces(*sm);
201 Set::InstallInterfaces(*SM::g_service_manager);
202 201
203 LOG_DEBUG(Service, "initialized OK"); 202 LOG_DEBUG(Service, "initialized OK");
204} 203}
205 204
206/// Shutdown ServiceManager 205/// Shutdown ServiceManager
207void Shutdown() { 206void Shutdown() {
208 SM::g_service_manager = nullptr;
209 g_kernel_named_ports.clear(); 207 g_kernel_named_ports.clear();
210 LOG_DEBUG(Service, "shutdown OK"); 208 LOG_DEBUG(Service, "shutdown OK");
211} 209}