From: Scott Wheeler Date: Fri, 1 Feb 2008 04:15:59 +0000 (+0000) Subject: show ape tags in the framelist X-Git-Tag: v1.5~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aedbaeaf5a0e9a97ec160689d0ee36403882d04d;p=taglib show ape tags in the framelist git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@769307 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- diff --git a/examples/Makefile.am b/examples/Makefile.am index c00f4870..bfb0f77f 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -8,6 +8,7 @@ strip_id3v1_SOURCES = strip-id3v1.cpp INCLUDES = \ -I$(top_srcdir)/taglib \ -I$(top_srcdir)/taglib/toolkit \ + -I$(top_srcdir)/taglib/ape \ -I$(top_srcdir)/taglib/mpeg \ -I$(top_srcdir)/taglib/mpeg/id3v1 \ -I$(top_srcdir)/taglib/mpeg/id3v2 \ diff --git a/examples/framelist.cpp b/examples/framelist.cpp index 01dfea06..58a4c32c 100644 --- a/examples/framelist.cpp +++ b/examples/framelist.cpp @@ -36,6 +36,8 @@ #include +#include + using namespace std; using namespace TagLib; @@ -86,6 +88,20 @@ int main(int argc, char *argv[]) else cout << "file does not have a valid id3v1 tag" << endl; + APE::Tag *ape = f.APETag(); + + cout << endl << "APE" << endl; + + if(ape) { + for(APE::ItemListMap::ConstIterator it = ape->itemListMap().begin(); + it != ape->itemListMap().end(); ++it) + { + cout << (*it).first << " - \"" << (*it).second.toString() << "\"" << endl; + } + } + else + cout << "file does not have a valid APE tag" << endl; + cout << endl; } }