From b51a31c74dca7aae2f46d35353972946021518cd Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 19 Jul 2010 16:01:42 +0000 Subject: improve code documentation --- source/QXmppJingleIq.cpp | 82 ++++++++++++++++++++++++++++++++++++++++++------ source/QXmppJingleIq.h | 10 +++++- 2 files changed, 82 insertions(+), 10 deletions(-) (limited to 'source') 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; -- cgit v1.2.3