14 #include "messageeventfilter.h"
15 #include "messageeventhandler.h"
16 #include "messagesession.h"
18 #include "messageevent.h"
25 :
MessageFilter( parent ), m_messageEventHandler( 0 ), m_requestedEvents( 0 ),
36 if( m_disable || !m_messageEventHandler )
50 m_requestedEvents = 0;
55 if( msg.
body().empty() )
60 m_requestedEvents = 0;
61 m_requestedEvents = me->
event();
67 if( m_disable || ( !( m_requestedEvents & event ) && ( event !=
MessageEventCancel ) ) )
75 m_requestedEvents &= ~event;
104 m_messageEventHandler = meh;
109 m_messageEventHandler = 0;
StanzaError error() const
const JID & target() const
An abstraction of a message session between any two entities.
virtual void filter(Message &msg)
virtual void handleMessageEvent(const JID &from, MessageEventType event)=0
void addExtension(const StanzaExtension *se)
virtual ~MessageEventFilter()
An implementation of Message Events (XEP-0022) as a StanzaExtension.
void registerMessageEventHandler(MessageEventHandler *meh)
MessageType subtype() const
An abstraction of a message stanza.
void removeMessageEventHandler()
The namespace for the gloox library.
A virtual interface that enables an object to be notified about Message Events (XEP-0022).
void raiseMessageEvent(MessageEventType event)
MessageEventFilter(MessageSession *parent)
const Error * error() const
Virtual base class for message filters.
const std::string & id() const
virtual void decorate(Message &msg)
const std::string EmptyString
const std::string body(const std::string &lang="default") const
const StanzaExtension * findExtension(int type) const