QXmppVCardManager Class
The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp. More...
| Header: | #include <QXmppVCardManager.h> |
| Inherits: | QXmppClientExtension |
- List of all members, including inherited members
- QXmppVCardManager is part of Managers.
Public Types
Public Functions
| const QXmppVCardIq & | clientVCard() const |
(since QXmpp 1.8) QXmppTask<QXmppVCardManager::VCardIqResult> | fetchVCard(const QString &bareJid) |
| bool | isClientVCardReceived() const |
| QString | requestClientVCard() |
| QString | requestVCard(const QString &jid = QString()) |
| void | setClientVCard(const QXmppVCardIq &clientVCard) |
(since QXmpp 1.8) QXmppTask<QXmppVCardManager::Result> | setVCard(const QXmppVCardIq &vCard) |
(since QXmpp 1.17) QXmppDiscoFeatureWatch | watchServerSupport() const |
Signals
| void | clientVCardReceived() |
| void | vCardReceived(const QXmppVCardIq &) |
Detailed Description
Note: Its object should not be created using its constructor. Instead QXmppClient::findExtension<QXmppVCardManager>() should be used to get the instantiated object of this class.
<B>Getting vCards of entries in Roster:</B><BR> 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.
<B>Getting vCard of the connected client:</B><BR> 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().
<B>Setting vCard of the client:</B><BR> Using setClientVCard() client can set its vCard.
Note: Client can't set/change vCards of roster entries.
Checking whether the server supports vCards using watchServerSupport() requires the QXmppDiscoveryManager to be registered with the client.
Member Type Documentation
[alias] QXmppVCardManager::Result
Success or QXmppError.
[alias] QXmppVCardManager::VCardIqResult
Member Function Documentation
const QXmppVCardIq &QXmppVCardManager::clientVCard() const
Returns the vCard of the connected client.
See also setClientVCard().
[signal] void QXmppVCardManager::clientVCardReceived()
This signal is emitted when the client's vCard is received after calling the requestClientVCard() function.
[since QXmpp 1.8] QXmppTask<QXmppVCardManager::VCardIqResult> QXmppVCardManager::fetchVCard(const QString &bareJid)
Fetches the VCard of a bare JID.
bareJid.
This function was introduced in QXmpp 1.8.
bool QXmppVCardManager::isClientVCardReceived() const
Returns true if vCard of the connected client has been received else false.
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 the vCard of the specified jid (a JID of a specific entry in the roster). Once received the signal vCardReceived() is emitted.
void QXmppVCardManager::setClientVCard(const QXmppVCardIq &clientVCard)
Sets the vCard of the connected client.
clientVCard.
See also clientVCard().
[since QXmpp 1.8] QXmppTask<QXmppVCardManager::Result> QXmppVCardManager::setVCard(const QXmppVCardIq &vCard)
Sets the VCard of the currently connected account.
vCard.
This function was introduced in QXmpp 1.8.
[signal] void QXmppVCardManager::vCardReceived(const QXmppVCardIq &)
This signal is emitted when the requested vCard is received after calling the requestVCard() function.
[since QXmpp 1.17] QXmppDiscoFeatureWatch QXmppVCardManager::watchServerSupport() const
Returns a watch on whether the own server supports XEP-0054: vcard-temp.
The information is requested as long as a copy of the watch exists and shared with all other watches on the server information. This requires the QXmppDiscoveryManager to be registered with the client. If the manager is not registered with a client, a watch that never loads is returned.
This function was introduced in QXmpp 1.17.