author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/lancard/lancard_NN.cpp | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
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,62 +1,68 @@ | |||
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(){ |
18 | } | 24 | } |
19 | 25 | ||
20 | const QString LanCardNetNode::nodeDescription(){ | 26 | const QString LanCardNetNode::nodeDescription(){ |
21 | return tr("\ | 27 | return tr("\ |
22 | <p>Sets up a wired regular LAN card.</p>\ | 28 | <p>Sets up a wired regular LAN card.</p>\ |
23 | <p>Use this to set up 10/100/1000 MBit LAN cards.</p>\ | 29 | <p>Use this to set up 10/100/1000 MBit LAN cards.</p>\ |
24 | " | 30 | " |
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 ); |
51 | } | 57 | } |
52 | } | 58 | } |
53 | 59 | ||
54 | void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { | 60 | void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { |
55 | TS << "interfacecount=" | 61 | TS << "interfacecount=" |
56 | << InstanceCount | 62 | << InstanceCount |
57 | << endl; | 63 | << endl; |
58 | for( QStringList::Iterator it = NICMACAddresses.begin(); | 64 | for( QStringList::Iterator it = NICMACAddresses.begin(); |
59 | it != NICMACAddresses.end(); | 65 | it != NICMACAddresses.end(); |
60 | ++it ) { | 66 | ++it ) { |
61 | TS << "macaddress=" | 67 | TS << "macaddress=" |
62 | << (*it) | 68 | << (*it) |