![]() |
Miam-Player
0.8.0
A nice music player
|
An implementation of APE footers. More...
#include <apefooter.h>
Public Member Functions | |
Footer () | |
Constructs an empty APE footer. More... | |
Footer (const ByteVector &data) | |
Constructs an APE footer based on data. More... | |
virtual | ~Footer () |
Destroys the footer. More... | |
unsigned int | version () const |
Returns the version number. More... | |
bool | headerPresent () const |
Returns true if a header is present in the tag. More... | |
bool | footerPresent () const |
Returns true if a footer is present in the tag. More... | |
bool | isHeader () const |
Returns true this is actually the header. More... | |
void | setHeaderPresent (bool b) const |
Sets whether the header should be rendered or not. More... | |
unsigned int | itemCount () const |
Returns the number of items in the tag. More... | |
void | setItemCount (unsigned int s) |
Set the item count to s. More... | |
unsigned int | tagSize () const |
Returns the tag size in bytes. More... | |
unsigned int | completeTagSize () const |
Returns the tag size, including if present, the header size. More... | |
void | setTagSize (unsigned int s) |
Set the tag size to s. More... | |
void | setData (const ByteVector &data) |
Sets the data that will be used as the footer. More... | |
ByteVector | renderFooter () const |
Renders the footer back to binary format. More... | |
ByteVector | renderHeader () const |
Renders the header corresponding to the footer. More... | |
Static Public Member Functions | |
static unsigned int | size () |
Returns the size of the footer. More... | |
static ByteVector | fileIdentifier () |
Returns the string used to identify an APE tag inside of a file. More... | |
Protected Member Functions | |
void | parse (const ByteVector &data) |
Called by setData() to parse the footer data. More... | |
ByteVector | render (bool isHeader) const |
Called by renderFooter and renderHeader. More... | |
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 | ) |
|
virtual |
Destroys the footer.
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 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 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 | ( | 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.)