TagLib API Documentation
popularimeterframe.h
Go to the documentation of this file.
1/***************************************************************************
2 *
3 copyright : (C) 2008 by Lukas Lalinsky
4 email : lalinsky@gmail.com
5 ***************************************************************************/
6
7/***************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License version *
10 * 2.1 as published by the Free Software Foundation. *
11 * *
12 * This library is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15 * Lesser General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with this library; if not, write to the Free Software *
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
20 * 02110-1301 USA *
21 * *
22 * Alternatively, this file is available under the Mozilla Public *
23 * License Version 1.1. You may obtain a copy of the License at *
24 * http://www.mozilla.org/MPL/ *
25 ***************************************************************************/
26
27#ifndef TAGLIB_POPULARIMETERFRAME_H
28#define TAGLIB_POPULARIMETERFRAME_H
29
30#include "taglib_export.h"
31#include "id3v2frame.h"
32
33namespace TagLib {
34
35 namespace ID3v2 {
36
38
45 {
46 friend class FrameFactory;
47
48 public:
53
57 explicit PopularimeterFrame(const ByteVector &data);
58
63
66
72 String toString() const override;
73
77 StringList toStringList() const override;
78
84 String email() const;
85
91 void setEmail(const String &s);
92
98 int rating() const;
99
105 void setRating(int s);
106
112 unsigned int counter() const;
113
119 void setCounter(unsigned int s);
120
121 protected:
122 // Reimplementations.
123
124 void parseFields(const ByteVector &data) override;
125 ByteVector renderFields() const override;
126
127 private:
131 PopularimeterFrame(const ByteVector &data, Header *h);
132
133 class PopularimeterFramePrivate;
135 std::unique_ptr<PopularimeterFramePrivate> d;
136 };
137
138 } // namespace ID3v2
139} // namespace TagLib
140#endif
A byte vector.
Definition: tbytevector.h:46
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:68
ID3v2 frame implementation.
Definition: id3v2frame.h:57
An implementation of ID3v2 headers.
Definition: id3v2header.h:49
An implementation of ID3v2 "popularimeter".
Definition: popularimeterframe.h:45
void setCounter(unsigned int s)
PopularimeterFrame(const PopularimeterFrame &)=delete
String toString() const override
StringList toStringList() const override
PopularimeterFrame(const ByteVector &data)
unsigned int counter() const
PopularimeterFrame & operator=(const PopularimeterFrame &)=delete
ByteVector renderFields() const override
void parseFields(const ByteVector &data) override
void setEmail(const String &s)
A list of strings.
Definition: tstringlist.h:44
A wide string class suitable for unicode.
Definition: tstring.h:83
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55