From 54ac5eaaab8065473fb023c713e383b7fe5d15a9 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sat, 21 Jun 2008 01:22:21 +0200 Subject: 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. --- tntconfig.h | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'tntconfig.h') 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 +#include 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 -- cgit v1.2.3