#include <vcardmanager.h>
Inherits IqHandler.
Inheritance diagram for VCardManager:

Public Member Functions | |
| VCardManager (ClientBase *parent) | |
| virtual | ~VCardManager () |
| void | fetchVCard (const JID &jid, VCardHandler *vch) |
| void | storeVCard (VCard *vcard, VCardHandler *vch) |
| void | cancelVCardOperations (VCardHandler *vch) |
| virtual bool | handleIq (const IQ &iq) |
| virtual void | handleIqID (const IQ &iq, int context) |
You need only one VCardManager per Client/ClientBase.
class MyClass : public VCardHandler { public: MyClass() { m_myClass = new MyClass(); m_vcardManager = new VCardManager( m_client ); }; ... void fetchVCard( const JID& jid ) { m_vcardManager->fetchVCard( jid, this ); }; virtual void handleVCard( const JID& jid, const VCard* vcard ); { printf( "received vcard\n" ); }; virtual void handleVCardResult( VCardContext context, const JID& jid, StanzaError se ) { printf( "vcard operation result received\n" ); }; ... private: VCardManager* m_vcardManager; };
void storeMyVCard() { VCard* v = new VCard(); v->setFormattedname( "Me" ); v->setNickname( "Myself" ); ... m_vcardManager->storeVCard( v, this ); };
This implementation supports more than one address, address label, email address and telephone number.
Definition at line 100 of file vcardmanager.h.
|
|
Constructor.
Definition at line 24 of file vcardmanager.cpp. |
|
|
Virtual destructor. Definition at line 35 of file vcardmanager.cpp. |
|
|
Use this function, e.g. from your VCardHandler-derived class's dtor, to cancel any outstanding operations (fetchVCard(), storeVCard()). Calling this function even if no operations are pending is just fine.
Definition at line 62 of file vcardmanager.cpp. |
|
||||||||||||
|
Use this function to fetch the VCard of a remote entity or yourself. The result will be announced by calling handleVCard() the VCardHandler.
Definition at line 45 of file vcardmanager.cpp. |
|
|
Reimplement this function if you want to be notified about incoming IQs.
Implements IqHandler. Definition at line 142 of file vcardmanager.h. |
|
||||||||||||
|
Reimplement this function if you want to be notified about incoming IQs with a specific value of the
Implements IqHandler. Definition at line 88 of file vcardmanager.cpp. |
|
||||||||||||
|
Use this function to store or update your own VCard on the server. Remember to always send a full VCard, not a delta of changes. If you, for any reason, pass a foreign VCard to this function, your own will be overwritten.
Definition at line 75 of file vcardmanager.cpp. |
1.4.1