summaryrefslogtreecommitdiff
path: root/tntconfig.h
blob: 5e111759ad98ea401e2b38d5fd0e7f354c473f54 (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
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef VDR_LIVE_TNTCONFIG_H
#define VDR_LIVE_TNTCONFIG_H

#include <string>
#include <tnt/tntnet.h>
#include <vdr/config.h>
#include "tntfeatures.h"

namespace vdrlive {

#if TNT_CONFIG_INTERNAL
	class TntConfig
	{
		public:
			static TntConfig const& Get();

			void Configure(tnt::Tntnet& app) const;

		private:
			TntConfig();
			TntConfig( TntConfig const& );
	};
#else
	class TntConfig
	{
		public:
			static TntConfig const& Get();

			std::string const& GetConfigPath() const { return m_configPath; }
#if APIVERSNUM > 10729
			std::string const& GetResourcePath() const { return m_resourcePath; }
#endif

		private:
			std::string m_propertiesPath;
			std::string m_configPath;
#if APIVERSNUM > 10729
			std::string m_resourcePath;
#endif

			TntConfig();
			TntConfig( TntConfig const& );

			void WriteProperties();
			void WriteConfig();
	};
#endif // TNT_CONFIG_INTERNAL

} // namespace vdrlive

#endif // VDR_LIVE_TNTCONFIG_H