rifffile.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_RIFFFILE_H
#define TAGLIB_RIFFFILE_H
#include "tfile.h"
#include "taglib_export.h"
namespace TagLib {
namespace RIFF {
class TAGLIB_EXPORT File : public TagLib::File
{
public:
~File() override;
File(const File &) = delete;
File &operator=(const File &) = delete;
protected:
enum Endianness { BigEndian, LittleEndian };
File(FileName file, Endianness endianness);
File(IOStream *stream, Endianness endianness);
unsigned int riffSize() const;
unsigned int chunkCount() const;
offset_t chunkOffset(unsigned int i) const;
unsigned int chunkDataSize(unsigned int i) const;
unsigned int chunkPadding(unsigned int i) const;
ByteVector chunkName(unsigned int i) const;
ByteVector chunkData(unsigned int i);
void setChunkData(unsigned int i, const ByteVector &data);
void setChunkData(const ByteVector &name, const ByteVector &data);
void setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate);
void removeChunk(unsigned int i);
void removeChunk(const ByteVector &name);
private:
void read();
void writeChunk(const ByteVector &name, const ByteVector &data,
offset_t offset, unsigned long replace = 0);
void updateGlobalSize();
class FilePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<FilePrivate> d;
};
} // namespace RIFF
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::File
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
TagLib::File::name
FileName name() const
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
TagLib::RIFF::File::setChunkData
void setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate)
TagLib::RIFF::File::operator=
File & operator=(const File &)=delete
TagLib::RIFF::File::removeChunk
void removeChunk(unsigned int i)
TagLib::RIFF::File::chunkCount
unsigned int chunkCount() const
TagLib::RIFF::File::File
File(const File &)=delete
TagLib::RIFF::File::removeChunk
void removeChunk(const ByteVector &name)
TagLib::RIFF::File::chunkData
ByteVector chunkData(unsigned int i)
TagLib::RIFF::File::setChunkData
void setChunkData(const ByteVector &name, const ByteVector &data)
TagLib::RIFF::File::chunkDataSize
unsigned int chunkDataSize(unsigned int i) const
TagLib::RIFF::File::chunkOffset
offset_t chunkOffset(unsigned int i) const
TagLib::RIFF::File::riffSize
unsigned int riffSize() const
TagLib::RIFF::File::chunkPadding
unsigned int chunkPadding(unsigned int i) const
TagLib::RIFF::File::File
File(FileName file, Endianness endianness)
TagLib::RIFF::File::File
File(IOStream *stream, Endianness endianness)
TagLib::RIFF::File::setChunkData
void setChunkData(unsigned int i, const ByteVector &data)
TagLib::RIFF::File::Endianness
Endianness
Definition rifffile.h:59
TagLib::RIFF::File::BigEndian
@ BigEndian
Definition rifffile.h:59
TagLib::RIFF::File::LittleEndian
@ LittleEndian
Definition rifffile.h:59
TagLib::RIFF::File::chunkName
ByteVector chunkName(unsigned int i) const
TagLib::RIFF::File::~File
~File() override
TagLib::RIFF
An implementation of TagLib::File with RIFF specific methods.
Definition aifffile.h:35
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::FileName
const char * FileName
Definition tiostream.h:59
TagLib::offset_t
off_t offset_t
Definition taglib.h:64
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tfile.h