Diffstat (limited to 'noncore/settings/networksettings2/profile') (more/less context) (ignore whitespace changes)
4 files changed, 24 insertions, 14 deletions
diff --git a/noncore/settings/networksettings2/profile/profile_NN.cpp b/noncore/settings/networksettings2/profile/profile_NN.cpp index c39b86f..fcf1ca6 100644 --- a/noncore/settings/networksettings2/profile/profile_NN.cpp +++ b/noncore/settings/networksettings2/profile/profile_NN.cpp @@ -45,3 +45,3 @@ bool ProfileNetNode::generateProperFilesFor( -bool ProfileNetNode::hasDataFor( const QString & ) { +bool ProfileNetNode::hasDataFor( const QString &, bool ) { return 0; @@ -56,2 +56,9 @@ bool ProfileNetNode::generateDataForCommonFile( +bool ProfileNetNode::generateDeviceDataForCommonFile( + SystemFile & , + long , + ANetNodeInstance * ) { + return 1; +} + extern "C" { diff --git a/noncore/settings/networksettings2/profile/profile_NN.h b/noncore/settings/networksettings2/profile/profile_NN.h index 3c06947..b64a6dd 100644 --- a/noncore/settings/networksettings2/profile/profile_NN.h +++ b/noncore/settings/networksettings2/profile/profile_NN.h @@ -30,5 +30,7 @@ public: virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); - virtual bool hasDataFor( const QString & S ); + virtual bool hasDataFor( const QString & S, bool DS ); virtual bool generateDataForCommonFile( SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); + virtual bool generateDeviceDataForCommonFile( + SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); diff --git a/noncore/settings/networksettings2/profile/profilerun.cpp b/noncore/settings/networksettings2/profile/profilerun.cpp index 90c37ed..feebf86 100644 --- a/noncore/settings/networksettings2/profile/profilerun.cpp +++ b/noncore/settings/networksettings2/profile/profilerun.cpp @@ -21,2 +21,3 @@ bool ProfileRun::setState( NodeCollection * NC, Action_t A ) { if( NC->currentState() == Disabled ) { + Data->Disabled = 0; NC->setCurrentState( Off ); // at least @@ -24,3 +25,2 @@ bool ProfileRun::setState( NodeCollection * NC, Action_t A ) { NNNI->runtime()->detectState(NC); - return 1; } @@ -28,14 +28,12 @@ bool ProfileRun::setState( NodeCollection * NC, Action_t A ) { case Disable : - if( NC->currentState() == IsUp ) { - // bring down -> make available - NNNI->runtime()->setState(NC, Down); - } - if( NC->currentState() == Available ) { - // make unavailable - NNNI->runtime()->setState(NC, Deactivate); - } - if( NC->currentState() > Available ) { - // could not disable - return 0; + switch( NC->currentState() ) { + case IsUp : + case Available : + // bring Deactivate (will bring down) + if( ! NNNI->runtime()->setState(NC, Deactivate) ) + return 0; + default : + break; } + Data->Disabled = 1; NC->setCurrentState( Disabled ); diff --git a/noncore/settings/networksettings2/profile/profilerun.h b/noncore/settings/networksettings2/profile/profilerun.h index d3797b5..6e8385c 100644 --- a/noncore/settings/networksettings2/profile/profilerun.h +++ b/noncore/settings/networksettings2/profile/profilerun.h @@ -22,2 +22,5 @@ public : { return Data->Description; } + + virtual AsFullSetup * asFullSetup( void ) + { return (AsFullSetup *)this; } private : |