~ubuntu-branches/ubuntu/saucy/quassel/saucy-proposed

« back to all changes in this revision

Viewing changes to src/plugins/plugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-02-17 12:49:50 UTC
  • mto: This revision was merged to the branch mainline in revision 59.
  • Revision ID: james.westby@ubuntu.com-20100217124950-v9hajw5d2xa6fszn
Tags: upstream-0.6~beta1
ImportĀ upstreamĀ versionĀ 0.6~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2005/06 by the Quassel Project                          *
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) version 3.                                           *
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
 
/*
65
 
class SettingsInterface {
66
 
  public:
67
 
    virtual ~SettingsInterface() {};
68
 
    virtual QString category() = 0;
69
 
    virtual QString title() = 0; 
70
 
    virtual QWidget *settingsWidget() = 0;
71
 
    virtual void applyChanges() = 0;
72
 
 
73
 
};
74
 
 
75
 
Q_DECLARE_INTERFACE(SettingsInterface,
76
 
                    "eu.quassel.plugins.SettingsInterface/1.0");
77
 
*/
78
 
 
79
 
/** Plugins implementing this interface will be provided with the raw text the users enters.
80
 
 * The output they generate is in turn treated like generic user input. Note that the order in
81
 
 * which plugins are called is not defined.
82
 
 */
83
 
class UserInputFilterInterface {
84
 
 
85
 
 
86
 
 
87
 
};
88
 
 
89
 
Q_DECLARE_INTERFACE(UserInputFilterInterface,
90
 
                    "eu.quassel.plugins.UserInputFilterInterface/1.0");
91
 
 
92
 
/** Plugins implementing this interface receive and can process all messages coming from the core.
93
 
 */
94
 
class CoreMessageFilterInterface {
95
 
 
96
 
 
97
 
 
98
 
};
99
 
 
100
 
Q_DECLARE_INTERFACE(CoreMessageFilterInterface,
101
 
                    "eu.quassel.plugins.CoreMessageFilterInterface/1.0");
102
 
 
103
 
/** Plugins implementing this interface receive core messages for a single buffer only.
104
 
 * Any ChatWidgetPlugin has to provide a widget it outputs these messages to, to be used
105
 
 * in a ChannelWidget.
106
 
 */
107
 
class ChatWidgetInterface {
108
 
 
109
 
 
110
 
 
111
 
};
112
 
 
113
 
Q_DECLARE_INTERFACE(ChatWidgetInterface,
114
 
                    "eu.quassel.plugins.ChatWidgetInterface/1.0");
115
 
 
116
 
#endif