chatstatefilter.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 CHATSTATEFILTER_H__
#define CHATSTATEFILTER_H__
#include "messagefilter.h"
#include "gloox.h"
namespace gloox
{
class Tag;
class ChatStateHandler;
class MessageSession;
class Message;
class GLOOX_API ChatStateFilter : public MessageFilter
{
public:
ChatStateFilter( MessageSession* parent );
virtual ~ChatStateFilter();
void setChatState( ChatStateType state );
void registerChatStateHandler( ChatStateHandler* csh )
{ m_chatStateHandler = csh; }
void removeChatStateHandler()
{ m_chatStateHandler = 0; }
// reimplemented from MessageFilter
virtual void decorate( Message& msg );
// reimplemented from MessageFilter
virtual void filter( Message& msg );
protected:
ChatStateHandler* m_chatStateHandler;
ChatStateType m_lastSent;
bool m_enableChatStates;
};
}
#endif // CHATSTATEFILTER_H__
gloox::ChatStateFilter::setChatState
void setChatState(ChatStateType state)
Definition chatstatefilter.cpp:49
gloox::ChatStateFilter::ChatStateFilter
ChatStateFilter(MessageSession *parent)
Definition chatstatefilter.cpp:24
gloox::ChatStateFilter::m_lastSent
ChatStateType m_lastSent
Definition chatstatefilter.h:96
gloox::ChatStateFilter::m_chatStateHandler
ChatStateHandler * m_chatStateHandler
Definition chatstatefilter.h:93
gloox::ChatStateFilter::m_enableChatStates
bool m_enableChatStates
Definition chatstatefilter.h:99
gloox::ChatStateFilter::removeChatStateHandler
void removeChatStateHandler()
Definition chatstatefilter.h:82
gloox::ChatStateFilter::registerChatStateHandler
void registerChatStateHandler(ChatStateHandler *csh)
Definition chatstatefilter.h:74
gloox::ChatStateHandler
A virtual interface that enables an object to be notified about a remote entity's Chat States (XEP-00...
Definition chatstatehandler.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::ChatStateType
ChatStateType
Definition gloox.h:1105