textidentificationframe.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : wheeler@kde.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_TEXTIDENTIFICATIONFRAME_H
#define TAGLIB_TEXTIDENTIFICATIONFRAME_H
#include "tstringlist.h"
#include "tmap.h"
#include "taglib_export.h"
#include "id3v2frame.h"
namespace TagLib {
namespace ID3v2 {
class Tag;
using KeyConversionMap = Map<String, String>;
class TAGLIB_EXPORT TextIdentificationFrame : public Frame
{
friend class FrameFactory;
public:
TextIdentificationFrame(const ByteVector &type, String::Type encoding);
explicit TextIdentificationFrame(const ByteVector &data);
static TextIdentificationFrame *createTIPLFrame(const PropertyMap &properties);
static TextIdentificationFrame *createTMCLFrame(const PropertyMap &properties);
~TextIdentificationFrame() override;
TextIdentificationFrame(const TextIdentificationFrame &) = delete;
TextIdentificationFrame &operator=(const TextIdentificationFrame &) = delete;
void setText(const StringList &l);
// Reimplementations.
void setText(const String &s) override;
String toString() const override;
StringList toStringList() const override;
String::Type textEncoding() const;
void setTextEncoding(String::Type encoding);
StringList fieldList() const;
static const KeyConversionMap &involvedPeopleMap();
PropertyMap asProperties() const override;
protected:
// Reimplementations.
void parseFields(const ByteVector &data) override;
ByteVector renderFields() const override;
TextIdentificationFrame(const ByteVector &data, Header *h);
private:
PropertyMap makeTIPLProperties() const;
PropertyMap makeTMCLProperties() const;
class TextIdentificationFramePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<TextIdentificationFramePrivate> d;
};
class TAGLIB_EXPORT UserTextIdentificationFrame : public TextIdentificationFrame
{
friend class FrameFactory;
public:
explicit UserTextIdentificationFrame(String::Type encoding = String::Latin1);
explicit UserTextIdentificationFrame(const ByteVector &data);
UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding = String::UTF8);
~UserTextIdentificationFrame() override;
UserTextIdentificationFrame(const UserTextIdentificationFrame &) = delete;
UserTextIdentificationFrame &operator=(const UserTextIdentificationFrame &) = delete;
String toString() const override;
String description() const;
void setDescription(const String &s);
void setText(const String &text) override;
void setText(const StringList &fields);
PropertyMap asProperties() const override;
static UserTextIdentificationFrame *find(const Tag *tag, const String &description);
static String keyToTXXX(const String &);
static String txxxToKey(const String &);
private:
UserTextIdentificationFrame(const ByteVector &data, Header *h);
void checkFields();
class UserTextIdentificationFramePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<UserTextIdentificationFramePrivate> d;
};
} // namespace ID3v2
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::ID3v2::Frame::Header
ID3v2 frame header implementation.
Definition id3v2frame.h:293
TagLib::ID3v2::Frame::Frame
Frame(const Frame &)=delete
TagLib::ID3v2::Tag
The main class in the ID3v2 implementation.
Definition id3v2tag.h:134
TagLib::ID3v2::TextIdentificationFrame::renderFields
ByteVector renderFields() const override
TagLib::ID3v2::TextIdentificationFrame::operator=
TextIdentificationFrame & operator=(const TextIdentificationFrame &)=delete
TagLib::ID3v2::TextIdentificationFrame::setTextEncoding
void setTextEncoding(String::Type encoding)
TagLib::ID3v2::TextIdentificationFrame::setText
void setText(const StringList &l)
TagLib::ID3v2::TextIdentificationFrame::toStringList
StringList toStringList() const override
TagLib::ID3v2::TextIdentificationFrame::toString
String toString() const override
TagLib::ID3v2::TextIdentificationFrame::TextIdentificationFrame
TextIdentificationFrame(const ByteVector &data, Header *h)
TagLib::ID3v2::TextIdentificationFrame::TextIdentificationFrame
TextIdentificationFrame(const ByteVector &data)
TagLib::ID3v2::TextIdentificationFrame::fieldList
StringList fieldList() const
TagLib::ID3v2::TextIdentificationFrame::parseFields
void parseFields(const ByteVector &data) override
TagLib::ID3v2::TextIdentificationFrame::FrameFactory
friend class FrameFactory
Definition textidentificationframe.h:107
TagLib::ID3v2::TextIdentificationFrame::textEncoding
String::Type textEncoding() const
TagLib::ID3v2::TextIdentificationFrame::setText
void setText(const String &s) override
TagLib::ID3v2::TextIdentificationFrame::createTMCLFrame
static TextIdentificationFrame * createTMCLFrame(const PropertyMap &properties)
TagLib::ID3v2::TextIdentificationFrame::createTIPLFrame
static TextIdentificationFrame * createTIPLFrame(const PropertyMap &properties)
TagLib::ID3v2::TextIdentificationFrame::involvedPeopleMap
static const KeyConversionMap & involvedPeopleMap()
TagLib::ID3v2::TextIdentificationFrame::TextIdentificationFrame
TextIdentificationFrame(const ByteVector &type, String::Type encoding)
TagLib::ID3v2::TextIdentificationFrame::~TextIdentificationFrame
~TextIdentificationFrame() override
TagLib::ID3v2::TextIdentificationFrame::TextIdentificationFrame
TextIdentificationFrame(const TextIdentificationFrame &)=delete
TagLib::ID3v2::TextIdentificationFrame::asProperties
PropertyMap asProperties() const override
TagLib::ID3v2::UserTextIdentificationFrame::operator=
UserTextIdentificationFrame & operator=(const UserTextIdentificationFrame &)=delete
TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame
UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding=String::UTF8)
TagLib::ID3v2::UserTextIdentificationFrame::setText
void setText(const StringList &fields)
TagLib::ID3v2::UserTextIdentificationFrame::txxxToKey
static String txxxToKey(const String &)
TagLib::ID3v2::UserTextIdentificationFrame::keyToTXXX
static String keyToTXXX(const String &)
TagLib::ID3v2::UserTextIdentificationFrame::setText
void setText(const String &text) override
TagLib::ID3v2::UserTextIdentificationFrame::setDescription
void setDescription(const String &s)
TagLib::ID3v2::UserTextIdentificationFrame::toString
String toString() const override
TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame
UserTextIdentificationFrame(const ByteVector &data)
TagLib::ID3v2::UserTextIdentificationFrame::FrameFactory
friend class FrameFactory
Definition textidentificationframe.h:242
TagLib::ID3v2::UserTextIdentificationFrame::find
static UserTextIdentificationFrame * find(const Tag *tag, const String &description)
TagLib::ID3v2::UserTextIdentificationFrame::~UserTextIdentificationFrame
~UserTextIdentificationFrame() override
TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame
UserTextIdentificationFrame(const UserTextIdentificationFrame &)=delete
TagLib::ID3v2::UserTextIdentificationFrame::asProperties
PropertyMap asProperties() const override
TagLib::ID3v2::UserTextIdentificationFrame::description
String description() const
TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame
UserTextIdentificationFrame(String::Type encoding=String::Latin1)
TagLib::Map
A generic, implicitly shared map.
Definition tmap.h:45
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::String::Type
Type
Definition tstring.h:96
TagLib::String::Latin1
@ Latin1
Definition tstring.h:100
TagLib::String::UTF8
@ UTF8
Definition tstring.h:113
id3v2frame.h
TagLib::ID3v2
An ID3v2 implementation.
Definition flacfile.h:39
TagLib::ID3v2::KeyConversionMap
Map< String, String > KeyConversionMap
Definition textidentificationframe.h:39
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
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
tmap.h
tstringlist.h