Add global network management event signal

pull/16/head
Timothy Pearson 12 years ago
parent 96765c9dea
commit 6b96deb4eb

@ -2488,6 +2488,7 @@ void TDENetworkConnectionManager_BackendNM::loadConnectionInformation() {
// Error!
PRINT_ERROR(error.name())
}
m_parent->internalNetworkManagementEvent(TDENetworkGlobalEventType::ConnectionListChanged);
}
}

@ -796,6 +796,10 @@ void TDENetworkConnectionManager::internalAccessPointStatusChanged(TDEMACAddress
emit(accessPointStatusChanged(BSSID, event));
}
void TDENetworkConnectionManager::internalNetworkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event) {
emit(networkManagementEvent(event));
}
/*================================================================================================*/
/* TDEGlobalNetworkManager */
/*================================================================================================*/
@ -804,7 +808,10 @@ TDEGlobalNetworkManager::TDEGlobalNetworkManager() : m_internalConnectionManager
#ifdef WITH_NETWORK_MANAGER_BACKEND
m_internalConnectionManager = new TDENetworkConnectionManager_BackendNM(TQString::null);
#endif // WITH_NETWORK_MANAGER_BACKEND
connect(m_internalConnectionManager, SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)), this, SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)));
if (m_internalConnectionManager) {
connect(m_internalConnectionManager, SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)), this, SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)));
connect(m_internalConnectionManager, SIGNAL(networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType)), this, SIGNAL(networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType)));
}
}
TDEGlobalNetworkManager::~TDEGlobalNetworkManager() {

@ -176,6 +176,14 @@ namespace TDENetworkSlaveDeviceType {
};
};
namespace TDENetworkGlobalEventType {
enum TDENetworkGlobalEventType {
ConnectionListChanged,
Other,
Last = Other
};
};
namespace TDENetworkAPEventType {
enum TDENetworkAPEventType {
Discovered,
@ -1089,6 +1097,12 @@ class TDECORE_EXPORT TDENetworkConnectionManager : public TQObject
*/
void accessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
/**
* Emitted whenever a global network management event occurs
* The event type that caused the signal is available in @param event
*/
void networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
public:
/**
* @return a TDENetworkConnectionList object containing a list of all
@ -1140,6 +1154,7 @@ class TDECORE_EXPORT TDENetworkConnectionManager : public TQObject
void internalNetworkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags newState);
void internalNetworkDeviceStateChanged(TDENetworkConnectionStatus::TDENetworkConnectionStatus newState, TQString hwAddress=TQString::null);
void internalAccessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
void internalNetworkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
protected:
TDENetworkConnectionList* m_connectionList;
@ -1291,6 +1306,12 @@ class TDECORE_EXPORT TDEGlobalNetworkManager : public TQObject
*/
void accessPointStatusChanged(TDEMACAddress BSSID, TDENetworkAPEventType::TDENetworkAPEventType event);
/**
* Emitted whenever a global network management event occurs
* The event type that caused the signal is available in @param event
*/
void networkManagementEvent(TDENetworkGlobalEventType::TDENetworkGlobalEventType event);
public:
/**
* @return a TDENetworkConnectionList object containing a list of all

Loading…
Cancel
Save