diff options
| author | 2014-11-24 15:31:53 -0500 | |
|---|---|---|
| committer | 2014-11-24 15:31:53 -0500 | |
| commit | bb730855e58d18d8964d158a55822c40503d548f (patch) | |
| tree | 9c3ff113839583d1deca837e9888d81f25d485a0 /src/core/hle/kernel/archive.h | |
| parent | Merge pull request #191 from archshift/deletexyz (diff) | |
| parent | Use pointers instead of passing handles around in some functions. (diff) | |
| download | yuzu-bb730855e58d18d8964d158a55822c40503d548f.tar.gz yuzu-bb730855e58d18d8964d158a55822c40503d548f.tar.xz yuzu-bb730855e58d18d8964d158a55822c40503d548f.zip | |
Merge pull request #147 from yuriks/error-codes
Error codes
Diffstat (limited to 'src/core/hle/kernel/archive.h')
| -rw-r--r-- | src/core/hle/kernel/archive.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/core/hle/kernel/archive.h b/src/core/hle/kernel/archive.h index 95b3c6656..6fc4f0f25 100644 --- a/src/core/hle/kernel/archive.h +++ b/src/core/hle/kernel/archive.h | |||
| @@ -6,8 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | 8 | ||
| 9 | #include "core/hle/kernel/kernel.h" | ||
| 10 | #include "core/file_sys/archive.h" | 9 | #include "core/file_sys/archive.h" |
| 10 | #include "core/hle/kernel/kernel.h" | ||
| 11 | #include "core/hle/result.h" | ||
| 11 | 12 | ||
| 12 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 13 | // Kernel namespace | 14 | // Kernel namespace |
| @@ -17,33 +18,31 @@ namespace Kernel { | |||
| 17 | /** | 18 | /** |
| 18 | * Opens an archive | 19 | * Opens an archive |
| 19 | * @param id_code IdCode of the archive to open | 20 | * @param id_code IdCode of the archive to open |
| 20 | * @return Handle to archive if it exists, otherwise a null handle (0) | 21 | * @return Handle to the opened archive |
| 21 | */ | 22 | */ |
| 22 | Handle OpenArchive(FileSys::Archive::IdCode id_code); | 23 | ResultVal<Handle> OpenArchive(FileSys::Archive::IdCode id_code); |
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| 25 | * Closes an archive | 26 | * Closes an archive |
| 26 | * @param id_code IdCode of the archive to open | 27 | * @param id_code IdCode of the archive to open |
| 27 | * @return true if it worked fine | ||
| 28 | */ | 28 | */ |
| 29 | Result CloseArchive(FileSys::Archive::IdCode id_code); | 29 | ResultCode CloseArchive(FileSys::Archive::IdCode id_code); |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | * Creates an Archive | 32 | * Creates an Archive |
| 33 | * @param backend File system backend interface to the archive | 33 | * @param backend File system backend interface to the archive |
| 34 | * @param name Optional name of Archive | 34 | * @param name Name of Archive |
| 35 | * @return Handle to newly created Archive object | ||
| 36 | */ | 35 | */ |
| 37 | Handle CreateArchive(FileSys::Archive* backend, const std::string& name); | 36 | ResultCode CreateArchive(FileSys::Archive* backend, const std::string& name); |
| 38 | 37 | ||
| 39 | /** | 38 | /** |
| 40 | * Open a File from an Archive | 39 | * Open a File from an Archive |
| 41 | * @param archive_handle Handle to an open Archive object | 40 | * @param archive_handle Handle to an open Archive object |
| 42 | * @param path Path to the File inside of the Archive | 41 | * @param path Path to the File inside of the Archive |
| 43 | * @param mode Mode under which to open the File | 42 | * @param mode Mode under which to open the File |
| 44 | * @return Opened File object | 43 | * @return Handle to the opened File object |
| 45 | */ | 44 | */ |
| 46 | Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode); | 45 | ResultVal<Handle> OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode); |
| 47 | 46 | ||
| 48 | /** | 47 | /** |
| 49 | * Delete a File from an Archive | 48 | * Delete a File from an Archive |
| @@ -73,9 +72,9 @@ Result CreateDirectoryFromArchive(Handle archive_handle, const FileSys::Path& pa | |||
| 73 | * Open a Directory from an Archive | 72 | * Open a Directory from an Archive |
| 74 | * @param archive_handle Handle to an open Archive object | 73 | * @param archive_handle Handle to an open Archive object |
| 75 | * @param path Path to the Directory inside of the Archive | 74 | * @param path Path to the Directory inside of the Archive |
| 76 | * @return Opened Directory object | 75 | * @return Handle to the opened File object |
| 77 | */ | 76 | */ |
| 78 | Handle OpenDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path); | 77 | ResultVal<Handle> OpenDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path); |
| 79 | 78 | ||
| 80 | /// Initialize archives | 79 | /// Initialize archives |
| 81 | void ArchiveInit(); | 80 | void ArchiveInit(); |