aboutsummaryrefslogtreecommitdiff
path: root/base/plugins.h
diff options
context:
space:
mode:
authorJordi Vilalta Prat2008-05-13 13:24:49 +0000
committerJordi Vilalta Prat2008-05-13 13:24:49 +0000
commita392bc4b0e860429ec8ba7a79bc6ed4eab8f0335 (patch)
tree7f44a8a4491bce8929015d5c070c971ac8bf8502 /base/plugins.h
parentf7a682edf9c2c9a50cba9b869f447a9781def64b (diff)
downloadscummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.tar.gz
scummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.tar.bz2
scummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.zip
Taken care of FilePluginProvider's FIXMEs
svn-id: r32085
Diffstat (limited to 'base/plugins.h')
-rw-r--r--base/plugins.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/base/plugins.h b/base/plugins.h
index 8c0158a912..92b317498f 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -31,6 +31,9 @@
#include "common/singleton.h"
#include "base/game.h"
+#ifdef DYNAMIC_MODULES
+#include "common/fs.h"
+#endif
/**
* @page pagePlugins An overview of the ScummVM plugin system
@@ -212,6 +215,8 @@ public:
virtual PluginList getPlugins() = 0;
};
+#ifdef DYNAMIC_MODULES
+
/**
* Abstract base class for Plugin factories which load binary code from files.
* Subclasses only have to implement the createPlugin() method, and optionally
@@ -238,24 +243,30 @@ protected:
*
* @param filename the name of the loadable code module
* @return a pointer to a Plugin instance, or 0 if an error occurred.
- *
- * FIXME: Instead of using getPrefix & getSuffix, how about adding a
- * isPluginFilename() class, so that more flexible checks can be performed?
*/
virtual Plugin* createPlugin(const Common::String &filename) const = 0;
- virtual const char* getPrefix() const;
- virtual const char* getSuffix() const;
+ /**
+ * Check if the supplied filename corresponds to a loadable plugin file in
+ * the current platform.
+ *
+ * @param filename the name of the file to check
+ * @return true if the filename corresponds to a plugin, false otherwise
+ */
+ virtual bool isPluginFilename(const Common::String &filename) const;
/**
* Optionally add to the list of directories to be searched for
* plugins by getPlugins().
*
- * FIXME: This should be using FSNodes, not strings!
+ * @param dirs the reference to the list of directories to be used when
+ * searching for plugins.
*/
- virtual void addCustomDirectories(Common::StringList &dirs) const;
+ virtual void addCustomDirectories(FSList &dirs) const;
};
+#endif // DYNAMIC_MODULES
+
/**
* Singleton class which manages all plugins, including loading them,
* managing all Plugin class instances, and unloading them.