gloox  1.0
messagefilter.cpp
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 #include "messagefilter.h"
15 
16 
17 namespace gloox
18 {
19 
21  : m_parent( 0 )
22  {
23  if( parent )
24  attachTo( parent );
25  }
26 
28  {
29  }
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 }