forked from frinnst/httpup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configparser.h
42 lines (36 loc) · 1.21 KB
/
configparser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
////////////////////////////////////////////////////////////////////////
// FILE: configparser.h
// AUTHOR: Johannes Winkelmann, [email protected]
// COPYRIGHT: (c) 2002-2005 by Johannes Winkelmann
// ---------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
////////////////////////////////////////////////////////////////////////
#ifndef _CONFIGPARSER_H_
#define _CONFIGPARSER_H_
#include <string>
struct Config
{
Config()
: proxyHost(""),
proxyPort(""),
proxyUser(""),
proxyPassword(""),
operationTimeout("")
{}
std::string proxyHost;
std::string proxyPort;
std::string proxyUser;
std::string proxyPassword;
std::string operationTimeout;
};
class ConfigParser
{
public:
static std::string stripWhiteSpace(const std::string& input);
static int parseConfig(const std::string& fileName,
Config& config);
};
#endif /* _CONFIGPARSER_H_ */