rtaglib 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +84 -9
  3. data/README.txt +0 -0
  4. data/Rakefile +30 -27
  5. data/{test/data → data}/440Hz-5sec.flac +0 -0
  6. data/{test/data → data}/440Hz-5sec.mp3 +0 -0
  7. data/{test/data → data}/440Hz-5sec.mpc +0 -0
  8. data/{test/data → data}/440Hz-5sec.ogg +0 -0
  9. data/{test/data → data}/440Hz-5sec.wv +0 -0
  10. data/data/test_jason.mp3 +0 -0
  11. data/data/test_jason.ogg +0 -0
  12. data/ext/Rakefile +10 -0
  13. data/ext/tagfile/Rakefile.rb +42 -0
  14. data/ext/tagfile/rake_ext_conf.rb +29 -0
  15. data/ext/tagfile/tagfile.c +11 -7
  16. data/ext/taglib/Rakefile.rb +48 -0
  17. data/ext/taglib/rake_ext_conf.rb +33 -0
  18. data/ext/taglib/taglib-mswin32/bin/tag.dll +0 -0
  19. data/ext/taglib/taglib-mswin32/bin/tag_c.dll +0 -0
  20. data/ext/taglib/taglib-mswin32/bin/tag_cd.dll +0 -0
  21. data/ext/taglib/taglib-mswin32/bin/tagd.dll +0 -0
  22. data/ext/taglib/taglib-mswin32/bin/taglib-config +55 -0
  23. data/ext/taglib/taglib-mswin32/include/taglib/apefooter.h +173 -0
  24. data/ext/taglib/taglib-mswin32/include/taglib/apeitem.h +204 -0
  25. data/ext/taglib/taglib-mswin32/include/taglib/apetag.h +162 -0
  26. data/ext/taglib/taglib-mswin32/include/taglib/attachedpictureframe.h +220 -0
  27. data/ext/taglib/taglib-mswin32/include/taglib/audioproperties.h +110 -0
  28. data/ext/taglib/taglib-mswin32/include/taglib/commentsframe.h +168 -0
  29. data/ext/taglib/taglib-mswin32/include/taglib/fileref.h +262 -0
  30. data/ext/taglib/taglib-mswin32/include/taglib/flacfile.h +201 -0
  31. data/ext/taglib/taglib-mswin32/include/taglib/flacproperties.h +92 -0
  32. data/ext/taglib/taglib-mswin32/include/taglib/generalencapsulatedobjectframe.h +174 -0
  33. data/ext/taglib/taglib-mswin32/include/taglib/id3v1genres.h +66 -0
  34. data/ext/taglib/taglib-mswin32/include/taglib/id3v1tag.h +180 -0
  35. data/ext/taglib/taglib-mswin32/include/taglib/id3v2extendedheader.h +93 -0
  36. data/ext/taglib/taglib-mswin32/include/taglib/id3v2footer.h +82 -0
  37. data/ext/taglib/taglib-mswin32/include/taglib/id3v2frame.h +414 -0
  38. data/ext/taglib/taglib-mswin32/include/taglib/id3v2framefactory.h +167 -0
  39. data/ext/taglib/taglib-mswin32/include/taglib/id3v2header.h +175 -0
  40. data/ext/taglib/taglib-mswin32/include/taglib/id3v2synchdata.h +70 -0
  41. data/ext/taglib/taglib-mswin32/include/taglib/id3v2tag.h +300 -0
  42. data/ext/taglib/taglib-mswin32/include/taglib/mpcfile.h +175 -0
  43. data/ext/taglib/taglib-mswin32/include/taglib/mpcproperties.h +85 -0
  44. data/ext/taglib/taglib-mswin32/include/taglib/mpegfile.h +277 -0
  45. data/ext/taglib/taglib-mswin32/include/taglib/mpegheader.h +166 -0
  46. data/ext/taglib/taglib-mswin32/include/taglib/mpegproperties.h +118 -0
  47. data/ext/taglib/taglib-mswin32/include/taglib/oggfile.h +112 -0
  48. data/ext/taglib/taglib-mswin32/include/taglib/oggflacfile.h +118 -0
  49. data/ext/taglib/taglib-mswin32/include/taglib/oggpage.h +203 -0
  50. data/ext/taglib/taglib-mswin32/include/taglib/oggpageheader.h +232 -0
  51. data/ext/taglib/taglib-mswin32/include/taglib/relativevolumeframe.h +274 -0
  52. data/ext/taglib/taglib-mswin32/include/taglib/speexfile.h +99 -0
  53. data/ext/taglib/taglib-mswin32/include/taglib/speexproperties.h +89 -0
  54. data/ext/taglib/taglib-mswin32/include/taglib/tag.h +173 -0
  55. data/ext/taglib/taglib-mswin32/include/taglib/tag_c.h +288 -0
  56. data/ext/taglib/taglib-mswin32/include/taglib/taglib.h +177 -0
  57. data/ext/taglib/taglib-mswin32/include/taglib/taglib_export.h +39 -0
  58. data/ext/taglib/taglib-mswin32/include/taglib/tbytevector.h +409 -0
  59. data/ext/taglib/taglib-mswin32/include/taglib/tbytevectorlist.h +91 -0
  60. data/ext/taglib/taglib-mswin32/include/taglib/textidentificationframe.h +258 -0
  61. data/ext/taglib/taglib-mswin32/include/taglib/tfile.h +271 -0
  62. data/ext/taglib/taglib-mswin32/include/taglib/tlist.h +252 -0
  63. data/ext/taglib/taglib-mswin32/include/taglib/tlist.tcc +316 -0
  64. data/ext/taglib/taglib-mswin32/include/taglib/tmap.h +200 -0
  65. data/ext/taglib/taglib-mswin32/include/taglib/tmap.tcc +196 -0
  66. data/ext/taglib/taglib-mswin32/include/taglib/trueaudiofile.h +180 -0
  67. data/ext/taglib/taglib-mswin32/include/taglib/trueaudioproperties.h +93 -0
  68. data/ext/taglib/taglib-mswin32/include/taglib/tstring.h +456 -0
  69. data/ext/taglib/taglib-mswin32/include/taglib/tstringlist.h +115 -0
  70. data/ext/taglib/taglib-mswin32/include/taglib/uniquefileidentifierframe.h +113 -0
  71. data/ext/taglib/taglib-mswin32/include/taglib/unknownframe.h +79 -0
  72. data/ext/taglib/taglib-mswin32/include/taglib/unsynchronizedlyricsframe.h +157 -0
  73. data/ext/taglib/taglib-mswin32/include/taglib/urllinkframe.h +172 -0
  74. data/ext/taglib/taglib-mswin32/include/taglib/vorbisfile.h +118 -0
  75. data/ext/taglib/taglib-mswin32/include/taglib/vorbisproperties.h +125 -0
  76. data/ext/taglib/taglib-mswin32/include/taglib/wavpackfile.h +164 -0
  77. data/ext/taglib/taglib-mswin32/include/taglib/wavpackproperties.h +94 -0
  78. data/ext/taglib/taglib-mswin32/include/taglib/xingheader.h +100 -0
  79. data/ext/taglib/taglib-mswin32/include/taglib/xiphcomment.h +202 -0
  80. data/ext/taglib/taglib-mswin32/lib/pkgconfig/taglib_c.pc +12 -0
  81. data/ext/taglib/taglib-mswin32/lib/tag.lib +0 -0
  82. data/ext/taglib/taglib-mswin32/lib/tag_c.lib +0 -0
  83. data/ext/taglib/taglib_i386-mingw32.source +22645 -0
  84. data/ext/taglib/taglib_i386-mswin32.source +22645 -0
  85. data/ext/taglib/{taglib.cxx → taglib_x86_64-linux.source} +508 -75
  86. data/lib/TagLib.rb +3 -2
  87. data/lib/TagLib_doc.rb +1532 -1526
  88. data/lib/rtaglib_mswin32.rb +4 -0
  89. data/lib/tagfile.rb +6 -0
  90. data/swig/Doxyfile +0 -0
  91. data/swig/Rakefile +44 -19
  92. data/swig/TagLib_doc.rb +2755 -0
  93. data/swig/make_doc.rb +5 -4
  94. data/swig/process_cxx.rb +2 -2
  95. data/swig/rake_ext_conf.rb +33 -0
  96. data/swig/taglib.i +8 -5
  97. data/swig/test.rb +47 -39
  98. data/test/test_read.rb +4 -3
  99. data/test/test_taglib.rb +47 -39
  100. data/test/test_write.rb +4 -3
  101. metadata +96 -20
  102. data/ext/tagfile/extconf.rb +0 -14
  103. data/ext/taglib/extconf.rb +0 -22
  104. data/swig/extconf.rb +0 -22
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+
3
+ usage()
4
+ {
5
+ echo "usage: $0 [OPTIONS]"
6
+ cat << EOH
7
+
8
+ options:
9
+ [--libs]
10
+ [--cflags]
11
+ [--version]
12
+ [--prefix]
13
+ EOH
14
+ exit 1;
15
+ }
16
+
17
+ prefix=D:/Archivos de programa/taglib
18
+ exec_prefix=D:/Archivos de programa/taglib
19
+ libdir=D:/Archivos de programa/taglib/lib
20
+ includedir=D:/Archivos de programa/taglib/include
21
+
22
+ flags=""
23
+
24
+ if test $# -eq 0 ; then
25
+ usage
26
+ fi
27
+
28
+ while test $# -gt 0
29
+ do
30
+ case $1 in
31
+ --libs)
32
+ flags="$flags -L$libdir -ltag"
33
+ ;;
34
+ --cflags)
35
+ flags="$flags -I$includedir/taglib"
36
+ ;;
37
+ --version)
38
+ echo 1.5
39
+ ;;
40
+ --prefix)
41
+ echo $prefix
42
+ ;;
43
+ *)
44
+ echo "$0: unknown option $1"
45
+ echo
46
+ usage
47
+ ;;
48
+ esac
49
+ shift
50
+ done
51
+
52
+ if test -n "$flags"
53
+ then
54
+ echo $flags
55
+ fi
@@ -0,0 +1,173 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2004 by Allan Sandfeld Jensen
3
+ email : kde@carewolf.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_APEFOOTER_H
27
+ #define TAGLIB_APEFOOTER_H
28
+
29
+ #include "tbytevector.h"
30
+ #include "taglib_export.h"
31
+
32
+ namespace TagLib {
33
+
34
+ namespace APE {
35
+
36
+ //! An implementation of APE footers
37
+
38
+ /*!
39
+ * This class implements APE footers (and headers). It attempts to follow, both
40
+ * semantically and programatically, the structure specified in
41
+ * the APE v2.0 standard. The API is based on the properties of APE footer and
42
+ * headers specified there.
43
+ */
44
+
45
+ class TAGLIB_EXPORT Footer
46
+ {
47
+ public:
48
+ /*!
49
+ * Constructs an empty APE footer.
50
+ */
51
+ Footer();
52
+
53
+ /*!
54
+ * Constructs an APE footer based on \a data. parse() is called
55
+ * immediately.
56
+ */
57
+ Footer(const ByteVector &data);
58
+
59
+ /*!
60
+ * Destroys the footer.
61
+ */
62
+ virtual ~Footer();
63
+
64
+ /*!
65
+ * Returns the version number. (Note: This is the 1000 or 2000.)
66
+ */
67
+ uint version() const;
68
+
69
+ /*!
70
+ * Returns true if a header is present in the tag.
71
+ */
72
+ bool headerPresent() const;
73
+
74
+ /*!
75
+ * Returns true if a footer is present in the tag.
76
+ */
77
+ bool footerPresent() const;
78
+
79
+ /*!
80
+ * Returns true this is actually the header.
81
+ */
82
+ bool isHeader() const;
83
+
84
+ /*!
85
+ * Sets whether the header should be rendered or not
86
+ */
87
+ void setHeaderPresent(bool b) const;
88
+
89
+ /*!
90
+ * Returns the number of items in the tag.
91
+ */
92
+ uint itemCount() const;
93
+
94
+ /*!
95
+ * Set the item count to \a s.
96
+ * \see itemCount()
97
+ */
98
+ void setItemCount(uint s);
99
+
100
+ /*!
101
+ * Returns the tag size in bytes. This is the size of the frame content and footer.
102
+ * The size of the \e entire tag will be this plus the header size, if present.
103
+ *
104
+ * \see completeTagSize()
105
+ */
106
+ uint tagSize() const;
107
+
108
+ /*!
109
+ * Returns the tag size, including if present, the header
110
+ * size.
111
+ *
112
+ * \see tagSize()
113
+ */
114
+ uint completeTagSize() const;
115
+
116
+ /*!
117
+ * Set the tag size to \a s.
118
+ * \see tagSize()
119
+ */
120
+ void setTagSize(uint s);
121
+
122
+ /*!
123
+ * Returns the size of the footer. Presently this is always 32 bytes.
124
+ */
125
+ static uint size();
126
+
127
+ /*!
128
+ * Returns the string used to identify an APE tag inside of a file.
129
+ * Presently this is always "APETAGEX".
130
+ */
131
+ static ByteVector fileIdentifier();
132
+
133
+ /*!
134
+ * Sets the data that will be used as the footer. 32 bytes,
135
+ * starting from \a data will be used.
136
+ */
137
+ void setData(const ByteVector &data);
138
+
139
+ /*!
140
+ * Renders the footer back to binary format.
141
+ */
142
+ ByteVector renderFooter() const;
143
+
144
+ /*!
145
+ * Renders the header corresponding to the footer. If headerPresent is
146
+ * set to false, it returns an empty ByteVector.
147
+ */
148
+ ByteVector renderHeader() const;
149
+
150
+ protected:
151
+ /*!
152
+ * Called by setData() to parse the footer data. It makes this information
153
+ * available through the public API.
154
+ */
155
+ void parse(const ByteVector &data);
156
+
157
+ /*!
158
+ * Called by renderFooter and renderHeader
159
+ */
160
+ ByteVector render(bool isHeader) const;
161
+
162
+ private:
163
+ Footer(const Footer &);
164
+ Footer &operator=(const Footer &);
165
+
166
+ class FooterPrivate;
167
+ FooterPrivate *d;
168
+ };
169
+
170
+ }
171
+ }
172
+
173
+ #endif
@@ -0,0 +1,204 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2004 by Allan Sandfeld Jensen
3
+ email : kde@carewolf.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_APEITEM_H
27
+ #define TAGLIB_APEITEM_H
28
+
29
+ #include "tbytevector.h"
30
+ #include "tstring.h"
31
+ #include "tstringlist.h"
32
+
33
+ namespace TagLib {
34
+
35
+ namespace APE {
36
+
37
+ //! An implementation of APE-items
38
+
39
+ /*!
40
+ * This class provides the features of items in the APEv2 standard.
41
+ */
42
+ class TAGLIB_EXPORT Item
43
+ {
44
+ public:
45
+ /*!
46
+ * Enum of types an Item can have. The value of 3 is reserved.
47
+ */
48
+ enum ItemTypes {
49
+ //! Item contains text information coded in UTF-8
50
+ Text = 0,
51
+ //! Item contains binary information
52
+ Binary = 1,
53
+ //! Item is a locator of external stored information
54
+ Locator = 2
55
+ };
56
+ /*!
57
+ * Constructs an empty item.
58
+ */
59
+ Item();
60
+
61
+ /*!
62
+ * Constructs an item with \a key and \a value.
63
+ */
64
+ // BIC: Remove this, StringList has a constructor from a single string
65
+ Item(const String &key, const String &value);
66
+
67
+ /*!
68
+ * Constructs an item with \a key and \a values.
69
+ */
70
+ Item(const String &key, const StringList &values);
71
+
72
+ /*!
73
+ * Construct an item as a copy of \a item.
74
+ */
75
+ Item(const Item &item);
76
+
77
+ /*!
78
+ * Destroys the item.
79
+ */
80
+ virtual ~Item();
81
+
82
+ /*!
83
+ * Copies the contents of \a item into this item.
84
+ */
85
+ Item &operator=(const Item &item);
86
+
87
+ /*!
88
+ * Returns the key.
89
+ */
90
+ String key() const;
91
+
92
+ /*!
93
+ * Returns the binary value.
94
+ *
95
+ * \deprecated This will be removed in the next binary incompatible version
96
+ * as it is not kept in sync with the things that are set using setValue()
97
+ * and friends.
98
+ */
99
+ ByteVector value() const;
100
+
101
+ /*!
102
+ * Sets the key for the item to \a key.
103
+ */
104
+ void setKey(const String &key);
105
+
106
+ /*!
107
+ * Sets the value of the item to \a value and clears any previous contents.
108
+ *
109
+ * \see toString()
110
+ */
111
+ void setValue(const String &value);
112
+
113
+ /*!
114
+ * Sets the value of the item to the list of values in \a value and clears
115
+ * any previous contents.
116
+ *
117
+ * \see toStringList()
118
+ */
119
+ void setValues(const StringList &values);
120
+
121
+ /*!
122
+ * Appends \a value to create (or extend) the current list of values.
123
+ *
124
+ * \see toString()
125
+ */
126
+ void appendValue(const String &value);
127
+
128
+ /*!
129
+ * Appends \a values to extend the current list of values.
130
+ *
131
+ * \see toStringList()
132
+ */
133
+ void appendValues(const StringList &values);
134
+
135
+ /*!
136
+ * Returns the size of the full item.
137
+ */
138
+ int size() const;
139
+
140
+ /*!
141
+ * Returns the value as a single string. In case of multiple strings,
142
+ * the first is returned.
143
+ */
144
+ String toString() const;
145
+
146
+ /*!
147
+ * \deprecated
148
+ * \see values
149
+ */
150
+ StringList toStringList() const;
151
+
152
+ /*!
153
+ * Returns the list of values.
154
+ */
155
+ StringList values() const;
156
+
157
+ /*!
158
+ * Render the item to a ByteVector.
159
+ */
160
+ ByteVector render() const;
161
+
162
+ /*!
163
+ * Parse the item from the ByteVector \a data.
164
+ */
165
+ void parse(const ByteVector& data);
166
+
167
+ /*!
168
+ * Set the item to read-only.
169
+ */
170
+ void setReadOnly(bool readOnly);
171
+
172
+ /*!
173
+ * Return true if the item is read-only.
174
+ */
175
+ bool isReadOnly() const;
176
+
177
+ /*!
178
+ * Sets the type of the item to \a type.
179
+ *
180
+ * \see ItemTypes
181
+ */
182
+ void setType(ItemTypes type);
183
+
184
+ /*!
185
+ * Returns the type of the item.
186
+ */
187
+ ItemTypes type() const;
188
+
189
+ /*!
190
+ * Returns if the item has any real content.
191
+ */
192
+ bool isEmpty() const;
193
+
194
+ private:
195
+ class ItemPrivate;
196
+ ItemPrivate *d;
197
+ };
198
+ }
199
+
200
+ }
201
+
202
+ #endif
203
+
204
+
@@ -0,0 +1,162 @@
1
+ /***************************************************************************
2
+ copyright : (C) 2004 by Allan Sandfeld Jensen
3
+ email : kde@carewolf.org
4
+ ***************************************************************************/
5
+
6
+ /***************************************************************************
7
+ * This library is free software; you can redistribute it and/or modify *
8
+ * it under the terms of the GNU Lesser General Public License version *
9
+ * 2.1 as published by the Free Software Foundation. *
10
+ * *
11
+ * This library is distributed in the hope that it will be useful, but *
12
+ * WITHOUT ANY WARRANTY; without even the implied warranty of *
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
+ * Lesser General Public License for more details. *
15
+ * *
16
+ * You should have received a copy of the GNU Lesser General Public *
17
+ * License along with this library; if not, write to the Free Software *
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
19
+ * USA *
20
+ * *
21
+ * Alternatively, this file is available under the Mozilla Public *
22
+ * License Version 1.1. You may obtain a copy of the License at *
23
+ * http://www.mozilla.org/MPL/ *
24
+ ***************************************************************************/
25
+
26
+ #ifndef TAGLIB_APETAG_H
27
+ #define TAGLIB_APETAG_H
28
+
29
+ #include "tag.h"
30
+ #include "tbytevector.h"
31
+ #include "tmap.h"
32
+ #include "tstring.h"
33
+ #include "taglib_export.h"
34
+
35
+ #include "apeitem.h"
36
+
37
+ namespace TagLib {
38
+
39
+ class File;
40
+
41
+ //! An implementation of the APE tagging format
42
+
43
+ namespace APE {
44
+
45
+ class Footer;
46
+
47
+ /*!
48
+ * A mapping between a list of item names, or keys, and the associated item.
49
+ *
50
+ * \see APE::Tag::itemListMap()
51
+ */
52
+ typedef Map<const String, Item> ItemListMap;
53
+
54
+
55
+ //! An APE tag implementation
56
+
57
+ class TAGLIB_EXPORT Tag : public TagLib::Tag
58
+ {
59
+ public:
60
+ /*!
61
+ * Create an APE tag with default values.
62
+ */
63
+ Tag();
64
+
65
+ /*!
66
+ * Create an APE tag and parse the data in \a file with APE footer at
67
+ * \a tagOffset.
68
+ */
69
+ Tag(File *file, long footerLocation);
70
+
71
+ /*!
72
+ * Destroys this Tag instance.
73
+ */
74
+ virtual ~Tag();
75
+
76
+ /*!
77
+ * Renders the in memory values to a ByteVector suitable for writing to
78
+ * the file.
79
+ */
80
+ ByteVector render() const;
81
+
82
+ /*!
83
+ * Returns the string "APETAGEX" suitable for usage in locating the tag in a
84
+ * file.
85
+ */
86
+ static ByteVector fileIdentifier();
87
+
88
+ // Reimplementations.
89
+
90
+ virtual String title() const;
91
+ virtual String artist() const;
92
+ virtual String album() const;
93
+ virtual String comment() const;
94
+ virtual String genre() const;
95
+ virtual uint year() const;
96
+ virtual uint track() const;
97
+
98
+ virtual void setTitle(const String &s);
99
+ virtual void setArtist(const String &s);
100
+ virtual void setAlbum(const String &s);
101
+ virtual void setComment(const String &s);
102
+ virtual void setGenre(const String &s);
103
+ virtual void setYear(uint i);
104
+ virtual void setTrack(uint i);
105
+
106
+ /*!
107
+ * Returns a pointer to the tag's footer.
108
+ */
109
+ Footer *footer() const;
110
+
111
+ /*!
112
+ * Returns a reference to the item list map. This is an ItemListMap of
113
+ * all of the items in the tag.
114
+ *
115
+ * This is the most powerfull structure for accessing the items of the tag.
116
+ *
117
+ * \warning You should not modify this data structure directly, instead
118
+ * use setItem() and removeItem().
119
+ */
120
+ const ItemListMap &itemListMap() const;
121
+
122
+ /*!
123
+ * Removes the \a key item from the tag
124
+ */
125
+ void removeItem(const String &key);
126
+
127
+ /*!
128
+ * Adds to the item specified by \a key the data \a value. If \a replace
129
+ * is true, then all of the other values on the same key will be removed
130
+ * first.
131
+ */
132
+ void addValue(const String &key, const String &value, bool replace = true);
133
+
134
+ /*!
135
+ * Sets the \a key item to the value of \a item. If an item with the \a key is already
136
+ * present, it will be replaced.
137
+ */
138
+ void setItem(const String &key, const Item &item);
139
+
140
+ protected:
141
+
142
+ /*!
143
+ * Reads from the file specified in the constructor.
144
+ */
145
+ void read();
146
+
147
+ /*!
148
+ * Parses the body of the tag in \a data.
149
+ */
150
+ void parse(const ByteVector &data);
151
+
152
+ private:
153
+ Tag(const Tag &);
154
+ Tag &operator=(const Tag &);
155
+
156
+ class TagPrivate;
157
+ TagPrivate *d;
158
+ };
159
+ }
160
+ }
161
+
162
+ #endif