include/id3/misc_support.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: misc_support.h,v 1.29 2002/09/19 10:21:57 t1mpy Exp $
00003 
00004 // id3lib: a C++ library for creating and manipulating id3v1/v2 tags
00005 // Copyright 1999, 2000  Scott Thomas Haug
00006 // Copyright 2002 Thijmen Klok (thijmen@id3lib.org)
00007 
00008 // This library is free software; you can redistribute it and/or modify it
00009 // under the terms of the GNU Library General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or (at your
00011 // option) any later version.
00012 //
00013 // This library is distributed in the hope that it will be useful, but WITHOUT
00014 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00015 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00016 // License for more details.
00017 //
00018 // You should have received a copy of the GNU Library General Public License
00019 // along with this library; if not, write to the Free Software Foundation,
00020 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00021 
00022 // The id3lib authors encourage improvements and optimisations to be sent to
00023 // the id3lib coordinator.  Please see the README file for details on where to
00024 // send such submissions.  See the AUTHORS file for a list of people who have
00025 // contributed to id3lib.  See the ChangeLog file for a list of changes to
00026 // id3lib.  These files are distributed with id3lib at
00027 // http://download.sourceforge.net/id3lib/
00028 
00029 #ifndef _ID3LIB_MISC_SUPPORT_H_
00030 #define _ID3LIB_MISC_SUPPORT_H_
00031 
00032 #include <id3/tag.h>
00033 
00034 ID3_C_EXPORT char*      ID3_GetString(const ID3_Frame *, ID3_FieldID);
00035 ID3_C_EXPORT char*      ID3_GetString(const ID3_Frame *, ID3_FieldID, size_t nItems);
00036 
00037 ID3_C_EXPORT void ID3_FreeString(char *str);
00038 
00039 // defined in 'id3_misc_support.cpp'
00040 // these are 'convenience functions,' to make using the library easier for the
00041 // most common of operations
00042 ID3_C_EXPORT char*      ID3_GetArtist(const ID3_Tag*);
00043 ID3_C_EXPORT ID3_Frame* ID3_AddArtist(ID3_Tag*, const char*, bool replace = false);
00044 ID3_C_EXPORT size_t     ID3_RemoveArtists(ID3_Tag*);
00045 
00046 ID3_C_EXPORT char*      ID3_GetAlbum(const ID3_Tag*);
00047 ID3_C_EXPORT ID3_Frame* ID3_AddAlbum(ID3_Tag*, const char*, bool replace = false);
00048 ID3_C_EXPORT size_t     ID3_RemoveAlbums(ID3_Tag*);
00049 
00050 ID3_C_EXPORT char*      ID3_GetTitle(const ID3_Tag*);
00051 ID3_C_EXPORT ID3_Frame* ID3_AddTitle(ID3_Tag*, const char*, bool replace = false);
00052 ID3_C_EXPORT size_t     ID3_RemoveTitles(ID3_Tag*);
00053 
00054 ID3_C_EXPORT char*      ID3_GetYear(const ID3_Tag*);
00055 ID3_C_EXPORT ID3_Frame* ID3_AddYear(ID3_Tag*, const char*, bool replace = false);
00056 ID3_C_EXPORT size_t     ID3_RemoveYears(ID3_Tag*);
00057 
00058 ID3_C_EXPORT char*      ID3_GetComment(const ID3_Tag*, const char* desc = NULL);
00059 ID3_C_EXPORT ID3_Frame* ID3_AddComment(ID3_Tag*, const char*, bool = false);
00060 ID3_C_EXPORT ID3_Frame* ID3_AddComment(ID3_Tag*, const char*, const char*, bool = false);
00061 ID3_C_EXPORT ID3_Frame* ID3_AddComment(ID3_Tag*, const char*, const char*, const char*,
00062                                        bool = false);
00063 ID3_C_EXPORT size_t     ID3_RemoveComments(ID3_Tag*, const char * = NULL);
00064 
00065 ID3_C_EXPORT char*      ID3_GetTrack(const ID3_Tag*);
00066 ID3_C_EXPORT size_t     ID3_GetTrackNum(const ID3_Tag*);
00067 //following routine courtesy of John George
00068 ID3_C_EXPORT ID3_Frame* ID3_AddTrack(ID3_Tag*, uchar ucTrack, uchar ucTotal = 0,
00069                                      bool replace = false);
00070 ID3_C_EXPORT size_t     ID3_RemoveTracks(ID3_Tag*);
00071 
00072 ID3_C_EXPORT char*      ID3_GetGenre(const ID3_Tag*);
00073 ID3_C_EXPORT size_t     ID3_GetGenreNum(const ID3_Tag*);
00074 ID3_C_EXPORT ID3_Frame* ID3_AddGenre(ID3_Tag*, size_t ucGenre, bool replace = false);
00075 //following routine courtesy of John George
00076 ID3_C_EXPORT ID3_Frame* ID3_AddGenre(ID3_Tag*, const char *, bool replace = false);
00077 ID3_C_EXPORT size_t     ID3_RemoveGenres(ID3_Tag*);
00078 
00079 ID3_C_EXPORT char*      ID3_GetLyrics(const ID3_Tag*);
00080 ID3_C_EXPORT ID3_Frame* ID3_AddLyrics(ID3_Tag*, const char*, bool = false);
00081 ID3_C_EXPORT ID3_Frame* ID3_AddLyrics(ID3_Tag*, const char*, const char*, bool = false);
00082 ID3_C_EXPORT ID3_Frame* ID3_AddLyrics(ID3_Tag*, const char*, const char*, const char*,
00083                                       bool = false);
00084 ID3_C_EXPORT size_t     ID3_RemoveLyrics(ID3_Tag*);
00085 
00086 ID3_C_EXPORT char*      ID3_GetLyricist(const ID3_Tag*);
00087 ID3_C_EXPORT ID3_Frame* ID3_AddLyricist(ID3_Tag *, const char *, bool replace = false);
00088 ID3_C_EXPORT size_t     ID3_RemoveLyricist(ID3_Tag*);
00089 
00090 ID3_C_EXPORT ID3_Frame* ID3_AddSyncLyrics(ID3_Tag*, const uchar*, size_t,
00091                                           ID3_TimeStampFormat, bool = false);
00092 ID3_C_EXPORT ID3_Frame* ID3_AddSyncLyrics(ID3_Tag*, const uchar*, size_t,
00093                                           ID3_TimeStampFormat, const char *, bool = false);
00094 ID3_C_EXPORT ID3_Frame* ID3_AddSyncLyrics(ID3_Tag*, const uchar*, size_t,
00095                                           ID3_TimeStampFormat, const char *, const char *,
00096                                           bool = false);
00097 ID3_C_EXPORT ID3_Frame* ID3_AddSyncLyrics(ID3_Tag*, const uchar*, size_t,
00098                                           ID3_TimeStampFormat, const char *, const char *,
00099                                           ID3_ContentType, bool = false);
00100 ID3_C_EXPORT ID3_Frame* ID3_GetSyncLyricsInfo(const ID3_Tag *tag, const char *lang,
00101                                               const char *desc, char &stampformat,
00102                                               char &type, size_t &size);
00103 ID3_C_EXPORT ID3_Frame* ID3_GetSyncLyrics(const ID3_Tag* tag, const char* lang,
00104                                           const char* desc, const uchar* &pData, size_t& size);
00105 
00106 
00107 //following routine courtesy of John George
00108 ID3_C_EXPORT int ID3_GetPictureData(const ID3_Tag*, const char* TempPicPath);
00109 
00110 //following routine courtesy of John George
00111 ID3_C_EXPORT char* ID3_GetPictureMimeType(const ID3_Tag*);
00112 
00113 //following routine courtesy of John George
00114 ID3_C_EXPORT bool ID3_HasPicture(const ID3_Tag*);
00115 
00116 //following two routines courtesy of John George
00117 ID3_C_EXPORT ID3_Frame* ID3_AddPicture(ID3_Tag*, const char* TempPicPath, const char* MimeType, bool replace = false);
00118 ID3_C_EXPORT ID3_Frame* ID3_AddPicture(ID3_Tag*, const char* TempPicPath, const char* MimeType, ID3_PictureType pictype, const char* Description, bool replace = false);
00119 
00120 //following routine courtesy of John George
00121 ID3_C_EXPORT size_t ID3_RemovePictures(ID3_Tag*);
00122 
00123 //following routine courtesy of John George
00124 ID3_C_EXPORT size_t ID3_GetPictureDataOfPicType(ID3_Tag*, const char* TempPicPath, ID3_PictureType pictype);
00125 
00126 //following routine courtesy of John George
00127 ID3_C_EXPORT char *ID3_GetMimeTypeOfPicType(ID3_Tag*, ID3_PictureType pictype);
00128 
00129 //following routine courtesy of John George
00130 ID3_C_EXPORT char *ID3_GetDescriptionOfPicType(ID3_Tag*, ID3_PictureType pictype);
00131 
00132 //following routine courtesy of John George
00133 ID3_C_EXPORT size_t ID3_RemovePictureType(ID3_Tag*, ID3_PictureType pictype);
00134 
00135 
00136 #endif /* _ID3LIB_MISC_SUPPORT_H_ */
00137 

Generated on Mon Aug 20 17:48:46 2007 for id3lib by  doxygen 1.5.2