summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/cable/cablerun.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/cable/cablerun.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/cable/cablerun.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/noncore/settings/networksettings2/cable/cablerun.cpp b/noncore/settings/networksettings2/cable/cablerun.cpp
index 85660f6..7a8deb9 100644
--- a/noncore/settings/networksettings2/cable/cablerun.cpp
+++ b/noncore/settings/networksettings2/cable/cablerun.cpp
@@ -1,30 +1,22 @@
#include <fcntl.h>
#include <unistd.h>
#include "cablerun.h"
-void CableRun::detectState( NodeCollection * NC ) {
+State_t CableRun::detectState( void ) {
int fd = open( Data->Device.latin1(), O_RDWR );
if( fd < 0 ) {
- NC->setCurrentState( Unavailable );
+ return Unavailable;
}
close( fd );
- NC->setCurrentState( Available );
+ return Available;
}
-bool CableRun::setState( NodeCollection * NC, Action_t A, bool ) {
- if( A == Activate ) {
- detectState(NC);
- return (NC->currentState() == Available);
- }
- return 1;
-}
-
-bool CableRun::canSetState( State_t , Action_t ) {
- return 1;
+QString CableRun::setMyState( NodeCollection *, Action_t , bool ) {
+ return QString();
}
QString CableRun::deviceFile( void ) {
return Data->Device;
}