diff options
Diffstat (limited to 'client/Config.h')
-rw-r--r-- | client/Config.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/client/Config.h b/client/Config.h index c95d9c6..11bed90 100644 --- a/client/Config.h +++ b/client/Config.h @@ -4,13 +4,15 @@ #define CONFIG_H #include <client.h> +#include <QObject> #include "Proxy.h" +#include <SslClient.h> using std::vector; using std::string; -class ProxyEntryGeneric; -class ProxyEntryStatic; +class SslClient; +class QTimer; /** * @brief Singleton class that represents client configuration<br/> @@ -19,8 +21,9 @@ class ProxyEntryStatic; * Then retries is made to connect to server and acqire actual config, * firewall list, etc. */ -class Config +class Config: public QObject { + Q_OBJECT public: /** * @brief Class to represent 'firewall' record in the config file @@ -207,11 +210,21 @@ private: * @brief Pointer to the singleton Config instance */ static Config *self; - + /** * @brief time interval between consequtive config updates */ unsigned updateInterval; + + /** + * @brief SslCLient instance that connects to server and retrieves config + */ + SslClient *client; + + /** + * @brief timer that is responsible on config updates + */ + QTimer *configUpdateTimer; bool configValid; vector<ProxyEntryGeneric> genericProxy; vector<ProxyEntryStatic> staticProxy; @@ -219,6 +232,9 @@ private: vector<ServerEntry> servers; int ReadGenericProxy(); int ReadStaticProxy(); +private slots: + void updateConfig(); + void gotServerReply(SslClient::RequestType &type, QByteArray &confdata); }; |