diff --git a/3rdparty/utf8-cpp/checked.h b/3rdparty/utf8-cpp/checked.h index 2aef5838..1706f854 100644 --- a/3rdparty/utf8-cpp/checked.h +++ b/3rdparty/utf8-cpp/checked.h @@ -265,11 +265,16 @@ namespace utf8 // The iterator class template - class iterator : public std::iterator { + class iterator { octet_iterator it; octet_iterator range_start; octet_iterator range_end; - public: + public: + using iterator_category = std::bidirectional_iterator_tag; + using value_type = uint32_t; + using difference_type = ptrdiff_t; + using pointer = uint32_t*; + using reference = uint32_t&; iterator () {} explicit iterator (const octet_iterator& octet_it, const octet_iterator& rangestart, @@ -323,5 +328,3 @@ namespace utf8 } // namespace utf8 #endif //header guard - - diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index da037589..612ca5b0 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -270,7 +270,7 @@ void taglib_tag_free_strings() int taglib_audioproperties_length(const TagLib_AudioProperties *audioProperties) { const AudioProperties *p = reinterpret_cast(audioProperties); - return p->length(); + return p->lengthInSeconds(); } int taglib_audioproperties_bitrate(const TagLib_AudioProperties *audioProperties) diff --git a/examples/tagreader.cpp b/examples/tagreader.cpp index ac81be62..62524d3e 100644 --- a/examples/tagreader.cpp +++ b/examples/tagreader.cpp @@ -75,8 +75,8 @@ int main(int argc, char *argv[]) TagLib::AudioProperties *properties = f.audioProperties(); - int seconds = properties->length() % 60; - int minutes = (properties->length() - seconds) / 60; + int seconds = properties->lengthInSeconds() % 60; + int minutes = (properties->lengthInSeconds() - seconds) / 60; cout << "-- AUDIO --" << endl; cout << "bitrate - " << properties->bitrate() << endl; diff --git a/taglib/ape/apeproperties.cpp b/taglib/ape/apeproperties.cpp index fe724c30..f9e16a71 100644 --- a/taglib/ape/apeproperties.cpp +++ b/taglib/ape/apeproperties.cpp @@ -63,13 +63,6 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -APE::Properties::Properties(File *, ReadStyle style) : - AudioProperties(style), - d(new PropertiesPrivate()) -{ - debug("APE::Properties::Properties() -- This constructor is no longer used."); -} - APE::Properties::Properties(File *file, offset_t streamLength, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) @@ -82,11 +75,6 @@ APE::Properties::~Properties() delete d; } -int APE::Properties::length() const -{ - return lengthInSeconds(); -} - int APE::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/ape/apeproperties.h b/taglib/ape/apeproperties.h index f30dbdaf..230b10d6 100644 --- a/taglib/ape/apeproperties.h +++ b/taglib/ape/apeproperties.h @@ -50,14 +50,6 @@ namespace TagLib { class TAGLIB_EXPORT Properties : public AudioProperties { public: - /*! - * Create an instance of APE::Properties with the data read from the - * APE::File \a file. - * - * \deprecated Use Properties(File *, long, ReadStyle). - */ - TAGLIB_DEPRECATED Properties(File *file, ReadStyle style = Average); - /*! * Create an instance of APE::Properties with the data read from the * APE::File \a file. @@ -69,16 +61,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/asf/asfproperties.cpp b/taglib/asf/asfproperties.cpp index a836da30..11eab17e 100644 --- a/taglib/asf/asfproperties.cpp +++ b/taglib/asf/asfproperties.cpp @@ -67,11 +67,6 @@ ASF::Properties::~Properties() delete d; } -int ASF::Properties::length() const -{ - return lengthInSeconds(); -} - int ASF::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/asf/asfproperties.h b/taglib/asf/asfproperties.h index d17b11d7..9cc5c609 100644 --- a/taglib/asf/asfproperties.h +++ b/taglib/asf/asfproperties.h @@ -78,16 +78,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/audioproperties.cpp b/taglib/audioproperties.cpp index 421785e9..70a876ae 100644 --- a/taglib/audioproperties.cpp +++ b/taglib/audioproperties.cpp @@ -23,58 +23,10 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include - -#include "aiffproperties.h" -#include "apeproperties.h" -#include "asfproperties.h" -#include "flacproperties.h" -#include "mp4properties.h" -#include "mpcproperties.h" -#include "mpegproperties.h" -#include "opusproperties.h" -#include "speexproperties.h" -#include "trueaudioproperties.h" -#include "vorbisproperties.h" -#include "wavproperties.h" -#include "wavpackproperties.h" - #include "audioproperties.h" using namespace TagLib; -// This macro is a workaround for the fact that we can't add virtual functions. -// Should be true virtual functions in taglib2. - -#define VIRTUAL_FUNCTION_WORKAROUND(function_name, default_value) \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - if(dynamic_cast(this)) \ - return dynamic_cast(this)->function_name(); \ - return (default_value); - class AudioProperties::AudioPropertiesPrivate { @@ -89,16 +41,6 @@ AudioProperties::~AudioProperties() } -int AudioProperties::lengthInSeconds() const -{ - VIRTUAL_FUNCTION_WORKAROUND(lengthInSeconds, 0) -} - -int AudioProperties::lengthInMilliseconds() const -{ - VIRTUAL_FUNCTION_WORKAROUND(lengthInMilliseconds, 0) -} - //////////////////////////////////////////////////////////////////////////////// // protected methods //////////////////////////////////////////////////////////////////////////////// diff --git a/taglib/audioproperties.h b/taglib/audioproperties.h index 9ef8210e..f23ae542 100644 --- a/taglib/audioproperties.h +++ b/taglib/audioproperties.h @@ -64,27 +64,20 @@ namespace TagLib { */ virtual ~AudioProperties(); - /*! - * Returns the length of the file in seconds. - */ - virtual int length() const = 0; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const = 0; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const = 0; /*! * Returns the most appropriate bit rate for the file in kb/s. For constant diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index 81c418e6..b2599227 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -330,23 +330,6 @@ Ogg::XiphComment *FLAC::File::xiphComment(bool create) return d->tag.access(FlacXiphIndex, create); } -void FLAC::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory) -{ - d->ID3v2FrameFactory = factory; -} - -ByteVector FLAC::File::streamInfoData() -{ - debug("FLAC::File::streamInfoData() -- This function is obsolete. Returning an empty ByteVector."); - return ByteVector(); -} - -offset_t FLAC::File::streamLength() -{ - debug("FLAC::File::streamLength() -- This function is obsolete. Returning zero."); - return 0; -} - List FLAC::File::pictureList() { List pictures; diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index 05803767..a667a01c 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -232,32 +232,6 @@ namespace TagLib { */ Ogg::XiphComment *xiphComment(bool create = false); - /*! - * Set the ID3v2::FrameFactory to something other than the default. This - * can be used to specify the way that ID3v2 frames will be interpreted - * when - * - * \see ID3v2FrameFactory - * \deprecated This value should be passed in via the constructor. - */ - TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory); - - /*! - * Returns the block of data used by FLAC::Properties for parsing the - * stream properties. - * - * \deprecated Always returns an empty vector. - */ - TAGLIB_DEPRECATED ByteVector streamInfoData(); // BIC: remove - - /*! - * Returns the length of the audio-stream, used by FLAC::Properties for - * calculating the bitrate. - * - * \deprecated Always returns zero. - */ - TAGLIB_DEPRECATED offset_t streamLength(); // BIC: remove - /*! * Returns a list of pictures attached to the FLAC file. */ diff --git a/taglib/flac/flacproperties.cpp b/taglib/flac/flacproperties.cpp index a798940a..c864072e 100644 --- a/taglib/flac/flacproperties.cpp +++ b/taglib/flac/flacproperties.cpp @@ -74,11 +74,6 @@ FLAC::Properties::~Properties() delete d; } -int FLAC::Properties::length() const -{ - return lengthInSeconds(); -} - int FLAC::Properties::lengthInSeconds() const { return d->length / 1000; @@ -104,11 +99,6 @@ int FLAC::Properties::bitsPerSample() const return d->bitsPerSample; } -int FLAC::Properties::sampleWidth() const -{ - return bitsPerSample(); -} - int FLAC::Properties::channels() const { return d->channels; diff --git a/taglib/flac/flacproperties.h b/taglib/flac/flacproperties.h index aca4fc67..f620184b 100644 --- a/taglib/flac/flacproperties.h +++ b/taglib/flac/flacproperties.h @@ -65,16 +65,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. @@ -113,16 +103,6 @@ namespace TagLib { */ int bitsPerSample() const; - /*! - * Returns the sample width as read from the FLAC identification - * header. - * - * \note This method is just an alias of bitsPerSample(). - * - * \deprecated Use bitsPerSample(). - */ - TAGLIB_DEPRECATED int sampleWidth() const; - /*! * Return the number of sample frames. */ diff --git a/taglib/mp4/mp4properties.cpp b/taglib/mp4/mp4properties.cpp index 860b2875..38814944 100644 --- a/taglib/mp4/mp4properties.cpp +++ b/taglib/mp4/mp4properties.cpp @@ -101,12 +101,6 @@ MP4::Properties::sampleRate() const return d->sampleRate; } -int -MP4::Properties::length() const -{ - return lengthInSeconds(); -} - int MP4::Properties::lengthInSeconds() const { diff --git a/taglib/mp4/mp4properties.h b/taglib/mp4/mp4properties.h index 5ad3f21f..decb3618 100644 --- a/taglib/mp4/mp4properties.h +++ b/taglib/mp4/mp4properties.h @@ -47,16 +47,6 @@ namespace TagLib { Properties(File *file, Atoms *atoms, ReadStyle style = Average); virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index 20c0659b..cff5c701 100644 --- a/taglib/mp4/mp4tag.cpp +++ b/taglib/mp4/mp4tag.cpp @@ -872,11 +872,6 @@ bool MP4::Tag::isEmpty() const return d->items.isEmpty(); } -MP4::ItemMap &MP4::Tag::itemListMap() -{ - return d->items; -} - const MP4::ItemMap &MP4::Tag::itemMap() const { return d->items; diff --git a/taglib/mp4/mp4tag.h b/taglib/mp4/mp4tag.h index 229cffd7..1a43acaf 100644 --- a/taglib/mp4/mp4tag.h +++ b/taglib/mp4/mp4tag.h @@ -37,10 +37,6 @@ namespace TagLib { namespace MP4 { - /*! - * \deprecated Use ItemMap. - */ - TAGLIB_DEPRECATED typedef TagLib::Map ItemListMap; typedef TagLib::Map ItemMap; class TAGLIB_EXPORT Tag: public TagLib::Tag @@ -69,11 +65,6 @@ namespace TagLib { virtual bool isEmpty() const; - /*! - * \deprecated Use the item() and setItem() API instead. - */ - TAGLIB_DEPRECATED ItemMap &itemListMap(); - /*! * Returns a string-keyed map of the MP4::Items for this tag. */ diff --git a/taglib/mpc/mpcfile.cpp b/taglib/mpc/mpcfile.cpp index 7070649b..28b4c11c 100644 --- a/taglib/mpc/mpcfile.cpp +++ b/taglib/mpc/mpcfile.cpp @@ -255,11 +255,6 @@ void MPC::File::strip(int tags) } } -void MPC::File::remove(int tags) -{ - strip(tags); -} - bool MPC::File::hasID3v1Tag() const { return (d->ID3v1Location >= 0); diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h index c9836738..bab0f6c9 100644 --- a/taglib/mpc/mpcfile.h +++ b/taglib/mpc/mpcfile.h @@ -194,12 +194,6 @@ namespace TagLib { */ void strip(int tags = AllTags); - /*! - * \deprecated Use strip(). - * \see strip - */ - 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.cpp b/taglib/mpc/mpcproperties.cpp index 724e5c7d..4ccb5812 100644 --- a/taglib/mpc/mpcproperties.cpp +++ b/taglib/mpc/mpcproperties.cpp @@ -93,11 +93,6 @@ MPC::Properties::~Properties() delete d; } -int MPC::Properties::length() const -{ - return lengthInSeconds(); -} - int MPC::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/mpc/mpcproperties.h b/taglib/mpc/mpcproperties.h index e40c7486..cca2fb5c 100644 --- a/taglib/mpc/mpcproperties.h +++ b/taglib/mpc/mpcproperties.h @@ -67,16 +67,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp b/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp index d9ad177f..9cefdd2c 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp @@ -85,20 +85,6 @@ List RelativeVolumeFrame::channels() const return l; } -// deprecated - -RelativeVolumeFrame::ChannelType RelativeVolumeFrame::channelType() const -{ - return MasterVolume; -} - -// deprecated - -void RelativeVolumeFrame::setChannelType(ChannelType) -{ - -} - short RelativeVolumeFrame::volumeAdjustmentIndex(ChannelType type) const { return d->channels.contains(type) ? d->channels[type].volumeAdjustment : 0; diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/taglib/mpeg/id3v2/frames/relativevolumeframe.h index a3ff9bdd..d797ea9f 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.h +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.h @@ -128,16 +128,6 @@ namespace TagLib { */ List channels() const; - /*! - * \deprecated Always returns master volume. - */ - TAGLIB_DEPRECATED ChannelType channelType() const; - - /*! - * \deprecated This method no longer has any effect. - */ - TAGLIB_DEPRECATED void setChannelType(ChannelType t); - /* * There was a terrible API goof here, and while this can't be changed to * the way it appears below for binary compatibility reasons, let's at diff --git a/taglib/mpeg/id3v2/id3v2frame.cpp b/taglib/mpeg/id3v2/id3v2frame.cpp index c3a45a2a..7c215454 100644 --- a/taglib/mpeg/id3v2/id3v2frame.cpp +++ b/taglib/mpeg/id3v2/id3v2frame.cpp @@ -581,12 +581,6 @@ unsigned int Frame::Header::size(unsigned int version) // public members (Frame::Header) //////////////////////////////////////////////////////////////////////////////// -Frame::Header::Header(const ByteVector &data, bool synchSafeInts) : - d(new HeaderPrivate()) -{ - setData(data, synchSafeInts); -} - Frame::Header::Header(const ByteVector &data, unsigned int version) : d(new HeaderPrivate()) { @@ -598,11 +592,6 @@ Frame::Header::~Header() delete d; } -void Frame::Header::setData(const ByteVector &data, bool synchSafeInts) -{ - setData(data, static_cast(synchSafeInts ? 4 : 3)); -} - void Frame::Header::setData(const ByteVector &data, unsigned int version) { d->version = version; @@ -826,8 +815,3 @@ ByteVector Frame::Header::render() const return v; } - -bool Frame::Header::frameAlterPreservation() const -{ - return fileAlterPreservation(); -} diff --git a/taglib/mpeg/id3v2/id3v2frame.h b/taglib/mpeg/id3v2/id3v2frame.h index 5beeddbb..23a4a350 100644 --- a/taglib/mpeg/id3v2/id3v2frame.h +++ b/taglib/mpeg/id3v2/id3v2frame.h @@ -329,16 +329,6 @@ namespace TagLib { class TAGLIB_EXPORT Frame::Header { public: - /*! - * Construct a Frame Header based on \a data. \a data must at least - * contain a 4 byte frame ID, and optionally can contain flag data and the - * frame size. i.e. Just the frame id -- "TALB" -- is a valid value. - * - * \deprecated Please use the constructor below that accepts a version - * number. - */ - TAGLIB_DEPRECATED Header(const ByteVector &data, bool synchSafeInts); - /*! * Construct a Frame Header based on \a data. \a data must at least * contain a 4 byte frame ID, and optionally can contain flag data and the @@ -353,14 +343,6 @@ namespace TagLib { */ virtual ~Header(); - /*! - * Sets the data for the Header. - * - * \deprecated Please use the version below that accepts an ID3v2 version - * number. - */ - TAGLIB_DEPRECATED void setData(const ByteVector &data, bool synchSafeInts); - /*! * Sets the data for the Header. \a version should indicate the ID3v2 * version number of the tag that this frame is contained in. @@ -504,11 +486,6 @@ namespace TagLib { */ ByteVector render() const; - /*! - * \deprecated Use fileAlterPreservation(). - */ - TAGLIB_DEPRECATED bool frameAlterPreservation() const; - private: Header(const Header &); Header &operator=(const Header &); diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp index 470ccefd..59655611 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.cpp +++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -115,18 +115,6 @@ FrameFactory *FrameFactory::instance() return &factory; } -Frame *FrameFactory::createFrame(const ByteVector &data, bool synchSafeInts) const -{ - return createFrame(data, static_cast(synchSafeInts ? 4 : 3)); -} - -Frame *FrameFactory::createFrame(const ByteVector &data, unsigned int version) const -{ - Header tagHeader; - tagHeader.setMajorVersion(version); - return createFrame(data, &tagHeader); -} - Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader) const { return createFrame(origData, const_cast(tagHeader)); diff --git a/taglib/mpeg/id3v2/id3v2framefactory.h b/taglib/mpeg/id3v2/id3v2framefactory.h index 95e08d52..950c9ca4 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.h +++ b/taglib/mpeg/id3v2/id3v2framefactory.h @@ -66,25 +66,6 @@ namespace TagLib { { public: static FrameFactory *instance(); - /*! - * Create a frame based on \a data. \a synchSafeInts should only be set - * false if we are parsing an old tag (v2.3 or older) that does not support - * synchsafe ints. - * - * \deprecated Please use the method below that accepts a ID3v2::Header - * instance in new code. - */ - TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, bool synchSafeInts) const; - - /*! - * Create a frame based on \a data. \a version should indicate the ID3v2 - * version of the tag. As ID3v2.4 is the most current version of the - * standard 4 is the default. - * - * \deprecated Please use the method below that accepts a ID3v2::Header - * instance in new code. - */ - TAGLIB_DEPRECATED Frame *createFrame(const ByteVector &data, unsigned int version = 4) const; /*! * \deprecated Use createFrame(const ByteVector &, const Header *) const. diff --git a/taglib/mpeg/id3v2/id3v2tag.cpp b/taglib/mpeg/id3v2/id3v2tag.cpp index ba0ddb1e..2047e14a 100644 --- a/taglib/mpeg/id3v2/id3v2tag.cpp +++ b/taglib/mpeg/id3v2/id3v2tag.cpp @@ -340,11 +340,6 @@ ExtendedHeader *ID3v2::Tag::extendedHeader() const return d->extendedHeader; } -Footer *ID3v2::Tag::footer() const -{ - return d->footer; -} - const FrameListMap &ID3v2::Tag::frameListMap() const { return d->frameListMap; @@ -624,11 +619,6 @@ void ID3v2::Tag::downgradeFrames(FrameList *frames, FrameList *newFrames) const } } -ByteVector ID3v2::Tag::render(int version) const -{ - return render(version == 3 ? v3 : v4); -} - ByteVector ID3v2::Tag::render(Version version) const { // We need to render the "tag data" first so that we have to correct size to diff --git a/taglib/mpeg/id3v2/id3v2tag.h b/taglib/mpeg/id3v2/id3v2tag.h index 1c7bcac9..e8463503 100644 --- a/taglib/mpeg/id3v2/id3v2tag.h +++ b/taglib/mpeg/id3v2/id3v2tag.h @@ -185,16 +185,6 @@ namespace TagLib { */ ExtendedHeader *extendedHeader() const; - /*! - * Returns a pointer to the tag's footer or null if there is no footer. - * - * \deprecated I don't see any reason to keep this around since there's - * nothing useful to be retrieved from the footer, but well, again, I'm - * prone to change my mind, so this gets to stay around until near a - * release. - */ - TAGLIB_DEPRECATED Footer *footer() const; - /*! * Returns a reference to the frame list map. This is an FrameListMap of * all of the frames in the tag. @@ -337,11 +327,6 @@ namespace TagLib { */ ByteVector render() const; - /*! - * \deprecated Use render(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 a852b939..febe5713 100644 --- a/taglib/mpeg/mpegfile.cpp +++ b/taglib/mpeg/mpegfile.cpp @@ -198,31 +198,6 @@ bool MPEG::File::save() return save(AllTags); } -bool MPEG::File::save(int tags) -{ - return save(tags, StripOthers); -} - -bool MPEG::File::save(int tags, bool stripOthers) -{ - return save(tags, stripOthers ? StripOthers : StripNone, ID3v2::v4); -} - -bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version) -{ - return save(tags, - stripOthers ? StripOthers : StripNone, - id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4); -} - -bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags) -{ - return save(tags, - stripOthers ? StripOthers : StripNone, - id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4, - duplicateTags ? Duplicate : DoNotDuplicate); -} - bool MPEG::File::save(int tags, StripTags strip, ID3v2::Version version, DuplicateTags duplicate) { if(readOnly()) { @@ -401,11 +376,6 @@ bool MPEG::File::strip(int tags, bool freeMemory) return true; } -void MPEG::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory) -{ - d->ID3v2FrameFactory = factory; -} - offset_t MPEG::File::nextFrameOffset(offset_t position) { ByteVector frameSyncBytes(2, '\0'); diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h index 2020f154..92d9b1d1 100644 --- a/taglib/mpeg/mpegfile.h +++ b/taglib/mpeg/mpegfile.h @@ -181,35 +181,6 @@ namespace TagLib { */ virtual bool save(); - /*! - * Save the file. This will attempt to save all of the tag types that are - * specified by OR-ing together TagTypes values. The save() method above - * uses AllTags. This returns true if saving was successful. - * - * This strips all tags not included in the mask, but does not modify them - * in memory, so later calls to save() which make use of these tags will - * remain valid. This also strips empty tags. - */ - bool save(int tags); - - /*! - * \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags). - */ - // BIC: combine with the above method - TAGLIB_DEPRECATED bool save(int tags, bool stripOthers); - - /*! - * \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags). - */ - // BIC: combine with the above method - TAGLIB_DEPRECATED bool save(int tags, bool stripOthers, int id3v2Version); - - /*! - * \deprecated Use save(int, StripTags, ID3v2::Version, DuplicateTags). - */ - // BIC: combine with the above method - 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 * specified by OR-ing together TagTypes values. @@ -223,7 +194,7 @@ namespace TagLib { * If \a duplicate is set to DuplicateTags and at least one tag -- ID3v1 * or ID3v2 -- exists this will duplicate its content into the other tag. */ - bool save(int tags, StripTags strip, + bool save(int tags, StripTags strip = StripOthers, ID3v2::Version version = ID3v2::v4, DuplicateTags duplicate = Duplicate); @@ -311,14 +282,6 @@ namespace TagLib { // BIC: merge with the method above bool strip(int tags, bool freeMemory); - /*! - * Set the ID3v2::FrameFactory to something other than the default. - * - * \see ID3v2FrameFactory - * \deprecated This value should be passed in via the constructor. - */ - 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.cpp b/taglib/mpeg/mpegheader.cpp index b9405008..d6b9c6e2 100644 --- a/taglib/mpeg/mpegheader.cpp +++ b/taglib/mpeg/mpegheader.cpp @@ -69,12 +69,6 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -MPEG::Header::Header(const ByteVector &data) : - d(new HeaderPrivate()) -{ - debug("MPEG::Header::Header() - This constructor is no longer used."); -} - MPEG::Header::Header(File *file, offset_t offset, bool checkLength) : d(new HeaderPrivate()) { diff --git a/taglib/mpeg/mpegheader.h b/taglib/mpeg/mpegheader.h index 82addf85..bace0aaf 100644 --- a/taglib/mpeg/mpegheader.h +++ b/taglib/mpeg/mpegheader.h @@ -48,13 +48,6 @@ namespace TagLib { class TAGLIB_EXPORT Header { public: - /*! - * Parses an MPEG header based on \a data. - * - * \deprecated Use Header(File *, long, bool). - */ - TAGLIB_DEPRECATED Header(const ByteVector &data); - /*! * Parses an MPEG header based on \a file and \a offset. * diff --git a/taglib/mpeg/mpegproperties.cpp b/taglib/mpeg/mpegproperties.cpp index d66f8ab1..bbd0c5a8 100644 --- a/taglib/mpeg/mpegproperties.cpp +++ b/taglib/mpeg/mpegproperties.cpp @@ -84,11 +84,6 @@ MPEG::Properties::~Properties() delete d; } -int MPEG::Properties::length() const -{ - return lengthInSeconds(); -} - int MPEG::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/mpeg/mpegproperties.h b/taglib/mpeg/mpegproperties.h index 18e7ca1a..5aa75b82 100644 --- a/taglib/mpeg/mpegproperties.h +++ b/taglib/mpeg/mpegproperties.h @@ -59,16 +59,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/mpeg/xingheader.cpp b/taglib/mpeg/xingheader.cpp index 6c2b25dc..92200f89 100644 --- a/taglib/mpeg/xingheader.cpp +++ b/taglib/mpeg/xingheader.cpp @@ -81,12 +81,6 @@ MPEG::XingHeader::HeaderType MPEG::XingHeader::type() const return d->type; } -int MPEG::XingHeader::xingHeaderOffset(TagLib::MPEG::Header::Version /*v*/, - TagLib::MPEG::Header::ChannelMode /*c*/) -{ - return 0; -} - //////////////////////////////////////////////////////////////////////////////// // private members //////////////////////////////////////////////////////////////////////////////// diff --git a/taglib/mpeg/xingheader.h b/taglib/mpeg/xingheader.h index 4854168a..02a61ada 100644 --- a/taglib/mpeg/xingheader.h +++ b/taglib/mpeg/xingheader.h @@ -105,15 +105,6 @@ namespace TagLib { */ HeaderType type() const; - /*! - * Returns the offset for the start of this Xing header, given the - * version and channels of the frame - * - * \deprecated Always returns 0. - */ - TAGLIB_DEPRECATED static int xingHeaderOffset(TagLib::MPEG::Header::Version v, - TagLib::MPEG::Header::ChannelMode c); - private: XingHeader(const XingHeader &); XingHeader &operator=(const XingHeader &); diff --git a/taglib/ogg/oggpage.cpp b/taglib/ogg/oggpage.cpp index 990b4c4f..1f7fcf51 100644 --- a/taglib/ogg/oggpage.cpp +++ b/taglib/ogg/oggpage.cpp @@ -269,12 +269,6 @@ List Ogg::Page::paginate(const ByteVectorList &packets, return l; } -Ogg::Page* Ogg::Page::getCopyWithNewPageSequenceNumber(int /*sequenceNumber*/) -{ - debug("Ogg::Page::getCopyWithNewPageSequenceNumber() -- This function is obsolete. Returning null."); - return 0; -} - //////////////////////////////////////////////////////////////////////////////// // protected members //////////////////////////////////////////////////////////////////////////////// diff --git a/taglib/ogg/oggpage.h b/taglib/ogg/oggpage.h index 4ed704f6..4a68651e 100644 --- a/taglib/ogg/oggpage.h +++ b/taglib/ogg/oggpage.h @@ -85,16 +85,6 @@ namespace TagLib { */ void setPageSequenceNumber(int sequenceNumber); - /*! - * Returns a copy of the page with \a sequenceNumber set as sequence number. - * - * \see header() - * \see PageHeader::setPageSequenceNumber() - * - * \deprecated Always returns null. - */ - TAGLIB_DEPRECATED Page *getCopyWithNewPageSequenceNumber(int sequenceNumber); - /*! * Returns the index of the first packet wholly or partially contained in * this page. diff --git a/taglib/ogg/opus/opusproperties.cpp b/taglib/ogg/opus/opusproperties.cpp index e19ab64d..d6d004f9 100644 --- a/taglib/ogg/opus/opusproperties.cpp +++ b/taglib/ogg/opus/opusproperties.cpp @@ -71,11 +71,6 @@ Opus::Properties::~Properties() delete d; } -int Opus::Properties::length() const -{ - return lengthInSeconds(); -} - int Ogg::Opus::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/ogg/opus/opusproperties.h b/taglib/ogg/opus/opusproperties.h index 2624fe1a..9e2f9385 100644 --- a/taglib/ogg/opus/opusproperties.h +++ b/taglib/ogg/opus/opusproperties.h @@ -61,16 +61,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/ogg/speex/speexproperties.cpp b/taglib/ogg/speex/speexproperties.cpp index fae184a0..0a7cf8f2 100644 --- a/taglib/ogg/speex/speexproperties.cpp +++ b/taglib/ogg/speex/speexproperties.cpp @@ -77,11 +77,6 @@ Speex::Properties::~Properties() delete d; } -int Speex::Properties::length() const -{ - return lengthInSeconds(); -} - int Speex::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/ogg/speex/speexproperties.h b/taglib/ogg/speex/speexproperties.h index 12f09e0d..8e6d18d4 100644 --- a/taglib/ogg/speex/speexproperties.h +++ b/taglib/ogg/speex/speexproperties.h @@ -61,16 +61,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/ogg/vorbis/vorbisproperties.cpp b/taglib/ogg/vorbis/vorbisproperties.cpp index b38e138a..5fd9db56 100644 --- a/taglib/ogg/vorbis/vorbisproperties.cpp +++ b/taglib/ogg/vorbis/vorbisproperties.cpp @@ -80,11 +80,6 @@ Vorbis::Properties::~Properties() delete d; } -int Vorbis::Properties::length() const -{ - return lengthInSeconds(); -} - int Vorbis::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/ogg/vorbis/vorbisproperties.h b/taglib/ogg/vorbis/vorbisproperties.h index 4ca2bfe0..09e987bf 100644 --- a/taglib/ogg/vorbis/vorbisproperties.h +++ b/taglib/ogg/vorbis/vorbisproperties.h @@ -67,16 +67,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/ogg/xiphcomment.cpp b/taglib/ogg/xiphcomment.cpp index 562e71ed..690f586a 100644 --- a/taglib/ogg/xiphcomment.cpp +++ b/taglib/ogg/xiphcomment.cpp @@ -293,14 +293,6 @@ void Ogg::XiphComment::addField(const String &key, const String &value, bool rep d->fieldListMap[upperKey].append(value); } -void Ogg::XiphComment::removeField(const String &key, const String &value) -{ - if(!value.isNull()) - removeFields(key, value); - else - removeFields(key); -} - void Ogg::XiphComment::removeFields(const String &key) { d->fieldListMap.erase(key.upper()); diff --git a/taglib/ogg/xiphcomment.h b/taglib/ogg/xiphcomment.h index cb4742ba..307af65a 100644 --- a/taglib/ogg/xiphcomment.h +++ b/taglib/ogg/xiphcomment.h @@ -184,15 +184,6 @@ namespace TagLib { */ void addField(const String &key, const String &value, bool replace = true); - /*! - * Remove the field specified by \a key with the data \a value. If - * \a value is null, all of the fields with the given key will be removed. - * - * \deprecated Using this method may lead to a linkage error. - */ - // BIC: remove and merge with below - 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.cpp b/taglib/riff/aiff/aiffproperties.cpp index e1d954fe..1198939b 100644 --- a/taglib/riff/aiff/aiffproperties.cpp +++ b/taglib/riff/aiff/aiffproperties.cpp @@ -57,13 +57,6 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -RIFF::AIFF::Properties::Properties(const ByteVector &, ReadStyle style) : - AudioProperties(style), - d(new PropertiesPrivate()) -{ - debug("RIFF::AIFF::Properties::Properties() - This constructor is no longer used."); -} - RIFF::AIFF::Properties::Properties(File *file, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) @@ -76,11 +69,6 @@ RIFF::AIFF::Properties::~Properties() delete d; } -int RIFF::AIFF::Properties::length() const -{ - return lengthInSeconds(); -} - int RIFF::AIFF::Properties::lengthInSeconds() const { return d->length / 1000; @@ -111,11 +99,6 @@ int RIFF::AIFF::Properties::bitsPerSample() const return d->bitsPerSample; } -int RIFF::AIFF::Properties::sampleWidth() const -{ - return bitsPerSample(); -} - unsigned int RIFF::AIFF::Properties::sampleFrames() const { return d->sampleFrames; diff --git a/taglib/riff/aiff/aiffproperties.h b/taglib/riff/aiff/aiffproperties.h index 0324b858..5a29ea5d 100644 --- a/taglib/riff/aiff/aiffproperties.h +++ b/taglib/riff/aiff/aiffproperties.h @@ -46,14 +46,6 @@ namespace TagLib { class TAGLIB_EXPORT Properties : public AudioProperties { public: - /*! - * Create an instance of AIFF::Properties with the data read from the - * ByteVector \a data. - * - * \deprecated Use Properties(File *, ReadStyle). - */ - TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style); - /*! * Create an instance of AIFF::Properties with the data read from the * AIFF::File \a file. @@ -65,16 +57,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. @@ -112,15 +94,6 @@ namespace TagLib { */ int bitsPerSample() const; - /*! - * Returns the number of bits per audio sample. - * - * \note This method is just an alias of bitsPerSample(). - * - * \deprecated Use bitsPerSample(). - */ - TAGLIB_DEPRECATED int sampleWidth() const; - /*! * Returns the number of sample frames */ diff --git a/taglib/riff/wav/wavfile.cpp b/taglib/riff/wav/wavfile.cpp index 63ce1562..8cd84364 100644 --- a/taglib/riff/wav/wavfile.cpp +++ b/taglib/riff/wav/wavfile.cpp @@ -150,13 +150,6 @@ bool RIFF::WAV::File::save() return RIFF::WAV::File::save(AllTags); } -bool RIFF::WAV::File::save(TagTypes tags, bool stripOthers, int id3v2Version) -{ - return save(tags, - stripOthers ? StripOthers : StripNone, - id3v2Version == 3 ? ID3v2::v3 : ID3v2::v4); -} - bool RIFF::WAV::File::save(TagTypes tags, StripTags strip, ID3v2::Version version) { if(readOnly()) { diff --git a/taglib/riff/wav/wavfile.h b/taglib/riff/wav/wavfile.h index bcd28410..3538c796 100644 --- a/taglib/riff/wav/wavfile.h +++ b/taglib/riff/wav/wavfile.h @@ -159,11 +159,6 @@ namespace TagLib { */ virtual bool save(); - /*! - * \deprecated Use save(TagTypes, StripTags, ID3v2::Version). - */ - TAGLIB_DEPRECATED bool save(TagTypes tags, bool stripOthers, int id3v2Version = 4); - /*! * Save the file. If \a strip is specified, it is possible to choose if * tags not specified in \a tags should be stripped from the file or diff --git a/taglib/riff/wav/wavproperties.cpp b/taglib/riff/wav/wavproperties.cpp index 4a704e6c..f517b690 100644 --- a/taglib/riff/wav/wavproperties.cpp +++ b/taglib/riff/wav/wavproperties.cpp @@ -65,20 +65,6 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -RIFF::WAV::Properties::Properties(const ByteVector &, ReadStyle style) : - AudioProperties(style), - d(new PropertiesPrivate()) -{ - debug("RIFF::WAV::Properties::Properties() -- This constructor is no longer used."); -} - -RIFF::WAV::Properties::Properties(const ByteVector &, unsigned int, ReadStyle style) : - AudioProperties(style), - d(new PropertiesPrivate()) -{ - debug("RIFF::WAV::Properties::Properties() -- This constructor is no longer used."); -} - TagLib::RIFF::WAV::Properties::Properties(File *file, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) @@ -91,11 +77,6 @@ RIFF::WAV::Properties::~Properties() delete d; } -int RIFF::WAV::Properties::length() const -{ - return lengthInSeconds(); -} - int RIFF::WAV::Properties::lengthInSeconds() const { return d->length / 1000; @@ -126,11 +107,6 @@ int RIFF::WAV::Properties::bitsPerSample() const return d->bitsPerSample; } -int RIFF::WAV::Properties::sampleWidth() const -{ - return bitsPerSample(); -} - unsigned int RIFF::WAV::Properties::sampleFrames() const { return d->sampleFrames; diff --git a/taglib/riff/wav/wavproperties.h b/taglib/riff/wav/wavproperties.h index 2b3c0beb..2f7a1ed7 100644 --- a/taglib/riff/wav/wavproperties.h +++ b/taglib/riff/wav/wavproperties.h @@ -49,22 +49,6 @@ namespace TagLib { class TAGLIB_EXPORT Properties : public AudioProperties { public: - /*! - * Create an instance of WAV::Properties with the data read from the - * ByteVector \a data. - * - * \deprecated Use Properties(File *, ReadStyle). - */ - TAGLIB_DEPRECATED Properties(const ByteVector &data, ReadStyle style); - - /*! - * Create an instance of WAV::Properties with the data read from the - * ByteVector \a data and the length calculated using \a streamLength. - * - * \deprecated Use Properties(File *, ReadStyle). - */ - TAGLIB_DEPRECATED Properties(const ByteVector &data, unsigned int streamLength, ReadStyle style); - /*! * Create an instance of WAV::Properties with the data read from the * WAV::File \a file. @@ -76,16 +60,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. @@ -123,15 +97,6 @@ namespace TagLib { */ int bitsPerSample() const; - /*! - * Returns the number of bits per audio sample. - * - * \note This method is just an alias of bitsPerSample(). - * - * \deprecated Use bitsPerSample(). - */ - TAGLIB_DEPRECATED int sampleWidth() const; - /*! * Returns the number of sample frames. */ diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index b0d3aa90..c911cb4c 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -291,8 +291,6 @@ public: // static members //////////////////////////////////////////////////////////////////////////////// -ByteVector ByteVector::null; - ByteVector ByteVector::fromCString(const char *s, unsigned int length) { if(length == 0xffffffff) @@ -657,11 +655,6 @@ ByteVector::ConstReverseIterator ByteVector::rend() const return v.rbegin() + (v.size() - d->offset); } -bool ByteVector::isNull() const -{ - return (d == null.d); -} - bool ByteVector::isEmpty() const { return (d->length == 0); diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index bc8eda76..56b9f41e 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -270,24 +270,10 @@ namespace TagLib { */ ConstReverseIterator rend() const; - /*! - * Returns true if the vector is null. - * - * \note A vector may be empty without being null. So do not use this - * method to check if the vector is empty. - * - * \see isEmpty() - * - * \deprecated Use isEmpty(), do not differentiate between null and empty. - */ - // BIC: remove - TAGLIB_DEPRECATED bool isNull() const; - /*! * Returns true if the ByteVector is empty. * * \see size() - * \see isNull() */ bool isEmpty() const; @@ -585,18 +571,6 @@ namespace TagLib { */ void swap(ByteVector &v); - /*! - * A static, empty ByteVector which is convenient and fast (since returning - * an empty or "null" value does not require instantiating a new ByteVector). - * - * \warning Do not modify this variable. It will mess up the internal state - * of TagLib. - * - * \deprecated Use ByteVector(). - */ - // BIC: remove - TAGLIB_DEPRECATED static ByteVector null; - /*! * Returns a hex-encoded copy of the byte vector. */ diff --git a/taglib/toolkit/tfile.cpp b/taglib/toolkit/tfile.cpp index c32cc1f8..ae477ebc 100644 --- a/taglib/toolkit/tfile.cpp +++ b/taglib/toolkit/tfile.cpp @@ -451,36 +451,6 @@ offset_t File::length() return d->stream->length(); } -bool File::isReadable(const char *file) -{ - -#if defined(_MSC_VER) && (_MSC_VER >= 1400) // VC++2005 or later - - return _access_s(file, R_OK) == 0; - -#else - - return access(file, R_OK) == 0; - -#endif - -} - -bool File::isWritable(const char *file) -{ - -#if defined(_MSC_VER) && (_MSC_VER >= 1400) // VC++2005 or later - - return _access_s(file, W_OK) == 0; - -#else - - return access(file, W_OK) == 0; - -#endif - -} - //////////////////////////////////////////////////////////////////////////////// // protected members //////////////////////////////////////////////////////////////////////////////// diff --git a/taglib/toolkit/tfile.h b/taglib/toolkit/tfile.h index e65dae4b..3bb35158 100644 --- a/taglib/toolkit/tfile.h +++ b/taglib/toolkit/tfile.h @@ -257,21 +257,6 @@ namespace TagLib { */ offset_t length(); - /*! - * Returns true if \a file can be opened for reading. If the file does not - * exist, this will return false. - * - * \deprecated Use system functions, e.g. access() (_access_s() on Windows). - */ - TAGLIB_DEPRECATED static bool isReadable(const char *file); - - /*! - * Returns true if \a file can be opened for writing. - * - * \deprecated Use system functions, e.g. access() (_access_s() on Windows). - */ - TAGLIB_DEPRECATED static bool isWritable(const char *name); - protected: /*! * Construct a File object and opens the \a file. \a file should be a diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp index 212c186f..e7ca3682 100644 --- a/taglib/toolkit/tstring.cpp +++ b/taglib/toolkit/tstring.cpp @@ -154,8 +154,6 @@ public: std::string cstring; }; -String String::null; - //////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// @@ -405,11 +403,6 @@ bool String::isEmpty() const return d->data.empty(); } -bool String::isNull() const -{ - return d == null.d; -} - ByteVector String::data(Type t) const { switch(t) @@ -703,11 +696,6 @@ void String::detach() String(d->data.c_str()).swap(*this); } -//////////////////////////////////////////////////////////////////////////////// -// private members -//////////////////////////////////////////////////////////////////////////////// - -const String::Type String::WCharByteOrder = wcharByteOrder(); } // namespace TagLib //////////////////////////////////////////////////////////////////////////////// @@ -740,4 +728,3 @@ std::ostream &operator<<(std::ostream &s, const TagLib::String &str) s << str.to8Bit(); return s; } - diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h index e3853d80..d31ec600 100644 --- a/taglib/toolkit/tstring.h +++ b/taglib/toolkit/tstring.h @@ -323,25 +323,9 @@ namespace TagLib { /*! * Returns true if the string is empty. - * - * \see isNull() */ bool isEmpty() const; - /*! - * Returns true if this string is null -- i.e. it is a copy of the - * String::null string. - * - * \note A string can be empty and not null. So do not use this method to - * check if the string is empty. - * - * \see isEmpty() - * - * \deprecated Use isEmpty(), do not differentiate between null and empty. - */ - // BIC: remove - TAGLIB_DEPRECATED bool isNull() const; - /*! * Returns a ByteVector containing the string's data. If \a t is Latin1 or * UTF8, this will return a vector of 8 bit characters, otherwise it will use @@ -516,17 +500,6 @@ namespace TagLib { */ bool operator<(const String &s) const; - /*! - * A null string provided for convenience. - * - * \warning Do not modify this variable. It will mess up the internal state - * of TagLib. - * - * \deprecated Use String(). - */ - // BIC: remove - TAGLIB_DEPRECATED static String null; - protected: /*! * If this String is being shared via implicit sharing, do a deep copy of the @@ -536,13 +509,6 @@ namespace TagLib { void detach(); private: - /*! - * \deprecated This variable is no longer used, but NEVER remove this. It - * may lead to a linkage error. - */ - // BIC: remove - TAGLIB_DEPRECATED static const Type WCharByteOrder; - class StringPrivate; StringPrivate *d; }; diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp index 77b835ab..7361122f 100644 --- a/taglib/trueaudio/trueaudiofile.cpp +++ b/taglib/trueaudio/trueaudiofile.cpp @@ -156,11 +156,6 @@ TrueAudio::Properties *TrueAudio::File::audioProperties() const return d->properties; } -void TrueAudio::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory) -{ - d->ID3v2FrameFactory = factory; -} - bool TrueAudio::File::save() { if(readOnly()) { diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index 1019bfc4..bc613e93 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -160,14 +160,6 @@ namespace TagLib { */ virtual Properties *audioProperties() const; - /*! - * Set the ID3v2::FrameFactory to something other than the default. - * - * \see ID3v2FrameFactory - * \deprecated This value should be passed in via the constructor. - */ - TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory); - /*! * Saves the file. */ diff --git a/taglib/trueaudio/trueaudioproperties.cpp b/taglib/trueaudio/trueaudioproperties.cpp index 3a403848..20aa5db6 100644 --- a/taglib/trueaudio/trueaudioproperties.cpp +++ b/taglib/trueaudio/trueaudioproperties.cpp @@ -73,11 +73,6 @@ TrueAudio::Properties::~Properties() delete d; } -int TrueAudio::Properties::length() const -{ - return lengthInSeconds(); -} - int TrueAudio::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/trueaudio/trueaudioproperties.h b/taglib/trueaudio/trueaudioproperties.h index 83b178ef..5e664002 100644 --- a/taglib/trueaudio/trueaudioproperties.h +++ b/taglib/trueaudio/trueaudioproperties.h @@ -60,16 +60,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index cc65f2d0..af317b93 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -66,13 +66,6 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -WavPack::Properties::Properties(const ByteVector &, offset_t, ReadStyle style) : - AudioProperties(style), - d(new PropertiesPrivate()) -{ - debug("WavPack::Properties::Properties() -- This constructor is no longer used."); -} - WavPack::Properties::Properties(File *file, offset_t streamLength, ReadStyle style) : AudioProperties(style), d(new PropertiesPrivate()) @@ -85,11 +78,6 @@ WavPack::Properties::~Properties() delete d; } -int WavPack::Properties::length() const -{ - return lengthInSeconds(); -} - int WavPack::Properties::lengthInSeconds() const { return d->length / 1000; diff --git a/taglib/wavpack/wavpackproperties.h b/taglib/wavpack/wavpackproperties.h index 35ddd9a6..de192df6 100644 --- a/taglib/wavpack/wavpackproperties.h +++ b/taglib/wavpack/wavpackproperties.h @@ -52,16 +52,6 @@ namespace TagLib { class TAGLIB_EXPORT Properties : public AudioProperties { public: - /*! - * Create an instance of WavPack::Properties with the data read from the - * ByteVector \a data. - * - * \deprecated This constructor will be dropped in favor of the one below - * in a future version. - */ - TAGLIB_DEPRECATED Properties(const ByteVector &data, offset_t streamLength, - ReadStyle style = Average); - /*! * Create an instance of WavPack::Properties. */ @@ -72,16 +62,6 @@ namespace TagLib { */ virtual ~Properties(); - /*! - * Returns the length of the file in seconds. The length is rounded down to - * the nearest whole second. - * - * \note This method is just an alias of lengthInSeconds(). - * - * \deprecated Use lengthInSeconds(). - */ - TAGLIB_DEPRECATED virtual int length() const; - /*! * Returns the length of the file in seconds. The length is rounded down to * the nearest whole second. diff --git a/tests/test_mpeg.cpp b/tests/test_mpeg.cpp index 4519df11..c5cd23e4 100644 --- a/tests/test_mpeg.cpp +++ b/tests/test_mpeg.cpp @@ -53,7 +53,6 @@ class TestMPEG : public CppUnit::TestFixture CPPUNIT_TEST(testSkipInvalidFrames3); CPPUNIT_TEST(testVersion2DurationWithXingHeader); CPPUNIT_TEST(testSaveID3v24); - CPPUNIT_TEST(testSaveID3v24WrongParam); CPPUNIT_TEST(testSaveID3v23); CPPUNIT_TEST(testDuplicateID3v2); CPPUNIT_TEST(testFuzzedFile); @@ -193,26 +192,6 @@ public: } } - void testSaveID3v24WrongParam() - { - ScopedFileCopy copy("xing", ".mp3"); - string newname = copy.fileName(); - - String xxx = ByteVector(254, 'X'); - { - MPEG::File f(newname.c_str()); - f.tag()->setTitle(xxx); - f.tag()->setArtist("Artist A"); - f.save(MPEG::File::AllTags, true, 8); - } - { - MPEG::File f2(newname.c_str()); - CPPUNIT_ASSERT_EQUAL((unsigned int)4, f2.ID3v2Tag()->header()->majorVersion()); - CPPUNIT_ASSERT_EQUAL(String("Artist A"), f2.tag()->artist()); - CPPUNIT_ASSERT_EQUAL(xxx, f2.tag()->title()); - } - } - void testSaveID3v23() { ScopedFileCopy copy("xing", ".mp3");