diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/plugins/smpppdcs/detectornetworkstatus.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/smpppdcs/detectornetworkstatus.cpp')
-rw-r--r-- | kopete/plugins/smpppdcs/detectornetworkstatus.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp new file mode 100644 index 00000000..921718b7 --- /dev/null +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp @@ -0,0 +1,68 @@ +/* + detectornetworkstatus.cpp + + Copyright (c) 2006 by Heiko Schaefer <heiko@rangun.de> + + Kopete (c) 2002-2006 by the Kopete developers <kopete-devel@kde.org> + + ************************************************************************* + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ************************************************************************* +*/ + +#include <kdebug.h> + +#include "kopeteuiglobal.h" +#include "connectionmanager.h" + +#include "iconnector.h" +#include "detectornetworkstatus.h" + +DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) + : Detector(connector), m_connManager(NULL) { + + m_connManager = ConnectionManager::self(); + connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)), + this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus))); +} + +DetectorNetworkStatus::~DetectorNetworkStatus() {} + +void DetectorNetworkStatus::checkStatus() const { + // needs to do nothing +} + +void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) { + switch(status) { + case NetworkStatus::Offline: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl; + break; + case NetworkStatus::OfflineFailed: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineFailed" << endl; + break; + case NetworkStatus::OfflineDisconnected: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineDisconnected" << endl; + break; + case NetworkStatus::ShuttingDown: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::ShuttingDown" << endl; + break; + case NetworkStatus::Establishing: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Establishing" << endl; + break; + case NetworkStatus::Online: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Online" << endl; + break; + case NetworkStatus::NoNetworks: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::NoNetworks" << endl; + break; + case NetworkStatus::Unreachable: + kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Unreachable" << endl; + break; + } +} + +#include "detectornetworkstatus.moc" |