33 #if defined HAVE_CONFIG_H 44 #define ID3_CATCH(code) try { code; } catch (...) { } 51 return reinterpret_cast<ID3Tag *
>(tag);
60 ID3_CATCH(
delete reinterpret_cast<ID3_Tag*>(tag));
70 ID3_CATCH(reinterpret_cast<ID3_Tag*>(tag)->Clear());
82 ID3_CATCH(changed = reinterpret_cast<const ID3_Tag * >(tag)->HasChanged());
94 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->SetUnsync(unsync));
104 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->SetExtendedHeader(ext));
113 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->SetPadding(pad));
123 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->AddFrame(reinterpret_cast<const ID3_Frame *>(frame)));
134 ID3_CATCH(b = reinterpret_cast<ID3_Tag *>(tag)->AttachFrame(reinterpret_cast<ID3_Frame *>(frame)));
145 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->AddFrames(reinterpret_cast<const ID3_Frame *>(frames), num));
156 ID3_CATCH(rem_frame = reinterpret_cast<ID3_Tag *>(tag)->RemoveFrame(reinterpret_cast<const ID3_Frame *>(frame)));
158 return reinterpret_cast<ID3Frame*
>(rem_frame);
169 ID3_CATCH(size = reinterpret_cast<ID3_Tag *>(tag)->Parse(header, buffer));
181 ID3_CATCH(offset = reinterpret_cast<ID3_Tag *>(tag)->Link(fileName));
192 ID3_CATCH(offset = reinterpret_cast<ID3_Tag *>(tag)->Link(fileName,flags));
205 ID3_CATCH(flags = reinterpret_cast<ID3_Tag *>(tag)->Update());
216 ID3_CATCH(flags = reinterpret_cast<ID3_Tag *>(tag)->Update(tag_type));
227 ID3_CATCH(reinterpret_cast<ID3_Tag *>(tag)->Strip(ulTagFlags));
240 ID3_CATCH(frame = reinterpret_cast<const ID3_Tag *>(tag)->Find(
id));
243 return reinterpret_cast<ID3Frame *
>(frame);
255 ID3_CATCH(frame = reinterpret_cast<const ID3_Tag *>(tag)->Find(
id, fld, data));
258 return reinterpret_cast<ID3Frame *
>(frame);
270 ID3_CATCH(frame = reinterpret_cast<const ID3_Tag *>(tag)->Find(
id, fld, data));
273 return reinterpret_cast<ID3Frame *
>(frame);
285 ID3_CATCH(frame = reinterpret_cast<const ID3_Tag *>(tag)->Find(
id, fld, data));
288 return reinterpret_cast<ID3Frame *
>(frame);
299 ID3_CATCH(num = reinterpret_cast<const ID3_Tag *>(tag)->NumFrames());
313 ID3_CATCH(has_tt = reinterpret_cast<const ID3_Tag *>(tag)->HasTagType(tt));
326 ID3_CATCH(iter = reinterpret_cast<ID3_Tag*>(tag)->CreateIterator());
329 return reinterpret_cast<ID3TagIterator*
>(iter);
339 ID3_CATCH(iter = reinterpret_cast<const ID3_Tag*>(tag)->CreateIterator());
342 return reinterpret_cast<ID3TagConstIterator*
>(iter);
350 ID3_CATCH(
delete reinterpret_cast<ID3_Tag::Iterator*>(iter));
360 ID3_CATCH(frame = reinterpret_cast<ID3_Tag::Iterator*>(iter)->GetNext());
362 return reinterpret_cast<ID3Frame*
>(frame);
370 ID3_CATCH(
delete reinterpret_cast<ID3_Tag::ConstIterator*>(iter));
380 ID3_CATCH(frame = reinterpret_cast<ID3_Tag::ConstIterator*>(iter)->GetNext());
382 return reinterpret_cast<const ID3Frame*
>(frame);
392 return reinterpret_cast<ID3Frame *
>(frame);
400 return reinterpret_cast<ID3Frame *
>(frame);
408 ID3_CATCH(
delete reinterpret_cast<ID3_Frame *>(frame));
418 ID3_CATCH(reinterpret_cast<ID3_Frame *>(frame)->Clear());
428 ID3_CATCH(reinterpret_cast<ID3_Frame *>(frame)->SetID(
id));
440 ID3_CATCH(
id = reinterpret_cast<const ID3_Frame *>(frame)->GetID());
454 ID3_CATCH(field = reinterpret_cast<const ID3_Frame *>(frame)->GetField(name));
457 return reinterpret_cast<ID3Field *
>(field);
466 ID3_CATCH(reinterpret_cast<ID3_Frame *>(frame)->SetCompression(comp));
474 bool compressed =
false;
477 ID3_CATCH(compressed = reinterpret_cast<const ID3_Frame *>(frame)->GetCompression());
491 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Clear());
503 ID3_CATCH(size = reinterpret_cast<const ID3_Field *>(field)->Size());
517 ID3_CATCH(items = reinterpret_cast<const ID3_Field *>(field)->GetNumTextItems());
529 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Set(data));
541 ID3_CATCH(value = reinterpret_cast<const ID3_Field *>(field)->Get());
553 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Set(
string));
565 ID3_CATCH(numChars = reinterpret_cast<const ID3_Field *>(field)->Get(buffer, maxChars));
574 size_t maxChars,
size_t itemNum)
580 ID3_CATCH(numChars = reinterpret_cast<const ID3_Field *>(field)->Get(buffer, maxChars, itemNum));
592 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Add(
string));
602 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Set(
string));
614 ID3_CATCH(numChars = reinterpret_cast<const ID3_Field *>(field)->Get(buffer, maxChars));
622 size_t maxChars,
size_t itemNum)
628 ID3_CATCH(numChars = reinterpret_cast<const ID3_Field *>(field)->Get(buffer, maxChars, itemNum));
640 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Add(
string));
650 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->Set(data, size));
660 ID3_CATCH(reinterpret_cast<const ID3_Field *>(field)->Get(buffer, buffLength));
670 ID3_CATCH(reinterpret_cast<ID3_Field *>(field)->FromFile(fileName));
680 ID3_CATCH(reinterpret_cast<const ID3_Field *>(field)->ToFile(fileName));
ID3_C_EXPORT ID3Frame *CCONV ID3Tag_FindFrameWithID(const ID3Tag *tag, ID3_FrameID id)
ID3_C_EXPORT bool CCONV ID3Tag_HasChanged(const ID3Tag *tag)
ID3_C_EXPORT ID3_Err CCONV ID3Tag_Update(ID3Tag *tag)
ID3_C_EXPORT size_t CCONV ID3Tag_NumFrames(const ID3Tag *tag)
ID3_C_EXPORT void CCONV ID3Field_SetBINARY(ID3Field *field, const uchar *data, size_t size)
ID3_C_EXPORT bool CCONV ID3Frame_GetCompression(const ID3Frame *frame)
ID3_TagType
The various types of tags that id3lib can handle.
ID3_C_EXPORT void CCONV ID3Field_FromFile(ID3Field *field, const char *fileName)
The representative class of an id3 tag.
ID3_C_EXPORT ID3_Err CCONV ID3Tag_UpdateByTagType(ID3Tag *tag, flags_t tag_type)
ID3_C_EXPORT void CCONV ID3Tag_SetPadding(ID3Tag *tag, bool pad)
ID3_C_EXPORT ID3Frame *CCONV ID3TagIterator_GetNext(ID3TagIterator *iter)
ID3_C_EXPORT void CCONV ID3Field_Clear(ID3Field *field)
ID3_C_EXPORT size_t CCONV ID3Field_GetUNICODEItem(const ID3Field *field, unicode_t *buffer, size_t maxChars, size_t itemNum)
ID3_C_EXPORT bool CCONV ID3Tag_AttachFrame(ID3Tag *tag, ID3Frame *frame)
ID3_C_EXPORT ID3Field *CCONV ID3Frame_GetField(const ID3Frame *frame, ID3_FieldID name)
ID3_C_EXPORT void CCONV ID3TagIterator_Delete(ID3TagIterator *iter)
ID3_C_EXPORT void CCONV ID3TagConstIterator_Delete(ID3TagConstIterator *iter)
ID3_C_EXPORT void CCONV ID3Field_ToFile(const ID3Field *field, const char *fileName)
ID3_C_EXPORT void CCONV ID3Field_AddUNICODE(ID3Field *field, const unicode_t *string)
ID3_C_EXPORT const ID3Frame *CCONV ID3TagConstIterator_GetNext(ID3TagConstIterator *iter)
ID3_C_EXPORT ID3TagIterator *CCONV ID3Tag_CreateIterator(ID3Tag *tag)
ID3_C_EXPORT size_t CCONV ID3Tag_Link(ID3Tag *tag, const char *fileName)
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
ID3_C_EXPORT ID3Frame *CCONV ID3Frame_NewID(ID3_FrameID id)
ID3_C_EXPORT void CCONV ID3Frame_Clear(ID3Frame *frame)
ID3_C_EXPORT void CCONV ID3Field_SetUNICODE(ID3Field *field, const unicode_t *string)
ID3_C_EXPORT void CCONV ID3Tag_Clear(ID3Tag *tag)
ID3_C_EXPORT void CCONV ID3Field_SetINT(ID3Field *field, uint32 data)
ID3_C_EXPORT size_t CCONV ID3Tag_LinkWithFlags(ID3Tag *tag, const char *fileName, flags_t flags)
ID3_C_EXPORT size_t CCONV ID3Field_GetUNICODE(const ID3Field *field, unicode_t *buffer, size_t maxChars)
ID3_C_EXPORT uint32 CCONV ID3Field_GetINT(const ID3Field *field)
ID3_C_EXPORT ID3Frame *CCONV ID3Tag_FindFrameWithUNICODE(const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const unicode_t *data)
ID3_C_EXPORT void CCONV ID3Tag_Delete(ID3Tag *tag)
ID3_C_EXPORT void CCONV ID3Frame_SetCompression(ID3Frame *frame, bool comp)
ID3_C_EXPORT void CCONV ID3Frame_Delete(ID3Frame *frame)
ID3_C_EXPORT bool CCONV ID3Tag_HasTagType(const ID3Tag *tag, ID3_TagType tt)
ID3_Err
Predefined id3lib error types.
ID3_C_EXPORT void CCONV ID3Tag_SetExtendedHeader(ID3Tag *tag, bool ext)
#define ID3_C_EXPORT
This file defines common macros, types, constants, and enums used throughout id3lib.
The representative class of an id3v2 frame.
ID3_C_EXPORT ID3TagConstIterator *CCONV ID3Tag_CreateConstIterator(const ID3Tag *tag)
ID3_C_EXPORT size_t CCONV ID3Field_GetASCIIItem(const ID3Field *field, char *buffer, size_t maxChars, size_t itemNum)
ID3_C_EXPORT void CCONV ID3Field_AddASCII(ID3Field *field, const char *string)
ID3_C_EXPORT ID3Frame *CCONV ID3Tag_RemoveFrame(ID3Tag *tag, const ID3Frame *frame)
ID3_C_EXPORT size_t CCONV ID3Field_GetNumTextItems(const ID3Field *field)
ID3_C_EXPORT void CCONV ID3Field_SetASCII(ID3Field *field, const char *string)
ID3_C_EXPORT ID3_Err CCONV ID3Tag_Parse(ID3Tag *tag, const uchar header[ID3_TAGHEADERSIZE], const uchar *buffer)
ID3_C_EXPORT ID3Frame *CCONV ID3Tag_FindFrameWithINT(const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, uint32 data)
ID3_C_EXPORT void CCONV ID3Tag_AddFrame(ID3Tag *tag, const ID3Frame *frame)
ID3_C_EXPORT void CCONV ID3Field_GetBINARY(const ID3Field *field, uchar *buffer, size_t buffLength)
ID3_C_EXPORT void CCONV ID3Frame_SetID(ID3Frame *frame, ID3_FrameID id)
The representative class of an ID3v2 field.
ID3_C_EXPORT ID3Tag *CCONV ID3Tag_New(void)
ID3_C_EXPORT ID3_FrameID CCONV ID3Frame_GetID(const ID3Frame *frame)
ID3_C_EXPORT ID3Frame *CCONV ID3Frame_New(void)
#define ID3_TAGHEADERSIZE
ID3_C_EXPORT ID3_Err CCONV ID3Tag_Strip(ID3Tag *tag, flags_t ulTagFlags)
ID3_C_EXPORT void CCONV ID3Tag_SetUnsync(ID3Tag *tag, bool unsync)
ID3_C_EXPORT void CCONV ID3Tag_AddFrames(ID3Tag *tag, const ID3Frame *frames, size_t num)
ID3_C_EXPORT ID3Frame *CCONV ID3Tag_FindFrameWithASCII(const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const char *data)
ID3_FieldID
Enumeration of the different types of fields in a frame.
ID3_C_EXPORT size_t CCONV ID3Field_Size(const ID3Field *field)
ID3_C_EXPORT size_t CCONV ID3Field_GetASCII(const ID3Field *field, char *buffer, size_t maxChars)