author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (unidiff) | |
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) (ignore 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[] = | |||
11 | */ | 11 | */ |
12 | ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular profile")) { | 12 | ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular connection profile")) { |
13 | } | 13 | } |
@@ -40,13 +40,2 @@ const char * ProfileNetNode::provides( void ) { | |||
40 | 40 | ||
41 | bool ProfileNetNode::generateProperFilesFor( | ||
42 | ANetNodeInstance * ) { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | bool ProfileNetNode::generateDeviceDataForCommonFile( | ||
47 | SystemFile & , | ||
48 | long ) { | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | void ProfileNetNode::setSpecificAttribute( QString & , QString & ) { | 41 | 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: | |||
20 | virtual const QString nodeDescription() ; | 20 | virtual const QString nodeDescription() ; |
21 | |||
22 | virtual ANetNodeInstance * createInstance( void ); | 21 | virtual ANetNodeInstance * createInstance( void ); |
23 | |||
24 | virtual const char ** needs( void ); | 22 | virtual const char ** needs( void ); |
@@ -26,8 +24,2 @@ public: | |||
26 | 24 | ||
27 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | ||
28 | virtual bool hasDataFor( const QString & ) | ||
29 | { return 0; } | ||
30 | virtual bool generateDeviceDataForCommonFile( | ||
31 | SystemFile & SF, long DevNr); | ||
32 | |||
33 | private: | 25 | 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 ) { | |||
52 | 52 | ||
53 | bool AProfile::generateDataForCommonFile( | 53 | short AProfile::generateFileEmbedded( const QString & ID, |
54 | SystemFile & , | 54 | const QString & Path, |
55 | long) { | 55 | QTextStream & TS, |
56 | return 1; | 56 | long DevNr ) { |
57 | |||
58 | short rvl, rvd; | ||
59 | |||
60 | rvl = 1; | ||
61 | |||
62 | if( ID == "interfaces" ) { | ||
63 | Log(("Generate Profile for %s\n", ID.latin1() )); | ||
64 | if( Data.TriggerVPN ) { | ||
65 | // this profile triggers VPN -> insert trigger | ||
66 | TS << " up networksettings2 --triggervpn" | ||
67 | << endl; | ||
68 | rvl = 0; | ||
69 | } | ||
70 | } | ||
71 | rvd = ANetNodeInstance::generateFileEmbedded( ID, Path, TS, DevNr ); | ||
72 | return (rvd == 2 || rvl == 2 ) ? 2 : | ||
73 | (rvd == 0 || rvl == 0 ) ? 0 : 1; | ||
57 | } | 74 | } |
58 | 75 | ||
76 | |||
77 | |||
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 : | |||
16 | 16 | ||
17 | RuntimeInfo * runtime( void ) | ||
18 | { return | ||
19 | ( RT ) ? RT : ( RT = new ProfileRun( this, Data ) ); | ||
20 | } | ||
21 | |||
17 | QWidget * edit( QWidget * parent ); | 22 | QWidget * edit( QWidget * parent ); |
@@ -20,10 +25,2 @@ public : | |||
20 | 25 | ||
21 | const QString & description( void ) | ||
22 | { return Data.Description; } | ||
23 | RuntimeInfo * runtime( void ) | ||
24 | { if( RT == 0 ) | ||
25 | RT = new ProfileRun( this, Data ); | ||
26 | return RT; | ||
27 | } | ||
28 | |||
29 | virtual void * data( void ) | 26 | virtual void * data( void ) |
@@ -31,7 +28,9 @@ public : | |||
31 | 28 | ||
32 | virtual bool hasDataFor( const QString & ) | 29 | virtual short generateFileEmbedded( const QString & ID, |
33 | { return 0; } | 30 | const QString & Path, |
31 | QTextStream & TS, | ||
32 | long DevNr ); | ||
34 | 33 | ||
35 | virtual bool generateDataForCommonFile( | 34 | const QString & description( void ) |
36 | SystemFile & SF, long DevNr); | 35 | { return Data.Description; } |
37 | 36 | ||