aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 11:35:15 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 11:35:15 +0000
commitecb12c2dc5e019406a8a2d57677cc9ac1ac9adb2 (patch)
tree6d233b8d731a530f5c28306ec271fc52e4eaad85 /src
parent95b10ce06499f3e952b370b41fef1730bddd27fd (diff)
downloadqxmpp-ecb12c2dc5e019406a8a2d57677cc9ac1ac9adb2.tar.gz
improve QXmppPresence documentation
Diffstat (limited to 'src')
-rw-r--r--src/QXmppPresence.cpp26
-rw-r--r--src/QXmppPresence.h3
2 files changed, 29 insertions, 0 deletions
diff --git a/src/QXmppPresence.cpp b/src/QXmppPresence.cpp
index b5cbae9a..81a47d63 100644
--- a/src/QXmppPresence.cpp
+++ b/src/QXmppPresence.cpp
@@ -29,6 +29,11 @@
#include <QXmlStreamWriter>
#include "QXmppConstants.h"
+/// Constructs a QXmppPresence.
+///
+/// \param type
+/// \param status
+
QXmppPresence::QXmppPresence(QXmppPresence::Type type,
const QXmppPresence::Status& status)
: QXmppStanza(),
@@ -39,31 +44,52 @@ QXmppPresence::QXmppPresence(QXmppPresence::Type type,
}
+/// Destroys a QXmppPresence.
+
QXmppPresence::~QXmppPresence()
{
}
+/// 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::Type QXmppPresence::type() const
{
return m_type;
}
+/// Sets the presence type.
+///
+/// \param type
+
void QXmppPresence::setType(QXmppPresence::Type type)
{
m_type = type;
}
+/// Returns the presence status.
+
const QXmppPresence::Status& QXmppPresence::status() const
{
return m_status;
}
+/// Returns a reference to the presence status, allowing you to change it.
+
QXmppPresence::Status& QXmppPresence::status()
{
return m_status;
}
+/// Sets the presence status.
+///
+/// \param status
+
void QXmppPresence::setStatus(const QXmppPresence::Status& status)
{
m_status = status;
diff --git a/src/QXmppPresence.h b/src/QXmppPresence.h
index b94928f3..4066759b 100644
--- a/src/QXmppPresence.h
+++ b/src/QXmppPresence.h
@@ -33,6 +33,7 @@
class QXmppPresence : public QXmppStanza
{
public:
+ /// This enum is used to describe a presence type.
enum Type
{
Error = 0,
@@ -115,8 +116,10 @@ public:
const QXmppPresence::Status& status() const;
void setStatus(const QXmppPresence::Status&);
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
QByteArray photoHash() const;
void setPhotoHash(const QByteArray&);