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#include "mp4stem.h"
33
34namespace TagLib {
35 namespace MP4 {
38 {
39 public:
43 enum class Type : unsigned char {
44 Void,
45 Bool,
46 Int,
47 IntPair,
48 Byte,
49 UInt,
50 LongLong,
54 Stem,
55 };
56
57 struct IntPair {
58 int first, second;
59 };
60
62 Item(const Item &item);
63
67 Item &operator=(const Item &item);
68
72 void swap(Item &item) noexcept;
73
75
76 Item(int value);
77 Item(unsigned char value);
78 Item(unsigned int value);
79 Item(long long value);
80 Item(bool value);
81 Item(int value1, int value2);
82 Item(const StringList &value);
83 Item(const ByteVectorList &value);
84 Item(const CoverArtList &value);
85 Item(const Stem &value);
86
89
90 int toInt() const;
91 unsigned char toByte() const;
92 unsigned int toUInt() const;
93 long long toLongLong() const;
94 bool toBool() const;
99 Stem toStem() const;
100
101 bool isValid() const;
102
103 Type type() const;
104
109 bool operator==(const Item &other) const;
110
114 bool operator!=(const Item &other) const;
115
116 private:
117 class ItemPrivate;
119 std::shared_ptr<ItemPrivate> d;
120 };
121
123 } // namespace MP4
124} // namespace TagLib
125#endif
A list of ByteVectors.
Definition tbytevectorlist.h:42
A generic, implicitly shared list.
Definition tlist.h:54
MP4 item.
Definition mp4item.h:38
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 Stem &value)
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
Stem toStem() 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:43
Definition mp4stem.h:41
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:57
int first
Definition mp4item.h:58
#define TAGLIB_EXPORT
Definition taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55