source: trunk/gsinstaller/fileCopier.h@ 1537

Last change on this file since 1537 was 1536, checked in by sjboddie, 24 years ago

Changes to get compiling on VC++ and gcc

  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1#ifndef _FILECOPIER_H_
2#include "file.h"
3#include "filePath.h"
4#include "copyProgress.h"
5#include "diskSpace.h"
6
7class fileCopyMonitor
8{
9public:
10 fileCopyMonitor() {};
11 virtual void copied(string from, string to, bool isDir) = 0;
12};
13
14class fileCopySet
15{
16private:
17 FileVector fileList;
18 FilePath sourceDir;
19 unsigned long dataSize;
20public:
21 FilePath destDir;
22 fileCopySet();
23 fileCopySet(FileVector files, FilePath &from, FilePath &to);
24 char *destination(File *file);
25 unsigned long getOriginalSize();
26 unsigned long getCopiedSize(DiskSpace &space);
27 bool copyFile(File *file, fileCopyMonitor *monitor, copyProgressBar &progressBar);
28 void copy(File *file, fileCopyMonitor *monitor, copyProgressBar &progressBar);
29 void copy(fileCopyMonitor *monitor, copyProgressBar &progressBar);
30};
31
32typedef vector<fileCopySet> fileCopySetList;
33
34class fileCopier
35{
36private:
37 fileCopySetList list;
38 unsigned long dataSize;
39 unsigned long copied;
40 copyProgressBar progressBar;
41 fileCopyMonitor *monitor;
42protected:
43public:
44 fileCopier::fileCopier(fileCopyMonitor *monitor, fileCopySetList &list);
45 fileCopier::fileCopier(fileCopyMonitor *monitor);
46 void fileCopier::addSet(fileCopySet &set) { this->list.push_back(set); }
47 bool checkSpace();
48 void copy();
49};
50#define _FILECOPIER_H_
51#endif
Note: See TracBrowser for help on using the repository browser.