Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

include/id3/misc_support.h

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

Generated at Sat Sep 8 15:51:08 2001 for id3lib by doxygen1.2.8 written by Dimitri van Heesch, © 1997-2001