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

« back to all changes in this revision

Viewing changes to src/plugins/taglibmetadata/taglibext/generalencapsulatedobjectframe.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) 2004 by Scott Wheeler
 
3
    email                : wheeler@kde.org
 
4
    copyright            : (C) 2006 by Aaron VonderHaar
 
5
    email                : avh4@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
 *   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_GENERALENCAPSULATEDOBJECT_H
 
29
#define TAGLIB_GENERALENCAPSULATEDOBJECT_H
 
30
 
 
31
#include <id3v2frame.h>
 
32
#include <id3v2header.h>
 
33
 
 
34
namespace TagLib {
 
35
 
 
36
  namespace ID3v2 {
 
37
 
 
38
    //! An ID3v2 general encapsulated object frame implementation
 
39
 
 
40
    /*!
 
41
     * This is an implementation of ID3v2 general encapsulated objects.  
 
42
     * Arbitrary binary data may be included in tags, stored in GEOB frames.
 
43
     * There may be multiple GEOB frames in a single tag.  Each GEOB it 
 
44
     * labelled with a content description (which may be blank), a required
 
45
     * mime-type, and a file name (may be blank).  The content description
 
46
     * uniquely identifies the GEOB frame in the tag.
 
47
     */
 
48
 
 
49
    class GeneralEncapsulatedObjectFrame : public Frame
 
50
    {
 
51
      friend class FrameFactory;
 
52
 
 
53
    public:
 
54
 
 
55
      /*!
 
56
       * Constructs an empty object frame.  The description, file name and text
 
57
       * encoding should be set manually.
 
58
       */
 
59
      GeneralEncapsulatedObjectFrame();
 
60
 
 
61
      /*!
 
62
       * Constructs a GeneralEncapsulatedObjectFrame frame based on \a data.
 
63
       */
 
64
      explicit GeneralEncapsulatedObjectFrame(const ByteVector &data);
 
65
 
 
66
      /*!
 
67
       * Destroys the GeneralEncapsulatedObjectFrame instance.
 
68
       */
 
69
      virtual ~GeneralEncapsulatedObjectFrame();
 
70
 
 
71
      /*!
 
72
       * Returns a string containing the description, file name and mime-type
 
73
       */
 
74
      virtual String toString() const;
 
75
 
 
76
      /*!
 
77
       * Returns the text encoding used for the description and file name.
 
78
       *
 
79
       * \see setTextEncoding()
 
80
       * \see description()
 
81
       * \see fileName()
 
82
       */
 
83
      String::Type textEncoding() const;
 
84
 
 
85
      /*!
 
86
       * Set the text encoding used for the description and file name.
 
87
       *
 
88
       * \see description()
 
89
       * \see fileName()
 
90
       */
 
91
      void setTextEncoding(String::Type encoding);
 
92
 
 
93
      /*!
 
94
       * Returns the mime type of the object.
 
95
       */
 
96
      String mimeType() const;
 
97
 
 
98
      /*!
 
99
       * Sets the mime type of the object.
 
100
       */
 
101
      void setMimeType(const String &type);
 
102
 
 
103
      /*!
 
104
       * Returns the file name of the object.
 
105
       *
 
106
       * \see setFileName()
 
107
       */
 
108
      String fileName() const;
 
109
 
 
110
      /*!
 
111
       * Sets the file name for the object.
 
112
       *
 
113
       * \see fileName()
 
114
       */
 
115
      void setFileName(const String &name);
 
116
 
 
117
      /*!
 
118
       * Returns the content description of the object.
 
119
       *
 
120
       * \see setDescription()
 
121
       * \see textEncoding()
 
122
       * \see setTextEncoding()
 
123
       */
 
124
 
 
125
      String description() const;
 
126
 
 
127
      /*!
 
128
       * Sets the content description of the object to \a desc.
 
129
       *
 
130
       * \see description()
 
131
       * \see textEncoding()
 
132
       * \see setTextEncoding()
 
133
       */
 
134
 
 
135
      void setDescription(const String &desc);
 
136
 
 
137
      /*!
 
138
       * Returns the object data as a ByteVector.
 
139
       *
 
140
       * \note ByteVector has a data() method that returns a const char * which
 
141
       * should make it easy to export this data to external programs.
 
142
       *
 
143
       * \see setObject()
 
144
       * \see mimeType()
 
145
       */
 
146
      ByteVector object() const;
 
147
 
 
148
      /*!
 
149
       * Sets the object data to \a data.  \a data should be of the type specified in
 
150
       * this frame's mime-type specification.
 
151
       *
 
152
       * \see object()
 
153
       * \see mimeType()
 
154
       * \see setMimeType()
 
155
       */
 
156
      void setObject(const ByteVector &object);
 
157
 
 
158
    protected:
 
159
      virtual void parseFields(const ByteVector &data);
 
160
      virtual ByteVector renderFields() const;
 
161
 
 
162
    private:
 
163
      GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h);
 
164
      GeneralEncapsulatedObjectFrame(const GeneralEncapsulatedObjectFrame &);
 
165
      GeneralEncapsulatedObjectFrame &operator=(const GeneralEncapsulatedObjectFrame &);
 
166
 
 
167
      class GeneralEncapsulatedObjectFramePrivate;
 
168
      GeneralEncapsulatedObjectFramePrivate *d;
 
169
    };
 
170
  }
 
171
}
 
172
 
 
173
#endif