summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfs.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-04 00:27:54 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-04 01:12:19 +0300
commit79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00 (patch)
treef9669ee10e2ea3f2c41abaa84830da9efe7f9411 /src/fs/virtfs/virtfs.h
parenta6c70dd1f32c38cc81cfd4b28f929d7c13d86db1 (diff)
downloadplus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.gz
plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.bz2
plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.xz
plus-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.zip
Reimplement VirtFs in correct way. Now all tests should pass.
Diffstat (limited to 'src/fs/virtfs/virtfs.h')
-rw-r--r--src/fs/virtfs/virtfs.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfs.h b/src/fs/virtfs/virtfs.h
new file mode 100644
index 000000000..bf05b7f90
--- /dev/null
+++ b/src/fs/virtfs/virtfs.h
@@ -0,0 +1,51 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2013-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTILS_FS_VIRTFS_VIRTFS_H
+#define UTILS_FS_VIRTFS_VIRTFS_H
+
+#include "enums/simpletypes/append.h"
+
+#include "localconsts.h"
+
+#include <string>
+#include <vector>
+
+struct VirtFsEntry;
+
+namespace VirtFs
+{
+ bool addDirToSearchPathInternal(const std::string &restrict newDir,
+ const Append append);
+ bool removeDirFromSearchPathInternal(std::string oldDir);
+ std::vector<VirtFsEntry*> &getEntries();
+ VirtFsEntry *searchEntryByRootInternal(const std::string &restrict
+ root);
+ VirtFsEntry *searchEntryInternal(const std::string &restrict root,
+ const FsEntryType type);
+ void addEntry(VirtFsEntry *const entry,
+ const Append append);
+#ifdef UNITTESTS
+ bool addDirToSearchPathSilent2(std::string newDir,
+ const Append append);
+#endif // UNITTESTS
+} // namespace VirtFs
+
+#endif // UTILS_FS_VIRTFS_VIRTFS_H