TagLib  2.0.2
wavfile.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2008 by Scott Wheeler
3  email : wheeler@kde.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_WAVFILE_H
27 #define TAGLIB_WAVFILE_H
28 
29 #include "rifffile.h"
30 #include "id3v2tag.h"
31 #include "infotag.h"
32 #include "wavproperties.h"
33 
34 namespace TagLib {
35 
36  namespace RIFF {
37 
39 
47  namespace WAV {
48 
50 
59  {
60  public:
61  enum TagTypes {
63  NoTags = 0x0000,
65  ID3v2 = 0x0001,
67  Info = 0x0002,
69  AllTags = 0xffff
70  };
71 
81  File(FileName file, bool readProperties = true,
83  ID3v2::FrameFactory *frameFactory = nullptr);
84 
97  File(IOStream *stream, bool readProperties = true,
99  ID3v2::FrameFactory *frameFactory = nullptr);
100 
104  ~File() override;
105 
106  File(const File &) = delete;
107  File &operator=(const File &) = delete;
108 
113  TagLib::Tag *tag() const override;
114 
124  ID3v2::Tag *ID3v2Tag() const;
125 
135  Info::Tag *InfoTag() const;
136 
144  void strip(TagTypes tags = AllTags);
145 
150  PropertyMap properties() const override;
151 
152  void removeUnsupportedProperties(const StringList &unsupported) override;
153 
158  PropertyMap setProperties(const PropertyMap &) override;
159 
164  Properties *audioProperties() const override;
165 
169  bool save() override;
170 
177  bool save(TagTypes tags, StripTags strip = StripOthers,
178  ID3v2::Version version = ID3v2::v4);
179 
185  bool hasID3v2Tag() const;
186 
192  bool hasInfoTag() const;
193 
201  static bool isSupported(IOStream *stream);
202 
203  private:
204  void read(bool readProperties);
205  void removeTagChunks(TagTypes tags);
206 
207  friend class Properties;
208 
209  class FilePrivate;
211  std::unique_ptr<FilePrivate> d;
212  };
213  } // namespace WAV
214  } // namespace RIFF
215 } // namespace TagLib
216 
217 #endif
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:122
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:64
A simple, generic interface to common audio metadata fields.
Definition: tag.h:48
Read more of the file and make better values guesses.
Definition: audioproperties.h:60
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:67
const char * FileName
Definition: tiostream.h:59
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
An implementation of audio property reading for WAV.
Definition: wavproperties.h:48
An implementation of TagLib::File with WAV specific methods.
Definition: wavfile.h:58
ID3v2.4.
Definition: id3v2.h:29
A list of strings.
Definition: tstringlist.h:43
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
TagTypes
Definition: wavfile.h:61
Version
Definition: id3v2.h:27
A RIFF file class with some useful methods specific to RIFF.
Definition: rifffile.h:46
The main class in the ID3v2 implementation.
Definition: id3v2tag.h:133
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
The main class in the INFO tag implementation.
Definition: infotag.h:95