| TagLib 1.13 |  |

trueaudiofile.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2006 by Lukáš Lalinský
3 email : lalinsky@gmail.com
4
5 copyright : (C) 2004 by Allan Sandfeld Jensen
6 email : kde@carewolf.org
7 (original MPC implementation)
8 ***************************************************************************/
9
10/***************************************************************************
11 * This library is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU Lesser General Public License version *
13 * 2.1 as published by the Free Software Foundation. *
14 * *
15 * This library is distributed in the hope that it will be useful, but *
16 * WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18 * Lesser General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU Lesser General Public *
21 * License along with this library; if not, write to the Free Software *
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
23 * 02110-1301 USA *
24 * *
25 * Alternatively, this file is available under the Mozilla Public *
26 * License Version 1.1. You may obtain a copy of the License at *
27 * http://www.mozilla.org/MPL/ *
28 ***************************************************************************/
29
30#ifndef TAGLIB_TRUEAUDIOFILE_H
31#define TAGLIB_TRUEAUDIOFILE_H
32
33#include "tfile.h"
34#include "trueaudioproperties.h"
35
36 namespace TagLib {
37
38 class Tag;
39
40 namespace ID3v2 { class Tag; class FrameFactory; }
41 namespace ID3v1 { class Tag; }
42
44
52 namespace TrueAudio {
53
55
63 class TAGLIB_EXPORT File : public TagLib::File
64 {
65 public:
70 enum TagTypes {
72 NoTags = 0x0000,
74 ID3v1 = 0x0001,
76 ID3v2 = 0x0002,
78 AllTags = 0xffff
79 };
80
87 File(FileName file, bool readProperties = true,
88 Properties::ReadStyle propertiesStyle = Properties::Average);
89
99 File(FileName file, ID3v2::FrameFactory *frameFactory,
100 bool readProperties = true,
101 Properties::ReadStyle propertiesStyle = Properties::Average);
102
112 File(IOStream *stream, bool readProperties = true,
113 Properties::ReadStyle propertiesStyle = Properties::Average);
114
127 File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
128 bool readProperties = true,
129 Properties::ReadStyle propertiesStyle = Properties::Average);
130
134 virtual ~File();
135
139 virtual TagLib::Tag *tag() const;
140
146 PropertyMap properties() const;
147
153 PropertyMap setProperties(const PropertyMap &);
154
155 void removeUnsupportedProperties(const StringList &properties);
156
161 virtual Properties *audioProperties() const;
162
169 TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
170
174 virtual bool save();
175
193 ID3v1::Tag *ID3v1Tag(bool create = false);
194
212 ID3v2::Tag *ID3v2Tag(bool create = false);
213
222 void strip(int tags = AllTags);
223
229 bool hasID3v1Tag() const;
230
236 bool hasID3v2Tag() const;
237
245 static bool isSupported(IOStream *stream);
246
247 private:
248 File(const File &);
249 File &operator=(const File &);
250
251 void read(bool readProperties);
252
253 class FilePrivate;
254 FilePrivate *d;
255 };
256 }
257}
258
259#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::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::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
TagLib::TrueAudio::File
An implementation of TagLib::File with TrueAudio specific methods.
Definition: trueaudiofile.h:64
TagLib::TrueAudio::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::TrueAudio::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::TrueAudio::File::File
File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::TrueAudio::File::~File
virtual ~File()
TagLib::TrueAudio::File::setProperties
PropertyMap setProperties(const PropertyMap &)
TagLib::TrueAudio::File::hasID3v1Tag
bool hasID3v1Tag() const
TagLib::TrueAudio::File::strip
void strip(int tags=AllTags)
TagLib::TrueAudio::File::properties
PropertyMap properties() const
TagLib::TrueAudio::File::ID3v1Tag
ID3v1::Tag * ID3v1Tag(bool create=false)
TagLib::TrueAudio::File::hasID3v2Tag
bool hasID3v2Tag() const
TagLib::TrueAudio::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::TrueAudio::File::tag
virtual TagLib::Tag * tag() const
TagLib::TrueAudio::File::setID3v2FrameFactory
TAGLIB_DEPRECATED void setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
TagLib::TrueAudio::File::save
virtual bool save()
TagLib::TrueAudio::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties)
TagLib::TrueAudio::File::TagTypes
TagTypes
Definition: trueaudiofile.h:70
TagLib::TrueAudio::File::File
File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::TrueAudio::File::ID3v2Tag
ID3v2::Tag * ID3v2Tag(bool create=false)
TagLib::TrueAudio::File::audioProperties
virtual Properties * audioProperties() const
TagLib::TrueAudio::Properties
An implementation of audio property reading for TrueAudio.
Definition: trueaudioproperties.h:51
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
TagLib::FileName
const char * FileName
Definition: tiostream.h:57
TAGLIB_DEPRECATED
#define TAGLIB_DEPRECATED
Definition: taglib.h:54
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tfile.h
trueaudioproperties.h