Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancard_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancard_NN.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index 20ae7f6..e36f757 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp | |||
@@ -1,17 +1,23 @@ | |||
1 | #include "lancard_NN.h" | 1 | #include "lancard_NN.h" |
2 | #include "lancard_NNI.h" | 2 | #include "lancard_NNI.h" |
3 | 3 | ||
4 | static const char * LanCardNeeds[] = | 4 | static const char * LanCardNeeds[] = |
5 | { 0 }; | 5 | { 0 |
6 | }; | ||
7 | |||
8 | static const char * LanCardProvides[] = | ||
9 | { "device", | ||
10 | 0 | ||
11 | }; | ||
6 | 12 | ||
7 | /** | 13 | /** |
8 | * Constructor, find all of the possible interfaces | 14 | * Constructor, find all of the possible interfaces |
9 | */ | 15 | */ |
10 | LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() { | 16 | LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() { |
11 | InstanceCount = 2; | 17 | InstanceCount = 2; |
12 | } | 18 | } |
13 | 19 | ||
14 | /** | 20 | /** |
15 | * Delete any interfaces that we own. | 21 | * Delete any interfaces that we own. |
16 | */ | 22 | */ |
17 | LanCardNetNode::~LanCardNetNode(){ | 23 | LanCardNetNode::~LanCardNetNode(){ |
@@ -25,26 +31,26 @@ const QString LanCardNetNode::nodeDescription(){ | |||
25 | ); | 31 | ); |
26 | } | 32 | } |
27 | 33 | ||
28 | ANetNodeInstance * LanCardNetNode::createInstance( void ) { | 34 | ANetNodeInstance * LanCardNetNode::createInstance( void ) { |
29 | return new ALanCard( this ); | 35 | return new ALanCard( this ); |
30 | } | 36 | } |
31 | 37 | ||
32 | 38 | ||
33 | const char ** LanCardNetNode::needs( void ) { | 39 | const char ** LanCardNetNode::needs( void ) { |
34 | return LanCardNeeds; | 40 | return LanCardNeeds; |
35 | } | 41 | } |
36 | 42 | ||
37 | const char * LanCardNetNode::provides( void ) { | 43 | const char ** LanCardNetNode::provides( void ) { |
38 | return "device"; | 44 | return LanCardProvides; |
39 | } | 45 | } |
40 | 46 | ||
41 | QString LanCardNetNode::genNic( long nr ) { | 47 | QString LanCardNetNode::genNic( long nr ) { |
42 | QString S; | 48 | QString S; |
43 | return S.sprintf( "eth%ld", nr ); | 49 | return S.sprintf( "eth%ld", nr ); |
44 | } | 50 | } |
45 | 51 | ||
46 | void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { | 52 | void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { |
47 | if( A == "interfacecount" ) { | 53 | if( A == "interfacecount" ) { |
48 | InstanceCount = V.toLong(); | 54 | InstanceCount = V.toLong(); |
49 | } else if ( A == "macaddress" ) { | 55 | } else if ( A == "macaddress" ) { |
50 | NICMACAddresses.append( V ); | 56 | NICMACAddresses.append( V ); |