summaryrefslogtreecommitdiffstats
path: root/tdecore/networkbackends
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-08 14:55:10 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-08 14:55:10 -0500
commita1f084dd42e4de29ff7df3865cdd7ea666ea4a22 (patch)
tree5846f43b31c29819fe983dc4506163f0d2e3e607 /tdecore/networkbackends
parent6a2462e30864406bba5ebe9627b44f960bdfa7cf (diff)
downloadtdelibs-a1f084dd42e4de29ff7df3865cdd7ea666ea4a22.tar.gz
tdelibs-a1f084dd42e4de29ff7df3865cdd7ea666ea4a22.zip
Add additional network event signals
Diffstat (limited to 'tdecore/networkbackends')
-rw-r--r--tdecore/networkbackends/network-manager/network-manager.cpp18
-rw-r--r--tdecore/networkbackends/network-manager/network-manager_p.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/tdecore/networkbackends/network-manager/network-manager.cpp b/tdecore/networkbackends/network-manager/network-manager.cpp
index db7e8c30d..c7394197b 100644
--- a/tdecore/networkbackends/network-manager/network-manager.cpp
+++ b/tdecore/networkbackends/network-manager/network-manager.cpp
@@ -1164,6 +1164,7 @@ TDENetworkConnectionManager_BackendNM::TDENetworkConnectionManager_BackendNM(TQS
if (d->m_wiFiDeviceProxy) {
connect(d->m_wiFiDeviceProxy, SIGNAL(AccessPointAdded(const TQT_DBusObjectPath&)), d, SLOT(internalProcessWiFiAccessPointAdded(const TQT_DBusObjectPath&)));
connect(d->m_wiFiDeviceProxy, SIGNAL(AccessPointRemoved(const TQT_DBusObjectPath&)), d, SLOT(internalProcessWiFiAccessPointRemoved(const TQT_DBusObjectPath&)));
+ connect(d->m_wiFiDeviceProxy, SIGNAL(PropertiesChanged(const TQMap<TQString, TQT_DBusVariant>&)), d, SLOT(internalProcessWiFiPropertiesChanged(const TQMap<TQString, TQT_DBusVariant>&)));
}
// Create public lists
@@ -1212,9 +1213,24 @@ void TDENetworkConnectionManager_BackendNMPrivate::internalProcessWiFiAccessPoin
}
}
+void TDENetworkConnectionManager_BackendNMPrivate::internalProcessWiFiPropertiesChanged(const TQMap<TQString, TQT_DBusVariant>& props) {
+ if (m_wiFiDeviceProxy) {
+ if (props.contains("ActiveAccessPoint")) {
+ TQT_DBusError error;
+ TDENetworkWiFiAPInfo* apInfo = m_parent->getAccessPointDetails(m_wiFiDeviceProxy->getActiveAccessPoint(error));
+ if (apInfo) {
+ m_parent->internalAccessPointStatusChanged(apInfo->BSSID, TDENetworkAPEventType::AccessPointChanged);
+ }
+ }
+ else if (props.contains("Bitrate")) {
+ m_parent->internalNetworkDeviceEvent(TDENetworkDeviceEventType::BitRateChanged);
+ }
+ }
+}
+
// FIXME
// If access point strength changes, this must be called:
-// m_parent->internalAccessPointStatusChanged(apInfo->BSSID, TDENetworkAPEventType::Lost);
+// m_parent->internalAccessPointStatusChanged(apInfo->BSSID, TDENetworkAPEventType::SignalStrengthChanged);
// How do I get NetworkManager to notify me when an access point changes strength? Do I have to poll it for this information?
TDENetworkDeviceType::TDENetworkDeviceType TDENetworkConnectionManager_BackendNM::deviceType() {
diff --git a/tdecore/networkbackends/network-manager/network-manager_p.h b/tdecore/networkbackends/network-manager/network-manager_p.h
index 0ead39e3f..98e4be066 100644
--- a/tdecore/networkbackends/network-manager/network-manager_p.h
+++ b/tdecore/networkbackends/network-manager/network-manager_p.h
@@ -90,6 +90,7 @@ class TDENetworkConnectionManager_BackendNMPrivate : public TQObject
void internalProcessDeviceStateChanged(TQ_UINT32 newState, TQ_UINT32 oldState, TQ_UINT32 reason);
void internalProcessWiFiAccessPointAdded(const TQT_DBusObjectPath&);
void internalProcessWiFiAccessPointRemoved(const TQT_DBusObjectPath&);
+ void internalProcessWiFiPropertiesChanged(const TQMap<TQString, TQT_DBusVariant>&);
private:
TDENetworkConnectionManager_BackendNM* m_parent;