00001 #include <fcntl.h> 00002 #include <unistd.h> 00003 #include "cablerun.h" 00004 00005 State_t CableRun::detectState( void ) { 00006 00007 int fd = open( Data->Device.latin1(), O_RDWR ); 00008 00009 if( fd < 0 ) { 00010 return Unavailable; 00011 } 00012 close( fd ); 00013 return Available; 00014 } 00015 00016 QString CableRun::setMyState( NetworkSetup *, Action_t , bool ) { 00017 return QString(); 00018 } 00019 00020 QString CableRun::deviceFile( void ) { 00021 return Data->Device; 00022 }
1.4.2