nxdumptool/source/core
Pablo Curiel 32c097c055 [ci skip] Add GameCardImageDumpTask and FileWriter classes
GameCardImageDumpTask is a derived class of DataTransferTask, and it's designed to dump a gamecard image using the options selected by the user (which must be passed from a GameCardImageDumpOptionsFrame object). It uses std::optional<std::string> as its return type -- the idea behind this is to return error strings that may later be displayed by an ErrorFrame during the dump process (views not yet implemented).

FileWriter is a class that encapsulates write operations to different storage mediums (SD card, USB host and UMS devices), based on the provided input path. It is used by GameCardImageDumpTask to painlessly write data to the right output storage without explicitly having to implement multiple code paths for all storage types as part of the actual dump code. Furthermore, FileWriter also supports writing split files to FAT-formatted UMS devices if an output file is >= 4 GiB -- part file handling is completely abstracted away from any callers.

Other changes include:

* AsyncTask: rename all class methods to use PascalCase naming.
* AsyncTask: rename get() -> GetResult().

* DataTransferTask: reflect the changes made to AsyncTask.
* DataTransferTask: pause the RepeatingTask right after LoopCallback() returns true instead of pausing it in the cancel/post-execute callbacks.
* DataTransferTask: add private FormatTimeString() method.
* DataTransferTask: remove superfluous override for DoInBackground() -- classes derived from DataTransferTask must provide it on their own, anyway.
* DataTransferTask: add public GetDurationString() method.

* defines: update FAT32_FILESIZE_LIMIT macro to use UINT32_MAX.
* defines: add CONCATENATION_FILE_PART_SIZE macro (used by the new FileWriter class).

* DownloadTask: reflect the changes made to AsyncTask.

* DumpOptionsFrame: file extension is no longer stored as a class member, nor required by the class constructor.
* DumpOptionsFrame: change the return type for GetOutputFilePath() to bool. The method now saves its output to a variable passed by reference.

* GameCardImageDumpOptionsFrame: reflect the changes made to DumpOptionsFrame.

* i18n: update localization strings where applicable.

* nxdt_utils: fix a potential buffer overflow in utilsGetFileSystemStatsByPath().

* OptionsTab: reflect the changes made to AsyncTask.

* usb: add const qualifier to the input buffer required by usbSendFileData().
* usb: add const qualifier to the input buffer required by usbSendNspHeader().
2024-04-25 01:49:04 +02:00
..
aes.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
bfttf.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
bktr.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
cert.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
cnmt.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
config.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
es.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
fs_ext.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
gamecard.c gamecard: add smarter delay to detection thread 2024-04-21 13:27:06 +02:00
hfs.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
http.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
keys.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
legal_info.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
lz4.c Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
mem.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nacp.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nca.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nca_storage.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
npdm.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nso.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_bfsar.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_json.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_log.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_utils.c [ci skip] Add GameCardImageDumpTask and FileWriter classes 2024-04-25 01:49:04 +02:00
pfs.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
program_info.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
romfs.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
rsa.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
save.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
services.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
sha3.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
tik.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
title.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
ums.c [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
usb.c [ci skip] Add GameCardImageDumpTask and FileWriter classes 2024-04-25 01:49:04 +02:00