urllinkframe.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2002 - 2008 by Scott Wheeler
3  email : wheeler@kde.org
4  copyright : (C) 2006 by Urs Fleisch
5  email : ufleisch@users.sourceforge.net
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * This library is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU Lesser General Public License version *
11  * 2.1 as published by the Free Software Foundation. *
12  * *
13  * This library is distributed in the hope that it will be useful, but *
14  * WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
21  * 02110-1301 USA *
22  * *
23  * Alternatively, this file is available under the Mozilla Public *
24  * License Version 1.1. You may obtain a copy of the License at *
25  * http://www.mozilla.org/MPL/ *
26  ***************************************************************************/
27 
28 #ifndef TAGLIB_URLLINKFRAME_H
29 #define TAGLIB_URLLINKFRAME_H
30 
31 #include "id3v2frame.h"
32 
33 namespace TagLib {
34 
35  namespace ID3v2 {
36 
38 
42  {
43  friend class FrameFactory;
44 
45  public:
50  explicit UrlLinkFrame(const ByteVector &data);
51 
55  virtual ~UrlLinkFrame();
56 
60  virtual String url() const;
61 
65  virtual void setUrl(const String &s);
66 
67  // Reimplementations.
68 
69  virtual void setText(const String &s);
70  virtual String toString() const;
71 
72  protected:
73  virtual void parseFields(const ByteVector &data);
74  virtual ByteVector renderFields() const;
75 
79  UrlLinkFrame(const ByteVector &data, Header *h);
80 
81  private:
82  UrlLinkFrame(const UrlLinkFrame &);
83  UrlLinkFrame &operator=(const UrlLinkFrame &);
84 
85  class UrlLinkFramePrivate;
86  UrlLinkFramePrivate *d;
87  };
88 
90 
99  {
100  friend class FrameFactory;
101 
102  public:
107  explicit UserUrlLinkFrame(String::Type encoding = String::Latin1);
108 
113  explicit UserUrlLinkFrame(const ByteVector &data);
114 
118  virtual ~UserUrlLinkFrame();
119 
120  // Reimplementations.
121 
122  virtual String toString() const;
123 
132  String::Type textEncoding() const;
133 
141  void setTextEncoding(String::Type encoding);
142 
146  String description() const;
147 
151  void setDescription(const String &s);
152 
153  protected:
154  virtual void parseFields(const ByteVector &data);
155  virtual ByteVector renderFields() const;
156 
160  UserUrlLinkFrame(const ByteVector &data, Header *h);
161 
162  private:
164  UserUrlLinkFrame &operator=(const UserUrlLinkFrame &);
165 
166  class UserUrlLinkFramePrivate;
167  UserUrlLinkFramePrivate *d;
168  };
169 
170  }
171 }
172 #endif