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

@@ -52,11 +52,11 @@
* This namespace contains everything in TagLib. For projects working with
* TagLib extensively it may be convenient to add a
* \code
* using namespace TagLib;
* using namespace Strawberry_TagLib::TagLib;
* \endcode
*/
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String;
@@ -140,14 +140,14 @@ namespace TagLib {
*
* \code
*
* TagLib::FileRef f("Latex Solar Beef.mp3");
* TagLib::String artist = f.tag()->artist(); // artist == "Frank Zappa"
* Strawberry_TagLib::TagLib::FileRef f("Latex Solar Beef.mp3");
* Strawberry_TagLib::TagLib::String artist = f.tag()->artist(); // artist == "Frank Zappa"
*
* f.tag()->setAlbum("Fillmore East");
* f.save();
*
* TagLib::FileRef g("Free City Rhymes.ogg");
* TagLib::String album = g.tag()->album(); // album == "NYC Ghosts & Flowers"
* Strawberry_TagLib::TagLib::FileRef g("Free City Rhymes.ogg");
* Strawberry_TagLib::TagLib::String album = g.tag()->album(); // album == "NYC Ghosts & Flowers"
*
* g.tag()->setTrack(1);
* g.save();

View File

@@ -44,7 +44,7 @@
//
// http://www.informit.com/isapi/product_id~{9C84DAB4-FE6E-49C5-BB0A-FB50331233EA}/content/index.asp
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
template <class TIterator>
int findChar(
@@ -1036,7 +1036,7 @@ void ByteVector::detach()
// related functions
////////////////////////////////////////////////////////////////////////////////
std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v)
std::ostream &operator<<(std::ostream &s, const Strawberry_TagLib::TagLib::ByteVector &v)
{
for(unsigned int i = 0; i < v.size(); i++)
s << v[i];

View File

@@ -32,7 +32,7 @@
#include <vector>
#include <iostream>
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
//! A byte vector
@@ -627,9 +627,9 @@ namespace TagLib {
}
/*!
* \relates TagLib::ByteVector
* \relates Strawberry_TagLib::TagLib::ByteVector
* Streams the ByteVector \a v to the output stream \a s.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v);
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const Strawberry_TagLib::TagLib::ByteVector &v);
#endif

View File

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

View File

@@ -30,7 +30,7 @@
#include "tbytevector.h"
#include "tlist.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
//! A list of ByteVectors

View File

@@ -32,7 +32,7 @@
#include <stdlib.h>
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
class ByteVectorStream::ByteVectorStreamPrivate
{

View File

@@ -31,7 +31,7 @@
#include "tbytevector.h"
#include "tiostream.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String;
class Tag;

View File

@@ -38,7 +38,7 @@
#include <cstdio>
#include <cstdarg>
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
// The instance is defined in tdebuglistener.cpp.
extern DebugListener *debugListener;

View File

@@ -26,7 +26,7 @@
#ifndef TAGLIB_DEBUG_H
#define TAGLIB_DEBUG_H
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String;
class ByteVector;

View File

@@ -32,7 +32,7 @@
# include <windows.h>
#endif
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
namespace
{
@@ -63,7 +63,7 @@ namespace
DefaultListener defaultListener;
}
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
DebugListener *debugListener = &defaultListener;

View File

@@ -29,7 +29,7 @@
#include "taglib_export.h"
#include "tstring.h"
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
//! An abstraction for the listener to the debug messages.

View File

@@ -66,7 +66,7 @@
#include "dsffile.h"
#include "dsdifffile.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
class File::FilePrivate
{

View File

@@ -32,7 +32,7 @@
#include "tbytevector.h"
#include "tiostream.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String;
class Tag;

View File

@@ -34,7 +34,7 @@
# include <unistd.h>
#endif
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
namespace
{

View File

@@ -31,7 +31,7 @@
#include "tbytevector.h"
#include "tiostream.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String;
class Tag;

View File

@@ -30,7 +30,7 @@
#include "tiostream.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
#ifdef _WIN32

View File

@@ -30,7 +30,7 @@
#include "taglib.h"
#include "tbytevector.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
#ifdef _WIN32
class TAGLIB_EXPORT FileName

View File

@@ -30,7 +30,7 @@
#include <list>
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
//! A generic, implicitly shared list.
@@ -40,7 +40,7 @@ namespace TagLib {
*
* \code
*
* TagLib::List<int> l = someOtherIntList;
* Strawberry_TagLib::TagLib::List<int> l = someOtherIntList;
*
* \endcode
*

View File

@@ -26,7 +26,7 @@
#include <algorithm>
#include "trefcounter.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
////////////////////////////////////////////////////////////////////////////////
// public members
@@ -320,4 +320,4 @@ void List<T>::detach()
}
}
} // namespace TagLib
} // namespace Strawberry_TagLib::TagLib

View File

@@ -30,7 +30,7 @@
#include "taglib.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
//! A generic, implicitly shared map.

View File

@@ -25,7 +25,7 @@
#include "trefcounter.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
////////////////////////////////////////////////////////////////////////////////
// public members
@@ -196,4 +196,4 @@ void Map<Key, T>::detach()
}
}
} // namespace TagLib
} // namespace Strawberry_TagLib::TagLib

View File

@@ -25,7 +25,7 @@
#include "tpropertymap.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
PropertyMap::PropertyMap() : SimplePropertyMap()

View File

@@ -29,7 +29,7 @@
#include "tmap.h"
#include "tstringlist.h"
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
typedef Map<String,StringList> SimplePropertyMap;

View File

@@ -62,7 +62,7 @@
# define ATOMIC_DEC(x) (--x)
#endif
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
class RefCounter::RefCounterPrivate

View File

@@ -56,7 +56,7 @@
*
* \warning This <b>is not</b> part of the TagLib public API!
*/
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
class TAGLIB_EXPORT RefCounter

View File

@@ -37,7 +37,7 @@
namespace
{
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
// Returns the native format of std::wstring.
String::Type wcharByteOrder()
@@ -136,7 +136,7 @@ namespace
}
}
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class String::StringPrivate : public RefCounter
{
@@ -147,7 +147,7 @@ public:
/*!
* Stores string in UTF-16. The byte order depends on the CPU endian.
*/
TagLib::wstring data;
Strawberry_TagLib::TagLib::wstring data;
/*!
* This is only used to hold the the most recent value of toCString().
@@ -198,7 +198,7 @@ String::String(const wstring &s, Type t) :
copyFromUTF16(d->data, s.c_str(), s.length(), t);
}
else {
debug("String::String() -- TagLib::wstring should not contain Latin1 or UTF-8.");
debug("String::String() -- Strawberry_TagLib::TagLib::wstring should not contain Latin1 or UTF-8.");
}
}
@@ -285,7 +285,7 @@ std::string String::to8Bit(bool unicode) const
return std::string(v.data(), v.size());
}
TagLib::wstring String::toWString() const
Strawberry_TagLib::TagLib::wstring String::toWString() const
{
return d->data;
}
@@ -718,28 +718,28 @@ const String::Type String::WCharByteOrder = wcharByteOrder();
// related non-member functions
////////////////////////////////////////////////////////////////////////////////
const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2)
const Strawberry_TagLib::TagLib::String operator+(const Strawberry_TagLib::TagLib::String &s1, const Strawberry_TagLib::TagLib::String &s2)
{
TagLib::String s(s1);
Strawberry_TagLib::TagLib::String s(s1);
s.append(s2);
return s;
}
const TagLib::String operator+(const char *s1, const TagLib::String &s2)
const Strawberry_TagLib::TagLib::String operator+(const char *s1, const Strawberry_TagLib::TagLib::String &s2)
{
TagLib::String s(s1);
Strawberry_TagLib::TagLib::String s(s1);
s.append(s2);
return s;
}
const TagLib::String operator+(const TagLib::String &s1, const char *s2)
const Strawberry_TagLib::TagLib::String operator+(const Strawberry_TagLib::TagLib::String &s1, const char *s2)
{
TagLib::String s(s1);
Strawberry_TagLib::TagLib::String s(s1);
s.append(s2);
return s;
}
std::ostream &operator<<(std::ostream &s, const TagLib::String &str)
std::ostream &operator<<(std::ostream &s, const Strawberry_TagLib::TagLib::String &str)
{
s << str.to8Bit();
return s;

View File

@@ -34,24 +34,24 @@
#include <iostream>
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Converts a QString to a TagLib::String without a requirement to link to Qt.
* Converts a QString to a Strawberry_TagLib::TagLib::String without a requirement to link to Qt.
*
* \note consider conversion via usual char-by-char for loop to avoid UTF16->UTF8->UTF16
* conversion happening in the background
*/
#if defined(QT_VERSION) && (QT_VERSION >= 0x040000)
#define QStringToTString(s) TagLib::String(s.toUtf8().data(), TagLib::String::UTF8)
#define QStringToTString(s) Strawberry_TagLib::TagLib::String(s.toUtf8().data(), Strawberry_TagLib::TagLib::String::UTF8)
#else
#define QStringToTString(s) TagLib::String(s.utf8().data(), TagLib::String::UTF8)
#define QStringToTString(s) Strawberry_TagLib::TagLib::String(s.utf8().data(), Strawberry_TagLib::TagLib::String::UTF8)
#endif
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Converts a TagLib::String to a QString without a requirement to link to Qt.
* Converts a Strawberry_TagLib::TagLib::String to a QString without a requirement to link to Qt.
*
* \note consider conversion via usual char-by-char for loop to avoid UTF16->UTF8->UTF16
* conversion happening in the background
@@ -60,7 +60,7 @@
#define TStringToQString(s) QString::fromUtf8(s.toCString(true))
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
class StringList;
@@ -68,7 +68,7 @@ namespace TagLib {
/*!
* This is an implicitly shared \e wide string. For storage it uses
* TagLib::wstring, but as this is an <i>implementation detail</i> this of
* Strawberry_TagLib::TagLib::wstring, but as this is an <i>implementation detail</i> this of
* course could change. Strings are stored internally as UTF-16(without BOM/
* CPU byte order)
*
@@ -86,8 +86,8 @@ namespace TagLib {
public:
#ifndef DO_NOT_DOCUMENT
typedef TagLib::wstring::iterator Iterator;
typedef TagLib::wstring::const_iterator ConstIterator;
typedef Strawberry_TagLib::TagLib::wstring::iterator Iterator;
typedef Strawberry_TagLib::TagLib::wstring::const_iterator ConstIterator;
#endif
/**
@@ -549,32 +549,32 @@ namespace TagLib {
}
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2);
TAGLIB_EXPORT const Strawberry_TagLib::TagLib::String operator+(const Strawberry_TagLib::TagLib::String &s1, const Strawberry_TagLib::TagLib::String &s2);
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const char *s1, const TagLib::String &s2);
TAGLIB_EXPORT const Strawberry_TagLib::TagLib::String operator+(const char *s1, const Strawberry_TagLib::TagLib::String &s2);
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const char *s2);
TAGLIB_EXPORT const Strawberry_TagLib::TagLib::String operator+(const Strawberry_TagLib::TagLib::String &s1, const char *s2);
/*!
* \relates TagLib::String
* \relates Strawberry_TagLib::TagLib::String
*
* Send the string to an output stream.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::String &str);
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const Strawberry_TagLib::TagLib::String &str);
#endif

View File

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

View File

@@ -33,7 +33,7 @@
#include <iostream>
namespace TagLib {
namespace Strawberry_TagLib::TagLib {
//! A list of strings
@@ -107,9 +107,9 @@ namespace TagLib {
}
/*!
* \related TagLib::StringList
* \related Strawberry_TagLib::TagLib::StringList
* Send the StringList to an output stream.
*/
std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);
std::ostream &operator<<(std::ostream &s, const Strawberry_TagLib::TagLib::StringList &l);
#endif

View File

@@ -49,7 +49,7 @@
#include <cstdarg>
#include <cstring>
namespace TagLib
namespace Strawberry_TagLib::TagLib
{
namespace Utils
{

View File

@@ -35,7 +35,7 @@
#include "tzlib.h"
using namespace TagLib;
using namespace Strawberry_TagLib::TagLib;
bool zlib::isAvailable()
{

View File

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