apeitem.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
***************************************************************************/
/***************************************************************************
* 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_APEITEM_H
#define TAGLIB_APEITEM_H
#include "tbytevector.h"
#include "tstring.h"
#include "tstringlist.h"
namespace TagLib {
namespace APE {
class TAGLIB_EXPORT Item
{
public:
enum ItemTypes {
Text = 0,
Binary = 1,
Locator = 2
};
Item();
Item(const String &key, const StringList &values);
Item(const String &key, const ByteVector &value, bool binary);
Item(const Item &item);
~Item();
Item &operator=(const Item &item);
void swap(Item &item) noexcept;
String key() const;
ByteVector binaryData() const;
void setBinaryData(const ByteVector &value);
void setKey(const String &key);
void setValue(const String &value);
void setValues(const StringList &values);
void appendValue(const String &value);
void appendValues(const StringList &values);
int size() const;
String toString() const;
StringList values() const;
ByteVector render() const;
void parse(const ByteVector& data);
void setReadOnly(bool readOnly);
bool isReadOnly() const;
void setType(ItemTypes val);
ItemTypes type() const;
bool isEmpty() const;
private:
class ItemPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<ItemPrivate> d;
};
} // namespace APE
} // namespace TagLib
#endif
TagLib::APE::Item::Item
Item(const String &key, const StringList &values)
TagLib::APE::Item::isReadOnly
bool isReadOnly() const
TagLib::APE::Item::key
String key() const
TagLib::APE::Item::toString
String toString() const
TagLib::APE::Item::setReadOnly
void setReadOnly(bool readOnly)
TagLib::APE::Item::operator=
Item & operator=(const Item &item)
TagLib::APE::Item::Item
Item()
TagLib::APE::Item::ItemTypes
ItemTypes
Definition apeitem.h:46
TagLib::APE::Item::Text
@ Text
Item contains text information coded in UTF-8.
Definition apeitem.h:48
TagLib::APE::Item::Locator
@ Locator
Item is a locator of external stored information.
Definition apeitem.h:52
TagLib::APE::Item::Binary
@ Binary
Item contains binary information.
Definition apeitem.h:50
TagLib::APE::Item::size
int size() const
TagLib::APE::Item::render
ByteVector render() const
TagLib::APE::Item::type
ItemTypes type() const
TagLib::APE::Item::setKey
void setKey(const String &key)
TagLib::APE::Item::isEmpty
bool isEmpty() const
TagLib::APE::Item::setType
void setType(ItemTypes val)
TagLib::APE::Item::~Item
~Item()
TagLib::APE::Item::values
StringList values() const
TagLib::APE::Item::Item
Item(const String &key, const ByteVector &value, bool binary)
TagLib::APE::Item::swap
void swap(Item &item) noexcept
TagLib::APE::Item::appendValues
void appendValues(const StringList &values)
TagLib::APE::Item::setValues
void setValues(const StringList &values)
TagLib::APE::Item::appendValue
void appendValue(const String &value)
TagLib::APE::Item::parse
void parse(const ByteVector &data)
TagLib::APE::Item::setBinaryData
void setBinaryData(const ByteVector &value)
TagLib::APE::Item::binaryData
ByteVector binaryData() const
TagLib::APE::Item::setValue
void setValue(const String &value)
TagLib::APE::Item::Item
Item(const Item &item)
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::APE
An implementation of APE metadata.
Definition apefile.h:46
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
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
tbytevector.h
tstring.h
tstringlist.h