summaryrefslogtreecommitdiffstats
path: root/src/knx/netip/qknxnetipserverinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knx/netip/qknxnetipserverinfo.cpp')
-rw-r--r--src/knx/netip/qknxnetipserverinfo.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/knx/netip/qknxnetipserverinfo.cpp b/src/knx/netip/qknxnetipserverinfo.cpp
index 31ac706..d0203ad 100644
--- a/src/knx/netip/qknxnetipserverinfo.cpp
+++ b/src/knx/netip/qknxnetipserverinfo.cpp
@@ -254,6 +254,19 @@ QKnxNetIpDib QKnxNetIpServerInfo::extendedHardware() const
}
/*!
+ \since 5.14
+
+ Returns the network interface which has been used to discover the KNXnet/IP
+ server hardware.
+
+ \sa QNetworkInterface
+*/
+QNetworkInterface QKnxNetIpServerInfo::networkInterface() const
+{
+ return d_ptr->interface;
+}
+
+/*!
Constructs a copy of \a other.
*/
QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpServerInfo &other)
@@ -321,16 +334,13 @@ void QKnxNetIpServerInfo::swap(QKnxNetIpServerInfo &other) Q_DECL_NOTHROW
d_ptr.swap(other.d_ptr);
}
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/*!
\internal
*/
QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpHpai &hpai, const QKnxNetIpDib &hardware,
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QKnxNetIpDib services)
-#else
- const QKnxNetIpDib &services) // ### Qt6: pass services as const reference
-#endif
: QKnxNetIpServerInfo()
{
d_ptr->hpai = hpai;
@@ -338,12 +348,22 @@ QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpHpai &hpai, const QKnxNe
d_ptr->services = services;
}
-
/*!
\internal
*/
QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpHpai &hpai, const QKnxNetIpDib &hardware,
const QKnxNetIpDib &services, const QKnxNetIpDib &tunneling, const QKnxNetIpDib &extHardware)
+ : QKnxNetIpServerInfo(hpai, hardware, services, {}, tunneling, extHardware)
+{}
+
+#endif
+
+/*!
+ \internal
+*/
+QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpHpai &hpai, const QKnxNetIpDib &hardware,
+ const QKnxNetIpDib &services, const QNetworkInterface &iface, const QKnxNetIpDib &tunneling,
+ const QKnxNetIpDib &extHardware)
: QKnxNetIpServerInfo()
{
d_ptr->hpai = hpai;
@@ -351,6 +371,7 @@ QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpHpai &hpai, const QKnxNe
d_ptr->services = services;
d_ptr->tunnelingInfo = tunneling;
d_ptr->extendedHardware = extHardware;
+ d_ptr->interface = iface;
}
/*!