TagLib API Documentation
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 "tfile.h"
30#include "taglib_export.h"
31#include "tag.h"
32#include "mpcproperties.h"
33
34namespace TagLib {
35
36 class Tag;
37
38 namespace ID3v1 { class Tag; }
39 namespace APE { class Tag; }
40
42
51 namespace MPC {
52
54
64 {
65 public:
70 enum TagTypes {
72 NoTags = 0x0000,
74 ID3v1 = 0x0001,
76 ID3v2 = 0x0002,
78 APE = 0x0004,
80 AllTags = 0xffff
81 };
82
89 File(FileName file, bool readProperties = true,
91
101 File(IOStream *stream, bool readProperties = true,
103
107 ~File() override;
108
109 File(const File &) = delete;
110 File &operator=(const File &) = delete;
111
116 TagLib::Tag *tag() const override;
117
123 PropertyMap properties() const override;
124
125 void removeUnsupportedProperties(const StringList &properties) override;
126
133
138 Properties *audioProperties() const override;
139
145 bool save() override;
146
164 ID3v1::Tag *ID3v1Tag(bool create = false);
165
184 APE::Tag *APETag(bool create = false);
185
195 void strip(int tags = AllTags);
196
202 bool hasID3v1Tag() const;
203
209 bool hasAPETag() const;
210
218 static bool isSupported(IOStream *stream);
219
220 private:
221 void read(bool readProperties);
222
223 class FilePrivate;
225 std::unique_ptr<FilePrivate> d;
226 };
227 } // namespace MPC
228} // namespace TagLib
229
230#endif
An APE tag implementation.
Definition: apetag.h:57
ReadStyle
Definition: audioproperties.h:56
@ Average
Read more of the file and make better values guesses.
Definition: audioproperties.h:60
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
The main class in the ID3v1 implementation.
Definition: id3v1tag.h:115
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:65
An implementation of TagLib::File with MPC specific methods.
Definition: mpcfile.h:64
void strip(int tags=AllTags)
~File() override
Properties * audioProperties() const override
bool save() override
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
bool hasAPETag() const
PropertyMap properties() const override
void removeUnsupportedProperties(const StringList &properties) override
TagTypes
Definition: mpcfile.h:70
APE::Tag * APETag(bool create=false)
File & operator=(const File &)=delete
File(const File &)=delete
TagLib::Tag * tag() const override
bool hasID3v1Tag() const
PropertyMap setProperties(const PropertyMap &) override
ID3v1::Tag * ID3v1Tag(bool create=false)
static bool isSupported(IOStream *stream)
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
An implementation of audio property reading for MPC.
Definition: mpcproperties.h:49
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:123
A list of strings.
Definition: tstringlist.h:44
A simple, generic interface to common audio metadata fields.
Definition: tag.h:49
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
const char * FileName
Definition: tiostream.h:59
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55