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 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 9 deletions(-) (limited to 'source/QXmppJingleIq.cpp') 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; -- cgit v1.2.3