title_id_2 -> owner_tid

This commit is contained in:
Adubbz 2019-10-03 13:08:38 +10:00
parent 94046f7626
commit a1dd0e1a8c
12 changed files with 72 additions and 72 deletions

View file

@ -23,19 +23,19 @@ namespace sts::lr::impl {
NON_MOVEABLE(LocationRedirection);
private:
ncm::TitleId title_id;
ncm::TitleId title_id_2;
ncm::TitleId owner_tid;
Path path;
u32 flags;
public:
LocationRedirection(ncm::TitleId title_id, ncm::TitleId title_id_2, const Path& path, u32 flags) :
title_id(title_id), title_id_2(title_id_2), path(path), flags(flags) { /* ... */ }
LocationRedirection(ncm::TitleId title_id, ncm::TitleId owner_tid, const Path& path, u32 flags) :
title_id(title_id), owner_tid(owner_tid), path(path), flags(flags) { /* ... */ }
ncm::TitleId GetTitleId() const {
return this->title_id;
}
ncm::TitleId GetTitleId2() const {
return this->title_id_2;
ncm::TitleId GetOwnerTitleId() const {
return this->owner_tid;
}
void GetPath(Path *out) const {
@ -69,9 +69,9 @@ namespace sts::lr::impl {
this->SetRedirection(title_id, path, flags);
}
void LocationRedirector::SetRedirection(ncm::TitleId title_id, ncm::TitleId title_id_2, const Path &path, u32 flags) {
void LocationRedirector::SetRedirection(ncm::TitleId title_id, ncm::TitleId owner_tid, const Path &path, u32 flags) {
this->EraseRedirection(title_id);
this->redirection_list.push_back(*(new LocationRedirection(title_id, title_id_2, path, flags)));
this->redirection_list.push_back(*(new LocationRedirection(title_id, owner_tid, path, flags)));
}
void LocationRedirector::SetRedirectionFlags(ncm::TitleId title_id, u32 flags) {
@ -111,7 +111,7 @@ namespace sts::lr::impl {
for (size_t i = 0; i < num_tids; i++) {
ncm::TitleId tid = excluding_tids[i];
if (it->GetTitleId2() == tid) {
if (it->GetOwnerTitleId() == tid) {
skip = true;
break;
}

View file

@ -37,7 +37,7 @@ namespace sts::lr::impl {
bool FindRedirection(Path *out, ncm::TitleId title_id);
void SetRedirection(ncm::TitleId title_id, const Path &path, u32 flags = RedirectionFlags_None);
void SetRedirection(ncm::TitleId title_id, ncm::TitleId title_id_2, const Path &path, u32 flags = RedirectionFlags_None);
void SetRedirection(ncm::TitleId title_id, ncm::TitleId owner_tid, const Path &path, u32 flags = RedirectionFlags_None);
void SetRedirectionFlags(ncm::TitleId title_id, u32 flags);
void EraseRedirection(ncm::TitleId title_id);
void ClearRedirections(u32 flags = RedirectionFlags_None);

View file

@ -27,7 +27,7 @@ namespace sts::lr::impl {
private:
struct Entry {
Value value;
ncm::TitleId title_id_2;
ncm::TitleId owner_tid;
Key key;
bool is_valid;
};
@ -39,7 +39,7 @@ namespace sts::lr::impl {
this->Clear();
}
bool Register(const Key &key, const Value &value, const ncm::TitleId title_id_2) {
bool Register(const Key &key, const Value &value, const ncm::TitleId owner_tid) {
/* Try to find an existing value. */
for (size_t i = 0; i < this->GetSoftEntryLimit(); i++) {
Entry& entry = this->entries[i];
@ -54,7 +54,7 @@ namespace sts::lr::impl {
if (!entry.is_valid) {
entry.key = key;
entry.value = value;
entry.title_id_2 = title_id_2;
entry.owner_tid = owner_tid;
entry.is_valid = true;
return true;
}
@ -72,10 +72,10 @@ namespace sts::lr::impl {
}
}
void UnregisterTitleId2(ncm::TitleId title_id_2) {
void UnregisterOwnerTitle(ncm::TitleId owner_tid) {
for (size_t i = 0; i < this->GetSoftEntryLimit(); i++) {
Entry& entry = this->entries[i];
if (entry.title_id_2 == title_id_2) {
if (entry.owner_tid == owner_tid) {
entry.is_valid = false;
}
}
@ -107,7 +107,7 @@ namespace sts::lr::impl {
for (size_t j = 0; j < num_tids; j++) {
ncm::TitleId tid = tids[j];
if (entry.title_id_2 == tid) {
if (entry.owner_tid == tid) {
found = true;
break;
}

View file

@ -71,7 +71,7 @@ namespace sts::lr {
}
Result AddOnContentLocationResolverInterface::UnregisterApplicationAddOnContent(ncm::TitleId tid) {
this->registered_storages.UnregisterTitleId2(tid);
this->registered_storages.UnregisterOwnerTitle(tid);
return ResultSuccess;
}

View file

@ -78,8 +78,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result ContentLocationResolverInterface::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->app_control_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result ContentLocationResolverInterface::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->app_control_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -88,8 +88,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result ContentLocationResolverInterface::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->html_docs_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result ContentLocationResolverInterface::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->html_docs_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -106,8 +106,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result ContentLocationResolverInterface::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->legal_info_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result ContentLocationResolverInterface::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->legal_info_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -129,8 +129,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result ContentLocationResolverInterface::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->program_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result ContentLocationResolverInterface::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->program_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -188,8 +188,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result ContentLocationResolverInterface::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->debug_program_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result ContentLocationResolverInterface::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->debug_program_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}

View file

@ -43,15 +43,15 @@ namespace sts::lr {
virtual Result ResolveApplicationHtmlDocumentPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result ResolveDataPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectApplicationControlPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result RedirectApplicationHtmlDocumentPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result ResolveApplicationLegalInformationPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectApplicationLegalInformationPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result Refresh() override;
virtual Result RedirectApplicationProgramPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result ClearApplicationRedirectionDeprecated() override;
virtual Result ClearApplicationRedirection(InBuffer<ncm::TitleId> excluding_tids) override;
virtual Result EraseProgramRedirection(ncm::TitleId tid) override;
@ -61,7 +61,7 @@ namespace sts::lr {
virtual Result ResolveProgramPathForDebug(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPathForDebugDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result EraseProgramRedirectionForDebug(ncm::TitleId tid) override;
public:
DEFINE_SERVICE_DISPATCH_TABLE {

View file

@ -42,7 +42,7 @@ namespace sts::lr {
std::abort();
}
Result ILocationResolver::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
Result ILocationResolver::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
std::abort();
}
@ -50,7 +50,7 @@ namespace sts::lr {
std::abort();
}
Result ILocationResolver::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
Result ILocationResolver::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
std::abort();
}
@ -62,7 +62,7 @@ namespace sts::lr {
std::abort();
}
Result ILocationResolver::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
Result ILocationResolver::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
std::abort();
}
@ -74,7 +74,7 @@ namespace sts::lr {
std::abort();
}
Result ILocationResolver::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
Result ILocationResolver::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
std::abort();
}
@ -114,7 +114,7 @@ namespace sts::lr {
std::abort();
}
Result ILocationResolver::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
Result ILocationResolver::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
std::abort();
}

View file

@ -85,15 +85,15 @@ namespace sts::lr {
virtual Result ResolveApplicationHtmlDocumentPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
virtual Result ResolveDataPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
virtual Result RedirectApplicationControlPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
virtual Result RedirectApplicationHtmlDocumentPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
virtual Result ResolveApplicationLegalInformationPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
virtual Result RedirectApplicationLegalInformationPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
virtual Result Refresh();
virtual Result RedirectApplicationProgramPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
virtual Result ClearApplicationRedirectionDeprecated();
virtual Result ClearApplicationRedirection(InBuffer<ncm::TitleId> excluding_tids);
virtual Result EraseProgramRedirection(ncm::TitleId tid);
@ -103,7 +103,7 @@ namespace sts::lr {
virtual Result ResolveProgramPathForDebug(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
virtual Result RedirectProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationProgramPathForDebugDeprecated(InPointer<const Path> path, ncm::TitleId tid);
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
virtual Result EraseProgramRedirectionForDebug(ncm::TitleId tid);
public:
DEFINE_SERVICE_DISPATCH_TABLE {

View file

@ -65,8 +65,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RedirectOnlyLocationResolverInterface::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->app_control_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result RedirectOnlyLocationResolverInterface::RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->app_control_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -75,8 +75,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RedirectOnlyLocationResolverInterface::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->html_docs_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result RedirectOnlyLocationResolverInterface::RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->html_docs_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -93,8 +93,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RedirectOnlyLocationResolverInterface::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->legal_info_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result RedirectOnlyLocationResolverInterface::RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->legal_info_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -112,8 +112,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RedirectOnlyLocationResolverInterface::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->program_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result RedirectOnlyLocationResolverInterface::RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->program_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}
@ -175,8 +175,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RedirectOnlyLocationResolverInterface::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->debug_program_redirector.SetRedirection(tid, title_id_2, *path.pointer, impl::RedirectionFlags_Application);
Result RedirectOnlyLocationResolverInterface::RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->debug_program_redirector.SetRedirection(tid, owner_tid, *path.pointer, impl::RedirectionFlags_Application);
return ResultSuccess;
}

View file

@ -32,15 +32,15 @@ namespace sts::lr {
virtual Result ResolveApplicationHtmlDocumentPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result ResolveDataPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectApplicationControlPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationControlPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result RedirectApplicationHtmlDocumentPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result ResolveApplicationLegalInformationPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectApplicationLegalInformationPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationLegalInformationPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result Refresh() override;
virtual Result RedirectApplicationProgramPathDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result ClearApplicationRedirectionDeprecated() override;
virtual Result ClearApplicationRedirection(InBuffer<ncm::TitleId> excluding_tids) override;
virtual Result EraseProgramRedirection(ncm::TitleId tid) override;
@ -50,7 +50,7 @@ namespace sts::lr {
virtual Result ResolveProgramPathForDebug(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid) override;
virtual Result RedirectProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPathForDebugDeprecated(InPointer<const Path> path, ncm::TitleId tid) override;
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) override;
virtual Result RedirectApplicationProgramPathForDebug(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) override;
virtual Result EraseProgramRedirectionForDebug(ncm::TitleId tid) override;
public:
DEFINE_SERVICE_DISPATCH_TABLE {

View file

@ -28,10 +28,10 @@ namespace sts::lr {
this->program_redirector.ClearRedirections();
}
void RegisteredLocationResolverInterface::RegisterPath(const Path& path, impl::RegisteredLocations<ncm::TitleId, RegisteredLocationResolverInterface::MaxRegisteredLocations>* locations, ncm::TitleId tid, ncm::TitleId title_id_2) {
if (!locations->Register(tid, path, title_id_2)) {
void RegisteredLocationResolverInterface::RegisterPath(const Path& path, impl::RegisteredLocations<ncm::TitleId, RegisteredLocationResolverInterface::MaxRegisteredLocations>* locations, ncm::TitleId tid, ncm::TitleId owner_tid) {
if (!locations->Register(tid, path, owner_tid)) {
locations->Clear();
locations->Register(tid, path, title_id_2);
locations->Register(tid, path, owner_tid);
}
}
@ -75,8 +75,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RegisteredLocationResolverInterface::RegisterProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->RegisterPath(*path.pointer, &this->registered_program_locations, tid, title_id_2);
Result RegisteredLocationResolverInterface::RegisterProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->RegisterPath(*path.pointer, &this->registered_program_locations, tid, owner_tid);
return ResultSuccess;
}
@ -90,8 +90,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RegisteredLocationResolverInterface::RedirectProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->program_redirector.SetRedirection(tid, title_id_2, *path.pointer);
Result RegisteredLocationResolverInterface::RedirectProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->program_redirector.SetRedirection(tid, owner_tid, *path.pointer);
return ResultSuccess;
}
@ -108,8 +108,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RegisteredLocationResolverInterface::RegisterHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->RegisterPath(*path.pointer, &this->registered_html_docs_locations, tid, title_id_2);
Result RegisteredLocationResolverInterface::RegisterHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->RegisterPath(*path.pointer, &this->registered_html_docs_locations, tid, owner_tid);
return ResultSuccess;
}
@ -123,8 +123,8 @@ namespace sts::lr {
return ResultSuccess;
}
Result RegisteredLocationResolverInterface::RedirectHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2) {
this->html_docs_redirector.SetRedirection(tid, title_id_2, *path.pointer);
Result RegisteredLocationResolverInterface::RedirectHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid) {
this->html_docs_redirector.SetRedirection(tid, owner_tid, *path.pointer);
return ResultSuccess;
}

View file

@ -50,7 +50,7 @@ namespace sts::lr {
impl::RegisteredLocations<ncm::TitleId, MaxRegisteredLocations> registered_html_docs_locations;
private:
void ClearRedirections(u32 flags = impl::RedirectionFlags_None);
void RegisterPath(const Path& path, impl::RegisteredLocations<ncm::TitleId, MaxRegisteredLocations>* locations, ncm::TitleId tid, ncm::TitleId title_id_2);
void RegisterPath(const Path& path, impl::RegisteredLocations<ncm::TitleId, MaxRegisteredLocations>* locations, ncm::TitleId tid, ncm::TitleId owner_tid);
bool ResolvePath(Path* out, impl::LocationRedirector* redirector, impl::RegisteredLocations<ncm::TitleId, MaxRegisteredLocations>* locations, ncm::TitleId tid);
Result RefreshImpl(const ncm::TitleId* excluding_tids, size_t num_tids);
public:
@ -59,16 +59,16 @@ namespace sts::lr {
Result ResolveProgramPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
Result RegisterProgramPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
Result RegisterProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
Result RegisterProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
Result UnregisterProgramPath(ncm::TitleId tid);
Result RedirectProgramPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
Result RedirectProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
Result RedirectProgramPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
Result ResolveHtmlDocumentPath(OutPointerWithServerSize<Path, 0x1> out, ncm::TitleId tid);
Result RegisterHtmlDocumentPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
Result RegisterHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
Result RegisterHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
Result UnregisterHtmlDocumentPath(ncm::TitleId tid);
Result RedirectHtmlDocumentPathDeprecated(InPointer<const Path> path, ncm::TitleId tid);
Result RedirectHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId title_id_2);
Result RedirectHtmlDocumentPath(InPointer<const Path> path, ncm::TitleId tid, ncm::TitleId owner_tid);
Result Refresh();
Result RefreshExcluding(InBuffer<ncm::TitleId> tids);
public: