summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-05-06 02:15:46 -0300
committerGravatar Yuri Kunde Schlesner2015-05-06 23:45:06 -0300
commit6f89d25f908e6c08e1cf20546b43dc269a93409b (patch)
tree75794cffbb83049401e50741d55fe3b38115e521 /src/core/hle
parentMove typedefs from kernel.h to more appropriate places (diff)
downloadyuzu-6f89d25f908e6c08e1cf20546b43dc269a93409b.tar.gz
yuzu-6f89d25f908e6c08e1cf20546b43dc269a93409b.tar.xz
yuzu-6f89d25f908e6c08e1cf20546b43dc269a93409b.zip
FileSys: Clean-up includes, de-inline destructors
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/cfg/cfg.cpp5
-rw-r--r--src/core/hle/service/fs/archive.cpp10
-rw-r--r--src/core/hle/service/fs/archive.h16
-rw-r--r--src/core/hle/service/ptm/ptm.cpp3
4 files changed, 21 insertions, 13 deletions
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 @@
4 4
5#include <algorithm> 5#include <algorithm>
6 6
7#include "core/hle/service/fs/archive.h" 7#include "core/file_sys/file_backend.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/cfg/cfg.h" 8#include "core/hle/service/cfg/cfg.h"
10#include "core/hle/service/cfg/cfg_i.h" 9#include "core/hle/service/cfg/cfg_i.h"
11#include "core/hle/service/cfg/cfg_s.h" 10#include "core/hle/service/cfg/cfg_s.h"
12#include "core/hle/service/cfg/cfg_u.h" 11#include "core/hle/service/cfg/cfg_u.h"
12#include "core/hle/service/fs/archive.h"
13#include "core/hle/service/service.h"
13 14
14namespace Service { 15namespace Service {
15namespace CFG { 16namespace 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 {
78 Close = 0x08020000, 78 Close = 0x08020000,
79}; 79};
80 80
81File::File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path & path)
82 : path(path), priority(0), backend(std::move(backend)) {}
83
84File::~File() {}
85
81ResultVal<bool> File::SyncRequest() { 86ResultVal<bool> File::SyncRequest() {
82 u32* cmd_buff = Kernel::GetCommandBuffer(); 87 u32* cmd_buff = Kernel::GetCommandBuffer();
83 FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); 88 FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]);
@@ -172,6 +177,11 @@ ResultVal<bool> File::SyncRequest() {
172 return MakeResult<bool>(false); 177 return MakeResult<bool>(false);
173} 178}
174 179
180Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path & path)
181 : path(path), backend(std::move(backend)) {}
182
183Directory::~Directory() {}
184
175ResultVal<bool> Directory::SyncRequest() { 185ResultVal<bool> Directory::SyncRequest() {
176 u32* cmd_buff = Kernel::GetCommandBuffer(); 186 u32* cmd_buff = Kernel::GetCommandBuffer();
177 DirectoryCommand cmd = static_cast<DirectoryCommand>(cmd_buff[0]); 187 DirectoryCommand cmd = static_cast<DirectoryCommand>(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;
45 45
46class File : public Kernel::Session { 46class File : public Kernel::Session {
47public: 47public:
48 File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path) 48 File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path);
49 : path(path), priority(0), backend(std::move(backend)) { 49 ~File();
50 }
51 50
52 std::string GetName() const override { return "Path: " + path.DebugStr(); } 51 std::string GetName() const override { return "Path: " + path.DebugStr(); }
52 ResultVal<bool> SyncRequest() override;
53 53
54 FileSys::Path path; ///< Path of the file 54 FileSys::Path path; ///< Path of the file
55 u32 priority; ///< Priority of the file. TODO(Subv): Find out what this means 55 u32 priority; ///< Priority of the file. TODO(Subv): Find out what this means
56 std::unique_ptr<FileSys::FileBackend> backend; ///< File backend interface 56 std::unique_ptr<FileSys::FileBackend> backend; ///< File backend interface
57
58 ResultVal<bool> SyncRequest() override;
59}; 57};
60 58
61class Directory : public Kernel::Session { 59class Directory : public Kernel::Session {
62public: 60public:
63 Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path) 61 Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path);
64 : path(path), backend(std::move(backend)) { 62 ~Directory();
65 }
66 63
67 std::string GetName() const override { return "Directory: " + path.DebugStr(); } 64 std::string GetName() const override { return "Directory: " + path.DebugStr(); }
65 ResultVal<bool> SyncRequest() override;
68 66
69 FileSys::Path path; ///< Path of the directory 67 FileSys::Path path; ///< Path of the directory
70 std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface 68 std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface
71
72 ResultVal<bool> SyncRequest() override;
73}; 69};
74 70
75/** 71/**
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 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/service.h" 5#include "core/file_sys/file_backend.h"
6#include "core/hle/service/fs/archive.h" 6#include "core/hle/service/fs/archive.h"
7#include "core/hle/service/ptm/ptm.h" 7#include "core/hle/service/ptm/ptm.h"
8#include "core/hle/service/ptm/ptm_play.h" 8#include "core/hle/service/ptm/ptm_play.h"
9#include "core/hle/service/ptm/ptm_sysm.h" 9#include "core/hle/service/ptm/ptm_sysm.h"
10#include "core/hle/service/ptm/ptm_u.h" 10#include "core/hle/service/ptm/ptm_u.h"
11#include "core/hle/service/service.h"
11 12
12namespace Service { 13namespace Service {
13namespace PTM { 14namespace PTM {