Diffstat (limited to 'noncore/settings/networksettings2/vpn') (more/less context) (ignore whitespace changes)
8 files changed, 25 insertions, 30 deletions
diff --git a/noncore/settings/networksettings2/vpn/opie-networksettings2plugin-vpn.control b/noncore/settings/networksettings2/vpn/opie-networksettings2plugin-vpn.control index b346c5d..08f131f 100644 --- a/noncore/settings/networksettings2/vpn/opie-networksettings2plugin-vpn.control +++ b/noncore/settings/networksettings2/vpn/opie-networksettings2plugin-vpn.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-networksettingsplugin2-vpn | 1 | Package: opie-networksettings2plugin-vpn |
2 | Files: plugins/networksettings2/libvpn.so* | 2 | Files: plugins/networksettings2/libvpn.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> | 5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: opie-networksettings2, libopiecore2, libopienet2 | 7 | Depends: opie-networksettings2, libopiecore2, libopienet2 |
8 | Description: Network settings vpn plugin. | 8 | Description: Network settings vpn plugin. |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/noncore/settings/networksettings2/vpn/vpn_NN.cpp b/noncore/settings/networksettings2/vpn/vpn_NN.cpp index 9d3b6e7..23ec04a 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NN.cpp +++ b/noncore/settings/networksettings2/vpn/vpn_NN.cpp | |||
@@ -1,50 +1,54 @@ | |||
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 | { 0 | 5 | { 0 |
6 | }; | 6 | }; |
7 | 7 | ||
8 | static const char * VPNProvides[] = | ||
9 | { "connection", | ||
10 | 0 | ||
11 | }; | ||
8 | /** | 12 | /** |
9 | * Constructor, find all of the possible interfaces | 13 | * Constructor, find all of the possible interfaces |
10 | */ | 14 | */ |
11 | VPNNetNode::VPNNetNode() : ANetNode(tr("VPN Connection")) { | 15 | VPNNetNode::VPNNetNode() : ANetNode(tr("VPN Connection")) { |
12 | } | 16 | } |
13 | 17 | ||
14 | /** | 18 | /** |
15 | * Delete any interfaces that we own. | 19 | * Delete any interfaces that we own. |
16 | */ | 20 | */ |
17 | VPNNetNode::~VPNNetNode(){ | 21 | VPNNetNode::~VPNNetNode(){ |
18 | } | 22 | } |
19 | 23 | ||
20 | const QString VPNNetNode::nodeDescription(){ | 24 | const QString VPNNetNode::nodeDescription(){ |
21 | return tr("\ | 25 | return tr("\ |
22 | <p>Configure private IP connection.</p>\ | 26 | <p>Configure private IP connection.</p>\ |
23 | <p>Defines Secure tunnels over non secure IP sessions</p>\ | 27 | <p>Defines Secure tunnels over non secure IP sessions</p>\ |
24 | " | 28 | " |
25 | ); | 29 | ); |
26 | } | 30 | } |
27 | 31 | ||
28 | ANetNodeInstance * VPNNetNode::createInstance( void ) { | 32 | ANetNodeInstance * VPNNetNode::createInstance( void ) { |
29 | return new AVPN( this ); | 33 | return new AVPN( this ); |
30 | } | 34 | } |
31 | 35 | ||
32 | const char ** VPNNetNode::needs( void ) { | 36 | const char ** VPNNetNode::needs( void ) { |
33 | return VPNNeeds; | 37 | return VPNNeeds; |
34 | } | 38 | } |
35 | 39 | ||
36 | const char * VPNNetNode::provides( void ) { | 40 | const char ** VPNNetNode::provides( void ) { |
37 | return "connection"; | 41 | return VPNProvides; |
38 | } | 42 | } |
39 | 43 | ||
40 | void VPNNetNode::setSpecificAttribute( QString & , QString & ) { | 44 | void VPNNetNode::setSpecificAttribute( QString & , QString & ) { |
41 | } | 45 | } |
42 | 46 | ||
43 | void VPNNetNode::saveSpecificAttribute( QTextStream & ) { | 47 | void VPNNetNode::saveSpecificAttribute( QTextStream & ) { |
44 | } | 48 | } |
45 | 49 | ||
46 | extern "C" { | 50 | extern "C" { |
47 | void create_plugin( QList<ANetNode> & PNN ) { | 51 | void create_plugin( QList<ANetNode> & PNN ) { |
48 | PNN.append( new VPNNetNode() ); | 52 | PNN.append( new VPNNetNode() ); |
49 | } | 53 | } |
50 | } | 54 | } |
diff --git a/noncore/settings/networksettings2/vpn/vpn_NN.h b/noncore/settings/networksettings2/vpn/vpn_NN.h index 3c7b5e0..c2e43d4 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NN.h +++ b/noncore/settings/networksettings2/vpn/vpn_NN.h | |||
@@ -1,36 +1,36 @@ | |||
1 | #ifndef VPN_NETNODE_H | 1 | #ifndef VPN_NETNODE_H |
2 | #define VPN_NETNODE_H | 2 | #define VPN_NETNODE_H |
3 | 3 | ||
4 | #include "netnode.h" | 4 | #include "netnode.h" |
5 | 5 | ||
6 | class AVPN; | 6 | class AVPN; |
7 | 7 | ||
8 | class VPNNetNode : public ANetNode{ | 8 | 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 | virtual ANetNodeInstance * createInstance( void ); | 21 | virtual ANetNodeInstance * createInstance( void ); |
22 | virtual const char ** needs( void ); | 22 | virtual const char ** needs( void ); |
23 | virtual const char * provides( void ); | 23 | virtual const char ** provides( void ); |
24 | 24 | ||
25 | private: | 25 | private: |
26 | 26 | ||
27 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 27 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
28 | virtual void saveSpecificAttribute( QTextStream & TS ); | 28 | virtual void saveSpecificAttribute( QTextStream & TS ); |
29 | }; | 29 | }; |
30 | 30 | ||
31 | extern "C" | 31 | extern "C" |
32 | { | 32 | { |
33 | void create_plugin( QList<ANetNode> & PNN ); | 33 | void create_plugin( QList<ANetNode> & PNN ); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | #endif | 36 | #endif |
diff --git a/noncore/settings/networksettings2/vpn/vpndata.h b/noncore/settings/networksettings2/vpn/vpndata.h index 5c986aa..ee88bc4 100644 --- a/noncore/settings/networksettings2/vpn/vpndata.h +++ b/noncore/settings/networksettings2/vpn/vpndata.h | |||
@@ -1,16 +1,17 @@ | |||
1 | #ifndef VPN_DATA_H | 1 | #ifndef VPN_DATA_H |
2 | #define VPN_DATA_H | 2 | #define VPN_DATA_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | typedef struct VPNData { | 5 | class VPNData { |
6 | public : | ||
6 | QString Device; | 7 | QString Device; |
7 | QString LockFile; | 8 | QString LockFile; |
8 | long Speed; | 9 | long Speed; |
9 | short Parity; | 10 | short Parity; |
10 | short DataBits; | 11 | short DataBits; |
11 | short StopBits; | 12 | short StopBits; |
12 | bool HardwareControl; | 13 | bool HardwareControl; |
13 | bool SoftwareControl; | 14 | bool SoftwareControl; |
14 | } VPNData_t; | 15 | } ; |
15 | 16 | ||
16 | #endif | 17 | #endif |
diff --git a/noncore/settings/networksettings2/vpn/vpnedit.cpp b/noncore/settings/networksettings2/vpn/vpnedit.cpp index f336394..8445757 100644 --- a/noncore/settings/networksettings2/vpn/vpnedit.cpp +++ b/noncore/settings/networksettings2/vpn/vpnedit.cpp | |||
@@ -1,18 +1,18 @@ | |||
1 | #include <GUIUtils.h> | 1 | #include <GUIUtils.h> |
2 | #include "vpnedit.h" | 2 | #include "vpnedit.h" |
3 | 3 | ||
4 | 4 | ||
5 | VPNEdit::VPNEdit( QWidget * Parent ) : VPNGUI( Parent ){ | 5 | VPNEdit::VPNEdit( QWidget * Parent ) : VPNGUI( Parent ){ |
6 | 6 | ||
7 | } | 7 | } |
8 | 8 | ||
9 | QString VPNEdit::acceptable( void ) { | 9 | QString VPNEdit::acceptable( void ) { |
10 | return QString(); | 10 | return QString(); |
11 | } | 11 | } |
12 | 12 | ||
13 | void VPNEdit::showData( VPNData_t & Data ) { | 13 | void VPNEdit::showData( VPNData & Data ) { |
14 | } | 14 | } |
15 | 15 | ||
16 | bool VPNEdit::commit( VPNData_t & Data ) { | 16 | bool VPNEdit::commit( VPNData & Data ) { |
17 | return 0; | 17 | return 0; |
18 | } | 18 | } |
diff --git a/noncore/settings/networksettings2/vpn/vpnedit.h b/noncore/settings/networksettings2/vpn/vpnedit.h index 76480cd..156bcc5 100644 --- a/noncore/settings/networksettings2/vpn/vpnedit.h +++ b/noncore/settings/networksettings2/vpn/vpnedit.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #include "vpndata.h" | 1 | #include "vpndata.h" |
2 | #include "vpnGUI.h" | 2 | #include "vpnGUI.h" |
3 | 3 | ||
4 | class VPNEdit : public VPNGUI { | 4 | class VPNEdit : public VPNGUI { |
5 | 5 | ||
6 | public : | 6 | public : |
7 | 7 | ||
8 | VPNEdit( QWidget * parent ); | 8 | VPNEdit( QWidget * parent ); |
9 | QString acceptable( void ); | 9 | QString acceptable( void ); |
10 | bool commit( VPNData_t & Data ); | 10 | bool commit( VPNData & Data ); |
11 | void showData( VPNData_t & Data ); | 11 | void showData( VPNData & Data ); |
12 | }; | 12 | }; |
diff --git a/noncore/settings/networksettings2/vpn/vpnrun.cpp b/noncore/settings/networksettings2/vpn/vpnrun.cpp index ab2966c..64728aa 100644 --- a/noncore/settings/networksettings2/vpn/vpnrun.cpp +++ b/noncore/settings/networksettings2/vpn/vpnrun.cpp | |||
@@ -1,6 +1 @@ | |||
1 | #include "vpnrun.h" | #include "vpnrun.h" | |
2 | |||
3 | bool VPNRun::handlesInterface( const QString & ) { | ||
4 | // to be figured out | ||
5 | return 0; | ||
6 | } | ||
diff --git a/noncore/settings/networksettings2/vpn/vpnrun.h b/noncore/settings/networksettings2/vpn/vpnrun.h index c19b609..9a55625 100644 --- a/noncore/settings/networksettings2/vpn/vpnrun.h +++ b/noncore/settings/networksettings2/vpn/vpnrun.h | |||
@@ -1,32 +1,27 @@ | |||
1 | #ifndef VPNRUN_H | 1 | #ifndef VPNRUN_H |
2 | #define VPNRUN_H | 2 | #define VPNRUN_H |
3 | 3 | ||
4 | #include <asconnection.h> | 4 | #include <netnode.h> |
5 | #include "vpndata.h" | 5 | #include "vpndata.h" |
6 | 6 | ||
7 | class VPNRun : public AsConnection { | 7 | class VPNRun : public RuntimeInfo { |
8 | 8 | ||
9 | public : | 9 | public : |
10 | 10 | ||
11 | VPNRun( ANetNodeInstance * NNI, VPNData & Data ) : | 11 | VPNRun( ANetNodeInstance * NNI, VPNData & Data ) : |
12 | AsConnection( NNI ) | 12 | RuntimeInfo( NNI ) |
13 | { } | 13 | { } |
14 | 14 | ||
15 | virtual AsConnection * asConnection( void ) | 15 | virtual RuntimeInfo * connection( void ) |
16 | { return (AsConnection *)this; } | 16 | { return this; } |
17 | protected : | ||
18 | |||
19 | void detectState( NodeCollection * ) | ||
20 | { } | ||
21 | 17 | ||
22 | bool setState( NodeCollection *, Action_t, bool ) | 18 | State_t detectState( void ) |
23 | { return 0; } | 19 | { return Unknown; } |
24 | 20 | ||
25 | bool canSetState( State_t, Action_t ) | 21 | protected : |
26 | { return 0; } | ||
27 | |||
28 | bool handlesInterface( const QString & I ); | ||
29 | 22 | ||
23 | QString setMyState( NodeCollection * , Action_t, bool ) | ||
24 | { return QString(); } | ||
30 | }; | 25 | }; |
31 | 26 | ||
32 | #endif | 27 | #endif |