FileRef: Allow an IOStream to be used

This commit is contained in:
Hugo Beauzée-Luyssen
2015-09-15 15:01:40 +02:00
parent 5ca4cd2f52
commit e750cb491d
3 changed files with 60 additions and 18 deletions
+15 -1
View File
@@ -128,7 +128,21 @@ namespace TagLib {
audioPropertiesStyle = AudioProperties::Average);
/*!
* Construct a FileRef using \a file. The FileRef now takes ownership of the
* Construct a FileRef from an opened \a IOStream. If \a readAudioProperties is true then
* the audio properties will be read using \a audioPropertiesStyle. If
* \a readAudioProperties is false then \a audioPropertiesStyle will be
* ignored.
*
* Also see the note in the class documentation about why you may not want to
* use this method in your application.
*/
explicit FileRef(IOStream* stream,
bool readAudioProperties = true,
AudioProperties::ReadStyle
audioPropertiesStyle = AudioProperties::Average);
/*!
* Contruct a FileRef using \a file. The FileRef now takes ownership of the
* pointer and will delete the File when it passes out of scope.
*/
explicit FileRef(File *file);