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
|
// --- myMenuRecordingsItem ---------------------------------------------------
class myMenuRecordingsItem:public cOsdItem
{
private:
bool dirismoving;
bool isdvd;
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;}
bool IsDirectory(){return name!=NULL;}
void IncrementCounter(bool IsNew);
bool IsDVD(){return isdvd;}
void SetDirIsMoving(bool moving){dirismoving=moving;}
bool GetDirIsMoving(){return dirismoving;}
const char *UniqID(){return uniqid.length()?uniqid.c_str():"";}
};
// --- myMenuRecordings -------------------------------------------------------
class myMenuRecordings:public cOsdMenu
{
private:
bool edit;
static bool wasdvd;
static bool golastreplayed;
static dev_t fsid;
static int freediskspace;
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,char *current=NULL);
virtual eOSState ProcessKey(eKeys Key);
#ifdef USE_GRAPHTFT
virtual const char* MenuKind(){return"MenuExtRecordings";}
#endif
};
// --- 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);
};
|