summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-04 16:01:51 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-04 16:01:51 -0500
commitfe3dbd6e6f8748ec07184c09081bcc31096750f9 (patch)
tree4efa9bf79f70557aa3c33690de83f3e501c39043 /tdecore
parent86febbf35190d680a61af4676704c5ece8a9de98 (diff)
downloadtdelibs-fe3dbd6e6f8748ec07184c09081bcc31096750f9.tar.gz
tdelibs-fe3dbd6e6f8748ec07184c09081bcc31096750f9.zip
Add active connection UUID to device
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/networkbackends/network-manager/network-manager.cpp12
-rw-r--r--tdecore/tdenetworkconnections.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp
index ea962367b..2f25153f4 100644
--- a/tdecore/networkbackends/network-manager/network-manager.cpp
+++ b/tdecore/networkbackends/network-manager/network-manager.cpp
@@ -1268,6 +1268,18 @@ TDENetworkDeviceInformation TDENetworkConnectionManager_BackendNM::deviceInforma
ret.firmwareMissing = d->m_networkDeviceProxy->getFirmwareMissing(error);
ret.deviceType = nmDeviceTypeToTDEDeviceType(d->m_networkDeviceProxy->getDeviceType(error));
// FIXME wiFiInfo is not filled in
+
+ // Get active connection UUID
+ TQT_DBusObjectPath connectionPath = d->m_networkDeviceProxy->getActiveConnection(error);
+ if (!error.isValid()) {
+ DBus::ActiveConnectionProxy activeConnection(NM_DBUS_SERVICE, connectionPath);
+ activeConnection.setConnection(TQT_DBusConnection::systemBus());
+ ret.activeConnectionUUID = activeConnection.getUuid(error);
+ if (!error.isValid()) {
+ ret.activeConnectionUUID = TQString::null;
+ }
+ }
+
ret.valid = true;
}
diff --git a/tdecore/tdenetworkconnections.h b/tdecore/tdenetworkconnections.h
index e41251b9d..e6e8d42cf 100644
--- a/tdecore/tdenetworkconnections.h
+++ b/tdecore/tdenetworkconnections.h
@@ -721,6 +721,7 @@ class TDECORE_EXPORT TDENetworkDeviceInformation
bool autoConnect;
bool firmwareMissing;
TDENetworkDeviceType::TDENetworkDeviceType deviceType;
+ TQString activeConnectionUUID;
TDENetworkWiFiDeviceInfo wiFiInfo;
};