diff options
author | Subv <subv2112@gmail.com> | 2015-03-14 12:00:01 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-03-14 12:00:01 -0500 |
commit | 1d61cd446016badb1dd218a2a4692b1e5e3eeb14 (patch) | |
tree | 1900da40954404556fa05ed85be22537e500b740 /src/core/hle/service/fs/archive.h | |
parent | ed5b275d21612906e6eeb4b1f344aa0f1eb31c10 (diff) |
Services/FS: Implemented DeleteExtSaveData, CreateSystemSaveData and DeleteSystemSaveData
Also fixed a bug with CreateExtSaveData that made it unable to create ExtSaveData archives in the SDMC directory.
Diffstat (limited to 'src/core/hle/service/fs/archive.h')
-rw-r--r-- | src/core/hle/service/fs/archive.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index c490327d..b00f0fd6 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h @@ -35,6 +35,12 @@ enum class ArchiveIdCode : u32 { SaveDataCheck = 0x2345678A, }; +/// Media types for the archives +enum class MediaType : u32 { + NAND = 0, + SDMC = 1 +}; + typedef u64 ArchiveHandle; class File : public Kernel::Session { @@ -172,11 +178,37 @@ ResultCode FormatArchive(ArchiveIdCode id_code, const FileSys::Path& path = File /** * Creates a blank SharedExtSaveData archive for the specified extdata ID + * @param media_type The media type of the archive to create (NAND / SDMC) * @param high The high word of the extdata id to create * @param low The low word of the extdata id to create * @return ResultCode 0 on success or the corresponding code on error */ -ResultCode CreateExtSaveData(u32 high, u32 low); +ResultCode CreateExtSaveData(MediaType media_type, u32 high, u32 low); + +/** + * Deletes the SharedExtSaveData archive for the specified extdata ID + * @param media_type The media type of the archive to delete (NAND / SDMC) + * @param high The high word of the extdata id to delete + * @param low The low word of the extdata id to delete + * @return ResultCode 0 on success or the corresponding code on error + */ +ResultCode DeleteExtSaveData(MediaType media_type, u32 high, u32 low); + +/** + * Deletes the SystemSaveData archive folder for the specified save data id + * @param high The high word of the SystemSaveData archive to delete + * @param low The low word of the SystemSaveData archive to delete + * @return ResultCode 0 on success or the corresponding code on error + */ +ResultCode DeleteSystemSaveData(u32 high, u32 low); + +/** + * Creates the SystemSaveData archive folder for the specified save data id + * @param high The high word of the SystemSaveData archive to create + * @param low The low word of the SystemSaveData archive to create + * @return ResultCode 0 on success or the corresponding code on error + */ +ResultCode CreateSystemSaveData(u32 high, u32 low); /// Initialize archives void ArchiveInit(); |