From 348104dd920480815504c28eaf12e193fd3e9ce9 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sat, 12 Nov 2011 00:42:46 +0200 Subject: Read all configs from server, everywhere. Docs. Code to represent server reconnection problem --- client/UpdatedConfig.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'client/UpdatedConfig.h') diff --git a/client/UpdatedConfig.h b/client/UpdatedConfig.h index 669c126..041fc45 100644 --- a/client/UpdatedConfig.h +++ b/client/UpdatedConfig.h @@ -8,6 +8,13 @@ class QTimer; + +/** + * @brief singleton class that can update it's configuration
+ * -# ServerEntry is read from servers list + * -# Trying to connect every Config::ServerEntry::retryTimeout + * -# When total time for all retries exceeds Config::ServerEntry::timeout go to the next ServerEntry + */ class UpdatedConfig: public QObject, public Config { Q_OBJECT @@ -19,6 +26,10 @@ public: */ static UpdatedConfig *CurrentConfig(); private: + /** + * @brief creates an instance and tries to connect to servers from config.cfg
+ * one by one until working server is found or no other ServerEntry records left + */ UpdatedConfig(); /** @@ -27,7 +38,7 @@ private: static UpdatedConfig *self; /** - * @brief SslCLient instance that connects to server and retrieves config + * @brief SslClient instance that connects to server and retrieves config */ SslClient *client; @@ -59,7 +70,7 @@ private: /** * @brief value indicating which config parts are already updated
- * to check if some part is updated just apply && to this
+ * to check if some part is updated just apply & to this
* value and any of SslClient::RequestType values */ unsigned char updateStatus; -- cgit v1.2.3