Diffstat (limited to 'noncore/settings/networksettings2/wlan/wlan_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NN.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.cpp b/noncore/settings/networksettings2/wlan/wlan_NN.cpp index e4c3f60..36a5c33 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NN.cpp | |||
@@ -1,23 +1,31 @@ | |||
1 | #include <resources.h> | ||
1 | #include "wlan_NN.h" | 2 | #include "wlan_NN.h" |
2 | #include "wlan_NNI.h" | 3 | #include "wlan_NNI.h" |
3 | 4 | ||
4 | static const char * WLanNeeds[] = | 5 | static const char * WLanNeeds[] = |
5 | { 0 | 6 | { 0 |
6 | }; | 7 | }; |
7 | 8 | ||
9 | static const char * WLanProvides[] = | ||
10 | { "device", | ||
11 | 0 | ||
12 | }; | ||
13 | |||
8 | /** | 14 | /** |
9 | * Constructor, find all of the possible interfaces | 15 | * Constructor, find all of the possible interfaces |
10 | */ | 16 | */ |
11 | WLanNetNode::WLanNetNode() : ANetNode(tr("WLan Device")) { | 17 | WLanNetNode::WLanNetNode() : ANetNode(tr("WLan Device")) { |
18 | NSResources->addSystemFile( | ||
19 | "interfaces", "/etc/network/interfaces", 1 ); | ||
12 | InstanceCount = 2; | 20 | InstanceCount = 2; |
13 | } | 21 | } |
14 | 22 | ||
15 | /** | 23 | /** |
16 | * Delete any interfaces that we own. | 24 | * Delete any interfaces that we own. |
17 | */ | 25 | */ |
18 | WLanNetNode::~WLanNetNode(){ | 26 | WLanNetNode::~WLanNetNode(){ |
19 | } | 27 | } |
20 | 28 | ||
21 | const QString WLanNetNode::nodeDescription(){ | 29 | const QString WLanNetNode::nodeDescription(){ |
22 | return tr("\ | 30 | return tr("\ |
23 | <p>Configure Wi/Fi or WLan network cards.</p>\ | 31 | <p>Configure Wi/Fi or WLan network cards.</p>\ |
@@ -25,26 +33,26 @@ const QString WLanNetNode::nodeDescription(){ | |||
25 | " | 33 | " |
26 | ); | 34 | ); |
27 | } | 35 | } |
28 | 36 | ||
29 | ANetNodeInstance * WLanNetNode::createInstance( void ) { | 37 | ANetNodeInstance * WLanNetNode::createInstance( void ) { |
30 | return new AWLan( this ); | 38 | return new AWLan( this ); |
31 | } | 39 | } |
32 | 40 | ||
33 | const char ** WLanNetNode::needs( void ) { | 41 | const char ** WLanNetNode::needs( void ) { |
34 | return WLanNeeds; | 42 | return WLanNeeds; |
35 | } | 43 | } |
36 | 44 | ||
37 | const char * WLanNetNode::provides( void ) { | 45 | const char ** WLanNetNode::provides( void ) { |
38 | return "device"; | 46 | return WLanProvides; |
39 | } | 47 | } |
40 | 48 | ||
41 | QString WLanNetNode::genNic( long nr ) { | 49 | QString WLanNetNode::genNic( long nr ) { |
42 | QString S; | 50 | QString S; |
43 | return S.sprintf( "wlan%ld", nr ); | 51 | return S.sprintf( "wlan%ld", nr ); |
44 | } | 52 | } |
45 | 53 | ||
46 | void WLanNetNode::setSpecificAttribute( QString & A, QString & V ) { | 54 | void WLanNetNode::setSpecificAttribute( QString & A, QString & V ) { |
47 | if( A == "interfacecount" ) { | 55 | if( A == "interfacecount" ) { |
48 | InstanceCount = V.toLong(); | 56 | InstanceCount = V.toLong(); |
49 | } | 57 | } |
50 | } | 58 | } |