TagLib  1.13.1
asfattribute.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 2005-2007 by Lukáš Lalinský
3  email : lalinsky@gmail.com
4  **************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_ASFATTRIBUTE_H
27 #define TAGLIB_ASFATTRIBUTE_H
28 
29 #include "tstring.h"
30 #include "tbytevector.h"
31 #include "taglib_export.h"
32 #include "asfpicture.h"
33 
34 namespace TagLib
35 {
36  namespace ASF
37  {
38  class File;
39  class Picture;
40 
42  {
43  public:
44 
49  UnicodeType = 0,
50  BytesType = 1,
51  BoolType = 2,
52  DWordType = 3,
53  QWordType = 4,
54  WordType = 5,
55  GuidType = 6
56  };
57 
62 
66  Attribute(const String &value);
67 
71  Attribute(const ByteVector &value);
72 
84  Attribute(const Picture &value);
85 
89  Attribute(unsigned int value);
90 
94  Attribute(unsigned long long value);
95 
99  Attribute(unsigned short value);
100 
104  Attribute(bool value);
105 
109  Attribute(const Attribute &item);
110 
114  Attribute &operator=(const Attribute &other);
115 
119  void swap(Attribute &other);
120 
124  virtual ~Attribute();
125 
130 
134  unsigned short toBool() const;
135 
139  unsigned short toUShort() const;
140 
144  unsigned int toUInt() const;
145 
149  unsigned long long toULongLong() const;
150 
154  String toString() const;
155 
160 
165 
169  int language() const;
170 
174  void setLanguage(int value);
175 
179  int stream() const;
180 
184  void setStream(int value);
185 
186 #ifndef DO_NOT_DOCUMENT
187  /* THIS IS PRIVATE, DON'T TOUCH IT! */
188  String parse(ASF::File &file, int kind = 0);
189 #endif
190 
192  int dataSize() const;
193 
194  private:
195  friend class File;
196 
197  ByteVector render(const String &name, int kind = 0) const;
198 
199  class AttributePrivate;
200  AttributePrivate *d;
201  };
202  } // namespace ASF
203 } // namespace TagLib
204 
205 #endif
Definition: asfattribute.h:42
Attribute(const String &value)
void setLanguage(int value)
Attribute(const ByteVector &value)
Attribute(const Attribute &item)
void setStream(int value)
unsigned short toUShort() const
Attribute(unsigned long long value)
AttributeTypes
Definition: asfattribute.h:48
void swap(Attribute &other)
unsigned short toBool() const
AttributeTypes type() const
unsigned long long toULongLong() const
Attribute(const Picture &value)
Attribute(unsigned int value)
int dataSize() const
Returns the size of the stored data.
unsigned int toUInt() const
String toString() const
Attribute & operator=(const Attribute &other)
ByteVector toByteVector() const
Attribute(unsigned short value)
Picture toPicture() const
Definition: asffile.h:45
An ASF attached picture interface implementation.
Definition: asfpicture.h:49
A byte vector.
Definition: tbytevector.h:46
A wide string class suitable for unicode.
Definition: tstring.h:85
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40