From 6f89d25f908e6c08e1cf20546b43dc269a93409b Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Wed, 6 May 2015 02:15:46 -0300 Subject: FileSys: Clean-up includes, de-inline destructors --- src/core/hle/service/cfg/cfg.cpp | 5 +++-- src/core/hle/service/fs/archive.cpp | 10 ++++++++++ src/core/hle/service/fs/archive.h | 16 ++++++---------- src/core/hle/service/ptm/ptm.cpp | 3 ++- 4 files changed, 21 insertions(+), 13 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 5eccdecf7..94bac5498 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -4,12 +4,13 @@ #include -#include "core/hle/service/fs/archive.h" -#include "core/hle/service/service.h" +#include "core/file_sys/file_backend.h" #include "core/hle/service/cfg/cfg.h" #include "core/hle/service/cfg/cfg_i.h" #include "core/hle/service/cfg/cfg_s.h" #include "core/hle/service/cfg/cfg_u.h" +#include "core/hle/service/fs/archive.h" +#include "core/hle/service/service.h" namespace Service { namespace CFG { diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index b0fd834c7..a6ed08929 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp @@ -78,6 +78,11 @@ enum class DirectoryCommand : u32 { Close = 0x08020000, }; +File::File(std::unique_ptr&& backend, const FileSys::Path & path) + : path(path), priority(0), backend(std::move(backend)) {} + +File::~File() {} + ResultVal File::SyncRequest() { u32* cmd_buff = Kernel::GetCommandBuffer(); FileCommand cmd = static_cast(cmd_buff[0]); @@ -172,6 +177,11 @@ ResultVal File::SyncRequest() { return MakeResult(false); } +Directory::Directory(std::unique_ptr&& backend, const FileSys::Path & path) + : path(path), backend(std::move(backend)) {} + +Directory::~Directory() {} + ResultVal Directory::SyncRequest() { u32* cmd_buff = Kernel::GetCommandBuffer(); DirectoryCommand cmd = static_cast(cmd_buff[0]); diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index b00f0fd60..faab0cb79 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h @@ -45,31 +45,27 @@ typedef u64 ArchiveHandle; class File : public Kernel::Session { public: - File(std::unique_ptr&& backend, const FileSys::Path& path) - : path(path), priority(0), backend(std::move(backend)) { - } + File(std::unique_ptr&& backend, const FileSys::Path& path); + ~File(); std::string GetName() const override { return "Path: " + path.DebugStr(); } + ResultVal SyncRequest() override; FileSys::Path path; ///< Path of the file u32 priority; ///< Priority of the file. TODO(Subv): Find out what this means std::unique_ptr backend; ///< File backend interface - - ResultVal SyncRequest() override; }; class Directory : public Kernel::Session { public: - Directory(std::unique_ptr&& backend, const FileSys::Path& path) - : path(path), backend(std::move(backend)) { - } + Directory(std::unique_ptr&& backend, const FileSys::Path& path); + ~Directory(); std::string GetName() const override { return "Directory: " + path.DebugStr(); } + ResultVal SyncRequest() override; FileSys::Path path; ///< Path of the directory std::unique_ptr backend; ///< File backend interface - - ResultVal SyncRequest() override; }; /** diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index d44510c1b..6480a323d 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp @@ -2,12 +2,13 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/service/service.h" +#include "core/file_sys/file_backend.h" #include "core/hle/service/fs/archive.h" #include "core/hle/service/ptm/ptm.h" #include "core/hle/service/ptm/ptm_play.h" #include "core/hle/service/ptm/ptm_sysm.h" #include "core/hle/service/ptm/ptm_u.h" +#include "core/hle/service/service.h" namespace Service { namespace PTM { -- cgit v1.2.3