summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/netnode.h
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/netnode.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.h b/noncore/settings/networksettings2/networksettings2/netnode.h
index 8aebdc0..fa4ab70 100644
--- a/noncore/settings/networksettings2/networksettings2/netnode.h
+++ b/noncore/settings/networksettings2/networksettings2/netnode.h
@@ -100,52 +100,57 @@ public:
// compiled references to 'needed' NetNodes -> needs list
inline void setAlternatives( NetNodeList * Alt )
{ Alternatives = Alt; }
inline NetNodeList & alternatives( void )
{ return *Alternatives; }
//
//
// Virtual methods with sensible default
//
//
// do instances of this noce class have data for this file
virtual bool hasDataForFile( SystemFile & )
{ return 0; }
// open proper file SF identified by S
// this method is called by NS2.
//
// overrule this ONLY if this proper file is a common file
// for all NNI of this node class and the data generated
// by each of the NNI needs to be put in one file
//
+ // the function can return a set of folders that should
+ // be created (or perhaps already exist) prior to opening
+ // the file
+ //
// if this is the case the file should be (re)opened in append
// return 0 if file cannot be opened
virtual bool openFile( SystemFile &SF,
- ANetNodeInstance * NNI );
+ ANetNodeInstance * NNI,
+ QStringList & PathToCreate );
// generate instance independent stuff
// 0 : data output, 1 no data, 2 error
virtual short generatePreamble( SystemFile & )
{ return 1; }
// generate instance independent stuff
// 0 : data output, 1 no data, 2 error
virtual short generatePostamble( SystemFile & )
{ return 1; }
// generate instance dependent but instance common stuff
// 0 : data output, 1 no data, 2 error
virtual short generateFile( SystemFile &,
ANetNodeInstance * ,
long )
{ return 1; }
// generate NIC name based on instance nr
// only relevant if node instances are devices
virtual QString genNic( long )
{ return QString(""); }
// max number of instances for this node type
@@ -238,49 +243,50 @@ public:
// pixmap for this instance -> from NetNode
inline const QString pixmapName( void )
{ return NodeType->pixmapName(); }
inline const char ** provides( void )
{ return NodeType->provides(); }
inline const char ** needs( void )
{ return NodeType->needs(); }
inline void setNetworkSetup( NetworkSetup * NC )
{ TheNetworkSetup = NC; }
inline NetworkSetup * networkSetup( void )
{ return TheNetworkSetup; }
//
//
// Virtual methods with sensible defaults
//
//
// open proper file identified by S
- virtual bool openFile( SystemFile & )
+ virtual bool openFile( SystemFile &,
+ QStringList & )
{ return 0; }
// check if this node (or sub nodes) have data for this file
virtual bool hasDataForFile( SystemFile & S )
{ return nodeClass()->hasDataForFile( S ); }
// generate code specific for this node but embedded
// in the section of the parent
// this is called within the code of the parent
virtual short generateFileEmbedded( SystemFile & SF,
long DevNr )
{ ANetNodeInstance * NNI = nextNode();
return (NNI) ? NNI->generateFileEmbedded( SF, DevNr ) : 1;
}
// generate code specific for this node
// (or find the first node that does)
virtual short generateFile( SystemFile & SF,
long DevNr )
{ ANetNodeInstance * NNI = nextNode();
return (NNI) ? NNI->generateFile( SF, DevNr ) : 1;
}
// return true if this node instance is triggered by this trigger