aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorDavid Corrales2007-07-09 01:26:54 +0000
committerDavid Corrales2007-07-09 01:26:54 +0000
commit1a965aad9568b296545890b7bb61e0de7b052e26 (patch)
tree468cc584fb960d4417780c198172c2761ecd8006 /backends/fs
parent8a36379d55afbfd5e322c1e216a11447a4de8a51 (diff)
downloadscummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.tar.gz
scummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.tar.bz2
scummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.zip
Update the interfaces for the getChildren method to include the hidden flag.
Also added some missing method stubs to the gamecard dc port. svn-id: r27984
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp6
-rw-r--r--backends/fs/dc/dc-fs.cpp6
-rw-r--r--backends/fs/ds/ds-fs.cpp8
-rw-r--r--backends/fs/ds/ds-fs.h7
-rw-r--r--backends/fs/gp32/gp32-fs.cpp7
-rw-r--r--backends/fs/morphos/abox-fs.cpp6
-rw-r--r--backends/fs/palmos/palmos-fs.cpp6
-rw-r--r--backends/fs/ps2/ps2-fs.cpp6
-rw-r--r--backends/fs/psp/psp_fs.cpp6
-rw-r--r--backends/fs/symbian/symbian-fs.cpp6
10 files changed, 44 insertions, 20 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 88af467ae5..3eefd6507e 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -99,7 +99,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
/**
@@ -279,9 +279,11 @@ AbstractFilesystemNode *AmigaOSFilesystemNode::getChild(const String &n) const {
return new AmigaOSFilesystemNode(newPath);
}
-bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
ENTER();
+ //TODO: honor the hidden flag
+
if (!_bIsValid) {
debug(6, "Invalid node");
LEAVE();
diff --git a/backends/fs/dc/dc-fs.cpp b/backends/fs/dc/dc-fs.cpp
index 070c9b075b..e1228c7ff2 100644
--- a/backends/fs/dc/dc-fs.cpp
+++ b/backends/fs/dc/dc-fs.cpp
@@ -67,7 +67,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
@@ -137,9 +137,11 @@ AbstractFilesystemNode *RoninCDFilesystemNode::getChild(const String &n) const {
return new RoninCDFilesystemNode(newPath, true);
}
-bool RoninCDFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool RoninCDFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
+ //TODO: honor the hidden flag
+
DIR *dirp = opendir(_path.c_str());
struct dirent *dp;
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index c0138459a9..11d373ea1e 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -133,10 +133,12 @@ AbstractFilesystemNode *DSFileSystemNode::getChild(const Common::String& n) cons
return NULL;
}
-bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode) const {
+bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool hidden) const {
// consolePrintf("Listdir\n");
// consolePrintf("Directory\n");
+ //TODO: honor the hidden flag
+
char temp[128];
strcpy(temp, _path.c_str());
@@ -283,9 +285,11 @@ AbstractFilesystemNode *GBAMPFileSystemNode::getChild(const Common::String& n) c
return NULL;
}
-bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode) const {
+bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bool hidden) const {
// consolePrintf("Listdir\n");
+ //TODO: honor the hidden flag
+
enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
char temp[128], fname[128], *path, *pathTemp;
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index e3014d0d2e..ead0acc05e 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -91,7 +91,7 @@ public:
*/
virtual AbstractFilesystemNode *clone() const { return new DSFileSystemNode(this); }
virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
/**
@@ -143,18 +143,21 @@ public:
*/
GBAMPFileSystemNode(const GBAMPFileSystemNode *node);
+ virtual bool exists() const { return true; } //FIXME: this is just a stub
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isValid() const { return _isValid; }
+ virtual bool isWritable() const { return true; } //FIXME: this is just a stub
/**
* Returns a copy of this node.
*/
virtual AbstractFilesystemNode *clone() const { return new GBAMPFileSystemNode(this); }
virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp
index 92968b5976..9b839867bc 100644
--- a/backends/fs/gp32/gp32-fs.cpp
+++ b/backends/fs/gp32/gp32-fs.cpp
@@ -53,6 +53,7 @@ public:
*/
GP32FilesystemNode(const String &path);
+ virtual bool exists() const { return true; } //FIXME: this is just a stub
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
virtual String getPath() const { return _path; }
@@ -64,7 +65,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
@@ -193,9 +194,11 @@ AbstractFilesystemNode *GP32FilesystemNode::getChild(const String &n) const {
return new GP32FilesystemNode(newPath);
}
-bool GP32FilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool GP32FilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
+ //TODO: honor the hidden flag
+
GPDIRENTRY dirEntry;
GPFILEATTR attr;
GP32FilesystemNode entry;
diff --git a/backends/fs/morphos/abox-fs.cpp b/backends/fs/morphos/abox-fs.cpp
index 8f46f9a9a8..ef50a11e4e 100644
--- a/backends/fs/morphos/abox-fs.cpp
+++ b/backends/fs/morphos/abox-fs.cpp
@@ -86,7 +86,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &name) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
/**
@@ -250,8 +250,10 @@ AbstractFilesystemNode *ABoxFilesystemNode::getChild(const String &name) const {
return new ABoxFilesystemNode(newPath);
}
-bool ABoxFilesystemNode::getChildren(AbstractFSList &list, ListMode mode) const
+bool ABoxFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const
{
+ //TODO: honor the hidden flag
+
if (!_isValid)
{
debug(6, "listDir() called on invalid node");
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index eae3581196..1e954be2f6 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -66,7 +66,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
private:
@@ -181,7 +181,9 @@ AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const String &n) const {
return new PalmOSFilesystemNode(newPath);
}
-bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
+ //TODO: honor the hidden flag
+
Err error;
Char nameP[256];
FileInfoType desc;
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 9d8e360f64..727e1a894f 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -73,7 +73,7 @@ public:
virtual AbstractFilesystemNode *clone() const { return new Ps2FilesystemNode(this); }
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
@@ -150,7 +150,9 @@ AbstractFilesystemNode *Ps2FilesystemNode::getChild(const String &n) const {
return NULL;
}
-bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode) const {
+bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const {
+ //TODO: honor the hidden flag
+
if (!_isDirectory)
return false;
diff --git a/backends/fs/psp/psp_fs.cpp b/backends/fs/psp/psp_fs.cpp
index 5b0faf3847..019b13e9e6 100644
--- a/backends/fs/psp/psp_fs.cpp
+++ b/backends/fs/psp/psp_fs.cpp
@@ -68,7 +68,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
@@ -128,9 +128,11 @@ AbstractFilesystemNode *PSPFilesystemNode::getChild(const String &n) const {
return new PSPFilesystemNode(newPath, true);
}
-bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
+ //TODO: honor the hidden flag
+
int dfd = sceIoDopen(_path.c_str());
if (dfd > 0) {
SceIoDirent dir;
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 5c3dd74f5c..60693eefb5 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -69,7 +69,7 @@ public:
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};
@@ -163,9 +163,11 @@ AbstractFilesystemNode *SymbianFilesystemNode::getChild(const String &n) const {
return new SymbianFilesystemNode(newPath);
}
-bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode) const {
+bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
+ //TODO: honor the hidden flag
+
if (_isPseudoRoot) {
// Drives enumeration
RFs fs = CEikonEnv::Static()->FsSession();