aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sisfilerecord.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisfilerecord.h')
-rw-r--r--lib/sisfilerecord.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/sisfilerecord.h b/lib/sisfilerecord.h
new file mode 100644
index 0000000..1187ccf
--- /dev/null
+++ b/lib/sisfilerecord.h
@@ -0,0 +1,64 @@
+#ifndef _SISFILERECORD_H
+#define _SISFILERECORD_H
+
+#include "sistypes.h"
+
+class SISFile;
+
+/**
+ * Information about a file component in a SIS file.
+ *
+ * The file can be for multiple languages, in which case a single
+ * instance holds pointers to contents for all languages.
+ */
+class SISFileRecord
+{
+public:
+
+ /**
+ * Populate the fields.
+ */
+ void fillFrom(uchar* buf, int* base, SISFile* sisFile);
+
+ /**
+ * 1 if multiple lang versions, otherwise 0.
+ */
+ uint32 m_flags;
+
+ /**
+ * Type of file.
+ *
+ * - 0: Standard file.
+ * - 1: Text file to display during installation.
+ * - 2: SIS component.
+ * - 3: File to run during installation/removal.
+ * - 4: Does not exist yet, but will be created when app is run, so
+ * it should not be removed during an upgrade.
+ */
+ uint32 m_fileType;
+
+ /**
+ * If file type is 1:
+ *
+ * - 0: Continue.
+ * - 1: Yes, No (skip next file).
+ * - 2: Yes, No (abort installation).
+ *
+ * If file type is 3:
+ *
+ * - 0: Run during installation.
+ * - 1: Run during removal.
+ * - 2: Run during both installation and removal.
+ */
+ uint32 m_fileDetails;
+
+ uint32 m_sourceLength;
+ uint32 m_sourcePtr;
+ uint32 m_destLength;
+ uint32 m_destPtr;
+ uint32* m_fileLengths;
+ uint32* m_filePtrs;
+};
+
+#endif
+