Diffstat (limited to 'noncore/settings/networksettings2/lancard') (more/less context) (ignore whitespace changes)
4 files changed, 10 insertions, 51 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index 05cd06d..20ae7f6 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp | |||
@@ -39,27 +39,4 @@ const char * LanCardNetNode::provides( void ) { | |||
39 | } | 39 | } |
40 | 40 | ||
41 | bool LanCardNetNode::generateProperFilesFor( | ||
42 | ANetNodeInstance * ) { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | bool LanCardNetNode::hasDataFor( const QString & S ) { | ||
47 | return S == "interfaces"; | ||
48 | } | ||
49 | |||
50 | bool LanCardNetNode::generateDeviceDataForCommonFile( | ||
51 | SystemFile & S , | ||
52 | long DevNr ) { | ||
53 | QString NIC = genNic( DevNr ); | ||
54 | |||
55 | if( S.name() == "interfaces" ) { | ||
56 | // generate mapping stanza for this interface | ||
57 | S << "# check if " << NIC << " can be brought UP" << endl; | ||
58 | S << "mapping " << NIC << endl; | ||
59 | S << " script networksettings2-request" << endl << endl; | ||
60 | } | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | QString LanCardNetNode::genNic( long nr ) { | 41 | QString LanCardNetNode::genNic( long nr ) { |
65 | QString S; | 42 | QString S; |
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.h b/noncore/settings/networksettings2/lancard/lancard_NN.h index d58823c..6882af7 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.h +++ b/noncore/settings/networksettings2/lancard/lancard_NN.h | |||
@@ -19,21 +19,14 @@ public: | |||
19 | { return "Devices/card"; } | 19 | { return "Devices/card"; } |
20 | 20 | ||
21 | virtual const QString nodeDescription() ; | 21 | virtual QString genNic( long ); |
22 | virtual long instanceCount( void ) | ||
23 | { return InstanceCount; } | ||
22 | 24 | ||
25 | virtual const QString nodeDescription() ; | ||
23 | virtual ANetNodeInstance * createInstance( void ); | 26 | virtual ANetNodeInstance * createInstance( void ); |
24 | |||
25 | virtual const char ** needs( void ); | 27 | virtual const char ** needs( void ); |
26 | virtual const char * provides( void ); | 28 | virtual const char * provides( void ); |
27 | 29 | ||
28 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | 30 | QStringList & addressesOfNIC( void ) |
29 | virtual bool hasDataFor( const QString & S ); | ||
30 | virtual bool generateDeviceDataForCommonFile( | ||
31 | SystemFile & SF, long DevNr ); | ||
32 | |||
33 | virtual long instanceCount( void ) | ||
34 | { return InstanceCount; } | ||
35 | |||
36 | virtual QString genNic( long ); | ||
37 | virtual QStringList & addressesOfNIC( void ) | ||
38 | { return NICMACAddresses; } | 31 | { return NICMACAddresses; } |
39 | 32 | ||
diff --git a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp index 99c033e..9fb05b9 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp | |||
@@ -44,8 +44,2 @@ void ALanCard::commit( void ) { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | bool ALanCard::generateDataForCommonFile( | ||
47 | SystemFile & , | ||
48 | long ) { | ||
49 | return 1; | ||
50 | } | ||
51 | |||
diff --git a/noncore/settings/networksettings2/lancard/lancard_NNI.h b/noncore/settings/networksettings2/lancard/lancard_NNI.h index 4e91523..8e55a19 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NNI.h +++ b/noncore/settings/networksettings2/lancard/lancard_NNI.h | |||
@@ -15,21 +15,16 @@ public : | |||
15 | ALanCard( LanCardNetNode * PNN ); | 15 | ALanCard( LanCardNetNode * PNN ); |
16 | 16 | ||
17 | RuntimeInfo * runtime( void ) | ||
18 | { return | ||
19 | ( RT ) ? RT : ( RT = new LanCardRun( this, Data ) ); | ||
20 | } | ||
21 | |||
17 | QWidget * edit( QWidget * parent ); | 22 | QWidget * edit( QWidget * parent ); |
18 | QString acceptable( void ); | 23 | QString acceptable( void ); |
19 | void commit( void ); | 24 | void commit( void ); |
20 | 25 | ||
21 | RuntimeInfo * runtime( void ) | ||
22 | { if( RT == 0 ) | ||
23 | RT = new LanCardRun( this, Data ); | ||
24 | return RT; | ||
25 | } | ||
26 | |||
27 | virtual void * data( void ) | 26 | virtual void * data( void ) |
28 | { return (void *)&Data; } | 27 | { return (void *)&Data; } |
29 | 28 | ||
30 | virtual bool hasDataFor( const QString & ) | ||
31 | { return 0; } | ||
32 | virtual bool generateDataForCommonFile( | ||
33 | SystemFile & S, long DevNr ); | ||
34 | protected : | 29 | protected : |
35 | 30 | ||