urllinkframe.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2002 - 2008 by Scott Wheeler
3  email : wheeler@kde.org
4 
5  copyright : (C) 2006 by Urs Fleisch
6  email : ufleisch@users.sourceforge.net
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * This library is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU Lesser General Public License version *
12  * 2.1 as published by the Free Software Foundation. *
13  * *
14  * This library is distributed in the hope that it will be useful, but *
15  * WITHOUT ANY WARRANTY; without even the implied warranty of *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
17  * Lesser General Public License for more details. *
18  * *
19  * You should have received a copy of the GNU Lesser General Public *
20  * License along with this library; if not, write to the Free Software *
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
22  * 02110-1301 USA *
23  * *
24  * Alternatively, this file is available under the Mozilla Public *
25  * License Version 1.1. You may obtain a copy of the License at *
26  * http://www.mozilla.org/MPL/ *
27  ***************************************************************************/
28 
29 #ifndef TAGLIB_URLLINKFRAME_H
30 #define TAGLIB_URLLINKFRAME_H
31 
32 #include "id3v2frame.h"
33 
34 namespace TagLib {
35 
36  namespace ID3v2 {
37 
39 
43  {
44  friend class FrameFactory;
45 
46  public:
51  explicit UrlLinkFrame(const ByteVector &data);
52 
56  virtual ~UrlLinkFrame();
57 
61  virtual String url() const;
62 
66  virtual void setUrl(const String &s);
67 
68  // Reimplementations.
69 
70  virtual void setText(const String &s);
71  virtual String toString() const;
72  PropertyMap asProperties() const;
73 
74  protected:
75  virtual void parseFields(const ByteVector &data);
76  virtual ByteVector renderFields() const;
77 
81  UrlLinkFrame(const ByteVector &data, Header *h);
82 
83  private:
84  UrlLinkFrame(const UrlLinkFrame &);
85  UrlLinkFrame &operator=(const UrlLinkFrame &);
86 
87  class UrlLinkFramePrivate;
88  UrlLinkFramePrivate *d;
89  };
90 
92 
101  {
102  friend class FrameFactory;
103 
104  public:
109  explicit UserUrlLinkFrame(String::Type encoding = String::Latin1);
110 
115  explicit UserUrlLinkFrame(const ByteVector &data);
116 
120  virtual ~UserUrlLinkFrame();
121 
122  // Reimplementations.
123 
124  virtual String toString() const;
125 
134  String::Type textEncoding() const;
135 
143  void setTextEncoding(String::Type encoding);
144 
148  String description() const;
149 
153  void setDescription(const String &s);
154 
163  PropertyMap asProperties() const;
164 
169  static UserUrlLinkFrame *find(Tag *tag, const String &description);
170 
171  protected:
172  virtual void parseFields(const ByteVector &data);
173  virtual ByteVector renderFields() const;
174 
178  UserUrlLinkFrame(const ByteVector &data, Header *h);
179 
180  private:
182  UserUrlLinkFrame &operator=(const UserUrlLinkFrame &);
183 
184  class UserUrlLinkFramePrivate;
185  UserUrlLinkFramePrivate *d;
186  };
187 
188  }
189 }
190 #endif
A map for format-independent tag representations.
Definition: tpropertymap.h:108
An implementation of ID3v2 headers.
Definition: id3v2header.h:47
A wide string class suitable for unicode.
Definition: tstring.h:84
A byte vector.
Definition: tbytevector.h:45
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:65
ID3v2 URL frame.
Definition: urllinkframe.h:42
ID3v2 User defined URL frame.
Definition: urllinkframe.h:100
ID3v2 frame implementation.
Definition: id3v2frame.h:54
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
The main class in the ID3v2 implementation.
Definition: id3v2tag.h:135
Type
Definition: tstring.h:97
Definition: tstring.h:101