blob: febf687e5911a9b23efcf4a0fc1bb3475897842e (
plain)
1 ////////////////////////////////////////////////////////////////////////
2 // FILE: configparser.h
3 // AUTHOR: Johannes Winkelmann, jw@tks6.net
4 // COPYRIGHT: (c) 2002-2005 by Johannes Winkelmann
5 // ---------------------------------------------------------------------
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 ////////////////////////////////////////////////////////////////////////
11
12 #ifndef _CONFIGPARSER_H_
13 #define _CONFIGPARSER_H_
14
15 #include <string>
16
17 struct Config
18 {
19 Config()
20 : proxyHost(""),
21 proxyPort(""),
22 proxyUser(""),
23 proxyPassword(""),
24 operationTimeout("")
25 {}
26
27 std::string proxyHost;
28 std::string proxyPort;
29 std::string proxyUser;
30 std::string proxyPassword;
31 std::string operationTimeout;
32 };
33
34 class ConfigParser
35 {
36 public:
37 static std::string stripWhiteSpace(const std::string& input);
38 static int parseConfig(const std::string& fileName,
39 Config& config);
40 };
41
42 #endif /* _CONFIGPARSER_H_ */
|