citra-emu
/
citra
Archived
1
0
Fork 0

Service.FS: Rename FileSys::Directory to DirectoryBackend

This commit is contained in:
Yuri Kunde Schlesner 2014-12-15 04:59:29 -02:00
parent 82fe821e87
commit d51afab0bc
10 changed files with 18 additions and 18 deletions

View File

@ -99,7 +99,7 @@ set(HEADERS
file_sys/file.h file_sys/file.h
file_sys/file_romfs.h file_sys/file_romfs.h
file_sys/file_sdmc.h file_sys/file_sdmc.h
file_sys/directory.h file_sys/directory_backend.h
file_sys/directory_romfs.h file_sys/directory_romfs.h
file_sys/directory_sdmc.h file_sys/directory_sdmc.h
hle/kernel/address_arbiter.h hle/kernel/address_arbiter.h

View File

@ -11,7 +11,7 @@
#include "common/bit_field.h" #include "common/bit_field.h"
#include "core/file_sys/file.h" #include "core/file_sys/file.h"
#include "core/file_sys/directory.h" #include "core/file_sys/directory_backend.h"
#include "core/mem_map.h" #include "core/mem_map.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
@ -219,7 +219,7 @@ public:
* @param path Path relative to the archive * @param path Path relative to the archive
* @return Opened directory, or nullptr * @return Opened directory, or nullptr
*/ */
virtual std::unique_ptr<Directory> OpenDirectory(const Path& path) const = 0; virtual std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const = 0;
/** /**
* Read data from the archive * Read data from the archive

View File

@ -78,8 +78,8 @@ bool Archive_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys
* @param path Path relative to the archive * @param path Path relative to the archive
* @return Opened directory, or nullptr * @return Opened directory, or nullptr
*/ */
std::unique_ptr<Directory> Archive_RomFS::OpenDirectory(const Path& path) const { std::unique_ptr<DirectoryBackend> Archive_RomFS::OpenDirectory(const Path& path) const {
return std::unique_ptr<Directory>(new Directory_RomFS); return std::unique_ptr<DirectoryBackend>(new Directory_RomFS);
} }
/** /**

View File

@ -74,7 +74,7 @@ public:
* @param path Path relative to the archive * @param path Path relative to the archive
* @return Opened directory, or nullptr * @return Opened directory, or nullptr
*/ */
std::unique_ptr<Directory> OpenDirectory(const Path& path) const override; std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const override;
/** /**
* Read data from the archive * Read data from the archive

View File

@ -97,12 +97,12 @@ bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys:
* @param path Path relative to the archive * @param path Path relative to the archive
* @return Opened directory, or nullptr * @return Opened directory, or nullptr
*/ */
std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const { std::unique_ptr<DirectoryBackend> Archive_SDMC::OpenDirectory(const Path& path) const {
LOG_DEBUG(Service_FS, "called path=%s", path.DebugStr().c_str()); LOG_DEBUG(Service_FS, "called path=%s", path.DebugStr().c_str());
Directory_SDMC* directory = new Directory_SDMC(this, path); Directory_SDMC* directory = new Directory_SDMC(this, path);
if (!directory->Open()) if (!directory->Open())
return nullptr; return nullptr;
return std::unique_ptr<Directory>(directory); return std::unique_ptr<DirectoryBackend>(directory);
} }
/** /**

View File

@ -78,7 +78,7 @@ public:
* @param path Path relative to the archive * @param path Path relative to the archive
* @return Opened directory, or nullptr * @return Opened directory, or nullptr
*/ */
std::unique_ptr<Directory> OpenDirectory(const Path& path) const override; std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const override;
/** /**
* Read data from the archive * Read data from the archive

View File

@ -36,10 +36,10 @@ static_assert(offsetof(Entry, extension) == 0x216, "Wrong offset for extension i
static_assert(offsetof(Entry, is_archive) == 0x21E, "Wrong offset for is_archive in Entry."); static_assert(offsetof(Entry, is_archive) == 0x21E, "Wrong offset for is_archive in Entry.");
static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size in Entry."); static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size in Entry.");
class Directory : NonCopyable { class DirectoryBackend : NonCopyable {
public: public:
Directory() { } DirectoryBackend() { }
virtual ~Directory() { } virtual ~DirectoryBackend() { }
/** /**
* Open the directory * Open the directory

View File

@ -6,7 +6,7 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/file_sys/directory.h" #include "core/file_sys/directory_backend.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
@ -14,7 +14,7 @@
namespace FileSys { namespace FileSys {
class Directory_RomFS final : public Directory { class Directory_RomFS final : public DirectoryBackend {
public: public:
Directory_RomFS(); Directory_RomFS();
~Directory_RomFS() override; ~Directory_RomFS() override;

View File

@ -7,7 +7,7 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "common/file_util.h" #include "common/file_util.h"
#include "core/file_sys/directory.h" #include "core/file_sys/directory_backend.h"
#include "core/file_sys/archive_sdmc.h" #include "core/file_sys/archive_sdmc.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"
@ -16,7 +16,7 @@
namespace FileSys { namespace FileSys {
class Directory_SDMC final : public Directory { class Directory_SDMC final : public DirectoryBackend {
public: public:
Directory_SDMC(); Directory_SDMC();
Directory_SDMC(const Archive_SDMC* archive, const Path& path); Directory_SDMC(const Archive_SDMC* archive, const Path& path);

View File

@ -10,7 +10,7 @@
#include "core/file_sys/archive_backend.h" #include "core/file_sys/archive_backend.h"
#include "core/file_sys/archive_sdmc.h" #include "core/file_sys/archive_sdmc.h"
#include "core/file_sys/directory.h" #include "core/file_sys/directory_backend.h"
#include "core/hle/service/fs/archive.h" #include "core/hle/service/fs/archive.h"
#include "core/hle/kernel/session.h" #include "core/hle/kernel/session.h"
#include "core/hle/result.h" #include "core/hle/result.h"
@ -186,7 +186,7 @@ public:
std::string GetName() const override { return "Directory: " + path.DebugStr(); } std::string GetName() const override { return "Directory: " + path.DebugStr(); }
FileSys::Path path; ///< Path of the directory FileSys::Path path; ///< Path of the directory
std::unique_ptr<FileSys::Directory> backend; ///< File backend interface std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface
ResultVal<bool> SyncRequest() override { ResultVal<bool> SyncRequest() override {
u32* cmd_buff = Kernel::GetCommandBuffer(); u32* cmd_buff = Kernel::GetCommandBuffer();