]> granicus.if.org Git - taglib/commitdiff
Ported trueaudio.
authorMichael Helmling <helmling@mathematik.uni-kl.de>
Tue, 14 Feb 2012 20:32:36 +0000 (21:32 +0100)
committerMichael Helmling <helmling@mathematik.uni-kl.de>
Tue, 14 Feb 2012 20:32:36 +0000 (21:32 +0100)
taglib/trueaudio/trueaudiofile.cpp
taglib/trueaudio/trueaudiofile.h

index 6875dda77cb76fdd2e94c35f7479727807a30571..346331df202d97198e92137a4d070773df3155b1 100644 (file)
@@ -127,25 +127,25 @@ TagLib::Tag *TrueAudio::File::tag() const
   return &d->tag;
 }
 
-TagLib::TagDict TrueAudio::File::toDict(void) const
+PropertyMap TrueAudio::File::properties() const
 {
-  // once Tag::toDict() is virtual, this case distinction could actually be done
+  // once Tag::properties() is virtual, this case distinction could actually be done
   // within TagUnion.
   if (d->hasID3v2)
-    return d->tag.access<ID3v2::Tag>(ID3v2Index, false)->toDict();
+    return d->tag.access<ID3v2::Tag>(ID3v2Index, false)->properties();
   if (d->hasID3v1)
-    return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->toDict();
-  return TagLib::TagDict();
+    return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->properties();
+  return PropertyMap();
 }
 
-void TrueAudio::File::fromDict(const TagDict &dict)
+PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties)
 {
   if (d->hasID3v2)
-    d->tag.access<ID3v2::Tag>(ID3v2Index, false)->fromDict(dict);
+    return d->tag.access<ID3v2::Tag>(ID3v2Index, false)->setProperties(properties);
   else if (d->hasID3v1)
-    d->tag.access<ID3v1::Tag>(ID3v1Index, false)->fromDict(dict);
+    return d->tag.access<ID3v1::Tag>(ID3v1Index, false)->setProperties(properties);
   else
-    d->tag.access<ID3v2::Tag>(ID3v2Index, true)->fromDict(dict);
+    return d->tag.access<ID3v2::Tag>(ID3v2Index, true)->setProperties(properties);
 }
 
 TrueAudio::Properties *TrueAudio::File::audioProperties() const
index 2489c7c4fddfd7a1e72fcd4b85ca3c6910a42954..9b0378f7dade3658e912f529622902ce3d68bf6a 100644 (file)
@@ -125,18 +125,18 @@ namespace TagLib {
       virtual TagLib::Tag *tag() const;
 
       /*!
-       * Implements the unified tag dictionary interface -- export function.
+       * Implements the unified property interface -- export function.
        * If the file contains both ID3v1 and v2 tags, only ID3v2 will be
-       * converted to the TagDict.
+       * converted to the PropertyMap.
        */
-      TagDict toDict() const;
+      PropertyMap properties() const;
 
       /*!
-       * Implements the unified tag dictionary interface -- import function.
+       * Implements the unified property interface -- import function.
        * As with the export, only one tag is taken into account. If the file
        * has no tag at all, ID3v2 will be created.
        */
-      void fromDict(const TagDict &);
+      PropertyMap setProperties(const PropertyMap &);
 
       /*!
        * Returns the TrueAudio::Properties for this file.  If no audio properties