]> granicus.if.org Git - taglib/commitdiff
Add forwarders for the property interface to Ogg::FLAC::File.
authorMichael Helmling <helmling@mathematik.uni-kl.de>
Thu, 3 Jan 2013 22:00:17 +0000 (23:00 +0100)
committerMichael Helmling <helmling@mathematik.uni-kl.de>
Thu, 3 Jan 2013 22:00:17 +0000 (23:00 +0100)
Fixes an infinite method resolution recursion in File::properties() and
File::setProperties(). Thanks to Sebastian Rachuj for pointing out this bug.

taglib/ogg/flac/oggflacfile.cpp
taglib/ogg/flac/oggflacfile.h

index b73c5f57ff579f86b49e51b445da624ae372650b..510c01f8464f332ecd5a2615ce07ce7e53e59cfc 100644 (file)
@@ -26,6 +26,7 @@
 #include <tbytevector.h>
 #include <tstring.h>
 #include <tdebug.h>
+#include <tpropertymap.h>
 
 #include <xiphcomment.h>
 #include "oggflacfile.h"
@@ -94,6 +95,16 @@ Ogg::XiphComment *Ogg::FLAC::File::tag() const
   return d->comment;
 }
 
+PropertyMap Ogg::FLAC::File::properties() const
+{
+  return d->comment->properties();
+}
+
+PropertyMap Ogg::FLAC::File::setProperties(const PropertyMap &properties)
+{
+  return d->comment->setProperties(properties);
+}  
+
 Properties *Ogg::FLAC::File::audioProperties() const
 {
   return d->properties;
index 8558cfdfa185a10bf5c9c9739421a3ace7a8c78b..770884a7207a4a92668aa0a4749f76fda925ab68 100644 (file)
@@ -92,12 +92,28 @@ namespace TagLib {
        */
       virtual XiphComment *tag() const;
 
+
+
       /*!
        * Returns the FLAC::Properties for this file.  If no audio properties
        * were read then this will return a null pointer.
        */
       virtual Properties *audioProperties() const;
 
+
+      /*! 
+       * Implements the unified property interface -- export function.
+       * This forwards directly to XiphComment::properties().
+       */
+      PropertyMap properties() const;
+
+      /*! 
+       * Implements the unified tag dictionary interface -- import function.
+       * Like properties(), this is a forwarder to the file's XiphComment.
+       */
+      PropertyMap setProperties(const PropertyMap &); 
+
+
       /*!
        * Save the file.  This will primarily save and update the XiphComment.
        * Returns true if the save is successful.