[1536] | 1 | #ifndef _GSMANIFEST_H_
|
---|
| 2 | #define _GSMANIFEST_H_
|
---|
| 3 | #include <map>
|
---|
[1539] | 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
|
---|
[1536] | 10 | using namespace std;
|
---|
[1539] | 11 | #endif
|
---|
| 12 | #endif
|
---|
[1536] | 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;
|
---|
[2013] | 27 | pathStringArrayMap selected;
|
---|
| 28 | stringArray removeFailed;
|
---|
[1536] | 29 |
|
---|
[2534] | 30 | FilePath collectRoot;
|
---|
| 31 |
|
---|
[1536] | 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
|
---|
[1543] | 36 | virtual ~gsManifest () {}
|
---|
[1536] | 37 | bool getManifest(FilePath &path);
|
---|
| 38 | void logAction(string actionName, string file);
|
---|
| 39 | void logAction(string actionName, string source, string dest);
|
---|
[2013] | 40 | bool undoAction(string actionName, stringArray ¶ms);
|
---|
| 41 | bool undoFailed(string path);
|
---|
[1536] | 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 |
|
---|
[1545] | 54 | void copiedFile(string from, string to); // from fileCopyMonitor
|
---|
[2534] | 55 | void createdDir(string dirName); // from fileCopyMonitor
|
---|
[1545] | 56 | void copiedDir(string dirName); // from fileCopyMonitor
|
---|
[1536] | 57 | };
|
---|
| 58 | #endif;
|
---|