service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
This commit is contained in:
parent
322349e8cc
commit
1a954b2a59
222 changed files with 1221 additions and 907 deletions
|
@ -12,7 +12,7 @@ namespace Service::GRC {
|
|||
|
||||
class GRC final : public ServiceFramework<GRC> {
|
||||
public:
|
||||
explicit GRC() : ServiceFramework{"grc:c"} {
|
||||
explicit GRC(Core::System& system) : ServiceFramework{system, "grc:c"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{1, nullptr, "OpenContinuousRecorder"},
|
||||
|
@ -27,8 +27,8 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm) {
|
||||
std::make_shared<GRC>()->InstallAsService(sm);
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
|
||||
std::make_shared<GRC>(system)->InstallAsService(sm);
|
||||
}
|
||||
|
||||
} // namespace Service::GRC
|
||||
|
|
|
@ -4,12 +4,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::SM {
|
||||
class ServiceManager;
|
||||
}
|
||||
|
||||
namespace Service::GRC {
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm);
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
|
||||
|
||||
} // namespace Service::GRC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue