strat: use m_ for member variables
This commit is contained in:
@@ -23,13 +23,13 @@ namespace ams::lr {
|
||||
class AddOnContentLocationResolver {
|
||||
NON_COPYABLE(AddOnContentLocationResolver);
|
||||
private:
|
||||
sf::SharedPointer<IAddOnContentLocationResolver> interface;
|
||||
sf::SharedPointer<IAddOnContentLocationResolver> m_interface;
|
||||
public:
|
||||
AddOnContentLocationResolver() { /* ... */ }
|
||||
explicit AddOnContentLocationResolver(sf::SharedPointer<IAddOnContentLocationResolver> intf) : interface(intf) { /* ... */ }
|
||||
explicit AddOnContentLocationResolver(sf::SharedPointer<IAddOnContentLocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
AddOnContentLocationResolver(AddOnContentLocationResolver &&rhs) {
|
||||
this->interface = std::move(rhs.interface);
|
||||
m_interface = std::move(rhs.m_interface);
|
||||
}
|
||||
|
||||
AddOnContentLocationResolver &operator=(AddOnContentLocationResolver &&rhs) {
|
||||
@@ -38,37 +38,37 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
void Swap(AddOnContentLocationResolver &rhs) {
|
||||
std::swap(this->interface, rhs.interface);
|
||||
std::swap(m_interface, rhs.m_interface);
|
||||
}
|
||||
public:
|
||||
/* Actual commands. */
|
||||
Result ResolveAddOnContentPath(Path *out, ncm::DataId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->ResolveAddOnContentPath(out, id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->ResolveAddOnContentPath(out, id);
|
||||
}
|
||||
|
||||
Result RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
AMS_ASSERT(m_interface);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return this->interface->RegisterAddOnContentStorage(id, application_id, storage_id);
|
||||
return m_interface->RegisterAddOnContentStorage(id, application_id, storage_id);
|
||||
} else {
|
||||
return this->interface->RegisterAddOnContentStorageDeprecated(id, storage_id);
|
||||
return m_interface->RegisterAddOnContentStorageDeprecated(id, storage_id);
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterAllAddOnContentPath() {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->UnregisterAllAddOnContentPath();
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->UnregisterAllAddOnContentPath();
|
||||
}
|
||||
|
||||
Result RefreshApplicationAddOnContent(const ncm::ApplicationId *ids, size_t num_ids) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->RefreshApplicationAddOnContent(sf::InArray<ncm::ApplicationId>(ids, num_ids));
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->RefreshApplicationAddOnContent(sf::InArray<ncm::ApplicationId>(ids, num_ids));
|
||||
}
|
||||
|
||||
Result UnregisterApplicationAddOnContent(ncm::ApplicationId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->UnregisterApplicationAddOnContent(id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->UnregisterApplicationAddOnContent(id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ namespace ams::lr {
|
||||
class LocationResolver {
|
||||
NON_COPYABLE(LocationResolver);
|
||||
private:
|
||||
sf::SharedPointer<ILocationResolver> interface;
|
||||
sf::SharedPointer<ILocationResolver> m_interface;
|
||||
public:
|
||||
LocationResolver() { /* ... */ }
|
||||
explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : interface(intf) { /* ... */ }
|
||||
explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
LocationResolver(LocationResolver &&rhs) {
|
||||
this->interface = std::move(rhs.interface);
|
||||
m_interface = std::move(rhs.m_interface);
|
||||
}
|
||||
|
||||
LocationResolver &operator=(LocationResolver &&rhs) {
|
||||
@@ -38,137 +38,137 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
void swap(LocationResolver &rhs) {
|
||||
std::swap(this->interface, rhs.interface);
|
||||
std::swap(m_interface, rhs.m_interface);
|
||||
}
|
||||
public:
|
||||
Result ResolveProgramPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveProgramPath(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveProgramPath(out, id);
|
||||
}
|
||||
|
||||
void RedirectProgramPath(const Path &path, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id));
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
R_ABORT_UNLESS(m_interface->RedirectProgramPath(path, id));
|
||||
}
|
||||
|
||||
Result ResolveApplicationControlPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveApplicationControlPath(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveApplicationControlPath(out, id);
|
||||
}
|
||||
|
||||
Result ResolveApplicationHtmlDocumentPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveApplicationHtmlDocumentPath(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveApplicationHtmlDocumentPath(out, id);
|
||||
}
|
||||
|
||||
Result ResolveDataPath(Path *out, ncm::DataId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveDataPath(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveDataPath(out, id);
|
||||
}
|
||||
|
||||
void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationControlPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationControlPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result ResolveApplicationLegalInformationPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveApplicationLegalInformationPath(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveApplicationLegalInformationPath(out, id);
|
||||
}
|
||||
|
||||
void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result Refresh() {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->Refresh();
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->Refresh();
|
||||
}
|
||||
|
||||
void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result ClearApplicationRedirection() {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
AMS_ASSERT(hos::GetVersion() < hos::Version_9_0_0);
|
||||
return this->ClearApplicationRedirection(nullptr, 0);
|
||||
}
|
||||
|
||||
Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return this->interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||
return m_interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||
} else {
|
||||
return this->interface->ClearApplicationRedirectionDeprecated();
|
||||
return m_interface->ClearApplicationRedirectionDeprecated();
|
||||
}
|
||||
}
|
||||
|
||||
Result EraseProgramRedirection(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->EraseProgramRedirection(id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->EraseProgramRedirection(id);
|
||||
}
|
||||
|
||||
Result EraseApplicationControlRedirection(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->EraseApplicationControlRedirection(id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->EraseApplicationControlRedirection(id);
|
||||
}
|
||||
|
||||
Result EraseApplicationHtmlDocumentRedirection(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->EraseApplicationHtmlDocumentRedirection(id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->EraseApplicationHtmlDocumentRedirection(id);
|
||||
}
|
||||
|
||||
Result EraseApplicationLegalInformationRedirection(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->EraseApplicationLegalInformationRedirection(id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->EraseApplicationLegalInformationRedirection(id);
|
||||
}
|
||||
|
||||
Result ResolveProgramPathForDebug(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->ResolveProgramPathForDebug(out, id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveProgramPathForDebug(out, id);
|
||||
}
|
||||
|
||||
void RedirectProgramPathForDebug(const Path &path, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
R_ABORT_UNLESS(this->interface->RedirectProgramPathForDebug(path, id));
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
R_ABORT_UNLESS(m_interface->RedirectProgramPathForDebug(path, id));
|
||||
}
|
||||
|
||||
void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result EraseProgramRedirectionForDebug(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface != nullptr);
|
||||
return this->interface->EraseProgramRedirectionForDebug(id);
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->EraseProgramRedirectionForDebug(id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace ams::lr {
|
||||
class LocationResolverManagerImpl {
|
||||
private:
|
||||
/* Resolver storage. */
|
||||
ncm::BoundedMap<ncm::StorageId, sf::SharedPointer<ILocationResolver>, 5> location_resolvers;
|
||||
sf::SharedPointer<IRegisteredLocationResolver> registered_location_resolver = nullptr;
|
||||
sf::SharedPointer<IAddOnContentLocationResolver> add_on_content_location_resolver = nullptr;
|
||||
ncm::BoundedMap<ncm::StorageId, sf::SharedPointer<ILocationResolver>, 5> m_location_resolvers{};
|
||||
sf::SharedPointer<IRegisteredLocationResolver> m_registered_location_resolver = nullptr;
|
||||
sf::SharedPointer<IAddOnContentLocationResolver> m_add_on_content_location_resolver = nullptr;
|
||||
|
||||
os::SdkMutex mutex{};
|
||||
os::SdkMutex m_mutex{};
|
||||
public:
|
||||
/* Actual commands. */
|
||||
Result OpenLocationResolver(sf::Out<sf::SharedPointer<ILocationResolver>> out, ncm::StorageId storage_id);
|
||||
|
||||
@@ -23,13 +23,13 @@ namespace ams::lr {
|
||||
class RegisteredLocationResolver {
|
||||
NON_COPYABLE(RegisteredLocationResolver);
|
||||
private:
|
||||
sf::SharedPointer<IRegisteredLocationResolver> interface;
|
||||
sf::SharedPointer<IRegisteredLocationResolver> m_interface;
|
||||
public:
|
||||
RegisteredLocationResolver() { /* ... */ }
|
||||
explicit RegisteredLocationResolver(sf::SharedPointer<IRegisteredLocationResolver> intf) : interface(intf) { /* ... */ }
|
||||
explicit RegisteredLocationResolver(sf::SharedPointer<IRegisteredLocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
RegisteredLocationResolver(RegisteredLocationResolver &&rhs) {
|
||||
this->interface = std::move(rhs.interface);
|
||||
m_interface = std::move(rhs.m_interface);
|
||||
}
|
||||
|
||||
RegisteredLocationResolver &operator=(RegisteredLocationResolver &&rhs) {
|
||||
@@ -38,74 +38,74 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
void Swap(RegisteredLocationResolver &rhs) {
|
||||
std::swap(this->interface, rhs.interface);
|
||||
std::swap(m_interface, rhs.m_interface);
|
||||
}
|
||||
public:
|
||||
/* Actual commands. */
|
||||
Result ResolveProgramPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->ResolveProgramPath(out, id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->ResolveProgramPath(out, id);
|
||||
}
|
||||
|
||||
Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
AMS_ASSERT(m_interface);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return this->interface->RegisterProgramPath(path, id, owner_id);
|
||||
return m_interface->RegisterProgramPath(path, id, owner_id);
|
||||
} else {
|
||||
return this->interface->RegisterProgramPathDeprecated(path, id);
|
||||
return m_interface->RegisterProgramPathDeprecated(path, id);
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterProgramPath(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->UnregisterProgramPath(id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->UnregisterProgramPath(id);
|
||||
}
|
||||
|
||||
void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
AMS_ASSERT(m_interface);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectProgramPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectProgramPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectProgramPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result ResolveHtmlDocumentPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->ResolveHtmlDocumentPath(out, id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->ResolveHtmlDocumentPath(out, id);
|
||||
}
|
||||
|
||||
Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
AMS_ASSERT(m_interface);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return this->interface->RegisterHtmlDocumentPath(path, id, owner_id);
|
||||
return m_interface->RegisterHtmlDocumentPath(path, id, owner_id);
|
||||
} else {
|
||||
return this->interface->RegisterHtmlDocumentPathDeprecated(path, id);
|
||||
return m_interface->RegisterHtmlDocumentPathDeprecated(path, id);
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterHtmlDocumentPath(ncm::ProgramId id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->UnregisterHtmlDocumentPath(id);
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->UnregisterHtmlDocumentPath(id);
|
||||
}
|
||||
|
||||
void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(this->interface);
|
||||
AMS_ASSERT(m_interface);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPath(path, id, owner_id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectHtmlDocumentPath(path, id, owner_id));
|
||||
} else {
|
||||
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPathDeprecated(path, id));
|
||||
R_ABORT_UNLESS(m_interface->RedirectHtmlDocumentPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result Refresh() {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->Refresh();
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->Refresh();
|
||||
}
|
||||
|
||||
Result RefreshExcluding(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
||||
AMS_ASSERT(this->interface);
|
||||
return this->interface->RefreshExcluding(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||
AMS_ASSERT(m_interface);
|
||||
return m_interface->RefreshExcluding(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user