-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweb.h
70 lines (54 loc) · 1.84 KB
/
web.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* web.c: A plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* $Id$
*/
#pragma once
#include <string>
#include <shared_mutex>
#include <memory>
#include <vdr/plugin.h>
#include "service/web_service.h"
static const char *VERSION = "0.0.1";
static const char *DESCRIPTION = "Uses the cefbrowser to show HTTP Pages, HbbTV applications and videos";
static const char *MAINMENUENTRY = "Web";
static char* MAINMENUENTRYALT = nullptr;
extern std::shared_mutex videoPlayerLock;
class cRegularWorker: public cThread {
private:
cMutex m_mutex;
cCondVar m_waitCondition;
public:
cRegularWorker();
~cRegularWorker();
void Stop();
void Action();
};
class cPluginWeb : public cPlugin {
private:
std::unique_ptr<cRegularWorker> regularWorker;
public:
cPluginWeb();
~cPluginWeb() override;
const char *Version() override { return VERSION; }
const char *Description() override { return DESCRIPTION; }
const char *CommandLineHelp() override;
bool ProcessArgs(int argc, char *argv[]) override;
bool Initialize() override;
bool Start() override;
void Stop() override;
void Housekeeping() override;
void MainThreadHook() override;
cString Active() override;
time_t WakeupTime() override;
const char *MainMenuEntry() override { return MAINMENUENTRYALT != nullptr ? MAINMENUENTRYALT : MAINMENUENTRY; }
cOsdObject *MainMenuAction() override;
cMenuSetupPage *SetupMenu() override;
bool SetupParse(const char *Name, const char *Value) override;
bool Service(const char *Id, void *Data) override;
const char **SVDRPHelpPages() override;
cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) override;
bool readConfiguration(const char* configFile);
};