QXmppVCardManager Class Reference
Managers

The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp. More...

`#include <QXmppVCardManager.h>`

Inheritance diagram for QXmppVCardManager:
[legend]
Collaboration diagram for QXmppVCardManager:
[legend]

## Signals

void | vCardReceived (const QXmppVCardIq &)
void | clientVCardReceived ()
Signals inherited from QXmppLoggable
void | setGauge (const QString &gauge, double value)
| Sets the given gauge to value.
void | logMessage (QXmppLogger::MessageType type, const QString &msg)
| This signal is emitted to send logging messages.
void | updateCounter (const QString &counter, qint64 amount=1)
| Updates the given counter by amount.

## Public Member Functions

QString | requestVCard (const QString &bareJid=QString())
const QXmppVCardIq & | clientVCard () const
void | setClientVCard (const QXmppVCardIq &)
QString | requestClientVCard ()
bool | isClientVCardReceived () const
Public Member Functions inherited from QXmppClientExtension
| QXmppClientExtension ()
virtual | ~QXmppClientExtension ()
virtual QStringList | discoveryFeatures () const
virtual QList< QXmppDiscoveryIq::Identity > | discoveryIdentities () const
virtual bool | handleStanza (const QDomElement &stanza)=0
| You need to implement this method to process incoming XMPP stanzas. More...
Public Member Functions inherited from QXmppLoggable
| QXmppLoggable (QObject *parent=0)

## Additional Inherited Members

Protected Member Functions inherited from QXmppClientExtension
QXmppClient * | client ()
virtual void | setClient (QXmppClient *client)
Protected Member Functions inherited from QXmppLoggable
void | debug (const QString &message)
void | info (const QString &message)
void | warning (const QString &message)
void | logReceived (const QString &message)
void | logSent (const QString &message)

## Detailed Description

The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp.

Note
  It's object should not be created using it's constructor. Instead QXmppClient::vCardManager() should be used to get the reference of instantiated object this class.

Getting vCards of entries in Roster:
It doesn't store vCards of the JIDs in the roster of connected user. Instead client has to request for a particular vCard using requestVCard(). And connect to the signal vCardReceived() to get the requested vCard.

Getting vCard of the connected client:
For getting the vCard of the connected user itself. Client can call requestClientVCard() and on the signal clientVCardReceived() it can get its vCard using clientVCard().

Setting vCard of the client:
Using setClientVCard() client can set its vCard.

Note
  Client can't set/change vCards of roster entries.

## Member Function Documentation

const QXmppVCardIq & QXmppVCardManager::clientVCard | ( |  | ) | const

Returns the vCard of the connected client.

Returns
  QXmppVCard

void QXmppVCardManager::clientVCardReceived | ( |  | ) |

signal

This signal is emitted when the client's vCard is received after calling the requestClientVCard() function.

bool QXmppVCardManager::isClientVCardReceived | ( |  | ) | const

Returns true if vCard of the connected client has been received else false.

Returns
  bool

QString QXmppVCardManager::requestClientVCard | ( |  | ) |

This function requests the server for vCard of the connected user itself. Once received the signal clientVCardReceived() is emitted. Received vCard can be get using clientVCard().

QString QXmppVCardManager::requestVCard | ( | const QString & | jid = `QString()` | ) |

This function requests the server for vCard of the specified jid. Once received the signal vCardReceived() is emitted.

Parameters

  jid | Jid of the specific entry in the roster

void QXmppVCardManager::setClientVCard | ( | const QXmppVCardIq & | clientVCard | ) |

Sets the vCard of the connected client.

Parameters

  clientVCard | QXmppVCard

void QXmppVCardManager::vCardReceived | ( | const QXmppVCardIq & |  | ) |

signal

This signal is emitted when the requested vCard is received after calling the requestVCard() function.

The documentation for this class was generated from the following files:

- QXmppVCardManager.h
- QXmppVCardManager.cpp