aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 09:43:05 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 09:43:05 +0000
commitf8253c3f6da17ac20919b7a1e2c4ca7bfdfea5e9 (patch)
treedeb5d934dc94c84b8a63153fb217edaa6fdef24f /src
parente4b647e931e862ccdac12ef4a6b4e58ab5e76211 (diff)
downloadqxmpp-f8253c3f6da17ac20919b7a1e2c4ca7bfdfea5e9.tar.gz
add some documentation for QXmppArchiveIq
Diffstat (limited to 'src')
-rw-r--r--src/QXmppArchiveIq.cpp33
-rw-r--r--src/QXmppArchiveIq.h16
2 files changed, 49 insertions, 0 deletions
diff --git a/src/QXmppArchiveIq.cpp b/src/QXmppArchiveIq.cpp
index eb4c6ccd..c1b5d62c 100644
--- a/src/QXmppArchiveIq.cpp
+++ b/src/QXmppArchiveIq.cpp
@@ -29,31 +29,48 @@
static const char *ns_archive = "urn:xmpp:archive";
static const char *ns_rsm = "http://jabber.org/protocol/rsm";
+/// Returns the archived message's body.
+
QString QXmppArchiveMessage::body() const
{
return m_body;
}
+/// Sets the archived message's body.
+///
+/// \param body
void QXmppArchiveMessage::setBody(const QString &body)
{
m_body = body;
}
+/// Returns the archived message's date.
+
QDateTime QXmppArchiveMessage::date() const
{
return m_date;
}
+//// Sets the archived message's date.
+///
+/// \param date
+
void QXmppArchiveMessage::setDate(const QDateTime &date)
{
m_date = date;
}
+/// Returns true if the archived message was received, false if it was sent.
+
bool QXmppArchiveMessage::isReceived() const
{
return m_received;
}
+/// Set to true if the archived message was received, false if it was sent.
+///
+/// \param isReceived
+
void QXmppArchiveMessage::setReceived(bool isReceived)
{
m_received = isReceived;
@@ -100,31 +117,43 @@ void QXmppArchiveChat::toXml(QXmlStreamWriter *writer) const
writer->writeEndElement();
}
+/// Returns the conversation's messages.
+
QList<QXmppArchiveMessage> QXmppArchiveChat::messages() const
{
return m_messages;
}
+/// Returns the start of this conversation.
+
QDateTime QXmppArchiveChat::start() const
{
return m_start;
}
+/// Returns the conversation's subject.
+
QString QXmppArchiveChat::subject() const
{
return m_subject;
}
+/// Returns the conversation's version.
+
int QXmppArchiveChat::version() const
{
return m_version;
}
+/// Returns the JID of the remote party.
+
QString QXmppArchiveChat::with() const
{
return m_with;
}
+/// Returns the chat conversation carried by this IQ.
+
QXmppArchiveChat QXmppArchiveChatIq::chat() const
{
return m_chat;
@@ -147,11 +176,15 @@ void QXmppArchiveChatIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
m_chat.toXml(writer);
}
+/// Constructs a QXmppArchiveListIq.
+
QXmppArchiveListIq::QXmppArchiveListIq()
: QXmppIq(QXmppIq::Get), m_max(0)
{
}
+/// Returns the list of chat conversations.
+
QList<QXmppArchiveChat> QXmppArchiveListIq::chats() const
{
return m_chats;
diff --git a/src/QXmppArchiveIq.h b/src/QXmppArchiveIq.h
index 7f51343a..a9390d41 100644
--- a/src/QXmppArchiveIq.h
+++ b/src/QXmppArchiveIq.h
@@ -31,6 +31,9 @@
class QXmlStreamWriter;
class QDomElement;
+/// \brief The QXmppArchiveMessage represents an archived message
+/// as defined by XEP-0136: Message Archiving.
+
class QXmppArchiveMessage
{
public:
@@ -49,6 +52,9 @@ private:
bool m_received;
};
+/// \brief The QXmppArchiveChat represents an archived conversation
+/// as defined by XEP-0136: Message Archiving.
+
class QXmppArchiveChat
{
public:
@@ -58,8 +64,10 @@ public:
int version() const;
QString with() const;
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
private:
QList<QXmppArchiveMessage> m_messages;
@@ -80,7 +88,9 @@ class QXmppArchiveChatIq : public QXmppIq
public:
QXmppArchiveChat chat() const;
+ /// \cond
static bool isArchiveChatIq(const QDomElement &element);
+ /// \endcond
protected:
/// \cond
@@ -115,7 +125,9 @@ public:
QDateTime end() const;
void setEnd(const QDateTime &end );
+ /// \cond
static bool isArchiveListIq(const QDomElement &element);
+ /// \endcond
protected:
/// \cond
@@ -149,7 +161,9 @@ public:
QString with() const;
void setWith(const QString &with);
+ /// \cond
static bool isArchiveRetrieveIq(const QDomElement &element);
+ /// \endcond
protected:
/// \cond
@@ -170,7 +184,9 @@ private:
class QXmppArchivePrefIq : public QXmppIq
{
public:
+ /// \cond
static bool isArchivePrefIq(const QDomElement &element);
+ /// \endcond
protected:
/// \cond