TagLib  2.2.1
matroskachapter.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2025 by Urs Fleisch
3  email : ufleisch@users.sourceforge.net
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_MATROSKACHAPTER_H
27 #define TAGLIB_MATROSKACHAPTER_H
28 
29 #include <memory>
30 #include "taglib_export.h"
31 #include "tlist.h"
32 
33 namespace TagLib {
34  class String;
35  class ByteVector;
36 
37  namespace EBML {
38  class MkChapters;
39  }
40 
41  namespace Matroska {
44  {
45  public:
47  using UID = unsigned long long;
48 
50  using Time = unsigned long long;
51 
56  {
57  public:
61  Display(const String &string, const String &language);
62 
66  Display(const Display &other);
67 
71  Display(Display &&other) noexcept;
72 
76  ~Display();
77 
81  Display &operator=(const Display &other);
82 
86  Display &operator=(Display &&other) noexcept;
87 
91  void swap(Display &other) noexcept;
92 
96  const String &string() const;
97 
101  const String &language() const;
102 
103  private:
104  class DisplayPrivate;
106  std::unique_ptr<DisplayPrivate> d;
107  };
108 
112  Chapter(Time timeStart, Time timeEnd, const List<Display> &displayList,
113  UID uid, bool hidden = false);
114 
118  Chapter(const Chapter &other);
119 
123  Chapter(Chapter &&other) noexcept;
124 
128  ~Chapter();
129 
133  Chapter &operator=(const Chapter &other);
134 
138  Chapter &operator=(Chapter &&other) noexcept;
139 
143  void swap(Chapter &other) noexcept;
144 
148  UID uid() const;
149 
153  Time timeStart() const;
154 
158  Time timeEnd() const;
159 
163  bool isHidden() const;
164 
168  const List<Display> &displayList() const;
169 
170  private:
171  class ChapterPrivate;
173  std::unique_ptr<ChapterPrivate> d;
174  };
175  }
176 }
177 
178 #endif
A generic, implicitly shared list.
Definition: tlist.h:53
A wide string class suitable for unicode.
Definition: tstring.h:82
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
unsigned long long Time
Timestamp in nanoseconds.
Definition: matroskachapter.h:50
Matroska chapter.
Definition: matroskachapter.h:43
Definition: matroskachapter.h:55
unsigned long long UID
Unique identifier.
Definition: matroskachapter.h:47
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41