glooxd  0.3-svn
presencemanager.h
1 /*
2  Copyright (c) 2009 by Jakob Schroeter <js@camaya.net>
3  This file is part of the glooxd library. http://camaya.net/glooxd
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 PRESENCEMANAGER_H__
15 #define PRESENCEMANAGER_H__
16 
17 #include "glooxd.h"
18 #include "plugin.h"
19 
20 #include <gloox/tag.h>
21 
22 namespace gloox
23 {
24  class JID;
25  class Tag;
26 }
27 
28 namespace glooxd
29 {
30 
31  class RosterProvider;
32 
39  class GLOOXD_API PresenceManager : public Plugin
40  {
41  public:
48  PresenceManager( SM& sm, TagHandler& router, RosterProvider* rp );
49 
53  virtual ~PresenceManager();
54 
55  // reimplemented from Plugin
56  virtual bool handleTag( const gloox::Tag* tag );
57 
58  // reimplemented from Plugin
59  virtual const std::string& filterString() const;
60 
61  private:
62  void getRoster( const gloox::JID& jid );
63 
64  RosterProvider* m_handler;
65 
66  };
67 
68 }
69 
70 #endif // PRESENCEMANAGER_H__