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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
/*
* setup.h: A plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __setup_h
#define __setup_h
#include <vdr/menuitems.h>
#include "xmltv2vdr.h"
class cMyMenuEditBitItem : public cMenuEditBoolItem
{
protected:
uint *value;
uint mask;
int bit;
virtual void Set();
public:
cMyMenuEditBitItem(const char *Name, uint *Value, uint Mask, const char *FalseString=NULL, const char *TrueString=NULL);
};
class cMenuSetupXmltv2vdrChannelSource;
class cMenuSetupXmltv2vdrChannelMap;
class cMenuSetupXmltv2vdr : public cMenuSetupPage
{
protected:
virtual void Store(void);
private:
cStringList channels;
cPluginXmltv2vdr *baseplugin;
cMenuSetupXmltv2vdrChannelSource *cs;
cMenuSetupXmltv2vdrChannelMap *cm;
int mappingBegin,mappingEnd;
int sourcesBegin,sourcesEnd;
int mappingEntry;
int epEntry;
eOSState edit(void);
void generatesumchannellist();
unsigned int epall;
int wakeup;
public:
void Output(void);
static cOsdItem *NewTitle(const char *s);
void ClearCS()
{
cs=NULL;
}
void ClearCM()
{
cm=NULL;
}
cMenuSetupXmltv2vdr(cPluginXmltv2vdr *Plugin);
~cMenuSetupXmltv2vdr();
virtual eOSState ProcessKey(eKeys Key);
cStringList *ChannelList()
{
return &channels;
}
};
class cMenuSetupXmltv2vdrTextMap : public cMenuSetupPage
{
protected:
virtual void Store(void);
private:
cPluginXmltv2vdr *baseplugin;
char country[255];
char year[255];
char originaltitle[255];
char director[255];
char actor[255];
char writer[255];
char adapter[255];
char producer[255];
char composer[255];
char editor[255];
char presenter[255];
char commentator[255];
char guest[255];
char review[255];
char category[255];
char season[255];
char episode[255];
char episodeoverall[255];
char starrating[255];
char audio[255];
char video[255];
char blacknwhite[255];
char dolby[255];
char dolbydigital[255];
char bilingual[255];
public:
cMenuSetupXmltv2vdrTextMap(cPluginXmltv2vdr *Plugin);
};
class cMenuSetupXmltv2vdrChannelSource : public cMenuSetupPage
{
protected:
virtual void Store(void);
private:
cMenuSetupXmltv2vdr *menu;
cPluginXmltv2vdr *baseplugin;
cEPGSource *epgsrc;
int *sel;
time_t day;
int weekday,start;
int days;
int usepics;
char pin[255];
void output(void);
public:
cMenuSetupXmltv2vdrChannelSource(cPluginXmltv2vdr *Plugin, cMenuSetupXmltv2vdr *Menu, int Index);
~cMenuSetupXmltv2vdrChannelSource();
virtual eOSState ProcessKey(eKeys Key);
void ClearMenu()
{
menu=NULL;
}
};
class cMenuSetupXmltv2vdrChannelMap : public cMenuSetupPage
{
protected:
virtual void Store(void);
private:
cPluginXmltv2vdr *baseplugin;
cMenuSetupXmltv2vdr *menu;
cEPGMapping *map;
bool hasmaps;
uint flags;
void output(void);
cString title;
const char *channel;
int getdaysmax();
cOsdItem *option(const char *s, bool yesno);
void epgmappingreplace(cEPGMapping *newmapping);
int c1,c2,c3,c4,cm;
public:
cMenuSetupXmltv2vdrChannelMap(cPluginXmltv2vdr *Plugin, cMenuSetupXmltv2vdr *Menu, int Index);
~cMenuSetupXmltv2vdrChannelMap();
void AddChannel2Map(int ChannelNumber);
bool EPGMappingExists(tChannelID ChannelID);
virtual eOSState ProcessKey(eKeys Key);
void ClearMenu()
{
menu=NULL;
}
};
class cMenuSetupXmltv2vdrChannelsVDR : public cOsdMenu
{
private:
cPluginXmltv2vdr *baseplugin;
cMenuSetupXmltv2vdrChannelMap *map;
bool epgmappingexists(tChannelID channelid, const char *channel2ignore);
public:
cMenuSetupXmltv2vdrChannelsVDR(cPluginXmltv2vdr *Plugin, cMenuSetupXmltv2vdrChannelMap *Map,
const char *Channel, cString Title);
virtual eOSState ProcessKey(eKeys Key);
virtual const char *MenuKind()
{
return "MenuChannels";
}
};
class cMenuSetupXmltv2vdrLog : public cOsdMenu
{
private:
enum
{
VIEW_ERROR=1,
VIEW_INFO,
VIEW_DEBUG
};
int level;
cEPGSource *src;
char nextrun_str[30];
void output(void);
int width;
time_t lastrefresh;
const cFont *font;
public:
cMenuSetupXmltv2vdrLog(cPluginXmltv2vdr *Plugin, cEPGSource *Source);
virtual const char *MenuKind()
{
return "MenuLog";
}
virtual eOSState ProcessKey(eKeys Key);
};
#endif
|