An implementation of APE footers. More...

#include <apefooter.h>

Public Member Functions

 Footer ()
 Footer (const ByteVector &data)
virtual ~Footer ()
uint version () const
bool headerPresent () const
bool footerPresent () const
bool isHeader () const
void setHeaderPresent (bool b) const
uint itemCount () const
void setItemCount (uint s)
uint tagSize () const
uint completeTagSize () const
void setTagSize (uint s)
void setData (const ByteVector &data)
ByteVector renderFooter () const
ByteVector renderHeader () const

Static Public Member Functions

static uint size ()
static ByteVector fileIdentifier ()

Protected Member Functions

void parse (const ByteVector &data)
ByteVector render (bool isHeader) const

Detailed Description

An implementation of APE footers.

This class implements APE footers (and headers). It attempts to follow, both semantically and programatically, the structure specified in the APE v2.0 standard. The API is based on the properties of APE footer and headers specified there.

Constructor & Destructor Documentation

TagLib::APE::Footer::Footer ( )

Constructs an empty APE footer.

TagLib::APE::Footer::Footer ( const ByteVector data)

Constructs an APE footer based on data. parse() is called immediately.

virtual TagLib::APE::Footer::~Footer ( )
virtual

Destroys the footer.

Member Function Documentation

uint TagLib::APE::Footer::completeTagSize ( ) const

Returns the tag size, including if present, the header size.

See Also
tagSize()
static ByteVector TagLib::APE::Footer::fileIdentifier ( )
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 this is actually the header.

uint TagLib::APE::Footer::itemCount ( ) const

Returns the number of items in the tag.

void TagLib::APE::Footer::parse ( const ByteVector data)
protected

Called by setData() to parse the footer data. It makes this information available through the public API.

ByteVector TagLib::APE::Footer::render ( bool  isHeader) const
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 set to 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 ( uint  s)

Set the item count to s.

See Also
itemCount()
void TagLib::APE::Footer::setTagSize ( uint  s)

Set the tag size to s.

See Also
tagSize()
static uint TagLib::APE::Footer::size ( )
static

Returns the size of the footer. Presently this is always 32 bytes.

uint 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.

See Also
completeTagSize()
uint TagLib::APE::Footer::version ( ) const

Returns the version number. (Note: This is the 1000 or 2000.)


The documentation for this class was generated from the following file: