The QXmppPresence class represents an XMPP presence stanza. More...
#include <QXmppPresence.h>
Classes | |
class | Status |
The QXmppPresence::Status class represents the status of an XMPP entity. More... | |
Public Types | |
enum | Type { Error = 0, Available, Unavailable, Subscribe, Subscribed, Unsubscribe, Unsubscribed, Probe } |
This enum is used to describe a presence type. More... | |
enum | VCardUpdateType { VCardUpdateNone = 0, VCardUpdateNoPhoto, VCardUpdateValidPhoto, VCardUpdateNotReady } |
Public Member Functions | |
QXmppPresence (QXmppPresence::Type type=QXmppPresence::Available, const QXmppPresence::Status &status=QXmppPresence::Status()) | |
~QXmppPresence () | |
Destroys a QXmppPresence. | |
QXmppPresence::Type | type () const |
void | setType (QXmppPresence::Type) |
QXmppPresence::Status & | status () |
Returns a reference to the presence status, allowing you to change it. | |
const QXmppPresence::Status & | status () const |
Returns the presence status. | |
void | setStatus (const QXmppPresence::Status &) |
QByteArray | photoHash () const |
void | setPhotoHash (const QByteArray &) |
VCardUpdateType | vCardUpdateType () const |
void | setVCardUpdateType (VCardUpdateType type) |
QString | capabilityHash () const |
XEP-0115: Entity Capabilities | |
void | setCapabilityHash (const QString &) |
XEP-0115: Entity Capabilities | |
QString | capabilityNode () const |
XEP-0115: Entity Capabilities | |
void | setCapabilityNode (const QString &) |
XEP-0115: Entity Capabilities | |
QByteArray | capabilityVer () const |
XEP-0115: Entity Capabilities | |
void | setCapabilityVer (const QByteArray &) |
XEP-0115: Entity Capabilities | |
QStringList | capabilityExt () const |
Legacy XEP-0115: Entity Capabilities. |
The QXmppPresence class represents an XMPP presence stanza.
enum QXmppPresence::Type |
This enum is used to describe a presence type.
QXmppPresence::QXmppPresence | ( | QXmppPresence::Type | type = QXmppPresence::Available , |
|
const QXmppPresence::Status & | status = QXmppPresence::Status() | |||
) |
Constructs a QXmppPresence.
type | ||
status |
QByteArray QXmppPresence::photoHash | ( | ) | const |
Returns the photo-hash of the VCardUpdate.
void QXmppPresence::setPhotoHash | ( | const QByteArray & | photoHash | ) |
Sets the photo-hash of the VCardUpdate.
photoHash | as QByteArray |
void QXmppPresence::setStatus | ( | const QXmppPresence::Status & | status | ) |
Sets the presence status.
status |
void QXmppPresence::setType | ( | QXmppPresence::Type | type | ) |
Sets the presence type.
type |
void QXmppPresence::setVCardUpdateType | ( | VCardUpdateType | type | ) |
Sets the type of VCardUpdate
type | VCardUpdateType |
QXmppPresence::Type QXmppPresence::type | ( | ) | const |
Returns the presence type.
You can use this method to determine the action which needs to be taken in response to receiving the presence. For instance, if the type is QXmppPresence::Available or QXmppPresence::Unavailable, you could update the icon representing a contact's availability.
QXmppPresence::VCardUpdateType QXmppPresence::vCardUpdateType | ( | ) | const |
Returns the type of VCardUpdate