]> granicus.if.org Git - taglib/commitdiff
Rename the functions 'isValidStream' to 'isSupported'.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 7 Feb 2017 13:36:56 +0000 (22:36 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 7 Feb 2017 13:36:56 +0000 (22:36 +0900)
The name 'isValidStream' is a little misleading because it doesn't check if the stream is really valid. Additionally, 'isSupported' can be naturally overloaded.

29 files changed:
taglib/ape/apefile.cpp
taglib/ape/apefile.h
taglib/asf/asffile.cpp
taglib/asf/asffile.h
taglib/fileref.cpp
taglib/flac/flacfile.cpp
taglib/flac/flacfile.h
taglib/mp4/mp4file.cpp
taglib/mp4/mp4file.h
taglib/mpc/mpcfile.cpp
taglib/mpc/mpcfile.h
taglib/mpeg/mpegfile.cpp
taglib/mpeg/mpegfile.h
taglib/ogg/flac/oggflacfile.cpp
taglib/ogg/flac/oggflacfile.h
taglib/ogg/opus/opusfile.cpp
taglib/ogg/opus/opusfile.h
taglib/ogg/speex/speexfile.cpp
taglib/ogg/speex/speexfile.h
taglib/ogg/vorbis/vorbisfile.cpp
taglib/ogg/vorbis/vorbisfile.h
taglib/riff/aiff/aifffile.cpp
taglib/riff/aiff/aifffile.h
taglib/riff/wav/wavfile.cpp
taglib/riff/wav/wavfile.h
taglib/trueaudio/trueaudiofile.cpp
taglib/trueaudio/trueaudiofile.h
taglib/wavpack/wavpackfile.cpp
taglib/wavpack/wavpackfile.h

index fb01e4a2e56cdab6362db4f1a0e71dbdbf986f21..a10c1f646d0e191feb74a8e825ce053b9609fe0e 100644 (file)
@@ -87,7 +87,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool APE::File::isValidStream(IOStream *stream)
+bool APE::File::isSupported(IOStream *stream)
 {
   // An APE file has an ID "MAC " somewhere. An ID3v2 tag may precede.
 
index a7c870b468b1bb934b9dbedbab2e5e02dec6318d..267778bae8467233955108f75d5fce0525f51ae4 100644 (file)
@@ -218,7 +218,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index c209a6408682b7e19b27bfe48ae757de912ff99e..d5a80bca74d276e29f0b3e1be3cee8f1934be3df 100644 (file)
@@ -478,7 +478,7 @@ void ASF::File::FilePrivate::CodecListObject::parse(ASF::File *file, unsigned in
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool ASF::File::isValidStream(IOStream *stream)
+bool ASF::File::isSupported(IOStream *stream)
 {
   // An ASF file has to start with the designated GUID.
 
index 7df5a797c0db7bb0d6aaa8f2fb8db704e8cc904d..05cf4ee2ac1efd915bb15596f9baef0e4f96603c 100644 (file)
@@ -122,7 +122,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       void read();
index cad1ae5067c4f0971c5f2a8888b7af420916d391..d5df2a11beccfed035a01c62eb0d953e999e3a17 100644 (file)
@@ -146,36 +146,36 @@ namespace
   {
     File *file = 0;
 
-    if(MPEG::File::isValidStream(stream))
+    if(MPEG::File::isSupported(stream))
       file = new MPEG::File(stream, ID3v2::FrameFactory::instance(), readAudioProperties, audioPropertiesStyle);
-    else if(Ogg::Vorbis::File::isValidStream(stream))
+    else if(Ogg::Vorbis::File::isSupported(stream))
       file = new Ogg::Vorbis::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(Ogg::FLAC::File::isValidStream(stream))
+    else if(Ogg::FLAC::File::isSupported(stream))
       file = new Ogg::FLAC::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(FLAC::File::isValidStream(stream))
+    else if(FLAC::File::isSupported(stream))
       file = new FLAC::File(stream, ID3v2::FrameFactory::instance(), readAudioProperties, audioPropertiesStyle);
-    else if(MPC::File::isValidStream(stream))
+    else if(MPC::File::isSupported(stream))
       file = new MPC::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(WavPack::File::isValidStream(stream))
+    else if(WavPack::File::isSupported(stream))
       file = new WavPack::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(Ogg::Speex::File::isValidStream(stream))
+    else if(Ogg::Speex::File::isSupported(stream))
       file = new Ogg::Speex::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(Ogg::Opus::File::isValidStream(stream))
+    else if(Ogg::Opus::File::isSupported(stream))
       file = new Ogg::Opus::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(TrueAudio::File::isValidStream(stream))
+    else if(TrueAudio::File::isSupported(stream))
       file = new TrueAudio::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(MP4::File::isValidStream(stream))
+    else if(MP4::File::isSupported(stream))
       file = new MP4::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(ASF::File::isValidStream(stream))
+    else if(ASF::File::isSupported(stream))
       file = new ASF::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(RIFF::AIFF::File::isValidStream(stream))
+    else if(RIFF::AIFF::File::isSupported(stream))
       file = new RIFF::AIFF::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(RIFF::WAV::File::isValidStream(stream))
+    else if(RIFF::WAV::File::isSupported(stream))
       file = new RIFF::WAV::File(stream, readAudioProperties, audioPropertiesStyle);
-    else if(APE::File::isValidStream(stream))
+    else if(APE::File::isSupported(stream))
       file = new APE::File(stream, readAudioProperties, audioPropertiesStyle);
 
-    // isValidStream() only does a quick check, so double check the file here.
+    // isSupported() only does a quick check, so double check the file here.
 
     if(file) {
       if(file->isValid())
index 780ab1c32cbfee9a4ac01c62255c1ec6686bbb09..7f4371943de714fec6d18f5300bd12319236e2a6 100644 (file)
@@ -99,7 +99,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool FLAC::File::isValidStream(IOStream *stream)
+bool FLAC::File::isSupported(IOStream *stream)
 {
   // A FLAC file has an ID "fLaC" somewhere. An ID3v2 tag may precede.
 
index 56755ec5f67efcd06f0c50fc037b8f8f3ad249c0..645090e0ebc276bc1cb3604755f338158451bb01 100644 (file)
@@ -325,7 +325,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index f06ae0684fc3cf234a64712e37a38c76aca86821..5ad8396dead583ba1e636db6edc96bf9e955cdac 100644 (file)
@@ -75,7 +75,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool MP4::File::isValidStream(IOStream *stream)
+bool MP4::File::isSupported(IOStream *stream)
 {
   // An MP4 file has to have an "ftyp" box first.
 
index ca2f70de198870336a012281f36ca87237cf950c..8a46d17df19b0ffd67708a463b0c3c029ea9c1be 100644 (file)
@@ -127,7 +127,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       void read(bool readProperties);
index b8544bb867cf0da399552c788ad494c92021806c..0ffaf89339e1520f8c406b896407256a1bca10ae 100644 (file)
@@ -79,7 +79,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool MPC::File::isValidStream(IOStream *stream)
+bool MPC::File::isSupported(IOStream *stream)
 {
   // A newer MPC file has to start with "MPCK" or "MP+", but older files don't
   // have keys to do a quick check.
index 43759ea53ee0fa9ea3c3e463f05a94d00fea4944..89a866e3bdaf30efb9e5107ac6e8398df0114cc0 100644 (file)
@@ -221,7 +221,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index 74f304f8575b9df783f467d6da76b31e4d3adf7f..75478ed8cb4d521e3074d43eb9ecbcdac9dd092f 100644 (file)
@@ -95,7 +95,7 @@ namespace
   };
 }
 
-bool MPEG::File::isValidStream(IOStream *stream)
+bool MPEG::File::isSupported(IOStream *stream)
 {
   if(!stream || !stream->isOpen())
     return false;
index 71410fe721f2c18a33b2732f1f9745fe7e4a8daa..2d2dff0026e178f30d2f662c3309e81b119ba627 100644 (file)
@@ -377,7 +377,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index e294d4112f848177b364d7d4cb9e533587631cb2..53d04508a31d437bb29ee86d898137400c64d1c4 100644 (file)
@@ -70,7 +70,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool Ogg::FLAC::File::isValidStream(IOStream *stream)
+bool Ogg::FLAC::File::isSupported(IOStream *stream)
 {
   // An Ogg FLAC file has IDs "OggS" and "fLaC" somewhere.
 
index 5f4313da64fe89073a5ba1a8f5e0682d5c99f2dd..b2686e4570ae13872a8c358817d80b4242739e13 100644 (file)
@@ -149,7 +149,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index 85d995bc907de84a58ce9693470d0e790e8554c3..d4f191ad1cfc6d783c6b9f6e33f6de6ae35aa55f 100644 (file)
@@ -58,7 +58,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool Ogg::Opus::File::isValidStream(IOStream *stream)
+bool Ogg::Opus::File::isSupported(IOStream *stream)
 {
   // An Opus file has IDs "OggS" and "OpusHead" somewhere.
 
index 60f60c3fc90e6f2c29d404a95692dd231f51d425..0e094eae82353b2bcea4f795090926e285f99164 100644 (file)
@@ -120,7 +120,7 @@ namespace TagLib {
          * \note This method is designed to do a quick check.  The result may
          * not necessarily be correct.
          */
-        static bool isValidStream(IOStream *stream);
+        static bool isSupported(IOStream *stream);
 
       private:
         File(const File &);
index d336877482643b865defe1199ab52949ace73f98..b3c8a6362703212b2448aa3138e6a24fab749390 100644 (file)
@@ -58,7 +58,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool Ogg::Speex::File::isValidStream(IOStream *stream)
+bool Ogg::Speex::File::isSupported(IOStream *stream)
 {
   // A Speex file has IDs "OggS" and "Speex   " somewhere.
 
index eda347e0328cfef9cc43722bbd2798ed7bb906a0..1be7113cbe287f81a8a717140f191272e9536795 100644 (file)
@@ -120,7 +120,7 @@ namespace TagLib {
          * \note This method is designed to do a quick check.  The result may
          * not necessarily be correct.
          */
-        static bool isValidStream(IOStream *stream);
+        static bool isSupported(IOStream *stream);
 
       private:
         File(const File &);
index 7f02fff53b825bcc81b6c7578b12a83262ff2cff..b4f221ab19e6683569272fa070de9493d85896a0 100644 (file)
@@ -63,7 +63,7 @@ namespace TagLib {
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool Vorbis::File::isValidStream(IOStream *stream)
+bool Vorbis::File::isSupported(IOStream *stream)
 {
   // An Ogg Vorbis file has IDs "OggS" and "\x01vorbis" somewhere.
 
index 9f7cb7e4d26c79a347e1bb1d8258353ff1dcaeb3..04c0c04ea340c332946f966d224884fefe1a1689 100644 (file)
@@ -127,7 +127,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index 72705a9a34fa3ffdc7fc5bb272cf9d9547d5d78a..4f9c868e6b0ba52a20d56f641cacd2be2a1a0a2f 100644 (file)
@@ -58,7 +58,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool RIFF::AIFF::File::isValidStream(IOStream *stream)
+bool RIFF::AIFF::File::isSupported(IOStream *stream)
 {
   // An AIFF file has to start with "FORM????AIFF" or "FORM????AIFC".
 
index 611b7338ad52375a7a777ea4111fe319d9b173a9..5ba1a27915ae9a022cd1bde6572482a694b2ffd1 100644 (file)
@@ -132,7 +132,7 @@ namespace TagLib {
          * \note This method is designed to do a quick check.  The result may
          * not necessarily be correct.
          */
-        static bool isValidStream(IOStream *stream);
+        static bool isSupported(IOStream *stream);
 
       private:
         File(const File &);
index 5e92b29e59e96e322b7e0345402142f09f119090..0ebe21c3207d3583f71ebc0ba4fd490e1335f7f0 100644 (file)
@@ -65,7 +65,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool RIFF::WAV::File::isValidStream(IOStream *stream)
+bool RIFF::WAV::File::isSupported(IOStream *stream)
 {
   // A WAV file has to start with "RIFF????WAVE".
 
index 47e8116d1eb44ffaf668e93cf4363f20e7c51774..f6c190ed65c9ff90d3fc34d8100c064dd26f052c 100644 (file)
@@ -182,7 +182,7 @@ namespace TagLib {
          * \note This method is designed to do a quick check.  The result may
          * not necessarily be correct.
          */
-        static bool isValidStream(IOStream *stream);
+        static bool isSupported(IOStream *stream);
 
       private:
         File(const File &);
index c9b62bd7b4d660577e7d2b8904ad7bdfe4aee700..e4de436eda778b164bc6c7cd1ec2d07b81ed95fb 100644 (file)
@@ -77,7 +77,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool TrueAudio::File::isValidStream(IOStream *stream)
+bool TrueAudio::File::isSupported(IOStream *stream)
 {
   // A TrueAudio file has to start with "TTA". An ID3v2 tag may precede.
 
index c5b05d9fe934f7963f31ff991373c229c04bc4fa..3737ac63f30b51a303ce4ee68545e1c88e4239de 100644 (file)
@@ -242,7 +242,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);
index 03f5ee0772ca60bfc8ec5d02cf7bdc27dfa3d564..01bdba36cb5a8b32e46cbf6b88ce4535dc0a4402 100644 (file)
@@ -75,7 +75,7 @@ public:
 // static members
 ////////////////////////////////////////////////////////////////////////////////
 
-bool WavPack::File::isValidStream(IOStream *stream)
+bool WavPack::File::isSupported(IOStream *stream)
 {
   // A WavPack file has to start with "wvpk".
 
index 14bc823bddedb73a6e062f92c4360db4537f6eaa..ccc4ef6e83a5df18bfaa4fb7b99e3c691da510e2 100644 (file)
@@ -206,7 +206,7 @@ namespace TagLib {
        * \note This method is designed to do a quick check.  The result may
        * not necessarily be correct.
        */
-      static bool isValidStream(IOStream *stream);
+      static bool isSupported(IOStream *stream);
 
     private:
       File(const File &);