Fix VPN plugin API

pull/1/head
Timothy Pearson 12 years ago
parent 475d08942f
commit 330644c862

@ -115,10 +115,10 @@ void VPNAuthenticationDialog::ok()
TQDialog::done(0);
}
void VPNAuthenticationDialog::setPasswords(TQString name, TQString value) {
if (value.length() > 0) {
void VPNAuthenticationDialog::setPasswords(TDENetworkSettingsMap secrets) {
if (secrets.count() > 0) {
chkStorePasswordsPermanent->setChecked(true);
_vpnAuthWidget->setPasswords(name, value);
_vpnAuthWidget->setPasswords(secrets);
}
}

@ -49,7 +49,7 @@ class VPNAuthenticationDialog : public AuthenticationDialog
public:
VPNAuthenticationDialog(TDEVPNConnection* conn = NULL, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
~VPNAuthenticationDialog();
void setPasswords(TQString name, TQString value);
void setPasswords(TDENetworkSettingsMap secrets);
virtual bool close(bool);
protected slots:

@ -46,14 +46,19 @@ void VPNConfigWidget::setVPNData(TDENetworkSingleRouteConfigurationList& /*route
}
TQMap<TQString, TQString> VPNConfigWidget::getVPNProperties()
TDENetworkSettingsMap VPNConfigWidget::getVPNProperties()
{
return TQMap<TQString, TQString>();
return TDENetworkSettingsMap();
}
TQStringList VPNConfigWidget::getVPNRoutes()
TDENetworkSettingsMap VPNConfigWidget::getVPNSecrets()
{
return TQStringList();
return TDENetworkSettingsMap();
}
TDENetworkSingleRouteConfigurationList VPNConfigWidget::getVPNRoutes()
{
return TDENetworkSingleRouteConfigurationList();
}
bool VPNConfigWidget::hasChanged()
@ -81,12 +86,12 @@ VPNAuthenticationWidget::~VPNAuthenticationWidget()
}
TQMap<TQString, TQString> VPNAuthenticationWidget::getPasswords()
TDENetworkSettingsMap VPNAuthenticationWidget::getPasswords()
{
return TQMap<TQString, TQString>();
return TDENetworkSettingsMap();
}
void VPNAuthenticationWidget::setPasswords(TQString name, TQString value)
void VPNAuthenticationWidget::setPasswords(TDENetworkSettingsMap secrets)
{
}

@ -43,9 +43,10 @@ class VPNConfigWidget : public TQWidget
virtual ~VPNConfigWidget();
VPNConfigWidget(TQWidget* parent = NULL, const char* name = NULL);
virtual void setVPNData(TDENetworkSingleRouteConfigurationList&, TDENetworkSettingsMap&, TDENetworkSettingsMap&);
virtual TQMap<TQString, TQString> getVPNProperties();
virtual TQStringList getVPNRoutes();
virtual void setVPNData(TDENetworkSingleRouteConfigurationList&, TDENetworkSettingsMap&, TDENetworkSettingsMap&);
virtual TDENetworkSettingsMap getVPNProperties();
virtual TDENetworkSettingsMap getVPNSecrets();
virtual TDENetworkSingleRouteConfigurationList getVPNRoutes();
virtual bool hasChanged();
virtual bool isValid(TQStringList&);
};
@ -59,8 +60,8 @@ class VPNAuthenticationWidget : public TQWidget
VPNAuthenticationWidget(TQWidget* parent = NULL, const char* name = NULL);
virtual void setVPNData(TDENetworkSingleRouteConfigurationList&, TDENetworkSettingsMap&, TDENetworkSettingsMap&);
virtual TQMap<TQString, TQString> getPasswords();
virtual void setPasswords(TQString value, TQString data);
virtual TDENetworkSettingsMap getPasswords();
virtual void setPasswords(TDENetworkSettingsMap secrets);
virtual bool needsUserInteraction();
};

@ -50,13 +50,14 @@ class VPNCPlugin : public VPNPlugin
class VPNCConfig : public VPNConfigWidget
{
Q_OBJECT
public:
void setVPNData(const TQStringList& routes, const TQMap<TQString, TQString>& properties);
TQMap<TQString, TQString> getVPNProperties();
void setVPNData(TDENetworkSingleRouteConfigurationList&, TDENetworkSettingsMap&, TDENetworkSettingsMap&);
TDENetworkSettingsMap getVPNProperties();
TDENetworkSettingsMap getVPNSecrets();
TQStringList getVPNRoutes();
bool hasChanged();
bool isValid(TQStringList& );
bool isValid(TQStringList&);
VPNCConfig(TQWidget* parent);
~VPNCConfig();
@ -75,12 +76,12 @@ class VPNCConfig : public VPNConfigWidget
class VPNCAuthentication : public VPNAuthenticationWidget
{
Q_OBJECT
public:
VPNCAuthentication(TQWidget* parent = NULL, char* name = NULL);
~VPNCAuthentication();
TQMap<TQString, TQString> getPasswords();
void setPasswords(TQString name, TQString value);
TDENetworkSettingsMap getPasswords();
void setPasswords(TDENetworkSettingsMap secrets);
private:
VPNCAuthenticationWidget* _vpncAuth;

Loading…
Cancel
Save