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 | |||
@@ -10,5 +10,5 @@ static const char * ProfileNeeds[] = | |||
10 | * Constructor, find all of the possible interfaces | 10 | * Constructor, find all of the possible interfaces |
11 | */ | 11 | */ |
12 | ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular profile")) { | 12 | ProfileNetNode::ProfileNetNode() : ANetNode( tr("Regular connection profile")) { |
13 | } | 13 | } |
14 | 14 | ||
@@ -39,15 +39,4 @@ const char * ProfileNetNode::provides( void ) { | |||
39 | } | 39 | } |
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 & ) { |
53 | } | 42 | } |
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 | |||
@@ -19,16 +19,8 @@ public: | |||
19 | 19 | ||
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 ); |
25 | virtual const char * provides( void ); | 23 | virtual const char * provides( void ); |
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: |
34 | 26 | ||
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 | |||
@@ -51,8 +51,27 @@ void AProfile::commit( void ) { | |||
51 | } | 51 | } |
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 | |||
@@ -15,24 +15,23 @@ public : | |||
15 | AProfile( ProfileNetNode * PNN ); | 15 | AProfile( ProfileNetNode * PNN ); |
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 ); |
18 | QString acceptable( void ); | 23 | QString acceptable( void ); |
19 | void commit( void ); | 24 | void commit( void ); |
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 ) |
30 | { return (void *)&Data; } | 27 | { return (void *)&Data; } |
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 | ||
38 | protected : | 37 | protected : |