aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/fs
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-05-07 11:45:45 -0700
committerGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-05-07 11:45:45 -0700
commit4f4d230dac936f32cceb8be35fe09822d85bb2b6 (patch)
treea180a736708834708e0e5b95fd1720f37722b429 /src/core/hle/service/fs
parent337f1e1b96445b81c40c313b1bf680fe660f14f5 (diff)
parentc956e8a6869d0ee1edd68a6ab880efa6bf1fbe70 (diff)
Merge pull request #721 from yuriks/more-cleanups
More cleanups
Diffstat (limited to 'src/core/hle/service/fs')
-rw-r--r--src/core/hle/service/fs/archive.cpp11
-rw-r--r--src/core/hle/service/fs/archive.h16
-rw-r--r--src/core/hle/service/fs/fs_user.cpp5
3 files changed, 21 insertions, 11 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index b0fd834c..6d4a9c7c 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -9,6 +9,7 @@
#include "common/common_types.h"
#include "common/file_util.h"
+#include "common/logging/log.h"
#include "common/make_unique.h"
#include "common/math_util.h"
@@ -78,6 +79,11 @@ enum class DirectoryCommand : u32 {
Close = 0x08020000,
};
+File::File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path & path)
+ : path(path), priority(0), backend(std::move(backend)) {}
+
+File::~File() {}
+
ResultVal<bool> File::SyncRequest() {
u32* cmd_buff = Kernel::GetCommandBuffer();
FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]);
@@ -172,6 +178,11 @@ ResultVal<bool> File::SyncRequest() {
return MakeResult<bool>(false);
}
+Directory::Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path & path)
+ : path(path), backend(std::move(backend)) {}
+
+Directory::~Directory() {}
+
ResultVal<bool> Directory::SyncRequest() {
u32* cmd_buff = Kernel::GetCommandBuffer();
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 b00f0fd6..faab0cb7 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<FileSys::FileBackend>&& backend, const FileSys::Path& path)
- : path(path), priority(0), backend(std::move(backend)) {
- }
+ File(std::unique_ptr<FileSys::FileBackend>&& backend, const FileSys::Path& path);
+ ~File();
std::string GetName() const override { return "Path: " + path.DebugStr(); }
+ ResultVal<bool> 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<FileSys::FileBackend> backend; ///< File backend interface
-
- ResultVal<bool> SyncRequest() override;
};
class Directory : public Kernel::Session {
public:
- Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path)
- : path(path), backend(std::move(backend)) {
- }
+ Directory(std::unique_ptr<FileSys::DirectoryBackend>&& backend, const FileSys::Path& path);
+ ~Directory();
std::string GetName() const override { return "Directory: " + path.DebugStr(); }
+ ResultVal<bool> SyncRequest() override;
FileSys::Path path; ///< Path of the directory
std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface
-
- ResultVal<bool> SyncRequest() override;
};
/**
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp
index 5bc94b1b..0d2a426b 100644
--- a/src/core/hle/service/fs/fs_user.cpp
+++ b/src/core/hle/service/fs/fs_user.cpp
@@ -2,10 +2,13 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include "common/common.h"
+#include "common/assert.h"
+#include "common/common_types.h"
#include "common/file_util.h"
+#include "common/logging/log.h"
#include "common/scope_exit.h"
#include "common/string_util.h"
+
#include "core/hle/result.h"
#include "core/hle/service/fs/archive.h"
#include "core/hle/service/fs/fs_user.h"