aboutsummaryrefslogtreecommitdiff
path: root/backends/plugins
diff options
context:
space:
mode:
authorMax Horn2008-09-30 16:34:38 +0000
committerMax Horn2008-09-30 16:34:38 +0000
commit73b833042e55959954d78b3e6aa2cc89c5b8848d (patch)
tree6084627a0c643a514186b2cbef439b971c322e22 /backends/plugins
parent1d7de023d938078767a7c5b478769d5a4f308721 (diff)
downloadscummvm-rg350-73b833042e55959954d78b3e6aa2cc89c5b8848d.tar.gz
scummvm-rg350-73b833042e55959954d78b3e6aa2cc89c5b8848d.tar.bz2
scummvm-rg350-73b833042e55959954d78b3e6aa2cc89c5b8848d.zip
Modified FilePluginProvider to use FSNodes (instead of raw filenames / paths) in its API
svn-id: r34709
Diffstat (limited to 'backends/plugins')
-rw-r--r--backends/plugins/dc/dc-provider.cpp8
-rw-r--r--backends/plugins/dc/dc-provider.h4
-rw-r--r--backends/plugins/posix/posix-provider.cpp5
-rw-r--r--backends/plugins/posix/posix-provider.h2
-rw-r--r--backends/plugins/sdl/sdl-provider.cpp5
-rw-r--r--backends/plugins/sdl/sdl-provider.h2
-rw-r--r--backends/plugins/win32/win32-provider.cpp8
-rw-r--r--backends/plugins/win32/win32-provider.h4
8 files changed, 22 insertions, 16 deletions
diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp
index 9b150c8db4..742683d7fb 100644
--- a/backends/plugins/dc/dc-provider.cpp
+++ b/backends/plugins/dc/dc-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/dc/dc-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "dcloader.h"
@@ -83,12 +84,13 @@ public:
};
-Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const {
- return new DCPlugin(filename);
+Plugin* DCPluginProvider::createPlugin(const Common::FilesystemNode &node) const {
+ return new DCPlugin(node.getPath());
}
-bool DCPluginProvider::isPluginFilename(const Common::String &filename) const {
+bool DCPluginProvider::isPluginFilename(const Common::FilesystemNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".PLG"))
return false;
diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h
index f413061828..7a204698b8 100644
--- a/backends/plugins/dc/dc-provider.h
+++ b/backends/plugins/dc/dc-provider.h
@@ -32,9 +32,9 @@
class DCPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FilesystemNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FilesystemNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {
dirs.push_back("/");
diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp
index 39847e53bf..ec67e5768a 100644
--- a/backends/plugins/posix/posix-provider.cpp
+++ b/backends/plugins/posix/posix-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/posix/posix-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <dlfcn.h>
@@ -78,8 +79,8 @@ public:
};
-Plugin* POSIXPluginProvider::createPlugin(const Common::String &filename) const {
- return new POSIXPlugin(filename);
+Plugin* POSIXPluginProvider::createPlugin(const Common::FilesystemNode &node) const {
+ return new POSIXPlugin(node.getPath());
}
diff --git a/backends/plugins/posix/posix-provider.h b/backends/plugins/posix/posix-provider.h
index 40c16b3e11..6cdc0f44d4 100644
--- a/backends/plugins/posix/posix-provider.h
+++ b/backends/plugins/posix/posix-provider.h
@@ -32,7 +32,7 @@
class POSIXPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FilesystemNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp
index 6df1dec680..221292e2dd 100644
--- a/backends/plugins/sdl/sdl-provider.cpp
+++ b/backends/plugins/sdl/sdl-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "SDL.h"
#include "SDL_loadso.h"
@@ -78,8 +79,8 @@ public:
};
-Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const {
- return new SDLPlugin(filename);
+Plugin* SDLPluginProvider::createPlugin(const Common::FilesystemNode &node) const {
+ return new SDLPlugin(node.getPath());
}
diff --git a/backends/plugins/sdl/sdl-provider.h b/backends/plugins/sdl/sdl-provider.h
index a9ec657e33..27fb446146 100644
--- a/backends/plugins/sdl/sdl-provider.h
+++ b/backends/plugins/sdl/sdl-provider.h
@@ -32,7 +32,7 @@
class SDLPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FilesystemNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index b8fdd3d802..0309d306af 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/win32/win32-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <windows.h>
@@ -96,12 +97,13 @@ public:
};
-Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const {
- return new Win32Plugin(filename);
+Plugin* Win32PluginProvider::createPlugin(const Common::FilesystemNode &node) const {
+ return new Win32Plugin(node.getPath());
}
-bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const {
+bool Win32PluginProvider::isPluginFilename(const Common::FilesystemNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".dll"))
return false;
diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h
index 4ddc8b7500..1a14c15c14 100644
--- a/backends/plugins/win32/win32-provider.h
+++ b/backends/plugins/win32/win32-provider.h
@@ -32,9 +32,9 @@
class Win32PluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FilesystemNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FilesystemNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {}
};