TagLib  2.2.1
matroskafile.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This library is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU Lesser General Public License version *
4  * 2.1 as published by the Free Software Foundation. *
5  * *
6  * This library is distributed in the hope that it will be useful, but *
7  * WITHOUT ANY WARRANTY; without even the implied warranty of *
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
9  * Lesser General Public License for more details. *
10  * *
11  * You should have received a copy of the GNU Lesser General Public *
12  * License along with this library; if not, write to the Free Software *
13  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
14  * 02110-1301 USA *
15  * *
16  * Alternatively, this file is available under the Mozilla Public *
17  * License Version 1.1. You may obtain a copy of the License at *
18  * http://www.mozilla.org/MPL/ *
19  ***************************************************************************/
20 
21 #ifndef TAGLIB_MATROSKAFILE_H
22 #define TAGLIB_MATROSKAFILE_H
23 
24 #include "taglib_export.h"
25 #include "tfile.h"
26 #include "matroskaproperties.h"
27 
29 namespace TagLib::Matroska {
30  class Tag;
31  class Attachments;
32  class Chapters;
33 
35 
40  {
41  public:
49  explicit File(FileName file, bool readProperties = true,
51 
59  explicit File(IOStream *stream, bool readProperties = true,
61 
65  ~File() override;
66 
67  File(const File &) = delete;
68  File &operator=(const File &) = delete;
69 
79  TagLib::Tag *tag() const override;
80 
92  Tag *tag(bool create) const;
93 
97  PropertyMap properties() const override;
98 
99  void removeUnsupportedProperties(const StringList &properties) override;
100 
104  PropertyMap setProperties(const PropertyMap &) override;
105 
111  StringList complexPropertyKeys() const override;
112 
122  List<VariantMap> complexProperties(const String &key) const override;
123 
133  bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
134 
139  Properties *audioProperties() const override;
140 
146  bool save() override;
147 
156  Attachments *attachments(bool create = false) const;
157 
166  Chapters *chapters(bool create = false) const;
167 
175  static bool isSupported(IOStream *stream);
176 
177  private:
178  void read(bool readProperties, Properties::ReadStyle readStyle);
179  class FilePrivate;
180  friend class Properties;
182  std::unique_ptr<FilePrivate> d;
183  };
184 }
185 
186 #endif
A generic, implicitly shared list.
Definition: tlist.h:53
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:122
An implementation of Matroska audio properties.
Definition: matroskaproperties.h:41
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
A file class with some useful methods for tag manipulation.
Definition: tfile.h:50
A wide string class suitable for unicode.
Definition: tstring.h:82
Collection of attached files.
Definition: matroskaattachments.h:41
Read more of the file and make better values guesses.
Definition: audioproperties.h:60
Matroska tag implementation.
Definition: matroskatag.h:43
const char * FileName
Definition: tiostream.h:59
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
A list of strings.
Definition: tstringlist.h:43
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
Collection of chapter editions.
Definition: matroskachapters.h:46
An implementation of Matroska metadata.
Definition: matroskaattachedfile.h:32
An implementation of TagLib::File with Matroska specific methods.
Definition: matroskafile.h:39