gloox 1.0.27
chatstatefilter.h
1/*
2 Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
3 This file is part of the gloox library. http://camaya.net/gloox
4
5 This software is distributed under a license. The full license
6 agreement can be found in the file LICENSE in this distribution.
7 This software may not be copied, modified, sold or distributed
8 other than expressed in the named license agreement.
9
10 This software is distributed without any warranty.
11*/
12
13
14#ifndef CHATSTATEFILTER_H__
15#define CHATSTATEFILTER_H__
16
17#include "messagefilter.h"
18#include "gloox.h"
19
20namespace gloox
21{
22
23 class Tag;
24 class ChatStateHandler;
25 class MessageSession;
26 class Message;
27
43 class GLOOX_API ChatStateFilter : public MessageFilter
44 {
45 public:
51
55 virtual ~ChatStateFilter();
56
67 void setChatState( ChatStateType state );
68
75 { m_chatStateHandler = csh; }
76
83 { m_chatStateHandler = 0; }
84
85 // reimplemented from MessageFilter
86 virtual void decorate( Message& msg );
87
88 // reimplemented from MessageFilter
89 virtual void filter( Message& msg );
90
91 protected:
94
97
100
101 };
102
103}
104
105#endif // CHATSTATEFILTER_H__
This class adds Chat State Notifications (XEP-0085) support to a MessageSession.
ChatStateHandler * m_chatStateHandler
void registerChatStateHandler(ChatStateHandler *csh)
A virtual interface that enables an object to be notified about a remote entity's Chat States (XEP-00...
Virtual base class for message filters.
An abstraction of a message session between any two entities.
An abstraction of a message stanza.
Definition message.h:34
The namespace for the gloox library.
Definition adhoc.cpp:28
ChatStateType
Definition gloox.h:1105