From d4745d88937867b0d65f73bc85edf6ae7b8b8cc3 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 5 Sep 2012 10:38:49 -0500 Subject: Add wireless AP detect signals --- tdecore/tdenetworkconnections.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tdecore/tdenetworkconnections.cpp') diff --git a/tdecore/tdenetworkconnections.cpp b/tdecore/tdenetworkconnections.cpp index d9f4b5d97..cc4c4b94d 100644 --- a/tdecore/tdenetworkconnections.cpp +++ b/tdecore/tdenetworkconnections.cpp @@ -656,6 +656,20 @@ TDENetworkDevice* TDENetworkConnectionManager::findDeviceByUUID(TQString uuid) { return NULL; } +TDENetworkWiFiAPInfo* TDENetworkConnectionManager::findAccessPointByBSSID(TDEMACAddress bssid) { + TDENetworkHWNeighbor *neighbor; + for (neighbor = m_hwNeighborList->first(); neighbor; neighbor = m_hwNeighborList->next()) { + TDENetworkWiFiAPInfo* apInfo = dynamic_cast(neighbor); + if (!apInfo) { + continue; + } + if (apInfo->BSSID == bssid) { + return apInfo; + } + } + return NULL; +} + void TDENetworkConnectionManager::clearTDENetworkConnectionList() { TDENetworkConnection *connection; for (connection = m_connectionList->first(); connection; connection = m_connectionList->next()) { @@ -685,6 +699,10 @@ void TDENetworkConnectionManager::internalNetworkDeviceStateChanged(TDENetworkCo m_prevDeviceStatus[hwAddress] = newState; } +void TDENetworkConnectionManager::internalAccessPointVisibilityChanged(TDEMACAddress BSSID, bool detected) { + emit(accessPointVisibilityChanged(BSSID, detected)); +} + /*================================================================================================*/ /* TDEGlobalNetworkManager */ /*================================================================================================*/ @@ -790,6 +808,11 @@ TDENetworkDevice* TDEGlobalNetworkManager::findDeviceByUUID(TQString uuid) { return m_internalConnectionManager->findDeviceByUUID(uuid); } +TDENetworkWiFiAPInfo* TDEGlobalNetworkManager::findAccessPointByBSSID(TDEMACAddress bssid) { + if (!m_internalConnectionManager) return NULL; + return m_internalConnectionManager->findAccessPointByBSSID(bssid); +} + /*================================================================================================*/ /* End */ /*================================================================================================*/ -- cgit v1.2.1