~ubuntu-branches/ubuntu/wily/kid3/wily

« back to all changes in this revision

Viewing changes to src/core/formats/taglibext/urllinkframe.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell, Patrick Matthäi, Mark Purcell
  • Date: 2013-11-30 15:44:59 UTC
  • mfrom: (1.1.16) (2.1.18 sid)
  • Revision ID: package-import@ubuntu.com-20131130154459-s6lpalx8yy2zq7gx
Tags: 3.0.2-1
* New upstream release 

[ Patrick Matthäi ]
* New upstream release.
  - Add new libreadline-dev build dependency.
* Don't explicitly request xz compression - dpkg 1.17 does this by default.
* Bump Standards-Version to 3.9.5 (no changes needed).
* Fix Vcs-Browser control field.

[ Mark Purcell ]
* Switch to dh - reduce debian/rules bloat
* kid3 Replaces kid3-qt - low popcon, reduce archive bloat
* Fix vcs-field-not-canonical
* debian/compat -> 9
* Update Description:

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
    copyright            : (C) 2002, 2003 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
21
 
 *   USA                                                                   *
22
 
 ***************************************************************************/
23
 
 
24
 
#ifndef TAGLIB_URLLINKFRAME_H
25
 
#define TAGLIB_URLLINKFRAME_H
26
 
 
27
 
#include <id3v2frame.h>
28
 
 
29
 
namespace TagLib {
30
 
 
31
 
  namespace ID3v2 {
32
 
 
33
 
    /*!
34
 
     * An implementation of ID3v2 URL link frames.
35
 
     */
36
 
    class UrlLinkFrame : public Frame {
37
 
      friend class FrameFactory;
38
 
 
39
 
    public:
40
 
      /*!
41
 
       * This is a dual purpose constructor.  \a data can either be binary data
42
 
       * that should be parsed or (at a minimum) the frame ID.
43
 
       */
44
 
      explicit UrlLinkFrame(const ByteVector &data);
45
 
 
46
 
      /*!
47
 
       * Destroys this UrlLinkFrame instance.
48
 
       */
49
 
      virtual ~UrlLinkFrame();
50
 
 
51
 
      /*!
52
 
       * Returns the URL.
53
 
       */
54
 
      virtual String url() const;
55
 
 
56
 
      /*!
57
 
       * Sets the URL to \a s.
58
 
       */
59
 
      virtual void setUrl(const String &s);
60
 
 
61
 
      // Reimplementations.
62
 
 
63
 
      virtual void setText(const String &s);
64
 
      virtual String toString() const;
65
 
 
66
 
    protected:
67
 
      virtual void parseFields(const ByteVector &data);
68
 
      virtual ByteVector renderFields() const;
69
 
 
70
 
      /*!
71
 
       * The constructor used by the FrameFactory.
72
 
       */
73
 
      UrlLinkFrame(const ByteVector &data, Header *h);
74
 
 
75
 
    private:
76
 
      UrlLinkFrame(const UrlLinkFrame &);
77
 
      UrlLinkFrame &operator=(const UrlLinkFrame &);
78
 
 
79
 
      class UrlLinkFramePrivate;
80
 
      UrlLinkFramePrivate *d;
81
 
    };
82
 
 
83
 
    /*!
84
 
     * This is a specialization of URL link frames that allows for
85
 
     * user defined entries.  Each entry has a description in addition to the
86
 
     * normal list of fields that a URL link frame has.
87
 
     *
88
 
     * This description identifies the frame and must be unique.
89
 
     */
90
 
    class UserUrlLinkFrame : public UrlLinkFrame {
91
 
      friend class FrameFactory;
92
 
 
93
 
    public:
94
 
      /*!
95
 
       * Constructs an empty user defined URL link frame.  For this to be
96
 
       * a useful frame both a description and text must be set.
97
 
       */
98
 
      explicit UserUrlLinkFrame(String::Type encoding = String::Latin1);
99
 
 
100
 
      /*!
101
 
       * This is a dual purpose constructor.  \a data can either be binary data
102
 
       * that should be parsed or (at a minimum) the frame ID.
103
 
       */
104
 
      explicit UserUrlLinkFrame(const ByteVector &data);
105
 
 
106
 
      /*!
107
 
       * Destroys this UserUrlLinkFrame instance.
108
 
       */
109
 
      virtual ~UserUrlLinkFrame();
110
 
 
111
 
      // Reimplementations.
112
 
 
113
 
      virtual String toString() const;
114
 
 
115
 
      /*!
116
 
       * Returns the text encoding that will be used in rendering this frame.
117
 
       * This defaults to the type that was either specified in the constructor
118
 
       * or read from the frame when parsed.
119
 
       *
120
 
       * \see setTextEncoding()
121
 
       * \see render()
122
 
       */
123
 
      String::Type textEncoding() const;
124
 
 
125
 
      /*!
126
 
       * Sets the text encoding to be used when rendering this frame to
127
 
       * \a encoding.
128
 
       *
129
 
       * \see textEncoding()
130
 
       * \see render()
131
 
       */
132
 
      void setTextEncoding(String::Type encoding);
133
 
 
134
 
      /*!
135
 
       * Returns the description for this frame.
136
 
       */
137
 
      String description() const;
138
 
 
139
 
      /*!
140
 
       * Sets the description of the frame to \a s.  \a s must be unique.
141
 
       */
142
 
      void setDescription(const String &s);
143
 
 
144
 
    protected:
145
 
      virtual void parseFields(const ByteVector &data);
146
 
      virtual ByteVector renderFields() const;
147
 
 
148
 
      /*!
149
 
       * The constructor used by the FrameFactory.
150
 
       */
151
 
      UserUrlLinkFrame(const ByteVector &data, Header *h);
152
 
 
153
 
    private:
154
 
      UserUrlLinkFrame(const UserUrlLinkFrame &);
155
 
      UserUrlLinkFrame &operator=(const UserUrlLinkFrame &);
156
 
 
157
 
      class UserUrlLinkFramePrivate;
158
 
      UserUrlLinkFramePrivate *d;
159
 
    };
160
 
 
161
 
  }
162
 
}
163
 
#endif