diff options
author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-02 19:18:27 +0000 |
---|---|---|
committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-02 19:18:27 +0000 |
commit | 48c46dfdd986ad4a7a0692d05992f7882bef6a88 (patch) | |
tree | 88a3a88a7ab43632850569cba3ab48a1924d9e52 /live.cpp | |
download | vdr-plugin-live-48c46dfdd986ad4a7a0692d05992f7882bef6a88.tar.gz vdr-plugin-live-48c46dfdd986ad4a7a0692d05992f7882bef6a88.tar.bz2 |
- initial checkin
Diffstat (limited to 'live.cpp')
-rw-r--r-- | live.cpp | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/live.cpp b/live.cpp new file mode 100644 index 0000000..da7c300 --- /dev/null +++ b/live.cpp @@ -0,0 +1,86 @@ +/* + * httpd.c: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id: live.cpp,v 1.1 2007/01/02 19:18:27 lordjaxom Exp $ + */ + +#include <memory> +#include <vdr/plugin.h> +#include "setup.h" +#include "thread.h" + +namespace vdrlive { + +using namespace std; + +static const char *VERSION = "0.0.1"; +static const char *DESCRIPTION = "Enter description for 'httpd' plugin"; + +class Plugin : public cPlugin { +public: + Plugin(void); + virtual const char *Version(void) { return VERSION; } + virtual const char *Description(void) { return DESCRIPTION; } + virtual const char *CommandLineHelp(void); + virtual bool ProcessArgs(int argc, char *argv[]); + virtual bool Start(void); + virtual void Stop(void); + virtual void MainThreadHook(void); + virtual cString Active(void); + virtual cMenuSetupPage *SetupMenu(void); + virtual bool SetupParse(const char *Name, const char *Value); + +private: + auto_ptr< ServerThread > m_thread; +}; + +Plugin::Plugin(void) +{ +} + +const char *Plugin::CommandLineHelp(void) +{ + return "-L DIR --lib=DIR libtnt-live.so will be searched in DIR\n"; +} + +bool Plugin::ProcessArgs(int argc, char *argv[]) +{ + return Setup::Get().Parse( argc, argv ); +} + +bool Plugin::Start(void) +{ + // XXX error handling + m_thread.reset( new ServerThread ); + m_thread->Start(); + return true; +} + +void Plugin::Stop(void) +{ +} + +void Plugin::MainThreadHook(void) +{ +} + +cString Plugin::Active(void) +{ + return NULL; +} + +cMenuSetupPage *Plugin::SetupMenu(void) +{ + return NULL; +} + +bool Plugin::SetupParse(const char *Name, const char *Value) +{ + return true; +} + +} // namespace vdrlive + +VDRPLUGINCREATOR(vdrlive::Plugin); // Don't touch this! |