summaryrefslogtreecommitdiff
path: root/setup.h
blob: 6d08ccfad3475dd1483a111f6583b40c303d2ea7 (plain)
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
#ifndef VDR_LIVE_SETUP_H
#define VDR_LIVE_SETUP_H

#include <string>
#include <list>

namespace vdrlive {

class Setup
{
public:
	typedef std::list< std::string > IpList;

	static Setup& Get();

	std::string const& GetLibraryPath() const { return m_libraryPath; }
	int GetServerPort() const { return m_serverPort; }
	IpList const& GetServerIps() const { return m_serverIps; }

	bool Parse( int argc, char* argv[] );
	char const* Help() const;
	
private:
	Setup();
	Setup( Setup const& );

	mutable std::string m_helpString;
	std::string m_libraryPath;
	int m_serverPort;
	std::list< std::string > m_serverIps;

	bool CheckLibraryPath();
	bool CheckServerPort();
	bool CheckServerIps();
};

} // namespace vdrlive

#endif // VDR_LIVE_SETUP_H