author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (side-by-side diff) | |
tree | aa5f9b14c249217b4d3fc30f4771bdaf1c3545d3 /noncore/settings/networksettings2/profile | |
parent | ef64880308b5035cc8ca2e4e79325db613af525b (diff) | |
download | opie-8f215ba9ceb395f262517855a99d7d2d303ca760.zip opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.gz opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.bz2 |
MANY changes
- now generates peers/pap-chap secrets files
(no chatscript yet)
(not all usefull ppp options included yet)
- still not ready for prime time yet
Diffstat (limited to 'noncore/settings/networksettings2/profile') (more/less context) (show whitespace changes)
4 files changed, 35 insertions, 36 deletions
diff --git a/noncore/settings/networksettings2/profile/profile_NN.cpp b/noncore/settings/networksettings2/profile/profile_NN.cpp index 59c34a3..945b48d 100644 --- a/noncore/settings/networksettings2/profile/profile_NN.cpp +++ b/noncore/settings/networksettings2/profile/profile_NN.cpp @@ -11,3 +11,3 @@ static const char * ProfileNeeds[] = */ -ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular profile")) { +ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular connection profile")) { } @@ -40,13 +40,2 @@ const char * ProfileNetNode::provides( void ) { -bool ProfileNetNode::generateProperFilesFor( - ANetNodeInstance * ) { - return 0; -} - -bool ProfileNetNode::generateDeviceDataForCommonFile( - SystemFile & , - long ) { - return 0; -} - void ProfileNetNode::setSpecificAttribute( QString & , QString & ) { diff --git a/noncore/settings/networksettings2/profile/profile_NN.h b/noncore/settings/networksettings2/profile/profile_NN.h index e602bd7..1f1ee2c 100644 --- a/noncore/settings/networksettings2/profile/profile_NN.h +++ b/noncore/settings/networksettings2/profile/profile_NN.h @@ -20,5 +20,3 @@ public: virtual const QString nodeDescription() ; - virtual ANetNodeInstance * createInstance( void ); - virtual const char ** needs( void ); @@ -26,8 +24,2 @@ public: - virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); - virtual bool hasDataFor( const QString & ) - { return 0; } - virtual bool generateDeviceDataForCommonFile( - SystemFile & SF, long DevNr); - private: diff --git a/noncore/settings/networksettings2/profile/profile_NNI.cpp b/noncore/settings/networksettings2/profile/profile_NNI.cpp index cb52b2a..f0f0b97 100644 --- a/noncore/settings/networksettings2/profile/profile_NNI.cpp +++ b/noncore/settings/networksettings2/profile/profile_NNI.cpp @@ -52,7 +52,26 @@ void AProfile::commit( void ) { -bool AProfile::generateDataForCommonFile( - SystemFile & , - long) { - return 1; +short AProfile::generateFileEmbedded( const QString & ID, + const QString & Path, + QTextStream & TS, + long DevNr ) { + + short rvl, rvd; + + rvl = 1; + + if( ID == "interfaces" ) { + Log(("Generate Profile for %s\n", ID.latin1() )); + if( Data.TriggerVPN ) { + // this profile triggers VPN -> insert trigger + TS << " up networksettings2 --triggervpn" + << endl; + rvl = 0; + } } + rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr ); + return (rvd == 2 || rvl == 2 ) ? 2 : + (rvd == 0 || rvl == 0 ) ? 0 : 1; +} + + diff --git a/noncore/settings/networksettings2/profile/profile_NNI.h b/noncore/settings/networksettings2/profile/profile_NNI.h index 2c2db7f..957f4af 100644 --- a/noncore/settings/networksettings2/profile/profile_NNI.h +++ b/noncore/settings/networksettings2/profile/profile_NNI.h @@ -16,2 +16,7 @@ public : + RuntimeInfo * runtime( void ) + { return + ( RT ) ? RT : ( RT = new ProfileRun( this, Data ) ); + } + QWidget * edit( QWidget * parent ); @@ -20,10 +25,2 @@ public : - const QString & description( void ) - { return Data.Description; } - RuntimeInfo * runtime( void ) - { if( RT == 0 ) - RT = new ProfileRun( this, Data ); - return RT; - } - virtual void * data( void ) @@ -31,7 +28,9 @@ public : - virtual bool hasDataFor( const QString & ) - { return 0; } + virtual short generateFileEmbedded( const QString & ID, + const QString & Path, + QTextStream & TS, + long DevNr ); - virtual bool generateDataForCommonFile( - SystemFile & SF, long DevNr); + const QString & description( void ) + { return Data.Description; } |