aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/fs/archive.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/fs/archive.h')
-rw-r--r--src/core/hle/service/fs/archive.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h
index b3f2134f..ab5ea4da 100644
--- a/src/core/hle/service/fs/archive.h
+++ b/src/core/hle/service/fs/archive.h
@@ -15,6 +15,10 @@ extern const std::string SYSTEM_ID;
/// The scrambled SD card CID, also known as ID1
extern const std::string SDCARD_ID;
+namespace Kernel {
+ class Session;
+}
+
namespace Service {
namespace FS {
@@ -42,7 +46,7 @@ ResultVal<ArchiveHandle> OpenArchive(ArchiveIdCode id_code, FileSys::Path& archi
/**
* Closes an archive
- * @param id_code IdCode of the archive to open
+ * @param handle Handle to the archive to close
*/
ResultCode CloseArchive(ArchiveHandle handle);
@@ -58,9 +62,10 @@ ResultCode CreateArchive(std::unique_ptr<FileSys::ArchiveBackend>&& backend, Arc
* @param archive_handle Handle to an open Archive object
* @param path Path to the File inside of the Archive
* @param mode Mode under which to open the File
- * @return Handle to the opened File object
+ * @return The opened File object as a Session
*/
-ResultVal<Handle> OpenFileFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path, const FileSys::Mode mode);
+ResultVal<Kernel::SharedPtr<Kernel::Session>> OpenFileFromArchive(ArchiveHandle archive_handle,
+ const FileSys::Path& path, const FileSys::Mode mode);
/**
* Delete a File from an Archive
@@ -121,9 +126,10 @@ ResultCode RenameDirectoryBetweenArchives(ArchiveHandle src_archive_handle, cons
* Open a Directory from an Archive
* @param archive_handle Handle to an open Archive object
* @param path Path to the Directory inside of the Archive
- * @return Handle to the opened File object
+ * @return The opened Directory object as a Session
*/
-ResultVal<Handle> OpenDirectoryFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path);
+ResultVal<Kernel::SharedPtr<Kernel::Session>> OpenDirectoryFromArchive(ArchiveHandle archive_handle,
+ const FileSys::Path& path);
/**
* Creates a blank SaveData archive.
@@ -131,6 +137,14 @@ ResultVal<Handle> OpenDirectoryFromArchive(ArchiveHandle archive_handle, const F
*/
ResultCode FormatSaveData();
+/**
+ * Creates a blank SharedExtSaveData archive for the specified extdata ID
+ * @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);
+
/// Initialize archives
void ArchiveInit();