aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/base_file_manager.h
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-23 00:14:34 +0200
committerEinar Johan Trøan Sømåen2012-07-23 00:14:34 +0200
commit8b6e4fc7527eb5c56755c068d8c5b75951298fe5 (patch)
tree04c269219d37bd3ebdc4ed0eeb87d9447a52edc1 /engines/wintermute/base/base_file_manager.h
parent4f1b03eac1be560bbaaa3f379ddd4084693df64f (diff)
downloadscummvm-rg350-8b6e4fc7527eb5c56755c068d8c5b75951298fe5.tar.gz
scummvm-rg350-8b6e4fc7527eb5c56755c068d8c5b75951298fe5.tar.bz2
scummvm-rg350-8b6e4fc7527eb5c56755c068d8c5b75951298fe5.zip
WINTERMUTE: Privatize/remove unused/internal functions in BaseFileManager
Diffstat (limited to 'engines/wintermute/base/base_file_manager.h')
-rw-r--r--engines/wintermute/base/base_file_manager.h49
1 files changed, 26 insertions, 23 deletions
diff --git a/engines/wintermute/base/base_file_manager.h b/engines/wintermute/base/base_file_manager.h
index 7799f5193a..b91609bc45 100644
--- a/engines/wintermute/base/base_file_manager.h
+++ b/engines/wintermute/base/base_file_manager.h
@@ -29,8 +29,8 @@
#ifndef WINTERMUTE_BFILEMANAGER_H
#define WINTERMUTE_BFILEMANAGER_H
-#include "engines/wintermute/base/file/base_file_entry.h"
#include "engines/wintermute/base/base.h"
+#include "engines/wintermute/base/file/base_package.h"
#include "common/archive.h"
#include "common/str.h"
#include "common/fs.h"
@@ -41,44 +41,47 @@ class File;
namespace WinterMute {
class BaseFile;
+class BaseFileEntry;
class BaseFileManager: BaseClass {
public:
- bool findPackageSignature(Common::SeekableReadStream *f, uint32 *offset);
bool cleanup();
- bool setBasePath(const Common::String &path);
- bool restoreCurrentDir();
- char *_basePath;
- Common::SeekableReadStream *openFileRaw(const Common::String &filename);
+
bool closeFile(Common::SeekableReadStream *File);
bool hasFile(const Common::String &filename);
Common::SeekableReadStream *openFile(const Common::String &filename, bool absPathWarning = true, bool keepTrackOf = true);
+ Common::SeekableReadStream *loadSaveGame(const Common::String &filename);
+ byte *readWholeFile(const Common::String &filename, uint32 *size = NULL, bool mustExist = true);
+
+ BaseFileManager(BaseGame *inGame = NULL);
+ virtual ~BaseFileManager();
+ // Used only by BasePersistenceManager
+ bool saveFile(const Common::String &filename, byte *buffer, uint32 bufferSize, bool compressed = false, byte *prefixBuffer = NULL, uint32 prefixSize = 0);
+ // Used only for detection
+ bool registerPackages(const Common::FSList &fslist);
+ // Used by BasePackage only
BaseFileEntry *getPackageEntry(const Common::String &filename);
Common::File *openPackage(const Common::String &name);
- bool registerPackages(const Common::FSList &fslist);
- bool registerPackages();
- bool initPaths();
- bool reloadPaths();
+ bool requestCD(int cd, char *packageFile, const char *filename);
+private:
typedef enum {
- PATH_PACKAGE, PATH_SINGLE
+ PATH_PACKAGE,
+ PATH_SINGLE
} TPathType;
+ bool reloadPaths();
+ bool initPaths();
bool addPath(TPathType type, const Common::FSNode &path);
- bool requestCD(int cd, char *packageFile, const char *filename);
- Common::SeekableReadStream *loadSaveGame(const Common::String &filename);
- bool saveFile(const Common::String &filename, byte *buffer, uint32 bufferSize, bool compressed = false, byte *prefixBuffer = NULL, uint32 prefixSize = 0);
- byte *readWholeFile(const Common::String &filename, uint32 *size = NULL, bool mustExist = true);
- BaseFileManager(BaseGame *inGame = NULL);
- virtual ~BaseFileManager();
-// Common::FSList _singlePaths;
+ bool registerPackages();
+ Common::SeekableReadStream *openFileRaw(const Common::String &filename);
Common::FSList _packagePaths;
+// Common::FSList _singlePaths;
+ bool findPackageSignature(Common::SeekableReadStream *f, uint32 *offset);
+ bool registerPackage(Common::SeekableReadStream *stream, const Common::String &filename = "", bool searchSignature = false);
+ bool registerPackage(const Common::String &filename, bool searchSignature = false);
+ bool isValidPackage(const AnsiString &fileName) const;
Common::Array<BasePackage *> _packages;
Common::Array<Common::SeekableReadStream *> _openFiles;
Common::HashMap<Common::String, BaseFileEntry *> _files;
-private:
- bool registerPackage(Common::SeekableReadStream *stream, const Common::String &filename = "", bool searchSignature = false);
- bool registerPackage(const Common::String &filename, bool searchSignature = false);
Common::HashMap<Common::String, BaseFileEntry *>::iterator _filesIter;
- bool isValidPackage(const AnsiString &fileName) const;
-
};
} // end of namespace WinterMute