diff options
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/bis_factory.cpp | 3 | ||||
-rw-r--r-- | src/core/file_sys/bis_factory.h | 7 | ||||
-rw-r--r-- | src/core/file_sys/card_image.cpp | 3 | ||||
-rw-r--r-- | src/core/file_sys/card_image.h | 11 | ||||
-rw-r--r-- | src/core/file_sys/content_archive.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/content_archive.h | 8 | ||||
-rw-r--r-- | src/core/file_sys/control_metadata.h | 1 | ||||
-rw-r--r-- | src/core/file_sys/nca_metadata.cpp | 3 | ||||
-rw-r--r-- | src/core/file_sys/nca_metadata.h | 1 | ||||
-rw-r--r-- | src/core/file_sys/program_metadata.cpp | 5 | ||||
-rw-r--r-- | src/core/file_sys/program_metadata.h | 4 | ||||
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 3 | ||||
-rw-r--r-- | src/core/file_sys/registered_cache.h | 11 | ||||
-rw-r--r-- | src/core/file_sys/romfs.h | 1 | ||||
-rw-r--r-- | src/core/file_sys/romfs_factory.cpp | 5 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 1 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.h | 1 |
17 files changed, 51 insertions, 21 deletions
diff --git a/src/core/file_sys/bis_factory.cpp b/src/core/file_sys/bis_factory.cpp index 08a7cea5a..205492897 100644 --- a/src/core/file_sys/bis_factory.cpp +++ b/src/core/file_sys/bis_factory.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include "core/file_sys/bis_factory.h" +#include "core/file_sys/registered_cache.h" namespace FileSys { @@ -13,6 +14,8 @@ BISFactory::BISFactory(VirtualDir nand_root_) usrnand_cache(std::make_shared<RegisteredCache>( GetOrCreateDirectoryRelative(nand_root, "/user/Contents/registered"))) {} +BISFactory::~BISFactory() = default; + std::shared_ptr<RegisteredCache> BISFactory::GetSystemNANDContents() const { return sysnand_cache; } diff --git a/src/core/file_sys/bis_factory.h b/src/core/file_sys/bis_factory.h index a970a5e2e..9523dd864 100644 --- a/src/core/file_sys/bis_factory.h +++ b/src/core/file_sys/bis_factory.h @@ -5,17 +5,20 @@ #pragma once #include <memory> -#include "core/loader/loader.h" -#include "registered_cache.h" + +#include "core/file_sys/vfs.h" namespace FileSys { +class RegisteredCache; + /// File system interface to the Built-In Storage /// This is currently missing accessors to BIS partitions, but seemed like a good place for the NAND /// registered caches. class BISFactory { public: explicit BISFactory(VirtualDir nand_root); + ~BISFactory(); std::shared_ptr<RegisteredCache> GetSystemNANDContents() const; std::shared_ptr<RegisteredCache> GetUserNANDContents() const; diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index d61a2ebe1..ce4423fa6 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -9,6 +9,7 @@ #include "common/logging/log.h" #include "core/file_sys/card_image.h" +#include "core/file_sys/content_archive.h" #include "core/file_sys/partition_filesystem.h" #include "core/file_sys/vfs_offset.h" #include "core/loader/loader.h" @@ -74,6 +75,8 @@ XCI::XCI(VirtualFile file_) : file(std::move(file_)), partitions(0x4) { status = Loader::ResultStatus::Success; } +XCI::~XCI() = default; + Loader::ResultStatus XCI::GetStatus() const { return status; } diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h index 54ab828d1..4f104d18a 100644 --- a/src/core/file_sys/card_image.h +++ b/src/core/file_sys/card_image.h @@ -5,15 +5,21 @@ #pragma once #include <array> +#include <memory> #include <vector> #include "common/common_types.h" #include "common/swap.h" -#include "core/file_sys/content_archive.h" #include "core/file_sys/vfs.h" -#include "core/loader/loader.h" + +namespace Loader { +enum class ResultStatus : u16; +} namespace FileSys { +class NCA; +enum class NCAContentType : u8; + enum class GamecardSize : u8 { S_1GB = 0xFA, S_2GB = 0xF8, @@ -57,6 +63,7 @@ enum class XCIPartition : u8 { Update, Normal, Secure, Logo }; class XCI : public ReadOnlyVfsDirectory { public: explicit XCI(VirtualFile file); + ~XCI() override; Loader::ResultStatus GetStatus() const; Loader::ResultStatus GetProgramNCAStatus() const; diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index e8b5d6ece..7cfb6f36b 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp @@ -3,12 +3,16 @@ // Refer to the license.txt file included. #include <algorithm> +#include <cstring> #include <utility> + #include <boost/optional.hpp> + #include "common/logging/log.h" #include "core/crypto/aes_util.h" #include "core/crypto/ctr_encryption_layer.h" #include "core/file_sys/content_archive.h" +#include "core/file_sys/partition_filesystem.h" #include "core/file_sys/romfs.h" #include "core/file_sys/vfs_offset.h" #include "core/loader/loader.h" diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index b961cfde7..0ea666cac 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h @@ -12,10 +12,12 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" -#include "control_metadata.h" #include "core/crypto/key_manager.h" -#include "core/file_sys/partition_filesystem.h" -#include "core/loader/loader.h" +#include "core/file_sys/vfs.h" + +namespace Loader { +enum class ResultStatus : u16; +} namespace FileSys { diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 8c2cc1a2a..1568046f1 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h @@ -8,6 +8,7 @@ #include <memory> #include <string> #include "common/common_funcs.h" +#include "common/common_types.h" #include "core/file_sys/vfs.h" namespace FileSys { diff --git a/src/core/file_sys/nca_metadata.cpp b/src/core/file_sys/nca_metadata.cpp index 449244444..cdfbc5aaf 100644 --- a/src/core/file_sys/nca_metadata.cpp +++ b/src/core/file_sys/nca_metadata.cpp @@ -3,10 +3,9 @@ // Refer to the license.txt file included. #include <cstring> -#include "common/common_funcs.h" +#include "common/common_types.h" #include "common/logging/log.h" #include "common/swap.h" -#include "content_archive.h" #include "core/file_sys/nca_metadata.h" namespace FileSys { diff --git a/src/core/file_sys/nca_metadata.h b/src/core/file_sys/nca_metadata.h index ce05b4c1d..da5a8dbe8 100644 --- a/src/core/file_sys/nca_metadata.h +++ b/src/core/file_sys/nca_metadata.h @@ -4,7 +4,6 @@ #pragma once -#include <cstring> #include <memory> #include <vector> #include "common/common_funcs.h" diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index 279f987d4..ccb685526 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp @@ -2,7 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/file_util.h" +#include <cstddef> +#include <cstring> +#include <vector> + #include "common/logging/log.h" #include "core/file_sys/program_metadata.h" #include "core/loader/loader.h" diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h index 74a91052b..3c0a49f16 100644 --- a/src/core/file_sys/program_metadata.h +++ b/src/core/file_sys/program_metadata.h @@ -5,12 +5,10 @@ #pragma once #include <array> -#include <string> -#include <vector> #include "common/bit_field.h" #include "common/common_types.h" #include "common/swap.h" -#include "partition_filesystem.h" +#include "core/file_sys/vfs.h" namespace Loader { enum class ResultStatus : u16; diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index fe5d36930..d9decc104 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -8,10 +8,13 @@ #include "common/file_util.h" #include "common/hex_util.h" #include "common/logging/log.h" +#include "core/crypto/key_manager.h" #include "core/file_sys/card_image.h" +#include "core/file_sys/content_archive.h" #include "core/file_sys/nca_metadata.h" #include "core/file_sys/registered_cache.h" #include "core/file_sys/vfs_concat.h" +#include "core/loader/loader.h" namespace FileSys { std::string RegisteredCacheEntry::DebugInfo() const { diff --git a/src/core/file_sys/registered_cache.h b/src/core/file_sys/registered_cache.h index 7b8955dfa..fe2cdc3d9 100644 --- a/src/core/file_sys/registered_cache.h +++ b/src/core/file_sys/registered_cache.h @@ -11,15 +11,18 @@ #include <string> #include <vector> #include <boost/container/flat_map.hpp> -#include "common/common_funcs.h" #include "common/common_types.h" -#include "content_archive.h" -#include "core/file_sys/nca_metadata.h" #include "core/file_sys/vfs.h" namespace FileSys { -class XCI; class CNMT; +class NCA; +class XCI; + +enum class ContentRecordType : u8; +enum class TitleType : u8; + +struct ContentRecord; using NcaID = std::array<u8, 0x10>; using RegisteredCacheParsingFunction = std::function<VirtualFile(const VirtualFile&, const NcaID&)>; diff --git a/src/core/file_sys/romfs.h b/src/core/file_sys/romfs.h index 03a876d22..e54a7d7a9 100644 --- a/src/core/file_sys/romfs.h +++ b/src/core/file_sys/romfs.h @@ -6,6 +6,7 @@ #include <array> #include "common/common_funcs.h" +#include "common/common_types.h" #include "common/swap.h" #include "core/file_sys/vfs.h" diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index eb4e6c865..66f9786e0 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp @@ -2,14 +2,13 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include <algorithm> #include <memory> +#include "common/assert.h" #include "common/common_types.h" #include "common/logging/log.h" -#include "core/file_sys/nca_metadata.h" +#include "core/file_sys/content_archive.h" #include "core/file_sys/registered_cache.h" #include "core/file_sys/romfs_factory.h" -#include "core/hle/kernel/process.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/loader/loader.h" diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 952bd74b3..e437d34e5 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <memory> +#include "common/assert.h" #include "common/common_types.h" #include "common/logging/log.h" #include "core/core.h" diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index c6f9549f0..ba978695b 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h @@ -6,6 +6,7 @@ #include <memory> #include <string> +#include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" #include "core/file_sys/vfs.h" |