author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (side-by-side diff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/wlan/wlan_NNI.cpp | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/settings/networksettings2/wlan/wlan_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NNI.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlan_NNI.cpp b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp index 0e4fc4c..d5b1014 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NNI.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp @@ -34,118 +34,116 @@ void AWLan::setSpecificAttribute( QString & A, QString & V ) { Data.Encrypted = (V=="yes"); } else if( A == "acceptnonencrypted" ) { Data.AcceptNonEncrypted = (V=="yes"); } else if( A == "key0" ) { Data.Key[0] = V; } else if( A == "key1" ) { Data.Key[1] = V; } else if( A == "key2" ) { Data.Key[2] = V; } else if( A == "key3" ) { Data.Key[3] = V; } } void AWLan::saveSpecificAttribute( QTextStream & S ) { S << "essid=" << quote( Data.ESSID ) << endl; S << "nodename=" << quote( Data.NodeName ) << endl; S << "mode=" << Data.Mode << endl; S << "specificap=" << ((Data.SpecificAP) ? "yes" : "no") << endl; S << "apmac=" << Data.APMac << endl; S << "encrypted=" << ((Data.Encrypted) ? "yes" : "no") << endl; S << "acceptnonencrypted=" << ((Data.AcceptNonEncrypted) ? "yes" : "no") << endl; for( int i = 0 ;i < 4 ; i ++ ) { S << "key" << i << "=" << Data.Key[i] << endl; } } QWidget * AWLan::edit( QWidget * parent ) { GUI = new WLanEdit( parent, this ); GUI->showData( Data ); return GUI; } QString AWLan::acceptable( void ) { return ( GUI ) ? GUI->acceptable( ) : QString(); } void AWLan::commit( void ) { if( GUI && GUI->commit( Data ) ) setModified( 1 ); } -short AWLan::generateFileEmbedded( const QString & ID, - const QString & Path, - QTextStream & TS, +short AWLan::generateFileEmbedded( SystemFile & SF, long DevNr ) { short rvl, rvd; rvl = 1; - if( ID == "interfaces" ) { - Log(("Generate WLanNNI for %s\n", ID.latin1() )); - TS << " wireless_essid \"" + if( SF.name() == "interfaces" ) { + Log(("Generate WLanNNI for %s\n", SF.name().latin1() )); + SF << " wireless_essid \"" << Data.ESSID << "\"" << endl; if( ! Data.NodeName.isEmpty() ) { if( Data.NodeName == tr("<UseHostName>") ) { char Buf[100]; if( gethostname(Buf, sizeof(Buf) ) == 0 ) { Buf[99] = '\0'; // just to make sure - TS << " wireless_nick " + SF << " wireless_nick " << Buf << endl; } } else { - TS << " wireless_nick \"" + SF << " wireless_nick \"" << Data.NodeName << "\"" << endl; } } char * M = "Auto"; switch ( Data.Mode ) { case 0 : break; case 1 : M = "Managed"; break; case 2 : M = "Ad-Hoc"; break; } - TS << " wireless_mode " + SF << " wireless_mode " << M << endl; if( Data.Encrypted ) { for( int i = 0; i < 4; i ++ ) { if( ! Data.Key[i].isEmpty() ) { - TS << " wireless_key" + SF << " wireless_key" << i << " " << Data.Key[i] << endl; } } - TS << " wireless_keymode " + SF << " wireless_keymode " << ((Data.AcceptNonEncrypted) ? "open" : "restricted") << endl; } rvl = 0; } - rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr); + rvd = ANetNodeInstance::generateFileEmbedded( SF, DevNr); return (rvd == 2 || rvl == 2 ) ? 2 : (rvd == 0 || rvl == 0 ) ? 0 : 1; } |