summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/wlan
authorwimpie <wimpie>2004-04-05 22:58:06 (UTC)
committer wimpie <wimpie>2004-04-05 22:58:06 (UTC)
commit9aeac7cefc3c8baf32944e7275b57e0a0cde1515 (patch) (side-by-side diff)
treedc8161657d98d0e97d5f29554cb35d9b57202c49 /noncore/settings/networksettings2/wlan
parent1d958f56a9e1357c20e76d763579d4dc184978e0 (diff)
downloadopie-9aeac7cefc3c8baf32944e7275b57e0a0cde1515.zip
opie-9aeac7cefc3c8baf32944e7275b57e0a0cde1515.tar.gz
opie-9aeac7cefc3c8baf32944e7275b57e0a0cde1515.tar.bz2
Add save of node specific config data
Diffstat (limited to 'noncore/settings/networksettings2/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/wlan/wlan_NN.cpp13
-rw-r--r--noncore/settings/networksettings2/wlan/wlan_NN.h8
2 files changed, 20 insertions, 1 deletions
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
@@ -6,12 +6,13 @@ static const char * WLanNeeds[] =
};
/**
* Constructor, find all of the possible interfaces
*/
WLanNetNode::WLanNetNode() : ANetNode() {
+ InstanceCount = 2;
}
/**
* Delete any interfaces that we own.
*/
WLanNetNode::~WLanNetNode(){
@@ -62,11 +63,23 @@ bool WLanNetNode::generateDeviceDataForCommonFile(
QString WLanNetNode::genNic( long nr ) {
QString S;
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<ANetNode> & 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
@@ -31,18 +31,24 @@ public:
virtual bool hasDataFor( const QString & S );
virtual bool generateDeviceDataForCommonFile(
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"
{
void create_plugin( QList<ANetNode> & PNN );
};