matroskasimpletag.h
Go to the documentation of this file.
/***************************************************************************
* 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_MATROSKASIMPLETAG_H
#define TAGLIB_MATROSKASIMPLETAG_H
#include <memory>
#include "tstring.h"
namespace TagLib {
class String;
class ByteVector;
namespace Matroska {
class TAGLIB_EXPORT SimpleTag
{
public:
enum TargetTypeValue {
None = 0,
Shot = 10,
Subtrack = 20,
Track = 30,
Part = 40,
Album = 50,
Edition = 60,
Collection = 70
};
enum ValueType {
StringType = 0,
BinaryType = 1
};
SimpleTag(const String &name, const String &value,
TargetTypeValue targetTypeValue = None,
const String &language = String(), bool defaultLanguage = true,
unsigned long long trackUid = 0);
// BIC: merge with constructor above
SimpleTag(const String& name, const String& value, TargetTypeValue targetTypeValue, const String& language,
bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid,
unsigned long long chapterUid = 0, unsigned long long attachmentUid = 0);
SimpleTag(const String &name, const ByteVector &value,
TargetTypeValue targetTypeValue = None,
const String &language = String(), bool defaultLanguage = true,
unsigned long long trackUid = 0);
// BIC: merge with constructor above
SimpleTag(const String& name, const ByteVector& value, TargetTypeValue targetTypeValue, const String& language,
bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid,
unsigned long long chapterUid = 0, unsigned long long attachmentUid = 0);
SimpleTag(const SimpleTag &other);
SimpleTag(SimpleTag &&other) noexcept;
~SimpleTag();
SimpleTag &operator=(const SimpleTag &other);
SimpleTag &operator=(SimpleTag &&other) noexcept;
void swap(SimpleTag &other) noexcept;
const String &name() const;
TargetTypeValue targetTypeValue() const;
const String &language() const;
bool defaultLanguageFlag() const;
unsigned long long trackUid() const;
unsigned long long editionUid() const;
unsigned long long chapterUid() const;
unsigned long long attachmentUid() const;
ValueType type() const;
String toString() const;
ByteVector toByteVector() const;
private:
class SimpleTagPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<SimpleTagPrivate> d;
};
}
}
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::Matroska::SimpleTag::toByteVector
ByteVector toByteVector() const
TagLib::Matroska::SimpleTag::type
ValueType type() const
TagLib::Matroska::SimpleTag::operator=
SimpleTag & operator=(const SimpleTag &other)
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(const String &name, const ByteVector &value, TargetTypeValue targetTypeValue, const String &language, bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
TagLib::Matroska::SimpleTag::trackUid
unsigned long long trackUid() const
TagLib::Matroska::SimpleTag::language
const String & language() const
TagLib::Matroska::SimpleTag::operator=
SimpleTag & operator=(SimpleTag &&other) noexcept
TagLib::Matroska::SimpleTag::TargetTypeValue
TargetTypeValue
Specifies the level of other elements the tag value applies to.
Definition matroskasimpletag.h:38
TagLib::Matroska::SimpleTag::Part
@ Part
Part / session.
Definition matroskasimpletag.h:43
TagLib::Matroska::SimpleTag::Track
@ Track
Track / song / chapter.
Definition matroskasimpletag.h:42
TagLib::Matroska::SimpleTag::Album
@ Album
Album / opera / concert / movie / episode.
Definition matroskasimpletag.h:44
TagLib::Matroska::SimpleTag::Shot
@ Shot
Shot.
Definition matroskasimpletag.h:40
TagLib::Matroska::SimpleTag::None
@ None
Empty or omitted, everything in the segment.
Definition matroskasimpletag.h:39
TagLib::Matroska::SimpleTag::Subtrack
@ Subtrack
Subtrack / movement / scene.
Definition matroskasimpletag.h:41
TagLib::Matroska::SimpleTag::Collection
@ Collection
Collection.
Definition matroskasimpletag.h:46
TagLib::Matroska::SimpleTag::Edition
@ Edition
Edition / issue / volume / opus / season / sequel.
Definition matroskasimpletag.h:45
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(const String &name, const String &value, TargetTypeValue targetTypeValue=None, const String &language=String(), bool defaultLanguage=true, unsigned long long trackUid=0)
TagLib::Matroska::SimpleTag::swap
void swap(SimpleTag &other) noexcept
TagLib::Matroska::SimpleTag::toString
String toString() const
TagLib::Matroska::SimpleTag::~SimpleTag
~SimpleTag()
TagLib::Matroska::SimpleTag::name
const String & name() const
TagLib::Matroska::SimpleTag::attachmentUid
unsigned long long attachmentUid() const
TagLib::Matroska::SimpleTag::defaultLanguageFlag
bool defaultLanguageFlag() const
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(const SimpleTag &other)
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(const String &name, const ByteVector &value, TargetTypeValue targetTypeValue=None, const String &language=String(), bool defaultLanguage=true, unsigned long long trackUid=0)
TagLib::Matroska::SimpleTag::editionUid
unsigned long long editionUid() const
TagLib::Matroska::SimpleTag::targetTypeValue
TargetTypeValue targetTypeValue() const
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(SimpleTag &&other) noexcept
TagLib::Matroska::SimpleTag::SimpleTag
SimpleTag(const String &name, const String &value, TargetTypeValue targetTypeValue, const String &language, bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
TagLib::Matroska::SimpleTag::ValueType
ValueType
The types the value can have.
Definition matroskasimpletag.h:50
TagLib::Matroska::SimpleTag::BinaryType
@ BinaryType
Item contains binary information.
Definition matroskasimpletag.h:52
TagLib::Matroska::SimpleTag::StringType
@ StringType
Item contains text information coded in UTF-8.
Definition matroskasimpletag.h:51
TagLib::Matroska::SimpleTag::chapterUid
unsigned long long chapterUid() const
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::Matroska
An implementation of Matroska metadata.
Definition matroskaattachedfile.h:32
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
tstring.h