The QXmppPresence class represents an XMPP presence stanza.
More...
#include <QXmppPresence.h>
List of all members.
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 &) |
QXmppMucItem | mucItem () const |
| Returns the MUC item.
|
void | setMucItem (const QXmppMucItem &item) |
QList< int > | mucStatusCodes () const |
| Returns the MUC status codes.
|
void | setMucStatusCodes (const QList< int > &codes) |
QByteArray | photoHash () const |
| XEP-0153: vCard-Based Avatars
|
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
|
Detailed Description
The QXmppPresence class represents an XMPP presence stanza.
Member Enumeration Documentation
This enum is used to describe a presence type.
- Enumerator:
Error |
An error has occurred regarding processing or delivery of a previously-sent presence stanza.
|
Available |
Signals that the sender is online and available for communication.
|
Unavailable |
Signals that the sender is no longer available for communication.
|
Subscribe |
The sender wishes to subscribe to the recipient's presence.
|
Subscribed |
The sender has allowed the recipient to receive their presence.
|
Unsubscribe |
The sender is unsubscribing from another entity's presence.
|
Unsubscribed |
The subscription request has been denied or a previously-granted subscription has been cancelled.
|
Probe |
A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.
|
- Enumerator:
VCardUpdateNone |
Protocol is not supported.
|
VCardUpdateNoPhoto |
User is not using any image.
|
VCardUpdateValidPhoto |
User is advertising an image.
|
VCardUpdateNotReady |
User is not ready to advertise an image.
- Note:
- This enables recipients to distinguish between the absence of an image (empty photo element) and mere support for the protocol (empty update child).
|
Constructor & Destructor Documentation
Member Function Documentation
QByteArray QXmppPresence::photoHash |
( |
| ) |
const |
Sets the MUC item.
- Parameters:
-
void QXmppPresence::setMucStatusCodes |
( |
const QList< int > & |
codes | ) |
|
Sets the MUC status codes.
- Parameters:
-
void QXmppPresence::setPhotoHash |
( |
const QByteArray & |
photoHash | ) |
|
Sets the photo-hash of the VCardUpdate.
- Parameters:
-
Sets the presence status.
- Parameters:
-
Sets the presence type.
- Parameters:
-
Sets the type of VCardUpdate
- Parameters:
-
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.
Returns the type of VCardUpdate
- Returns:
- VCardUpdateType
The documentation for this class was generated from the following files: