forked from hrkfdn/mpdas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
34 lines (29 loc) · 782 Bytes
/
config.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
#ifndef _CONFIG_H
#define _CONFIG_H
class CConfig
{
public:
CConfig(char* cfg);
std::string getLUsername() { return _lusername; }
std::string getLPassword() { return _lpassword; }
std::string getMHost() { return _mhost; }
std::string getMPassword() { return _mpassword; }
std::string getRUser() { return _runninguser; }
bool getDebug() { return (_debug == true); }
int getMPort() { return _mport; }
bool gotNecessaryData() {
if(!_lusername.size() || !_lpassword.size())
return false;
return true;
}
void LoadConfig(std::string path);
private:
void ParseLine(std::string line);
std::string _lusername, _lpassword;
std::string _mhost, _mpassword;
std::string _runninguser;
int _mport;
bool _debug;
};
extern CConfig* Config;
#endif