An implementation of APE footers. More...
#include <apefooter.h>
Public Member Functions | |
Footer () | |
Footer (const ByteVector &data) | |
~Footer () | |
Footer (const Footer &)=delete | |
Footer & | operator= (const Footer &)=delete |
unsigned int | version () const |
bool | headerPresent () const |
bool | footerPresent () const |
bool | isHeader () const |
void | setHeaderPresent (bool b) const |
unsigned int | itemCount () const |
void | setItemCount (unsigned int s) |
unsigned int | tagSize () const |
unsigned int | completeTagSize () const |
void | setTagSize (unsigned int s) |
void | setData (const ByteVector &data) |
ByteVector | renderFooter () const |
ByteVector | renderHeader () const |
Static Public Member Functions | |
static unsigned int | size () |
static ByteVector | fileIdentifier () |
Protected Member Functions | |
void | parse (const ByteVector &data) |
ByteVector | render (bool isHeader) const |
An implementation of APE footers.
This class implements APE footers (and headers). It attempts to follow, both semantically and programmatically, the structure specified in the APE v2.0 standard. The API is based on the properties of APE footer and headers specified there.
TagLib::APE::Footer::Footer | ( | ) |
Constructs an empty APE footer.
TagLib::APE::Footer::Footer | ( | const ByteVector & | data | ) |
TagLib::APE::Footer::~Footer | ( | ) |
Destroys the footer.
|
delete |
unsigned int TagLib::APE::Footer::completeTagSize | ( | ) | const |
Returns the tag size, including if present, the header size.
|
static |
Returns the string used to identify an APE tag inside of a file. Presently this is always "APETAGEX".
bool TagLib::APE::Footer::footerPresent | ( | ) | const |
Returns true
if a footer is present in the tag.
bool TagLib::APE::Footer::headerPresent | ( | ) | const |
Returns true
if a header is present in the tag.
bool TagLib::APE::Footer::isHeader | ( | ) | const |
Returns true
if this is actually the header.
unsigned int TagLib::APE::Footer::itemCount | ( | ) | const |
Returns the number of items in the tag.
|
protected |
Called by setData() to parse the footer data. It makes this information available through the public API.
|
protected |
Called by renderFooter and renderHeader
ByteVector TagLib::APE::Footer::renderFooter | ( | ) | const |
Renders the footer back to binary format.
ByteVector TagLib::APE::Footer::renderHeader | ( | ) | const |
Renders the header corresponding to the footer. If headerPresent() is false
, it returns an empty ByteVector.
void TagLib::APE::Footer::setData | ( | const ByteVector & | data | ) |
Sets the data that will be used as the footer. 32 bytes, starting from data will be used.
void TagLib::APE::Footer::setHeaderPresent | ( | bool | b | ) | const |
Sets whether the header should be rendered or not
void TagLib::APE::Footer::setItemCount | ( | unsigned int | s | ) |
Set the item count to s.
void TagLib::APE::Footer::setTagSize | ( | unsigned int | s | ) |
Set the tag size to s.
|
static |
Returns the size of the footer. Presently this is always 32 bytes.
unsigned int TagLib::APE::Footer::tagSize | ( | ) | const |
Returns the tag size in bytes. This is the size of the frame content and footer. The size of the entire tag will be this plus the header size, if present.
unsigned int TagLib::APE::Footer::version | ( | ) | const |
Returns the version number. (Note: This is the 1000 or 2000.)