aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-07-19 16:01:42 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-07-19 16:01:42 +0000
commitb51a31c74dca7aae2f46d35353972946021518cd (patch)
tree475812e5c6d9c29ca1e1eba67c27ca10c85fcb2b /source
parentc984459de1b0712dd1869112f418762539e1d36f (diff)
downloadqxmpp-b51a31c74dca7aae2f46d35353972946021518cd.tar.gz
improve code documentation
Diffstat (limited to 'source')
-rw-r--r--source/QXmppJingleIq.cpp82
-rw-r--r--source/QXmppJingleIq.h10
2 files changed, 82 insertions, 10 deletions
diff --git a/source/QXmppJingleIq.cpp b/source/QXmppJingleIq.cpp
index 066476fe..6ae4f2b9 100644
--- a/source/QXmppJingleIq.cpp
+++ b/source/QXmppJingleIq.cpp
@@ -401,96 +401,160 @@ QXmppJingleCandidate::QXmppJingleCandidate()
{
}
+/// Returns the candidate's component ID.
+
int QXmppJingleCandidate::component() const
{
return m_component;
}
+/// Sets the candidates's component ID.
+///
+/// \param component
+
void QXmppJingleCandidate::setComponent(int component)
{
m_component = component;
}
+/// Returns the candidate's foundation.
+
int QXmppJingleCandidate::foundation() const
{
return m_foundation;
}
+/// Sets the candidate's foundation.
+///
+/// \param foundation
+
void QXmppJingleCandidate::setFoundation(int foundation)
{
m_foundation = foundation;
}
+/// Returns the candidate's host address.
+///
+
QHostAddress QXmppJingleCandidate::host() const
{
return m_host;
}
+/// Sets the candidate's host address.
+///
+/// \param host
+
void QXmppJingleCandidate::setHost(const QHostAddress &host)
{
m_host = host;
}
+/// Returns the candidate's unique identifier.
+///
+
QString QXmppJingleCandidate::id() const
{
return m_id;
}
+/// Sets the candidate's unique identifier.
+///
+/// \param id
+
void QXmppJingleCandidate::setId(const QString &id)
{
m_id = id;
}
+/// Returns the network index (starting at 0) the candidate is on.
+///
+
int QXmppJingleCandidate::network() const
{
return m_network;
}
+/// Sets the network index (starting at 0) the candidate is on.
+///
+/// \param network
+
void QXmppJingleCandidate::setNetwork(int network)
{
m_network = network;
}
+/// Returns the candidate's port number.
+///
+
+quint16 QXmppJingleCandidate::port() const
+{
+ return m_port;
+}
+
+/// Sets the candidate's port number.
+///
+/// \param port
+
+void QXmppJingleCandidate::setPort(quint16 port)
+{
+ m_port = port;
+}
+
+/// Returns the candidate's priority.
+///
+
int QXmppJingleCandidate::priority() const
{
return m_priority;
}
+/// Sets the candidate's priority.
+///
+/// \param priority
+
void QXmppJingleCandidate::setPriority(int priority)
{
m_priority = priority;
}
+/// Returns the candidate's protocol (e.g. "udp").
+///
+
QString QXmppJingleCandidate::protocol() const
{
return m_protocol;
}
+/// Sets the candidate's protocol (e.g. "udp").
+///
+/// \param protocol
+
void QXmppJingleCandidate::setProtocol(const QString &protocol)
{
m_protocol = protocol;
}
-quint16 QXmppJingleCandidate::port() const
-{
- return m_port;
-}
-
-void QXmppJingleCandidate::setPort(quint16 port)
-{
- m_port = port;
-}
+/// Returns the candidate type (e.g. "host").
+///
QString QXmppJingleCandidate::type() const
{
return m_type;
}
+/// Sets the candidate type (e.g. "host").
+///
+/// \param type
+
void QXmppJingleCandidate::setType(const QString &type)
{
m_type = type;
}
+/// Returns true if the host address or port are empty.
+///
+
bool QXmppJingleCandidate::isNull() const
{
return m_host.isNull() || !m_port;
diff --git a/source/QXmppJingleIq.h b/source/QXmppJingleIq.h
index 611ef3ed..213da34d 100644
--- a/source/QXmppJingleIq.h
+++ b/source/QXmppJingleIq.h
@@ -29,7 +29,7 @@
#include "QXmppIq.h"
/// \brief The QXmppJinglePayloadType class represents a payload type
-/// as specified by XEP-0167: Jingle RTP Sessions.
+/// as specified by XEP-0167: Jingle RTP Sessions and RFC 5245.
///
class QXmppJinglePayloadType
@@ -55,8 +55,10 @@ public:
unsigned int ptime() const;
void setPtime(unsigned int ptime);
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
bool operator==(const QXmppJinglePayloadType &other) const;
@@ -107,8 +109,10 @@ public:
bool isNull() const;
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
private:
int m_component;
@@ -185,8 +189,10 @@ public:
QString transportPassword() const;
void setTransportPassword(const QString &password);
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
private:
QString m_creator;
@@ -240,8 +246,10 @@ public:
Type type() const;
void setType(Type type);
+ /// \cond
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
private:
QString m_text;