wmatag/wmaattribute.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2005 by Lukas Lalinsky
00003     email                : lalinsky@gmail.com
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., 51 Franklin Street, Fifth Floor, Boston,            *
00019  *   MA  02110-1301  USA                                                   *
00020  ***************************************************************************/
00021 
00022 #ifndef TAGLIB_WMAATTRIBUTE_H
00023 #define TAGLIB_WMAATTRIBUTE_H
00024 
00025 #include <tstring.h>
00026 #include <tbytevector.h>
00027 
00028 namespace TagLib {
00029 
00030   namespace WMA {
00031  
00032     class File;  
00033       
00034     class Attribute {
00035 
00036       friend class File;  
00037         
00038     public:
00039 
00043       enum AttributeTypes {
00044         UnicodeType = 0,
00045         BytesType   = 1,
00046         BoolType    = 2,
00047         DWordType   = 3,
00048         QWordType   = 4,
00049         WordType    = 5
00050       };
00051 
00055       Attribute();
00056       
00060       Attribute(const String &key, const String &value);
00061       Attribute(const String &key, const ByteVector &value);
00062       Attribute(const String &key, unsigned int value);
00063       Attribute(const String &key, unsigned long long value);
00064       Attribute(const String &key, unsigned short value);
00065       Attribute(const String &key, bool value);
00066       
00070       Attribute(const Attribute &item);       
00071       
00075       virtual ~Attribute();
00076 
00080       String name() const;
00081       
00085       AttributeTypes type() const;
00086       
00090       String toString() const;
00091       
00095       ByteVector toByteVector() const;
00096       
00100       int toInt() const;
00101       
00105       long long toLongLong() const;
00106       
00107       ByteVector render() const;
00108       
00109     protected:
00110     
00111       Attribute(WMA::File &file);
00112       bool parse(WMA::File &file);
00113       
00114     private:
00115       
00116       class AttributePrivate;
00117       AttributePrivate *d;
00118     
00119     };
00120   
00121   }
00122   
00123 }
00124 
00125 #endif

Generated on Mon Aug 6 21:24:20 2007 for plai by  doxygen 1.5.1