summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/acc/acc.cpp17
-rw-r--r--src/core/hle/service/acc/acc.h7
-rw-r--r--src/core/hle/service/acc/acc_aa.cpp3
-rw-r--r--src/core/hle/service/acc/acc_aa.h3
-rw-r--r--src/core/hle/service/acc/acc_su.cpp3
-rw-r--r--src/core/hle/service/acc/acc_su.h3
-rw-r--r--src/core/hle/service/acc/acc_u0.cpp3
-rw-r--r--src/core/hle/service/acc/acc_u0.h3
-rw-r--r--src/core/hle/service/acc/acc_u1.cpp3
-rw-r--r--src/core/hle/service/acc/acc_u1.h3
10 files changed, 28 insertions, 20 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index e74379a24..22e44368a 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -197,17 +197,18 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo
LOG_DEBUG(Service_ACC, "called");
}
-Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
- : ServiceFramework(name), module(std::move(module)) {
- profile_manager = std::make_unique<ProfileManager>();
-}
+Module::Interface::Interface(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager, const char* name)
+ : ServiceFramework(name), module(std::move(module)),
+ profile_manager(std::make_shared<ProfileManager>(*profile_manager)) {}
void InstallInterfaces(SM::ServiceManager& service_manager) {
auto module = std::make_shared<Module>();
- std::make_shared<ACC_AA>(module)->InstallAsService(service_manager);
- std::make_shared<ACC_SU>(module)->InstallAsService(service_manager);
- std::make_shared<ACC_U0>(module)->InstallAsService(service_manager);
- std::make_shared<ACC_U1>(module)->InstallAsService(service_manager);
+ auto profile_manager = std::make_shared<ProfileManager>();
+ std::make_shared<ACC_AA>(module, profile_manager)->InstallAsService(service_manager);
+ std::make_shared<ACC_SU>(module, profile_manager)->InstallAsService(service_manager);
+ std::make_shared<ACC_U0>(module, profile_manager)->InstallAsService(service_manager);
+ std::make_shared<ACC_U1>(module, profile_manager)->InstallAsService(service_manager);
}
} // namespace Service::Account
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h
index 89d92c1c7..a94e6f588 100644
--- a/src/core/hle/service/acc/acc.h
+++ b/src/core/hle/service/acc/acc.h
@@ -13,7 +13,8 @@ class Module final {
public:
class Interface : public ServiceFramework<Interface> {
public:
- explicit Interface(std::shared_ptr<Module> module, const char* name);
+ explicit Interface(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager, const char* name);
void GetUserCount(Kernel::HLERequestContext& ctx);
void GetUserExistence(Kernel::HLERequestContext& ctx);
@@ -25,11 +26,9 @@ public:
void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx);
void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx);
- private:
- std::unique_ptr<ProfileManager> profile_manager{};
-
protected:
std::shared_ptr<Module> module;
+ std::shared_ptr<ProfileManager> profile_manager;
};
};
diff --git a/src/core/hle/service/acc/acc_aa.cpp b/src/core/hle/service/acc/acc_aa.cpp
index 280b3e464..9bd595a37 100644
--- a/src/core/hle/service/acc/acc_aa.cpp
+++ b/src/core/hle/service/acc/acc_aa.cpp
@@ -6,7 +6,8 @@
namespace Service::Account {
-ACC_AA::ACC_AA(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "acc:aa") {
+ACC_AA::ACC_AA(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> profile_manager)
+ : Module::Interface(std::move(module), std::move(profile_manager), "acc:aa") {
static const FunctionInfo functions[] = {
{0, nullptr, "EnsureCacheAsync"},
{1, nullptr, "LoadCache"},
diff --git a/src/core/hle/service/acc/acc_aa.h b/src/core/hle/service/acc/acc_aa.h
index 796f7ef85..2e08c781a 100644
--- a/src/core/hle/service/acc/acc_aa.h
+++ b/src/core/hle/service/acc/acc_aa.h
@@ -10,7 +10,8 @@ namespace Service::Account {
class ACC_AA final : public Module::Interface {
public:
- explicit ACC_AA(std::shared_ptr<Module> module);
+ explicit ACC_AA(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager);
};
} // namespace Service::Account
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp
index 5973768be..0218ee859 100644
--- a/src/core/hle/service/acc/acc_su.cpp
+++ b/src/core/hle/service/acc/acc_su.cpp
@@ -6,7 +6,8 @@
namespace Service::Account {
-ACC_SU::ACC_SU(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "acc:su") {
+ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> profile_manager)
+ : Module::Interface(std::move(module), std::move(profile_manager), "acc:su") {
static const FunctionInfo functions[] = {
{0, &ACC_SU::GetUserCount, "GetUserCount"},
{1, &ACC_SU::GetUserExistence, "GetUserExistence"},
diff --git a/src/core/hle/service/acc/acc_su.h b/src/core/hle/service/acc/acc_su.h
index 3894a6991..79a47d88d 100644
--- a/src/core/hle/service/acc/acc_su.h
+++ b/src/core/hle/service/acc/acc_su.h
@@ -11,7 +11,8 @@ namespace Account {
class ACC_SU final : public Module::Interface {
public:
- explicit ACC_SU(std::shared_ptr<Module> module);
+ explicit ACC_SU(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager);
};
} // namespace Account
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp
index b6fe45dd8..84a4d05b8 100644
--- a/src/core/hle/service/acc/acc_u0.cpp
+++ b/src/core/hle/service/acc/acc_u0.cpp
@@ -6,7 +6,8 @@
namespace Service::Account {
-ACC_U0::ACC_U0(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "acc:u0") {
+ACC_U0::ACC_U0(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> profile_manager)
+ : Module::Interface(std::move(module), std::move(profile_manager), "acc:u0") {
static const FunctionInfo functions[] = {
{0, &ACC_U0::GetUserCount, "GetUserCount"},
{1, &ACC_U0::GetUserExistence, "GetUserExistence"},
diff --git a/src/core/hle/service/acc/acc_u0.h b/src/core/hle/service/acc/acc_u0.h
index 6ded596b3..e8a114f99 100644
--- a/src/core/hle/service/acc/acc_u0.h
+++ b/src/core/hle/service/acc/acc_u0.h
@@ -10,7 +10,8 @@ namespace Service::Account {
class ACC_U0 final : public Module::Interface {
public:
- explicit ACC_U0(std::shared_ptr<Module> module);
+ explicit ACC_U0(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager);
};
} // namespace Service::Account
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp
index 99e3f1ef6..495693949 100644
--- a/src/core/hle/service/acc/acc_u1.cpp
+++ b/src/core/hle/service/acc/acc_u1.cpp
@@ -6,7 +6,8 @@
namespace Service::Account {
-ACC_U1::ACC_U1(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "acc:u1") {
+ACC_U1::ACC_U1(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> profile_manager)
+ : Module::Interface(std::move(module), std::move(profile_manager), "acc:u1") {
static const FunctionInfo functions[] = {
{0, &ACC_U1::GetUserCount, "GetUserCount"},
{1, &ACC_U1::GetUserExistence, "GetUserExistence"},
diff --git a/src/core/hle/service/acc/acc_u1.h b/src/core/hle/service/acc/acc_u1.h
index 5e3e7659b..a77520e6f 100644
--- a/src/core/hle/service/acc/acc_u1.h
+++ b/src/core/hle/service/acc/acc_u1.h
@@ -10,7 +10,8 @@ namespace Service::Account {
class ACC_U1 final : public Module::Interface {
public:
- explicit ACC_U1(std::shared_ptr<Module> module);
+ explicit ACC_U1(std::shared_ptr<Module> module,
+ std::shared_ptr<ProfileManager> profile_manager);
};
} // namespace Service::Account