Diffstat (limited to 'noncore/settings/networksettings2/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanedit.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanrun.cpp | 8 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanrun.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlanedit.cpp b/noncore/settings/networksettings2/wlan/wlanedit.cpp index 74174bf..73c0c7c 100644 --- a/noncore/settings/networksettings2/wlan/wlanedit.cpp +++ b/noncore/settings/networksettings2/wlan/wlanedit.cpp @@ -1,47 +1,47 @@ #include <qlineedit.h> #include <qprogressbar.h> #include <qcombobox.h> #include <qlabel.h> #include <qregexp.h> #include <qcheckbox.h> #include <GUIUtils.h> #include <resources.h> #include <wextensions.h> #include "wlanedit.h" #include "wlan_NN.h" #include "wlan_NNI.h" WLanEdit::WLanEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : WLanGUI( Parent ), RefreshTimer(this){ InterfaceInfo * II; NNI = TNNI; Dev = NNI->runtime()->device(); WE = 0; - if( ( II = NNI->connection()->assignedInterface() ) ) { + if( ( II = NNI->networkSetup()->assignedInterface() ) ) { // show data WE = new WExtensions( II->Name ); if( WE->doesHaveWirelessExtensions() ) { QString S; Station_LBL->setText( WE->station() ); ESSID_LBL->setText( WE->essid() ); Mode_LBL->setText( WE->mode() ); S.setNum( WE->frequency() ); Frequency_LBL->setText( S ); S.setNum( WE->channel() ); Channel_LBL->setText( S ); S.setNum( WE->rate() ); Rate_LBL->setText( S ); AP_LBL->setText( WE->ap() ); SLOT_Refresh(); connect( &RefreshTimer, SIGNAL( timeout() ), this, SLOT( SLOT_Refresh() ) ); } } } diff --git a/noncore/settings/networksettings2/wlan/wlanrun.cpp b/noncore/settings/networksettings2/wlan/wlanrun.cpp index b15a560..a0c5884 100644 --- a/noncore/settings/networksettings2/wlan/wlanrun.cpp +++ b/noncore/settings/networksettings2/wlan/wlanrun.cpp @@ -1,38 +1,38 @@ #include <qfile.h> #include <qtextstream.h> #include <qstringlist.h> #include <resources.h> #include "wlanrun.h" State_t WLanRun::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 ); if( F.open( IO_ReadOnly ) ) { // could open file -> read interface and assign QString X; QTextStream TS(&F); X = TS.readLine(); // find interface if( handlesInterface( X ) ) { for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); ++It ) { Run = It.current(); if( X == Run->Name ) { NC->assignInterface( Run ); return (Run->IsUp) ? IsUp : Available; } } } } @@ -49,72 +49,72 @@ State_t WLanRun::detectState( void ) { NC->assignInterface( 0 ); // find possible interface for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); It.current(); ++It ) { Run = It.current(); if( handlesInterface( *Run ) && ( Run->CardType == ARPHRD_ETHER #ifdef ARPHRD_IEEE1394 || Run->CardType == ARPHRD_IEEE1394 #endif ) && ! Run->IsUp ) { // proper type, and Not UP -> free return Off; } } return Unavailable; } -QString WLanRun::setMyState( NodeCollection * , Action_t , bool ) { +QString WLanRun::setMyState( NetworkSetup * , Action_t , bool ) { // we only handle activate and deactivate return QString(); } // get interface that is free or assigned to us InterfaceInfo * WLanRun::getInterface( void ) { System & S = NSResources->system(); InterfaceInfo * best = 0, * Run; for( QDictIterator<InterfaceInfo> It(S.interfaces()); It.current(); ++It ) { Run = It.current(); if( handlesInterface( *Run ) && ( Run->CardType == ARPHRD_ETHER #ifdef ARPHRD_IEEE1394 || Run->CardType == ARPHRD_IEEE1394 #endif ) ) { // this is a LAN card - if( Run->assignedConnection() == netNode()->connection() ) { + if( Run->assignedToNetworkSetup() == netNode()->networkSetup() ) { // assigned to us return Run; - } else if( Run->assignedConnection() == 0 ) { + } else if( Run->assignedToNetworkSetup() == 0 ) { // free best = Run; } } } return best; // can be 0 } bool WLanRun::handlesInterface( const QString & S ) { InterfaceInfo * II; II = NSResources->system().interface( S ); if( ( II = NSResources->system().interface( S ) ) ) { return handlesInterface( *II ); } return Pat.match( S ) >= 0; } bool WLanRun::handlesInterface( const InterfaceInfo & II ) { return ( Pat.match( II.Name ) < 0 ); } diff --git a/noncore/settings/networksettings2/wlan/wlanrun.h b/noncore/settings/networksettings2/wlan/wlanrun.h index fd325d4..e3e7735 100644 --- a/noncore/settings/networksettings2/wlan/wlanrun.h +++ b/noncore/settings/networksettings2/wlan/wlanrun.h @@ -3,34 +3,34 @@ #include <qregexp.h> #include <netnode.h> #include "wlandata.h" class WLanRun : public RuntimeInfo { public : WLanRun( ANetNodeInstance * NNI, WLanData & Data ) : RuntimeInfo( NNI ), Pat( "wlan[0-9]" ) { } virtual RuntimeInfo * device( void ) { return this; } bool handlesInterface( const QString & I ); bool handlesInterface( const InterfaceInfo & II ); State_t detectState( void ); protected : - QString setMyState( NodeCollection * , Action_t, bool ); + QString setMyState( NetworkSetup * , Action_t, bool ); private : InterfaceInfo * getInterface( void ); QRegExp Pat; WLanData * Data; }; #endif |