Merge pull request #144 from TsudaKageyu/restore-abi2

Restore ABI changed in pull request #60
This commit is contained in:
Tsuda Kageyu 2013-04-16 20:38:29 -07:00
commit 1f819ce2c5
2 changed files with 17 additions and 2 deletions

View File

@ -158,6 +158,11 @@ void RIFF::File::setChunkData(uint i, const ByteVector &data)
d->chunks[i].offset = d->chunks[i-1].offset + 8 + d->chunks[i-1].size + d->chunks[i-1].padding;
}
void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data)
{
setChunkData(name, data, false);
}
void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate)
{
if(d->chunks.size() == 0) {

View File

@ -102,17 +102,27 @@ namespace TagLib {
*/
void setChunkData(uint i, const ByteVector &data);
/*!
* Sets the data for the chunk \a name to \a data. If a chunk with the
* given name already exists it will be overwritten, otherwise it will be
* created after the existing chunks.
*
* \warning This will update the file immediately.
*/
void setChunkData(const ByteVector &name, const ByteVector &data);
/*!
* Sets the data for the chunk \a name to \a data. If a chunk with the
* given name already exists it will be overwritten, otherwise it will be
* created after the existing chunks.
*
* \note If \a alwaysCreate is true, a new chunk is created regardless of
* existence of chunk \a name. It should be used for only "LIST" chunks.
* whether or not the chunk \a name exists. It should only be used for
* "LIST" chunks.
*
* \warning This will update the file immediately.
*/
void setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate = false);
void setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate);
/*!
* Removes the specified chunk.