From 2185d52f561811582ae2c8b24ea04d7f4beca497 Mon Sep 17 00:00:00 2001 From: Michael Helmling Date: Tue, 14 Feb 2012 21:32:36 +0100 Subject: [PATCH] Ported trueaudio. --- taglib/trueaudio/trueaudiofile.cpp | 18 +++++++++--------- taglib/trueaudio/trueaudiofile.h | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp index 6875dda7..346331df 100644 --- a/taglib/trueaudio/trueaudiofile.cpp +++ b/taglib/trueaudio/trueaudiofile.cpp @@ -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(ID3v2Index, false)->toDict(); + return d->tag.access(ID3v2Index, false)->properties(); if (d->hasID3v1) - return d->tag.access(ID3v1Index, false)->toDict(); - return TagLib::TagDict(); + return d->tag.access(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(ID3v2Index, false)->fromDict(dict); + return d->tag.access(ID3v2Index, false)->setProperties(properties); else if (d->hasID3v1) - d->tag.access(ID3v1Index, false)->fromDict(dict); + return d->tag.access(ID3v1Index, false)->setProperties(properties); else - d->tag.access(ID3v2Index, true)->fromDict(dict); + return d->tag.access(ID3v2Index, true)->setProperties(properties); } TrueAudio::Properties *TrueAudio::File::audioProperties() const diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index 2489c7c4..9b0378f7 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -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