| TagLib 1.13 |  |

flacfile.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2003 by Allan Sandfeld Jensen
3 email : kde@carewolf.org
4 ***************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_FLACFILE_H
27#define TAGLIB_FLACFILE_H
28
29#include "taglib_export.h"
30#include "tfile.h"
31#include "tlist.h"
32#include "tag.h"
33
34#include "flacpicture.h"
35#include "flacproperties.h"
36
37 namespace TagLib {
38
39 class Tag;
40 namespace ID3v2 { class FrameFactory; class Tag; }
41 namespace ID3v1 { class Tag; }
42 namespace Ogg { class XiphComment; }
43
45
55 namespace FLAC {
56
58
66 class TAGLIB_EXPORT File : public TagLib::File
67 {
68 public:
73 enum TagTypes {
75 NoTags = 0x0000,
77 XiphComment = 0x0001,
79 ID3v1 = 0x0002,
81 ID3v2 = 0x0004,
83 AllTags = 0xffff
84 };
85
95 File(FileName file, bool readProperties = true,
96 Properties::ReadStyle propertiesStyle = Properties::Average);
97
107 // BIC: merge with the above constructor
108 File(FileName file, ID3v2::FrameFactory *frameFactory,
109 bool readProperties = true,
110 Properties::ReadStyle propertiesStyle = Properties::Average);
111
124 // BIC: merge with the above constructor
125 File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
126 bool readProperties = true,
127 Properties::ReadStyle propertiesStyle = Properties::Average);
128
132 virtual ~File();
133
142 virtual TagLib::Tag *tag() const;
143
150 PropertyMap properties() const;
151
152 void removeUnsupportedProperties(const StringList &);
153
161 PropertyMap setProperties(const PropertyMap &);
162
167 virtual Properties *audioProperties() const;
168
176 virtual bool save();
177
195 ID3v2::Tag *ID3v2Tag(bool create = false);
196
214 ID3v1::Tag *ID3v1Tag(bool create = false);
215
233 Ogg::XiphComment *xiphComment(bool create = false);
234
243 TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
244
251 TAGLIB_DEPRECATED ByteVector streamInfoData(); // BIC: remove
252
259 TAGLIB_DEPRECATED long streamLength(); // BIC: remove
260
264 List<Picture *> pictureList();
265
270 void removePicture(Picture *picture, bool del = true);
271
275 void removePictures();
276
283 void addPicture(Picture *picture);
284
298 void strip(int tags = AllTags);
299
305 bool hasXiphComment() const;
306
312 bool hasID3v1Tag() const;
313
319 bool hasID3v2Tag() const;
320
328 static bool isSupported(IOStream *stream);
329
330 private:
331 File(const File &);
332 File &operator=(const File &);
333
334 void read(bool readProperties);
335 void scan();
336
337 class FilePrivate;
338 FilePrivate *d;
339 };
340 }
341}
342
343#endif
TagLib::AudioProperties::ReadStyle
ReadStyle
Definition: audioproperties.h:53
TagLib::AudioProperties::Average
@ Average
Read more of the file and make better values guesses.
Definition: audioproperties.h:57
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::FLAC::File
An implementation of TagLib::File with FLAC specific methods.
Definition: flacfile.h:67
TagLib::FLAC::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::FLAC::File::File
File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::FLAC::File::removePictures
void removePictures()
TagLib::FLAC::File::setID3v2FrameFactory
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
TagLib::FLAC::File::hasID3v1Tag
bool hasID3v1Tag() const
TagLib::FLAC::File::streamLength
TAGLIB_DEPRECATED long streamLength()
TagLib::FLAC::File::File
File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::FLAC::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::FLAC::File::pictureList
List< Picture * > pictureList()
TagLib::FLAC::File::hasID3v2Tag
bool hasID3v2Tag() const
TagLib::FLAC::File::ID3v1Tag
ID3v1::Tag * ID3v1Tag(bool create=false)
TagLib::FLAC::File::save
virtual bool save()
TagLib::FLAC::File::addPicture
void addPicture(Picture *picture)
TagLib::FLAC::File::setProperties
PropertyMap setProperties(const PropertyMap &)
TagLib::FLAC::File::tag
virtual TagLib::Tag * tag() const
TagLib::FLAC::File::hasXiphComment
bool hasXiphComment() const
TagLib::FLAC::File::xiphComment
Ogg::XiphComment * xiphComment(bool create=false)
TagLib::FLAC::File::properties
PropertyMap properties() const
TagLib::FLAC::File::audioProperties
virtual Properties * audioProperties() const
TagLib::FLAC::File::removePicture
void removePicture(Picture *picture, bool del=true)
TagLib::FLAC::File::~File
virtual ~File()
TagLib::FLAC::File::TagTypes
TagTypes
Definition: flacfile.h:73
TagLib::FLAC::File::strip
void strip(int tags=AllTags)
TagLib::FLAC::File::ID3v2Tag
ID3v2::Tag * ID3v2Tag(bool create=false)
TagLib::FLAC::File::streamInfoData
TAGLIB_DEPRECATED ByteVector streamInfoData()
TagLib::FLAC::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &)
TagLib::FLAC::Picture
Definition: flacpicture.h:40
TagLib::FLAC::Properties
An implementation of audio property reading for FLAC.
Definition: flacproperties.h:46
TagLib::File
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
TagLib::ID3v1::Tag
The main class in the ID3v1 implementation.
Definition: id3v1tag.h:106
TagLib::ID3v2::FrameFactory
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:66
TagLib::ID3v2::Tag
The main class in the ID3v2 implementation.
Definition: id3v2tag.h:128
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:63
TagLib::List
A generic, implicitly shared list.
Definition: tlist.h:54
TagLib::Ogg::XiphComment
Ogg Vorbis comment implementation.
Definition: xiphcomment.h:71
TagLib::PropertyMap
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
TagLib::StringList
A list of strings.
Definition: tstringlist.h:46
TagLib::Tag
Definition: tag.h:47
flacpicture.h
flacproperties.h
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
TagLib::FileName
const char * FileName
Definition: tiostream.h:57
tag.h
TAGLIB_DEPRECATED
#define TAGLIB_DEPRECATED
Definition: taglib.h:54
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tfile.h
tlist.h