aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTsuda Kageyu <tsuda.kageyu@gmail.com>2017-02-07 22:36:56 +0900
committerTsuda Kageyu <tsuda.kageyu@gmail.com>2017-02-07 22:36:56 +0900
commitf76b1e54296a71ec52664ebb411a2ba127ede67d (patch)
tree100222e16bf7b1aab27ef705a3dc8c64e1c3e1c1
parentd4d8410c081d910891e4d8821bb46c06482d297e (diff)
Rename the functions 'isValidStream' to 'isSupported'.
The name 'isValidStream' is a little misleading because it doesn't check if the stream is really valid. Additionally, 'isSupported' can be naturally overloaded.
-rw-r--r--taglib/ape/apefile.cpp2
-rw-r--r--taglib/ape/apefile.h2
-rw-r--r--taglib/asf/asffile.cpp2
-rw-r--r--taglib/asf/asffile.h2
-rw-r--r--taglib/fileref.cpp30
-rw-r--r--taglib/flac/flacfile.cpp2
-rw-r--r--taglib/flac/flacfile.h2
-rw-r--r--taglib/mp4/mp4file.cpp2
-rw-r--r--taglib/mp4/mp4file.h2
-rw-r--r--taglib/mpc/mpcfile.cpp2
-rw-r--r--taglib/mpc/mpcfile.h2
-rw-r--r--taglib/mpeg/mpegfile.cpp2
-rw-r--r--taglib/mpeg/mpegfile.h2
-rw-r--r--taglib/ogg/flac/oggflacfile.cpp2
-rw-r--r--taglib/ogg/flac/oggflacfile.h2
-rw-r--r--taglib/ogg/opus/opusfile.cpp2
-rw-r--r--taglib/ogg/opus/opusfile.h2
-rw-r--r--taglib/ogg/speex/speexfile.cpp2
-rw-r--r--taglib/ogg/speex/speexfile.h2
-rw-r--r--taglib/ogg/vorbis/vorbisfile.cpp2
-rw-r--r--taglib/ogg/vorbis/vorbisfile.h2
-rw-r--r--taglib/riff/aiff/aifffile.cpp2
-rw-r--r--taglib/riff/aiff/aifffile.h2
-rw-r--r--taglib/riff/wav/wavfile.cpp2
-rw-r--r--taglib/riff/wav/wavfile.h2
-rw-r--r--taglib/trueaudio/trueaudiofile.cpp2
-rw-r--r--taglib/trueaudio/trueaudiofile.h2
-rw-r--r--taglib/wavpack/wavpackfile.cpp2
-rw-r--r--taglib/wavpack/wavpackfile.h2
29 files changed, 43 insertions, 43 deletions
diff --git a/taglib/ape/apefile.cpp b/taglib/ape/apefile.cpp
index fb01e4a2..a10c1f64 100644
--- a/taglib/ape/apefile.cpp
+++ b/taglib/ape/apefile.cpp
@@ -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.
diff --git a/taglib/ape/apefile.h b/taglib/ape/apefile.h
index a7c870b4..267778ba 100644
--- a/taglib/ape/apefile.h
+++ b/taglib/ape/apefile.h
@@ -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 &);
diff --git a/taglib/asf/asffile.cpp b/taglib/asf/asffile.cpp
index c209a640..d5a80bca 100644
--- a/taglib/asf/asffile.cpp
+++ b/taglib/asf/asffile.cpp
@@ -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.
diff --git a/taglib/asf/asffile.h b/taglib/asf/asffile.h
index 7df5a797..05cf4ee2 100644
--- a/taglib/asf/asffile.h
+++ b/taglib/asf/asffile.h
@@ -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();
diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp
index cad1ae50..d5df2a11 100644
--- a/taglib/fileref.cpp
+++ b/taglib/fileref.cpp
@@ -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())
diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp
index 780ab1c3..7f437194 100644
--- a/taglib/flac/flacfile.cpp
+++ b/taglib/flac/flacfile.cpp
@@ -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.
diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h
index 56755ec5..645090e0 100644
--- a/taglib/flac/flacfile.h
+++ b/taglib/flac/flacfile.h
@@ -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 &);
diff --git a/taglib/mp4/mp4file.cpp b/taglib/mp4/mp4file.cpp
index f06ae068..5ad8396d 100644
--- a/taglib/mp4/mp4file.cpp
+++ b/taglib/mp4/mp4file.cpp
@@ -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.
diff --git a/taglib/mp4/mp4file.h b/taglib/mp4/mp4file.h
index ca2f70de..8a46d17d 100644
--- a/taglib/mp4/mp4file.h
+++ b/taglib/mp4/mp4file.h
@@ -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);
diff --git a/taglib/mpc/mpcfile.cpp b/taglib/mpc/mpcfile.cpp
index b8544bb8..0ffaf893 100644
--- a/taglib/mpc/mpcfile.cpp
+++ b/taglib/mpc/mpcfile.cpp
@@ -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.
diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h
index 43759ea5..89a866e3 100644
--- a/taglib/mpc/mpcfile.h
+++ b/taglib/mpc/mpcfile.h
@@ -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 &);
diff --git a/taglib/mpeg/mpegfile.cpp b/taglib/mpeg/mpegfile.cpp
index 74f304f8..75478ed8 100644
--- a/taglib/mpeg/mpegfile.cpp
+++ b/taglib/mpeg/mpegfile.cpp
@@ -95,7 +95,7 @@ namespace
};
}
-bool MPEG::File::isValidStream(IOStream *stream)
+bool MPEG::File::isSupported(IOStream *stream)
{
if(!stream || !stream->isOpen())
return false;
diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h
index 71410fe7..2d2dff00 100644
--- a/taglib/mpeg/mpegfile.h
+++ b/taglib/mpeg/mpegfile.h
@@ -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 &);
diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp
index e294d411..53d04508 100644
--- a/taglib/ogg/flac/oggflacfile.cpp
+++ b/taglib/ogg/flac/oggflacfile.cpp
@@ -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.
diff --git a/taglib/ogg/flac/oggflacfile.h b/taglib/ogg/flac/oggflacfile.h
index 5f4313da..b2686e45 100644
--- a/taglib/ogg/flac/oggflacfile.h
+++ b/taglib/ogg/flac/oggflacfile.h
@@ -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 &);
diff --git a/taglib/ogg/opus/opusfile.cpp b/taglib/ogg/opus/opusfile.cpp
index 85d995bc..d4f191ad 100644
--- a/taglib/ogg/opus/opusfile.cpp
+++ b/taglib/ogg/opus/opusfile.cpp
@@ -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.
diff --git a/taglib/ogg/opus/opusfile.h b/taglib/ogg/opus/opusfile.h
index 60f60c3f..0e094eae 100644
--- a/taglib/ogg/opus/opusfile.h
+++ b/taglib/ogg/opus/opusfile.h
@@ -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 &);
diff --git a/taglib/ogg/speex/speexfile.cpp b/taglib/ogg/speex/speexfile.cpp
index d3368774..b3c8a636 100644
--- a/taglib/ogg/speex/speexfile.cpp
+++ b/taglib/ogg/speex/speexfile.cpp
@@ -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.
diff --git a/taglib/ogg/speex/speexfile.h b/taglib/ogg/speex/speexfile.h
index eda347e0..1be7113c 100644
--- a/taglib/ogg/speex/speexfile.h
+++ b/taglib/ogg/speex/speexfile.h
@@ -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 &);
diff --git a/taglib/ogg/vorbis/vorbisfile.cpp b/taglib/ogg/vorbis/vorbisfile.cpp
index 7f02fff5..b4f221ab 100644
--- a/taglib/ogg/vorbis/vorbisfile.cpp
+++ b/taglib/ogg/vorbis/vorbisfile.cpp
@@ -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.
diff --git a/taglib/ogg/vorbis/vorbisfile.h b/taglib/ogg/vorbis/vorbisfile.h
index 9f7cb7e4..04c0c04e 100644
--- a/taglib/ogg/vorbis/vorbisfile.h
+++ b/taglib/ogg/vorbis/vorbisfile.h
@@ -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 &);
diff --git a/taglib/riff/aiff/aifffile.cpp b/taglib/riff/aiff/aifffile.cpp
index 72705a9a..4f9c868e 100644
--- a/taglib/riff/aiff/aifffile.cpp
+++ b/taglib/riff/aiff/aifffile.cpp
@@ -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".
diff --git a/taglib/riff/aiff/aifffile.h b/taglib/riff/aiff/aifffile.h
index 611b7338..5ba1a279 100644
--- a/taglib/riff/aiff/aifffile.h
+++ b/taglib/riff/aiff/aifffile.h
@@ -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 &);
diff --git a/taglib/riff/wav/wavfile.cpp b/taglib/riff/wav/wavfile.cpp
index 5e92b29e..0ebe21c3 100644
--- a/taglib/riff/wav/wavfile.cpp
+++ b/taglib/riff/wav/wavfile.cpp
@@ -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".
diff --git a/taglib/riff/wav/wavfile.h b/taglib/riff/wav/wavfile.h
index 47e8116d..f6c190ed 100644
--- a/taglib/riff/wav/wavfile.h
+++ b/taglib/riff/wav/wavfile.h
@@ -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 &);
diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp
index c9b62bd7..e4de436e 100644
--- a/taglib/trueaudio/trueaudiofile.cpp
+++ b/taglib/trueaudio/trueaudiofile.cpp
@@ -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.
diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h
index c5b05d9f..3737ac63 100644
--- a/taglib/trueaudio/trueaudiofile.h
+++ b/taglib/trueaudio/trueaudiofile.h
@@ -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 &);
diff --git a/taglib/wavpack/wavpackfile.cpp b/taglib/wavpack/wavpackfile.cpp
index 03f5ee07..01bdba36 100644
--- a/taglib/wavpack/wavpackfile.cpp
+++ b/taglib/wavpack/wavpackfile.cpp
@@ -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".
diff --git a/taglib/wavpack/wavpackfile.h b/taglib/wavpack/wavpackfile.h
index 14bc823b..ccc4ef6e 100644
--- a/taglib/wavpack/wavpackfile.h
+++ b/taglib/wavpack/wavpackfile.h
@@ -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 &);