Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/netnode.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.h b/noncore/settings/networksettings2/networksettings2/netnode.h index 56333c5..f4a5e30 100644 --- a/noncore/settings/networksettings2/networksettings2/netnode.h +++ b/noncore/settings/networksettings2/networksettings2/netnode.h | |||
@@ -92,17 +92,21 @@ public: | |||
92 | virtual const char ** needs( void ) = 0; | 92 | virtual const char ** needs( void ) = 0; |
93 | 93 | ||
94 | // generate files specific for this node (if any) | 94 | // generate files specific for this node (if any) |
95 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ) = 0; | 95 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ) = 0; |
96 | // return TRUE if this node has data to be inserted in systemfile | 96 | // return TRUE if this node has data to be inserted in systemfile |
97 | // with name S | 97 | // with name S |
98 | virtual bool hasDataFor( const QString & S ) = 0; | 98 | virtual bool hasDataFor( const QString & S, bool DeviceSpecific ) = 0; |
99 | // generate data specific for the system file S | 99 | // generate data specific for a profile and for the system file S |
100 | // called only IF data was needed | 100 | // called only IF data was needed |
101 | virtual bool generateDataForCommonFile( | 101 | virtual bool generateDataForCommonFile( |
102 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ) = 0; | 102 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ) = 0; |
103 | // generate data specific for the device for the system file S | ||
104 | // called only IF data was needed | ||
105 | virtual bool generateDeviceDataForCommonFile( | ||
106 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ) = 0; | ||
103 | 107 | ||
104 | // does this Node provide a Connection | 108 | // does this Node provide a Connection |
105 | bool isToplevel( void ) | 109 | bool isToplevel( void ) |
106 | { return strcmp( provides(), "fullsetup") == 0 ; } | 110 | { return strcmp( provides(), "fullsetup") == 0 ; } |
107 | 111 | ||
108 | // compiled references to 'needed' NetNodes -> needs list | 112 | // compiled references to 'needed' NetNodes -> needs list |
@@ -212,21 +216,21 @@ class RuntimeInfo : public QObject { | |||
212 | 216 | ||
213 | public : | 217 | public : |
214 | 218 | ||
215 | RuntimeInfo( ANetNodeInstance * TheNNI ) | 219 | RuntimeInfo( ANetNodeInstance * TheNNI ) |
216 | { NNI = TheNNI; } | 220 | { NNI = TheNNI; } |
217 | 221 | ||
218 | // downcast | 222 | // downcast implemented by specify runtime classes |
219 | AsDevice * asDevice( void ) | 223 | AsDevice * asDevice( void ) |
220 | { return (AsDevice *)this; } | 224 | { return 0; } |
221 | AsConnection * asConnection( void ) | 225 | AsConnection * asConnection( void ) |
222 | { return (AsConnection *)this; } | 226 | { return 0; } |
223 | AsLine * asLine( void ) | 227 | AsLine * asLine( void ) |
224 | { return (AsLine *)this; } | 228 | { return 0; } |
225 | AsFullSetup * asFullSetup( void ) | 229 | AsFullSetup * asFullSetup( void ) |
226 | { return (AsFullSetup *)this; } | 230 | { return 0; } |
227 | 231 | ||
228 | // does this node handles this interface e.g.eth0 | 232 | // does this node handles this interface e.g.eth0 |
229 | // recurse deeper if this node cannot answer that question | 233 | // recurse deeper if this node cannot answer that question |
230 | virtual bool handlesInterface( const QString & ) | 234 | virtual bool handlesInterface( const QString & ) |
231 | { return 0; } | 235 | { return 0; } |
232 | virtual InterfaceInfo * assignedInterface( void ); | 236 | virtual InterfaceInfo * assignedInterface( void ); |
@@ -381,17 +385,20 @@ public: | |||
381 | const char * provides( void ) | 385 | const char * provides( void ) |
382 | { return ""; } | 386 | { return ""; } |
383 | virtual const char ** needs( void ) | 387 | virtual const char ** needs( void ) |
384 | { return 0; } | 388 | { return 0; } |
385 | virtual bool generateProperFilesFor( ANetNodeInstance * ) | 389 | virtual bool generateProperFilesFor( ANetNodeInstance * ) |
386 | { return 0; } | 390 | { return 0; } |
387 | virtual bool hasDataFor( const QString & ) | 391 | virtual bool hasDataFor( const QString &, bool DS ) |
388 | { return 0; } | 392 | { return 0; } |
389 | virtual bool generateDataForCommonFile( | 393 | virtual bool generateDataForCommonFile( |
390 | SystemFile & , long , ANetNodeInstance * ) | 394 | SystemFile & , long , ANetNodeInstance * ) |
391 | {return 1; } | 395 | {return 1; } |
396 | virtual bool generateDeviceDataForCommonFile( | ||
397 | SystemFile & , long , ANetNodeInstance * ) | ||
398 | {return 1; } | ||
392 | 399 | ||
393 | private : | 400 | private : |
394 | 401 | ||
395 | }; | 402 | }; |
396 | 403 | ||
397 | class FakeNetNodeInstance : public ANetNodeInstance { | 404 | class FakeNetNodeInstance : public ANetNodeInstance { |