TagLib API Documentation
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
33namespace TagLib {
34 namespace MP4 {
37 {
38 public:
42 enum class Type : unsigned char {
43 Void,
44 Bool,
45 Int,
46 IntPair,
47 Byte,
48 UInt,
49 LongLong,
53 };
54
55 struct IntPair {
56 int first, second;
57 };
58
60 Item(const Item &item);
61
65 Item &operator=(const Item &item);
66
70 void swap(Item &item) noexcept;
71
73
74 Item(int value);
75 Item(unsigned char value);
76 Item(unsigned int value);
77 Item(long long value);
78 Item(bool value);
79 Item(int value1, int value2);
80 Item(const StringList &value);
81 Item(const ByteVectorList &value);
82 Item(const CoverArtList &value);
83
86
87 int toInt() const;
88 unsigned char toByte() const;
89 unsigned int toUInt() const;
90 long long toLongLong() const;
91 bool toBool() const;
96
97 bool isValid() const;
98
99 Type type() const;
100
105 bool operator==(const Item &other) const;
106
110 bool operator!=(const Item &other) const;
111
112 private:
113 class ItemPrivate;
115 std::shared_ptr<ItemPrivate> d;
116 };
117
119 } // namespace MP4
120} // namespace TagLib
121#endif
A list of ByteVectors.
Definition: tbytevectorlist.h:42
A generic, implicitly shared list.
Definition: tlist.h:54
MP4 item.
Definition: mp4item.h:37
Item(long long value)
void setAtomDataType(AtomDataType type)
Item(const CoverArtList &value)
Item & operator=(const Item &item)
ByteVectorList toByteVectorList() const
int toInt() const
StringList toStringList() const
bool toBool() const
bool operator==(const Item &other) const
Item(const StringList &value)
bool isValid() const
void swap(Item &item) noexcept
Item(unsigned char value)
Item(bool value)
Item(unsigned int value)
Type type() const
long long toLongLong() const
unsigned int toUInt() const
Item(const Item &item)
bool operator!=(const Item &other) const
AtomDataType atomDataType() const
Item(const ByteVectorList &value)
unsigned char toByte() const
IntPair toIntPair() const
CoverArtList toCoverArtList() const
Item(int value1, int value2)
Type
Definition: mp4item.h:42
A generic, implicitly shared map.
Definition: tmap.h:45
A list of strings.
Definition: tstringlist.h:44
AtomDataType
Definition: mp4atom.h:37
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
Definition: mp4item.h:55
int first
Definition: mp4item.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55