VPNControl::VPNControl(QObject *parent) :
QObject(parent),
vpnProcess(NULL),
- vpnStatus(VPNSTATUS_INVALID)
+ vpnStatus(VPNSTATUS_INVALID),
+ server(""),
+ port(1174),
+ compressed(true),
+ useTLS(true),
+ tlsDirection(1)
{
}
printf ("Emitting status %d\n", newStatus);
}
}
+int VPNControl::getTlsDirection() const
+{
+ return tlsDirection;
+}
+
+void VPNControl::setTlsDirection(int value)
+{
+ printf ("TLS direction set to %d\n", value);
+ tlsDirection = value;
+ emit tlsDirectionChanged (value);
+}
+
+bool VPNControl::getUseTLS() const
+{
+ return useTLS;
+}
+
+void VPNControl::setUseTLS(bool value)
+{
+ printf ("Use TLS set to %d\n", value);
+ useTLS = value;
+ emit useTLSChanged(useTLS);
+}
+
+bool VPNControl::getCompressed() const
+{
+ return compressed;
+}
+
+void VPNControl::setCompressed(bool value)
+{
+ printf ("Use compression set to %d\n", value);
+ compressed = value;
+ emit compressedChanged(compressed);
+}
+
+unsigned int VPNControl::getPort() const
+{
+ return port;
+}
+
+void VPNControl::setPort(unsigned int value)
+{
+ printf ("Port set to %d\n", value);
+ port = value;
+ emit portChanged(port);
+}
+
+QString VPNControl::getServer() const
+{
+ return server;
+}
+
+void VPNControl::setServer(const QString &value)
+{
+ printf ("Server set to %s\n", value.toUtf8().constData());
+ server = value;
+ emit serverChanged(server);
+}
+
void VPNControl::vpnConnect() {
if (vpnProcess != NULL) {
// Disconnect
vpnDisconnect();
}
+
+void VPNControl::updateConfiguration()
+{
+ printf ("Update configuration\n");
+}