summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_backend.h
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-18 02:38:01 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-18 02:38:01 +0200
commitdc8479928c5aee4c6ad6fe4f59006fb604cee701 (patch)
tree569a7f13128450bbab973236615587ff00bced5f /src/core/file_sys/archive_backend.h
parentTravis: Import Dolphin’s clang-format hook. (diff)
downloadyuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.gz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.bz2
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.lz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.xz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.zst
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/archive_backend.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h
index 5d91e47f3..79fde9710 100644
--- a/src/core/file_sys/archive_backend.h
+++ b/src/core/file_sys/archive_backend.h
@@ -15,20 +15,13 @@
#include "core/hle/result.h"
-
namespace FileSys {
class FileBackend;
class DirectoryBackend;
// Path string type
-enum LowPathType : u32 {
- Invalid = 0,
- Empty = 1,
- Binary = 2,
- Char = 3,
- Wchar = 4
-};
+enum LowPathType : u32 { Invalid = 0, Empty = 1, Binary = 2, Char = 3, Wchar = 4 };
union Mode {
u32 hex;
@@ -39,12 +32,17 @@ union Mode {
class Path {
public:
- Path() : type(Invalid) {}
- Path(const char* path) : type(Char), string(path) {}
- Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {}
+ Path() : type(Invalid) {
+ }
+ Path(const char* path) : type(Char), string(path) {
+ }
+ Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {
+ }
Path(LowPathType type, u32 size, u32 pointer);
- LowPathType GetType() const { return type; }
+ LowPathType GetType() const {
+ return type;
+ }
/**
* Gets the string representation of the path for debugging
@@ -64,10 +62,14 @@ private:
};
struct ArchiveFormatInfo {
- u32_le total_size; ///< The pre-defined size of the archive, as specified in the Create or Format call
- u32_le number_directories; ///< The pre-defined number of directories in the archive, as specified in the Create or Format call
- u32_le number_files; ///< The pre-defined number of files in the archive, as specified in the Create or Format call
- u8 duplicate_data; ///< Whether the archive should duplicate the data, as specified in the Create or Format call
+ u32_le total_size; ///< The pre-defined size of the archive, as specified in the Create or
+ /// Format call
+ u32_le number_directories; ///< The pre-defined number of directories in the archive, as
+ /// specified in the Create or Format call
+ u32_le number_files; ///< The pre-defined number of files in the archive, as specified in the
+ /// Create or Format call
+ u8 duplicate_data; ///< Whether the archive should duplicate the data, as specified in the
+ /// Create or Format call
};
static_assert(std::is_pod<ArchiveFormatInfo>::value, "ArchiveFormatInfo is not POD");
@@ -87,7 +89,8 @@ public:
* @param mode Mode to open the file with
* @return Opened file, or error code
*/
- virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path, const Mode mode) const = 0;
+ virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path,
+ const Mode mode) const = 0;
/**
* Delete a file specified by its path