summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/network/network_NNI.cpp
Side-by-side diff
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.cpp50
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,3 +1,3 @@
#include <system.h>
-#include <asdevice.h>
+#include <netnode.h>
#include "networkedit.h"
@@ -101,11 +101,9 @@ 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
+ ) {
@@ -115,7 +113,7 @@ 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
@@ -125,3 +123,3 @@ short ANetwork::generateFile( const QString & ID,
<< endl;
- TS << " up echo \""
+ SF << " up echo \""
<< NIC
@@ -132,3 +130,3 @@ short ANetwork::generateFile( const QString & ID,
if( Data.SendHostname ) {
- TS << " hostname "
+ SF << " hostname "
<< Data.Hostname
@@ -137,3 +135,3 @@ short ANetwork::generateFile( const QString & ID,
- TS << " down rm -f /tmp/profile-"
+ SF << " down rm -f /tmp/profile-"
<< connection()->number()
@@ -142,3 +140,3 @@ short ANetwork::generateFile( const QString & ID,
} else {
- TS << "iface "
+ SF << "iface "
<< NIC << "-c"
@@ -147,3 +145,3 @@ short ANetwork::generateFile( const QString & ID,
<< endl;
- TS << " up echo \""
+ SF << " up echo \""
<< NIC
@@ -153,3 +151,3 @@ short ANetwork::generateFile( const QString & ID,
<< endl;
- TS << " down rm -f /tmp/profile-"
+ SF << " down rm -f /tmp/profile-"
<< connection()->number()
@@ -157,9 +155,9 @@ short ANetwork::generateFile( const QString & ID,
<< endl;
- TS << " address "
+ SF << " address "
<< Data.IPAddress
<< endl;
- TS << " broadcast "
+ SF << " broadcast "
<< Data.Broadcast
<< endl;
- TS << " netmask "
+ SF << " netmask "
<< Data.NetMask
@@ -177,3 +175,3 @@ short ANetwork::generateFile( const QString & ID,
arg( ipal[3].toShort() & nmal[3].toShort() );
- TS << " network "
+ SF << " network "
<< NW
@@ -185,3 +183,3 @@ short ANetwork::generateFile( const QString & ID,
++it ) {
- TS << " pre-up "
+ SF << " pre-up "
<< (*it)
@@ -192,3 +190,3 @@ short ANetwork::generateFile( const QString & ID,
++it ) {
- TS << " up "
+ SF << " up "
<< (*it)
@@ -199,3 +197,3 @@ short ANetwork::generateFile( const QString & ID,
++it ) {
- TS << " down "
+ SF << " down "
<< (*it)
@@ -206,3 +204,3 @@ short ANetwork::generateFile( const QString & ID,
++it ) {
- TS << " post-down "
+ SF << " post-down "
<< (*it)
@@ -214,3 +212,3 @@ 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 );