From 573491206b0bdb4ee2360d8c41b0da6a4bdb26b3 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 16 Jul 2010 22:46:54 +0000 Subject: make it possible to test whether a jingle candidate is null --- source/QXmppJingleIq.cpp | 5 +++++ source/QXmppJingleIq.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'source') 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; -- cgit v1.2.3