gloox  1.0.16
vcardmanager.h
1 /*
2  Copyright (c) 2006-2015 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 #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__
A VCardManager can be used to fetch an entities VCard as well as for setting one's own VCard...
Definition: vcardmanager.h:100
An abstraction of an IQ stanza.
Definition: iq.h:33
A virtual interface that helps requesting Jabber VCards.
Definition: vcardhandler.h:36
virtual bool handleIq(const IQ &iq)
Definition: vcardmanager.h:142
The namespace for the gloox library.
Definition: adhoc.cpp:27
An abstraction of a JID.
Definition: jid.h:30
A virtual interface which can be reimplemented to receive IQ stanzas.
Definition: iqhandler.h:31
A VCard abstraction.
Definition: vcard.h:34
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:76