1 /***************************************************************************
2 copyright : (C) 2015 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 #include "podcastframe.h"
27
28 using namespace TagLib;
29 using namespace ID3v2;
30
31 class PodcastFrame::PodcastFramePrivate
32 {
33 public:
34 ByteVector fieldData;
35 };
36
37 ////////////////////////////////////////////////////////////////////////////////
38 // public members
39 ////////////////////////////////////////////////////////////////////////////////
40
PodcastFrame()41 PodcastFrame::PodcastFrame() :
42 Frame("PCST"),
43 d(new PodcastFramePrivate())
44 {
45 d->fieldData = ByteVector(4, '\0');
46 }
47
~PodcastFrame()48 PodcastFrame::~PodcastFrame()
49 {
50 delete d;
51 }
52
toString() const53 String PodcastFrame::toString() const
54 {
55 return String();
56 }
57
58 ////////////////////////////////////////////////////////////////////////////////
59 // protected members
60 ////////////////////////////////////////////////////////////////////////////////
61
parseFields(const ByteVector & data)62 void PodcastFrame::parseFields(const ByteVector &data)
63 {
64 d->fieldData = data;
65 }
66
renderFields() const67 ByteVector PodcastFrame::renderFields() const
68 {
69 return d->fieldData;
70 }
71
72 ////////////////////////////////////////////////////////////////////////////////
73 // private members
74 ////////////////////////////////////////////////////////////////////////////////
75
PodcastFrame(const ByteVector & data,Header * h)76 PodcastFrame::PodcastFrame(const ByteVector &data, Header *h) :
77 Frame(h),
78 d(new PodcastFramePrivate())
79 {
80 parseFields(fieldData(data));
81 }
82