summaryrefslogtreecommitdiff
path: root/live.h
blob: 2b224a1794d10cab77af2a542b21636ffcb1764a (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
#ifndef VDR_LIVE_LIVE_H
#define VDR_LIVE_LIVE_H

#include <memory>
#include <string>
#include <vdr/config.h>
#include <vdr/plugin.h>
#include "thread.h"

namespace vdrlive {

class Plugin : public cPlugin {
public:
	Plugin(void);
	virtual const char *Version(void) { return VERSION; }
	virtual const char *Description(void) { return tr(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);

	static std::string const& GetConfigDirectory() { return m_configDirectory; }
#if APIVERSNUM > 10729
	static std::string const& GetResourceDirectory() { return m_resourceDirectory; }
#endif

private:
	static const char *VERSION;
	static const char *DESCRIPTION;

	static std::string m_configDirectory;
#if APIVERSNUM > 10729
	static std::string m_resourceDirectory;
#endif

	std::auto_ptr< ServerThread > m_thread;
};

} // namespace vdrlive

#endif // VDR_LIVE_LIVE_H