Other changes include:
* config: remove ConfigChecksumLookupMethod enum.
* config: remove "gamecard/checksum_lookup_method" integer field.
* config: add "gamecard/lookup_checksum" boolean field.
* config: update default configuration file.
* defines: remove all NSWDB macros.
* GameCardImageDumpTask: update class to reflect the changes made to the configuration interface.
* GameCardImageDumpOptionsFrame: update class to reflect the changes made to the configuration interface.
* OptionsTab: remove OptionsTabUpdateFileDialog class.
* OptionsTab: remove "Update NSWDB XML" element.
* i18n: update localization files to reflect the rest of the changes.
Other changes include:
* gamecard: set GameCardStatus_Processing as the current gamecard status before calling gamecardLoadInfo().
* workflow: try to fix the missing commit tag issue.
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().
This commit turns DumpOptionsFrame into a non-polymorphic, non-instantiable class with an overloaded constructor, and moves most of the generic logic from its header file into a proper C++ module.
GameCardImageDumpOptionsFrame is an inherited class of DumpOptionsFrame, which adds the extra option items it needs on its own.
Uses a SelectListItem element with displayValue set to false to avoid displaying a value string. Furthermore, the default click event callback is replaced to check if any UMS devices are mounted before attempting to display the dropdown menu.
Other changes include:
* UmsTask: define UmsDeviceVectorEntry.
* UmsTask: redefine UmsDeviceVector as a UmsDeviceVectorEntry vector.
* UmsTask: migrate UMS device string generation logic from DumpOptionsFrame::UpdateStorages() to UmsTask::PopulateUmsDeviceVector().
* DumpOptionsFrame: simplify UpdateStorages() to reflect the changes made to UmsTask.
* Use forward declarations for type definitions wherever suitable (e.g. NcaContext, BucketTreeContext).
* Replace references to "DumpDestination" with "OutputStorage".
* Replace references to "append key area" with "prepend key area".
* Update LZ4 to v1.9.4.
* Update Material Icons font to 2022-08-01.
* RootView: change USB-related icons, reflect how many UMS devices are currently connected to the console, provide a way for child views to retrieve the populated UMS devices vector.
* Tasks: implement GetUmsDevices().
* Update borealis.
* Update libusbhsfs.
* Begin implementation of a DumpOptionsFrame class to display configurable options before starting a new dump process.
* bktr: rename bktrIsValidSubstorage() to bktrIsValidSubStorage(), use bktrIsValidSubStorage() in bktrInitializeCompressedStorageContext(), fixed a bug in bktrReadCompressedStorage() where Sparse substorages wouldn't be allowed.
* GamecardTab: push a DumpOptionsFrame object onto the view stack if the XCI option is clicked.
Other changes include:
* Codebase: move JSON parsing logic from config.c/h to nxdt_json.c/h.
* Codebase: replace all calls to localtime() with localtime_r() to guarantee thread-safety.
* Codebase: updated todo.txt.
* utils: implement utilsParseGitHubReleaseJsonData(), utilsFreeGitHubReleaseJsonData(), utilsGetApplicationUpdatedState() and utilsGetApplicationUpdatedState().
* utils: add extra logic to move the application's NRO to its proper path if the launch path isn't the right one (commented out at this moment).
* utils: add extra logic to replace the application's NRO at exit (commented out at this moment).
* defines: add DEVOPTAB_SDMC_DEVICE and tweak GitHub URL macros.
* DownloadTask: set percentage to 0 if the download size is unknown.
* DownloadTask: fix ETA string formatting.
* OptionsTab: repurpose OptionsTabUpdateFileDialogContent into OptionsTabUpdateProgress.
* OptionsTab: implement OptionsTabUpdateApplicationFrame.
* RootView: move date formatting into the static GetFormattedDateString() method.
* Makefile: use _GNU_SOURCE as part of CFLAGS to use strptime().
Other changes include:
* utils: utilsGenerateFormattedSizeString() now takes an input double instead of size_t.
* DownloadTask: calculated speed is now expressed in bytes per second, so now it's up to the caller to convert it to other units.
* DownloadTask: set download size and percentage if the download size isn't known and we're dealing with the final chunk.
* http: slightly improved CURL error info formatting.
* OptionsTab: fully implemented NSWDB XML update option.
Only supports GET requests, but that's more than enough for the time being.
Other changes include:
* OptionsTab: added an option to update the NSWDB XML (not implemented yet).
* config: add missing flag check in getters and setters.
* Move default socket initialization from utils.c to services.c.
Other changes include:
* Updated borealis.
* Updated Makefile.
* Began implementation of a (very) simple, CURL-based HTTP handler.
* OptionsTab: added a small disclaimer about dump options.
* OptionsTab: added notifications for the update application item (running as NSO, app already updated).
* config: improved boundary handling while validating integer entries.
* utils: (de)initialize CURL (this will be moved to http.c eventually).