X-Git-Url: https://www.flypig.org.uk/git/?a=blobdiff_plain;f=src%2Fvpncontrol.h;h=33dbc3839106d43a0c9c0541d0a7ccbae0cebe85;hb=e24363e314aca32e7bee952f02f517a04a8dc5f2;hp=909f3b204dfc9a3424d95fdc020fbcd987f80ee0;hpb=23fb3768d515e0e901298d2b030561b9a98ffb33;p=openvpnui.git diff --git a/src/vpncontrol.h b/src/vpncontrol.h index 909f3b2..33dbc38 100644 --- a/src/vpncontrol.h +++ b/src/vpncontrol.h @@ -26,21 +26,29 @@ class VPNControl : public QObject Q_PROPERTY (bool useTLS READ getUseTLS WRITE setUseTLS NOTIFY useTLSChanged) Q_PROPERTY (int tlsDirection READ getTlsDirection WRITE setTlsDirection NOTIFY tlsDirectionChanged) + Q_PROPERTY (QString logText READ getLogText WRITE setLogText NOTIFY logTextChanged) + private: QProcess * vpnProcess; VPNSTATUS vpnStatus; QStringList arguments; + + // Configuration options QString server; unsigned int port; bool compressed; bool useTLS; int tlsDirection; + QString logText; + void collectArguments (); void setStatus (VPNSTATUS newStatus); void addArgument (QString key, QString value); void addArgument (QString key); void addOption (QString key, bool add); void addValue (QString key); + void settingsSetValue (QString key, QString value); + void settingsSetValue (QString key, int value); public: explicit VPNControl(QObject *parent = 0); @@ -50,6 +58,7 @@ public: bool getCompressed() const; bool getUseTLS() const; int getTlsDirection() const; + QString getLogText() const; signals: void statusChanged(int status); @@ -58,6 +67,7 @@ signals: void compressedChanged(bool compressed); void useTLSChanged(bool useTLS); void tlsDirectionChanged (int direction); + void logTextChanged (QString logText); public slots: void vpnConnect (); @@ -72,6 +82,8 @@ public slots: void setCompressed(bool value); void setUseTLS(bool value); void setTlsDirection(int value); + void setLogText(const QString &value); + void logAppend(const QString &text); }; #endif // VPNCONTROL_H