source: other-projects/gs2-export-cdrom-installer/trunk/fileCopier.h

Last change on this file was 22919, checked in by ak19, 14 years ago

Dr Bainbridge got gssetup.exe (for the export to cdrom installer) to work again for a later version of Visual Studio: now it works with Visual Studio 9 and does not use STLPort anymore. Changed .rc reference to including afxres.h to windows.h in vcinstall.rc, and there were changes to dereferencing File elements in an STL iterator (in fileCopier.cpp). Also needed to change references to unsigned double to double since the former seems to no longer be supported in later versions of Vis Studio.

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