author | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-04 11:42:05 (UTC) |
commit | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (patch) (unidiff) | |
tree | 3e3764f82d52f8c32b0ed9d92c13ec483dc34114 /noncore/settings/networksettings2/wlan | |
parent | 321f82bb3d43cbab358434fef52fe76f17e7d1e3 (diff) | |
download | opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.zip opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.gz opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.bz2 |
Error in generation of files
Diffstat (limited to 'noncore/settings/networksettings2/wlan') (more/less context) (ignore whitespace changes)
5 files changed, 31 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.cpp b/noncore/settings/networksettings2/wlan/wlan_NN.cpp index 5a26e41..e1e20c0 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NN.cpp | |||
@@ -39,22 +39,29 @@ const char * WLanNetNode::provides( void ) { | |||
39 | 39 | ||
40 | bool WLanNetNode::generateProperFilesFor( | 40 | bool WLanNetNode::generateProperFilesFor( |
41 | ANetNodeInstance * ) { | 41 | ANetNodeInstance * ) { |
42 | return 1; | 42 | return 1; |
43 | } | 43 | } |
44 | 44 | ||
45 | bool WLanNetNode::hasDataFor( const QString & ) { | 45 | bool WLanNetNode::hasDataFor( const QString & S, bool DS ) { |
46 | return 0; | 46 | return DS && S == "interfaces"; |
47 | } | 47 | } |
48 | 48 | ||
49 | bool WLanNetNode::generateDataForCommonFile( | 49 | bool WLanNetNode::generateDataForCommonFile( |
50 | SystemFile & , | 50 | SystemFile &, |
51 | long, | 51 | long , |
52 | ANetNodeInstance * ) { | 52 | ANetNodeInstance * ) { |
53 | return 1; | 53 | return 1; |
54 | } | 54 | } |
55 | 55 | ||
56 | bool WLanNetNode::generateDeviceDataForCommonFile( | ||
57 | SystemFile & S, | ||
58 | long DevNr, | ||
59 | ANetNodeInstance * NNI ) { | ||
60 | return ((AWLan *)NNI)->generateDeviceDataForCommonFile(S, DevNr); | ||
61 | } | ||
62 | |||
56 | extern "C" { | 63 | extern "C" { |
57 | void create_plugin( QList<ANetNode> & PNN ) { | 64 | void create_plugin( QList<ANetNode> & PNN ) { |
58 | PNN.append( new WLanNetNode() ); | 65 | PNN.append( new WLanNetNode() ); |
59 | } | 66 | } |
60 | } | 67 | } |
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.h b/noncore/settings/networksettings2/wlan/wlan_NN.h index 0728a79..9111995 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.h +++ b/noncore/settings/networksettings2/wlan/wlan_NN.h | |||
@@ -25,15 +25,17 @@ public: | |||
25 | virtual ANetNodeInstance * createInstance( void ); | 25 | virtual ANetNodeInstance * createInstance( void ); |
26 | 26 | ||
27 | virtual const char ** needs( void ); | 27 | virtual const char ** needs( void ); |
28 | virtual const char * provides( void ); | 28 | virtual const char * provides( void ); |
29 | 29 | ||
30 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | 30 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); |
31 | virtual bool hasDataFor( const QString & S ); | 31 | virtual bool hasDataFor( const QString & S, bool DS ); |
32 | virtual bool generateDataForCommonFile( | 32 | virtual bool generateDataForCommonFile( |
33 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); | 33 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); |
34 | virtual bool generateDeviceDataForCommonFile( | ||
35 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); | ||
34 | 36 | ||
35 | private: | 37 | private: |
36 | 38 | ||
37 | }; | 39 | }; |
38 | 40 | ||
39 | extern "C" | 41 | extern "C" |
diff --git a/noncore/settings/networksettings2/wlan/wlan_NNI.cpp b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp index 92f3457..8b948e0 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NNI.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp | |||
@@ -25,6 +25,18 @@ QString AWLan::acceptable( void ) { | |||
25 | 25 | ||
26 | void AWLan::commit( void ) { | 26 | void AWLan::commit( void ) { |
27 | if( GUI && GUI->commit( Data ) ) | 27 | if( GUI && GUI->commit( Data ) ) |
28 | setModified( 1 ); | 28 | setModified( 1 ); |
29 | } | 29 | } |
30 | 30 | ||
31 | bool AWLan::generateDeviceDataForCommonFile( SystemFile & S, long DevNr ) { | ||
32 | AsDevice * Dev = runtime()->device(); | ||
33 | QString NIC = Dev->genNic( DevNr ); | ||
34 | |||
35 | if( S.name() == "interfaces" ) { | ||
36 | // generate mapping stanza for this interface | ||
37 | S << "# check if " << NIC << " can be brought UP" << endl; | ||
38 | S << "mapping " << NIC << endl; | ||
39 | S << " script networksettings2-request" << endl << endl; | ||
40 | } | ||
41 | return 0; | ||
42 | } | ||
diff --git a/noncore/settings/networksettings2/wlan/wlan_NNI.h b/noncore/settings/networksettings2/wlan/wlan_NNI.h index 8b695b5..e464c84 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NNI.h +++ b/noncore/settings/networksettings2/wlan/wlan_NNI.h | |||
@@ -24,12 +24,14 @@ public : | |||
24 | return RT; | 24 | return RT; |
25 | } | 25 | } |
26 | 26 | ||
27 | virtual void * data( void ) | 27 | virtual void * data( void ) |
28 | { return (void *)&Data; } | 28 | { return (void *)&Data; } |
29 | 29 | ||
30 | bool generateDeviceDataForCommonFile( SystemFile & S, long DevNr ); | ||
31 | |||
30 | protected : | 32 | protected : |
31 | 33 | ||
32 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 34 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
33 | virtual void saveSpecificAttribute( QTextStream & TS ); | 35 | virtual void saveSpecificAttribute( QTextStream & TS ); |
34 | 36 | ||
35 | private : | 37 | private : |
diff --git a/noncore/settings/networksettings2/wlan/wlanrun.h b/noncore/settings/networksettings2/wlan/wlanrun.h index 4cbb059..b853262 100644 --- a/noncore/settings/networksettings2/wlan/wlanrun.h +++ b/noncore/settings/networksettings2/wlan/wlanrun.h | |||
@@ -16,13 +16,15 @@ public : | |||
16 | 16 | ||
17 | virtual long count( void ) | 17 | virtual long count( void ) |
18 | { return 2; } | 18 | { return 2; } |
19 | virtual QString genNic( long nr ) | 19 | virtual QString genNic( long nr ) |
20 | { QString S; return S.sprintf( "wlan%ld", nr ); } | 20 | { QString S; return S.sprintf( "wlan%ld", nr ); } |
21 | virtual AsDevice * device( void ) | 21 | virtual AsDevice * device( void ) |
22 | { return asDevice(); } | 22 | { return (AsDevice *)this; } |
23 | virtual AsDevice * asDevice( void ) | ||
24 | { return (AsDevice *)this; } | ||
23 | 25 | ||
24 | protected : | 26 | protected : |
25 | 27 | ||
26 | void detectState( NodeCollection * ) | 28 | void detectState( NodeCollection * ) |
27 | { } | 29 | { } |
28 | 30 | ||