summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/lancard/lancard_NN.cpp
Side-by-side diff
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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp
index 480ddf9..ba1c1f8 100644
--- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp
+++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp
@@ -1,22 +1,23 @@
#include "lancard_NN.h"
#include "lancard_NNI.h"
static const char * LanCardNeeds[] =
{ 0 };
/**
* Constructor, find all of the possible interfaces
*/
LanCardNetNode::LanCardNetNode() : ANetNode() {
+ InstanceCount = 2;
}
/**
* Delete any interfaces that we own.
*/
LanCardNetNode::~LanCardNetNode(){
}
const QString LanCardNetNode::nodeDescription(){
return tr("\
<p>Sets up a wired regular LAN card.</p>\
<p>Use this to set up 10/100/1000 MBit LAN cards.</p>\
@@ -56,17 +57,29 @@ bool LanCardNetNode::generateDeviceDataForCommonFile(
S << "# check if " << NIC << " can be brought UP" << endl;
S << "mapping " << NIC << endl;
S << " script networksettings2-request" << endl << endl;
}
return 0;
}
QString LanCardNetNode::genNic( long nr ) {
QString S;
return S.sprintf( "eth%ld", nr );
}
+void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) {
+ if( A == "interfacecount" ) {
+ InstanceCount = V.toLong();
+ }
+}
+
+void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) {
+ TS << "interfacecount="
+ << InstanceCount
+ << endl;
+}
+
extern "C" {
void create_plugin( QList<ANetNode> & PNN ) {
PNN.append( new LanCardNetNode() );
}
}