TagLib  2.2.1
ebmlstringelement.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This library is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU Lesser General Public License version *
4  * 2.1 as published by the Free Software Foundation. *
5  * *
6  * This library is distributed in the hope that it will be useful, but *
7  * WITHOUT ANY WARRANTY; without even the implied warranty of *
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
9  * Lesser General Public License for more details. *
10  * *
11  * You should have received a copy of the GNU Lesser General Public *
12  * License along with this library; if not, write to the Free Software *
13  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
14  * 02110-1301 USA *
15  * *
16  * Alternatively, this file is available under the Mozilla Public *
17  * License Version 1.1. You may obtain a copy of the License at *
18  * http://www.mozilla.org/MPL/ *
19  ***************************************************************************/
20 
21 #ifndef TAGLIB_EBMLSTRINGELEMENT_H
22 #define TAGLIB_EBMLSTRINGELEMENT_H
23 #ifndef DO_NOT_DOCUMENT
24 
25 #include "ebmlelement.h"
26 #include "tstring.h"
27 
28 namespace TagLib {
29  class File;
30  class ByteVector;
31 
32  namespace EBML {
33  class StringElement : public Element
34  {
35  public:
36  StringElement(String::Type stringEncoding, Id id, int sizeLength, offset_t dataSize);
37 
38  const String &getValue() const;
39  void setValue(const String &val);
40  bool read(File &file) override;
41  ByteVector render() override;
42 
43  private:
44  String value;
45  String::Type encoding;
46  };
47 
48  class UTF8StringElement : public StringElement {
49  public:
50  UTF8StringElement(Id id, int sizeLength, offset_t dataSize);
51  UTF8StringElement(Id id, int sizeLength, offset_t dataSize, offset_t);
52  explicit UTF8StringElement(Id id);
53  };
54 
55  class Latin1StringElement : public StringElement {
56  public:
57  Latin1StringElement(Id id, int sizeLength, offset_t dataSize);
58  Latin1StringElement(Id id, int sizeLength, offset_t dataSize, offset_t);
59  explicit Latin1StringElement(Id id);
60  };
61  }
62 }
63 
64 #endif
65 #endif
off_t offset_t
Definition: taglib.h:64
Type
Definition: tstring.h:96
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41