zeroconf: add QNetworkInterface interface to Service

Change-Id: Ia357f21086cf0df7144b0602acc392d3f8a22348
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Fawzi Mohamed
2012-04-04 21:47:59 +02:00
parent 689e5a09f3
commit cc378a4c32
3 changed files with 16 additions and 3 deletions

View File

@@ -52,6 +52,7 @@
#include <QGlobalStatic>
#include <QMetaType>
#include <QMutexLocker>
#include <QNetworkInterface>
#include <QString>
#include <QStringList>
#include <QtEndian>
@@ -271,6 +272,16 @@ Service::~Service()
delete m_host;
}
/*!
\fn QString Service::interface()
Returns the interface on which the service is reachable.
*/
QNetworkInterface Service::interface() const
{
return QNetworkInterface::interfaceFromIndex(m_interfaceNr);
}
bool Service::operator==(const Service &o) const {
bool eq = m_fullName == o.m_fullName
&& m_name == o.m_name && m_type == o.m_type