]> granicus.if.org Git - taglib/commitdiff
Add a frameList() overload that accepts a frame ID as a shortcut to the
authorScott Wheeler <wheeler@kde.org>
Thu, 13 May 2004 00:07:30 +0000 (00:07 +0000)
committerScott Wheeler <wheeler@kde.org>
Thu, 13 May 2004 00:07:30 +0000 (00:07 +0000)
frameListMap().

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@310849 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

mpeg/id3v2/id3v2tag.cpp
mpeg/id3v2/id3v2tag.h

index a3a0d60e29227e878028f628700a5c13bf57da40..df0395ba577caa3a19417ea565e83f7d4abf2953 100644 (file)
@@ -250,6 +250,11 @@ const FrameList &ID3v2::Tag::frameList() const
   return d->frameList;
 }
 
+const FrameList &ID3v2::Tag::frameList(const ByteVector &frameID)
+{
+  return d->frameListMap[frameID];
+}
+
 void ID3v2::Tag::addFrame(Frame *frame)
 {
   d->frameList.append(frame);
index ea416174f4e18e8ee8918df9165d6cd2153f2d83..bcc24130df7f41d0a22470236c363a65bf5df0b8 100644 (file)
@@ -199,6 +199,8 @@ namespace TagLib {
        *
        * \warning You should not modify this data structure directly, instead
        * use addFrame() and removeFrame().
+       *
+       * \see frameList()
        */
       const FrameListMap &frameListMap() const;
 
@@ -214,6 +216,19 @@ namespace TagLib {
        */
       const FrameList &frameList() const;
 
+      /*!
+       * Returns the frame list for frames with the id \a frameID or an empty
+       * list if there are no frames of that type.  This is just a convenience
+       * and is equivalent to:
+       *
+       * \code
+       * frameListMap()[frameID];
+       * \endcode
+       *
+       * \see frameListMap()
+       */
+      const FrameList &frameList(const ByteVector &frameID);
+
       /*!
        * Add a frame to the tag.  At this point the tag takes ownership of
        * the frame and will handle freeing its memory.