summaryrefslogtreecommitdiff
path: root/tools.h
blob: 0090ed2880bd2f5680854c10358546a0f967d8e3 (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
#include <string>
#include <fstream>
#include <iostream>

using namespace std;

class SortListItem:public cListObject
{
 private:
  string path;
 public:
  SortListItem(const char *Path){path=Path;};
  const char *Path(){return path.c_str();}
};

class SortList:public cList<SortListItem>
{
 public:
  void ReadConfigFile();
  void WriteConfigFile();
  bool Find(char *Path);
};

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);
};