mp4item.h
Go to the documentation of this file.
/**************************************************************************
copyright : (C) 2007 by Lukáš Lalinský
email : lalinsky@gmail.com
**************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_MP4ITEM_H
#define TAGLIB_MP4ITEM_H
#include "tstringlist.h"
#include "taglib_export.h"
#include "mp4coverart.h"
#include "mp4stem.h"
namespace TagLib {
namespace MP4 {
class TAGLIB_EXPORT Item
{
public:
enum class Type : unsigned char {
Void,
Bool,
Int,
IntPair,
Byte,
UInt,
LongLong,
StringList,
ByteVectorList,
CoverArtList,
Stem,
};
struct IntPair {
int first, second;
};
Item();
Item(const Item &item);
Item &operator=(const Item &item);
void swap(Item &item) noexcept;
~Item();
Item(int value);
Item(unsigned char value);
Item(unsigned int value);
Item(long long value);
Item(bool value);
Item(int value1, int value2);
Item(const StringList &value);
Item(const ByteVectorList &value);
Item(const CoverArtList &value);
Item(const Stem &value);
void setAtomDataType(AtomDataType type);
AtomDataType atomDataType() const;
int toInt() const;
unsigned char toByte() const;
unsigned int toUInt() const;
long long toLongLong() const;
bool toBool() const;
IntPair toIntPair() const;
StringList toStringList() const;
ByteVectorList toByteVectorList() const;
CoverArtList toCoverArtList() const;
Stem toStem() const;
bool isValid() const;
Type type() const;
bool operator==(const Item &other) const;
bool operator!=(const Item &other) const;
private:
class ItemPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::shared_ptr<ItemPrivate> d;
};
using ItemMap = TagLib::Map<String, Item>;
} // namespace MP4
} // namespace TagLib
#endif
TagLib::ByteVectorList
A list of ByteVectors.
Definition tbytevectorlist.h:42
TagLib::MP4::Item::Item
Item(long long value)
TagLib::MP4::Item::setAtomDataType
void setAtomDataType(AtomDataType type)
TagLib::MP4::Item::Item
Item(const CoverArtList &value)
TagLib::MP4::Item::operator=
Item & operator=(const Item &item)
TagLib::MP4::Item::toByteVectorList
ByteVectorList toByteVectorList() const
TagLib::MP4::Item::toInt
int toInt() const
TagLib::MP4::Item::toStringList
StringList toStringList() const
TagLib::MP4::Item::toBool
bool toBool() const
TagLib::MP4::Item::operator==
bool operator==(const Item &other) const
TagLib::MP4::Item::Item
Item(const Stem &value)
TagLib::MP4::Item::Item
Item()
TagLib::MP4::Item::Item
Item(const StringList &value)
TagLib::MP4::Item::isValid
bool isValid() const
TagLib::MP4::Item::swap
void swap(Item &item) noexcept
TagLib::MP4::Item::Item
Item(unsigned char value)
TagLib::MP4::Item::Item
Item(bool value)
TagLib::MP4::Item::Item
Item(unsigned int value)
TagLib::MP4::Item::type
Type type() const
TagLib::MP4::Item::toLongLong
long long toLongLong() const
TagLib::MP4::Item::toUInt
unsigned int toUInt() const
TagLib::MP4::Item::toStem
Stem toStem() const
TagLib::MP4::Item::Item
Item(const Item &item)
TagLib::MP4::Item::operator!=
bool operator!=(const Item &other) const
TagLib::MP4::Item::atomDataType
AtomDataType atomDataType() const
TagLib::MP4::Item::Item
Item(int value)
TagLib::MP4::Item::Item
Item(const ByteVectorList &value)
TagLib::MP4::Item::toByte
unsigned char toByte() const
TagLib::MP4::Item::toIntPair
IntPair toIntPair() const
TagLib::MP4::Item::toCoverArtList
CoverArtList toCoverArtList() const
TagLib::MP4::Item::Item
Item(int value1, int value2)
TagLib::MP4::Item::~Item
~Item()
TagLib::MP4::Item::Type
Type
Definition mp4item.h:43
TagLib::MP4::Stem
Definition mp4stem.h:41
TagLib::Map
A generic, implicitly shared map.
Definition tmap.h:45
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
mp4coverart.h
mp4stem.h
TagLib::MP4
An implementation of MP4 (AAC, ALAC, ...) metadata.
Definition mp4atom.h:35
TagLib::MP4::ItemMap
TagLib::Map< String, Item > ItemMap
Definition mp4item.h:122
TagLib::MP4::AtomDataType
AtomDataType
Definition mp4atom.h:37
TagLib::MP4::CoverArtList
List< CoverArt > CoverArtList
Definition mp4coverart.h:89
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::MP4::Item::IntPair
Definition mp4item.h:57
TagLib::MP4::Item::IntPair::first
int first
Definition mp4item.h:58
TagLib::MP4::Item::IntPair::second
int second
Definition mp4item.h:58
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tstringlist.h