messageeventfilter.h
/*
Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef MESSAGEVENTFILTER_H__
#define MESSAGEVENTFILTER_H__
#include "messagefilter.h"
#include "gloox.h"
namespace gloox
{
class Tag;
class Message;
class MessageEventHandler;
class MessageSession;
class GLOOX_API MessageEventFilter : public MessageFilter
{
public:
MessageEventFilter( MessageSession* parent );
virtual ~MessageEventFilter();
void raiseMessageEvent( MessageEventType event );
void registerMessageEventHandler( MessageEventHandler* meh );
void removeMessageEventHandler();
// reimplemented from MessageFilter
virtual void decorate( Message& msg );
// reimplemented from MessageFilter
virtual void filter( Message& msg );
private:
MessageEventHandler* m_messageEventHandler;
std::string m_lastID;
int m_requestedEvents;
MessageEventType m_lastSent;
bool m_disable;
};
}
#endif // MESSAGEVENTFILTER_H__
gloox::MessageEventFilter::MessageEventFilter
MessageEventFilter(MessageSession *parent)
Definition messageeventfilter.cpp:24
gloox::MessageEventFilter::decorate
virtual void decorate(Message &msg)
Definition messageeventfilter.cpp:92
gloox::MessageEventFilter::filter
virtual void filter(Message &msg)
Definition messageeventfilter.cpp:34
gloox::MessageEventFilter::removeMessageEventHandler
void removeMessageEventHandler()
Definition messageeventfilter.cpp:107
gloox::MessageEventFilter::raiseMessageEvent
void raiseMessageEvent(MessageEventType event)
Definition messageeventfilter.cpp:65
gloox::MessageEventFilter::registerMessageEventHandler
void registerMessageEventHandler(MessageEventHandler *meh)
Definition messageeventfilter.cpp:102
gloox::MessageEventHandler
A virtual interface that enables an object to be notified about Message Events (XEP-0022).
Definition messageeventhandler.h:32
gloox::MessageFilter::MessageFilter
MessageFilter(MessageSession *parent)
Definition messagefilter.cpp:20
gloox::MessageSession
An abstraction of a message session between any two entities.
Definition messagesession.h:146
gloox::Message
An abstraction of a message stanza.
Definition message.h:34
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::MessageEventType
MessageEventType
Definition gloox.h:1090