summaryrefslogtreecommitdiffstats
path: root/tdecore/tdenetworkconnections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/tdenetworkconnections.cpp')
-rw-r--r--tdecore/tdenetworkconnections.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp
index 71132825e..d9f4b5d97 100644
--- a/tdecore/tdenetworkconnections.cpp
+++ b/tdecore/tdenetworkconnections.cpp
@@ -635,6 +635,27 @@ TDENetworkConnection* TDENetworkConnectionManager::findConnectionByUUID(TQString
return NULL;
}
+TDENetworkDevice* TDENetworkConnectionManager::findDeviceByUUID(TQString uuid) {
+ TDEHardwareDevices *hwdevices = KGlobal::hardwareDevices();
+ if (!hwdevices) return NULL;
+
+ TDEGenericHardwareList devices = hwdevices->listByDeviceClass(TDEGenericDeviceType::Network);
+ for (TDEGenericHardwareList::iterator it = devices.begin(); it != devices.end(); ++it)
+ {
+ TDENetworkDevice* dev = dynamic_cast<TDENetworkDevice*>(*it);
+ if (dev) {
+ TDENetworkConnectionManager* deviceConnectionManager = dev->connectionManager();
+ if (deviceConnectionManager) {
+ if (deviceConnectionManager->deviceInformation().UUID == uuid) {
+ return dev;
+ }
+ }
+ }
+ }
+
+ return NULL;
+}
+
void TDENetworkConnectionManager::clearTDENetworkConnectionList() {
TDENetworkConnection *connection;
for (connection = m_connectionList->first(); connection; connection = m_connectionList->next()) {
@@ -724,6 +745,11 @@ TDENetworkHWNeighborList* TDEGlobalNetworkManager::siteSurvey() {
return m_internalConnectionManager->siteSurvey();
}
+TQStringList TDEGlobalNetworkManager::connectionPhysicalDeviceUUIDs(TQString uuid) {
+ if (!m_internalConnectionManager) return TQStringList();
+ return m_internalConnectionManager->connectionPhysicalDeviceUUIDs(uuid);
+}
+
bool TDEGlobalNetworkManager::networkingEnabled() {
if (!m_internalConnectionManager) return false;
return m_internalConnectionManager->networkingEnabled();
@@ -759,6 +785,11 @@ TDENetworkConnection* TDEGlobalNetworkManager::findConnectionByUUID(TQString uui
return m_internalConnectionManager->findConnectionByUUID(uuid);
}
+TDENetworkDevice* TDEGlobalNetworkManager::findDeviceByUUID(TQString uuid) {
+ if (!m_internalConnectionManager) return NULL;
+ return m_internalConnectionManager->findDeviceByUUID(uuid);
+}
+
/*================================================================================================*/
/* End */
/*================================================================================================*/