![]() |
|
#include <id3v2header.h>
Public Member Functions | |
Header () | |
Header (const ByteVector &data) | |
virtual | ~Header () |
uint | majorVersion () const |
void | setMajorVersion (uint version) |
uint | revisionNumber () const |
bool | unsynchronisation () const |
bool | extendedHeader () const |
bool | experimentalIndicator () const |
bool | footerPresent () const |
uint | tagSize () const |
uint | completeTagSize () const |
void | setTagSize (uint s) |
void | setData (const ByteVector &data) |
ByteVector | render () const |
Static Public Member Functions | |
static uint | size () |
static ByteVector | fileIdentifier () |
Protected Member Functions | |
void | parse (const ByteVector &data) |
This class implements ID3v2 headers. It attempts to follow, both semantically and programatically, the structure specified in the ID3v2 standard. The API is based on the properties of ID3v2 headers specified there. If any of the terms used in this documentation are unclear please check the specification in the linked section. (Structure, 3.1)
TagLib::ID3v2::Header::Header | ( | ) |
Constructs an empty ID3v2 header.
TagLib::ID3v2::Header::Header | ( | const ByteVector & | data | ) |
virtual TagLib::ID3v2::Header::~Header | ( | ) | [virtual] |
Destroys the header.
Reimplemented in TagLib::ID3v2::Frame.
uint TagLib::ID3v2::Header::completeTagSize | ( | ) | const |
bool TagLib::ID3v2::Header::experimentalIndicator | ( | ) | const |
Returns true if the experimental indicator flag is set.
bool TagLib::ID3v2::Header::extendedHeader | ( | ) | const |
Returns true if an extended header is present in the tag.
static ByteVector TagLib::ID3v2::Header::fileIdentifier | ( | ) | [static] |
Returns the string used to identify and ID3v2 tag inside of a file. Presently this is always "ID3".
bool TagLib::ID3v2::Header::footerPresent | ( | ) | const |
Returns true if a footer is present in the tag.
uint TagLib::ID3v2::Header::majorVersion | ( | ) | const |
Returns the major version number. (Note: This is the 4, not the 2 in ID3v2.4.0. The 2 is implied.)
void TagLib::ID3v2::Header::parse | ( | const ByteVector & | data | ) | [protected] |
Called by setData() to parse the header data. It makes this information available through the public API.
Reimplemented in TagLib::ID3v2::Frame.
ByteVector TagLib::ID3v2::Header::render | ( | ) | const |
Renders the Header back to binary format.
Reimplemented in TagLib::ID3v2::Frame, and TagLib::ID3v2::Frame.
uint TagLib::ID3v2::Header::revisionNumber | ( | ) | const |
Returns the revision number. (Note: This is the 0, not the 4 in ID3v2.4.0. The 2 is implied.)
void TagLib::ID3v2::Header::setData | ( | const ByteVector & | data | ) |
Sets the data that will be used as the header. 10 bytes, starting from the beginning of data are used.
Reimplemented in TagLib::ID3v2::PrivateFrame, and TagLib::ID3v2::Frame.
void TagLib::ID3v2::Header::setMajorVersion | ( | uint | version | ) |
Set the the major version number to version. (Note: This is the 4, not the 2 in ID3v2.4.0. The 2 is implied.)
static uint TagLib::ID3v2::Header::size | ( | ) | [static] |
Returns the size of the header. Presently this is always 10 bytes.
Reimplemented in TagLib::ID3v2::Frame.
uint TagLib::ID3v2::Header::tagSize | ( | ) | const |
Returns the tag size in bytes. This is the size of the frame content. The size of the entire tag will be this plus the header size (10 bytes) and, if present, the footer size (potentially another 10 bytes).
bool TagLib::ID3v2::Header::unsynchronisation | ( | ) | const |
Returns true if unsynchronisation has been applied to all frames.
Reimplemented in TagLib::ID3v2::Frame.