2 * @file plugins/pluginmanager.h
3 * @brief Manager for loadable modules (plugins)
5 * Copyright (c) 2011 Enar Vaikene
7 * This file is part of the eVaf C++ cross-platform application development framework.
9 * This file can be used under the terms of the GNU General Public License
10 * version 3.0 as published by the Free Software Foundation and appearing in
11 * the file LICENSE included in the packaging of this file. Please review the
12 * the following information to ensure the GNU General Public License version
13 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
15 * Alternatively, this file may be used in accordance with the Commercial License
16 * Agreement provided with the Software.
19 #ifndef __PLUGINS_PLUGINMANAGER_H
20 #define __PLUGINS_PLUGINMANAGER_H
22 #include "libplugins.h"
24 #include <version_rc.h>
29 * Library for managing loadable modules (plugins).
31 * The Plugins library adds loadable modules (plugins) support to the eVaf application. A module is one
32 * external library (.so or .dll file) that implements one or more plugins. A plugin is an individual object
33 * that is created and initialized as one entirety.
35 * Modules are loaded and plugins created by the plugin manager. Plugin manager uses the application's
36 * XML file to define which modules should be loaded and which plugins to be created.
41 * Internal implementation of the plugin manager library.
44 class PluginManagerPrivate
;
48 * Plugin manager for eVaf applications.
50 class PLUGINS_EXPORT PluginManager
: public QObject
60 virtual ~PluginManager();
63 * Returns the plugin manager's instance
65 static PluginManager
* instance();
68 * Initializes the plugin manager.
69 * @return True if ok; false if initialization failed.
71 * This function initializes the plugin manager. External modules are loaded and plugin objects
72 * created in this function.
77 * Finalizes the plugin manager.
79 * This function finalizes the plugin manager. Plugin objects are destroyed and external modules
80 * unloaded in this function.
88 * Plugins loaded signal.
90 * This signal is emitted when all the modules are loaded and plugin objects created.
95 * Plugins unloaded signal.
97 * This signal is emitted when all the plugin objects are destroyed and modules unloaded.
99 void pluginsUnloaded();
104 Internal::PluginManagerPrivate
* dl
;
108 } // namespace Plugins
111 #endif // pluginmanager.h