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 @@ -Package: opie-networksettingsplugin2-vpn +Package: opie-networksettings2plugin-vpn Files: plugins/networksettings2/libvpn.so* Priority: optional Section: opie/settings Maintainer: Wim Delvaux <wimpie@handhelds.org> Architecture: arm Depends: opie-networksettings2, libopiecore2, libopienet2 Description: Network settings vpn plugin. 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 @@ #include "vpn_NN.h" #include "vpn_NNI.h" static const char * VPNNeeds[] = { 0 }; +static const char * VPNProvides[] = + { "connection", + 0 + }; /** * Constructor, find all of the possible interfaces */ VPNNetNode::VPNNetNode() : ANetNode(tr("VPN Connection")) { } /** * Delete any interfaces that we own. */ VPNNetNode::~VPNNetNode(){ } const QString VPNNetNode::nodeDescription(){ return tr("\ <p>Configure private IP connection.</p>\ <p>Defines Secure tunnels over non secure IP sessions</p>\ " ); } ANetNodeInstance * VPNNetNode::createInstance( void ) { return new AVPN( this ); } const char ** VPNNetNode::needs( void ) { return VPNNeeds; } -const char * VPNNetNode::provides( void ) { - return "connection"; +const char ** VPNNetNode::provides( void ) { + return VPNProvides; } void VPNNetNode::setSpecificAttribute( QString & , QString & ) { } void VPNNetNode::saveSpecificAttribute( QTextStream & ) { } extern "C" { void create_plugin( QList<ANetNode> & PNN ) { PNN.append( new VPNNetNode() ); } } 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 @@ #ifndef VPN_NETNODE_H #define VPN_NETNODE_H #include "netnode.h" class AVPN; class VPNNetNode : public ANetNode{ Q_OBJECT public: VPNNetNode(); virtual ~VPNNetNode(); virtual const QString pixmapName() { return "Devices/vpn"; } virtual const QString nodeDescription() ; virtual ANetNodeInstance * createInstance( void ); virtual const char ** needs( void ); - virtual const char * provides( void ); + virtual const char ** provides( void ); private: virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); }; extern "C" { void create_plugin( QList<ANetNode> & PNN ); }; #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 @@ #ifndef VPN_DATA_H #define VPN_DATA_H #include <qstring.h> -typedef struct VPNData { +class VPNData { +public : QString Device; QString LockFile; long Speed; short Parity; short DataBits; short StopBits; bool HardwareControl; bool SoftwareControl; -} VPNData_t; +} ; #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 @@ #include <GUIUtils.h> #include "vpnedit.h" VPNEdit::VPNEdit( QWidget * Parent ) : VPNGUI( Parent ){ } QString VPNEdit::acceptable( void ) { return QString(); } -void VPNEdit::showData( VPNData_t & Data ) { +void VPNEdit::showData( VPNData & Data ) { } -bool VPNEdit::commit( VPNData_t & Data ) { +bool VPNEdit::commit( VPNData & Data ) { return 0; } 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 @@ #include "vpndata.h" #include "vpnGUI.h" class VPNEdit : public VPNGUI { public : VPNEdit( QWidget * parent ); QString acceptable( void ); - bool commit( VPNData_t & Data ); - void showData( VPNData_t & Data ); + bool commit( VPNData & Data ); + void showData( VPNData & Data ); }; 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 @@ #include "vpnrun.h" - -bool VPNRun::handlesInterface( const QString & ) { - // to be figured out - return 0; -} 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 @@ #ifndef VPNRUN_H #define VPNRUN_H -#include <asconnection.h> +#include <netnode.h> #include "vpndata.h" -class VPNRun : public AsConnection { +class VPNRun : public RuntimeInfo { public : VPNRun( ANetNodeInstance * NNI, VPNData & Data ) : - AsConnection( NNI ) + RuntimeInfo( NNI ) { } - virtual AsConnection * asConnection( void ) - { return (AsConnection *)this; } -protected : - - void detectState( NodeCollection * ) - { } + virtual RuntimeInfo * connection( void ) + { return this; } - bool setState( NodeCollection *, Action_t, bool ) - { return 0; } + State_t detectState( void ) + { return Unknown; } - bool canSetState( State_t, Action_t ) - { return 0; } - - bool handlesInterface( const QString & I ); +protected : + QString setMyState( NodeCollection * , Action_t, bool ) + { return QString(); } }; #endif |