blob: 4e5fdebc35e6abe10ad5ce166d171c91ed7a33bb (
plain)
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
|
std::string myStrReplace(std::string S,char C1,const char* C2);
class SortListItem:public cListObject
{
private:
std::string path;
public:
SortListItem(std::string Path){path=Path;};
std::string Path(){return path;}
};
class SortList:public cList<SortListItem>
{
public:
void ReadConfigFile();
void WriteConfigFile();
bool Find(std::string Path);
};
extern SortList *mySortList;
bool MoveRename(const char *OldName,const char *NewName,cRecording *Recording,bool Move);
class myRecListItem:public cListObject
{
friend class myRecList;
private:
static bool SortByName;
char *filename;
static char *StripEpisodeName(char *s);
public:
myRecListItem(cRecording *Recording);
~myRecListItem();
virtual int Compare(const cListObject &ListObject)const;
cRecording *recording;
};
class myRecList:public cList<myRecListItem>
{
public:
void Sort(bool SortByName);
};
// --- MoveListItem -----------------------------------------------------------
class MoveListItem:public cListObject
{
private:
bool moveinprogress;
bool movecanceled;
std::string from;
std::string to;
public:
MoveListItem(std::string From,std::string To){from=From;to=To;moveinprogress=false;movecanceled=false;}
std::string From(){return from;}
std::string To(){return to;}
void SetMoveInProgress(){moveinprogress=true;}
bool GetMoveInProgress(){return moveinprogress;}
void SetMoveCanceled(){movecanceled=true;}
bool GetMoveCanceled(){return movecanceled;}
};
// --- MoveList ---------------------------------------------------------------
class MoveList:public cList<MoveListItem>
{
};
// --- CutterListItem ---------------------------------------------------------
class CutterListItem:public cListObject
{
private:
bool cutinprogress;
std::string filename;
std::string newfilename;
public:
CutterListItem(std::string FileName){filename=FileName;cutinprogress=false;};
void SetNewFileName(std::string NewFileName){newfilename=NewFileName;}
std::string FileName(){return filename;}
std::string NewFileName(){return newfilename;}
void SetCutInProgress(){cutinprogress=true;}
bool GetCutInProgress(){return cutinprogress;}
};
// --- CutterList -------------------------------------------------------------
class CutterList:public cList<CutterListItem>
{
};
// --- WorkerThread -----------------------------------------------------------
class WorkerThread:public cThread
{
private:
bool cancelmove,cancelcut;
MoveList *MoveBetweenFileSystemsList;
CutterList *CutterQueue;
void Cut(std::string From,std::string To);
bool Move(std::string From,std::string To);
protected:
virtual void Action();
public:
WorkerThread();
~WorkerThread();
const char *Working();
bool IsCutting(std::string Path);
bool IsMoving(std::string Path);
void CancelCut(std::string Path);
void CancelMove(std::string Path);
void AddToCutterQueue(std::string Path);
void AddToMoveList(std::string From,std::string To);
bool IsCutterQueueEmpty(){return CutterQueue->First();}
bool IsMoveListEmpty(){return MoveBetweenFileSystemsList->First();}
};
extern WorkerThread *MoveCutterThread;
class Icons
{
private:
static bool IsUTF8;
public:
static void InitCharSet();
static const char* Continue(){return IsUTF8?"\ue000":"\x80";}
static const char* DVD(){return IsUTF8?"\ue001":"\x81";}
static const char* Directory(){return IsUTF8?"\ue002":"\x82";}
static const char* FixedBlank(){return IsUTF8?"\ue003":"\x83";}
static const char* Scissor(){return IsUTF8?"\ue004":"\x84";}
static const char* MovingRecording(){return IsUTF8?"\ue005":"\x85";}
static const char* MovingDirectory(){return IsUTF8?"\ue006":"\x86";}
static const char* ProgressStart(){return IsUTF8?"\ue007":"\x87";}
static const char* ProgressFilled(){return IsUTF8?"\ue008":"\x88";}
static const char* ProgressEmpty(){return IsUTF8?"\ue009":"\x89";}
static const char* ProgressEnd(){return IsUTF8?"\ue00a":"\x8a";}
static const char* Recording(){return IsUTF8?"\ue00b":"\x8b";}
static const char* AlarmClock(){return IsUTF8?"\ue00c":"\x8c";}
static const char* TVScrambled(){return IsUTF8?"\ue00d":"\x8d";}
static const char* Radio(){return IsUTF8?"\ue00e":"\x8e";}
static const char* TV(){return IsUTF8?"\ue00f":"\x8f";}
static const char* New(){return IsUTF8?"\ue010":"\x90";}
static const char* Repititive_timer(){return IsUTF8?"\ue011":"\x91";}
static const char* Running(){return IsUTF8?"\ue012":"\x92";}
};
|