summaryrefslogtreecommitdiffstats
path: root/libpit/Source/libpit.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlibpit/Source/libpit.h (renamed from heimdall/source/PitData.h)43
1 files changed, 22 insertions, 21 deletions
diff --git a/heimdall/source/PitData.h b/libpit/Source/libpit.h
index b6a0d2f..636f1e1 100755
--- a/heimdall/source/PitData.h
+++ b/libpit/Source/libpit.h
@@ -18,14 +18,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
-#ifndef PITDATA_H
-#define PITDATA_H
+#ifndef LIBPIT_H
+#define LIBPIT_H
// C Standard Library
#include <string.h>
#include <vector>
-namespace Heimdall
+namespace libpit
{
class PitEntry
{
@@ -58,13 +58,13 @@ namespace Heimdall
unsigned int partitionIdentifier;
unsigned int partitionFlags;
- unsigned int unknown2;
+ unsigned int unknown1;
unsigned int partitionBlockSize;
unsigned int partitionBlockCount;
+ unsigned int unknown2;
unsigned int unknown3;
- unsigned int unknown4;
char partitionName[kPartitionNameMaxLength];
char filename[kFilenameMaxLength];
@@ -74,8 +74,6 @@ namespace Heimdall
PitEntry();
~PitEntry();
- void Print(void) const;
-
bool GetUnused(void) const
{
return unused;
@@ -116,14 +114,14 @@ namespace Heimdall
this->partitionFlags = partitionFlags;
}
- unsigned int GetUnknown2(void) const
+ unsigned int GetUnknown1(void) const
{
- return unknown2;
+ return unknown1;
}
- void SetUnknown2(unsigned int unknown2)
+ void SetUnknown1(unsigned int unknown1)
{
- this->unknown2 = unknown2;
+ this->unknown1 = unknown1;
}
unsigned int GetPartitionBlockSize(void) const
@@ -146,24 +144,24 @@ namespace Heimdall
this->partitionBlockCount = partitionBlockCount;
}
- unsigned int GetUnknown3(void) const
+ unsigned int GetUnknown2(void) const
{
- return unknown3;
+ return unknown2;
}
- void SetUnknown3(unsigned int unknown3)
+ void SetUnknown2(unsigned int unknown2)
{
- this->unknown3 = unknown3;
+ this->unknown2 = unknown2;
}
- unsigned int GetUnknown4(void) const
+ unsigned int GetUnknown3(void) const
{
- return unknown4;
+ return unknown3;
}
- void SetUnknown4(unsigned int unknown4)
+ void SetUnknown3(unsigned int unknown3)
{
- this->unknown4 = unknown4;
+ this->unknown3 = unknown3;
}
const char *GetPartitionName(void) const
@@ -287,14 +285,17 @@ namespace Heimdall
bool Unpack(const unsigned char *data);
void Pack(unsigned char *data) const;
+ void Clear(void);
+
+ PitEntry *GetEntry(unsigned int index);
+ const PitEntry *GetEntry(unsigned int index) const;
+
PitEntry *FindEntry(const char *partitionName);
const PitEntry *FindEntry(const char *partitionName) const;
PitEntry *FindEntry(unsigned int partitionIdentifier);
const PitEntry *FindEntry(unsigned int partitionIdentifier) const;
- void Print(void) const;
-
unsigned int GetEntryCount(void) const
{
return entryCount;