Last change
on this file since 1541 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
|
Rev | Line | |
---|
[1536] | 1 | #ifndef _FILECOPIER_H_
|
---|
| 2 | #include "file.h"
|
---|
| 3 | #include "filePath.h"
|
---|
| 4 | #include "copyProgress.h"
|
---|
| 5 | #include "diskSpace.h"
|
---|
| 6 |
|
---|
| 7 | class fileCopyMonitor
|
---|
| 8 | {
|
---|
| 9 | public:
|
---|
| 10 | fileCopyMonitor() {};
|
---|
| 11 | virtual void copied(string from, string to, bool isDir) = 0;
|
---|
| 12 | };
|
---|
| 13 |
|
---|
| 14 | class fileCopySet
|
---|
| 15 | {
|
---|
| 16 | private:
|
---|
| 17 | FileVector fileList;
|
---|
| 18 | FilePath sourceDir;
|
---|
| 19 | unsigned long dataSize;
|
---|
| 20 | public:
|
---|
| 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 |
|
---|
| 32 | typedef vector<fileCopySet> fileCopySetList;
|
---|
| 33 |
|
---|
| 34 | class fileCopier
|
---|
| 35 | {
|
---|
| 36 | private:
|
---|
| 37 | fileCopySetList list;
|
---|
| 38 | unsigned long dataSize;
|
---|
| 39 | unsigned long copied;
|
---|
| 40 | copyProgressBar progressBar;
|
---|
| 41 | fileCopyMonitor *monitor;
|
---|
| 42 | protected:
|
---|
| 43 | public:
|
---|
| 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.