strat: use m_ for member variables

This commit is contained in:
Michael Scire
2021-10-10 00:14:06 -07:00
parent ce28591ab2
commit a595c232b9
425 changed files with 8531 additions and 8484 deletions

View File

@@ -21,7 +21,7 @@ namespace ams::lr {
Result AddOnContentLocationResolverImpl::ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id) {
/* Find a storage that contains the given program id. */
ncm::StorageId storage_id = ncm::StorageId::None;
R_UNLESS(this->registered_storages.Find(std::addressof(storage_id), id), lr::ResultAddOnContentNotFound());
R_UNLESS(m_registered_storages.Find(std::addressof(storage_id), id), lr::ResultAddOnContentNotFound());
/* Obtain a content meta database for the storage id. */
ncm::ContentMetaDatabase content_meta_database;
@@ -44,28 +44,28 @@ namespace ams::lr {
Result AddOnContentLocationResolverImpl::RegisterAddOnContentStorageDeprecated(ncm::DataId id, ncm::StorageId storage_id) {
/* Register storage for the given program id. 2.0.0-8.1.0 did not require an owner application id. */
R_UNLESS(this->registered_storages.Register(id, storage_id, ncm::InvalidApplicationId), lr::ResultTooManyRegisteredPaths());
R_UNLESS(m_registered_storages.Register(id, storage_id, ncm::InvalidApplicationId), lr::ResultTooManyRegisteredPaths());
return ResultSuccess();
}
Result AddOnContentLocationResolverImpl::RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) {
/* Register storage for the given program id and owner application. */
R_UNLESS(this->registered_storages.Register(id, storage_id, application_id), lr::ResultTooManyRegisteredPaths());
R_UNLESS(m_registered_storages.Register(id, storage_id, application_id), lr::ResultTooManyRegisteredPaths());
return ResultSuccess();
}
Result AddOnContentLocationResolverImpl::UnregisterAllAddOnContentPath() {
this->registered_storages.Clear();
m_registered_storages.Clear();
return ResultSuccess();
}
Result AddOnContentLocationResolverImpl::RefreshApplicationAddOnContent(const sf::InArray<ncm::ApplicationId> &ids) {
if (ids.GetSize() == 0) {
/* Clear all registered storages. */
this->registered_storages.Clear();
m_registered_storages.Clear();
} else {
/* Clear all registered storages excluding the provided program ids. */
this->registered_storages.ClearExcluding(reinterpret_cast<const ncm::ProgramId *>(ids.GetPointer()), ids.GetSize());
m_registered_storages.ClearExcluding(reinterpret_cast<const ncm::ProgramId *>(ids.GetPointer()), ids.GetSize());
}
return ResultSuccess();
@@ -73,7 +73,7 @@ namespace ams::lr {
Result AddOnContentLocationResolverImpl::UnregisterApplicationAddOnContent(ncm::ApplicationId id) {
/* Remove entries belonging to the provided application. */
this->registered_storages.UnregisterOwnerProgram(id);
m_registered_storages.UnregisterOwnerProgram(id);
return ResultSuccess();
}

View File

@@ -24,9 +24,9 @@ namespace ams::lr {
class AddOnContentLocationResolverImpl {
private:
/* Storage for RegisteredData entries by data id. */
RegisteredStorages<ncm::DataId, 0x800> registered_storages;
RegisteredStorages<ncm::DataId, 0x800> m_registered_storages;
public:
AddOnContentLocationResolverImpl() : registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ }
AddOnContentLocationResolverImpl() : m_registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ }
/* Actual commands. */
Result ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id);

View File

@@ -25,16 +25,16 @@ namespace ams::lr {
/* Helper function. */
void ContentLocationResolverImpl::GetContentStoragePath(Path *out, ncm::ContentId content_id) {
static_assert(sizeof(lr::Path) == sizeof(ncm::Path));
this->content_storage.GetPath(reinterpret_cast<ncm::Path *>(out), content_id);
m_content_storage.GetPath(reinterpret_cast<ncm::Path *>(out), content_id);
}
Result ContentLocationResolverImpl::ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
/* Use a redirection if present. */
R_SUCCEED_IF(this->program_redirector.FindRedirection(out.GetPointer(), id));
R_SUCCEED_IF(m_program_redirector.FindRedirection(out.GetPointer(), id));
/* Find the latest program content for the program id. */
ncm::ContentId program_content_id;
R_TRY_CATCH(this->content_meta_database.GetLatestProgram(std::addressof(program_content_id), id)) {
R_TRY_CATCH(m_content_meta_database.GetLatestProgram(std::addressof(program_content_id), id)) {
R_CONVERT(ncm::ResultContentMetaNotFound, lr::ResultProgramNotFound())
} R_END_TRY_CATCH;
@@ -45,24 +45,24 @@ namespace ams::lr {
}
Result ContentLocationResolverImpl::RedirectProgramPath(const Path &path, ncm::ProgramId id) {
this->program_redirector.SetRedirection(id, path);
m_program_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result ContentLocationResolverImpl::ResolveApplicationControlPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->app_control_redirector.FindRedirection(out.GetPointer(), id), lr::ResultControlNotFound());
R_UNLESS(m_app_control_redirector.FindRedirection(out.GetPointer(), id), lr::ResultControlNotFound());
return ResultSuccess();
}
Result ContentLocationResolverImpl::ResolveApplicationHtmlDocumentPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->html_docs_redirector.FindRedirection(out.GetPointer(), id), lr::ResultHtmlDocumentNotFound());
R_UNLESS(m_html_docs_redirector.FindRedirection(out.GetPointer(), id), lr::ResultHtmlDocumentNotFound());
return ResultSuccess();
}
Result ContentLocationResolverImpl::ResolveDataPath(sf::Out<Path> out, ncm::DataId id) {
/* Find the latest data content for the program id. */
ncm::ContentId data_content_id;
R_TRY(this->content_meta_database.GetLatestData(std::addressof(data_content_id), id));
R_TRY(m_content_meta_database.GetLatestData(std::addressof(data_content_id), id));
/* Obtain the content path. */
this->GetContentStoragePath(out.GetPointer(), data_content_id);
@@ -71,37 +71,37 @@ namespace ams::lr {
}
Result ContentLocationResolverImpl::RedirectApplicationControlPathDeprecated(const Path &path, ncm::ProgramId id) {
this->app_control_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_app_control_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->app_control_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_app_control_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationHtmlDocumentPathDeprecated(const Path &path, ncm::ProgramId id) {
this->html_docs_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_html_docs_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->html_docs_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_html_docs_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::ResolveApplicationLegalInformationPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->legal_info_redirector.FindRedirection(out.GetPointer(), id), lr::ResultLegalInformationNotFound());
R_UNLESS(m_legal_info_redirector.FindRedirection(out.GetPointer(), id), lr::ResultLegalInformationNotFound());
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationLegalInformationPathDeprecated(const Path &path, ncm::ProgramId id) {
this->legal_info_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_legal_info_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->legal_info_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_legal_info_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
@@ -109,12 +109,12 @@ namespace ams::lr {
/* Obtain content meta database and content storage objects for this resolver's storage. */
ncm::ContentMetaDatabase meta_db;
ncm::ContentStorage storage;
R_TRY(ncm::OpenContentMetaDatabase(std::addressof(meta_db), this->storage_id));
R_TRY(ncm::OpenContentStorage(std::addressof(storage), this->storage_id));
R_TRY(ncm::OpenContentMetaDatabase(std::addressof(meta_db), m_storage_id));
R_TRY(ncm::OpenContentStorage(std::addressof(storage), m_storage_id));
/* Store the acquired objects. */
this->content_meta_database = std::move(meta_db);
this->content_storage = std::move(storage);
m_content_meta_database = std::move(meta_db);
m_content_storage = std::move(storage);
/* Remove any existing redirections. */
this->ClearRedirections();
@@ -123,12 +123,12 @@ namespace ams::lr {
}
Result ContentLocationResolverImpl::RedirectApplicationProgramPathDeprecated(const Path &path, ncm::ProgramId id) {
this->program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
@@ -143,28 +143,28 @@ namespace ams::lr {
}
Result ContentLocationResolverImpl::EraseProgramRedirection(ncm::ProgramId id) {
this->program_redirector.EraseRedirection(id);
m_program_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result ContentLocationResolverImpl::EraseApplicationControlRedirection(ncm::ProgramId id) {
this->app_control_redirector.EraseRedirection(id);
m_app_control_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result ContentLocationResolverImpl::EraseApplicationHtmlDocumentRedirection(ncm::ProgramId id) {
this->html_docs_redirector.EraseRedirection(id);
m_html_docs_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result ContentLocationResolverImpl::EraseApplicationLegalInformationRedirection(ncm::ProgramId id) {
this->legal_info_redirector.EraseRedirection(id);
m_legal_info_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result ContentLocationResolverImpl::ResolveProgramPathForDebug(sf::Out<Path> out, ncm::ProgramId id) {
/* Use a redirection if present. */
R_SUCCEED_IF(this->debug_program_redirector.FindRedirection(out.GetPointer(), id));
R_SUCCEED_IF(m_debug_program_redirector.FindRedirection(out.GetPointer(), id));
/* Otherwise find the path for the program id. */
R_TRY_CATCH(this->ResolveProgramPath(out.GetPointer(), id)) {
@@ -175,22 +175,22 @@ namespace ams::lr {
}
Result ContentLocationResolverImpl::RedirectProgramPathForDebug(const Path &path, ncm::ProgramId id) {
this->debug_program_redirector.SetRedirection(id, path);
m_debug_program_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationProgramPathForDebugDeprecated(const Path &path, ncm::ProgramId id) {
this->debug_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_debug_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->debug_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_debug_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result ContentLocationResolverImpl::EraseProgramRedirectionForDebug(ncm::ProgramId id) {
this->debug_program_redirector.EraseRedirection(id);
m_debug_program_redirector.EraseRedirection(id);
return ResultSuccess();
}

View File

@@ -21,13 +21,13 @@ namespace ams::lr {
class ContentLocationResolverImpl : public LocationResolverImplBase {
private:
ncm::StorageId storage_id;
ncm::StorageId m_storage_id;
/* Objects for this storage type. */
ncm::ContentMetaDatabase content_meta_database;
ncm::ContentStorage content_storage;
ncm::ContentMetaDatabase m_content_meta_database;
ncm::ContentStorage m_content_storage;
public:
ContentLocationResolverImpl(ncm::StorageId storage_id) : storage_id(storage_id) { /* ... */ }
ContentLocationResolverImpl(ncm::StorageId storage_id) : m_storage_id(storage_id) { /* ... */ }
~ContentLocationResolverImpl();
private:

View File

@@ -22,38 +22,38 @@ namespace ams::lr {
NON_COPYABLE(Redirection);
NON_MOVEABLE(Redirection);
private:
ncm::ProgramId program_id;
ncm::ProgramId owner_id;
Path path;
u32 flags;
ncm::ProgramId m_program_id;
ncm::ProgramId m_owner_id;
Path m_path;
u32 m_flags;
public:
Redirection(ncm::ProgramId program_id, ncm::ProgramId owner_id, const Path &path, u32 flags) :
program_id(program_id), owner_id(owner_id), path(path), flags(flags) { /* ... */ }
m_program_id(program_id), m_owner_id(owner_id), m_path(path), m_flags(flags) { /* ... */ }
ncm::ProgramId GetProgramId() const {
return this->program_id;
return m_program_id;
}
ncm::ProgramId GetOwnerProgramId() const {
return this->owner_id;
return m_owner_id;
}
void GetPath(Path *out) const {
*out = this->path;
*out = m_path;
}
u32 GetFlags() const {
return this->flags;
return m_flags;
}
void SetFlags(u32 flags) {
this->flags = flags;
m_flags = flags;
}
};
bool LocationRedirector::FindRedirection(Path *out, ncm::ProgramId program_id) const {
/* Obtain the path of a matching redirection. */
for (const auto &redirection : this->redirection_list) {
for (const auto &redirection : m_redirection_list) {
if (redirection.GetProgramId() == program_id) {
redirection.GetPath(out);
return true;
@@ -71,12 +71,12 @@ namespace ams::lr {
this->EraseRedirection(program_id);
/* Insert a new redirection into the list. */
this->redirection_list.push_back(*(new Redirection(program_id, owner_id, path, flags)));
m_redirection_list.push_back(*(new Redirection(program_id, owner_id, path, flags)));
}
void LocationRedirector::SetRedirectionFlags(ncm::ProgramId program_id, u32 flags) {
/* Set the flags of a redirection with a matching program id. */
for (auto &redirection : this->redirection_list) {
for (auto &redirection : m_redirection_list) {
if (redirection.GetProgramId() == program_id) {
redirection.SetFlags(flags);
break;
@@ -86,10 +86,10 @@ namespace ams::lr {
void LocationRedirector::EraseRedirection(ncm::ProgramId program_id) {
/* Remove any redirections with a matching program id. */
for (auto it = this->redirection_list.begin(); it != this->redirection_list.end();) {
for (auto it = m_redirection_list.begin(); it != m_redirection_list.end();) {
if (it->GetProgramId() == program_id) {
auto *redirection = std::addressof(*it);
this->redirection_list.erase(it);
m_redirection_list.erase(it);
delete redirection;
break;
}
@@ -98,10 +98,10 @@ namespace ams::lr {
void LocationRedirector::ClearRedirections(u32 flags) {
/* Remove any redirections with matching flags. */
for (auto it = this->redirection_list.begin(); it != this->redirection_list.end();) {
for (auto it = m_redirection_list.begin(); it != m_redirection_list.end();) {
if ((it->GetFlags() & flags) == flags) {
auto *redirection = std::addressof(*it);
it = this->redirection_list.erase(it);
it = m_redirection_list.erase(it);
delete redirection;
} else {
it++;
@@ -110,7 +110,7 @@ namespace ams::lr {
}
void LocationRedirector::ClearRedirectionsExcludingOwners(const ncm::ProgramId *excluding_ids, size_t num_ids) {
for (auto it = this->redirection_list.begin(); it != this->redirection_list.end();) {
for (auto it = m_redirection_list.begin(); it != m_redirection_list.end();) {
/* Skip removal if the redirection has an excluded owner program id. */
if (this->IsExcluded(it->GetOwnerProgramId(), excluding_ids, num_ids)) {
it++;
@@ -119,7 +119,7 @@ namespace ams::lr {
/* Remove the redirection. */
auto *redirection = std::addressof(*it);
it = this->redirection_list.erase(it);
it = m_redirection_list.erase(it);
delete redirection;
}
}

View File

@@ -32,9 +32,9 @@ namespace ams::lr {
private:
using RedirectionList = ams::util::IntrusiveListBaseTraits<Redirection>::ListType;
private:
RedirectionList redirection_list;
RedirectionList m_redirection_list;
public:
LocationRedirector() { /* ... */ }
LocationRedirector() : m_redirection_list() { /* ... */ }
~LocationRedirector() { this->ClearRedirections(); }
/* API. */

View File

@@ -25,29 +25,29 @@ namespace ams::lr {
NON_MOVEABLE(LocationResolverImplBase);
protected:
/* Location redirectors. */
LocationRedirector program_redirector;
LocationRedirector debug_program_redirector;
LocationRedirector app_control_redirector;
LocationRedirector html_docs_redirector;
LocationRedirector legal_info_redirector;
LocationRedirector m_program_redirector;
LocationRedirector m_debug_program_redirector;
LocationRedirector m_app_control_redirector;
LocationRedirector m_html_docs_redirector;
LocationRedirector m_legal_info_redirector;
protected:
LocationResolverImplBase() : program_redirector(), debug_program_redirector(), app_control_redirector(), html_docs_redirector(), legal_info_redirector() { /* ... */ }
LocationResolverImplBase() : m_program_redirector(), m_debug_program_redirector(), m_app_control_redirector(), m_html_docs_redirector(), m_legal_info_redirector() { /* ... */ }
protected:
/* Helper functions. */
void ClearRedirections(u32 flags = RedirectionFlags_None) {
this->program_redirector.ClearRedirections(flags);
this->debug_program_redirector.ClearRedirections(flags);
this->app_control_redirector.ClearRedirections(flags);
this->html_docs_redirector.ClearRedirections(flags);
this->legal_info_redirector.ClearRedirections(flags);
m_program_redirector.ClearRedirections(flags);
m_debug_program_redirector.ClearRedirections(flags);
m_app_control_redirector.ClearRedirections(flags);
m_html_docs_redirector.ClearRedirections(flags);
m_legal_info_redirector.ClearRedirections(flags);
}
void ClearRedirections(const ncm::ProgramId *excluding_ids, size_t num_ids) {
this->program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
this->debug_program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
this->app_control_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
this->html_docs_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
this->legal_info_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_debug_program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_app_control_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_html_docs_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_legal_info_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
}
};

View File

@@ -30,22 +30,22 @@ namespace ams::lr {
}
Result LocationResolverManagerImpl::OpenLocationResolver(sf::Out<sf::SharedPointer<ILocationResolver>> out, ncm::StorageId storage_id) {
std::scoped_lock lk(this->mutex);
std::scoped_lock lk(m_mutex);
/* Find an existing resolver. */
auto resolver = this->location_resolvers.Find(storage_id);
auto resolver = m_location_resolvers.Find(storage_id);
/* No existing resolver is present, create one. */
if (!resolver) {
if (storage_id == ncm::StorageId::Host) {
AMS_ABORT_UNLESS(this->location_resolvers.Insert(storage_id, RedirectOnlyLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, RedirectOnlyLocationResolverImpl>()));
AMS_ABORT_UNLESS(m_location_resolvers.Insert(storage_id, RedirectOnlyLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, RedirectOnlyLocationResolverImpl>()));
} else {
auto content_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, ContentLocationResolverImpl>(storage_id);
R_TRY(content_resolver->Refresh());
AMS_ABORT_UNLESS(this->location_resolvers.Insert(storage_id, std::move(content_resolver)));
AMS_ABORT_UNLESS(m_location_resolvers.Insert(storage_id, std::move(content_resolver)));
}
/* Acquire the newly-created resolver. */
resolver = this->location_resolvers.Find(storage_id);
resolver = m_location_resolvers.Find(storage_id);
}
/* Copy the output interface. */
@@ -54,23 +54,23 @@ namespace ams::lr {
}
Result LocationResolverManagerImpl::OpenRegisteredLocationResolver(sf::Out<sf::SharedPointer<IRegisteredLocationResolver>> out) {
std::scoped_lock lk(this->mutex);
std::scoped_lock lk(m_mutex);
/* No existing resolver is present, create one. */
if (!this->registered_location_resolver) {
this->registered_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IRegisteredLocationResolver, RegisteredLocationResolverImpl>();
if (!m_registered_location_resolver) {
m_registered_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IRegisteredLocationResolver, RegisteredLocationResolverImpl>();
}
/* Copy the output interface. */
*out = this->registered_location_resolver;
*out = m_registered_location_resolver;
return ResultSuccess();
}
Result LocationResolverManagerImpl::RefreshLocationResolver(ncm::StorageId storage_id) {
std::scoped_lock lk(this->mutex);
std::scoped_lock lk(m_mutex);
/* Attempt to find an existing resolver. */
auto resolver = this->location_resolvers.Find(storage_id);
auto resolver = m_location_resolvers.Find(storage_id);
R_UNLESS(resolver, lr::ResultUnknownStorageId());
/* Refresh the resolver. */
@@ -82,15 +82,15 @@ namespace ams::lr {
}
Result LocationResolverManagerImpl::OpenAddOnContentLocationResolver(sf::Out<sf::SharedPointer<IAddOnContentLocationResolver>> out) {
std::scoped_lock lk(this->mutex);
std::scoped_lock lk(m_mutex);
/* No existing resolver is present, create one. */
if (!this->add_on_content_location_resolver) {
this->add_on_content_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IAddOnContentLocationResolver, AddOnContentLocationResolverImpl>();
if (!m_add_on_content_location_resolver) {
m_add_on_content_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IAddOnContentLocationResolver, AddOnContentLocationResolverImpl>();
}
/* Copy the output interface. */
*out = this->add_on_content_location_resolver;
*out = m_add_on_content_location_resolver;
return ResultSuccess();
}

View File

@@ -24,22 +24,22 @@ namespace ams::lr {
}
Result RedirectOnlyLocationResolverImpl::ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->program_redirector.FindRedirection(out.GetPointer(), id), lr::ResultProgramNotFound());
R_UNLESS(m_program_redirector.FindRedirection(out.GetPointer(), id), lr::ResultProgramNotFound());
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectProgramPath(const Path &path, ncm::ProgramId id) {
this->program_redirector.SetRedirection(id, path);
m_program_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::ResolveApplicationControlPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->app_control_redirector.FindRedirection(out.GetPointer(), id), lr::ResultControlNotFound());
R_UNLESS(m_app_control_redirector.FindRedirection(out.GetPointer(), id), lr::ResultControlNotFound());
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::ResolveApplicationHtmlDocumentPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->html_docs_redirector.FindRedirection(out.GetPointer(), id), lr::ResultHtmlDocumentNotFound());
R_UNLESS(m_html_docs_redirector.FindRedirection(out.GetPointer(), id), lr::ResultHtmlDocumentNotFound());
return ResultSuccess();
}
@@ -49,37 +49,37 @@ namespace ams::lr {
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationControlPathDeprecated(const Path &path, ncm::ProgramId id) {
this->app_control_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_app_control_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->app_control_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_app_control_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationHtmlDocumentPathDeprecated(const Path &path, ncm::ProgramId id) {
this->html_docs_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_html_docs_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->html_docs_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_html_docs_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::ResolveApplicationLegalInformationPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(this->legal_info_redirector.FindRedirection(out.GetPointer(), id), lr::ResultLegalInformationNotFound());
R_UNLESS(m_legal_info_redirector.FindRedirection(out.GetPointer(), id), lr::ResultLegalInformationNotFound());
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationLegalInformationPathDeprecated(const Path &path, ncm::ProgramId id) {
this->legal_info_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_legal_info_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->legal_info_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_legal_info_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
@@ -89,12 +89,12 @@ namespace ams::lr {
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationProgramPathDeprecated(const Path &path, ncm::ProgramId id) {
this->program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
@@ -109,52 +109,52 @@ namespace ams::lr {
}
Result RedirectOnlyLocationResolverImpl::EraseProgramRedirection(ncm::ProgramId id) {
this->program_redirector.EraseRedirection(id);
m_program_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::EraseApplicationControlRedirection(ncm::ProgramId id) {
this->app_control_redirector.EraseRedirection(id);
m_app_control_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::EraseApplicationHtmlDocumentRedirection(ncm::ProgramId id) {
this->html_docs_redirector.EraseRedirection(id);
m_html_docs_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::EraseApplicationLegalInformationRedirection(ncm::ProgramId id) {
this->legal_info_redirector.EraseRedirection(id);
m_legal_info_redirector.EraseRedirection(id);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::ResolveProgramPathForDebug(sf::Out<Path> out, ncm::ProgramId id) {
/* If a debug program redirection is present, use it. */
R_SUCCEED_IF(this->debug_program_redirector.FindRedirection(out.GetPointer(), id));
R_SUCCEED_IF(m_debug_program_redirector.FindRedirection(out.GetPointer(), id));
/* Otherwise, try to find a normal program redirection. */
R_UNLESS(this->program_redirector.FindRedirection(out.GetPointer(), id), lr::ResultDebugProgramNotFound());
R_UNLESS(m_program_redirector.FindRedirection(out.GetPointer(), id), lr::ResultDebugProgramNotFound());
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectProgramPathForDebug(const Path &path, ncm::ProgramId id) {
this->debug_program_redirector.SetRedirection(id, path);
m_debug_program_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationProgramPathForDebugDeprecated(const Path &path, ncm::ProgramId id) {
this->debug_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
m_debug_program_redirector.SetRedirection(id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->debug_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
m_debug_program_redirector.SetRedirection(id, owner_id, path, RedirectionFlags_Application);
return ResultSuccess();
}
Result RedirectOnlyLocationResolverImpl::EraseProgramRedirectionForDebug(ncm::ProgramId id) {
this->debug_program_redirector.EraseRedirection(id);
m_debug_program_redirector.EraseRedirection(id);
return ResultSuccess();
}

View File

@@ -31,8 +31,8 @@ namespace ams::lr {
bool is_valid;
};
private:
Entry entries[NumEntries];
size_t capacity;
Entry m_entries[NumEntries];
size_t m_capacity;
private:
inline bool IsExcluded(const ncm::ProgramId id, const ncm::ProgramId *excluding_ids, size_t num_ids) const {
/* Try to find program id in exclusions. */
@@ -47,21 +47,21 @@ namespace ams::lr {
inline void RegisterImpl(size_t i, const Key &key, const Value &value, const ncm::ProgramId owner_id) {
/* Populate entry. */
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
entry.key = key;
entry.value = value;
entry.owner_id = owner_id;
entry.is_valid = true;
}
public:
RegisteredData(size_t capacity = NumEntries) : capacity(capacity) {
RegisteredData(size_t capacity = NumEntries) : m_capacity(capacity) {
this->Clear();
}
bool Register(const Key &key, const Value &value, const ncm::ProgramId owner_id) {
/* Try to find an existing value. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
if (entry.is_valid && entry.key == key) {
this->RegisterImpl(i, key, value, owner_id);
return true;
@@ -70,7 +70,7 @@ namespace ams::lr {
/* We didn't find an existing entry, so try to create a new one. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
if (!entry.is_valid) {
this->RegisterImpl(i, key, value, owner_id);
return true;
@@ -83,7 +83,7 @@ namespace ams::lr {
void Unregister(const Key &key) {
/* Invalidate entries with a matching key. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
if (entry.is_valid && entry.key == key) {
entry.is_valid = false;
}
@@ -93,7 +93,7 @@ namespace ams::lr {
void UnregisterOwnerProgram(ncm::ProgramId owner_id) {
/* Invalidate entries with a matching owner id. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
if (entry.owner_id == owner_id) {
entry.is_valid = false;
}
@@ -103,7 +103,7 @@ namespace ams::lr {
bool Find(Value *out, const Key &key) const {
/* Locate a matching entry. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
const Entry &entry = this->entries[i];
const Entry &entry = m_entries[i];
if (entry.is_valid && entry.key == key) {
*out = entry.value;
return true;
@@ -116,14 +116,14 @@ namespace ams::lr {
void Clear() {
/* Invalidate all entries. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
this->entries[i].is_valid = false;
m_entries[i].is_valid = false;
}
}
void ClearExcluding(const ncm::ProgramId *ids, size_t num_ids) {
/* Invalidate all entries unless excluded. */
for (size_t i = 0; i < this->GetCapacity(); i++) {
Entry &entry = this->entries[i];
Entry &entry = m_entries[i];
if (!this->IsExcluded(entry.owner_id, ids, num_ids)) {
entry.is_valid = false;
@@ -132,7 +132,7 @@ namespace ams::lr {
}
size_t GetCapacity() const {
return this->capacity;
return m_capacity;
}
};

View File

@@ -53,8 +53,8 @@ namespace ams::lr {
/* Helper function. */
void RegisteredLocationResolverImpl::ClearRedirections(u32 flags) {
this->html_docs_redirector.ClearRedirections(flags);
this->program_redirector.ClearRedirections(flags);
m_html_docs_redirector.ClearRedirections(flags);
m_program_redirector.ClearRedirections(flags);
}
Result RegisteredLocationResolverImpl::RefreshImpl(const ncm::ProgramId *excluding_ids, size_t num_ids) {
@@ -66,76 +66,76 @@ namespace ams::lr {
if (num_ids) {
/* If we have exclusion lists, explicitly clear our locations. */
this->registered_program_locations.ClearExcluding(excluding_ids, num_ids);
this->registered_html_docs_locations.ClearExcluding(excluding_ids, num_ids);
m_registered_program_locations.ClearExcluding(excluding_ids, num_ids);
m_registered_html_docs_locations.ClearExcluding(excluding_ids, num_ids);
} else {
/* If we don't, just perform a general clear (as pre 9.0.0 did). */
this->ClearRedirections();
}
/* Clear redirectors using exclusion lists. */
this->program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
this->html_docs_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_program_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
m_html_docs_redirector.ClearRedirectionsExcludingOwners(excluding_ids, num_ids);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(ResolvePath(out.GetPointer(), this->program_redirector, this->registered_program_locations, id), lr::ResultProgramNotFound());
R_UNLESS(ResolvePath(out.GetPointer(), m_program_redirector, m_registered_program_locations, id), lr::ResultProgramNotFound());
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RegisterProgramPathDeprecated(const Path &path, ncm::ProgramId id) {
RegisterPath(this->registered_program_locations, id, path, ncm::InvalidProgramId);
RegisterPath(m_registered_program_locations, id, path, ncm::InvalidProgramId);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
RegisterPath(this->registered_program_locations, id, path, owner_id);
RegisterPath(m_registered_program_locations, id, path, owner_id);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::UnregisterProgramPath(ncm::ProgramId id) {
this->registered_program_locations.Unregister(id);
m_registered_program_locations.Unregister(id);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RedirectProgramPathDeprecated(const Path &path, ncm::ProgramId id) {
this->program_redirector.SetRedirection(id, path);
m_program_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->program_redirector.SetRedirection(id, owner_id, path);
m_program_redirector.SetRedirection(id, owner_id, path);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::ResolveHtmlDocumentPath(sf::Out<Path> out, ncm::ProgramId id) {
R_UNLESS(ResolvePath(out.GetPointer(), this->html_docs_redirector, this->registered_html_docs_locations, id), lr::ResultHtmlDocumentNotFound());
R_UNLESS(ResolvePath(out.GetPointer(), m_html_docs_redirector, m_registered_html_docs_locations, id), lr::ResultHtmlDocumentNotFound());
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RegisterHtmlDocumentPathDeprecated(const Path &path, ncm::ProgramId id) {
RegisterPath(this->registered_html_docs_locations, id, path, ncm::InvalidProgramId);
RegisterPath(m_registered_html_docs_locations, id, path, ncm::InvalidProgramId);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
RegisterPath(this->registered_html_docs_locations, id, path, owner_id);
RegisterPath(m_registered_html_docs_locations, id, path, owner_id);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::UnregisterHtmlDocumentPath(ncm::ProgramId id) {
this->registered_html_docs_locations.Unregister(id);
m_registered_html_docs_locations.Unregister(id);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RedirectHtmlDocumentPathDeprecated(const Path &path, ncm::ProgramId id) {
this->html_docs_redirector.SetRedirection(id, path);
m_html_docs_redirector.SetRedirection(id, path);
return ResultSuccess();
}
Result RegisteredLocationResolverImpl::RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
this->html_docs_redirector.SetRedirection(id, owner_id, path);
m_html_docs_redirector.SetRedirection(id, owner_id, path);
return ResultSuccess();
}

View File

@@ -36,16 +36,16 @@ namespace ams::lr {
}
private:
/* Redirection and registered location storage. */
LocationRedirector program_redirector;
RegisteredLocations<ncm::ProgramId, MaxRegisteredLocations> registered_program_locations;
LocationRedirector html_docs_redirector;
RegisteredLocations<ncm::ProgramId, MaxRegisteredLocations> registered_html_docs_locations;
LocationRedirector m_program_redirector;
RegisteredLocations<ncm::ProgramId, MaxRegisteredLocations> m_registered_program_locations;
LocationRedirector m_html_docs_redirector;
RegisteredLocations<ncm::ProgramId, MaxRegisteredLocations> m_registered_html_docs_locations;
private:
/* Helper functions. */
void ClearRedirections(u32 flags = RedirectionFlags_None);
Result RefreshImpl(const ncm::ProgramId *excluding_ids, size_t num_ids);
public:
RegisteredLocationResolverImpl() : registered_program_locations(GetMaxRegisteredLocations()), registered_html_docs_locations(GetMaxRegisteredLocations()) { /* ... */ }
RegisteredLocationResolverImpl() : m_registered_program_locations(GetMaxRegisteredLocations()), m_registered_html_docs_locations(GetMaxRegisteredLocations()) { /* ... */ }
~RegisteredLocationResolverImpl();
public:
/* Actual commands. */

View File

@@ -20,63 +20,63 @@ namespace ams::lr {
class RemoteLocationResolverImpl {
private:
::LrLocationResolver srv;
::LrLocationResolver m_srv;
public:
RemoteLocationResolverImpl(::LrLocationResolver &l) : srv(l) { /* ... */ }
RemoteLocationResolverImpl(::LrLocationResolver &l) : m_srv(l) { /* ... */ }
~RemoteLocationResolverImpl() { ::serviceClose(std::addressof(srv.s)); }
~RemoteLocationResolverImpl() { ::serviceClose(std::addressof(m_srv.s)); }
public:
/* Actual commands. */
Result ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
return ::lrLrResolveProgramPath(std::addressof(this->srv), id.value, out->str);
return ::lrLrResolveProgramPath(std::addressof(m_srv), id.value, out->str);
}
Result RedirectProgramPath(const Path &path, ncm::ProgramId id) {
return ::lrLrRedirectProgramPath(std::addressof(this->srv), id.value, path.str);
return ::lrLrRedirectProgramPath(std::addressof(m_srv), id.value, path.str);
}
Result ResolveApplicationControlPath(sf::Out<Path> out, ncm::ProgramId id) {
return ::lrLrResolveApplicationControlPath(std::addressof(this->srv), id.value, out->str);
return ::lrLrResolveApplicationControlPath(std::addressof(m_srv), id.value, out->str);
}
Result ResolveApplicationHtmlDocumentPath(sf::Out<Path> out, ncm::ProgramId id) {
return ::lrLrResolveApplicationHtmlDocumentPath(std::addressof(this->srv), id.value, out->str);
return ::lrLrResolveApplicationHtmlDocumentPath(std::addressof(m_srv), id.value, out->str);
}
Result ResolveDataPath(sf::Out<Path> out, ncm::DataId id) {
return ::lrLrResolveDataPath(std::addressof(this->srv), id.value, out->str);
return ::lrLrResolveDataPath(std::addressof(m_srv), id.value, out->str);
}
Result RedirectApplicationControlPathDeprecated(const Path &path, ncm::ProgramId id) {
return ::lrLrRedirectApplicationControlPath(std::addressof(this->srv), id.value, 0, path.str);
return ::lrLrRedirectApplicationControlPath(std::addressof(m_srv), id.value, 0, path.str);
}
Result RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
return ::lrLrRedirectApplicationControlPath(std::addressof(this->srv), id.value, owner_id.value, path.str);
return ::lrLrRedirectApplicationControlPath(std::addressof(m_srv), id.value, owner_id.value, path.str);
}
Result RedirectApplicationHtmlDocumentPathDeprecated(const Path &path, ncm::ProgramId id) {
return ::lrLrRedirectApplicationHtmlDocumentPath(std::addressof(this->srv), id.value, 0, path.str);
return ::lrLrRedirectApplicationHtmlDocumentPath(std::addressof(m_srv), id.value, 0, path.str);
}
Result RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
return ::lrLrRedirectApplicationHtmlDocumentPath(std::addressof(this->srv), id.value, owner_id.value, path.str);
return ::lrLrRedirectApplicationHtmlDocumentPath(std::addressof(m_srv), id.value, owner_id.value, path.str);
}
Result ResolveApplicationLegalInformationPath(sf::Out<Path> out, ncm::ProgramId id) {
return ::lrLrResolveApplicationLegalInformationPath(std::addressof(this->srv), id.value, out->str);
return ::lrLrResolveApplicationLegalInformationPath(std::addressof(m_srv), id.value, out->str);
}
Result RedirectApplicationLegalInformationPathDeprecated(const Path &path, ncm::ProgramId id) {
return ::lrLrRedirectApplicationLegalInformationPath(std::addressof(this->srv), id.value, 0, path.str);
return ::lrLrRedirectApplicationLegalInformationPath(std::addressof(m_srv), id.value, 0, path.str);
}
Result RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
return ::lrLrRedirectApplicationLegalInformationPath(std::addressof(this->srv), id.value, owner_id.value, path.str);
return ::lrLrRedirectApplicationLegalInformationPath(std::addressof(m_srv), id.value, owner_id.value, path.str);
}
Result Refresh() {
return ::lrLrRefresh(std::addressof(this->srv));
return ::lrLrRefresh(std::addressof(m_srv));
}
Result RedirectApplicationProgramPathDeprecated(const Path &path, ncm::ProgramId id) {
@@ -103,7 +103,7 @@ namespace ams::lr {
}
Result EraseProgramRedirection(ncm::ProgramId id) {
return ::lrLrEraseProgramRedirection(std::addressof(this->srv), id.value);
return ::lrLrEraseProgramRedirection(std::addressof(m_srv), id.value);
}
Result EraseApplicationControlRedirection(ncm::ProgramId id) {

View File

@@ -21,15 +21,15 @@ namespace ams::lr {
class RemoteRegisteredLocationResolverImpl {
private:
::LrRegisteredLocationResolver srv;
::LrRegisteredLocationResolver m_srv;
public:
RemoteRegisteredLocationResolverImpl(::LrRegisteredLocationResolver &l) : srv(l) { /* ... */ }
RemoteRegisteredLocationResolverImpl(::LrRegisteredLocationResolver &l) : m_srv(l) { /* ... */ }
~RemoteRegisteredLocationResolverImpl() { ::serviceClose(std::addressof(srv.s)); }
~RemoteRegisteredLocationResolverImpl() { ::serviceClose(std::addressof(m_srv.s)); }
public:
/* Actual commands. */
Result ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
return ::lrRegLrResolveProgramPath(std::addressof(this->srv), static_cast<u64>(id), out->str);
return ::lrRegLrResolveProgramPath(std::addressof(m_srv), id.value, out->str);
}
Result RegisterProgramPathDeprecated(const Path &path, ncm::ProgramId id) {