Diffstat (limited to 'noncore/settings/networksettings2/vpn') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpn_NN.cpp | 14 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpn_NN.h | 8 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpn_NNI.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpn_NNI.h | 16 |
4 files changed, 7 insertions, 37 deletions
diff --git a/noncore/settings/networksettings2/vpn/vpn_NN.cpp b/noncore/settings/networksettings2/vpn/vpn_NN.cpp index 6c7b308..9d3b6e7 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NN.cpp +++ b/noncore/settings/networksettings2/vpn/vpn_NN.cpp | |||
@@ -1,18 +1,17 @@ | |||
1 | #include "vpn_NN.h" | 1 | #include "vpn_NN.h" |
2 | #include "vpn_NNI.h" | 2 | #include "vpn_NNI.h" |
3 | 3 | ||
4 | static const char * VPNNeeds[] = | 4 | static const char * VPNNeeds[] = |
5 | { "connection", | 5 | { 0 |
6 | 0 | ||
7 | }; | 6 | }; |
8 | 7 | ||
9 | /** | 8 | /** |
10 | * Constructor, find all of the possible interfaces | 9 | * Constructor, find all of the possible interfaces |
11 | */ | 10 | */ |
12 | VPNNetNode::VPNNetNode() : ANetNode(tr("VPN Connection")) { | 11 | VPNNetNode::VPNNetNode() : ANetNode(tr("VPN Connection")) { |
13 | } | 12 | } |
14 | 13 | ||
15 | /** | 14 | /** |
16 | * Delete any interfaces that we own. | 15 | * Delete any interfaces that we own. |
17 | */ | 16 | */ |
18 | VPNNetNode::~VPNNetNode(){ | 17 | VPNNetNode::~VPNNetNode(){ |
@@ -29,34 +28,23 @@ const QString VPNNetNode::nodeDescription(){ | |||
29 | ANetNodeInstance * VPNNetNode::createInstance( void ) { | 28 | ANetNodeInstance * VPNNetNode::createInstance( void ) { |
30 | return new AVPN( this ); | 29 | return new AVPN( this ); |
31 | } | 30 | } |
32 | 31 | ||
33 | const char ** VPNNetNode::needs( void ) { | 32 | const char ** VPNNetNode::needs( void ) { |
34 | return VPNNeeds; | 33 | return VPNNeeds; |
35 | } | 34 | } |
36 | 35 | ||
37 | const char * VPNNetNode::provides( void ) { | 36 | const char * VPNNetNode::provides( void ) { |
38 | return "connection"; | 37 | return "connection"; |
39 | } | 38 | } |
40 | 39 | ||
41 | bool VPNNetNode::generateProperFilesFor( | ||
42 | ANetNodeInstance * ) { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | bool VPNNetNode::generateDeviceDataForCommonFile( | ||
47 | SystemFile & , | ||
48 | long ) { | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | void VPNNetNode::setSpecificAttribute( QString & , QString & ) { | 40 | void VPNNetNode::setSpecificAttribute( QString & , QString & ) { |
53 | } | 41 | } |
54 | 42 | ||
55 | void VPNNetNode::saveSpecificAttribute( QTextStream & ) { | 43 | void VPNNetNode::saveSpecificAttribute( QTextStream & ) { |
56 | } | 44 | } |
57 | 45 | ||
58 | extern "C" { | 46 | extern "C" { |
59 | void create_plugin( QList<ANetNode> & PNN ) { | 47 | void create_plugin( QList<ANetNode> & PNN ) { |
60 | PNN.append( new VPNNetNode() ); | 48 | PNN.append( new VPNNetNode() ); |
61 | } | 49 | } |
62 | } | 50 | } |
diff --git a/noncore/settings/networksettings2/vpn/vpn_NN.h b/noncore/settings/networksettings2/vpn/vpn_NN.h index 5b6632e..3c7b5e0 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NN.h +++ b/noncore/settings/networksettings2/vpn/vpn_NN.h | |||
@@ -9,36 +9,28 @@ class VPNNetNode : public ANetNode{ | |||
9 | 9 | ||
10 | Q_OBJECT | 10 | Q_OBJECT |
11 | 11 | ||
12 | public: | 12 | public: |
13 | 13 | ||
14 | VPNNetNode(); | 14 | VPNNetNode(); |
15 | virtual ~VPNNetNode(); | 15 | virtual ~VPNNetNode(); |
16 | 16 | ||
17 | virtual const QString pixmapName() | 17 | virtual const QString pixmapName() |
18 | { return "Devices/vpn"; } | 18 | { return "Devices/vpn"; } |
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 | ||
35 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 27 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
36 | virtual void saveSpecificAttribute( QTextStream & TS ); | 28 | virtual void saveSpecificAttribute( QTextStream & TS ); |
37 | }; | 29 | }; |
38 | 30 | ||
39 | extern "C" | 31 | extern "C" |
40 | { | 32 | { |
41 | void create_plugin( QList<ANetNode> & PNN ); | 33 | void create_plugin( QList<ANetNode> & PNN ); |
42 | }; | 34 | }; |
43 | 35 | ||
44 | #endif | 36 | #endif |
diff --git a/noncore/settings/networksettings2/vpn/vpn_NNI.cpp b/noncore/settings/networksettings2/vpn/vpn_NNI.cpp index ee999e8..6c20aeb 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NNI.cpp +++ b/noncore/settings/networksettings2/vpn/vpn_NNI.cpp | |||
@@ -19,18 +19,12 @@ QWidget * AVPN::edit( QWidget * parent ) { | |||
19 | return GUI; | 19 | return GUI; |
20 | } | 20 | } |
21 | 21 | ||
22 | QString AVPN::acceptable( void ) { | 22 | QString AVPN::acceptable( void ) { |
23 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 23 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
24 | } | 24 | } |
25 | 25 | ||
26 | void AVPN::commit( void ) { | 26 | void AVPN::commit( void ) { |
27 | if( GUI && GUI->commit( Data ) ) | 27 | if( GUI && GUI->commit( Data ) ) |
28 | setModified( 1 ); | 28 | setModified( 1 ); |
29 | } | 29 | } |
30 | 30 | ||
31 | bool AVPN::generateDataForCommonFile( | ||
32 | SystemFile & , | ||
33 | long) { | ||
34 | return 1; | ||
35 | } | ||
36 | |||
diff --git a/noncore/settings/networksettings2/vpn/vpn_NNI.h b/noncore/settings/networksettings2/vpn/vpn_NNI.h index c3eb016..aee5891 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NNI.h +++ b/noncore/settings/networksettings2/vpn/vpn_NNI.h | |||
@@ -5,41 +5,37 @@ | |||
5 | #include "vpndata.h" | 5 | #include "vpndata.h" |
6 | #include "vpnrun.h" | 6 | #include "vpnrun.h" |
7 | 7 | ||
8 | class VPNNetNode; | 8 | class VPNNetNode; |
9 | class VPNEdit; | 9 | class VPNEdit; |
10 | 10 | ||
11 | class AVPN : public ANetNodeInstance { | 11 | class AVPN : public ANetNodeInstance { |
12 | 12 | ||
13 | public : | 13 | public : |
14 | 14 | ||
15 | AVPN( VPNNetNode * PNN ); | 15 | AVPN( VPNNetNode * PNN ); |
16 | 16 | ||
17 | RuntimeInfo * runtime( void ) | ||
18 | { return | ||
19 | ( RT ) ? RT : ( RT = new VPNRun( 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 | RuntimeInfo * runtime( void ) | ||
22 | { if( RT == 0 ) | ||
23 | RT = new VPNRun( this, Data ); | ||
24 | return RT; | ||
25 | } | ||
26 | |||
27 | virtual void * data( void ) | 26 | virtual void * data( void ) |
28 | { return (void *)&Data; } | 27 | { return (void *)&Data; } |
29 | 28 | ||
30 | virtual bool hasDataFor( const QString & ) | 29 | |
31 | { return 0; } | ||
32 | virtual bool generateDataForCommonFile( | ||
33 | SystemFile & SF, long DevNr ); | ||
34 | protected : | 30 | protected : |
35 | 31 | ||
36 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 32 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
37 | virtual void saveSpecificAttribute( QTextStream & TS ); | 33 | virtual void saveSpecificAttribute( QTextStream & TS ); |
38 | 34 | ||
39 | private : | 35 | private : |
40 | 36 | ||
41 | VPNEdit * GUI; | 37 | VPNEdit * GUI; |
42 | VPNData Data; | 38 | VPNData Data; |
43 | VPNRun * RT; | 39 | VPNRun * RT; |
44 | 40 | ||
45 | }; | 41 | }; |