summaryrefslogtreecommitdiff
path: root/tntconfig.h
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-06-21 01:22:21 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-06-21 01:22:21 +0200
commit54ac5eaaab8065473fb023c713e383b7fe5d15a9 (patch)
tree1ab4ffaf5eb3817efb68e419598671f29bc7e940 /tntconfig.h
parent189d1d07d4971a4d0cc8d0d700c62f541258c33a (diff)
downloadvdr-plugin-live-54ac5eaaab8065473fb023c713e383b7fe5d15a9.tar.gz
vdr-plugin-live-54ac5eaaab8065473fb023c713e383b7fe5d15a9.tar.bz2
Changed the definition of tntversion in the LIVE source files.
Now there is a define TNTVERSION set to a number that can be compared in C oreprocessor 'if' statements. This allows for adding support for tntnet specific features with evolving tntnet version.
Diffstat (limited to 'tntconfig.h')
-rw-r--r--tntconfig.h49
1 files changed, 32 insertions, 17 deletions
diff --git a/tntconfig.h b/tntconfig.h
index ba31f97..9c30e44 100644
--- a/tntconfig.h
+++ b/tntconfig.h
@@ -2,26 +2,41 @@
#define VDR_LIVE_TNTCONFIG_H
#include <string>
+#include <tnt/tntnet.h>
namespace vdrlive {
-class TntConfig
-{
-public:
- static TntConfig const& Get();
-
- std::string const& GetConfigPath() const { return m_configPath; }
-
-private:
- std::string m_propertiesPath;
- std::string m_configPath;
-
- TntConfig();
- TntConfig( TntConfig const& );
-
- void WriteProperties();
- void WriteConfig();
-};
+#if TNTVERSION >= 1606
+ 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; }
+
+ private:
+ std::string m_propertiesPath;
+ std::string m_configPath;
+
+ TntConfig();
+ TntConfig( TntConfig const& );
+
+ void WriteProperties();
+ void WriteConfig();
+ };
+#endif
} // namespace vdrlive