ncm: update for new 17.0.0 apis

This commit is contained in:
Michael Scire
2023-10-11 12:31:37 -07:00
parent c73520180c
commit 13ee9a83cd
31 changed files with 249 additions and 7 deletions

View File

@@ -918,4 +918,19 @@ namespace ams::ncm {
R_THROW(ncm::ResultInvalidOperation());
}
Result ContentStorageImpl::GetProgramId(sf::Out<ncm::ProgramId> out, ContentId content_id, fs::ContentAttributes attr) {
R_TRY(this->EnsureEnabled());
/* Get the path of the content. */
Path path;
R_TRY(this->GetPath(std::addressof(path), content_id));
/* Obtain the program id for the content. */
ncm::ProgramId program_id;
R_TRY(fs::GetProgramId(std::addressof(program_id), path.str, attr));
out.SetValue(program_id);
R_SUCCEED();
}
}