TagLib  2.2.1
dsffile.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2013-2023 Stephen F. Booth
3  email : me@sbooth.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_DSFFILE_H
27 #define TAGLIB_DSFFILE_H
28 
29 #include <memory>
30 
31 #include "taglib_export.h"
32 #include "tfile.h"
33 
34 #include "dsfproperties.h"
35 
36 #include "id3v2tag.h"
37 
38 namespace TagLib {
39 
41 
49  namespace DSF {
50 
52 
60  class TAGLIB_EXPORT File : public TagLib::File {
61  public:
72  File(FileName file, bool readProperties = true,
73  AudioProperties::ReadStyle propertiesStyle =
75  ID3v2::FrameFactory *frameFactory = nullptr);
76 
90  File(IOStream *stream, bool readProperties = true,
91  AudioProperties::ReadStyle propertiesStyle =
93  ID3v2::FrameFactory *frameFactory = nullptr);
94 
98  ~File() override;
99 
103  ID3v2::Tag *tag() const override;
104 
109  PropertyMap properties() const override;
110 
115  PropertyMap setProperties(const PropertyMap &) override;
116 
121  Properties *audioProperties() const override;
122 
128  bool save() override;
129 
135  bool save(ID3v2::Version version);
136 
144  static bool isSupported(IOStream *stream);
145 
146  private:
147  void read(AudioProperties::ReadStyle propertiesStyle);
148 
149  class FilePrivate;
151  std::unique_ptr<FilePrivate> d;
152  };
153  } // namespace DSF
154 } // namespace TagLib
155 
156 #endif
An implementation of audio properties for DSF.
Definition: dsfproperties.h:38
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 file class with some useful methods for tag manipulation.
Definition: tfile.h:50
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
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
Version
Definition: id3v2.h:27
An implementation of TagLib::File with DSF specific methods.
Definition: dsffile.h:60
The main class in the ID3v2 implementation.
Definition: id3v2tag.h:133
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41