citra-emu
/
citra
Archived
1
0
Fork 0

Service.FS: Rename FileSys::File to FileBackend

This commit is contained in:
Yuri Kunde Schlesner 2014-12-15 05:03:17 -02:00
parent d51afab0bc
commit 0931a42af0
10 changed files with 17 additions and 17 deletions

View File

@ -96,7 +96,7 @@ set(HEADERS
file_sys/archive_backend.h file_sys/archive_backend.h
file_sys/archive_romfs.h file_sys/archive_romfs.h
file_sys/archive_sdmc.h file_sys/archive_sdmc.h
file_sys/file.h file_sys/file_backend.h
file_sys/file_romfs.h file_sys/file_romfs.h
file_sys/file_sdmc.h file_sys/file_sdmc.h
file_sys/directory_backend.h file_sys/directory_backend.h

View File

@ -10,7 +10,7 @@
#include "common/string_util.h" #include "common/string_util.h"
#include "common/bit_field.h" #include "common/bit_field.h"
#include "core/file_sys/file.h" #include "core/file_sys/file_backend.h"
#include "core/file_sys/directory_backend.h" #include "core/file_sys/directory_backend.h"
#include "core/mem_map.h" #include "core/mem_map.h"
@ -175,7 +175,7 @@ public:
* @param mode Mode to open the file with * @param mode Mode to open the file with
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
virtual std::unique_ptr<File> OpenFile(const Path& path, const Mode mode) const = 0; virtual std::unique_ptr<FileBackend> OpenFile(const Path& path, const Mode mode) const = 0;
/** /**
* Delete a file specified by its path * Delete a file specified by its path

View File

@ -29,8 +29,8 @@ Archive_RomFS::~Archive_RomFS() {
* @param mode Mode to open the file with * @param mode Mode to open the file with
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
std::unique_ptr<File> Archive_RomFS::OpenFile(const Path& path, const Mode mode) const { std::unique_ptr<FileBackend> Archive_RomFS::OpenFile(const Path& path, const Mode mode) const {
return std::unique_ptr<File>(new File_RomFS); return std::unique_ptr<FileBackend>(new File_RomFS);
} }
/** /**

View File

@ -30,7 +30,7 @@ public:
* @param mode Mode to open the file with * @param mode Mode to open the file with
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
std::unique_ptr<File> OpenFile(const Path& path, const Mode mode) const override; std::unique_ptr<FileBackend> OpenFile(const Path& path, const Mode mode) const override;
/** /**
* Delete a file specified by its path * Delete a file specified by its path

View File

@ -49,12 +49,12 @@ bool Archive_SDMC::Initialize() {
* @param mode Mode to open the file with * @param mode Mode to open the file with
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const { std::unique_ptr<FileBackend> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const {
LOG_DEBUG(Service_FS, "called path=%s mode=%u", path.DebugStr().c_str(), mode.hex); LOG_DEBUG(Service_FS, "called path=%s mode=%u", path.DebugStr().c_str(), mode.hex);
File_SDMC* file = new File_SDMC(this, path, mode); File_SDMC* file = new File_SDMC(this, path, mode);
if (!file->Open()) if (!file->Open())
return nullptr; return nullptr;
return std::unique_ptr<File>(file); return std::unique_ptr<FileBackend>(file);
} }
/** /**

View File

@ -34,7 +34,7 @@ public:
* @param mode Mode to open the file with * @param mode Mode to open the file with
* @return Opened file, or nullptr * @return Opened file, or nullptr
*/ */
std::unique_ptr<File> OpenFile(const Path& path, const Mode mode) const override; std::unique_ptr<FileBackend> OpenFile(const Path& path, const Mode mode) const override;
/** /**
* Delete a file specified by its path * Delete a file specified by its path

View File

@ -13,10 +13,10 @@
namespace FileSys { namespace FileSys {
class File : NonCopyable { class FileBackend : NonCopyable {
public: public:
File() { } FileBackend() { }
virtual ~File() { } virtual ~FileBackend() { }
/** /**
* Open the file * Open the file

View File

@ -6,7 +6,7 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/file_sys/file.h" #include "core/file_sys/file_backend.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
@ -14,7 +14,7 @@
namespace FileSys { namespace FileSys {
class File_RomFS final : public File { class File_RomFS final : public FileBackend {
public: public:
File_RomFS(); File_RomFS();
~File_RomFS() override; ~File_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/file.h" #include "core/file_sys/file_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 File_SDMC final : public File { class File_SDMC final : public FileBackend {
public: public:
File_SDMC(); File_SDMC();
File_SDMC(const Archive_SDMC* archive, const Path& path, const Mode mode); File_SDMC(const Archive_SDMC* archive, const Path& path, const Mode mode);

View File

@ -112,7 +112,7 @@ public:
std::string GetName() const override { return "Path: " + path.DebugStr(); } std::string GetName() const override { return "Path: " + path.DebugStr(); }
FileSys::Path path; ///< Path of the file FileSys::Path path; ///< Path of the file
std::unique_ptr<FileSys::File> backend; ///< File backend interface std::unique_ptr<FileSys::FileBackend> backend; ///< File backend interface
ResultVal<bool> SyncRequest() override { ResultVal<bool> SyncRequest() override {
u32* cmd_buff = Kernel::GetCommandBuffer(); u32* cmd_buff = Kernel::GetCommandBuffer();