Finished the fusion of the different main_* files, so now we have only one #ifdef...
[quassel.git] / src / 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 ~SettingsInterface() {};
67     virtual QString category() = 0;
68     virtual QString title() = 0; 
69     virtual QWidget *settingsWidget() = 0;
70
71 };
72
73 Q_DECLARE_INTERFACE(SettingsInterface,
74                     "eu.quassel.plugins.SettingsInterface/1.0");
75
76 /** Plugins implementing this interface will be provided with the raw text the users enters.
77  * The output they generate is in turn treated like generic user input. Note that the order in
78  * which plugins are called is not defined.
79  */
80 class UserInputFilterInterface {
81
82
83
84 };
85
86 Q_DECLARE_INTERFACE(UserInputFilterInterface,
87                     "eu.quassel.plugins.UserInputFilterInterface/1.0");
88
89 /** Plugins implementing this interface receive and can process all messages coming from the core.
90  */
91 class CoreMessageFilterInterface {
92
93
94
95 };
96
97 Q_DECLARE_INTERFACE(CoreMessageFilterInterface,
98                     "eu.quassel.plugins.CoreMessageFilterInterface/1.0");
99
100 /** Plugins implementing this interface receive core messages for a single buffer only.
101  * Any ChatWidgetPlugin has to provide a widget it outputs these messages to, to be used
102  * in a ChannelWidget.
103  */
104 class ChatWidgetInterface {
105
106
107
108 };
109
110 Q_DECLARE_INTERFACE(ChatWidgetInterface,
111                     "eu.quassel.plugins.ChatWidgetInterface/1.0");
112
113 #endif