1 /***************************************************************************
2 copyright : (C) 2008 by Serkan Kalyoncu
3 copyright : (C) 2008 by Scott Wheeler
4 email : wheeler@kde.org
5 ***************************************************************************/
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. *
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. *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
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 ***************************************************************************/
27 #ifndef TAGLIB_PRIVATEFRAME_H
28 #define TAGLIB_PRIVATEFRAME_H
30 #include "id3v2frame.h"
31 #include "taglib_export.h"
37 //! An implementation of ID3v2 privateframe
39 class TAGLIB_EXPORT PrivateFrame : public Frame
41 friend class FrameFactory;
45 * Construct an empty private frame.
50 * Construct a private frame based on the data in \a data.
52 * \note This is the constructor used when parsing the frame from a file.
54 explicit PrivateFrame(const ByteVector &data);
57 * Destroys this private frame instance.
59 virtual ~PrivateFrame();
62 * Returns the text of this private frame, currently just the owner.
66 virtual String toString() const;
69 * \return The owner of the private frame.
70 * \note This should contain an email address or link to a website.
77 ByteVector data() const;
80 * Sets the owner of the frame to \a s.
81 * \note This should contain an email address or link to a website.
83 void setOwner(const String &s);
88 void setData(const ByteVector &v);
93 virtual void parseFields(const ByteVector &data);
94 virtual ByteVector renderFields() const;
98 * The constructor used by the FrameFactory.
100 PrivateFrame(const ByteVector &data, Header *h);
102 PrivateFrame(const PrivateFrame &);
103 PrivateFrame &operator=(const PrivateFrame &);
105 class PrivateFramePrivate;
106 PrivateFramePrivate *d;