blob: 921718b7f6e6bf9bd5f2ae9d19347d1c20e73303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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"
|