id3v1tag.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_ID3V1TAG_H 00023 #define TAGLIB_ID3V1TAG_H 00024 00025 #include <tag.h> 00026 #include <tbytevector.h> 00027 00028 namespace TagLib { 00029 00030 class File; 00031 00033 00034 namespace ID3v1 { 00035 00037 00049 class Tag : public TagLib::Tag 00050 { 00051 public: 00055 Tag(); 00056 00061 Tag(File *file, long tagOffset); 00062 00066 virtual ~Tag(); 00067 00072 ByteVector render() const; 00073 00078 static ByteVector fileIdentifier(); 00079 00080 // Reimplementations. 00081 00082 virtual String title() const; 00083 virtual String artist() const; 00084 virtual String album() const; 00085 virtual String comment() const; 00086 virtual String genre() const; 00087 virtual uint year() const; 00088 virtual uint track() const; 00089 00090 virtual void setTitle(const String &s); 00091 virtual void setArtist(const String &s); 00092 virtual void setAlbum(const String &s); 00093 virtual void setComment(const String &s); 00094 virtual void setGenre(const String &s); 00095 virtual void setYear(uint i); 00096 virtual void setTrack(uint i); 00097 00098 protected: 00102 void read(); 00106 void parse(const ByteVector &data); 00107 00108 private: 00109 Tag(const Tag &); 00110 Tag &operator=(const Tag &); 00111 00112 class TagPrivate; 00113 TagPrivate *d; 00114 }; 00115 } 00116 } 00117 00118 #endif