gloox
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
chatstatefilter.h
1
/*
2
Copyright (c) 2005-2009 by Jakob Schroeter <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
40
class
GLOOX_API
ChatStateFilter
:
public
MessageFilter
41
{
42
public
:
47
ChatStateFilter
(
MessageSession
* parent );
48
52
virtual
~
ChatStateFilter
();
53
64
void
setChatState(
ChatStateType
state );
65
71
void
registerChatStateHandler(
ChatStateHandler
* csh )
72
{ m_chatStateHandler = csh; }
73
79
void
removeChatStateHandler()
80
{ m_chatStateHandler = 0; }
81
82
// reimplemented from MessageFilter
83
virtual
void
decorate(
Message
& msg );
84
85
// reimplemented from MessageFilter
86
virtual
void
filter(
Message
& msg );
87
88
protected
:
90
ChatStateHandler
*
m_chatStateHandler
;
91
93
ChatStateType
m_lastSent
;
94
96
bool
m_enableChatStates
;
97
98
};
99
100
}
101
102
#endif // CHATSTATEFILTER_H__
Generated on Thu Jun 27 2013 13:02:35 for gloox by
1.8.1.2