X-Git-Url: https://www.flypig.org.uk/git/?p=openvpnui.git;a=blobdiff_plain;f=src%2Fvpncontrol.h;fp=src%2Fvpncontrol.h;h=12ff2489da99bd552b0598d9cce629cc5f65a384;hp=33dbc3839106d43a0c9c0541d0a7ccbae0cebe85;hb=052fa14434d3ca4b7d08c2c2fccf3791e20afbaa;hpb=e24363e314aca32e7bee952f02f517a04a8dc5f2 diff --git a/src/vpncontrol.h b/src/vpncontrol.h index 33dbc38..12ff248 100644 --- a/src/vpncontrol.h +++ b/src/vpncontrol.h @@ -25,6 +25,10 @@ class VPNControl : public QObject Q_PROPERTY (bool compressed READ getCompressed WRITE setCompressed NOTIFY compressedChanged) Q_PROPERTY (bool useTLS READ getUseTLS WRITE setUseTLS NOTIFY useTLSChanged) Q_PROPERTY (int tlsDirection READ getTlsDirection WRITE setTlsDirection NOTIFY tlsDirectionChanged) + Q_PROPERTY (QString caCertFile READ getCaCertFile WRITE setCaCertFile NOTIFY caCertFileChanged) + Q_PROPERTY (QString clientCertFile READ getClientCertFile WRITE setClientCertFile NOTIFY clientCertFileChanged) + Q_PROPERTY (QString clientKeyFile READ getClientKeyFile WRITE setClientKeyFile NOTIFY clientKeyFileChanged) + Q_PROPERTY (QString tlsKeyFile READ getTlsKeyFile WRITE setTlsKeyFile NOTIFY tlsKeyFileChanged) Q_PROPERTY (QString logText READ getLogText WRITE setLogText NOTIFY logTextChanged) @@ -32,6 +36,7 @@ private: QProcess * vpnProcess; VPNSTATUS vpnStatus; QStringList arguments; + QString logText; // Configuration options QString server; @@ -39,12 +44,16 @@ private: bool compressed; bool useTLS; int tlsDirection; - QString logText; + QString caCertFile; + QString clientCertFile; + QString clientKeyFile; + QString tlsKeyFile; void collectArguments (); void setStatus (VPNSTATUS newStatus); void addArgument (QString key, QString value); void addArgument (QString key); + void addArgumentNonempty (QString key, QString value); void addOption (QString key, bool add); void addValue (QString key); void settingsSetValue (QString key, QString value); @@ -58,16 +67,26 @@ public: bool getCompressed() const; bool getUseTLS() const; int getTlsDirection() const; + QString getCaCertFile () const; + QString getClientCertFile () const; + QString getClientKeyFile () const; + QString getTlsKeyFile () const; + QString getLogText() const; signals: void statusChanged(int status); - void serverChanged(QString server); + void serverChanged(QString &server); void portChanged(unsigned int port); void compressedChanged(bool compressed); void useTLSChanged(bool useTLS); - void tlsDirectionChanged (int direction); - void logTextChanged (QString logText); + void tlsDirectionChanged(int direction); + void caCertFileChanged(QString &caCertFile); + void clientCertFileChanged(QString &clientCertFile); + void clientKeyFileChanged(QString &clientKeyFile); + void tlsKeyFileChanged(QString &tlsKeyFile); + + void logTextChanged (QString &logText); public slots: void vpnConnect (); @@ -82,6 +101,11 @@ public slots: void setCompressed(bool value); void setUseTLS(bool value); void setTlsDirection(int value); + void setCaCertFile(const QString &value); + void setClientCertFile(const QString &value); + void setClientKeyFile(const QString &value); + void setTlsKeyFile(const QString &value); + void setLogText(const QString &value); void logAppend(const QString &text); };