Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

id3v2tag.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 copyright : (C) 2002, 2003 by Scott Wheeler 00003 email : wheeler@kde.org 00004 ***************************************************************************/ 00005 00006 /*************************************************************************** 00007 * This library is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU Lesser General Public License version * 00009 * 2.1 as published by the Free Software Foundation. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, but * 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00014 * Lesser General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Lesser General Public * 00017 * License along with this library; if not, write to the Free Software * 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 00019 * USA * 00020 ***************************************************************************/ 00021 00022 #ifndef TAGLIB_ID3V2TAG_H 00023 #define TAGLIB_ID3V2TAG_H 00024 00025 #include <tag.h> 00026 #include <tbytevector.h> 00027 #include <tstring.h> 00028 #include <tlist.h> 00029 #include <tmap.h> 00030 00031 #include "id3v2framefactory.h" 00032 00033 namespace TagLib { 00034 00035 class File; 00036 00038 00046 namespace ID3v2 { 00047 00048 class Header; 00049 class ExtendedHeader; 00050 class Footer; 00051 00052 typedef List<Frame *> FrameList; 00053 typedef Map<ByteVector, FrameList> FrameListMap; 00054 00056 00100 class Tag : public TagLib::Tag 00101 { 00102 public: 00108 Tag(); 00109 00122 Tag(File *file, long tagOffset, 00123 const FrameFactory *factory = FrameFactory::instance()); 00124 00128 virtual ~Tag(); 00129 00130 // Reimplementations. 00131 00132 virtual String title() const; 00133 virtual String artist() const; 00134 virtual String album() const; 00135 virtual String comment() const; 00136 virtual String genre() const; 00137 virtual uint year() const; 00138 virtual uint track() const; 00139 00140 virtual void setTitle(const String &s); 00141 virtual void setArtist(const String &s); 00142 virtual void setAlbum(const String &s); 00143 virtual void setComment(const String &s); 00144 virtual void setGenre(const String &s); 00145 virtual void setYear(uint i); 00146 virtual void setTrack(uint i); 00147 00148 virtual bool isEmpty() const; 00149 00153 Header *header() const; 00154 00159 ExtendedHeader *extendedHeader() const; 00160 00169 Footer *footer() const; 00170 00178 const FrameListMap &frameListMap() const; 00179 00187 const FrameList &frameList() const; 00188 00193 void addFrame(Frame *frame); 00194 00199 void removeFrame(Frame *frame, bool del = true); 00200 00204 void removeFrames(const ByteVector &id); 00205 00209 ByteVector render() const; 00210 00211 protected: 00218 void read(); 00219 00224 void parse(const ByteVector &data); 00225 00230 void setTextFrame(const ByteVector &id, const String &value); 00231 00232 private: 00233 Tag(const Tag &); 00234 Tag &operator=(const Tag &); 00235 00236 class TagPrivate; 00237 TagPrivate *d; 00238 }; 00239 00240 } 00241 } 00242 00243 #endif

Generated on Wed Jul 28 16:43:07 2004 for TagLib by doxygen 1.3.7