5fa7052439ac80cb304ee3ba5f1251a26d052a70
[quassel.git] / plugins / plugin.h
1 /***************************************************************************
2  *   Copyright (C) 2005/06 by The Quassel Team                             *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef _PLUGIN_H_
22 #define _PLUGIN_H_
23
24 // TODO disable GUI-related stuff for core-only compile
25
26 #include <QtCore>
27 #include <QtGui>
28
29 /** \file plugin.h
30  * Header that needs to be included by all plugins and defines the interfaces a plugin
31  * can implement.
32  */
33
34 /// The base class for the generic plugin interfaces.
35 class PluginInterface {
36
37
38 };
39
40
41 /// All GUI plugins need to implement this interface.
42 class GuiPluginInterface : public PluginInterface {
43
44
45 };
46
47 Q_DECLARE_INTERFACE(GuiPluginInterface,
48                     "eu.quassel.plugins.GuiPluginInterface/1.0");
49
50 /// All core plugins need to implement this interface.
51 class CorePluginInterface: public PluginInterface {
52
53
54
55 };
56
57 Q_DECLARE_INTERFACE(CorePluginInterface,
58                     "eu.quassel.plugins.CorePluginInterface/1.0");
59
60 /** Plugins implementing this interface can provide a settings widget that will be shown in
61  * the application's settings dialog.
62  * This is also used by built-in settings dialogs.
63  */
64 class SettingsInterface {
65   public:
66     virtual QWidget *settingsWidget(QWidget *parent = 0) = 0;
67
68 };
69
70 Q_DECLARE_INTERFACE(SettingsInterface,
71                     "eu.quassel.plugins.SettingsInterface/1.0");
72
73 /** Plugins implementing this interface will be provided with the raw text the users enters.
74  * The output they generate is in turn treated like generic user input. Note that the order in
75  * which plugins are called is not defined.
76  */
77 class UserInputFilterInterface {
78
79
80
81 };
82
83 Q_DECLARE_INTERFACE(UserInputFilterInterface,
84                     "eu.quassel.plugins.UserInputFilterInterface/1.0");
85
86 /** Plugins implementing this interface receive and can process all messages coming from the core.
87  */
88 class CoreMessageFilterInterface {
89
90
91
92 };
93
94 Q_DECLARE_INTERFACE(CoreMessageFilterInterface,
95                     "eu.quassel.plugins.CoreMessageFilterInterface/1.0");
96
97 /** Plugins implementing this interface receive core messages for a single buffer only.
98  * Any ChatWidgetPlugin has to provide a widget it outputs these messages to, to be used
99  * in a ChannelWidget.
100  */
101 class ChatWidgetInterface {
102
103
104
105 };
106
107 Q_DECLARE_INTERFACE(ChatWidgetInterface,
108                     "eu.quassel.plugins.ChatWidgetInterface/1.0");
109
110 #endif