summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/nsdata.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp
index 39031ed..b4622fc 100644
--- a/noncore/settings/networksettings2/nsdata.cpp
+++ b/noncore/settings/networksettings2/nsdata.cpp
@@ -52,3 +52,3 @@ NetworkSettingsData::NetworkSettingsData( void ) {
52 if( F->open( IO_ReadOnly ) ) { 52 if( F->open( IO_ReadOnly ) ) {
53 NodeCollection * NC; 53 NetworkSetup * NC;
54 interfacename = TS.readLine(); 54 interfacename = TS.readLine();
@@ -59,3 +59,3 @@ NetworkSettingsData::NetworkSettingsData( void ) {
59 59
60 NC = NSResources->getConnection( profilenr ); 60 NC = NSResources->getNetworkSetup( profilenr );
61 if( NC ) { 61 if( NC ) {
@@ -101,3 +101,3 @@ void NetworkSettingsData::loadSettings( void ) {
101 <EMPTYLINE> 101 <EMPTYLINE>
102 [connection] 102 [NetworkSetup]
103 Name=Name 103 Name=Name
@@ -118,7 +118,7 @@ void NetworkSettingsData::loadSettings( void ) {
118 118
119 if( S == "connection" ) { 119 if( S == "NetworkSetup" ) {
120 // load connections -> collections of nodes 120 // load NetworkSetups -> collections of nodes
121 bool Dangling; 121 bool Dangling;
122 NodeCollection * NC = new NodeCollection( TS, Dangling ); 122 NetworkSetup * NC = new NetworkSetup( TS, Dangling );
123 NSResources->addConnection( NC, Dangling ); 123 NSResources->addNetworkSetup( NC, Dangling );
124 } else { 124 } else {
@@ -253,10 +253,10 @@ QString NetworkSettingsData::saveSettings( void ) {
253 253
254 // good connections 254 // good NetworkSetups
255 { Name2Connection_t & M = NSResources->connections(); 255 { Name2NetworkSetup_t & M = NSResources->networkSetups();
256 256
257 // for all connections 257 // for all NetworkSetups
258 for( QDictIterator<NodeCollection> it(M); 258 for( QDictIterator<NetworkSetup> it(M);
259 it.current(); 259 it.current();
260 ++it ) { 260 ++it ) {
261 TS << "[connection]" << endl; 261 TS << "[NetworkSetup]" << endl;
262 it.current()->save(TS); 262 it.current()->save(TS);
@@ -265,10 +265,10 @@ QString NetworkSettingsData::saveSettings( void ) {
265 265
266 // save dangling connections 266 // save dangling NetworkSetups
267 { Name2Connection_t & M = NSResources->danglingConnections(); 267 { Name2NetworkSetup_t & M = NSResources->danglingNetworkSetups();
268 268
269 // for all connections 269 // for all NetworkSetups
270 for( QDictIterator<NodeCollection> it(M); 270 for( QDictIterator<NetworkSetup> it(M);
271 it.current(); 271 it.current();
272 ++it ) { 272 ++it ) {
273 TS << "[connection]" << endl; 273 TS << "[NetworkSetup]" << endl;
274 it.current()->save(TS); 274 it.current()->save(TS);
@@ -285,3 +285,3 @@ QString NetworkSettingsData::saveSettings( void ) {
285 285
286 for( QDictIterator<NodeCollection> it(NSResources->connections()); 286 for( QDictIterator<NetworkSetup> it(NSResources->networkSetups());
287 it.current(); 287 it.current();
@@ -297,4 +297,4 @@ QString NetworkSettingsData::generateSettings( void ) {
297 Name2SystemFile_t & SFM = NSResources->systemFiles(); 297 Name2SystemFile_t & SFM = NSResources->systemFiles();
298 Name2Connection_t & M = NSResources->connections(); 298 Name2NetworkSetup_t & M = NSResources->networkSetups();
299 NodeCollection * NC; 299 NetworkSetup * NC;
300 ANetNodeInstance * NNI; 300 ANetNodeInstance * NNI;
@@ -430,3 +430,3 @@ QString NetworkSettingsData::generateSettings( void ) {
430 430
431 for( QDictIterator<NodeCollection> ncit(M); 431 for( QDictIterator<NetworkSetup> ncit(M);
432 ncit.current(); 432 ncit.current();
@@ -490,4 +490,4 @@ QString NetworkSettingsData::generateSettings( void ) {
490 490
491 // find connections that want to write to this file 491 // find NetworkSetups that want to write to this file
492 for( QDictIterator<NodeCollection> ncit(M); 492 for( QDictIterator<NetworkSetup> ncit(M);
493 ncit.current(); 493 ncit.current();
@@ -507,3 +507,3 @@ QString NetworkSettingsData::generateSettings( void ) {
507 507
508 Log(("Generating %s for connection %s\n", 508 Log(("Generating %s for NetworkSetup %s\n",
509 SF->name().latin1(), NC->name().latin1() )); 509 SF->name().latin1(), NC->name().latin1() ));
@@ -512,3 +512,3 @@ QString NetworkSettingsData::generateSettings( void ) {
512 512
513 // find device on which this connection works 513 // find device on which this NetworkSetup works
514 CurDev = NC->device(); 514 CurDev = NC->device();
@@ -573,4 +573,4 @@ QString NetworkSettingsData::generateSettings( void ) {
573 // generate profile specific info 573 // generate profile specific info
574 // for all nodeconnections that work on the same device 574 // for all nodeNetworkSetups that work on the same device
575 for( QDictIterator<NodeCollection> ncit2(M); 575 for( QDictIterator<NetworkSetup> ncit2(M);
576 ncit2.current(); 576 ncit2.current();
@@ -583,3 +583,3 @@ QString NetworkSettingsData::generateSettings( void ) {
583 583
584 Log(("Connection %s of family %s\n", 584 Log(("NetworkSetup %s of family %s\n",
585 ncit2.current()->name().latin1(), 585 ncit2.current()->name().latin1(),
@@ -647,11 +647,11 @@ QString NetworkSettingsData::generateSettings( void ) {
647 647
648QList<NodeCollection> NetworkSettingsData::collectPossible( 648QList<NetworkSetup> NetworkSettingsData::collectPossible(
649 const QString & Interface ) { 649 const QString & Interface ) {
650 // collect connections that can work on top of this interface 650 // collect NetworkSetups that can work on top of this interface
651 NodeCollection * NC; 651 NetworkSetup * NC;
652 QList<NodeCollection> PossibleConnections; 652 QList<NetworkSetup> PossibleNetworkSetups;
653 Name2Connection_t & M = NSResources->connections(); 653 Name2NetworkSetup_t & M = NSResources->networkSetups();
654 654
655 // for all connections 655 // for all NetworkSetups
656 for( QDictIterator<NodeCollection> it(M); 656 for( QDictIterator<NetworkSetup> it(M);
657 it.current(); 657 it.current();
@@ -666,6 +666,6 @@ QList<NodeCollection> NetworkSettingsData::collectPossible(
666 NC->name().latin1(), Interface.latin1() )); 666 NC->name().latin1(), Interface.latin1() ));
667 PossibleConnections.append( NC ); 667 PossibleNetworkSetups.append( NC );
668 } 668 }
669 } 669 }
670 return PossibleConnections; 670 return PossibleNetworkSetups;
671} 671}
@@ -681,14 +681,14 @@ bool NetworkSettingsData::canStart( const QString & Interface ) {
681 // load situation 681 // load situation
682 NodeCollection * NC = 0; 682 NetworkSetup * NC = 0;
683 QList<NodeCollection> PossibleConnections; 683 QList<NetworkSetup> PossibleNetworkSetups;
684 684
685 PossibleConnections = collectPossible( Interface ); 685 PossibleNetworkSetups = collectPossible( Interface );
686 686
687 Log( ( "for %s : Possiblilies %d\n", 687 Log( ( "for %s : Possiblilies %d\n",
688 Interface.latin1(), PossibleConnections.count() )); 688 Interface.latin1(), PossibleNetworkSetups.count() ));
689 switch( PossibleConnections.count() ) { 689 switch( PossibleNetworkSetups.count() ) {
690 case 0 : // no connections 690 case 0 : // no NetworkSetups
691 break; 691 break;
692 case 1 : // one connection 692 case 1 : // one NetworkSetup
693 NC = PossibleConnections.first(); 693 NC = PossibleNetworkSetups.first();
694 break; 694 break;
@@ -738,3 +738,3 @@ bool NetworkSettingsData::isModified( void ) {
738 738
739 for( QDictIterator<NodeCollection> it(NSResources->connections()); 739 for( QDictIterator<NetworkSetup> it(NSResources->networkSetups());
740 it.current(); 740 it.current();
@@ -750,3 +750,3 @@ bool NetworkSettingsData::couldBeTriggered( const QString & Interface ) {
750 // load situation 750 // load situation
751 QList<NodeCollection> PossibleTriggered; 751 QList<NetworkSetup> PossibleTriggered;
752 752
@@ -760,13 +760,13 @@ bool NetworkSettingsData::couldBeTriggered( const QString & Interface ) {
760 760
761QList<NodeCollection> NetworkSettingsData::collectTriggered( 761QList<NetworkSetup> NetworkSettingsData::collectTriggered(
762 const QString & Interface ) { 762 const QString & Interface ) {
763 763
764 // collect connections that could be triggered by this interface 764 // collect NetworkSetups that could be triggered by this interface
765 NodeCollection * NC; 765 NetworkSetup * NC;
766 QList<NodeCollection> PossibleTriggered; 766 QList<NetworkSetup> PossibleTriggered;
767 767
768 // for all connections 768 // for all NetworkSetups
769 Name2Connection_t & M = NSResources->connections(); 769 Name2NetworkSetup_t & M = NSResources->networkSetups();
770 770
771 for( QDictIterator<NodeCollection> it(M); 771 for( QDictIterator<NetworkSetup> it(M);
772 it.current(); 772 it.current();