nstool/lib/libes/include/es/SectionHeader_V2.h

57 lines
1.2 KiB
C
Raw Normal View History

2018-06-06 12:38:42 +00:00
#pragma once
#include <string>
2018-06-24 04:46:11 +00:00
#include <fnd/ISerialisable.h>
2018-06-06 12:38:42 +00:00
#include <es/ticket.h>
namespace es
{
class SectionHeader_V2 :
2018-06-24 04:46:11 +00:00
public fnd::ISerialisable
2018-06-06 12:38:42 +00:00
{
public:
SectionHeader_V2();
SectionHeader_V2(const SectionHeader_V2& other);
void operator=(const SectionHeader_V2& other);
2018-06-06 12:38:42 +00:00
bool operator==(const SectionHeader_V2& other) const;
bool operator!=(const SectionHeader_V2& other) const;
// export/import binary
2018-06-24 04:46:11 +00:00
void toBytes();
void fromBytes(const byte_t* data, size_t len);
const fnd::Vec<byte_t>& getBytes() const;
2018-06-06 12:38:42 +00:00
// variables
virtual void clear();
uint32_t getSectionOffset() const;
void setSectionOffset(uint32_t offset);
uint32_t getRecordSize() const;
void setRecordSize(uint32_t size);
uint32_t getSectionSize() const;
void getSectionSize(uint32_t size);
uint16_t getRecordNum() const;
void setRecordNum(uint16_t record_num);
ticket::SectionType getSectionType() const;
void setSectionType(ticket::SectionType type);
private:
const std::string kModuleName = "SECTION_HEADER_V2";
// raw binary
2018-06-24 04:46:11 +00:00
fnd::Vec<byte_t> mRawBinary;
2018-06-06 12:38:42 +00:00
// variables
uint32_t mSectionOffset;
uint32_t mRecordSize;
uint32_t mSectionSize;
uint16_t mRecordNum;
ticket::SectionType mSectionType;
};
}