File: live.h

package info (click to toggle)
vdr-plugin-live 3.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,128 kB
  • sloc: cpp: 12,995; javascript: 3,234; makefile: 241; sh: 40
file content (54 lines) | stat: -rw-r--r-- 1,583 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
#ifndef VDR_LIVE_LIVE_H
#define VDR_LIVE_LIVE_H

#include "thread.h"

// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>)
#include <string>

#if TNTVERSION >= 30000
  #include <cxxtools/log.h>  // must be loaded before any VDR include because of duplicate macros (LOG_ERROR, LOG_DEBUG, LOG_INFO)
#endif

#ifndef DISABLE_TEMPLATES_COLLIDING_WITH_STL
// To get rid of the swap definition in vdr/tools.h
#define DISABLE_TEMPLATES_COLLIDING_WITH_STL
#endif
#include <vdr/plugin.h>

namespace vdrlive {

//class cLiveWorker;
class Plugin : public cPlugin {
public:
  Plugin();
  virtual ~Plugin() override;
  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 bool Initialize(void);
  virtual void Stop(void);
  virtual void Housekeeping(void);
  virtual cString Active(void);
  virtual cMenuSetupPage *SetupMenu(void);
  virtual bool SetupParse(const char *Name, const char *Value);
  virtual bool Service(const char *Id, void *Data = NULL);

  static std::string const& GetConfigDirectory() { return m_configDirectory; }
  static std::string const& GetResourceDirectory() { return m_resourceDirectory; }

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

  static std::string m_configDirectory;
  static std::string m_resourceDirectory;

  std::unique_ptr<ServerThread> m_thread;
};

} // namespace vdrlive

#endif // VDR_LIVE_LIVE_H