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

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 
00055     class StringHandler
00056     {
00057     public:
00062       virtual String parse(const ByteVector &data) const;
00063 
00072       virtual ByteVector render(const String &s) const;
00073     };
00074 
00076 
00088     class Tag : public TagLib::Tag
00089     {
00090     public:
00094       Tag();
00095 
00100       Tag(File *file, long tagOffset);
00101 
00105       virtual ~Tag();
00106 
00111       ByteVector render() const;
00112 
00117       static ByteVector fileIdentifier();
00118 
00119       // Reimplementations.
00120 
00121       virtual String title() const;
00122       virtual String artist() const;
00123       virtual String album() const;
00124       virtual String comment() const;
00125       virtual String genre() const;
00126       virtual uint year() const;
00127       virtual uint track() const;
00128 
00129       virtual void setTitle(const String &s);
00130       virtual void setArtist(const String &s);
00131       virtual void setAlbum(const String &s);
00132       virtual void setComment(const String &s);
00133       virtual void setGenre(const String &s);
00134       virtual void setYear(uint i);
00135       virtual void setTrack(uint i);
00136 
00143       static void setStringHandler(const StringHandler *handler);
00144 
00145     protected:
00149       void read();
00153       void parse(const ByteVector &data);
00154 
00155     private:
00156       Tag(const Tag &);
00157       Tag &operator=(const Tag &);
00158 
00159       class TagPrivate;
00160       TagPrivate *d;
00161     };
00162   }
00163 }
00164 
00165 #endif

Generated on Mon Jun 7 12:51:47 2004 for TagLib by doxygen 1.3.4