Use namespace for static taglib to avoid collision with taglib

linked to vlc
This commit is contained in:
Jonas Kvinge
2019-04-25 23:00:25 +02:00
parent ace8ecbb4e
commit 1c926cca45
227 changed files with 460 additions and 447 deletions

View File

@@ -25,7 +25,7 @@
#include "id3v1genres.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
namespace
{

View File

@@ -30,7 +30,7 @@
#include "tstringlist.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v1 {
typedef Map<String, int> GenreMap;

View File

@@ -29,7 +29,7 @@
#include "id3v1tag.h"
#include "id3v1genres.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v1;
namespace
@@ -85,13 +85,13 @@ ByteVector ID3v1::StringHandler::render(const String &s) const
////////////////////////////////////////////////////////////////////////////////
ID3v1::Tag::Tag() :
TagLib::Tag(),
Strawberry_TagLib::TagLib::Tag(),
d(new TagPrivate())
{
}
ID3v1::Tag::Tag(File *file, long tagOffset) :
TagLib::Tag(),
Strawberry_TagLib::TagLib::Tag(),
d(new TagPrivate())
{
d->file = file;

View File

@@ -30,7 +30,7 @@
#include "tbytevector.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class File;
@@ -88,7 +88,7 @@ namespace TagLib {
* This is an implementation of the ID3v1 format. ID3v1 is both the simplest
* and most common of tag formats but is rather limited. Because of its
* pervasiveness and the way that applications have been written around the
* fields that it provides, the generic TagLib::Tag API is a mirror of what is
* fields that it provides, the generic Strawberry_TagLib::TagLib::Tag API is a mirror of what is
* provided by ID3v1.
*
* ID3v1 tags should generally only contain Latin1 information. However because
@@ -102,7 +102,7 @@ namespace TagLib {
* truncation happens automatically when the tag is rendered.
*/
class TAGLIB_EXPORT Tag : public TagLib::Tag
class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag
{
public:
/*!

View File

@@ -28,7 +28,7 @@
#include <tstringlist.h>
#include <tdebug.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class AttachedPictureFrame::AttachedPictureFramePrivate
@@ -144,7 +144,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
return;
}
d->type = (TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++];
d->type = (Strawberry_TagLib::TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++];
d->description = readStringField(data, d->textEncoding, &pos);
d->data = data.mid(pos);
@@ -205,7 +205,7 @@ void AttachedPictureFrameV22::parseFields(const ByteVector &data)
d->mimeType = "image/" + fixedString;
}
d->type = (TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++];
d->type = (Strawberry_TagLib::TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++];
d->description = readStringField(data, d->textEncoding, &pos);
d->data = data.mid(pos);

View File

@@ -30,7 +30,7 @@
#include "id3v2header.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -30,7 +30,7 @@
#include "chapterframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class ChapterFrame::ChapterFramePrivate

View File

@@ -30,7 +30,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -31,7 +31,7 @@
#include "commentsframe.h"
#include "tpropertymap.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class CommentsFrame::CommentsFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -29,7 +29,7 @@
#include <tdebug.h>
#include <tpropertymap.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class EventTimingCodesFrame::EventTimingCodesFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "tlist.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {
@@ -116,7 +116,7 @@ namespace TagLib {
/*!
* List of synchronized events.
*/
typedef TagLib::List<SynchedEvent> SynchedEventList;
typedef Strawberry_TagLib::TagLib::List<SynchedEvent> SynchedEventList;
/*!
* Construct an empty event timing codes frame.

View File

@@ -31,7 +31,7 @@
#include "generalencapsulatedobjectframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFramePrivate

View File

@@ -33,7 +33,7 @@
#include "id3v2header.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -29,7 +29,7 @@
#include "ownershipframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class OwnershipFrame::OwnershipFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -25,7 +25,7 @@
#include "podcastframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class PodcastFrame::PodcastFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -27,7 +27,7 @@
#include "popularimeterframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class PopularimeterFrame::PopularimeterFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -30,7 +30,7 @@
#include "privateframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;

View File

@@ -30,7 +30,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -28,7 +28,7 @@
#include "relativevolumeframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
struct ChannelData

View File

@@ -30,7 +30,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -29,7 +29,7 @@
#include <tdebug.h>
#include <tpropertymap.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class SynchronizedLyricsFrame::SynchronizedLyricsFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "tlist.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {
@@ -93,7 +93,7 @@ namespace TagLib {
/*!
* List of synchronized lyrics.
*/
typedef TagLib::List<SynchedText> SynchedTextList;
typedef Strawberry_TagLib::TagLib::List<SynchedText> SynchedTextList;
/*!
* Construct an empty synchronized lyrics frame that will use the text

View File

@@ -29,7 +29,7 @@
#include "tableofcontentsframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class TableOfContentsFrame::TableOfContentsFramePrivate

View File

@@ -31,7 +31,7 @@
#include "tbytevectorlist.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -29,7 +29,7 @@
#include "tpropertymap.h"
#include "id3v1genres.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class TextIdentificationFrame::TextIdentificationFramePrivate

View File

@@ -32,7 +32,7 @@
#include "id3v2frame.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -30,7 +30,7 @@
#include "id3v2tag.h"
#include "uniquefileidentifierframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class UniqueFileIdentifierFrame::UniqueFileIdentifierFramePrivate

View File

@@ -28,7 +28,7 @@
#include "id3v2frame.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -25,7 +25,7 @@
#include "unknownframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class UnknownFrame::UnknownFramePrivate

View File

@@ -29,7 +29,7 @@
#include "id3v2frame.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -32,7 +32,7 @@
#include <tdebug.h>
#include <tpropertymap.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class UnsynchronizedLyricsFrame::UnsynchronizedLyricsFramePrivate

View File

@@ -30,7 +30,7 @@
#include "id3v2frame.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -32,7 +32,7 @@
#include <tstringlist.h>
#include <tpropertymap.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class UrlLinkFrame::UrlLinkFramePrivate

View File

@@ -31,7 +31,7 @@
#include "id3v2frame.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -26,7 +26,7 @@
#include "id3v2extendedheader.h"
#include "id3v2synchdata.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class ExtendedHeader::ExtendedHeaderPrivate

View File

@@ -30,7 +30,7 @@
#include "tbytevector.h"
#include "taglib.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -26,7 +26,7 @@
#include "id3v2footer.h"
#include "id3v2header.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class Footer::FooterPrivate

View File

@@ -29,7 +29,7 @@
#include "taglib_export.h"
#include "tbytevector.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -41,7 +41,7 @@
#include "frames/uniquefileidentifierframe.h"
#include "frames/unknownframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class Frame::FramePrivate

View File

@@ -30,7 +30,7 @@
#include "tbytevector.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class StringList;
class PropertyMap;

View File

@@ -48,7 +48,7 @@
#include "frames/tableofcontentsframe.h"
#include "frames/podcastframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
namespace

View File

@@ -31,7 +31,7 @@
#include "id3v2frame.h"
#include "id3v2header.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -33,7 +33,7 @@
#include "id3v2footer.h"
#include "id3v2synchdata.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
class Header::HeaderPrivate
@@ -207,14 +207,14 @@ void Header::parse(const ByteVector &data)
if(sizeData.size() != 4) {
d->tagSize = 0;
debug("TagLib::ID3v2::Header::parse() - The tag size as read was 0 bytes!");
debug("Strawberry_TagLib::TagLib::ID3v2::Header::parse() - The tag size as read was 0 bytes!");
return;
}
for(ByteVector::ConstIterator it = sizeData.begin(); it != sizeData.end(); it++) {
if(static_cast<unsigned char>(*it) >= 128) {
d->tagSize = 0;
debug("TagLib::ID3v2::Header::parse() - One of the size bytes in the id3v2 header was greater than the allowed 128.");
debug("Strawberry_TagLib::TagLib::ID3v2::Header::parse() - One of the size bytes in the id3v2 header was greater than the allowed 128.");
return;
}
}

View File

@@ -29,7 +29,7 @@
#include "tbytevector.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -27,7 +27,7 @@
#include "id3v2synchdata.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
unsigned int SynchData::toUInt(const ByteVector &data)

View File

@@ -29,7 +29,7 @@
#include "tbytevector.h"
#include "taglib.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 {

View File

@@ -44,7 +44,7 @@
#include "frames/unsynchronizedlyricsframe.h"
#include "frames/unknownframe.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
using namespace ID3v2;
namespace
@@ -110,14 +110,14 @@ String Latin1StringHandler::parse(const ByteVector &data) const
////////////////////////////////////////////////////////////////////////////////
ID3v2::Tag::Tag() :
TagLib::Tag(),
Strawberry_TagLib::TagLib::Tag(),
d(new TagPrivate())
{
d->factory = FrameFactory::instance();
}
ID3v2::Tag::Tag(File *file, long tagOffset, const FrameFactory *factory) :
TagLib::Tag(),
Strawberry_TagLib::TagLib::Tag(),
d(new TagPrivate())
{
d->factory = factory;

View File

@@ -35,7 +35,7 @@
#include "id3v2framefactory.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class File;
@@ -125,14 +125,14 @@ namespace TagLib {
* heart and should not be done without much meditation on the spec. It's
* rather long, but if you're planning on messing with this class and others
* that deal with the details of ID3v2 (rather than the nice, safe, abstract
* TagLib::Tag and friends), it's worth your time to familiarize yourself
* Strawberry_TagLib::TagLib::Tag and friends), it's worth your time to familiarize yourself
* with said spec (which is distributed with the TagLib sources). TagLib
* tries to do most of the work, but with a little luck, you can still
* convince it to generate invalid ID3v2 tags. The APIs for ID3v2 assume a
* working knowledge of ID3v2 structure. You're been warned.
*/
class TAGLIB_EXPORT Tag : public TagLib::Tag
class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag
{
public:
/*!
@@ -216,7 +216,7 @@ namespace TagLib {
* beats per minute -- the TBPM frame.
*
* \code
* TagLib::MPEG::File f("foo.mp3");
* Strawberry_TagLib::TagLib::MPEG::File f("foo.mp3");
*
* // Check to make sure that it has an ID3v2 tag
*
@@ -224,7 +224,7 @@ namespace TagLib {
*
* // Get the list of frames for a specific frame type
*
* TagLib::ID3v2::FrameList l = f.ID3v2Tag()->frameListMap()["TBPM"];
* Strawberry_TagLib::TagLib::ID3v2::FrameList l = f.ID3v2Tag()->frameListMap()["TBPM"];
*
* if(!l.isEmpty())
* std::cout << l.front()->toString() << std::endl;

View File

@@ -37,7 +37,7 @@
#include "mpegutils.h"
#include "tpropertymap.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
namespace
{
@@ -84,7 +84,7 @@ namespace
{
// Dummy file class to make a stream work with MPEG::Header.
class AdapterFile : public TagLib::File
class AdapterFile : public Strawberry_TagLib::TagLib::File
{
public:
explicit AdapterFile(IOStream *stream) : File(stream) {}
@@ -133,7 +133,7 @@ bool MPEG::File::isSupported(IOStream *stream)
////////////////////////////////////////////////////////////////////////////////
MPEG::File::File(FileName file, bool readProperties, Properties::ReadStyle) :
TagLib::File(file),
Strawberry_TagLib::TagLib::File(file),
d(new FilePrivate())
{
if(isOpen())
@@ -142,7 +142,7 @@ MPEG::File::File(FileName file, bool readProperties, Properties::ReadStyle) :
MPEG::File::File(FileName file, ID3v2::FrameFactory *frameFactory,
bool readProperties, Properties::ReadStyle) :
TagLib::File(file),
Strawberry_TagLib::TagLib::File(file),
d(new FilePrivate(frameFactory))
{
if(isOpen())
@@ -151,7 +151,7 @@ MPEG::File::File(FileName file, ID3v2::FrameFactory *frameFactory,
MPEG::File::File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
bool readProperties, Properties::ReadStyle) :
TagLib::File(stream),
Strawberry_TagLib::TagLib::File(stream),
d(new FilePrivate(frameFactory))
{
if(isOpen())
@@ -163,7 +163,7 @@ MPEG::File::~File()
delete d;
}
TagLib::Tag *MPEG::File::tag() const
Strawberry_TagLib::TagLib::Tag *MPEG::File::tag() const
{
return &d->tag;
}

View File

@@ -32,25 +32,25 @@
#include "mpegproperties.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace ID3v2 { class Tag; class FrameFactory; }
namespace ID3v1 { class Tag; }
namespace APE { class Tag; }
//! An implementation of TagLib::File with MPEG (MP3) specific methods
//! An implementation of Strawberry_TagLib::TagLib::File with MPEG (MP3) specific methods
namespace MPEG {
//! An MPEG file class with some useful methods specific to MPEG
/*!
* This implements the generic TagLib::File API and additionally provides
* This implements the generic Strawberry_TagLib::TagLib::File API and additionally provides
* access to properties that are distinct to MPEG files, notably access
* to the different ID3 tags.
*/
class TAGLIB_EXPORT File : public TagLib::File
class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File
{
public:
/*!

View File

@@ -32,7 +32,7 @@
#include "mpegheader.h"
#include "mpegutils.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
class MPEG::Header::HeaderPrivate : public RefCounter
{

View File

@@ -28,7 +28,7 @@
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class ByteVector;
class File;

View File

@@ -32,7 +32,7 @@
#include "apetag.h"
#include "apefooter.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
class MPEG::Properties::PropertiesPrivate
{

View File

@@ -31,7 +31,7 @@
#include "mpegheader.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
namespace MPEG {

View File

@@ -30,7 +30,7 @@
#ifndef DO_NOT_DOCUMENT // tell Doxygen not to document this header
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
namespace MPEG
{

View File

@@ -30,7 +30,7 @@
#include "xingheader.h"
#include "mpegfile.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
class MPEG::XingHeader::XingHeaderPrivate
{
@@ -81,8 +81,8 @@ MPEG::XingHeader::HeaderType MPEG::XingHeader::type() const
return d->type;
}
int MPEG::XingHeader::xingHeaderOffset(TagLib::MPEG::Header::Version /*v*/,
TagLib::MPEG::Header::ChannelMode /*c*/)
int MPEG::XingHeader::xingHeaderOffset(Strawberry_TagLib::TagLib::MPEG::Header::Version /*v*/,
Strawberry_TagLib::TagLib::MPEG::Header::ChannelMode /*c*/)
{
return 0;
}

View File

@@ -29,7 +29,7 @@
#include "mpegheader.h"
#include "taglib_export.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class ByteVector;
@@ -111,8 +111,8 @@ namespace TagLib {
*
* \deprecated Always returns 0.
*/
static int xingHeaderOffset(TagLib::MPEG::Header::Version v,
TagLib::MPEG::Header::ChannelMode c);
static int xingHeaderOffset(Strawberry_TagLib::TagLib::MPEG::Header::Version v,
Strawberry_TagLib::TagLib::MPEG::Header::ChannelMode c);
private:
XingHeader(const XingHeader &);