From 1d61cd446016badb1dd218a2a4692b1e5e3eeb14 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 14 Mar 2015 12:00:01 -0500 Subject: 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. --- src/core/hle/service/fs/archive.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/fs/archive.h') diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index c490327d0..b00f0fd60 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(); -- cgit v1.2.3