From 5eeb4884c4d22e92733a600eab117ec03aa223e0 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Tue, 31 Mar 2020 20:28:51 +1100 Subject: [PATCH] ncm client: added simplified funcs --- .../include/stratosphere/ncm/ncm_install_task_base.hpp | 2 ++ .../libstratosphere/source/ncm/ncm_install_task_base.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_task_base.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_task_base.hpp index 3731b6472..1b115d266 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_task_base.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_task_base.hpp @@ -140,6 +140,7 @@ namespace ams::ncm { Result Cleanup(); void CleanupProgress(); Result ListContentMetaKey(s32 *out_keys_written, StorageContentMetaKey *out_keys, s32 out_keys_count, s32 offset, ListContentMetaKeyFilter filter); + Result ListContentMetaKey(s32 *out_keys_written, StorageContentMetaKey *out_keys, s32 out_keys_count, s32 offset); Result ListApplicationContentMetaKey(s32 *out_keys_written, ApplicationContentMetaKey *out_keys, s32 out_keys_count, s32 offset); Result Execute(); void StartThroughputMeasurement(); @@ -147,6 +148,7 @@ namespace ams::ncm { Result PrepareAndExecute(); Result VerifyAllNotCommitted(const StorageContentMetaKey *keys, s32 num_keys); Result Commit(const StorageContentMetaKey *keys, s32 num_keys); + Result Commit(); Result IncludesExFatDriver(bool *out); Result IsNewerThanInstalled(bool *out, const ContentMetaKey &key); void ResetLastResult(); diff --git a/libraries/libstratosphere/source/ncm/ncm_install_task_base.cpp b/libraries/libstratosphere/source/ncm/ncm_install_task_base.cpp index c892253f3..6b57cbcfc 100644 --- a/libraries/libstratosphere/source/ncm/ncm_install_task_base.cpp +++ b/libraries/libstratosphere/source/ncm/ncm_install_task_base.cpp @@ -405,6 +405,10 @@ namespace ams::ncm { return ResultSuccess(); } + Result InstallTaskBase::ListContentMetaKey(s32 *out_keys_written, StorageContentMetaKey *out_keys, s32 out_keys_count, s32 offset) { + return this->ListContentMetaKey(out_keys_written, out_keys, out_keys_count, offset, ListContentMetaKeyFilter::All); + } + Result InstallTaskBase::ListApplicationContentMetaKey(s32 *out_keys_written, ApplicationContentMetaKey *out_keys, s32 out_keys_count, s32 offset) { /* Count the number of content meta entries. */ s32 count; @@ -681,6 +685,10 @@ namespace ams::ncm { return ResultSuccess(); } + Result InstallTaskBase::Commit() { + return this->Commit(nullptr, 0); + } + Result InstallTaskBase::IncludesExFatDriver(bool *out) { /* Count the number of content meta entries. */ s32 count;