3
* Copyright (C) 2013 Jacky Alcine <jacky.alcine@thesii.org>
5
* This file is part of Wintermute, the extensible AI platform.
8
* Wintermute is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
13
* Wintermute is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with Wintermute. If not, see <http://www.gnu.org/licenses/>.
23
#include "pluginprivate.hpp"
24
#include "version.hpp"
25
#include "logging.hpp"
26
#include "factory.hpp"
27
#include "application.hpp"
28
#include <QtCore/QPluginLoader>
30
using Wintermute::Version;
31
using Wintermute::Plugin;
32
using Wintermute::PluginPrivate;
33
using Wintermute::Logging;
34
using Wintermute::Logger;
36
PluginPrivate::PluginPrivate(const QUuid& uuid) : id(uuid){
40
PluginPrivate::loadBinary(){
45
PluginPrivate::unloadBinary(){
50
PluginPrivate::tryLoad(){
55
PluginPrivate::invokeUnload(){
60
PluginPrivate::getPluginInstance(){
64
PluginPrivate::~PluginPrivate(){
67
// TODO: Check if loading in its own space, if so, load necessary data.
68
Plugin::Plugin(const QString& uuid) : QObject(Factory::instance()), d_ptr(new PluginPrivate(uuid)){
71
// TODO: Provide a means of obtaining a name for plug-ins.
73
Plugin::name() const {
77
// TODO: Provide a means of determining the plugin's version.
79
Plugin::version() const {
83
// TODO: Provide a means of determining the version of Wintermute required.
85
Plugin::systemVersion() const {
90
Plugin::configuration() const {
96
Plugin::state() const {
101
Plugin::isLoaded() const {
108
#include "plugin.moc"