From cd737785cace62f79fbd5f596ccb0d70de3e6252 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Fri, 5 Jan 2007 19:51:38 +0000 Subject: - removed obsolete interfacing code --- live.cpp | 14 +------------- live.h | 21 +-------------------- setup.cpp | 6 ++++++ setup.h | 9 +-------- 4 files changed, 9 insertions(+), 41 deletions(-) diff --git a/live.cpp b/live.cpp index 5b6ace6..ef482b5 100644 --- a/live.cpp +++ b/live.cpp @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: live.cpp,v 1.9 2007/01/05 17:52:46 lordjaxom Exp $ + * $Id: live.cpp,v 1.10 2007/01/05 19:51:38 lordjaxom Exp $ */ #include @@ -72,18 +72,6 @@ bool Plugin::SetupParse(const char *Name, const char *Value) return LiveSetup().ParseSetupEntry( Name, Value ); } -Setup& Plugin::GetLiveSetup() -{ - static Setup instance; - return instance; -} - -TimerManager& Plugin::GetLiveTimerManager() -{ - static TimerManager instance; - return instance; -} - } // namespace vdrlive VDRPLUGINCREATOR(vdrlive::Plugin); // Don't touch this! diff --git a/live.h b/live.h index eba7108..20b26e7 100644 --- a/live.h +++ b/live.h @@ -8,23 +8,7 @@ namespace vdrlive { -class Setup; -class TimerManager; - -class PluginBase : public cPlugin -{ -public: - virtual Setup& GetLiveSetup() = 0; - virtual TimerManager& GetLiveTimerManager() = 0; -}; - -inline PluginBase& LivePlugin() -{ - static PluginBase& plugin = *static_cast< PluginBase* >( cPluginManager::GetPlugin( PLUGIN_NAME_I18N ) ); - return plugin; -} - -class Plugin : public PluginBase { +class Plugin : public cPlugin { public: Plugin(void); virtual const char *Version(void) { return VERSION; } @@ -38,9 +22,6 @@ public: virtual cMenuSetupPage *SetupMenu(void); virtual bool SetupParse(const char *Name, const char *Value); - virtual Setup& GetLiveSetup(); - virtual TimerManager& GetLiveTimerManager(); - static std::string const& GetConfigDirectory() { return m_configDirectory; } private: diff --git a/setup.cpp b/setup.cpp index 534cfb4..0c78d5a 100644 --- a/setup.cpp +++ b/setup.cpp @@ -93,4 +93,10 @@ bool Setup::CheckServerIps() return true; } +Setup& LiveSetup() +{ + static Setup instance; + return instance; +} + } // namespace vdrlive diff --git a/setup.h b/setup.h index a4d3a58..0933ea2 100644 --- a/setup.h +++ b/setup.h @@ -8,11 +8,9 @@ namespace vdrlive { -class Plugin; - class Setup { - friend Setup& Plugin::GetLiveSetup(); + friend Setup& LiveSetup(); public: typedef std::list< std::string > IpList; @@ -45,11 +43,6 @@ private: bool CheckServerIps(); }; -inline Setup& LiveSetup() -{ - return LivePlugin().GetLiveSetup(); -} - } // namespace vdrlive #endif // VDR_LIVE_SETUP_H -- cgit v1.2.3