TagLib  2.0
mp4item.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 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_MP4ITEM_H
27 #define TAGLIB_MP4ITEM_H
28 
29 #include "tstringlist.h"
30 #include "taglib_export.h"
31 #include "mp4coverart.h"
32 
33 namespace TagLib {
34  namespace MP4 {
37  {
38  public:
39  struct IntPair {
40  int first, second;
41  };
42 
43  Item();
44  Item(const Item &item);
45 
49  Item &operator=(const Item &item);
50 
54  void swap(Item &item) noexcept;
55 
56  ~Item();
57 
58  Item(int value);
59  Item(unsigned char value);
60  Item(unsigned int value);
61  Item(long long value);
62  Item(bool value);
63  Item(int value1, int value2);
64  Item(const StringList &value);
65  Item(const ByteVectorList &value);
66  Item(const CoverArtList &value);
67 
68  void setAtomDataType(AtomDataType type);
69  AtomDataType atomDataType() const;
70 
71  int toInt() const;
72  unsigned char toByte() const;
73  unsigned int toUInt() const;
74  long long toLongLong() const;
75  bool toBool() const;
76  IntPair toIntPair() const;
77  StringList toStringList() const;
78  ByteVectorList toByteVectorList() const;
79  CoverArtList toCoverArtList() const;
80 
81  bool isValid() const;
82 
83  private:
84  class ItemPrivate;
86  std::shared_ptr<ItemPrivate> d;
87  };
88 
90  } // namespace MP4
91 } // namespace TagLib
92 #endif
A list of ByteVectors.
Definition: tbytevectorlist.h:41
A generic, implicitly shared list.
Definition: tlist.h:53
AtomDataType
Definition: mp4atom.h:37
Definition: mp4item.h:39
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
A generic, implicitly shared map.
Definition: tmap.h:44
MP4 item.
Definition: mp4item.h:36
A list of strings.
Definition: tstringlist.h:43
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
int second
Definition: mp4item.h:40
TAGLIB_EXPORT unsigned int toUInt(const ByteVector &data)
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41