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
MessageEventFilter(MessageSession *parent)
virtual void decorate(Message &msg)
virtual ~MessageEventFilter()
virtual void filter(Message &msg)
void removeMessageEventHandler()
void raiseMessageEvent(MessageEventType event)
void registerMessageEventHandler(MessageEventHandler *meh)
A virtual interface that enables an object to be notified about Message Events (XEP-0022).
virtual void handleMessageEvent(const JID &from, MessageEventType event)=0
An implementation of Message Events (XEP-0022) as a StanzaExtension.
Virtual base class for message filters.
An abstraction of a message session between any two entities.
const JID & target() const
An abstraction of a message stanza.
const std::string body(const std::string &lang="default") const
MessageType subtype() const
void addExtension(const StanzaExtension *se)
const Error * error() const
const std::string & id() const
const StanzaExtension * findExtension(int type) const
The namespace for the gloox library.
const std::string EmptyString
@ StanzaErrorFeatureNotImplemented