345 return _impl->HasChanged();
380 return _impl->Size();
402 return _impl->SetUnsync(b);
421 return _impl->SetExtended(ext);
455 return _impl->SetPadding(pad);
460 return _impl->SetExperimental(exp);
465 return _impl->GetUnsync();
470 return _impl->GetExtended();
475 return _impl->GetExperimental();
480 _impl->AddFrame(frame);
504 _impl->AddFrame(frame);
523 return _impl->AttachFrame(frame);
549 return _impl->RemoveFrame(frame);
613 buf.append(
reinterpret_cast<const BString::value_type *
>(header),
615 buf.append(
reinterpret_cast<const BString::value_type *
>(buffer), size);
616 return this->
Parse(buf.data(), buf.size());
650 return this->
Render(mw, tt);
664 return writer.
getCur() - beg;
706 return _impl->Link(fileInfo, flags);
714 return _impl->Link(reader, flags);
719 return _impl->Update(flags);
729 return _impl->GetMp3HeaderInfo();
740 return _impl->Strip(flags);
745 return _impl->GetPrependedBytes();
750 return _impl->GetAppendedBytes();
755 return _impl->GetFileSize();
761 String fn = _impl->GetFileName();
765 memmove((
char *)_tmp_filename, fn.c_str(), fn.size());
766 return _tmp_filename;
838 return _impl->Find(
id);
844 return _impl->Find(
id, fld, data);
851 return _impl->Find(
id, fld, str);
858 return _impl->Find(
id, fld, str);
870 return _impl->NumFrames();
943 return _impl->GetSpec();
948 return _impl->SetSpec(spec);
969 _impl->AttachFrame(f);
990 for (
int i = numFrames - 1; i >= 0; i--)
996size_t ID3_Tag::Link(
const char *fileInfo,
bool parseID3v1,
bool parseLyrics3)
998 return _impl->Link(fileInfo, parseID3v1, parseLyrics3);
1074 IteratorImpl(ID3_TagImpl& tag)
1075 : _cur(tag.begin()), _end(tag.end())
1079 ID3_Frame* GetNext()
1081 ID3_Frame* next =
NULL;
1082 while (next ==
NULL && _cur != _end)
1097 ConstIteratorImpl(ID3_TagImpl& tag)
1098 : _cur(tag.begin()), _end(tag.end())
1101 const ID3_Frame* GetNext()
1103 ID3_Frame* next =
NULL;
1104 while (next ==
NULL && _cur != _end)
1117 return new IteratorImpl(*_impl);
1123 return new ConstIteratorImpl(*_impl);
The representative class of an id3v2 frame.
virtual pos_type getCur()
Return the current position in the reader.
virtual pos_type getEnd()
Return the ending position in the reader.
void AddFrame(const ID3_Frame &)
bool SetExperimental(bool)
void SetCompression(bool)
Deprecated.
bool SetPadding(bool)
Turns padding on or off, dependant on the value of the boolean parameter.
flags_t Strip(flags_t=(flags_t) ID3TT_ALL)
Strips the tag(s) from the attached file.
bool HasLyrics() const
Deprecated.
bool HasV1Tag() const
Deprecated.
ID3_V2Spec GetSpec() const
Deprecated.
size_t Size() const
Returns an over estimate of the number of bytes required to store a binary version of a tag.
void Clear()
Clears the object and disassociates it from any files.
size_t GetAppendedBytes() const
flags_t Update(flags_t=(flags_t) ID3TT_ALL)
bool GetExperimental() const
void AddNewFrame(ID3_Frame *f)
Deprecated.
bool HasChanged() const
Indicates whether the tag has been altered since the last parse, render, or update.
ID3_Tag & operator=(const ID3_Tag &)
Deprecated.
const Mp3_Headerinfo * GetMp3HeaderInfo() const
Get's the mp3 Info like bitrate, mpeg version, etc.
size_t NumFrames() const
Returns the number of frames present in the tag object.
bool AttachFrame(ID3_Frame *)
Attaches a frame to the tag; the tag takes responsibility for releasing the frame's memory when tag g...
bool SetUnsync(bool)
Turns unsynchronization on or off, dependant on the value of the boolean parameter.
bool HasV2Tag() const
Deprecated.
size_t GetFileSize() const
size_t Render(uchar *, ID3_TagType=ID3TT_ID3V2) const
Renders the tag and writes it to the attached file; the type of tag rendered can be specified as a pa...
bool GetExtendedHeader() const
size_t Parse(const uchar *, size_t)
size_t GetPrependedBytes() const
bool SetExtendedHeader(bool)
Turns extended header rendering on or off, dependant on the value of the boolean parameter.
ID3_Frame * Find(ID3_FrameID) const
Finds frame with given frame id, fld id, and integer data.
size_t Link(const char *fileInfo, flags_t=(flags_t) ID3TT_ALL)
Attaches a file to the tag, parses the file, and adds any tag information found in the file to the ta...
static size_t IsV2Tag(const uchar *)
Analyses a buffer to determine if we have a valid ID3v2 tag header.
void AddFrames(const ID3_Frame *, size_t)
Copies an array of frames to the tag.
ID3_Tag & operator<<(const ID3_Frame &)
Iterator * CreateIterator()
bool SetSpec(ID3_V2Spec)
Deprecated.
ID3_Frame * RemoveFrame(const ID3_Frame *)
Removes a frame from the tag.
const char * GetFileName() const
bool HasTagType(ID3_TagType tt) const
Deprecated.
ID3_Tag(const char *name=NULL)
Default constructor; it can accept an optional filename as a parameter.
Frames::iterator iterator
Frames::const_iterator const_iterator
static size_t IsV2Tag(ID3_Reader &)
virtual pos_type getCur()=0
Return the next position that will be written to.
ID3_FieldID
Enumeration of the different types of fields in a frame.
ID3_TagType
The various types of tags that id3lib can handle.
@ ID3TT_ID3V2
Represents an id3v2 tag.
@ ID3TT_ID3V1
Represents an id3v1 or id3v1.1 tag.
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
#define ID3_TAGHEADERSIZE
void render(ID3_Writer &, const ID3_TagImpl &)
void render(ID3_Writer &writer, const ID3_TagImpl &tag)
bool parse(ID3_TagImpl &tag, ID3_Reader &rdr)
WString ID3_C_EXPORT toWString(const unicode_t[], size_t)
size_t ID3_C_EXPORT ucslen(const unicode_t *unicode)
int32 ID3_IsTagHeader(const uchar data[ID3_TAGHEADERSIZE])