Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TagLib::ID3v2::Frame::Header Class Reference

ID3v2 frame header implementation. More...

#include <id3v2frame.h>

List of all members.

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
ByteVector render () const

Static Public Member Functions

uint size ()
uint size (uint version)


Detailed Description

ID3v2 frame header implementation.

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.


Constructor & Destructor Documentation

TagLib::ID3v2::Frame::Header::Header const ByteVector data,
bool  synchSafeInts
 

Construct a Frame Header based on data. data must at least contain a 4 byte frame ID, and optionally can contain flag data and the frame size. i.e. Just the frame id -- "TALB" -- is a valid value.

Deprecated:
Please use the constructor below that accepts a version number.

TagLib::ID3v2::Frame::Header::Header const ByteVector data,
uint  version = 4
[explicit]
 

Construct a Frame Header based on data. data must at least contain a 4 byte frame ID, and optionally can contain flag data and the frame size. i.e. Just the frame id -- "TALB" -- is a valid value.

version should be the ID3v2 version of the tag.

virtual TagLib::ID3v2::Frame::Header::~Header  )  [virtual]
 

Destroys this Header instance.


Member Function Documentation

ByteVector TagLib::ID3v2::Frame::Header::frameID  )  const
 

Returns the Frame ID (Structure, 4) (Frames, 4)

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().

ByteVector TagLib::ID3v2::Frame::Header::render  )  const
 

Render the Header back to binary format in a ByteVector.

void TagLib::ID3v2::Frame::Header::setData const ByteVector data,
uint  version = 4
 

Sets the data for the Header. version should indicate the ID3v2 version number of the tag that this frame is contained in.

void TagLib::ID3v2::Frame::Header::setData const ByteVector data,
bool  synchSafeInts
 

Sets the data for the Header.

Deprecated:
Please use the version below that accepts an ID3v2 version number.

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.

Warning:
This method should in general be avoided. It exists simply to provide a mechanism for transforming frames from a deprecated frame type to a newer one -- i.e. TYER to TDRC from ID3v2.3 to ID3v2.4.

void TagLib::ID3v2::Frame::Header::setFrameSize uint  size  ) 
 

Sets the size of the frame data portion.

uint TagLib::ID3v2::Frame::Header::size uint  version  )  [static]
 

Returns the size of the frame header in bytes for the ID3v2 version that's given.

Deprecated:
Please see the explanation in the version above.

uint TagLib::ID3v2::Frame::Header::size  )  [static]
 

Returns the size of the frame header in bytes.

Deprecated:
Please use the version of this method that accepts a version. This is only accurate for ID3v2.3 and ID3v2.4. This will be removed in the next binary incompatible release (2.0) and will be replaced with a non-static method that checks the frame version.

uint TagLib::ID3v2::Frame::Header::version  )  const
 

Returns the ID3v2 version of the header (as passed in from the construction of the header).


The documentation for this class was generated from the following file:
Generated on Wed Jul 28 16:43:08 2004 for TagLib by doxygen 1.3.7