1 | #ifndef _GSMANIFEST_H_
|
---|
2 | #define _GSMANIFEST_H_
|
---|
3 | #include <map>
|
---|
4 |
|
---|
5 | // use the standard namespace
|
---|
6 | #if !defined (GSDL_NAMESPACE_BROKEN)
|
---|
7 | #if defined(GSDL_USE_OBJECTSPACE)
|
---|
8 | using namespace ospace::std;
|
---|
9 | #else
|
---|
10 | using namespace std;
|
---|
11 | #endif
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | #include "File.h"
|
---|
15 | #include "FilePath.h"
|
---|
16 | #include "FileCopier.h"
|
---|
17 | #include "stringArray.h"
|
---|
18 | #include "uninstall.h"
|
---|
19 |
|
---|
20 | typedef map<FilePath, stringArray, less<FilePath> > pathStringArrayMap;
|
---|
21 |
|
---|
22 | class gsManifest : public installAgent, fileCopyMonitor
|
---|
23 | {
|
---|
24 | private:
|
---|
25 | protected:
|
---|
26 | strArrayMap manifests;
|
---|
27 | pathStringArrayMap selected;
|
---|
28 | stringArray removeFailed;
|
---|
29 |
|
---|
30 | FilePath collectRoot;
|
---|
31 |
|
---|
32 | bool getManifestLine(char *line, string ¯o);
|
---|
33 | public:
|
---|
34 | gsManifest(installManager &manager, FilePath &path); // used for install
|
---|
35 | gsManifest(installManager &manager); // used for uninstall
|
---|
36 | virtual ~gsManifest () {}
|
---|
37 | bool getManifest(FilePath &path);
|
---|
38 | void logAction(string actionName, string file);
|
---|
39 | void logAction(string actionName, string source, string dest);
|
---|
40 | bool undoAction(string actionName, stringArray ¶ms);
|
---|
41 | bool undoFailed(string path);
|
---|
42 | void expandGroupInstance(const string &parentgroup, string groupName);
|
---|
43 | void expandGroup(const string &group);
|
---|
44 | void expandGroups();
|
---|
45 | bool isGroup(string &name);
|
---|
46 | void expandMacro(string macroName, string value);
|
---|
47 | void clearSelection();
|
---|
48 | bool copy(FilePath *source);
|
---|
49 | void selectGroup(string groupName, FilePath &destination);
|
---|
50 | FileVector *selection(FilePath &source, stringArray &array);
|
---|
51 | FileVector *selection(FilePath &source, FilePath &destination);
|
---|
52 | bool selectCheckSpace();
|
---|
53 |
|
---|
54 | void copiedFile(string from, string to); // from fileCopyMonitor
|
---|
55 | void createdDir(string dirName); // from fileCopyMonitor
|
---|
56 | void copiedDir(string dirName); // from fileCopyMonitor
|
---|
57 | };
|
---|
58 | #endif;
|
---|