mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
solid-networkstatus: remove support for ntrack
the project is dead and some distributions do not ship it anymore Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
bc2d42f12a
commit
4b9f0ef959
4 changed files with 0 additions and 150 deletions
|
@ -25,23 +25,6 @@ if(NETWORKMANAGER_FOUND)
|
|||
endif()
|
||||
endif(NETWORKMANAGER_FOUND)
|
||||
|
||||
macro_optional_find_package(QNtrack)
|
||||
set_package_properties(QNtrack PROPERTIES DESCRIPTION "Network status tracking library"
|
||||
URL "http://launchpad.net/ntrack"
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Provides data input for Solid network status"
|
||||
)
|
||||
|
||||
if(QNTRACK_FOUND)
|
||||
MESSAGE(STATUS "Found QNtrack, will use it as a data input for Solid network status")
|
||||
set(kded_networkstatus_PART_SRCS ${kded_networkstatus_PART_SRCS} ntracknetworkstate.cpp)
|
||||
add_definitions(-DHAVE_QNTRACK)
|
||||
else(QNTRACK_FOUND)
|
||||
MESSAGE(STATUS "QNtrack not found. Can be used as a data input to Solid network status. See https://launchpad.net/ntrack")
|
||||
endif(QNTRACK_FOUND)
|
||||
|
||||
include_directories(${QNTRACK_INCLUDE_DIR})
|
||||
|
||||
qt4_add_dbus_adaptor(kded_networkstatus_PART_SRCS ../org.kde.Solid.Networking.Service.xml
|
||||
networkstatus.h NetworkStatusModule)
|
||||
|
||||
|
@ -55,10 +38,6 @@ kde4_add_plugin(kded_networkstatus ${kded_networkstatus_PART_SRCS})
|
|||
|
||||
target_link_libraries(kded_networkstatus ${KDE4_KDECORE_LIBS})
|
||||
|
||||
if(QNTRACK_FOUND)
|
||||
target_link_libraries(kded_networkstatus ${QNTRACK_LIBRARIES})
|
||||
endif(QNTRACK_FOUND)
|
||||
|
||||
install(TARGETS kded_networkstatus DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
|
||||
install( FILES networkstatus.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "wicdstatus.h"
|
||||
|
||||
#include <kpluginfactory.h>
|
||||
#include "ntracknetworkstate.h"
|
||||
|
||||
K_PLUGIN_FACTORY(NetworkStatusFactory,
|
||||
registerPlugin<NetworkStatusModule>();
|
||||
|
@ -82,10 +81,6 @@ NetworkStatusModule::NetworkStatusModule(QObject* parent, const QList<QVariant>&
|
|||
new ClientAdaptor( this );
|
||||
new ServiceAdaptor( this );
|
||||
|
||||
#ifdef HAVE_QNTRACK
|
||||
new NtrackNetworkState( this );
|
||||
#endif
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2010 Sune Vuorela <sune@debian.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#include "ntracknetworkstate.h"
|
||||
|
||||
#include "networkstatus.h"
|
||||
|
||||
#include <Solid/Networking>
|
||||
|
||||
#include <KDebug>
|
||||
|
||||
Solid::Networking::Status ntrackstate2solidstatus(QNTrackState state)
|
||||
{
|
||||
kDebug( 1222 ) << "ntrackstate2solidstatus changed status: " << state;
|
||||
switch(state) {
|
||||
case NTRACK_STATE_UNKNOWN:
|
||||
case NTRACK_STATE_UNSET: {
|
||||
return Solid::Networking::Unknown;
|
||||
}
|
||||
case NTRACK_STATE_ONLINE: {
|
||||
return Solid::Networking::Connected;
|
||||
}
|
||||
case NTRACK_STATE_BLOCKED:
|
||||
case NTRACK_STATE_OFFLINE: {
|
||||
return Solid::Networking::Unconnected;
|
||||
}
|
||||
}
|
||||
//FAILSAFE
|
||||
return Solid::Networking::Unknown;
|
||||
}
|
||||
|
||||
NtrackNetworkState::NtrackNetworkState( NetworkStatusModule* statusmodule ) : QObject(statusmodule),m_statusmodule(statusmodule)
|
||||
{
|
||||
m_statusmodule->registerNetwork("ntrack", ntrackstate2solidstatus(QNtrack::instance()->networkState()),"ntrack backend");
|
||||
connect(QNtrack::instance(),SIGNAL(stateChanged(QNTrackState,QNTrackState)),this,SLOT(ntrackStateChangedSlot(QNTrackState,QNTrackState)));
|
||||
}
|
||||
|
||||
NtrackNetworkState::~NtrackNetworkState()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void NtrackNetworkState::ntrackStateChangedSlot(QNTrackState /*oldstate*/ , QNTrackState newstate )
|
||||
{
|
||||
kDebug( 1222 ) << "ntrack changed status: " << newstate;
|
||||
m_statusmodule->setNetworkStatus("ntrack",ntrackstate2solidstatus(newstate));
|
||||
}
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2010 Sune Vuorela <sune@debian.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef NTRACKNETWORKSTATE_H
|
||||
#define NTRACKNETWORKSTATE_H
|
||||
#ifdef HAVE_QNTRACK
|
||||
|
||||
#include <QObject>
|
||||
#include <QNtrack.h>
|
||||
|
||||
class NetworkStatusModule;
|
||||
|
||||
class NtrackNetworkState : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
NtrackNetworkState(NetworkStatusModule* statusmodule /*also parent in object hierachy*/);
|
||||
virtual ~NtrackNetworkState();
|
||||
private Q_SLOTS:
|
||||
/**
|
||||
* A slot to register the new state as reported by the ntrack part of things
|
||||
*/
|
||||
void ntrackStateChangedSlot(QNTrackState, QNTrackState newstate);
|
||||
private:
|
||||
NetworkStatusModule* m_statusmodule;
|
||||
};
|
||||
|
||||
#endif // HAVE_QNTRACK
|
||||
#endif // NTRACKNETWORKSTATE_H
|
Loading…
Add table
Reference in a new issue