Update signature and docs to be more in-line with TagLib's style

This commit is contained in:
Scott Wheeler 2015-05-18 15:35:41 +02:00
parent 650b581f9e
commit 1a5d89d29e
2 changed files with 25 additions and 15 deletions

View File

@ -64,18 +64,21 @@ ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &dat
setData(data);
}
ChapterFrame::ChapterFrame(const ByteVector &eID, const TagLib::uint &sT, const TagLib::uint &eT,
const TagLib::uint &sO, const TagLib::uint &eO, const FrameList &eF) :
ChapterFrame::ChapterFrame(const ByteVector &elementID,
const TagLib::uint &startTime, const TagLib::uint &endTime,
const TagLib::uint &startOffset, const TagLib::uint &endOffset,
const FrameList &embeddedFrames) :
ID3v2::Frame("CHAP")
{
d = new ChapterFramePrivate;
d->elementID = eID;
d->startTime = sT;
d->endTime = eT;
d->startOffset = sO;
d->endOffset = eO;
FrameList l = eF;
for(FrameList::ConstIterator it = l.begin(); it != l.end(); ++it)
d->elementID = elementID;
d->startTime = startTime;
d->endTime = endTime;
d->startOffset = startOffset;
d->endOffset = endOffset;
for(FrameList::ConstIterator it = embeddedFrames.begin();
it != embeddedFrames.end(); ++it)
addEmbeddedFrame(*it);
}

View File

@ -53,17 +53,24 @@ namespace TagLib {
ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data);
/*!
* Creates a chapter frame with the element ID \a eID,
* start time \a sT, end time \a eT, start offset \a sO,
* end offset \a eO and embedded frames, that are in \a eF.
* Creates a chapter frame with the element ID \a elementID, start time
* \a startTime, end time \a endTime, start offset \a startOffset,
* end offset \a endOffset and optionally a list of embeeded frames,
* whose ownership will then be taken over by this Frame, in
* \a embeededFrames;
*
* All times are in milliseconds.
*/
ChapterFrame(const ByteVector &eID, const uint &sT, const uint &eT, const uint &sO,
const uint &eO, const FrameList &eF);
// BIC: There's no reason to use const-references with uints
ChapterFrame(const ByteVector &elementID,
const uint &startTime, const uint &endTime,
const uint &startOffset, const uint &endOffset,
const FrameList &embeddedFrames = FrameList());
/*!
* Destroys the frame.
*/
~ChapterFrame();
virtual ~ChapterFrame();
/*!
* Returns the element ID of the frame. Element ID