aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sisfile.h
blob: aa5683da1d790c951116952ea7a4db60fe4af218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _SISFILE_H
#define _SISFILE_H

#include "sistypes.h"
#include "sisfileheader.h"
#include "siscomponentrecord.h"

class SISLangRecord;
class SISFileRecord;
class SISReqRecord;

/**
 * The top level container of a SIS file.
 * Based on documentation by Alexander Thoukydides <alex@thouky.co.uk>.
 *
 * @author Daniel Brahneborg, 2002
 */
class SISFile
{
public:
	/**
	 * Populate the fields.
	 */
	void fillFrom(uchar* buf);

	int getLanguage();

	/**
	 * Find a language entry, based on the sequence number in the SISLangRecord
	 * part of the file.
	 */
	LangTableEntry* getLanguage(int i);

	/**
	 * Get the name of this component, in the selected language.
	 */
	uchar* getName();

	/**
	 * Set the installed drive.
	 */
	void setDrive(char drive);

	/**
	 * Set the number of installed files.
	 */
	void setFiles(int nFiles);

	/**
	 * Set the selected installation language.
	 */
	void setLanguage(int lang);

	SISFileHeader m_header;
	SISLangRecord* m_langRecords;
	SISFileRecord* m_fileRecords;
	SISReqRecord* m_reqRecords;

private:

	SISComponentNameRecord m_componentRecord;

};

#endif