summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/profile
authorwimpie <wimpie>2004-04-04 11:42:05 (UTC)
committer wimpie <wimpie>2004-04-04 11:42:05 (UTC)
commit8d2d2664e5f544b8292806e617deb7a0e4170dc0 (patch) (side-by-side diff)
tree3e3764f82d52f8c32b0ed9d92c13ec483dc34114 /noncore/settings/networksettings2/profile
parent321f82bb3d43cbab358434fef52fe76f17e7d1e3 (diff)
downloadopie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.zip
opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.gz
opie-8d2d2664e5f544b8292806e617deb7a0e4170dc0.tar.bz2
Error in generation of files
Diffstat (limited to 'noncore/settings/networksettings2/profile') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/profile/profile_NN.cpp9
-rw-r--r--noncore/settings/networksettings2/profile/profile_NN.h4
-rw-r--r--noncore/settings/networksettings2/profile/profilerun.cpp22
-rw-r--r--noncore/settings/networksettings2/profile/profilerun.h3
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
@@ -43,7 +43,7 @@ bool ProfileNetNode::generateProperFilesFor(
return 1;
}
-bool ProfileNetNode::hasDataFor( const QString & ) {
+bool ProfileNetNode::hasDataFor( const QString &, bool ) {
return 0;
}
@@ -54,6 +54,13 @@ bool ProfileNetNode::generateDataForCommonFile(
return 1;
}
+bool ProfileNetNode::generateDeviceDataForCommonFile(
+ SystemFile & ,
+ long ,
+ ANetNodeInstance * ) {
+ return 1;
+}
+
extern "C" {
void create_plugin( QList<ANetNode> & PNN ) {
PNN.append( new ProfileNetNode() );
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
@@ -28,9 +28,11 @@ public:
virtual const char * provides( void );
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 );
private:
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
@@ -19,25 +19,23 @@ bool ProfileRun::setState( NodeCollection * NC, Action_t A ) {
switch ( A ) {
case Enable :
if( NC->currentState() == Disabled ) {
+ Data->Disabled = 0;
NC->setCurrentState( Off ); // at least
// ... but request deeper
NNNI->runtime()->detectState(NC);
- return 1;
}
return 1;
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 );
return 1;
default :
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
@@ -20,6 +20,9 @@ public :
virtual const QString & description( void )
{ return Data->Description; }
+
+ virtual AsFullSetup * asFullSetup( void )
+ { return (AsFullSetup *)this; }
private :
ProfileData * Data;