aboutsummaryrefslogtreecommitdiffstats
path: root/taglib
diff options
context:
space:
mode:
Diffstat (limited to 'taglib')
-rw-r--r--taglib/ape/apeproperties.h4
-rw-r--r--taglib/asf/asfproperties.h2
-rw-r--r--taglib/asf/asftag.h1
-rw-r--r--taglib/dsdiff/dsdiffdiintag.cpp4
-rw-r--r--taglib/dsdiff/dsdifffile.cpp10
-rw-r--r--taglib/flac/flacfile.h6
-rw-r--r--taglib/flac/flacproperties.h4
-rw-r--r--taglib/mp4/mp4properties.h2
-rw-r--r--taglib/mp4/mp4tag.h4
-rw-r--r--taglib/mpc/mpcfile.h2
-rw-r--r--taglib/mpc/mpcproperties.h2
-rw-r--r--taglib/mpeg/id3v2/frames/chapterframe.cpp2
-rw-r--r--taglib/mpeg/id3v2/frames/relativevolumeframe.h4
-rw-r--r--taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp2
-rw-r--r--taglib/mpeg/id3v2/id3v2frame.h13
-rw-r--r--taglib/mpeg/id3v2/id3v2framefactory.cpp7
-rw-r--r--taglib/mpeg/id3v2/id3v2framefactory.h11
-rw-r--r--taglib/mpeg/id3v2/id3v2tag.h4
-rw-r--r--taglib/mpeg/mpegfile.cpp2
-rw-r--r--taglib/mpeg/mpegfile.h8
-rw-r--r--taglib/mpeg/mpegheader.h2
-rw-r--r--taglib/mpeg/mpegproperties.h2
-rw-r--r--taglib/mpeg/xingheader.h4
-rw-r--r--taglib/ogg/oggpage.h2
-rw-r--r--taglib/ogg/opus/opusproperties.h2
-rw-r--r--taglib/ogg/speex/speexproperties.h2
-rw-r--r--taglib/ogg/vorbis/vorbisproperties.h2
-rw-r--r--taglib/ogg/xiphcomment.h2
-rw-r--r--taglib/riff/aiff/aiffproperties.h6
-rw-r--r--taglib/riff/wav/wavproperties.h8
-rw-r--r--taglib/toolkit/taglib.h8
-rw-r--r--taglib/toolkit/tbytevector.h4
-rw-r--r--taglib/toolkit/tfile.h4
-rw-r--r--taglib/toolkit/tstring.h6
-rw-r--r--taglib/trueaudio/trueaudiofile.h2
-rw-r--r--taglib/trueaudio/trueaudioproperties.h2
-rw-r--r--taglib/wavpack/wavpackproperties.h6
37 files changed, 90 insertions, 68 deletions
diff --git a/taglib/ape/apeproperties.h b/taglib/ape/apeproperties.h
index 91625483..ebbf949b 100644
--- a/taglib/ape/apeproperties.h
+++ b/taglib/ape/apeproperties.h
@@ -55,7 +55,7 @@ namespace TagLib {
*
* \deprecated
*/
- Properties(File *file, ReadStyle style = Average);
+ TAGLIB_DEPRECATED Properties(File *file, ReadStyle style = Average);
/*!
* Create an instance of APE::Properties with the data read from the
@@ -76,7 +76,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/asf/asfproperties.h b/taglib/asf/asfproperties.h
index b89349b3..317bf104 100644
--- a/taglib/asf/asfproperties.h
+++ b/taglib/asf/asfproperties.h
@@ -88,7 +88,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/asf/asftag.h b/taglib/asf/asftag.h
index 049b9f66..bbd98212 100644
--- a/taglib/asf/asftag.h
+++ b/taglib/asf/asftag.h
@@ -160,6 +160,7 @@ namespace TagLib {
* Returns a reference to the item list map. This is an AttributeListMap of
* all of the items in the tag.
*/
+ // BIC: return by value
const AttributeListMap &attributeListMap() const;
/*!
diff --git a/taglib/dsdiff/dsdiffdiintag.cpp b/taglib/dsdiff/dsdiffdiintag.cpp
index c027410a..a897ab20 100644
--- a/taglib/dsdiff/dsdiffdiintag.cpp
+++ b/taglib/dsdiff/dsdiffdiintag.cpp
@@ -88,7 +88,7 @@ unsigned int DSDIFF::DIIN::Tag::track() const
void DSDIFF::DIIN::Tag::setTitle(const String &title)
{
- if(title.isNull() || title.isEmpty())
+ if(title.isEmpty())
d->title = String();
else
d->title = title;
@@ -96,7 +96,7 @@ void DSDIFF::DIIN::Tag::setTitle(const String &title)
void DSDIFF::DIIN::Tag::setArtist(const String &artist)
{
- if(artist.isNull() || artist.isEmpty())
+ if(artist.isEmpty())
d->artist = String();
else
d->artist = artist;
diff --git a/taglib/dsdiff/dsdifffile.cpp b/taglib/dsdiff/dsdifffile.cpp
index 73b2dbb2..ac867b2b 100644
--- a/taglib/dsdiff/dsdifffile.cpp
+++ b/taglib/dsdiff/dsdifffile.cpp
@@ -230,7 +230,7 @@ bool DSDIFF::File::save()
if(d->hasDiin) {
DSDIFF::DIIN::Tag *diinTag = d->tag.access<DSDIFF::DIIN::Tag>(DIINIndex, false);
- if(!diinTag->title().isNull() && !diinTag->title().isEmpty()) {
+ if(!diinTag->title().isEmpty()) {
ByteVector diinTitle;
diinTitle.append(ByteVector::fromUInt(diinTag->title().size(), d->endianness == BigEndian));
diinTitle.append(ByteVector::fromCString(diinTag->title().toCString()));
@@ -239,7 +239,7 @@ bool DSDIFF::File::save()
else
setChildChunkData("DITI", ByteVector(), DIINChunk);
- if(!diinTag->artist().isNull() && !diinTag->artist().isEmpty()) {
+ if(!diinTag->artist().isEmpty()) {
ByteVector diinArtist;
diinArtist.append(ByteVector::fromUInt(diinTag->artist().size(), d->endianness == BigEndian));
diinArtist.append(ByteVector::fromCString(diinTag->artist().toCString()));
@@ -264,7 +264,7 @@ bool DSDIFF::File::save()
void DSDIFF::File::setRootChunkData(unsigned int i, const ByteVector &data)
{
- if(data.isNull() || data.isEmpty()) {
+ if(data.isEmpty()) {
// Null data: remove chunk
// Update global size
unsigned long long removedChunkTotalSize = d->chunks[i].size + d->chunks[i].padding + 12;
@@ -344,7 +344,7 @@ void DSDIFF::File::setChildChunkData(unsigned int i,
{
std::vector<Chunk64> &childChunks = d->childChunks[childChunkNum];
- if(data.isNull() || data.isEmpty()) {
+ if(data.isEmpty()) {
// Null data: remove chunk
// Update global size
unsigned long long removedChunkTotalSize = childChunks[i].size + childChunks[i].padding + 12;
@@ -426,7 +426,7 @@ void DSDIFF::File::setChildChunkData(const ByteVector &name,
}
// Do not attempt to remove a non existing chunk
- if(data.isNull() || data.isEmpty())
+ if(data.isEmpty())
return;
// Couldn't find an existing chunk, so let's create a new one.
diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h
index 645090e0..1b8654eb 100644
--- a/taglib/flac/flacfile.h
+++ b/taglib/flac/flacfile.h
@@ -240,7 +240,7 @@ namespace TagLib {
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
*/
- void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
+ TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
/*!
* Returns the block of data used by FLAC::Properties for parsing the
@@ -248,7 +248,7 @@ namespace TagLib {
*
* \deprecated Always returns an empty vector.
*/
- ByteVector streamInfoData(); // BIC: remove
+ TAGLIB_DEPRECATED ByteVector streamInfoData(); // BIC: remove
/*!
* Returns the length of the audio-stream, used by FLAC::Properties for
@@ -256,7 +256,7 @@ namespace TagLib {
*
* \deprecated Always returns zero.
*/
- long streamLength(); // BIC: remove
+ TAGLIB_DEPRECATED long streamLength(); // BIC: remove
/*!
* Returns a list of pictures attached to the FLAC file.
diff --git a/taglib/flac/flacproperties.h b/taglib/flac/flacproperties.h
index 6f13ce62..743e5872 100644
--- a/taglib/flac/flacproperties.h
+++ b/taglib/flac/flacproperties.h
@@ -72,7 +72,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
@@ -120,7 +120,7 @@ namespace TagLib {
*
* \deprecated
*/
- int sampleWidth() const;
+ TAGLIB_DEPRECATED int sampleWidth() const;
/*!
* Return the number of sample frames.
diff --git a/taglib/mp4/mp4properties.h b/taglib/mp4/mp4properties.h
index 410d5348..492a48cc 100644
--- a/taglib/mp4/mp4properties.h
+++ b/taglib/mp4/mp4properties.h
@@ -57,7 +57,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/mp4/mp4tag.h b/taglib/mp4/mp4tag.h
index d477a86e..e5b70af3 100644
--- a/taglib/mp4/mp4tag.h
+++ b/taglib/mp4/mp4tag.h
@@ -42,7 +42,7 @@ namespace TagLib {
/*!
* \deprecated
*/
- typedef TagLib::Map<String, Item> ItemListMap;
+ TAGLIB_DEPRECATED typedef TagLib::Map<String, Item> ItemListMap;
typedef TagLib::Map<String, Item> ItemMap;
class TAGLIB_EXPORT Tag: public TagLib::Tag
@@ -74,7 +74,7 @@ namespace TagLib {
/*!
* \deprecated Use the item() and setItem() API instead
*/
- ItemMap &itemListMap();
+ TAGLIB_DEPRECATED ItemMap &itemListMap();
/*!
* Returns a string-keyed map of the MP4::Items for this tag.
diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h
index 89a866e3..eb3ec54a 100644
--- a/taglib/mpc/mpcfile.h
+++ b/taglib/mpc/mpcfile.h
@@ -198,7 +198,7 @@ namespace TagLib {
* \deprecated
* \see strip
*/
- void remove(int tags = AllTags);
+ TAGLIB_DEPRECATED void remove(int tags = AllTags);
/*!
* Returns whether or not the file on disk actually has an ID3v1 tag.
diff --git a/taglib/mpc/mpcproperties.h b/taglib/mpc/mpcproperties.h
index d5fdfbb9..9a902dc9 100644
--- a/taglib/mpc/mpcproperties.h
+++ b/taglib/mpc/mpcproperties.h
@@ -74,7 +74,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/mpeg/id3v2/frames/chapterframe.cpp b/taglib/mpeg/id3v2/frames/chapterframe.cpp
index 69fe1df0..049f947d 100644
--- a/taglib/mpeg/id3v2/frames/chapterframe.cpp
+++ b/taglib/mpeg/id3v2/frames/chapterframe.cpp
@@ -267,7 +267,7 @@ void ChapterFrame::parseFields(const ByteVector &data)
return;
while(embPos < size - header()->size()) {
- Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), (d->tagHeader != 0));
+ Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), d->tagHeader);
if(!frame)
return;
diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/taglib/mpeg/id3v2/frames/relativevolumeframe.h
index 695e26f5..de01254c 100644
--- a/taglib/mpeg/id3v2/frames/relativevolumeframe.h
+++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.h
@@ -131,12 +131,12 @@ namespace TagLib {
/*!
* \deprecated Always returns master volume.
*/
- ChannelType channelType() const;
+ TAGLIB_DEPRECATED ChannelType channelType() const;
/*!
* \deprecated This method no longer has any effect.
*/
- void setChannelType(ChannelType t);
+ TAGLIB_DEPRECATED void setChannelType(ChannelType t);
/*
* There was a terrible API goof here, and while this can't be changed to
diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp
index 9bd63fbe..937cb4d2 100644
--- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp
+++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp
@@ -304,7 +304,7 @@ void TableOfContentsFrame::parseFields(const ByteVector &data)
return;
while(embPos < size - header()->size()) {
- Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), (d->tagHeader != 0));
+ Frame *frame = FrameFactory::instance()->createFrame(data.mid(pos + embPos), d->tagHeader);
if(!frame)
return;
diff --git a/taglib/mpeg/id3v2/id3v2frame.h b/taglib/mpeg/id3v2/id3v2frame.h
index ad2056da..ac531f36 100644
--- a/taglib/mpeg/id3v2/id3v2frame.h
+++ b/taglib/mpeg/id3v2/id3v2frame.h
@@ -89,14 +89,15 @@ namespace TagLib {
* non-binary compatible release this will be made into a non-static
* member that checks the internal ID3v2 version.
*/
- static unsigned int headerSize(); // BIC: remove and make non-static
+ static unsigned int headerSize(); // BIC: make non-static
/*!
* Returns the size of the frame header for the given ID3v2 version.
*
* \deprecated Please see the explanation above.
*/
- static unsigned int headerSize(unsigned int version); // BIC: remove and make non-static
+ // BIC: remove
+ static unsigned int headerSize(unsigned int version);
/*!
* Sets the data that will be used as the frame. Since the length is not
@@ -334,7 +335,7 @@ namespace TagLib {
* \deprecated Please use the constructor below that accepts a version
* number.
*/
- Header(const ByteVector &data, bool synchSafeInts);
+ TAGLIB_DEPRECATED Header(const ByteVector &data, bool synchSafeInts);
/*!
* Construct a Frame Header based on \a data. \a data must at least
@@ -356,7 +357,7 @@ namespace TagLib {
* \deprecated Please use the version below that accepts an ID3v2 version
* number.
*/
- void setData(const ByteVector &data, bool synchSafeInts);
+ TAGLIB_DEPRECATED void setData(const ByteVector &data, bool synchSafeInts);
/*!
* Sets the data for the Header. \a version should indicate the ID3v2
@@ -411,6 +412,7 @@ namespace TagLib {
* removed in the next binary incompatible release (2.0) and will be
* replaced with a non-static method that checks the frame version.
*/
+ // BIC: make non-static
static unsigned int size();
/*!
@@ -419,6 +421,7 @@ namespace TagLib {
*
* \deprecated Please see the explanation in the version above.
*/
+ // BIC: remove
static unsigned int size(unsigned int version);
/*!
@@ -502,7 +505,7 @@ namespace TagLib {
/*!
* \deprecated
*/
- bool frameAlterPreservation() const;
+ TAGLIB_DEPRECATED bool frameAlterPreservation() const;
private:
Header(const Header &);
diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp
index 155d0a9d..be07754a 100644
--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp
+++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp
@@ -127,6 +127,11 @@ Frame *FrameFactory::createFrame(const ByteVector &data, unsigned int version) c
Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader) const
{
+ return createFrame(origData, const_cast<const Header *>(tagHeader));
+}
+
+Frame *FrameFactory::createFrame(const ByteVector &origData, const Header *tagHeader) const
+{
ByteVector data = origData;
unsigned int version = tagHeader->majorVersion();
Frame::Header *header = new Frame::Header(data, version);
@@ -164,7 +169,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader)
if(version > 3 && (tagHeader->unsynchronisation() || header->unsynchronisation())) {
// Data lengths are not part of the encoded data, but since they are synch-safe
// integers they will be never actually encoded.
- ByteVector frameData = data.mid(Frame::Header::size(version), header->frameSize());
+ ByteVector frameData = data.mid(header->size(), header->frameSize());
frameData = SynchData::decode(frameData);
data = data.mid(0, Frame::Header::size(version)) + frameData;
}
diff --git a/taglib/mpeg/id3v2/id3v2framefactory.h b/taglib/mpeg/id3v2/id3v2framefactory.h
index 33c7f67e..e8ff6062 100644
--- a/taglib/mpeg/id3v2/id3v2framefactory.h
+++ b/taglib/mpeg/id3v2/id3v2framefactory.h
@@ -74,7 +74,7 @@ namespace TagLib {
* \deprecated Please use the method below that accepts a ID3v2::Header
* instance in new code.
*/
- Frame *createFrame(const ByteVector &data, bool synchSafeInts) const;
+ TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, bool synchSafeInts) const;
/*!
* Create a frame based on \a data. \a version should indicate the ID3v2
@@ -84,14 +84,19 @@ namespace TagLib {
* \deprecated Please use the method below that accepts a ID3v2::Header
* instance in new code.
*/
- Frame *createFrame(const ByteVector &data, unsigned int version = 4) const;
+ TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, unsigned int version = 4) const;
/*!
+ * \deprecated
+ */
+ // BIC: remove
+ Frame *createFrame(const ByteVector &data, Header *tagHeader) const;
+ /*!
* Create a frame based on \a data. \a tagHeader should be a valid
* ID3v2::Header instance.
*/
// BIC: make virtual
- Frame *createFrame(const ByteVector &data, Header *tagHeader) const;
+ Frame *createFrame(const ByteVector &data, const Header *tagHeader) const;
/*!
* After a tag has been read, this tries to rebuild some of them
diff --git a/taglib/mpeg/id3v2/id3v2tag.h b/taglib/mpeg/id3v2/id3v2tag.h
index 96b6fb4a..7709b839 100644
--- a/taglib/mpeg/id3v2/id3v2tag.h
+++ b/taglib/mpeg/id3v2/id3v2tag.h
@@ -193,7 +193,7 @@ namespace TagLib {
* prone to change my mind, so this gets to stay around until near a
* release.
*/
- Footer *footer() const;
+ TAGLIB_DEPRECATED Footer *footer() const;
/*!
* Returns a reference to the frame list map. This is an FrameListMap of
@@ -340,7 +340,7 @@ namespace TagLib {
/*!
* \deprecated
*/
- ByteVector render(int version) const;
+ TAGLIB_DEPRECATED ByteVector render(int version) const;
/*!
* Render the tag back to binary data, suitable to be written to disk.
diff --git a/taglib/mpeg/mpegfile.cpp b/taglib/mpeg/mpegfile.cpp
index ddfe7f9e..472cbdad 100644
--- a/taglib/mpeg/mpegfile.cpp
+++ b/taglib/mpeg/mpegfile.cpp
@@ -200,7 +200,7 @@ bool MPEG::File::save()
bool MPEG::File::save(int tags)
{
- return save(tags, true);
+ return save(tags, StripOthers);
}
bool MPEG::File::save(int tags, bool stripOthers)
diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h
index 40beefc0..3fcb7272 100644
--- a/taglib/mpeg/mpegfile.h
+++ b/taglib/mpeg/mpegfile.h
@@ -196,19 +196,19 @@ namespace TagLib {
* \deprecated
*/
// BIC: combine with the above method
- bool save(int tags, bool stripOthers);
+ TAGLIB_DEPRECATED bool save(int tags, bool stripOthers);
/*!
* \deprecated
*/
// BIC: combine with the above method
- bool save(int tags, bool stripOthers, int id3v2Version);
+ TAGLIB_DEPRECATED bool save(int tags, bool stripOthers, int id3v2Version);
/*!
* \deprecated
*/
// BIC: combine with the above method
- bool save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags);
+ TAGLIB_DEPRECATED bool save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags);
/*!
* Save the file. This will attempt to save all of the tag types that are
@@ -317,7 +317,7 @@ namespace TagLib {
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
*/
- void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
+ TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
/*!
* Returns the position in the file of the first MPEG frame.
diff --git a/taglib/mpeg/mpegheader.h b/taglib/mpeg/mpegheader.h
index 024aa112..ca51184c 100644
--- a/taglib/mpeg/mpegheader.h
+++ b/taglib/mpeg/mpegheader.h
@@ -52,7 +52,7 @@ namespace TagLib {
*
* \deprecated
*/
- Header(const ByteVector &data);
+ TAGLIB_DEPRECATED Header(const ByteVector &data);
/*!
* Parses an MPEG header based on \a file and \a offset.
diff --git a/taglib/mpeg/mpegproperties.h b/taglib/mpeg/mpegproperties.h
index f11fad11..a1a1af4a 100644
--- a/taglib/mpeg/mpegproperties.h
+++ b/taglib/mpeg/mpegproperties.h
@@ -67,7 +67,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/mpeg/xingheader.h b/taglib/mpeg/xingheader.h
index f512e234..ce756190 100644
--- a/taglib/mpeg/xingheader.h
+++ b/taglib/mpeg/xingheader.h
@@ -111,8 +111,8 @@ namespace TagLib {
*
* \deprecated Always returns 0.
*/
- static int xingHeaderOffset(TagLib::MPEG::Header::Version v,
- TagLib::MPEG::Header::ChannelMode c);
+ TAGLIB_DEPRECATED static int xingHeaderOffset(TagLib::MPEG::Header::Version v,
+ TagLib::MPEG::Header::ChannelMode c);
private:
XingHeader(const XingHeader &);
diff --git a/taglib/ogg/oggpage.h b/taglib/ogg/oggpage.h
index 13e3e7f9..af3fe2c9 100644
--- a/taglib/ogg/oggpage.h
+++ b/taglib/ogg/oggpage.h
@@ -93,7 +93,7 @@ namespace TagLib {
*
* \deprecated Always returns null.
*/
- Page* getCopyWithNewPageSequenceNumber(int sequenceNumber);
+ TAGLIB_DEPRECATED Page *getCopyWithNewPageSequenceNumber(int sequenceNumber);
/*!
* Returns the index of the first packet wholly or partially contained in
diff --git a/taglib/ogg/opus/opusproperties.h b/taglib/ogg/opus/opusproperties.h
index be88b146..2e44dea5 100644
--- a/taglib/ogg/opus/opusproperties.h
+++ b/taglib/ogg/opus/opusproperties.h
@@ -69,7 +69,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/ogg/speex/speexproperties.h b/taglib/ogg/speex/speexproperties.h
index 64e6fac3..3f5a20f3 100644
--- a/taglib/ogg/speex/speexproperties.h
+++ b/taglib/ogg/speex/speexproperties.h
@@ -69,7 +69,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/ogg/vorbis/vorbisproperties.h b/taglib/ogg/vorbis/vorbisproperties.h
index 9da0ac9d..472e0390 100644
--- a/taglib/ogg/vorbis/vorbisproperties.h
+++ b/taglib/ogg/vorbis/vorbisproperties.h
@@ -75,7 +75,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/ogg/xiphcomment.h b/taglib/ogg/xiphcomment.h
index 14fc5407..674d6169 100644
--- a/taglib/ogg/xiphcomment.h
+++ b/taglib/ogg/xiphcomment.h
@@ -186,7 +186,7 @@ namespace TagLib {
* \deprecated Using this method may lead to a linkage error.
*/
// BIC: remove and merge with below
- void removeField(const String &key, const String &value = String::null);
+ TAGLIB_DEPRECATED void removeField(const String &key, const String &value = String());
/*!
* Remove all the fields specified by \a key.
diff --git a/taglib/riff/aiff/aiffproperties.h b/taglib/riff/aiff/aiffproperties.h
index d8bbaca9..dbb4c214 100644
--- a/taglib/riff/aiff/aiffproperties.h
+++ b/taglib/riff/aiff/aiffproperties.h
@@ -52,7 +52,7 @@ namespace TagLib {
*
* \deprecated
*/
- Properties(const ByteVector &data, ReadStyle style);
+ TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style);
/*!
* Create an instance of AIFF::Properties with the data read from the
@@ -73,7 +73,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
@@ -119,7 +119,7 @@ namespace TagLib {
*
* \deprecated
*/
- int sampleWidth() const;
+ TAGLIB_DEPRECATED int sampleWidth() const;
/*!
* Returns the number of sample frames
diff --git a/taglib/riff/wav/wavproperties.h b/taglib/riff/wav/wavproperties.h
index 6716876a..1ca73100 100644
--- a/taglib/riff/wav/wavproperties.h
+++ b/taglib/riff/wav/wavproperties.h
@@ -55,7 +55,7 @@ namespace TagLib {
*
* \deprecated
*/
- Properties(const ByteVector &data, ReadStyle style);
+ TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style);
/*!
* Create an instance of WAV::Properties with the data read from the
@@ -63,7 +63,7 @@ namespace TagLib {
*
* \deprecated
*/
- Properties(const ByteVector &data, unsigned int streamLength, ReadStyle style);
+ TAGLIB_DEPRECATED Properties(const ByteVector &data, unsigned int streamLength, ReadStyle style);
/*!
* Create an instance of WAV::Properties with the data read from the
@@ -84,7 +84,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
@@ -130,7 +130,7 @@ namespace TagLib {
*
* \deprecated
*/
- int sampleWidth() const;
+ TAGLIB_DEPRECATED int sampleWidth() const;
/*!
* Returns the number of sample frames.
diff --git a/taglib/toolkit/taglib.h b/taglib/toolkit/taglib.h
index 6b029974..450d8a32 100644
--- a/taglib/toolkit/taglib.h
+++ b/taglib/toolkit/taglib.h
@@ -44,6 +44,14 @@
#define TAGLIB_CONSTRUCT_BITSET(x) static_cast<unsigned long>(x)
#endif
+#if __cplusplus >= 201402
+#define TAGLIB_DEPRECATED [[deprecated]]
+#elif defined(__GNUC__) || defined(__clang__)
+#define TAGLIB_DEPRECATED __attribute__((deprecated))
+#elif defined(_MSC_VER)
+#define TAGLIB_DEPRECATED __declspec(deprecated)
+#endif
+
#include <string>
//! A namespace for all TagLib related classes and functions
diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h
index e1549bb9..41373c72 100644
--- a/taglib/toolkit/tbytevector.h
+++ b/taglib/toolkit/tbytevector.h
@@ -281,7 +281,7 @@ namespace TagLib {
* \deprecated
*/
// BIC: remove
- bool isNull() const;
+ TAGLIB_DEPRECATED bool isNull() const;
/*!
* Returns true if the ByteVector is empty.
@@ -595,7 +595,7 @@ namespace TagLib {
* \deprecated
*/
// BIC: remove
- static ByteVector null;
+ TAGLIB_DEPRECATED static ByteVector null;
/*!
* Returns a hex-encoded copy of the byte vector.
diff --git a/taglib/toolkit/tfile.h b/taglib/toolkit/tfile.h
index c9a9d37e..3b6ff621 100644
--- a/taglib/toolkit/tfile.h
+++ b/taglib/toolkit/tfile.h
@@ -264,14 +264,14 @@ namespace TagLib {
*
* \deprecated
*/
- static bool isReadable(const char *file);
+ TAGLIB_DEPRECATED static bool isReadable(const char *file);
/*!
* Returns true if \a file can be opened for writing.
*
* \deprecated
*/
- static bool isWritable(const char *name);
+ TAGLIB_DEPRECATED static bool isWritable(const char *name);
protected:
/*!
diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h
index b1be04b8..7028aab2 100644
--- a/taglib/toolkit/tstring.h
+++ b/taglib/toolkit/tstring.h
@@ -340,7 +340,7 @@ namespace TagLib {
* \deprecated
*/
// BIC: remove
- bool isNull() const;
+ TAGLIB_DEPRECATED bool isNull() const;
/*!
* Returns a ByteVector containing the string's data. If \a t is Latin1 or
@@ -525,7 +525,7 @@ namespace TagLib {
* \deprecated
*/
// BIC: remove
- static String null;
+ TAGLIB_DEPRECATED static String null;
protected:
/*!
@@ -541,7 +541,7 @@ namespace TagLib {
* may lead to a linkage error.
*/
// BIC: remove
- static const Type WCharByteOrder;
+ TAGLIB_DEPRECATED static const Type WCharByteOrder;
class StringPrivate;
StringPrivate *d;
diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h
index 3737ac63..1f664d25 100644
--- a/taglib/trueaudio/trueaudiofile.h
+++ b/taglib/trueaudio/trueaudiofile.h
@@ -166,7 +166,7 @@ namespace TagLib {
* \see ID3v2FrameFactory
* \deprecated This value should be passed in via the constructor
*/
- void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
+ TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
/*!
* Saves the file.
diff --git a/taglib/trueaudio/trueaudioproperties.h b/taglib/trueaudio/trueaudioproperties.h
index 8dfcf375..d25c7a77 100644
--- a/taglib/trueaudio/trueaudioproperties.h
+++ b/taglib/trueaudio/trueaudioproperties.h
@@ -69,7 +69,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to
diff --git a/taglib/wavpack/wavpackproperties.h b/taglib/wavpack/wavpackproperties.h
index 0f5d1dcb..e6acdcc3 100644
--- a/taglib/wavpack/wavpackproperties.h
+++ b/taglib/wavpack/wavpackproperties.h
@@ -58,12 +58,12 @@ namespace TagLib {
* \deprecated This constructor will be dropped in favor of the one below
* in a future version.
*/
- Properties(const ByteVector &data, long streamLength, ReadStyle style = Average);
+ TAGLIB_DEPRECATED Properties(const ByteVector &data, long streamLength,
+ ReadStyle style = Average);
/*!
* Create an instance of WavPack::Properties.
*/
- // BIC: merge with the above constructor
Properties(File *file, long streamLength, ReadStyle style = Average);
/*!
@@ -79,7 +79,7 @@ namespace TagLib {
*
* \deprecated
*/
- virtual int length() const;
+ TAGLIB_DEPRECATED virtual int length() const;
/*!
* Returns the length of the file in seconds. The length is rounded down to