![]() |
|
#include <id3v2frame.h>
Public Member Functions | |
Header (const ByteVector &data, bool synchSafeInts) | |
Header (const ByteVector &data, uint version=4) | |
virtual | ~Header () |
void | setData (const ByteVector &data, bool synchSafeInts) |
void | setData (const ByteVector &data, uint version=4) |
ByteVector | frameID () const |
void | setFrameID (const ByteVector &id) |
uint | frameSize () const |
void | setFrameSize (uint size) |
uint | version () const |
bool | tagAlterPreservation () const |
void | setTagAlterPreservation (bool discard) |
bool | fileAlterPreservation () const |
bool | readOnly () const |
bool | groupingIdentity () const |
bool | compression () const |
bool | encryption () const |
bool | unsycronisation () const |
bool | dataLengthIndicator () const |
ByteVector | render () const |
bool | frameAlterPreservation () const |
Static Public Member Functions | |
static uint | size () |
static uint | size (uint version) |
The ID3v2 Frame Header (Structure, 4)
Every ID3v2::Frame has an associated header that gives some general properties of the frame and also makes it possible to identify the frame type.
As such when reading an ID3v2 tag ID3v2::FrameFactory first creates the frame headers and then creates the appropriate Frame subclass based on the type and attaches the header.
TagLib::ID3v2::Frame::Header::Header | ( | const ByteVector & | data, | |
bool | synchSafeInts | |||
) |
TagLib::ID3v2::Frame::Header::Header | ( | const ByteVector & | data, | |
uint | version = 4 | |||
) | [explicit] |
virtual TagLib::ID3v2::Frame::Header::~Header | ( | ) | [virtual] |
Destroys this Header instance.
void TagLib::ID3v2::Frame::Header::setData | ( | const ByteVector & | data, | |
bool | synchSafeInts | |||
) |
Sets the data for the Header.
void TagLib::ID3v2::Frame::Header::setData | ( | const ByteVector & | data, | |
uint | version = 4 | |||
) |
ByteVector TagLib::ID3v2::Frame::Header::frameID | ( | ) | const |
void TagLib::ID3v2::Frame::Header::setFrameID | ( | const ByteVector & | id | ) |
Sets the frame's ID to id. Only the first four bytes of id will be used.
uint TagLib::ID3v2::Frame::Header::frameSize | ( | ) | const |
Returns the size of the frame data portion, as set when setData() was called or set explicity via setFrameSize().
void TagLib::ID3v2::Frame::Header::setFrameSize | ( | uint | size | ) |
Sets the size of the frame data portion.
uint TagLib::ID3v2::Frame::Header::version | ( | ) | const |
Returns the ID3v2 version of the header (as passed in from the construction of the header).
static uint TagLib::ID3v2::Frame::Header::size | ( | ) | [static] |
Returns the size of the frame header in bytes.
Returns the size of the frame header in bytes for the ID3v2 version that's given.
bool TagLib::ID3v2::Frame::Header::tagAlterPreservation | ( | ) | const |
Returns true if the flag for tag alter preservation is set.
The semantics are a little backwards from what would seem natural (setting the preservation flag to throw away the frame), but this follows the ID3v2 standard.
void TagLib::ID3v2::Frame::Header::setTagAlterPreservation | ( | bool | discard | ) |
Sets the flag for preservation of this frame if the tag is set. If this is set to true the frame will not be written when the tag is saved.
The semantics are a little backwards from what would seem natural (setting the preservation flag to throw away the frame), but this follows the ID3v2 standard.
bool TagLib::ID3v2::Frame::Header::fileAlterPreservation | ( | ) | const |
Returns true if the flag for file alter preservation is set.
bool TagLib::ID3v2::Frame::Header::readOnly | ( | ) | const |
Returns true if the frame is meant to be read only.
bool TagLib::ID3v2::Frame::Header::groupingIdentity | ( | ) | const |
Returns true if the flag for the grouping identifity is set.
bool TagLib::ID3v2::Frame::Header::compression | ( | ) | const |
Returns true if compression is enabled for this frame.
bool TagLib::ID3v2::Frame::Header::encryption | ( | ) | const |
Returns true if encryption is enabled for this frame.
bool TagLib::ID3v2::Frame::Header::unsycronisation | ( | ) | const |
Returns true if unsyncronisation is enabled for this frame.
bool TagLib::ID3v2::Frame::Header::dataLengthIndicator | ( | ) | const |
Returns true if the flag for a data lenght indicator is set.
ByteVector TagLib::ID3v2::Frame::Header::render | ( | ) | const |
Render the Header back to binary format in a ByteVector.
bool TagLib::ID3v2::Frame::Header::frameAlterPreservation | ( | ) | const |