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
|
// --- myMenuRecordingsItem ---------------------------------------------------
class myMenuRecordingsItem:public cOsdItem
{
private:
#if VDRVERSNUM >= 10733
cRecording *recording_copy;
cRecording *recording;
#endif
bool dirismoving;
bool isdvd;
bool ishdd;
bool isPesRecording;
int level,isdirectory;
int totalentries,newentries;
char *title;
char *name;
const char *filename;
std::string uniqid; // this is the unique name that identifies a recording
public:
myMenuRecordingsItem(cRecording *Recording,int Level);
~myMenuRecordingsItem();
const char *FileName(){return filename;}
const char *Name(){return name;}
#if VDRVERSNUM >= 10733
inline void rec_copy(void);
#endif
bool IsDirectory(){return name!=NULL;}
bool IsPesRecording(void) const { return isPesRecording; }
void IncrementCounter(bool IsNew);
bool IsDVD(){return isdvd;}
bool IsHDD(){return ishdd;}
void SetDirIsMoving(bool moving){dirismoving=moving;}
bool GetDirIsMoving(){return dirismoving;}
const char *UniqID(){return uniqid.length()?uniqid.c_str():"";}
#if VDRVERSNUM >= 10733
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
#endif
};
// --- myMenuRecordings -------------------------------------------------------
class myMenuRecordings:public cOsdMenu
{
private:
bool edit;
static bool wasdvd;
static bool washdd;
static bool golastreplayed;
static dev_t fsid;
static time_t lastDiskSpaceCheck;
static int lastFreeMB;
int level,helpkeys;
int recordingsstate;
char *base;
bool Open();
void SetHelpKeys();
void Title();
cRecording *GetRecording(myMenuRecordingsItem *Item);
eOSState Play();
eOSState Rewind();
eOSState Delete();
eOSState Rename();
eOSState MoveRec();
eOSState Info();
eOSState Details();
eOSState Commands(eKeys Key=kNone);
eOSState ChangeSorting();
int FreeMB();
public:
myMenuRecordings(const char *Base=NULL,int Level=0);
~myMenuRecordings();
void Set(bool Refresh=false);
virtual eOSState ProcessKey(eKeys Key);
#ifdef USE_GRAPHTFT
virtual const char* MenuKind(){return"MenuExtRecordings";}
#endif
void ForceFreeMbUpdate(){lastDiskSpaceCheck=0;};
};
// --- myMenuRenameRecording --------------------------------------------------
class myMenuRenameRecording:public cOsdMenu
{
private:
bool isdir;
char *dirbase,*dirname;
char name[MaxFileName];
char path[MaxFileName];
cRecording *recording;
myMenuRecordings *menurecordings;
public:
myMenuRenameRecording(cRecording *Recording,const char *DirBase,const char *DirName);
~myMenuRenameRecording();
virtual eOSState ProcessKey(eKeys Key);
};
// --- myMenuMoveRecording ----------------------------------------------------
class myMenuMoveRecording:public cOsdMenu
{
private:
int level;
char *base;
char *dirbase,*dirname;
cRecording *recording;
myMenuRecordings *menurecordings;
void Set();
eOSState Open();
eOSState MoveRec();
eOSState Create();
public:
myMenuMoveRecording(cRecording *Recording,const char *DirBase,const char *DirName,const char *Base=NULL,int Level=0);
~myMenuMoveRecording();
virtual eOSState ProcessKey(eKeys Key);
static bool clearall;
};
// --- myMenuRecordingDetails -------------------------------------------------
class myMenuRecordingDetails:public cOsdMenu
{
private:
int priority,lifetime;
cRecording *recording;
myMenuRecordings *menurecordings;
public:
myMenuRecordingDetails(cRecording *Recording);
virtual eOSState ProcessKey(eKeys Key);
static bool ModifyInfo(cRecording *Recording, const char *Info);
};
|