gloox  1.0
vcardmanager.h
1 /*
2  Copyright (c) 2006-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 VCARDMANAGER_H__
15 #define VCARDMANAGER_H__
16 
17 #include "gloox.h"
18 #include "iqhandler.h"
19 
20 namespace gloox
21 {
22 
23  class ClientBase;
24  class VCard;
25  class VCardHandler;
26 
100  class GLOOX_API VCardManager : public IqHandler
101  {
102  public:
107  VCardManager( ClientBase* parent );
108 
112  virtual ~VCardManager();
113 
120  void fetchVCard( const JID& jid, VCardHandler* vch );
121 
130  void storeVCard( VCard* vcard, VCardHandler* vch );
131 
139  void cancelVCardOperations( VCardHandler* vch );
140 
141  // reimplemented from IqHandler.
142  virtual bool handleIq( const IQ& iq ) { (void)iq; return false; }
143 
144  // reimplemented from IqHandler.
145  virtual void handleIqID( const IQ& iq, int context );
146 
147  private:
148  typedef std::map<std::string, VCardHandler*> TrackMap;
149  ClientBase* m_parent;
150  TrackMap m_trackMap;
151 
152  };
153 
154 }
155 
156 #endif // VCARDMANAGER_H__