diff options
| author | 0xd34df00d <0xd34df00d@gmail.com> | 2019-12-22 19:46:13 -0500 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-12-23 19:04:55 +0100 |
| commit | e148045e90eb2ac12bb6ba426052606d5ac38c40 (patch) | |
| tree | 3ceedcc9997d4c25ec8b14bafecd5faad8cb4ed1 /src/base/QXmppPresence.h | |
| parent | ee218192f6c25eba0c8f041ca2e53b7222881aa0 (diff) | |
| download | qxmpp-e148045e90eb2ac12bb6ba426052606d5ac38c40.tar.gz | |
Add a .clang-format somewhat close to the current style
Diffstat (limited to 'src/base/QXmppPresence.h')
| -rw-r--r-- | src/base/QXmppPresence.h | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/src/base/QXmppPresence.h b/src/base/QXmppPresence.h index 991eb796..aed5b15f 100644 --- a/src/base/QXmppPresence.h +++ b/src/base/QXmppPresence.h @@ -21,7 +21,6 @@ * */ - #ifndef QXMPPPRESENCE_H #define QXMPPPRESENCE_H @@ -37,40 +36,37 @@ class QXMPP_EXPORT QXmppPresence : public QXmppStanza { public: /// This enum is used to describe a presence type. - enum Type - { - Error = 0, ///< 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. + enum Type { + Error = 0, ///< 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. }; /// This enum is used to describe an availability status. - enum AvailableStatusType - { - Online = 0, ///< The entity or resource is online. - Away, ///< The entity or resource is temporarily away. - XA, ///< The entity or resource is away for an extended period. - DND, ///< The entity or resource is busy ("Do Not Disturb"). - Chat, ///< The entity or resource is actively interested in chatting. - Invisible ///< obsolete XEP-0018: Invisible Presence + enum AvailableStatusType { + Online = 0, ///< The entity or resource is online. + Away, ///< The entity or resource is temporarily away. + XA, ///< The entity or resource is away for an extended period. + DND, ///< The entity or resource is busy ("Do Not Disturb"). + Chat, ///< The entity or resource is actively interested in chatting. + Invisible ///< obsolete XEP-0018: Invisible Presence }; /// This enum is used to describe vCard updates as defined by /// XEP-0153: vCard-Based Avatars - enum VCardUpdateType - { + enum VCardUpdateType { VCardUpdateNone = 0, ///< 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). + /// \note This enables recipients to distinguish between the absence of an image + /// (empty photo element) and mere support for the protocol (empty update child). }; QXmppPresence(QXmppPresence::Type type = QXmppPresence::Available); @@ -91,7 +87,7 @@ public: void setType(QXmppPresence::Type); QString statusText() const; - void setStatusText(const QString& statusText); + void setStatusText(const QString &statusText); // XEP-0045: Multi-User Chat QXmppMucItem mucItem() const; @@ -108,33 +104,33 @@ public: /// XEP-0153: vCard-Based Avatars QByteArray photoHash() const; - void setPhotoHash(const QByteArray&); + void setPhotoHash(const QByteArray &); VCardUpdateType vCardUpdateType() const; void setVCardUpdateType(VCardUpdateType type); // XEP-0115: Entity Capabilities QString capabilityHash() const; - void setCapabilityHash(const QString&); + void setCapabilityHash(const QString &); QString capabilityNode() const; - void setCapabilityNode(const QString&); + void setCapabilityNode(const QString &); QByteArray capabilityVer() const; - void setCapabilityVer(const QByteArray&); + void setCapabilityVer(const QByteArray &); QStringList capabilityExt() const; // XEP-0319: Last User Interaction in Presence QDateTime lastUserInteraction() const; - void setLastUserInteraction(const QDateTime&); + void setLastUserInteraction(const QDateTime &); // XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements QString mixUserJid() const; - void setMixUserJid(const QString&); + void setMixUserJid(const QString &); QString mixUserNick() const; - void setMixUserNick(const QString&); + void setMixUserNick(const QString &); /// \cond void parse(const QDomElement &element) override; @@ -149,4 +145,4 @@ private: QSharedDataPointer<QXmppPresencePrivate> d; }; -#endif // QXMPPPRESENCE_H +#endif // QXMPPPRESENCE_H |
