summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/netnode.h
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/netnode.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.h b/noncore/settings/networksettings2/networksettings2/netnode.h
index 5e36062..ca35c27 100644
--- a/noncore/settings/networksettings2/networksettings2/netnode.h
+++ b/noncore/settings/networksettings2/networksettings2/netnode.h
@@ -5,12 +5,14 @@
5#include <qlist.h> 5#include <qlist.h>
6#include <qdict.h> 6#include <qdict.h>
7#include <qpixmap.h> 7#include <qpixmap.h>
8#include <qobject.h> 8#include <qobject.h>
9#include <time.h> 9#include <time.h>
10 10
11#include <Utils.h>
12
11// difference feature interfaces 13// difference feature interfaces
12class AsDevice; 14class AsDevice;
13class AsLine; 15class AsLine;
14class AsConnection; 16class AsConnection;
15class AsFullSetup; 17class AsFullSetup;
16 18
@@ -280,13 +282,13 @@ public :
280 NodeCollection( QTextStream & TS ); 282 NodeCollection( QTextStream & TS );
281 ~NodeCollection( void ); 283 ~NodeCollection( void );
282 284
283 int number( void ) 285 int number( void )
284 { return Number; } 286 { return Number; }
285 void setNumber( int i ) 287 void setNumber( int i )
286 { Number = i; if( MaxNr < i ) MaxNr = i; } 288 { Number = i; }
287 bool isNew( void ) 289 bool isNew( void )
288 { return IsNew; } 290 { return IsNew; }
289 void setNew( bool N ) 291 void setNew( bool N )
290 { IsNew = N ; } 292 { IsNew = N ; }
291 bool isModified( void ) 293 bool isModified( void )
292 { return IsModified; } 294 { return IsModified; }
@@ -302,14 +304,21 @@ public :
302 } 304 }
303 305
304 AsDevice * device() { 306 AsDevice * device() {
305 return getToplevel()->runtime()->device(); 307 return getToplevel()->runtime()->device();
306 } 308 }
307 309
310 bool triggersVPN();
311
308 State_t state( bool Update = 0 ) 312 State_t state( bool Update = 0 )
309 { if( CurrentState == Unchecked || Update ) { 313 { Log(( "%s state %d(=%d?)\n", Name.latin1(), CurrentState,
314 Unchecked ));
315 if( CurrentState == Unchecked || Update ) {
316 Log(( "TL %p TLR %p\n",
317 getToplevel(),
318 getToplevel()->runtime() ));
310 // need to get current state 319 // need to get current state
311 getToplevel()->runtime()->detectState( this ); 320 getToplevel()->runtime()->detectState( this );
312 } 321 }
313 return CurrentState; 322 return CurrentState;
314 } 323 }
315 324
@@ -349,24 +358,17 @@ public :
349 358
350 State_t currentState( void ) 359 State_t currentState( void )
351 { return CurrentState; } 360 { return CurrentState; }
352 void setCurrentState( State_t S ) 361 void setCurrentState( State_t S )
353 { CurrentState = S; } 362 { CurrentState = S; }
354 363
355 long maxConnectionNumber( void )
356 { return MaxNr; }
357
358 static void resetMaxNr( void )
359 { MaxNr = -1; }
360
361private : 364private :
362 365
363 int compareItems ( QCollection::Item item1, 366 int compareItems ( QCollection::Item item1,
364 QCollection::Item item2 ); 367 QCollection::Item item2 );
365 368
366 static long MaxNr;
367 long Number; 369 long Number;
368 370
369 // state of this connection 371 // state of this connection
370 State_t CurrentState; 372 State_t CurrentState;
371 373
372 QString Name; 374 QString Name;