From 9aeac7cefc3c8baf32944e7275b57e0a0cde1515 Mon Sep 17 00:00:00 2001 From: wimpie Date: Mon, 05 Apr 2004 22:58:06 +0000 Subject: Add save of node specific config data --- (limited to 'noncore/settings/networksettings2/wlan') diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.cpp b/noncore/settings/networksettings2/wlan/wlan_NN.cpp index 4e59ac1..e0c4db2 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NN.cpp @@ -9,6 +9,7 @@ static const char * WLanNeeds[] = * Constructor, find all of the possible interfaces */ WLanNetNode::WLanNetNode() : ANetNode() { + InstanceCount = 2; } /** @@ -65,6 +66,18 @@ QString WLanNetNode::genNic( long nr ) { return S.sprintf( "wlan%ld", nr ); } +void WLanNetNode::setSpecificAttribute( QString & A, QString & V ) { + if( A == "interfacecount" ) { + InstanceCount = V.toLong(); + } +} + +void WLanNetNode::saveSpecificAttribute( QTextStream & TS ) { + TS << "interfacecount=" + << InstanceCount + << endl; +} + extern "C" { void create_plugin( QList & PNN ) { PNN.append( new WLanNetNode() ); diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.h b/noncore/settings/networksettings2/wlan/wlan_NN.h index f27e71c..e93a89a 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.h +++ b/noncore/settings/networksettings2/wlan/wlan_NN.h @@ -34,12 +34,18 @@ public: SystemFile & SF, long DevNr ); virtual long instanceCount( void ) - { return 2; } + { return InstanceCount; } virtual QString genNic( long ); private: + virtual void setSpecificAttribute( QString & Attr, QString & Value ); + virtual void saveSpecificAttribute( QTextStream & TS ); + + // number of interfaces for this device + long InstanceCount; + }; extern "C" -- cgit v0.9.0.2