aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/siscomponentrecord.h17
-rw-r--r--lib/sisfile.h3
-rw-r--r--lib/sisfileheader.h10
-rw-r--r--lib/sisfilerecord.h6
-rw-r--r--lib/sislangrecord.h11
-rw-r--r--lib/sisreqrecord.h8
6 files changed, 50 insertions, 5 deletions
diff --git a/lib/siscomponentrecord.h b/lib/siscomponentrecord.h
index d15e754..5fbf945 100644
--- a/lib/siscomponentrecord.h
+++ b/lib/siscomponentrecord.h
@@ -30,6 +30,11 @@ class SISFile;
/**
* The name of the component in this SIS file.
* A single instance holds the names for all languages.
+ *
+ * There is one name record for each language.
+ * First comes the lengths of all the names, as 32 bit integers.
+ * Second comes pointers to the names, as an index in the complete
+ * SISFile.
*/
class SISComponentNameRecord
{
@@ -39,13 +44,19 @@ public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read data from.
+ * @param base The index where we start reading data.
+ * @param len The length of the buffer, for range checking.
+ * @param sisFile The container sis file.
*/
SisRC fillFrom(uint8_t* buf, int base, off_t len, SISFile* sisFile);
/**
* Return the name for the given language.
- * The number is the sequence number in the list of language records
- * in the sis file.
+ *
+ * @param no The sequence number in the list of language records in
+ * the sis file.
*/
uint8_t* getName(int no);
@@ -55,7 +66,7 @@ private:
uint32_t* m_namePtrs;
/**
- * The extracted names.
+ * The extracted names, as zero terminated strings.
*/
uint8_t** m_names;
diff --git a/lib/sisfile.h b/lib/sisfile.h
index 02e400b..cae00ee 100644
--- a/lib/sisfile.h
+++ b/lib/sisfile.h
@@ -40,6 +40,9 @@ class SISFile
public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read from.
+ * @param len The length of the buffer.
*/
SisRC fillFrom(uint8_t* buf, off_t len);
diff --git a/lib/sisfileheader.h b/lib/sisfileheader.h
index eba4c97..6b5fa3f 100644
--- a/lib/sisfileheader.h
+++ b/lib/sisfileheader.h
@@ -26,7 +26,10 @@
#include "sistypes.h"
/**
- * The first part of a SIS file.
+ * The first part of a SISFile.
+ *
+ * This file header is referenced from most other parts of the sis file,
+ * mainly since it contains the list of languages.
*/
class SISFileHeader
{
@@ -34,6 +37,11 @@ public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read from.
+ * @param base The index to start reading from, which is updated
+ * when the header is successfully read.
+ * @param len The length of the buffer.
*/
SisRC fillFrom(uint8_t* buf, int* base, off_t len);
diff --git a/lib/sisfilerecord.h b/lib/sisfilerecord.h
index 0f6526b..dbbbc49 100644
--- a/lib/sisfilerecord.h
+++ b/lib/sisfilerecord.h
@@ -39,6 +39,12 @@ public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read from.
+ * @param base The index to start reading from, which is updated
+ * when the record is successfully read.
+ * @param len The length of the buffer.
+ * @param sisFile The container SISFile.
*/
SisRC fillFrom(uint8_t* buf, int* base, off_t len, SISFile* sisFile);
diff --git a/lib/sislangrecord.h b/lib/sislangrecord.h
index 5aecd4a..4b6e7ae 100644
--- a/lib/sislangrecord.h
+++ b/lib/sislangrecord.h
@@ -35,10 +35,21 @@ public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read from.
+ * @param base The index to start reading from, which is updated
+ * when the record is successfully read.
+ * @param len The length of the buffer.
*/
SisRC fillFrom(uint8_t* buf, int* base, off_t len);
+ /**
+ * The language number.
+ *
+ * @see langTable
+ */
uint16_t m_lang;
+
};
#endif
diff --git a/lib/sisreqrecord.h b/lib/sisreqrecord.h
index 7219fe4..12bf535 100644
--- a/lib/sisreqrecord.h
+++ b/lib/sisreqrecord.h
@@ -37,8 +37,14 @@ public:
/**
* Populate the fields.
+ *
+ * @param buf The buffer to read from.
+ * @param base The index to start reading from, which is updated
+ * when the record is successfully read.
+ * @param len The length of the buffer.
+ * @param sisFile The container SISFile.
*/
- SisRC fillFrom(uint8_t* buf, int* base, off_t len, SISFile* file);
+ SisRC fillFrom(uint8_t* buf, int* base, off_t len, SISFile* sisFile);
uint32_t m_uid;
uint16_t m_major;