summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/netnode.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/netnode.cpp47
1 files changed, 22 insertions, 25 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.cpp b/noncore/settings/networksettings2/networksettings2/netnode.cpp
index fcc6044..3691e5a 100644
--- a/noncore/settings/networksettings2/networksettings2/netnode.cpp
+++ b/noncore/settings/networksettings2/networksettings2/netnode.cpp
@@ -45,9 +45,24 @@ QString quote( QString X ) {
45 return X; 45 return X;
46} 46}
47 47
48
49//
50//
51// ANETNODE
52//
48// 53//
54
55void ANetNode::saveAttributes( QTextStream & TS ) {
56 saveSpecificAttribute( TS );
57}
58
59void ANetNode::setAttribute( QString & Attr, QString & Value ){
60 setSpecificAttribute( Attr, Value );
61}
62
49// 63//
50// 64//
65// ANETNODEINSTANCE
51// 66//
52// 67//
53 68
@@ -82,7 +97,7 @@ ANetNodeInstance * ANetNodeInstance::nextNode( void ) {
82 97
83// 98//
84// 99//
85// 100// NODECOLLECTION
86// 101//
87// 102//
88 103
@@ -269,6 +284,12 @@ void NodeCollection::reassign( void ) {
269 } 284 }
270} 285}
271 286
287//
288//
289// RUNTIMEINFO
290//
291//
292
272InterfaceInfo * RuntimeInfo::assignedInterface( void ) { 293InterfaceInfo * RuntimeInfo::assignedInterface( void ) {
273 return netNode()->nextNode()->runtime()->assignedInterface(); 294 return netNode()->nextNode()->runtime()->assignedInterface();
274} 295}
@@ -276,27 +297,3 @@ InterfaceInfo * RuntimeInfo::assignedInterface( void ) {
276AsDevice * RuntimeInfo::device( void ) { 297AsDevice * RuntimeInfo::device( void ) {
277 return netNode()->nextNode()->runtime()->device(); 298 return netNode()->nextNode()->runtime()->device();
278} 299}
279
280ANetNodeInstance * FakeNetNode::createInstance( void ) {
281 return new FakeNetNodeInstance( this );
282}
283
284void FakeNetNodeInstance::setSpecificAttribute(
285 QString & A, QString & V ) {
286 ValAttrPairs.insert( A, new QString(V) );
287}
288
289void FakeNetNodeInstance::saveSpecificAttribute( QTextStream &TS ) {
290 for( QDictIterator<QString> it( ValAttrPairs );
291 it.current();
292 ++ it ) {
293 TS << it.currentKey().latin1()
294 << "="
295 << quote( *(it.current()))
296 << endl ;
297 ++it;
298 }
299}
300
301// collects all info that no plugin acceps
302FakeNetNode * FakeNode = 0;