id3_dll.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. // The authors have released ID3Lib as Public Domain (PD) and claim no copyright,
  2. // patent or other intellectual property protection in this work. This means that
  3. // it may be modified, redistributed and used in commercial and non-commercial
  4. // software and hardware without restrictions. ID3Lib is distributed on an "AS IS"
  5. // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  6. //
  7. // The ID3Lib authors encourage improvements and optimisations to be sent to the
  8. // ID3Lib coordinator, currently Dirk Mahoney ([email protected]). Approved
  9. // submissions may be altered, and will be included and released under these terms.
  10. //
  11. // Mon Nov 23 18:34:01 1998
  12. #ifndef ID3LIB_DLLHEADERS_H
  13. #define ID3LIB_DLLHEADERS_H
  14. typedef unsigned char uchar;
  15. typedef short signed int ssint;
  16. typedef short unsigned int suint;
  17. typedef long signed int lsint;
  18. typedef long unsigned int luint;
  19. typedef long double ldoub;
  20. typedef long unsigned int * bitset;
  21. struct ID3_VerInfo
  22. {
  23. char name [ 30 ];
  24. luint version,
  25. revision;
  26. };
  27. enum ID3_TextEnc
  28. {
  29. ID3TE_ASCII = 0,
  30. ID3TE_UNICODE
  31. };
  32. enum ID3_FieldID
  33. {
  34. ID3FN_NOFIELD = 0,
  35. ID3FN_TEXTENC,
  36. ID3FN_TEXT,
  37. ID3FN_URL,
  38. ID3FN_DATA,
  39. ID3FN_DESCRIPTION,
  40. ID3FN_OWNER,
  41. ID3FN_EMAIL,
  42. ID3FN_RATING,
  43. ID3FN_FILENAME,
  44. ID3FN_LANGUAGE,
  45. ID3FN_PICTURETYPE,
  46. ID3FN_IMAGEFORMAT,
  47. ID3FN_MIMETYPE,
  48. ID3FN_COUNTER,
  49. ID3FN_SYMBOL,
  50. ID3FN_VOLUMEADJ,
  51. ID3FN_NUMBITS,
  52. ID3FN_VOLCHGRIGHT,
  53. ID3FN_VOLCHGLEFT,
  54. ID3FN_PEAKVOLRIGHT,
  55. ID3FN_PEAKVOLLEFT,
  56. ID3FN_LASTFIELDID
  57. };
  58. enum ID3_FrameID
  59. {
  60. ID3FID_NOFRAME = 0,
  61. ID3FID_ORIGALBUM,
  62. ID3FID_PUBLISHER,
  63. ID3FID_ENCODEDBY,
  64. ID3FID_ENCODERSETTINGS,
  65. ID3FID_ORIGFILENAME,
  66. ID3FID_LANGUAGE,
  67. ID3FID_PARTINSET,
  68. ID3FID_DATE,
  69. ID3FID_TIME,
  70. ID3FID_RECORDINGDATES,
  71. ID3FID_MEDIATYPE,
  72. ID3FID_FILETYPE,
  73. ID3FID_NETRADIOSTATION,
  74. ID3FID_NETRADIOOWNER,
  75. ID3FID_LYRICIST,
  76. ID3FID_ORIGARTIST,
  77. ID3FID_ORIGLYRICIST,
  78. ID3FID_SUBTITLE,
  79. ID3FID_MIXARTIST,
  80. ID3FID_USERTEXT,
  81. ID3FID_CONTENTGROUP,
  82. ID3FID_TITLE,
  83. ID3FID_LEADARTIST,
  84. ID3FID_BAND,
  85. ID3FID_ALBUM,
  86. ID3FID_YEAR,
  87. ID3FID_CONDUCTOR,
  88. ID3FID_COMPOSER,
  89. ID3FID_COPYRIGHT,
  90. ID3FID_CONTENTTYPE,
  91. ID3FID_TRACKNUM,
  92. ID3FID_COMMENT,
  93. ID3FID_WWWAUDIOFILE,
  94. ID3FID_WWWARTIST,
  95. ID3FID_WWWAUDIOSOURCE,
  96. ID3FID_WWWCOMMERCIALINFO,
  97. ID3FID_WWWCOPYRIGHT,
  98. ID3FID_WWWPUBLISHER,
  99. ID3FID_WWWPAYMENT,
  100. ID3FID_WWWRADIOPAGE,
  101. ID3FID_WWWUSER,
  102. ID3FID_INVOLVEDPEOPLE,
  103. ID3FID_UNSYNCEDLYRICS,
  104. ID3FID_PICTURE,
  105. ID3FID_GENERALOBJECT,
  106. ID3FID_UNIQUEFILEID,
  107. ID3FID_PLAYCOUNTER,
  108. ID3FID_POPULARIMETER,
  109. ID3FID_GROUPINGREG,
  110. ID3FID_CRYPTOREG
  111. };
  112. class ID3_Field;
  113. class ID3_Frame;
  114. class ID3_Tag;
  115. void ID3_GetVersion ( ID3_VerInfo *info );
  116. // tag wrappers
  117. ID3_Tag *ID3Tag_New ( void );
  118. void ID3Tag_Delete ( ID3_Tag *tag );
  119. void ID3Tag_Clear ( ID3_Tag *tag );
  120. bool ID3Tag_HasChanged ( ID3_Tag *tag );
  121. void ID3Tag_SetUnsync ( ID3_Tag *tag, bool unsync );
  122. void ID3Tag_SetExtendedHeader ( ID3_Tag *tag, bool ext );
  123. void ID3Tag_SetCompression ( ID3_Tag *tag, bool comp );
  124. void ID3Tag_SetPadding ( ID3_Tag *tag, bool pad );
  125. void ID3Tag_AddFrame ( ID3_Tag *tag, ID3_Frame *frame );
  126. void ID3Tag_AddFrames ( ID3_Tag *tag, ID3_Frame *frames, luint num );
  127. void ID3Tag_RemoveFrame ( ID3_Tag *tag, ID3_Frame *frame );
  128. void ID3Tag_Parse ( ID3_Tag *tag, uchar header[ ID3_TAGHEADERSIZE ], uchar *buffer );
  129. luint ID3Tag_Link ( ID3_Tag *tag, char *fileName );
  130. void ID3Tag_Update ( ID3_Tag *tag );
  131. void ID3Tag_Strip ( ID3_Tag *tag, bool v1Also );
  132. ID3_Frame *ID3Tag_FindFrameWithID ( ID3_Tag *tag, ID3_FrameID id );
  133. ID3_Frame *ID3Tag_FindFrameWithINT ( ID3_Tag *tag, ID3_FrameID id, ID3_FieldID fld, luint data );
  134. ID3_Frame *ID3Tag_FindFrameWithASCII ( ID3_Tag *tag, ID3_FrameID id, ID3_FieldID fld, char *data );
  135. ID3_Frame *ID3Tag_FindFrameWithUNICODE ( ID3_Tag *tag, ID3_FrameID id, ID3_FieldID fld, wchar_t *data );
  136. ID3_Frame *ID3Tag_GetFrameNum ( ID3_Tag *tag, luint num );
  137. luint ID3Tag_NumFrames ( ID3_Tag *tag );
  138. // frame wrappers
  139. void ID3Frame_Clear ( ID3_Frame *frame );
  140. void ID3Frame_SetID ( ID3_Frame *frame, ID3_FrameID id );
  141. ID3_FrameID ID3Frame_GetID ( ID3_Frame *frame );
  142. ID3_Field *ID3Frame_GetField ( ID3_Frame *frame, ID3_FieldID name );
  143. // field wrappers
  144. void ID3Field_Clear ( ID3_Field *field );
  145. luint ID3Field_Size ( ID3_Field *field );
  146. luint ID3Field_GetNumTextItems ( ID3_Field *field );
  147. void ID3Field_SetINT ( ID3_Field *field, luint data );
  148. luint ID3Field_GetINT ( ID3_Field *field );
  149. void ID3Field_SetUNICODE ( ID3_Field *field, wchar_t *string );
  150. luint ID3Field_GetUNICODE ( ID3_Field *field, wchar_t *buffer, luint maxChars, luint itemNum );
  151. void ID3Field_AddUNICODE ( ID3_Field *field, wchar_t *string );
  152. void ID3Field_SetASCII ( ID3_Field *field, char *string );
  153. luint ID3Field_GetASCII ( ID3_Field *field, char *buffer, luint maxChars, luint itemNum );
  154. void ID3Field_AddASCII ( ID3_Field *field, char *string );
  155. void ID3Field_SetBINARY ( ID3_Field *field, uchar *data, luint size );
  156. void ID3Field_GetBINARY ( ID3_Field *field, uchar *buffer, luint buffLength );
  157. void ID3Field_FromFile ( ID3_Field *field, char *fileName );
  158. void ID3Field_ToFile ( ID3_Field *field, char *fileName );
  159. #endif