gloox 1.0.28
messagefilter.cpp
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#include "messagefilter.h"
15
16
17namespace gloox
18{
19
21 : m_parent( 0 )
22 {
23 if( parent )
24 attachTo( parent );
25 }
26
30
32 {
33 if( m_parent )
34 m_parent->removeMessageFilter( this );
35
36 if( session )
37 session->registerMessageFilter( this );
38
39 m_parent = session;
40 }
41
42}
virtual void attachTo(MessageSession *session)
MessageFilter(MessageSession *parent)
An abstraction of a message session between any two entities.
void registerMessageFilter(MessageFilter *mf)
void removeMessageFilter(MessageFilter *mf)
The namespace for the gloox library.
Definition adhoc.cpp:28