source: trunk/gsinstaller/fileCopier.h@ 1502

Last change on this file since 1502 was 1475, checked in by cs025, 24 years ago

Updated sources with most of uninstall added

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