47 size_t nText = fld->
Size();
48 text =
new char[nText + 1];
49 fld->
Get(text, nText + 1);
61 text =
new char[nText + 1];
62 frame->
GetField(fldName)->
Get(text, nText + 1, nIndex);
95 if (
NULL != tag &&
NULL != text && strlen(text) > 0)
120 size_t num_removed = 0;
175 if (
NULL != tag &&
NULL != text && strlen(text) > 0)
197 size_t num_removed = 0;
234 if (
NULL != tag &&
NULL != text && strlen(text) > 0)
256 size_t num_removed = 0;
293 if (
NULL != tag &&
NULL != text && strlen(text) > 0)
315 size_t num_removed = 0;
335 char *comment =
NULL;
364 const char *desc,
bool replace)
370 const char *desc,
const char* lang,
bool replace)
393 if (strcmp(tmp_desc, desc) == 0)
425 size_t num_removed = 0;
449 remove = (strcmp(tmp_desc, desc) == 0);
487 nTrack = atoi(sTrack);
496 if (
NULL != tag && trk > 0)
510 sTrack =
new char[4];
511 sprintf(sTrack,
"%lu", (
luint) trk);
515 sTrack =
new char[8];
516 sprintf(sTrack,
"%lu/%lu", (
luint) trk, (
luint) ttl);
544 myField->
ToFile(TempPicPath);
545 return (
int)myField->
Size();
556 char* sPicMimetype =
NULL;
614 size_t num_removed = 0;
708 myField->
ToFile(TempPicPath);
709 return (
size_t)myField->
Size();
720 char* sPicMimetype =
NULL;
747 char* sPicDescription =
NULL;
749 return sPicDescription;
768 return sPicDescription;
774 size_t num_removed = 0;
812 size_t ulGenre = 0xFF;
820 if (sGenre[0] ==
'(')
822 char *pCur = &sGenre[1];
823 while (isdigit(*pCur))
830 ulGenre = dami::min(0xFF, atoi(&sGenre[1]));
842 if (
NULL != tag &&
NULL != genre && strlen(genre) > 0)
867 sprintf(sGenre,
"(%lu)", (
luint) genreNum);
878 size_t num_removed = 0;
898 char *sLyrics =
NULL;
924 const char* lang,
bool replace)
927 if (
NULL != tag && strlen(text) > 0)
951 size_t num_removed = 0;
971 char *sLyricist =
NULL;
988 if (
NULL != tag &&
NULL != text && strlen(text) > 0)
1010 size_t num_removed = 0;
1043 const char *lang,
bool replace)
1056 if ((
NULL == lang) || (
NULL == desc))
1070 if (replace && frmExist)
1108 else if (
NULL != desc)
1138 const char* desc,
const uchar* &pData,
size_t& size)
1147 else if (
NULL != desc)
1158 if (
NULL == frmExist)
The representative class of an ID3v2 field.
virtual void Set(uint32)=0
virtual uint32 Get() const =0
Returns the value of the integer field.
virtual size_t Size() const =0
Returns the size of a field.
virtual ID3_TextEnc GetEncoding() const =0
virtual void ToFile(const char *sInfo) const =0
virtual void FromFile(const char *)=0
virtual bool SetEncoding(ID3_TextEnc enc)=0
virtual const uchar * GetRawBinary() const =0
The representative class of an id3v2 frame.
ID3_FrameID GetID() const
Returns the type of frame that the object represents.
ID3_Field * GetField(ID3_FieldID name) const
virtual ID3_Frame * GetNext()=0
The representative class of an id3 tag.
bool AttachFrame(ID3_Frame *)
Attaches a frame to the tag; the tag takes responsibility for releasing the frame's memory when tag g...
ID3_Frame * Find(ID3_FrameID) const
Finds frame with given frame id, fld id, and integer data.
Iterator * CreateIterator()
ID3_Frame * RemoveFrame(const ID3_Frame *)
Removes a frame from the tag.
ID3_FieldID
Enumeration of the different types of fields in a frame.
@ ID3FN_MIMETYPE
Mimetype field.
@ ID3FN_DESCRIPTION
Description field.
@ ID3FN_TIMESTAMPFORMAT
SYLT Timestamp Format.
@ ID3FN_LANGUAGE
Language field.
@ ID3FN_PICTURETYPE
Picture type 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.
@ 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_PICTURE
Attached picture.
@ 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_Frame * ID3_GetSyncLyricsInfo(const ID3_Tag *tag, const char *desc, const char *lang, ID3_TimeStampFormat &format, ID3_ContentType &type, size_t &size)
size_t ID3_GetTrackNum(const ID3_Tag *tag)
size_t ID3_GetGenreNum(const ID3_Tag *tag)
size_t ID3_RemovePictures(ID3_Tag *tag)
char * ID3_GetComment(const ID3_Tag *tag, const char *desc)
char * ID3_GetDescriptionOfPicType(ID3_Tag *tag, ID3_PictureType pictype)
ID3_Frame * ID3_AddTitle(ID3_Tag *tag, const char *text, bool replace)
int ID3_GetPictureData(const ID3_Tag *tag, const char *TempPicPath)
char * ID3_GetGenre(const ID3_Tag *tag)
bool ID3_HasPicture(const ID3_Tag *tag)
ID3_Frame * ID3_AddPicture(ID3_Tag *tag, const char *TempPicPath, const char *MimeType, bool replace)
char * ID3_GetYear(const ID3_Tag *tag)
ID3_Frame * ID3_AddArtist(ID3_Tag *tag, const char *text, bool replace)
size_t ID3_GetPictureDataOfPicType(ID3_Tag *tag, const char *TempPicPath, ID3_PictureType pictype)
void ID3_FreeString(char *str)
ID3_Frame * ID3_AddTrack(ID3_Tag *tag, uchar trk, uchar ttl, bool replace)
size_t ID3_RemoveGenres(ID3_Tag *tag)
ID3_Frame * ID3_AddLyricist(ID3_Tag *tag, const char *text, bool replace)
size_t ID3_RemoveComments(ID3_Tag *tag, const char *desc)
char * ID3_GetTitle(const ID3_Tag *tag)
ID3_Frame * ID3_AddLyrics(ID3_Tag *tag, const char *text, bool replace)
size_t ID3_RemoveAlbums(ID3_Tag *tag)
char * ID3_GetLyricist(const ID3_Tag *tag)
char * ID3_GetAlbum(const ID3_Tag *tag)
ID3_Frame * ID3_AddSyncLyrics(ID3_Tag *tag, const uchar *data, size_t datasize, ID3_TimeStampFormat format, bool replace)
ID3_Frame * ID3_AddYear(ID3_Tag *tag, const char *text, bool replace)
size_t ID3_RemoveLyricist(ID3_Tag *tag)
char * ID3_GetPictureMimeType(const ID3_Tag *tag)
size_t ID3_RemoveYears(ID3_Tag *tag)
size_t ID3_RemoveTitles(ID3_Tag *tag)
size_t ID3_RemoveLyrics(ID3_Tag *tag)
ID3_Frame * ID3_AddGenre(ID3_Tag *tag, const char *genre, bool replace)
char * ID3_GetMimeTypeOfPicType(ID3_Tag *tag, ID3_PictureType pictype)
size_t ID3_RemoveTracks(ID3_Tag *tag)
char * ID3_GetArtist(const ID3_Tag *tag)
size_t ID3_RemovePictureType(ID3_Tag *tag, ID3_PictureType pictype)
char * ID3_GetLyrics(const ID3_Tag *tag)
ID3_Frame * ID3_AddComment(ID3_Tag *tag, const char *text, bool replace)
ID3_Frame * ID3_AddAlbum(ID3_Tag *tag, const char *text, bool replace)
char * ID3_GetString(const ID3_Frame *frame, ID3_FieldID fldName)
char * ID3_GetTrack(const ID3_Tag *tag)
size_t ID3_RemoveArtists(ID3_Tag *tag)
ID3_Frame * ID3_GetSyncLyrics(const ID3_Tag *tag, const char *lang, const char *desc, const uchar *&pData, size_t &size)