gloox
1.0.22
src
chatstatefilter.h
1
/*
2
Copyright (c) 2005-2017 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
20
namespace
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
:
50
ChatStateFilter
(
MessageSession
* parent );
51
55
virtual
~
ChatStateFilter
();
56
67
void
setChatState(
ChatStateType
state );
68
74
void
registerChatStateHandler
(
ChatStateHandler
* csh )
75
{ m_chatStateHandler = csh; }
76
82
void
removeChatStateHandler
()
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
:
93
ChatStateHandler
*
m_chatStateHandler
;
94
96
ChatStateType
m_lastSent
;
97
99
bool
m_enableChatStates
;
100
101
};
102
103
}
104
105
#endif // CHATSTATEFILTER_H__
gloox::ChatStateFilter::removeChatStateHandler
void removeChatStateHandler()
Definition:
chatstatefilter.h:82
gloox::ChatStateFilter::registerChatStateHandler
void registerChatStateHandler(ChatStateHandler *csh)
Definition:
chatstatefilter.h:74
gloox::Message
An abstraction of a message stanza.
Definition:
message.h:34
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::ChatStateType
ChatStateType
Definition:
gloox.h:1105
gloox::MessageFilter
Virtual base class for message filters.
Definition:
messagefilter.h:38
gloox::MessageSession
An abstraction of a message session between any two entities.
Definition:
messagesession.h:146
gloox::ChatStateFilter
This class adds Chat State Notifications (XEP-0085) support to a MessageSession.
Definition:
chatstatefilter.h:44
gloox::ChatStateFilter::m_lastSent
ChatStateType m_lastSent
Definition:
chatstatefilter.h:96
gloox::ChatStateFilter::m_enableChatStates
bool m_enableChatStates
Definition:
chatstatefilter.h:99
gloox
The namespace for the gloox library.
Definition:
adhoc.cpp:28
gloox::ChatStateFilter::m_chatStateHandler
ChatStateHandler * m_chatStateHandler
Definition:
chatstatefilter.h:93
Generated on Tue Jan 22 2019 01:32:21 for gloox by
1.8.20