Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/netnode.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.h b/noncore/settings/networksettings2/networksettings2/netnode.h index 6ec9ef6..27d54f8 100644 --- a/noncore/settings/networksettings2/networksettings2/netnode.h +++ b/noncore/settings/networksettings2/networksettings2/netnode.h @@ -63,33 +63,30 @@ typedef enum Action { // bring the connection up Up = 4, // bring the connection down Down = 5 } Action_t; class ANetNode : public QObject{ public: typedef QArray<ANetNode *> NetNodeList; - ANetNode(){}; + ANetNode( const char * Name ) : QObject( 0, Name ) {} virtual ~ANetNode(){}; // pixmap needed for this NetNode virtual const QString pixmapName() = 0; - // name of this NetNode - virtual const QString nodeName() = 0; - // description for this NetNode virtual const QString nodeDescription() = 0; // create a blank instance of a net node virtual ANetNodeInstance * createInstance( void ) = 0; // return feature this NetNode provides virtual const char * provides( void ) = 0; virtual const char ** needs( void ) = 0; // generate files specific for this node (if any) virtual bool generateProperFilesFor( ANetNodeInstance * NNI ) = 0; @@ -175,29 +172,24 @@ public: void initialize( void ); // set the value of an attribute void setAttribute( QString & Attr, QString & Value ) ; void saveAttributes( QTextStream & TS ) ; // return true if node isntance is NEW and not loaded void setNew( bool IsN ) { IsNew = IsN; } bool isNew( void ) { return IsNew; } - // return logical name of this instance - QString & nodeName( void ) - { return NodeName; } - void setNodeName( const QString & S ) - { NodeName = S; } // return description for this instance QString & description( void ) { return Description; } void setDescription( const QString & S ) { Description = S; } // pixmap for this instance -> from NetNode const QString pixmapName( void ) { return NodeType->pixmapName(); } const char * provides( void ) { return NodeType->provides(); } @@ -216,25 +208,24 @@ public: // called only IF data was needed virtual bool generateDataForCommonFile( SystemFile & SF, long DevNr ) = 0; protected : virtual void setSpecificAttribute( QString & , QString & ) = 0; virtual void saveSpecificAttribute( QTextStream & ) = 0; ANetNode * NodeType; // connection to which this node belongs to NodeCollection * Connection; - QString NodeName; QString Description; bool IsModified; bool IsNew; static long InstanceCounter; }; class RuntimeInfo : public QObject { Q_OBJECT public : @@ -247,24 +238,26 @@ public : { return 0; } virtual AsConnection * asConnection( void ) { return 0; } virtual AsLine * asLine( void ) { return 0; } virtual AsFullSetup * asFullSetup( void ) { return 0; } // does this node handles this interface e.g.eth0 // recurse deeper if this node cannot answer that question virtual bool handlesInterface( const QString & ) { return 0; } + virtual bool handlesInterface( const InterfaceInfo & ) + { return 0; } virtual InterfaceInfo * assignedInterface( void ); virtual AsDevice * device( void ); ANetNodeInstance * netNode() { return NNI; } NodeCollection * connection() { return NNI->connection(); } virtual void detectState( NodeCollection * NC ) = 0; virtual bool setState( NodeCollection * NC, Action_t A ) = 0; virtual bool canSetState( State_t Curr, Action_t A ) = 0; |