TagLib  2.2.1
shortenfile.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2020-2024 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_SHORTENFILE_H
27 #define TAGLIB_SHORTENFILE_H
28 
29 #include <memory>
30 
31 #include "taglib_export.h"
32 #include "tfile.h"
33 
34 #include "shortenproperties.h"
35 #include "shortentag.h"
36 
37 namespace TagLib {
38 
40 
45  namespace Shorten {
46 
48 
56  class TAGLIB_EXPORT File : public TagLib::File {
57  public:
65  File(FileName file, bool readProperties = true,
66  AudioProperties::ReadStyle propertiesStyle =
68 
79  File(IOStream *stream, bool readProperties = true,
80  AudioProperties::ReadStyle propertiesStyle =
82 
86  ~File() override;
87 
88  File(const File &) = delete;
89  File &operator=(const File &) = delete;
90 
96  Tag *tag() const override;
97 
101  PropertyMap properties() const override;
102 
106  PropertyMap setProperties(const PropertyMap &) override;
107 
112  Properties *audioProperties() const override;
113 
119  bool save() override;
120 
128  static bool isSupported(IOStream *stream);
129 
130  private:
131  void read(AudioProperties::ReadStyle propertiesStyle);
132 
133  class FilePrivate;
135  std::unique_ptr<FilePrivate> d;
136  };
137  } // namespace Shorten
138 } // namespace TagLib
139 
140 #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 Shorten file tag implementation.
Definition: shortentag.h:41
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
An implementation of audio properties for Shorten.
Definition: shortenproperties.h:40
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
An implementation of TagLib::File with Shorten specific methods.
Definition: shortenfile.h:56
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41