| TagLib 1.13 |  |

mpcfile.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2004 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_MPCFILE_H
27#define TAGLIB_MPCFILE_H
28
29#include "taglib_export.h"
30#include "tfile.h"
31#include "tag.h"
32
33#include "mpcproperties.h"
34
35#include "tlist.h"
36
37 namespace TagLib {
38
39 class Tag;
40
41 namespace ID3v1 { class Tag; }
42 namespace APE { class Tag; }
43
45
54 namespace MPC {
55
57
66 class TAGLIB_EXPORT File : public TagLib::File
67 {
68 public:
73 enum TagTypes {
75 NoTags = 0x0000,
77 ID3v1 = 0x0001,
79 ID3v2 = 0x0002,
81 APE = 0x0004,
83 AllTags = 0xffff
84 };
85
92 File(FileName file, bool readProperties = true,
93 Properties::ReadStyle propertiesStyle = Properties::Average);
94
104 File(IOStream *stream, bool readProperties = true,
105 Properties::ReadStyle propertiesStyle = Properties::Average);
106
110 virtual ~File();
111
116 virtual TagLib::Tag *tag() const;
117
123 PropertyMap properties() const;
124
125 void removeUnsupportedProperties(const StringList &properties);
126
132 PropertyMap setProperties(const PropertyMap &);
133
138 virtual Properties *audioProperties() const;
139
145 virtual bool save();
146
164 ID3v1::Tag *ID3v1Tag(bool create = false);
165
184 APE::Tag *APETag(bool create = false);
185
195 void strip(int tags = AllTags);
196
201 TAGLIB_DEPRECATED void remove(int tags = AllTags);
202
208 bool hasID3v1Tag() const;
209
215 bool hasAPETag() const;
216
224 static bool isSupported(IOStream *stream);
225
226 private:
227 File(const File &);
228 File &operator=(const File &);
229
230 void read(bool readProperties);
231
232 class FilePrivate;
233 FilePrivate *d;
234 };
235 }
236}
237
238#endif
TagLib::APE::Tag
An APE tag implementation.
Definition: apetag.h:58
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::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:63
TagLib::MPC::File
An implementation of TagLib::File with MPC specific methods.
Definition: mpcfile.h:67
TagLib::MPC::File::strip
void strip(int tags=AllTags)
TagLib::MPC::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::MPC::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties)
TagLib::MPC::File::properties
PropertyMap properties() const
TagLib::MPC::File::hasAPETag
bool hasAPETag() const
TagLib::MPC::File::setProperties
PropertyMap setProperties(const PropertyMap &)
TagLib::MPC::File::tag
virtual TagLib::Tag * tag() const
TagLib::MPC::File::TagTypes
TagTypes
Definition: mpcfile.h:73
TagLib::MPC::File::APETag
APE::Tag * APETag(bool create=false)
TagLib::MPC::File::hasID3v1Tag
bool hasID3v1Tag() const
TagLib::MPC::File::ID3v1Tag
ID3v1::Tag * ID3v1Tag(bool create=false)
TagLib::MPC::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::MPC::File::~File
virtual ~File()
TagLib::MPC::File::remove
TAGLIB_DEPRECATED void remove(int tags=AllTags)
TagLib::MPC::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::MPC::File::audioProperties
virtual Properties * audioProperties() const
TagLib::MPC::File::save
virtual bool save()
TagLib::MPC::Properties
An implementation of audio property reading for MPC.
Definition: mpcproperties.h:48
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
mpcproperties.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