diff options
Diffstat (limited to 'sigtools/PluginLoader.h')
-rw-r--r-- | sigtools/PluginLoader.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/sigtools/PluginLoader.h b/sigtools/PluginLoader.h new file mode 100644 index 00000000..ccd14169 --- /dev/null +++ b/sigtools/PluginLoader.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009 Ben Boeckel <MathStuf@gmail.com> + * + * 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 3 of the License, or + * (at your option) 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 SIGTOOLS_PLUGINLOADER +#define SIGTOOLS_PLUGINLOADER + +// Sigtools includes +#include "Global.h" + +// KDE includes +#include <KService> + +// Forward declarations +class KPluginFactory; +namespace Sigencore +{ +class Arena; +class Canvas; +namespace Interfaces +{ +class ArenaPlugin; +class CanvasPlugin; +} +} +namespace Sigscript +{ +class Config; +class GameWrapper; +} + +namespace Sigtools +{ +namespace PluginLoader +{ + SIGTOOLS_EXPORT QStringList availablePlugins(const QString& type, const bool forceLookup = false); + SIGTOOLS_EXPORT KService::Ptr service(const QString& type, const QString& name); + + SIGTOOLS_EXPORT Sigencore::Interfaces::ArenaPlugin* pluginForArena(const QString& arena); + SIGTOOLS_EXPORT Sigencore::Interfaces::CanvasPlugin* pluginForCanvas(const QString& canvas); + + SIGTOOLS_EXPORT Sigencore::Arena* loadArena(const QString& arena, Sigscript::GameWrapper* game, Sigscript::Config* parent); + SIGTOOLS_EXPORT Sigencore::Canvas* loadCanvas(const QString& canvas, Sigscript::GameWrapper* game, Sigscript::Config* parent); +} +} + +#endif |