Version 0.6.3 release. Big-endian bug fix, new GUID generation method,
architectural changes.
diff --git a/parttypes.h b/parttypes.h
index 1534a52..1f82d1d 100644
--- a/parttypes.h
+++ b/parttypes.h
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <string>
#include "support.h"
+#include "guid.h"
#ifndef __PARTITION_TYPES
#define __PARTITION_TYPES
@@ -18,27 +19,42 @@
// type codes, so as to permit disambiguation and use of new
// codes required by GPT
uint16_t MBRType;
- struct GUIDData GUIDType;
+ GUIDData GUIDType;
string name;
int display; // 1 to show to users as available type, 0 not to
AType* next;
}; // struct AType
-class PartTypes {
+class PartType : public GUIDData {
protected:
static int numInstances;
static AType* allTypes; // Linked list holding all the data
static AType* lastType; // Pointer to last entry in the list
+ void AddAllTypes(void);
public:
- PartTypes(void);
- ~PartTypes(void);
- int AddType(uint16_t mbrType, uint64_t guidData1, uint64_t guidData2,
- const char * name, int toDisplay = 1);
- void ShowTypes(void);
+ PartType(void);
+ PartType(const PartType & orig);
+ PartType(const GUIDData & orig);
+ ~PartType(void);
+
+ // Set up type information
+ int AddType(uint16_t mbrType, const char * guidData, const char * name, int toDisplay = 1);
+
+ // Assignment operators based on base class....
+ GUIDData & operator=(const GUIDData & orig) {return GUIDData::operator=(orig);}
+ GUIDData & operator=(const string & orig) {return GUIDData::operator=(orig);}
+ GUIDData & operator=(const char * orig) {return GUIDData::operator=(orig);}
+
+ // New data assignment
+ GUIDData & operator=(uint16_t ID); // Use MBR type code time 0x0100 to assign GUID
+
+ // Retrieve transformed GUID data based on type code matches
+ string TypeName(void);
+ uint16_t GetHexType();
+
+ // Information relating to all type data
+ void ShowAllTypes(void);
int Valid(uint16_t);
- string GUIDToName(struct GUIDData typeCode);
- struct GUIDData IDToGUID(uint16_t ID);
- uint16_t GUIDToID(struct GUIDData);
};
#endif