File: eventfilter.h

package info (click to toggle)
psi-plus 1.4.1456-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,188 kB
  • sloc: cpp: 211,254; ansic: 19,786; javascript: 13,687; xml: 4,056; sh: 1,610; makefile: 437; objc: 407; python: 277; ruby: 171
file content (25 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef EVENTFILTER_H
#define EVENTFILTER_H

#include <QtPlugin>

class QDomElement;
class QString;

class EventFilter {
public:
    virtual ~EventFilter() { }

    // true = handled, don't pass to next handler

    virtual bool processEvent(int account, QDomElement &e)                                                        = 0;
    virtual bool processMessage(int account, const QString &fromJid, const QString &body, const QString &subject) = 0;
    virtual bool processOutgoingMessage(int account, const QString &fromJid, QString &body, const QString &type,
                                        QString &subject)
        = 0;
    virtual void logout(int account) = 0; // this method will moved/removed in next versions
};

Q_DECLARE_INTERFACE(EventFilter, "org.psi-im.EventFilter/0.1");

#endif // EVENTFILTER_H