summaryrefslogtreecommitdiff
path: root/client/Config.h
diff options
context:
space:
mode:
authorAlex Borisov <borisov.alexandr@rambler.ru>2011-12-19 04:04:57 +0200
committerAlex Borisov <borisov.alexandr@rambler.ru>2011-12-19 04:04:57 +0200
commit816941559161cbc54d5373713cf07fb3fe40e311 (patch)
treeb0b697f4ed0a3a1b82b4478cbd93e6f3d6da5f02 /client/Config.h
parent5e33822db1ecbcd49ac85e46a95061dd7522f28c (diff)
XML config public API. read/write static proxies to/from XML. few bug fixes
Diffstat (limited to 'client/Config.h')
-rw-r--r--client/Config.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/client/Config.h b/client/Config.h
index 5254361..f7653e0 100644
--- a/client/Config.h
+++ b/client/Config.h
@@ -140,7 +140,7 @@ public:
* @return Alphabetically sorted vector<string> with unique state names.<br/>
* Resultant vector<string> may be empty in case if there are no states in specified country
*/
- vector<string> GetStates(std::string &country);
+ vector<string> GetStates(string &country);
/**
* @brief Get list of cities in particular country without states<br/>
@@ -179,12 +179,19 @@ public:
vector<string> GetProxies(string &country, string &state, string &city);
/**
+ * @brief Get static proxy entry by name
+ * @param name static proxy name
+ * @return ProxyEntryStatic object on success or false otherwise
+ */
+ ProxyEntryStatic* GetStaticProxy(string& name);
+
+ /**
* @brief Get list of static proxy entries
* @param line number of GUI line proxy list associated with
* @return List of static proxy entries sorted by speed in descending order
*/
vector<ProxyEntryStatic> GetStaticProxyGuiLine(unsigned line);
-
+
/**
* @brief Get number of static proxy GUI lines
* @return number of static proxy GUI lines or 0 if none
@@ -245,53 +252,50 @@ protected:
*/
unsigned retryTimeout;
};
-
+
+ /**
+ * @brief array of config server entries
+ */
+ vector<ServerEntry> servers;
+ /**
+ * @brief time between subsequent config updates
+ */
+ unsigned updateInterval;
/**
* @brief create new instance (not allowed for use by other classes and functions)
*/
Config();
-
/**
* @brief parse client configuration
* @param data string containing configuration parameters
*/
void ParseConfig(string data);
-
/**
* @brief parse list of generic proxies
* @param data string containing list of ProxyEntryGeneric records
*/
void ParseGenericProxies(string data);
-
/**
* @brief parse list of static proxies
* @param data string containing list of ProxyEntryStatic records
*/
- void ParseStaticPorxies(string data);
-
+ void ParseStaticProxies(string data);
/**
* @brief parse firewall configuration
* @param data string containing list of FirewallEntry records
*/
void ParseFirewalls(string data);
-
/**
* @brief parse list of file to be deleted
* @param data string containing path to aforementioned file
*/
void ParseDeleteList(string data);
-
/**
* @brief parse list of files to be downloaded
* @param data string containing path to new file and it's md5 hash
*/
void ParseDownloadList(string data);
- /**
- * @brief time between subsequent config updates
- */
- unsigned updateInterval;
- vector<ServerEntry> servers;
private:
vector<ProxyEntryGeneric> genericProxy;
vector<ProxyEntryStatic> staticProxy;