Communi  3.0.0
A cross-platform IRC framework written with Qt
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Macros Groups Pages
ircfilter.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008-2013 The Communi Project
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
13 */
14 
15 #ifndef IRCFILTER_H
16 #define IRCFILTER_H
17 
18 #include <IrcGlobal>
19 #include <QtCore/qobject.h>
20 
21 IRC_BEGIN_NAMESPACE
22 
23 class IrcMessage;
24 class IrcCommand;
25 
26 class IRC_CORE_EXPORT IrcMessageFilter
27 {
28 public:
29  virtual ~IrcMessageFilter() { }
30  virtual bool messageFilter(IrcMessage* message) = 0;
31 };
32 
33 class IRC_CORE_EXPORT IrcCommandFilter
34 {
35 public:
36  virtual ~IrcCommandFilter() { }
37  virtual bool commandFilter(IrcCommand* command) = 0;
38 };
39 
40 IRC_END_NAMESPACE
41 
42 // TODO: fixme
43 #ifdef IRC_NAMESPACE
44 using IRC_NAMESPACE::IrcMessageFilter;
45 using IRC_NAMESPACE::IrcCommandFilter;
46 #endif
47 
48 Q_DECLARE_INTERFACE(IrcMessageFilter, "Communi.IrcMessageFilter")
49 Q_DECLARE_INTERFACE(IrcCommandFilter, "Communi.IrcCommandFilter")
50 
51 #endif // IRCFILTER_H
Provides the most common commands.
Definition: irccommand.h:29
virtual ~IrcCommandFilter()
Definition: ircfilter.h:36
The base class of all messages.
Definition: ircmessage.h:32
virtual ~IrcMessageFilter()
Definition: ircfilter.h:29
Provides an interface for filtering commands.
Definition: ircfilter.h:33
Provides an interface for filtering messages.
Definition: ircfilter.h:26