summaryrefslogtreecommitdiff
path: root/src/frontend_common
diff options
context:
space:
mode:
authorGravatar t8952024-01-21 19:31:26 -0500
committerGravatar t8952024-01-21 19:31:26 -0500
commit961b5586a5a48a90191eacb0b767e03a7f65abbb (patch)
tree795f1deed2f3312d5cb8370f716150695d74140d /src/frontend_common
parentandroid: Add options to verify installed content (diff)
downloadyuzu-961b5586a5a48a90191eacb0b767e03a7f65abbb.tar.gz
yuzu-961b5586a5a48a90191eacb0b767e03a7f65abbb.tar.xz
yuzu-961b5586a5a48a90191eacb0b767e03a7f65abbb.zip
frontend_common: Remove default value for installer callbacks
We never used these without callbacks and these will break without them in their current state. I could write the default value to return false always but that's unnecessary for now.
Diffstat (limited to 'src/frontend_common')
-rw-r--r--src/frontend_common/content_manager.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/frontend_common/content_manager.h b/src/frontend_common/content_manager.h
index 92276700b..0b0fee73e 100644
--- a/src/frontend_common/content_manager.h
+++ b/src/frontend_common/content_manager.h
@@ -127,14 +127,14 @@ inline bool RemoveMod(const Service::FileSystem::FileSystemController& fs_contro
127 * \param system Raw pointer to the system instance 127 * \param system Raw pointer to the system instance
128 * \param vfs Raw pointer to the VfsFilesystem instance in Core::System 128 * \param vfs Raw pointer to the VfsFilesystem instance in Core::System
129 * \param filename Path to the NSP file 129 * \param filename Path to the NSP file
130 * \param callback Optional callback to report the progress of the installation. The first size_t 130 * \param callback Callback to report the progress of the installation. The first size_t
131 * parameter is the total size of the virtual file and the second is the current progress. If you 131 * parameter is the total size of the virtual file and the second is the current progress. If you
132 * return true to the callback, it will cancel the installation as soon as possible. 132 * return true to the callback, it will cancel the installation as soon as possible.
133 * \return [InstallResult] representing how the installation finished 133 * \return [InstallResult] representing how the installation finished
134 */ 134 */
135inline InstallResult InstallNSP( 135inline InstallResult InstallNSP(Core::System* system, FileSys::VfsFilesystem* vfs,
136 Core::System* system, FileSys::VfsFilesystem* vfs, const std::string& filename, 136 const std::string& filename,
137 const std::function<bool(size_t, size_t)>& callback = std::function<bool(size_t, size_t)>()) { 137 const std::function<bool(size_t, size_t)>& callback) {
138 const auto copy = [callback](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest, 138 const auto copy = [callback](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest,
139 std::size_t block_size) { 139 std::size_t block_size) {
140 if (src == nullptr || dest == nullptr) { 140 if (src == nullptr || dest == nullptr) {
@@ -192,15 +192,15 @@ inline InstallResult InstallNSP(
192 * \param filename Path to the NCA file 192 * \param filename Path to the NCA file
193 * \param registered_cache Raw pointer to the registered cache that the NCA will be installed to 193 * \param registered_cache Raw pointer to the registered cache that the NCA will be installed to
194 * \param title_type Type of NCA package to install 194 * \param title_type Type of NCA package to install
195 * \param callback Optional callback to report the progress of the installation. The first size_t 195 * \param callback Callback to report the progress of the installation. The first size_t
196 * parameter is the total size of the virtual file and the second is the current progress. If you 196 * parameter is the total size of the virtual file and the second is the current progress. If you
197 * return true to the callback, it will cancel the installation as soon as possible. 197 * return true to the callback, it will cancel the installation as soon as possible.
198 * \return [InstallResult] representing how the installation finished 198 * \return [InstallResult] representing how the installation finished
199 */ 199 */
200inline InstallResult InstallNCA( 200inline InstallResult InstallNCA(FileSys::VfsFilesystem* vfs, const std::string& filename,
201 FileSys::VfsFilesystem* vfs, const std::string& filename, 201 FileSys::RegisteredCache* registered_cache,
202 FileSys::RegisteredCache* registered_cache, const FileSys::TitleType title_type, 202 const FileSys::TitleType title_type,
203 const std::function<bool(size_t, size_t)>& callback = std::function<bool(size_t, size_t)>()) { 203 const std::function<bool(size_t, size_t)>& callback) {
204 const auto copy = [callback](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest, 204 const auto copy = [callback](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest,
205 std::size_t block_size) { 205 std::size_t block_size) {
206 if (src == nullptr || dest == nullptr) { 206 if (src == nullptr || dest == nullptr) {
@@ -247,14 +247,14 @@ inline InstallResult InstallNCA(
247 * \brief Verifies the installed contents for a given ManualContentProvider 247 * \brief Verifies the installed contents for a given ManualContentProvider
248 * \param system Raw pointer to the system instance 248 * \param system Raw pointer to the system instance
249 * \param provider Raw pointer to the content provider that's tracking indexed games 249 * \param provider Raw pointer to the content provider that's tracking indexed games
250 * \param callback Optional callback to report the progress of the installation. The first size_t 250 * \param callback Callback to report the progress of the installation. The first size_t
251 * parameter is the total size of the installed contents and the second is the current progress. If 251 * parameter is the total size of the installed contents and the second is the current progress. If
252 * you return true to the callback, it will cancel the installation as soon as possible. 252 * you return true to the callback, it will cancel the installation as soon as possible.
253 * \return A list of entries that failed to install. Returns an empty vector if successful. 253 * \return A list of entries that failed to install. Returns an empty vector if successful.
254 */ 254 */
255inline std::vector<std::string> VerifyInstalledContents( 255inline std::vector<std::string> VerifyInstalledContents(
256 Core::System* system, FileSys::ManualContentProvider* provider, 256 Core::System* system, FileSys::ManualContentProvider* provider,
257 const std::function<bool(size_t, size_t)>& callback = std::function<bool(size_t, size_t)>()) { 257 const std::function<bool(size_t, size_t)>& callback) {
258 // Get content registries. 258 // Get content registries.
259 auto bis_contents = system->GetFileSystemController().GetSystemNANDContents(); 259 auto bis_contents = system->GetFileSystemController().GetSystemNANDContents();
260 auto user_contents = system->GetFileSystemController().GetUserNANDContents(); 260 auto user_contents = system->GetFileSystemController().GetUserNANDContents();
@@ -337,14 +337,14 @@ inline std::vector<std::string> VerifyInstalledContents(
337 * \brief Verifies the contents of a given game 337 * \brief Verifies the contents of a given game
338 * \param system Raw pointer to the system instance 338 * \param system Raw pointer to the system instance
339 * \param game_path Patch to the game file 339 * \param game_path Patch to the game file
340 * \param callback Optional callback to report the progress of the installation. The first size_t 340 * \param callback Callback to report the progress of the installation. The first size_t
341 * parameter is the total size of the installed contents and the second is the current progress. If 341 * parameter is the total size of the installed contents and the second is the current progress. If
342 * you return true to the callback, it will cancel the installation as soon as possible. 342 * you return true to the callback, it will cancel the installation as soon as possible.
343 * \return GameVerificationResult representing how the verification process finished 343 * \return GameVerificationResult representing how the verification process finished
344 */ 344 */
345inline GameVerificationResult VerifyGameContents( 345inline GameVerificationResult VerifyGameContents(
346 Core::System* system, const std::string& game_path, 346 Core::System* system, const std::string& game_path,
347 const std::function<bool(size_t, size_t)>& callback = std::function<bool(size_t, size_t)>()) { 347 const std::function<bool(size_t, size_t)>& callback) {
348 const auto loader = Loader::GetLoader( 348 const auto loader = Loader::GetLoader(
349 *system, system->GetFilesystem()->OpenFile(game_path, FileSys::Mode::Read)); 349 *system, system->GetFilesystem()->OpenFile(game_path, FileSys::Mode::Read));
350 if (loader == nullptr) { 350 if (loader == nullptr) {