2
* psiplugin.h - Psi plugin interface
3
* Copyright (C) 2006-2008 Kevin Smith, Maciej Niedzielski
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* You can also redistribute and/or modify this program under the
11
* terms of the Psi License, specified in the accompanied COPYING
12
* file, as published by the Psi Project; either dated January 1st,
13
* 2005, or (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this library; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35
* \brief An abstract class for implementing a plugin
40
virtual ~PsiPlugin() {}
44
* The full name of the plugin.
47
virtual QString name() const = 0;
50
* \brief Short name for the plugin
51
* This is the short name of the plugin, used for options structures.
52
* It must consist of only alphanumerics (no spaces or punctuation).
53
* \return Short plugin name
55
virtual QString shortName() const = 0;
58
* \brief Plugin version
59
* Free-form string of the plugin version. Human readable
60
* \return Plugin version string
62
virtual QString version() const = 0;
65
* \brief Plugin options widget
66
* This method is called by the Psi options system to retrieve
67
* a widget containing the options for this plugin.
68
* This will then be embedded in the options dialog, so this
69
* should be considered when designing the widget. Should return
70
* NULL when there are no user-configurable options. The calling method
71
* is responsible for deleting the options.
73
* TODO: make sure this is really deleted, etc
75
virtual QWidget* options() const = 0;
78
* \brief Enable plugin
79
* \return true if plugin was successfully enabled
82
virtual bool enable() = 0;
85
* \brief Disable plugin
86
* \return true if plugin was successfully disabled
88
virtual bool disable() = 0;
92
Q_DECLARE_INTERFACE(PsiPlugin, "org.psi-im.PsiPlugin/0.3");