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/network/network_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/network/network_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/network_NNI.cpp | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp index 324c6e2..78e6545 100644 --- a/noncore/settings/networksettings2/network/network_NNI.cpp +++ b/noncore/settings/networksettings2/network/network_NNI.cpp @@ -1,4 +1,4 @@ #include <system.h> -#include <asdevice.h> +#include <netnode.h> #include "networkedit.h" #include "network_NNI.h" @@ -100,13 +100,11 @@ void ANetwork::commit( void ) { } -bool ANetwork::hasDataForFile( const QString & S ) { - return S == "interfaces"; +bool ANetwork::hasDataForFile( SystemFile & S ) { + return S.name() == "interfaces"; } -short ANetwork::generateFile( const QString & ID, - const QString & Path, - QTextStream &TS, - long DevNr - ) { +short ANetwork::generateFile( SystemFile &SF, + long DevNr + ) { short rvl, rvd ; @@ -114,9 +112,9 @@ short ANetwork::generateFile( const QString & ID, rvl = 1; - if( ID == "interfaces" ) { - Log(("Generate Network for %s\n", ID.latin1() )); + if( SF.name() == "interfaces" ) { + Log(("Generate Network for %s\n", SF.name().latin1() )); // we can safely call from here since device item is deeper if( Data.UseDHCP ) { - TS << "iface " + SF << "iface " << NIC << "-c" @@ -124,5 +122,5 @@ short ANetwork::generateFile( const QString & ID, << "-allowed inet dhcp" << endl; - TS << " up echo \"" + SF << " up echo \"" << NIC << "\" > /tmp/profile-" @@ -131,20 +129,20 @@ short ANetwork::generateFile( const QString & ID, << endl; if( Data.SendHostname ) { - TS << " hostname " + SF << " hostname " << Data.Hostname << endl; } - TS << " down rm -f /tmp/profile-" + SF << " down rm -f /tmp/profile-" << connection()->number() << ".up" << endl; } else { - TS << "iface " + SF << "iface " << NIC << "-c" << connection()->number() << "-allowed inet static" << endl; - TS << " up echo \"" + SF << " up echo \"" << NIC << "\" > /tmp/profile-" @@ -152,15 +150,15 @@ short ANetwork::generateFile( const QString & ID, << ".up" << endl; - TS << " down rm -f /tmp/profile-" + SF << " down rm -f /tmp/profile-" << connection()->number() << ".up" << endl; - TS << " address " + SF << " address " << Data.IPAddress << endl; - TS << " broadcast " + SF << " broadcast " << Data.Broadcast << endl; - TS << " netmask " + SF << " netmask " << Data.NetMask << endl; @@ -176,5 +174,5 @@ short ANetwork::generateFile( const QString & ID, arg( ipal[2].toShort() & nmal[2].toShort() ). arg( ipal[3].toShort() & nmal[3].toShort() ); - TS << " network " + SF << " network " << NW << endl; @@ -184,5 +182,5 @@ short ANetwork::generateFile( const QString & ID, it != Data.PreUp_SL.end(); ++it ) { - TS << " pre-up " + SF << " pre-up " << (*it) << endl; @@ -191,5 +189,5 @@ short ANetwork::generateFile( const QString & ID, it != Data.PostUp_SL.end(); ++it ) { - TS << " up " + SF << " up " << (*it) << endl; @@ -198,5 +196,5 @@ short ANetwork::generateFile( const QString & ID, it != Data.PreDown_SL.end(); ++it ) { - TS << " down " + SF << " down " << (*it) << endl; @@ -205,5 +203,5 @@ short ANetwork::generateFile( const QString & ID, it != Data.PostDown_SL.end(); ++it ) { - TS << " post-down " + SF << " post-down " << (*it) << endl; @@ -213,5 +211,5 @@ short ANetwork::generateFile( const QString & ID, // embed other info in it - rvd = connection()->getToplevel()->generateFileEmbedded( ID, Path, TS, DevNr ); + rvd = connection()->getToplevel()->generateFileEmbedded( SF, DevNr ); return (rvd == 2 || rvl == 2 ) ? 2 : |