30 #if defined HAVE_CONFIG_H
86 size_t numRemoved = 0;
89 while ((frame = tag.
Find(
id)) !=
NULL)
113 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
144 size_t numRemoved = 0;
261 ID3D_NOTICE(
"id3::v2::setComment: trying to find frame with description = " << desc );
276 ID3D_NOTICE(
"id3::v2::setComment: found frame with description = " << desc );
284 ID3D_NOTICE(
"id3::v2::setComment: creating new comment frame" );
290 ID3D_WARNING(
"id3::v2::setComment: ack! no frame" );
296 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
311 size_t numRemoved = 0;
353 return ::atoi(sTrack.c_str());
359 String track =
toString((
size_t)trk);
391 size_t ulGenre = 0xFF;
392 size_t size = sGenre.size();
397 if (i < size && size && sGenre[i] ==
'(')
400 while (i < size && isdigit(sGenre[i]))
404 if (i < size && sGenre[i] ==
')')
407 ulGenre =
min(0xFF, atoi(&sGenre[1]));
468 frame->GetField(
ID3FN_TEXT)->Set(text.c_str());
522 frame->GetField(
ID3FN_DATA)->Set(data.data(), data.size());
537 return BString(
reinterpret_cast<const BString::value_type *
>(fld->
GetRawBinary()), fld->
Size());
The representative class of an ID3v2 field.
virtual const char * GetRawText() const =0
virtual size_t Size() const =0
Returns the size of a field.
virtual ID3_TextEnc GetEncoding() const =0
virtual size_t GetNumTextItems() const =0
virtual bool SetEncoding(ID3_TextEnc enc)=0
virtual const char * GetRawTextItem(size_t) const =0
virtual const uchar * GetRawBinary() const =0
The representative class of an id3v2 frame.
ID3_Frame * Find(ID3_FrameID id) const
Frames::iterator iterator
ID3_Frame * RemoveFrame(const ID3_Frame *)
bool AttachFrame(ID3_Frame *)
ID3_FieldID
Enumeration of the different types of fields in a frame.
@ ID3FN_DESCRIPTION
Description field.
@ ID3FN_TIMESTAMPFORMAT
SYLT Timestamp Format.
@ ID3FN_LANGUAGE
Language field.
@ ID3FN_CONTENTTYPE
SYLT content type.
ID3_TextEnc
Enumeration of the types of text encodings: ascii or unicode.
#define STR_V1_COMMENT_DESC
String used for the description field of a comment tag converted from an id3v1 tag to an id3v2 tag.
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
@ ID3FID_LEADARTIST
Lead performer(s)/Soloist(s)
@ ID3FID_CONTENTTYPE
Content type.
@ ID3FID_COMPOSER
Composer.
@ ID3FID_LYRICIST
Lyricist/Text writer.
@ ID3FID_BAND
Band/orchestra/accompaniment.
@ ID3FID_ALBUM
Album/Movie/Show title.
@ ID3FID_COMMENT
Comments.
@ ID3FID_CONDUCTOR
Conductor/performer refinement.
@ ID3FID_TRACKNUM
Track number/Position in set.
@ ID3FID_UNSYNCEDLYRICS
Unsynchronized lyric/text transcription.
@ ID3FID_TITLE
Title/songname/content description.
@ ID3FID_SYNCEDLYRICS
Synchronized lyric/text.
ID3_C_EXPORT ID3_Frame * hasComment(const ID3_TagImpl &)
ID3_C_EXPORT size_t removeAllComments(ID3_TagImpl &)
ID3_C_EXPORT String getLyrics(const ID3_TagImpl &)
ID3_C_EXPORT String getArtist(const ID3_TagImpl &)
ID3_C_EXPORT size_t removeTracks(ID3_TagImpl &)
ID3_C_EXPORT size_t getGenreNum(const ID3_TagImpl &)
ID3_C_EXPORT String getTitle(const ID3_TagImpl &)
ID3_C_EXPORT size_t removeYears(ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * setLyricist(ID3_TagImpl &, String)
ID3_C_EXPORT String getString(const ID3_Frame *, ID3_FieldID)
ID3_C_EXPORT ID3_Frame * setLyrics(ID3_TagImpl &, String, String, String)
ID3_C_EXPORT ID3_Frame * setAlbum(ID3_TagImpl &, String)
ID3_C_EXPORT String getAlbum(const ID3_TagImpl &)
ID3_C_EXPORT String getV1Comment(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * setTitle(ID3_TagImpl &, String)
ID3_C_EXPORT ID3_Frame * setArtist(ID3_TagImpl &, String)
ID3_C_EXPORT ID3_Frame * setYear(ID3_TagImpl &, String)
ID3_C_EXPORT size_t removeTitles(ID3_TagImpl &)
ID3_C_EXPORT String getLyricist(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * hasArtist(const ID3_TagImpl &)
ID3_C_EXPORT String getYear(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * hasGenre(const ID3_TagImpl &)
ID3_C_EXPORT String getComment(const ID3_TagImpl &, String desc)
ID3_C_EXPORT ID3_Frame * setFrameText(ID3_TagImpl &, ID3_FrameID, String)
ID3_C_EXPORT ID3_Frame * hasSyncLyrics(const ID3_TagImpl &, String lang, String desc)
ID3_C_EXPORT ID3_Frame * setComment(ID3_TagImpl &, String, String, String)
ID3_C_EXPORT ID3_Frame * hasV1Comment(const ID3_TagImpl &)
ID3_C_EXPORT size_t removeGenres(ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * setTrack(ID3_TagImpl &, uchar ucTrack, uchar ucTotal)
ID3_C_EXPORT BString getSyncLyrics(const ID3_TagImpl &tag, String lang, String desc)
ID3_C_EXPORT ID3_Frame * hasTrack(const ID3_TagImpl &)
ID3_C_EXPORT String getFrameText(const ID3_TagImpl &, ID3_FrameID)
ID3_C_EXPORT size_t removeLyricists(ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * hasTitle(const ID3_TagImpl &)
ID3_C_EXPORT String getGenre(const ID3_TagImpl &)
ID3_C_EXPORT size_t removeFrames(ID3_TagImpl &, ID3_FrameID)
ID3_C_EXPORT size_t removeComments(ID3_TagImpl &, String)
ID3_C_EXPORT size_t getTrackNum(const ID3_TagImpl &)
ID3_C_EXPORT String getTrack(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * hasYear(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * setGenre(ID3_TagImpl &, size_t ucGenre)
ID3_C_EXPORT size_t removeLyrics(ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * hasLyrics(const ID3_TagImpl &)
ID3_C_EXPORT String getStringAtIndex(const ID3_Frame *, ID3_FieldID, size_t)
ID3_C_EXPORT ID3_Frame * hasAlbum(const ID3_TagImpl &)
ID3_C_EXPORT ID3_Frame * setSyncLyrics(ID3_TagImpl &, BString, ID3_TimeStampFormat, String, String, ID3_ContentType)
ID3_C_EXPORT size_t removeAlbums(ID3_TagImpl &)
ID3_C_EXPORT size_t removeArtists(ID3_TagImpl &)
const T & min(const T &a, const T &b)
String ID3_C_EXPORT toString(uint32 val)