#include <id3lib_frame.h>
Public Member Functions | |
ID3_Frame (ID3_FrameID id=ID3FID_NOFRAME) | |
Default constructor; accepts as a default parameter the type of frame to create. | |
ID3_Frame (const ID3_Frame &) | |
virtual | ~ID3_Frame () |
void | Clear () |
Clears the frame of all data and resets the frame such that it can take on the form of any id3v2 frame that id3lib supports. | |
bool | SetID (ID3_FrameID id) |
Establishes the internal structure of an ID3_FrameImpl object so that it represents the id3v2 frame indicated by the parameter. | |
ID3_FrameID | GetID () const |
Returns the type of frame that the object represents. | |
ID3_Field * | GetField (ID3_FieldID name) const |
size_t | NumFields () const |
const char * | GetDescription () const |
const char * | GetTextID () const |
ID3_Frame & | operator= (const ID3_Frame &) |
bool | HasChanged () const |
bool | Parse (ID3_Reader &) |
void | Render (ID3_Writer &) const |
size_t | Size () |
bool | Contains (ID3_FieldID fld) const |
bool | SetSpec (ID3_V2Spec) |
ID3_V2Spec | GetSpec () const |
bool | SetCompression (bool b) |
Sets the compression flag within the frame. | |
bool | GetCompression () const |
Returns whether or not the compression flag is set. | |
size_t | GetDataSize () const |
bool | SetEncryptionID (uchar id) |
uchar | GetEncryptionID () const |
bool | SetGroupingID (uchar id) |
uchar | GetGroupingID () const |
Iterator * | CreateIterator () |
ConstIterator * | CreateIterator () const |
ID3_Field & | Field (ID3_FieldID name) const |
Returns a pointer to the frame's internal field indicated by the parameter. | |
Static Public Member Functions | |
static const char * | GetDescription (ID3_FrameID) |
Classes | |
class | ConstIterator |
class | Iterator |
id3lib defines frames in a funny way. Using some nice c++ conventions, ID3_FrameImpl class objects appear to be quite polymorphic; that is, they can take on many forms. The same ID3_FrameImpl class provides the facilities for the implementation of a complex APIC frame and for a simple text frame.
Definition at line 38 of file id3lib_frame.h.
ID3_Frame::ID3_Frame | ( | ID3_FrameID | id = ID3FID_NOFRAME |
) |
Default constructor; accepts as a default parameter the type of frame to create.
The parameter which will internally set the frame's structure. See SetID() for more details.
id | The type of frame to create |
void ID3_Frame::Clear | ( | ) |
Clears the frame of all data and resets the frame such that it can take on the form of any id3v2 frame that id3lib supports.
Definition at line 82 of file frame.cpp.
References ID3_FrameImpl::Clear().
bool ID3_Frame::SetID | ( | ID3_FrameID | id | ) |
Establishes the internal structure of an ID3_FrameImpl object so that it represents the id3v2 frame indicated by the parameter.
Given an ID3_FrameID (a list of which is found in <id3/field.h>), SetID() will structure the object according to the frame you wish to implement.
Either using this call or via the constructor, this must be the first command performed on an ID3_FrameImpl object.
myFrame.SetID(ID3FID_TITLE);
id | The type of frame this frame should be set to |
Definition at line 116 of file frame.cpp.
References ID3_FrameImpl::SetID().
ID3_FrameID ID3_Frame::GetID | ( | ) | const |
Returns the type of frame that the object represents.
Useful in conjunction with ID3_Tag::Find() method
Definition at line 94 of file frame.cpp.
References ID3_FrameImpl::GetID().
Referenced by ID3_AddComment(), ID3_GetDescriptionOfPicType(), ID3_GetMimeTypeOfPicType(), ID3_GetPictureDataOfPicType(), ID3_RemoveComments(), ID3_RemovePictureType(), and ID3_FrameImpl::operator=().
ID3_Field * ID3_Frame::GetField | ( | ID3_FieldID | name | ) | const |
Definition at line 147 of file frame.cpp.
References ID3_FrameImpl::GetField().
Referenced by Field(), ID3_AddAlbum(), ID3_AddArtist(), ID3_AddComment(), ID3_AddGenre(), ID3_AddLyricist(), ID3_AddLyrics(), ID3_AddPicture(), ID3_AddSyncLyrics(), ID3_AddTitle(), ID3_AddTrack(), ID3_AddYear(), ID3_GetDescriptionOfPicType(), ID3_GetMimeTypeOfPicType(), ID3_GetPictureData(), ID3_GetPictureDataOfPicType(), ID3_GetString(), ID3_GetSyncLyrics(), ID3_GetSyncLyricsInfo(), ID3_HasPicture(), ID3_RemovePictureType(), and dami::mm::parse().
size_t ID3_Frame::NumFields | ( | ) | const |
const char * ID3_Frame::GetDescription | ( | ) | const |
const char * ID3_Frame::GetDescription | ( | ID3_FrameID | ) | [static] |
const char * ID3_Frame::GetTextID | ( | ) | const |
bool ID3_Frame::HasChanged | ( | ) | const |
bool ID3_Frame::Parse | ( | ID3_Reader & | ) |
void ID3_Frame::Render | ( | ID3_Writer & | ) | const |
size_t ID3_Frame::Size | ( | ) |
bool ID3_Frame::Contains | ( | ID3_FieldID | fld | ) | const |
bool ID3_Frame::SetSpec | ( | ID3_V2Spec | ) |
ID3_V2Spec ID3_Frame::GetSpec | ( | ) | const |
Definition at line 126 of file frame.cpp.
References ID3_FrameImpl::GetSpec().
Referenced by ID3_FrameImpl::operator=().
bool ID3_Frame::SetCompression | ( | bool | b | ) |
Sets the compression flag within the frame.
When the compression flag is is set, compression will be attempted. However, the frame might not actually be compressed after it is rendered if the "compressed" data is no smaller than the "uncompressed" data.
Definition at line 219 of file frame.cpp.
References ID3_FrameImpl::SetCompression().
bool ID3_Frame::GetCompression | ( | ) | const |
Returns whether or not the compression flag is set.
After parsing a tag, this will indicate whether or not the frame was compressed. After rendering a tag, however, it does not actually indicate if the frame is compressed rendering. It only indicates whether or not compression was attempted. A frame will not be compressed, even whent the compression flag is set, if the "compressed" data is no smaller than the "uncompressed" data.
Definition at line 232 of file frame.cpp.
References ID3_FrameImpl::GetCompression().
Referenced by ID3_FrameImpl::operator=().
size_t ID3_Frame::GetDataSize | ( | ) | const |
bool ID3_Frame::SetEncryptionID | ( | uchar | id | ) |
uchar ID3_Frame::GetEncryptionID | ( | ) | const |
Definition at line 247 of file frame.cpp.
References ID3_FrameImpl::GetEncryptionID().
Referenced by ID3_FrameImpl::operator=().
bool ID3_Frame::SetGroupingID | ( | uchar | id | ) |
uchar ID3_Frame::GetGroupingID | ( | ) | const |
Definition at line 257 of file frame.cpp.
References ID3_FrameImpl::GetGroupingID().
Referenced by ID3_FrameImpl::operator=().
ID3_Frame::Iterator * ID3_Frame::CreateIterator | ( | ) |
ID3_Frame::ConstIterator * ID3_Frame::CreateIterator | ( | ) | const |
ID3_Field & ID3_Frame::Field | ( | ID3_FieldID | fieldName | ) | const |
Returns a pointer to the frame's internal field indicated by the parameter.
ID3_TextEnc enc; enc = (ID3_TextEnc) myFrame.GetField(ID3FN_TEXTENC)->Get();
name | The name of the field to be retrieved |
Definition at line 142 of file frame.cpp.
References GetField().