aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-07-16 22:46:54 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-07-16 22:46:54 +0000
commit573491206b0bdb4ee2360d8c41b0da6a4bdb26b3 (patch)
tree7cf4c8c8ee76f6d7dcae9fac965d2832bb02970d /source
parent61795d98e536139e36e13babe3343c096a94dd73 (diff)
downloadqxmpp-573491206b0bdb4ee2360d8c41b0da6a4bdb26b3.tar.gz
make it possible to test whether a jingle candidate is null
Diffstat (limited to 'source')
-rw-r--r--source/QXmppJingleIq.cpp5
-rw-r--r--source/QXmppJingleIq.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/source/QXmppJingleIq.cpp b/source/QXmppJingleIq.cpp
index 7af47797..df1f133a 100644
--- a/source/QXmppJingleIq.cpp
+++ b/source/QXmppJingleIq.cpp
@@ -491,6 +491,11 @@ void QXmppJingleCandidate::setType(const QString &type)
m_type = type;
}
+bool QXmppJingleCandidate::isNull() const
+{
+ return m_host.isNull() || !m_port;
+}
+
void QXmppJingleCandidate::parse(const QDomElement &element)
{
m_component = element.attribute("component").toInt();
diff --git a/source/QXmppJingleIq.h b/source/QXmppJingleIq.h
index a6e49e40..6b377dd8 100644
--- a/source/QXmppJingleIq.h
+++ b/source/QXmppJingleIq.h
@@ -97,6 +97,8 @@ public:
QString type() const;
void setType(const QString &type);
+ bool isNull() const;
+
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;