Diffstat (limited to 'noncore/settings/networksettings2/usb/usbrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/usb/usbrun.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp index 763644e..4082f7f 100644 --- a/noncore/settings/networksettings2/usb/usbrun.cpp +++ b/noncore/settings/networksettings2/usb/usbrun.cpp @@ -1,25 +1,25 @@ #include <qfile.h> #include <qfileinfo.h> #include <qtextstream.h> #include <resources.h> #include "usbrun.h" State_t USBRun::detectState( void ) { // unavailable : no card found // available : card found and assigned to us or free // up : card found and assigned to us and up - NodeCollection * NC = nodeCollection(); + NetworkSetup * NC = networkSetup(); QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); System & Sys = NSResources->system(); InterfaceInfo * Run; QFile F( S ); Log(("Detecting for %s\n", NC->name().latin1() )); if( F.open( IO_ReadOnly ) ) { // could open file -> read interface and assign QString X; QTextStream TS(&F); X = TS.readLine(); Log(("%s exists\n", S.latin1() )); @@ -52,25 +52,25 @@ State_t USBRun::detectState( void ) { // find possible interface if( getInterface() ) { // proper type, and Not UP -> free // usb cables are currently always available when requested // until we can detect if we are plugged in return Available; } return Unavailable; } -QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) { +QString USBRun::setMyState( NetworkSetup * NC, Action_t, bool ) { InterfaceInfo * I = getInterface(); if( ! I ) { return QString("No usb device available"); } Log(( "Grabbed USB interface %s\n", I->Name.latin1() )); // grab this interface NC->assignInterface( I ); return QString(); @@ -88,29 +88,29 @@ InterfaceInfo * USBRun::getInterface( void ) { Run = It.current(); Log(("%s %d %d=%d %d\n", Run->Name.latin1(), handlesInterface( Run->Name ), Run->CardType, ARPHRD_ETHER, ! Run->IsUp )); if( handlesInterface( Run->Name ) && Run->CardType == ARPHRD_ETHER ) { // this is a USB card - if( Run->assignedConnection() == netNode()->connection() ) { + if( Run->assignedToNetworkSetup() == netNode()->networkSetup() ) { // assigned to us return Run; } else if( ! Run->IsUp && - Run->assignedConnection() == 0 ) { + Run->assignedToNetworkSetup() == 0 ) { // free best = Run; } // UP or not assigned to us } } return best; // can be 0 } bool USBRun::handlesInterface( const QString & S ) { return Pat.match( S ) >= 0; } |