taglib-ruby 0.6.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -1
  3. data/{CHANGES.md → CHANGELOG.md} +46 -11
  4. data/README.md +61 -17
  5. data/Rakefile +12 -3
  6. data/docs/taglib/aiff.rb +95 -0
  7. data/docs/taglib/base.rb +30 -2
  8. data/docs/taglib/flac.rb +60 -4
  9. data/docs/taglib/id3v1.rb +29 -0
  10. data/docs/taglib/id3v2.rb +22 -3
  11. data/docs/taglib/mp4.rb +124 -13
  12. data/docs/taglib/mpeg.rb +30 -1
  13. data/docs/taglib/ogg.rb +47 -5
  14. data/docs/taglib/riff.rb +3 -0
  15. data/docs/taglib/vorbis.rb +1 -1
  16. data/docs/taglib/wav.rb +116 -0
  17. data/ext/extconf_common.rb +24 -3
  18. data/ext/taglib_aiff/extconf.rb +4 -0
  19. data/ext/taglib_aiff/taglib_aiff.i +84 -0
  20. data/ext/taglib_aiff/taglib_aiff_wrap.cxx +3111 -0
  21. data/ext/taglib_base/includes.i +34 -5
  22. data/ext/taglib_base/taglib_base.i +42 -2
  23. data/ext/taglib_base/taglib_base_wrap.cxx +226 -186
  24. data/ext/taglib_flac/taglib_flac.i +21 -18
  25. data/ext/taglib_flac/taglib_flac_wrap.cxx +519 -955
  26. data/ext/taglib_flac_picture/extconf.rb +4 -0
  27. data/ext/taglib_flac_picture/includes.i +15 -0
  28. data/ext/taglib_flac_picture/taglib_flac_picture.i +15 -0
  29. data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +3087 -0
  30. data/ext/taglib_id3v1/taglib_id3v1.i +19 -0
  31. data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +391 -193
  32. data/ext/taglib_id3v2/relativevolumeframe.i +4 -17
  33. data/ext/taglib_id3v2/taglib_id3v2.i +72 -2
  34. data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +3051 -1113
  35. data/ext/taglib_mp4/taglib_mp4.i +101 -20
  36. data/ext/taglib_mp4/taglib_mp4_wrap.cxx +1088 -282
  37. data/ext/taglib_mpeg/taglib_mpeg.i +11 -16
  38. data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +646 -317
  39. data/ext/taglib_ogg/taglib_ogg.i +11 -0
  40. data/ext/taglib_ogg/taglib_ogg_wrap.cxx +478 -192
  41. data/ext/taglib_vorbis/taglib_vorbis.i +8 -0
  42. data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +202 -156
  43. data/ext/taglib_wav/extconf.rb +4 -0
  44. data/ext/taglib_wav/taglib_wav.i +90 -0
  45. data/ext/taglib_wav/taglib_wav_wrap.cxx +3423 -0
  46. data/lib/taglib.rb +2 -0
  47. data/lib/taglib/aiff.rb +7 -0
  48. data/lib/taglib/mp4.rb +2 -1
  49. data/lib/taglib/version.rb +2 -2
  50. data/lib/taglib/wav.rb +11 -0
  51. data/taglib-ruby.gemspec +42 -8
  52. data/tasks/ext.rake +48 -20
  53. data/tasks/gemspec_check.rake +1 -1
  54. data/tasks/swig.rake +36 -2
  55. data/test/aiff_examples_test.rb +39 -0
  56. data/test/aiff_file_test.rb +103 -0
  57. data/test/aiff_file_write_test.rb +88 -0
  58. data/test/data/Makefile +8 -2
  59. data/test/data/aiff-sample.aiff +0 -0
  60. data/test/data/flac_nopic.flac +0 -0
  61. data/test/data/vorbis-create.cpp +20 -1
  62. data/test/data/vorbis.oga +0 -0
  63. data/test/data/wav-create.cpp +55 -0
  64. data/test/data/wav-dump.cpp +74 -0
  65. data/test/data/wav-sample.wav +0 -0
  66. data/test/file_test.rb +21 -0
  67. data/test/fileref_properties_test.rb +1 -1
  68. data/test/flac_file_test.rb +45 -30
  69. data/test/flac_picture_memory_test.rb +43 -0
  70. data/test/id3v1_genres_test.rb +23 -0
  71. data/test/id3v1_tag_test.rb +1 -0
  72. data/test/id3v2_frames_test.rb +64 -0
  73. data/test/id3v2_tag_test.rb +6 -6
  74. data/test/id3v2_unknown_frames_test.rb +30 -0
  75. data/test/id3v2_write_test.rb +10 -13
  76. data/test/mp4_file_test.rb +33 -4
  77. data/test/mp4_file_write_test.rb +5 -5
  78. data/test/mp4_items_test.rb +83 -29
  79. data/test/mpeg_file_test.rb +120 -7
  80. data/test/vorbis_file_test.rb +2 -2
  81. data/test/vorbis_tag_test.rb +61 -7
  82. data/test/wav_examples_test.rb +42 -0
  83. data/test/wav_file_test.rb +108 -0
  84. data/test/wav_file_write_test.rb +113 -0
  85. metadata +86 -56
@@ -5,23 +5,24 @@
5
5
  #include <taglib/mp4properties.h>
6
6
  #include <taglib/mp4tag.h>
7
7
  #include <taglib/mp4atom.h>
8
+ // To resolve some symbols, like AtomDataType in Item.
9
+ using namespace TagLib::MP4;
8
10
  %}
9
11
 
10
- %ignore TagLib::List::operator!=;
11
12
  %include "../taglib_base/includes.i"
12
13
  %import(module="taglib_base") "../taglib_base/taglib_base.i"
13
14
 
14
15
  %{
15
- static void unlink_taglib_mp4_item_list_map_iterator(TagLib::MP4::ItemListMap::Iterator &it) {
16
- TagLib::MP4::Item *item = &(it->second);
16
+ static void unlink_taglib_mp4_item_map_iterator(const TagLib::MP4::ItemMap::ConstIterator &it) {
17
+ const TagLib::MP4::Item *item = &(it->second);
17
18
  TagLib::MP4::CoverArtList list = item->toCoverArtList();
18
19
  for (TagLib::MP4::CoverArtList::ConstIterator it = list.begin(); it != list.end(); it++) {
19
20
  void *cover_art = (void *) &(*it);
20
21
  SWIG_RubyUnlinkObjects(cover_art);
21
22
  SWIG_RubyRemoveTracking(cover_art);
22
23
  }
23
- SWIG_RubyUnlinkObjects(item);
24
- SWIG_RubyRemoveTracking(item);
24
+ SWIG_RubyUnlinkObjects((void *)item);
25
+ SWIG_RubyRemoveTracking((void *)item);
25
26
  }
26
27
 
27
28
  VALUE taglib_mp4_item_int_pair_to_ruby_array(const TagLib::MP4::Item::IntPair &int_pair) {
@@ -44,7 +45,7 @@ TagLib::MP4::CoverArtList ruby_array_to_taglib_cover_art_list(VALUE ary) {
44
45
  return result;
45
46
  }
46
47
  for (long i = 0; i < RARRAY_LEN(ary); i++) {
47
- VALUE e = RARRAY_PTR(ary)[i];
48
+ VALUE e = rb_ary_entry(ary, i);
48
49
  TagLib::MP4::CoverArt *c;
49
50
  SWIG_ConvertPtr(e, (void **) &c, SWIGTYPE_p_TagLib__MP4__CoverArt, 1);
50
51
  result.append(*c);
@@ -53,12 +54,17 @@ TagLib::MP4::CoverArtList ruby_array_to_taglib_cover_art_list(VALUE ary) {
53
54
  }
54
55
  %}
55
56
 
57
+ // Ignore useless types that SWIG picks up globally.
58
+ %ignore Iterator;
59
+ %ignore ConstIterator;
60
+
56
61
  %ignore TagLib::Map::operator[];
57
62
  %ignore TagLib::Map::operator=;
58
63
  %alias TagLib::Map::contains "include?,has_key?";
59
64
  %include <taglib/tmap.h>
60
65
 
61
66
  namespace TagLib {
67
+ class ByteVectorList;
62
68
  namespace MP4 {
63
69
  class Item;
64
70
  class CoverArtList;
@@ -66,6 +72,7 @@ namespace TagLib {
66
72
  }
67
73
  }
68
74
 
75
+ %ignore TagLib::MP4::Properties::length; // Deprecated.
69
76
  %include <taglib/mp4properties.h>
70
77
 
71
78
  %ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::begin;
@@ -76,6 +83,16 @@ namespace TagLib {
76
83
  %ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::clear;
77
84
  %ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::erase(Iterator);
78
85
  %ignore TagLib::Map<TagLib::String, TagLib::MP4::Item>::erase(const TagLib::String &);
86
+
87
+ %ignore TagLib::MP4::Tag::itemListMap; // Deprecated.
88
+
89
+ %rename("__getitem__") TagLib::MP4::Tag::item;
90
+
91
+ // We will create a safe version of these below in an %extend
92
+ // TagLib::MP4::Tag::item does not need to be reimplemented as it return an Item by value.
93
+ %ignore TagLib::MP4::Tag::setItem;
94
+ %ignore TagLib::MP4::Tag::removeItem;
95
+
79
96
  %include <taglib/mp4tag.h>
80
97
 
81
98
  %typemap(out) TagLib::MP4::CoverArtList {
@@ -87,23 +104,40 @@ namespace TagLib {
87
104
  }
88
105
  %apply TagLib::MP4::CoverArtList { TagLib::MP4::CoverArtList &, const TagLib::MP4::CoverArtList & };
89
106
  %ignore TagLib::MP4::CoverArt::operator=;
107
+ %ignore TagLib::MP4::CoverArt::swap;
90
108
  %include <taglib/mp4coverart.h>
91
109
 
92
110
  %typemap(out) TagLib::MP4::Item::IntPair {
93
111
  $result = taglib_mp4_item_int_pair_to_ruby_array($1);
94
112
  }
95
113
  %ignore TagLib::MP4::Item::operator=;
114
+ %ignore TagLib::MP4::Item::swap;
115
+
116
+ %ignore TagLib::MP4::Item::atomDataType;
117
+ %ignore TagLib::MP4::Item::setAtomDataType;
96
118
 
97
119
  %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) IntPair;
98
120
  %include <taglib/mp4item.h>
99
121
 
100
122
  %freefunc TagLib::MP4::File "free_taglib_mp4_file";
101
123
 
124
+ // Ignore IOStream and all the constructors using it.
125
+ %ignore IOStream;
126
+ %ignore TagLib::MP4::File::File(IOStream *, bool, Properties::ReadStyle);
127
+ %ignore TagLib::MP4::File::File(IOStream *, bool);
128
+ %ignore TagLib::MP4::File::File(IOStream *);
129
+
130
+ // Ignore the unified property interface.
131
+ %ignore TagLib::MP4::File::properties;
132
+ %ignore TagLib::MP4::File::setProperties;
133
+ %ignore TagLib::MP4::File::removeUnsupportedProperties;
134
+
135
+ %rename("mp4_tag?") TagLib::MP4::File::hasMP4Tag;
102
136
  %include <taglib/mp4file.h>
103
137
 
104
138
  namespace TagLib {
105
139
  namespace MP4 {
106
- %template(ItemListMap) ::TagLib::Map<String, Item>;
140
+ %template(ItemMap) ::TagLib::Map<String, Item>;
107
141
  }
108
142
  }
109
143
 
@@ -118,10 +152,10 @@ namespace TagLib {
118
152
 
119
153
  TagLib::MP4::Tag *tag = file->tag();
120
154
  if (tag) {
121
- TagLib::Map<TagLib::String, TagLib::MP4::Item> *item_list_map = &(tag->itemListMap());
155
+ TagLib::MP4::ItemMap *item_list_map = const_cast<TagLib::MP4::ItemMap *>(&(tag->itemMap()));
122
156
  if (item_list_map) {
123
- for (TagLib::MP4::ItemListMap::Iterator it = item_list_map->begin(); it != item_list_map->end(); it++) {
124
- unlink_taglib_mp4_item_list_map_iterator(it);
157
+ for (TagLib::MP4::ItemMap::Iterator it = item_list_map->begin(); it != item_list_map->end(); it++) {
158
+ unlink_taglib_mp4_item_map_iterator(it);
125
159
  }
126
160
 
127
161
  SWIG_RubyUnlinkObjects(item_list_map);
@@ -149,7 +183,7 @@ namespace TagLib {
149
183
  %extend Map<String, MP4::Item> {
150
184
  VALUE to_a() {
151
185
  VALUE ary = rb_ary_new2($self->size());
152
- for (TagLib::MP4::ItemListMap::Iterator it = $self->begin(); it != $self->end(); it++) {
186
+ for (TagLib::MP4::ItemMap::Iterator it = $self->begin(); it != $self->end(); it++) {
153
187
  TagLib::String string = it->first;
154
188
  TagLib::MP4::Item *item = &(it->second);
155
189
  VALUE pair = rb_ary_new2(2);
@@ -160,8 +194,18 @@ namespace TagLib {
160
194
  return ary;
161
195
  }
162
196
 
197
+ VALUE to_h() {
198
+ VALUE hsh = rb_hash_new();
199
+ for (TagLib::MP4::ItemMap::Iterator it = $self->begin(); it != $self->end(); it++) {
200
+ rb_hash_aset(hsh,
201
+ taglib_string_to_ruby_string(it->first),
202
+ SWIG_NewPointerObj(&(it->second), SWIGTYPE_p_TagLib__MP4__Item, 0));
203
+ }
204
+ return hsh;
205
+ }
206
+
163
207
  VALUE fetch(const String &string) {
164
- TagLib::MP4::ItemListMap::Iterator it = $self->find(string);
208
+ TagLib::MP4::ItemMap::Iterator it = $self->find(string);
165
209
  VALUE result = Qnil;
166
210
  if (it != $self->end()) {
167
211
  TagLib::MP4::Item *item = &(it->second);
@@ -171,26 +215,26 @@ namespace TagLib {
171
215
  }
172
216
 
173
217
  VALUE _clear() {
174
- for (TagLib::MP4::ItemListMap::Iterator it = $self->begin(); it != $self->end(); it++) {
175
- unlink_taglib_mp4_item_list_map_iterator(it);
218
+ for (TagLib::MP4::ItemMap::Iterator it = $self->begin(); it != $self->end(); it++) {
219
+ unlink_taglib_mp4_item_map_iterator(it);
176
220
  }
177
221
  $self->clear();
178
222
  return Qnil;
179
223
  }
180
224
 
181
225
  VALUE erase(const String &string) {
182
- TagLib::MP4::ItemListMap::Iterator it = $self->find(string);
226
+ TagLib::MP4::ItemMap::Iterator it = $self->find(string);
183
227
  if (it != $self->end()) {
184
- unlink_taglib_mp4_item_list_map_iterator(it);
228
+ unlink_taglib_mp4_item_map_iterator(it);
185
229
  $self->erase(it);
186
230
  }
187
231
  return Qnil;
188
232
  }
189
233
 
190
234
  VALUE _insert(const String &string, const MP4::Item &item) {
191
- TagLib::MP4::ItemListMap::Iterator it = $self->find(string);
235
+ TagLib::MP4::ItemMap::Iterator it = $self->find(string);
192
236
  if (it != $self->end()) {
193
- unlink_taglib_mp4_item_list_map_iterator(it);
237
+ unlink_taglib_mp4_item_map_iterator(it);
194
238
  }
195
239
  $self->insert(string, item);
196
240
  return Qnil;
@@ -198,13 +242,46 @@ namespace TagLib {
198
242
  }
199
243
  }
200
244
 
245
+ %extend TagLib::MP4::Tag {
246
+ VALUE __setitem__(const String& string, const MP4::Item &item) {
247
+ TagLib::MP4::ItemMap::ConstIterator it = $self->itemMap().find(string);
248
+ if (it != $self->itemMap().end()) {
249
+ unlink_taglib_mp4_item_map_iterator(it);
250
+ }
251
+ $self->setItem(string, item);
252
+ return Qnil;
253
+ }
254
+
255
+ VALUE remove_item(const String& string) {
256
+ TagLib::MP4::ItemMap::ConstIterator it = $self->itemMap().find(string);
257
+ if (it != $self->itemMap().end()) {
258
+ unlink_taglib_mp4_item_map_iterator(it);
259
+ $self->removeItem(string);
260
+ }
261
+ return Qnil;
262
+ }
263
+
264
+ }
265
+
201
266
  %extend TagLib::MP4::Item {
267
+ static TagLib::MP4::Item * from_bool(bool q) {
268
+ return new TagLib::MP4::Item(q);
269
+ }
270
+
271
+ static TagLib::MP4::Item * from_byte(unsigned char n) {
272
+ return new TagLib::MP4::Item(n);
273
+ }
274
+
275
+ static TagLib::MP4::Item * from_uint(unsigned int n) {
276
+ return new TagLib::MP4::Item(n);
277
+ }
278
+
202
279
  static TagLib::MP4::Item * from_int(int n) {
203
280
  return new TagLib::MP4::Item(n);
204
281
  }
205
282
 
206
- static TagLib::MP4::Item * from_bool(bool q) {
207
- return new TagLib::MP4::Item(q);
283
+ static TagLib::MP4::Item * from_long_long(long long n) {
284
+ return new TagLib::MP4::Item(n);
208
285
  }
209
286
 
210
287
  static TagLib::MP4::Item * from_string_list(const TagLib::StringList &string_list) {
@@ -214,6 +291,10 @@ namespace TagLib {
214
291
  static TagLib::MP4::Item * from_cover_art_list(const TagLib::MP4::CoverArtList &cover_art_list) {
215
292
  return new TagLib::MP4::Item(cover_art_list);
216
293
  }
294
+
295
+ static TagLib::MP4::Item * from_byte_vector_list(const TagLib::ByteVectorList &byte_vector_list) {
296
+ return new TagLib::MP4::Item(byte_vector_list);
297
+ }
217
298
  }
218
299
 
219
300
  %extend TagLib::MP4::File {
@@ -1,11 +1,11 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.9
4
- *
5
- * This file is not intended to be easily readable and contains a number of
3
+ * Version 3.0.7
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
7
- * changes to this file unless you know what you are doing--modify the SWIG
8
- * interface file instead.
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
9
  * ----------------------------------------------------------------------------- */
10
10
 
11
11
  static void free_taglib_mp4_file(void *ptr);
@@ -68,28 +68,28 @@ template <typename T> T SwigValueInit() {
68
68
  #ifndef SWIGUNUSED
69
69
  # if defined(__GNUC__)
70
70
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
71
- # define SWIGUNUSED __attribute__ ((__unused__))
71
+ # define SWIGUNUSED __attribute__ ((__unused__))
72
72
  # else
73
73
  # define SWIGUNUSED
74
74
  # endif
75
75
  # elif defined(__ICC)
76
- # define SWIGUNUSED __attribute__ ((__unused__))
76
+ # define SWIGUNUSED __attribute__ ((__unused__))
77
77
  # else
78
- # define SWIGUNUSED
78
+ # define SWIGUNUSED
79
79
  # endif
80
80
  #endif
81
81
 
82
82
  #ifndef SWIG_MSC_UNSUPPRESS_4505
83
83
  # if defined(_MSC_VER)
84
84
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
85
- # endif
85
+ # endif
86
86
  #endif
87
87
 
88
88
  #ifndef SWIGUNUSEDPARM
89
89
  # ifdef __cplusplus
90
90
  # define SWIGUNUSEDPARM(p)
91
91
  # else
92
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
92
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
93
93
  # endif
94
94
  #endif
95
95
 
@@ -132,7 +132,7 @@ template <typename T> T SwigValueInit() {
132
132
  # define SWIGSTDCALL __stdcall
133
133
  # else
134
134
  # define SWIGSTDCALL
135
- # endif
135
+ # endif
136
136
  #endif
137
137
 
138
138
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -145,6 +145,19 @@ template <typename T> T SwigValueInit() {
145
145
  # define _SCL_SECURE_NO_DEPRECATE
146
146
  #endif
147
147
 
148
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
149
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
150
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
151
+ #endif
152
+
153
+ /* Intel's compiler complains if a variable which was never initialised is
154
+ * cast to void, which is a common idiom which we use to indicate that we
155
+ * are aware a variable isn't used. So we just silence that warning.
156
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
157
+ */
158
+ #ifdef __INTEL_COMPILER
159
+ # pragma warning disable 592
160
+ #endif
148
161
 
149
162
  /* -----------------------------------------------------------------------------
150
163
  * This section contains generic SWIG labels for method/variable
@@ -177,28 +190,28 @@ template <typename T> T SwigValueInit() {
177
190
  #ifndef SWIGUNUSED
178
191
  # if defined(__GNUC__)
179
192
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
180
- # define SWIGUNUSED __attribute__ ((__unused__))
193
+ # define SWIGUNUSED __attribute__ ((__unused__))
181
194
  # else
182
195
  # define SWIGUNUSED
183
196
  # endif
184
197
  # elif defined(__ICC)
185
- # define SWIGUNUSED __attribute__ ((__unused__))
198
+ # define SWIGUNUSED __attribute__ ((__unused__))
186
199
  # else
187
- # define SWIGUNUSED
200
+ # define SWIGUNUSED
188
201
  # endif
189
202
  #endif
190
203
 
191
204
  #ifndef SWIG_MSC_UNSUPPRESS_4505
192
205
  # if defined(_MSC_VER)
193
206
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
194
- # endif
207
+ # endif
195
208
  #endif
196
209
 
197
210
  #ifndef SWIGUNUSEDPARM
198
211
  # ifdef __cplusplus
199
212
  # define SWIGUNUSEDPARM(p)
200
213
  # else
201
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
214
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
202
215
  # endif
203
216
  #endif
204
217
 
@@ -241,7 +254,7 @@ template <typename T> T SwigValueInit() {
241
254
  # define SWIGSTDCALL __stdcall
242
255
  # else
243
256
  # define SWIGSTDCALL
244
- # endif
257
+ # endif
245
258
  #endif
246
259
 
247
260
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -254,6 +267,19 @@ template <typename T> T SwigValueInit() {
254
267
  # define _SCL_SECURE_NO_DEPRECATE
255
268
  #endif
256
269
 
270
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
271
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
272
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
273
+ #endif
274
+
275
+ /* Intel's compiler complains if a variable which was never initialised is
276
+ * cast to void, which is a common idiom which we use to indicate that we
277
+ * are aware a variable isn't used. So we just silence that warning.
278
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
279
+ */
280
+ #ifdef __INTEL_COMPILER
281
+ # pragma warning disable 592
282
+ #endif
257
283
 
258
284
  /* -----------------------------------------------------------------------------
259
285
  * swigrun.swg
@@ -279,7 +305,7 @@ template <typename T> T SwigValueInit() {
279
305
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
280
306
  creating a static or dynamic library from the SWIG runtime code.
281
307
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
282
-
308
+
283
309
  But only do this if strictly necessary, ie, if you have problems
284
310
  with your compiler or suchlike.
285
311
  */
@@ -305,16 +331,16 @@ template <typename T> T SwigValueInit() {
305
331
  #define SWIG_POINTER_OWN 0x1
306
332
 
307
333
 
308
- /*
334
+ /*
309
335
  Flags/methods for returning states.
310
-
311
- The SWIG conversion methods, as ConvertPtr, return an integer
336
+
337
+ The SWIG conversion methods, as ConvertPtr, return an integer
312
338
  that tells if the conversion was successful or not. And if not,
313
339
  an error code can be returned (see swigerrors.swg for the codes).
314
-
340
+
315
341
  Use the following macros/flags to set or process the returning
316
342
  states.
317
-
343
+
318
344
  In old versions of SWIG, code such as the following was usually written:
319
345
 
320
346
  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
@@ -347,23 +373,23 @@ template <typename T> T SwigValueInit() {
347
373
  } else {
348
374
  // fail code
349
375
  }
350
-
376
+
351
377
  I.e., now SWIG_ConvertPtr can return new objects and you can
352
378
  identify the case and take care of the deallocation. Of course that
353
379
  also requires SWIG_ConvertPtr to return new result values, such as
354
380
 
355
- int SWIG_ConvertPtr(obj, ptr,...) {
356
- if (<obj is ok>) {
357
- if (<need new object>) {
358
- *ptr = <ptr to new allocated object>;
359
- return SWIG_NEWOBJ;
360
- } else {
361
- *ptr = <ptr to old object>;
362
- return SWIG_OLDOBJ;
363
- }
364
- } else {
365
- return SWIG_BADOBJ;
366
- }
381
+ int SWIG_ConvertPtr(obj, ptr,...) {
382
+ if (<obj is ok>) {
383
+ if (<need new object>) {
384
+ *ptr = <ptr to new allocated object>;
385
+ return SWIG_NEWOBJ;
386
+ } else {
387
+ *ptr = <ptr to old object>;
388
+ return SWIG_OLDOBJ;
389
+ }
390
+ } else {
391
+ return SWIG_BADOBJ;
392
+ }
367
393
  }
368
394
 
369
395
  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
@@ -377,17 +403,17 @@ template <typename T> T SwigValueInit() {
377
403
  int fooi(int);
378
404
 
379
405
  and you call
380
-
406
+
381
407
  food(1) // cast rank '1' (1 -> 1.0)
382
408
  fooi(1) // cast rank '0'
383
409
 
384
410
  just use the SWIG_AddCast()/SWIG_CheckState()
385
411
  */
386
412
 
387
- #define SWIG_OK (0)
413
+ #define SWIG_OK (0)
388
414
  #define SWIG_ERROR (-1)
389
415
  #define SWIG_IsOK(r) (r >= 0)
390
- #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
416
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
391
417
 
392
418
  /* The CastRankLimit says how many bits are used for the cast rank */
393
419
  #define SWIG_CASTRANKLIMIT (1 << 8)
@@ -418,14 +444,14 @@ template <typename T> T SwigValueInit() {
418
444
  # endif
419
445
  # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
420
446
  # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
421
- SWIGINTERNINLINE int SWIG_AddCast(int r) {
447
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
422
448
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
423
449
  }
424
- SWIGINTERNINLINE int SWIG_CheckState(int r) {
425
- return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
450
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
451
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
426
452
  }
427
453
  #else /* no cast-rank mode */
428
- # define SWIG_AddCast
454
+ # define SWIG_AddCast(r) (r)
429
455
  # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
430
456
  #endif
431
457
 
@@ -469,7 +495,7 @@ typedef struct swig_module_info {
469
495
  void *clientdata; /* Language specific module data */
470
496
  } swig_module_info;
471
497
 
472
- /*
498
+ /*
473
499
  Compare two type names skipping the space characters, therefore
474
500
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
475
501
 
@@ -489,18 +515,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
489
515
 
490
516
  /*
491
517
  Check type equivalence in a name list like <name1>|<name2>|...
492
- Return 0 if not equal, 1 if equal
518
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
493
519
  */
494
520
  SWIGRUNTIME int
495
- SWIG_TypeEquiv(const char *nb, const char *tb) {
496
- int equiv = 0;
521
+ SWIG_TypeCmp(const char *nb, const char *tb) {
522
+ int equiv = 1;
497
523
  const char* te = tb + strlen(tb);
498
524
  const char* ne = nb;
499
- while (!equiv && *ne) {
525
+ while (equiv != 0 && *ne) {
500
526
  for (nb = ne; *ne; ++ne) {
501
527
  if (*ne == '|') break;
502
528
  }
503
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
529
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
504
530
  if (*ne) ++ne;
505
531
  }
506
532
  return equiv;
@@ -508,24 +534,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
508
534
 
509
535
  /*
510
536
  Check type equivalence in a name list like <name1>|<name2>|...
511
- Return 0 if equal, -1 if nb < tb, 1 if nb > tb
537
+ Return 0 if not equal, 1 if equal
512
538
  */
513
539
  SWIGRUNTIME int
514
- SWIG_TypeCompare(const char *nb, const char *tb) {
515
- int equiv = 0;
516
- const char* te = tb + strlen(tb);
517
- const char* ne = nb;
518
- while (!equiv && *ne) {
519
- for (nb = ne; *ne; ++ne) {
520
- if (*ne == '|') break;
521
- }
522
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
523
- if (*ne) ++ne;
524
- }
525
- return equiv;
540
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
541
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
526
542
  }
527
543
 
528
-
529
544
  /*
530
545
  Check the typename
531
546
  */
@@ -553,7 +568,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
553
568
  return 0;
554
569
  }
555
570
 
556
- /*
571
+ /*
557
572
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
558
573
  */
559
574
  SWIGRUNTIME swig_cast_info *
@@ -588,7 +603,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
588
603
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
589
604
  }
590
605
 
591
- /*
606
+ /*
592
607
  Dynamic pointer casting. Down an inheritance hierarchy
593
608
  */
594
609
  SWIGRUNTIME swig_type_info *
@@ -632,7 +647,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
632
647
  return type->name;
633
648
  }
634
649
 
635
- /*
650
+ /*
636
651
  Set the clientdata field for a type
637
652
  */
638
653
  SWIGRUNTIME void
@@ -640,14 +655,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
640
655
  swig_cast_info *cast = ti->cast;
641
656
  /* if (ti->clientdata == clientdata) return; */
642
657
  ti->clientdata = clientdata;
643
-
658
+
644
659
  while (cast) {
645
660
  if (!cast->converter) {
646
661
  swig_type_info *tc = cast->type;
647
662
  if (!tc->clientdata) {
648
663
  SWIG_TypeClientData(tc, clientdata);
649
664
  }
650
- }
665
+ }
651
666
  cast = cast->next;
652
667
  }
653
668
  }
@@ -656,31 +671,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
656
671
  SWIG_TypeClientData(ti, clientdata);
657
672
  ti->owndata = 1;
658
673
  }
659
-
674
+
660
675
  /*
661
676
  Search for a swig_type_info structure only by mangled name
662
677
  Search is a O(log #types)
663
-
664
- We start searching at module start, and finish searching when start == end.
678
+
679
+ We start searching at module start, and finish searching when start == end.
665
680
  Note: if start == end at the beginning of the function, we go all the way around
666
681
  the circular list.
667
682
  */
668
683
  SWIGRUNTIME swig_type_info *
669
- SWIG_MangledTypeQueryModule(swig_module_info *start,
670
- swig_module_info *end,
684
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
685
+ swig_module_info *end,
671
686
  const char *name) {
672
687
  swig_module_info *iter = start;
673
688
  do {
674
689
  if (iter->size) {
675
- register size_t l = 0;
676
- register size_t r = iter->size - 1;
690
+ size_t l = 0;
691
+ size_t r = iter->size - 1;
677
692
  do {
678
693
  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
679
- register size_t i = (l + r) >> 1;
694
+ size_t i = (l + r) >> 1;
680
695
  const char *iname = iter->types[i]->name;
681
696
  if (iname) {
682
- register int compare = strcmp(name, iname);
683
- if (compare == 0) {
697
+ int compare = strcmp(name, iname);
698
+ if (compare == 0) {
684
699
  return iter->types[i];
685
700
  } else if (compare < 0) {
686
701
  if (i) {
@@ -705,14 +720,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
705
720
  Search for a swig_type_info structure for either a mangled name or a human readable name.
706
721
  It first searches the mangled names of the types, which is a O(log #types)
707
722
  If a type is not found it then searches the human readable names, which is O(#types).
708
-
709
- We start searching at module start, and finish searching when start == end.
723
+
724
+ We start searching at module start, and finish searching when start == end.
710
725
  Note: if start == end at the beginning of the function, we go all the way around
711
726
  the circular list.
712
727
  */
713
728
  SWIGRUNTIME swig_type_info *
714
- SWIG_TypeQueryModule(swig_module_info *start,
715
- swig_module_info *end,
729
+ SWIG_TypeQueryModule(swig_module_info *start,
730
+ swig_module_info *end,
716
731
  const char *name) {
717
732
  /* STEP 1: Search the name field using binary search */
718
733
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
@@ -723,7 +738,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
723
738
  of the str field (the human readable name) */
724
739
  swig_module_info *iter = start;
725
740
  do {
726
- register size_t i = 0;
741
+ size_t i = 0;
727
742
  for (; i < iter->size; ++i) {
728
743
  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
729
744
  return iter->types[i];
@@ -731,56 +746,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
731
746
  iter = iter->next;
732
747
  } while (iter != end);
733
748
  }
734
-
749
+
735
750
  /* neither found a match */
736
751
  return 0;
737
752
  }
738
753
 
739
- /*
754
+ /*
740
755
  Pack binary data into a string
741
756
  */
742
757
  SWIGRUNTIME char *
743
758
  SWIG_PackData(char *c, void *ptr, size_t sz) {
744
759
  static const char hex[17] = "0123456789abcdef";
745
- register const unsigned char *u = (unsigned char *) ptr;
746
- register const unsigned char *eu = u + sz;
760
+ const unsigned char *u = (unsigned char *) ptr;
761
+ const unsigned char *eu = u + sz;
747
762
  for (; u != eu; ++u) {
748
- register unsigned char uu = *u;
763
+ unsigned char uu = *u;
749
764
  *(c++) = hex[(uu & 0xf0) >> 4];
750
765
  *(c++) = hex[uu & 0xf];
751
766
  }
752
767
  return c;
753
768
  }
754
769
 
755
- /*
770
+ /*
756
771
  Unpack binary data from a string
757
772
  */
758
773
  SWIGRUNTIME const char *
759
774
  SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
760
- register unsigned char *u = (unsigned char *) ptr;
761
- register const unsigned char *eu = u + sz;
775
+ unsigned char *u = (unsigned char *) ptr;
776
+ const unsigned char *eu = u + sz;
762
777
  for (; u != eu; ++u) {
763
- register char d = *(c++);
764
- register unsigned char uu;
778
+ char d = *(c++);
779
+ unsigned char uu;
765
780
  if ((d >= '0') && (d <= '9'))
766
781
  uu = ((d - '0') << 4);
767
782
  else if ((d >= 'a') && (d <= 'f'))
768
783
  uu = ((d - ('a'-10)) << 4);
769
- else
784
+ else
770
785
  return (char *) 0;
771
786
  d = *(c++);
772
787
  if ((d >= '0') && (d <= '9'))
773
788
  uu |= (d - '0');
774
789
  else if ((d >= 'a') && (d <= 'f'))
775
790
  uu |= (d - ('a'-10));
776
- else
791
+ else
777
792
  return (char *) 0;
778
793
  *u = uu;
779
794
  }
780
795
  return c;
781
796
  }
782
797
 
783
- /*
798
+ /*
784
799
  Pack 'void *' into a string buffer.
785
800
  */
786
801
  SWIGRUNTIME char *
@@ -840,18 +855,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
840
855
  #endif
841
856
 
842
857
  /* Errors in SWIG */
843
- #define SWIG_UnknownError -1
844
- #define SWIG_IOError -2
845
- #define SWIG_RuntimeError -3
846
- #define SWIG_IndexError -4
847
- #define SWIG_TypeError -5
848
- #define SWIG_DivisionByZero -6
849
- #define SWIG_OverflowError -7
850
- #define SWIG_SyntaxError -8
851
- #define SWIG_ValueError -9
858
+ #define SWIG_UnknownError -1
859
+ #define SWIG_IOError -2
860
+ #define SWIG_RuntimeError -3
861
+ #define SWIG_IndexError -4
862
+ #define SWIG_TypeError -5
863
+ #define SWIG_DivisionByZero -6
864
+ #define SWIG_OverflowError -7
865
+ #define SWIG_SyntaxError -8
866
+ #define SWIG_ValueError -9
852
867
  #define SWIG_SystemError -10
853
868
  #define SWIG_AttributeError -11
854
- #define SWIG_MemoryError -12
869
+ #define SWIG_MemoryError -12
855
870
  #define SWIG_NullReferenceError -13
856
871
 
857
872
 
@@ -1517,14 +1532,13 @@ SWIG_Ruby_InitRuntime(void)
1517
1532
  SWIGRUNTIME void
1518
1533
  SWIG_Ruby_define_class(swig_type_info *type)
1519
1534
  {
1520
- VALUE klass;
1521
1535
  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1522
1536
  sprintf(klass_name, "TYPE%s", type->name);
1523
1537
  if (NIL_P(_cSWIG_Pointer)) {
1524
1538
  _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1525
1539
  rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1526
1540
  }
1527
- klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1541
+ rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1528
1542
  free((void *) klass_name);
1529
1543
  }
1530
1544
 
@@ -1777,7 +1791,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1777
1791
  SWIGINTERN
1778
1792
  int SWIG_Ruby_isCallable( VALUE proc )
1779
1793
  {
1780
- if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1794
+ if ( rb_respond_to( proc, swig_call_id ) )
1781
1795
  return 1;
1782
1796
  return 0;
1783
1797
  }
@@ -1790,7 +1804,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
1790
1804
  SWIGINTERN
1791
1805
  int SWIG_Ruby_arity( VALUE proc, int minimal )
1792
1806
  {
1793
- if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1807
+ if ( rb_respond_to( proc, swig_arity_id ) )
1794
1808
  {
1795
1809
  VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1796
1810
  int arity = NUM2INT(num);
@@ -1816,27 +1830,26 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1816
1830
 
1817
1831
  /* -------- TYPES TABLE (BEGIN) -------- */
1818
1832
 
1819
- #define SWIGTYPE_p_ConstIterator swig_types[0]
1820
- #define SWIGTYPE_p_Iterator swig_types[1]
1821
- #define SWIGTYPE_p_TagLib__AudioProperties swig_types[2]
1822
- #define SWIGTYPE_p_TagLib__File swig_types[3]
1823
- #define SWIGTYPE_p_TagLib__MP4__Atoms swig_types[4]
1824
- #define SWIGTYPE_p_TagLib__MP4__CoverArt swig_types[5]
1825
- #define SWIGTYPE_p_TagLib__MP4__CoverArtList swig_types[6]
1826
- #define SWIGTYPE_p_TagLib__MP4__File swig_types[7]
1827
- #define SWIGTYPE_p_TagLib__MP4__Item swig_types[8]
1828
- #define SWIGTYPE_p_TagLib__MP4__Properties swig_types[9]
1829
- #define SWIGTYPE_p_TagLib__MP4__Tag swig_types[10]
1830
- #define SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t swig_types[11]
1831
- #define SWIGTYPE_p_TagLib__StringList swig_types[12]
1832
- #define SWIGTYPE_p_TagLib__Tag swig_types[13]
1833
- #define SWIGTYPE_p_char swig_types[14]
1834
- #define SWIGTYPE_p_unsigned_char swig_types[15]
1835
- #define SWIGTYPE_p_unsigned_int swig_types[16]
1836
- #define SWIGTYPE_p_unsigned_long swig_types[17]
1837
- #define SWIGTYPE_p_wchar_t swig_types[18]
1838
- static swig_type_info *swig_types[20];
1839
- static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
1833
+ #define SWIGTYPE_p_TagLib__AudioProperties swig_types[0]
1834
+ #define SWIGTYPE_p_TagLib__ByteVectorList swig_types[1]
1835
+ #define SWIGTYPE_p_TagLib__File swig_types[2]
1836
+ #define SWIGTYPE_p_TagLib__MP4__Atoms swig_types[3]
1837
+ #define SWIGTYPE_p_TagLib__MP4__CoverArt swig_types[4]
1838
+ #define SWIGTYPE_p_TagLib__MP4__CoverArtList swig_types[5]
1839
+ #define SWIGTYPE_p_TagLib__MP4__File swig_types[6]
1840
+ #define SWIGTYPE_p_TagLib__MP4__Item swig_types[7]
1841
+ #define SWIGTYPE_p_TagLib__MP4__Properties swig_types[8]
1842
+ #define SWIGTYPE_p_TagLib__MP4__Tag swig_types[9]
1843
+ #define SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t swig_types[10]
1844
+ #define SWIGTYPE_p_TagLib__StringList swig_types[11]
1845
+ #define SWIGTYPE_p_TagLib__Tag swig_types[12]
1846
+ #define SWIGTYPE_p_char swig_types[13]
1847
+ #define SWIGTYPE_p_unsigned_char swig_types[14]
1848
+ #define SWIGTYPE_p_unsigned_int swig_types[15]
1849
+ #define SWIGTYPE_p_unsigned_long swig_types[16]
1850
+ #define SWIGTYPE_p_wchar_t swig_types[17]
1851
+ static swig_type_info *swig_types[19];
1852
+ static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
1840
1853
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1841
1854
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1842
1855
 
@@ -1851,7 +1864,7 @@ static VALUE mMP4;
1851
1864
  #define SWIG_RUBY_THREAD_END_BLOCK
1852
1865
 
1853
1866
 
1854
- #define SWIGVERSION 0x020009
1867
+ #define SWIGVERSION 0x030007
1855
1868
  #define SWIG_VERSION SWIGVERSION
1856
1869
 
1857
1870
 
@@ -1867,6 +1880,8 @@ static VALUE mMP4;
1867
1880
  #include <taglib/mp4properties.h>
1868
1881
  #include <taglib/mp4tag.h>
1869
1882
  #include <taglib/mp4atom.h>
1883
+ // To resolve some symbols, like AtomDataType in Item.
1884
+ using namespace TagLib::MP4;
1870
1885
 
1871
1886
 
1872
1887
  #include <taglib/tstring.h>
@@ -1876,9 +1891,11 @@ static VALUE mMP4;
1876
1891
  #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1877
1892
  # include <ruby/encoding.h>
1878
1893
  # define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
1894
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
1879
1895
  # define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
1880
1896
  #else
1881
1897
  # define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
1898
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value)
1882
1899
  # define CONVERT_TO_UTF8(value) value
1883
1900
  #endif
1884
1901
 
@@ -1886,7 +1903,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
1886
1903
  if (byteVector.isNull()) {
1887
1904
  return Qnil;
1888
1905
  } else {
1889
- return rb_tainted_str_new(byteVector.data(), byteVector.size());
1906
+ return rb_str_new(byteVector.data(), byteVector.size());
1890
1907
  }
1891
1908
  }
1892
1909
 
@@ -1902,7 +1919,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
1902
1919
  if (string.isNull()) {
1903
1920
  return Qnil;
1904
1921
  } else {
1905
- VALUE result = rb_tainted_str_new2(string.toCString(true));
1922
+ VALUE result = rb_str_new2(string.toCString(true));
1906
1923
  ASSOCIATE_UTF8_ENCODING(result);
1907
1924
  return result;
1908
1925
  }
@@ -1931,7 +1948,7 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1931
1948
  return result;
1932
1949
  }
1933
1950
  for (long i = 0; i < RARRAY_LEN(ary); i++) {
1934
- VALUE e = RARRAY_PTR(ary)[i];
1951
+ VALUE e = rb_ary_entry(ary, i);
1935
1952
  TagLib::String s = ruby_string_to_taglib_string(e);
1936
1953
  result.append(s);
1937
1954
  }
@@ -1939,12 +1956,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1939
1956
  }
1940
1957
 
1941
1958
  VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1959
+ VALUE result;
1942
1960
  #ifdef _WIN32
1943
1961
  const char *s = (const char *) filename;
1944
- return rb_tainted_str_new2(s);
1962
+ result = rb_str_new2(s);
1945
1963
  #else
1946
- return rb_tainted_str_new2(filename);
1964
+ result = rb_str_new2(filename);
1947
1965
  #endif
1966
+ ASSOCIATE_FILESYSTEM_ENCODING(result);
1967
+ return result;
1948
1968
  }
1949
1969
 
1950
1970
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
@@ -1976,16 +1996,16 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
1976
1996
 
1977
1997
 
1978
1998
 
1979
- static void unlink_taglib_mp4_item_list_map_iterator(TagLib::MP4::ItemListMap::Iterator &it) {
1980
- TagLib::MP4::Item *item = &(it->second);
1999
+ static void unlink_taglib_mp4_item_map_iterator(const TagLib::MP4::ItemMap::ConstIterator &it) {
2000
+ const TagLib::MP4::Item *item = &(it->second);
1981
2001
  TagLib::MP4::CoverArtList list = item->toCoverArtList();
1982
2002
  for (TagLib::MP4::CoverArtList::ConstIterator it = list.begin(); it != list.end(); it++) {
1983
2003
  void *cover_art = (void *) &(*it);
1984
2004
  SWIG_RubyUnlinkObjects(cover_art);
1985
2005
  SWIG_RubyRemoveTracking(cover_art);
1986
2006
  }
1987
- SWIG_RubyUnlinkObjects(item);
1988
- SWIG_RubyRemoveTracking(item);
2007
+ SWIG_RubyUnlinkObjects((void *)item);
2008
+ SWIG_RubyRemoveTracking((void *)item);
1989
2009
  }
1990
2010
 
1991
2011
  VALUE taglib_mp4_item_int_pair_to_ruby_array(const TagLib::MP4::Item::IntPair &int_pair) {
@@ -2008,7 +2028,7 @@ TagLib::MP4::CoverArtList ruby_array_to_taglib_cover_art_list(VALUE ary) {
2008
2028
  return result;
2009
2029
  }
2010
2030
  for (long i = 0; i < RARRAY_LEN(ary); i++) {
2011
- VALUE e = RARRAY_PTR(ary)[i];
2031
+ VALUE e = rb_ary_entry(ary, i);
2012
2032
  TagLib::MP4::CoverArt *c;
2013
2033
  SWIG_ConvertPtr(e, (void **) &c, SWIGTYPE_p_TagLib__MP4__CoverArt, 1);
2014
2034
  result.append(*c);
@@ -2027,6 +2047,16 @@ TagLib::MP4::CoverArtList ruby_array_to_taglib_cover_art_list(VALUE ary) {
2027
2047
  #endif
2028
2048
 
2029
2049
 
2050
+ #define SWIG_From_long LONG2NUM
2051
+
2052
+
2053
+ SWIGINTERNINLINE VALUE
2054
+ SWIG_From_int (int value)
2055
+ {
2056
+ return SWIG_From_long (value);
2057
+ }
2058
+
2059
+
2030
2060
  SWIGINTERN VALUE
2031
2061
  SWIG_ruby_failed(void)
2032
2062
  {
@@ -2034,7 +2064,7 @@ SWIG_ruby_failed(void)
2034
2064
  }
2035
2065
 
2036
2066
 
2037
- /*@SWIG:/usr/local/share/swig/2.0.9/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2067
+ /*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2038
2068
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2039
2069
  {
2040
2070
  VALUE obj = args[0];
@@ -2079,16 +2109,6 @@ SWIG_AsVal_int (VALUE obj, int *val)
2079
2109
  }
2080
2110
 
2081
2111
 
2082
- #define SWIG_From_long LONG2NUM
2083
-
2084
-
2085
- SWIGINTERNINLINE VALUE
2086
- SWIG_From_int (int value)
2087
- {
2088
- return SWIG_From_long (value);
2089
- }
2090
-
2091
-
2092
2112
  SWIGINTERNINLINE VALUE
2093
2113
  SWIG_From_bool (bool value)
2094
2114
  {
@@ -2160,7 +2180,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2160
2180
 
2161
2181
 
2162
2182
 
2163
- /*@SWIG:/usr/local/share/swig/2.0.9/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2183
+ /*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2164
2184
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2165
2185
  {
2166
2186
  VALUE obj = args[0];
@@ -2204,6 +2224,67 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
2204
2224
  return res;
2205
2225
  }
2206
2226
 
2227
+ SWIGINTERN VALUE TagLib_MP4_Tag___setitem__(TagLib::MP4::Tag *self,TagLib::String const &string,TagLib::MP4::Item const &item){
2228
+ TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string);
2229
+ if (it != self->itemMap().end()) {
2230
+ unlink_taglib_mp4_item_map_iterator(it);
2231
+ }
2232
+ self->setItem(string, item);
2233
+ return Qnil;
2234
+ }
2235
+ SWIGINTERN VALUE TagLib_MP4_Tag_remove_item(TagLib::MP4::Tag *self,TagLib::String const &string){
2236
+ TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string);
2237
+ if (it != self->itemMap().end()) {
2238
+ unlink_taglib_mp4_item_map_iterator(it);
2239
+ self->removeItem(string);
2240
+ }
2241
+ return Qnil;
2242
+ }
2243
+
2244
+ SWIGINTERN int
2245
+ SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val)
2246
+ {
2247
+ unsigned long v;
2248
+ int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
2249
+ if (SWIG_IsOK(res)) {
2250
+ if ((v > UCHAR_MAX)) {
2251
+ return SWIG_OverflowError;
2252
+ } else {
2253
+ if (val) *val = static_cast< unsigned char >(v);
2254
+ }
2255
+ }
2256
+ return res;
2257
+ }
2258
+
2259
+
2260
+ /*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2261
+ SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
2262
+ {
2263
+ VALUE obj = args[0];
2264
+ VALUE type = TYPE(obj);
2265
+ long long *res = (long long *)(args[1]);
2266
+ *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj);
2267
+ return obj;
2268
+ }
2269
+ /*@SWIG@*/
2270
+
2271
+ SWIGINTERN int
2272
+ SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
2273
+ {
2274
+ VALUE type = TYPE(obj);
2275
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2276
+ long long v;
2277
+ VALUE a[2];
2278
+ a[0] = obj;
2279
+ a[1] = (VALUE)(&v);
2280
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2281
+ if (val) *val = v;
2282
+ return SWIG_OK;
2283
+ }
2284
+ }
2285
+ return SWIG_TypeError;
2286
+ }
2287
+
2207
2288
 
2208
2289
  SWIGINTERN int
2209
2290
  SWIG_AsVal_bool (VALUE obj, bool *val)
@@ -2224,11 +2305,34 @@ SWIG_AsVal_bool (VALUE obj, bool *val)
2224
2305
  return SWIG_TypeError;
2225
2306
  }
2226
2307
 
2308
+
2309
+ SWIGINTERNINLINE VALUE
2310
+ SWIG_From_unsigned_SS_char (unsigned char value)
2311
+ {
2312
+ return SWIG_From_unsigned_SS_long (value);
2313
+ }
2314
+
2315
+
2316
+ SWIGINTERNINLINE VALUE
2317
+ SWIG_From_long_SS_long (long long value)
2318
+ {
2319
+ return LL2NUM(value);
2320
+ }
2321
+
2322
+ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_bool(bool q){
2323
+ return new TagLib::MP4::Item(q);
2324
+ }
2325
+ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_byte(unsigned char n){
2326
+ return new TagLib::MP4::Item(n);
2327
+ }
2328
+ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_uint(unsigned int n){
2329
+ return new TagLib::MP4::Item(n);
2330
+ }
2227
2331
  SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_int(int n){
2228
2332
  return new TagLib::MP4::Item(n);
2229
2333
  }
2230
- SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_bool(bool q){
2231
- return new TagLib::MP4::Item(q);
2334
+ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_long_long(long long n){
2335
+ return new TagLib::MP4::Item(n);
2232
2336
  }
2233
2337
  SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_string_list(TagLib::StringList const &string_list){
2234
2338
  return new TagLib::MP4::Item(string_list);
@@ -2236,12 +2340,15 @@ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_string_list(TagLib::StringLis
2236
2340
  SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_cover_art_list(TagLib::MP4::CoverArtList const &cover_art_list){
2237
2341
  return new TagLib::MP4::Item(cover_art_list);
2238
2342
  }
2343
+ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_byte_vector_list(TagLib::ByteVectorList const &byte_vector_list){
2344
+ return new TagLib::MP4::Item(byte_vector_list);
2345
+ }
2239
2346
  SWIGINTERN void TagLib_MP4_File_close(TagLib::MP4::File *self){
2240
2347
  free_taglib_mp4_file(self);
2241
2348
  }
2242
2349
  SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_a(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self){
2243
2350
  VALUE ary = rb_ary_new2(self->size());
2244
- for (TagLib::MP4::ItemListMap::Iterator it = self->begin(); it != self->end(); it++) {
2351
+ for (TagLib::MP4::ItemMap::Iterator it = self->begin(); it != self->end(); it++) {
2245
2352
  TagLib::String string = it->first;
2246
2353
  TagLib::MP4::Item *item = &(it->second);
2247
2354
  VALUE pair = rb_ary_new2(2);
@@ -2251,8 +2358,17 @@ SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_a(TagLib:
2251
2358
  }
2252
2359
  return ary;
2253
2360
  }
2361
+ SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_h(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self){
2362
+ VALUE hsh = rb_hash_new();
2363
+ for (TagLib::MP4::ItemMap::Iterator it = self->begin(); it != self->end(); it++) {
2364
+ rb_hash_aset(hsh,
2365
+ taglib_string_to_ruby_string(it->first),
2366
+ SWIG_NewPointerObj(&(it->second), SWIGTYPE_p_TagLib__MP4__Item, 0));
2367
+ }
2368
+ return hsh;
2369
+ }
2254
2370
  SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__fetch(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self,TagLib::String const &string){
2255
- TagLib::MP4::ItemListMap::Iterator it = self->find(string);
2371
+ TagLib::MP4::ItemMap::Iterator it = self->find(string);
2256
2372
  VALUE result = Qnil;
2257
2373
  if (it != self->end()) {
2258
2374
  TagLib::MP4::Item *item = &(it->second);
@@ -2261,24 +2377,24 @@ SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__fetch(TagLib
2261
2377
  return result;
2262
2378
  }
2263
2379
  SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___clear(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self){
2264
- for (TagLib::MP4::ItemListMap::Iterator it = self->begin(); it != self->end(); it++) {
2265
- unlink_taglib_mp4_item_list_map_iterator(it);
2380
+ for (TagLib::MP4::ItemMap::Iterator it = self->begin(); it != self->end(); it++) {
2381
+ unlink_taglib_mp4_item_map_iterator(it);
2266
2382
  }
2267
2383
  self->clear();
2268
2384
  return Qnil;
2269
2385
  }
2270
2386
  SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__erase(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self,TagLib::String const &string){
2271
- TagLib::MP4::ItemListMap::Iterator it = self->find(string);
2387
+ TagLib::MP4::ItemMap::Iterator it = self->find(string);
2272
2388
  if (it != self->end()) {
2273
- unlink_taglib_mp4_item_list_map_iterator(it);
2389
+ unlink_taglib_mp4_item_map_iterator(it);
2274
2390
  self->erase(it);
2275
2391
  }
2276
2392
  return Qnil;
2277
2393
  }
2278
2394
  SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___insert(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self,TagLib::String const &string,TagLib::MP4::Item const &item){
2279
- TagLib::MP4::ItemListMap::Iterator it = self->find(string);
2395
+ TagLib::MP4::ItemMap::Iterator it = self->find(string);
2280
2396
  if (it != self->end()) {
2281
- unlink_taglib_mp4_item_list_map_iterator(it);
2397
+ unlink_taglib_mp4_item_map_iterator(it);
2282
2398
  }
2283
2399
  self->insert(string, item);
2284
2400
  return Qnil;
@@ -2289,10 +2405,10 @@ SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___insert(TagL
2289
2405
 
2290
2406
  TagLib::MP4::Tag *tag = file->tag();
2291
2407
  if (tag) {
2292
- TagLib::Map<TagLib::String, TagLib::MP4::Item> *item_list_map = &(tag->itemListMap());
2408
+ TagLib::MP4::ItemMap *item_list_map = const_cast<TagLib::MP4::ItemMap *>(&(tag->itemMap()));
2293
2409
  if (item_list_map) {
2294
- for (TagLib::MP4::ItemListMap::Iterator it = item_list_map->begin(); it != item_list_map->end(); it++) {
2295
- unlink_taglib_mp4_item_list_map_iterator(it);
2410
+ for (TagLib::MP4::ItemMap::Iterator it = item_list_map->begin(); it != item_list_map->end(); it++) {
2411
+ unlink_taglib_mp4_item_map_iterator(it);
2296
2412
  }
2297
2413
 
2298
2414
  SWIG_RubyUnlinkObjects(item_list_map);
@@ -2467,7 +2583,31 @@ free_TagLib_MP4_Properties(TagLib::MP4::Properties *arg1) {
2467
2583
  }
2468
2584
 
2469
2585
  SWIGINTERN VALUE
2470
- _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2586
+ _wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
2587
+ TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ;
2588
+ void *argp1 = 0 ;
2589
+ int res1 = 0 ;
2590
+ int result;
2591
+ VALUE vresult = Qnil;
2592
+
2593
+ if ((argc < 0) || (argc > 0)) {
2594
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2595
+ }
2596
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 );
2597
+ if (!SWIG_IsOK(res1)) {
2598
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","lengthInSeconds", 1, self ));
2599
+ }
2600
+ arg1 = reinterpret_cast< TagLib::MP4::Properties * >(argp1);
2601
+ result = (int)((TagLib::MP4::Properties const *)arg1)->lengthInSeconds();
2602
+ vresult = SWIG_From_int(static_cast< int >(result));
2603
+ return vresult;
2604
+ fail:
2605
+ return Qnil;
2606
+ }
2607
+
2608
+
2609
+ SWIGINTERN VALUE
2610
+ _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
2471
2611
  TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ;
2472
2612
  void *argp1 = 0 ;
2473
2613
  int res1 = 0 ;
@@ -2479,10 +2619,10 @@ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2479
2619
  }
2480
2620
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 );
2481
2621
  if (!SWIG_IsOK(res1)) {
2482
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","length", 1, self ));
2622
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","lengthInMilliseconds", 1, self ));
2483
2623
  }
2484
2624
  arg1 = reinterpret_cast< TagLib::MP4::Properties * >(argp1);
2485
- result = (int)((TagLib::MP4::Properties const *)arg1)->length();
2625
+ result = (int)((TagLib::MP4::Properties const *)arg1)->lengthInMilliseconds();
2486
2626
  vresult = SWIG_From_int(static_cast< int >(result));
2487
2627
  return vresult;
2488
2628
  fail:
@@ -2586,8 +2726,72 @@ fail:
2586
2726
  }
2587
2727
 
2588
2728
 
2729
+ SWIGINTERN VALUE
2730
+ _wrap_Properties_encryptedq___(int argc, VALUE *argv, VALUE self) {
2731
+ TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ;
2732
+ void *argp1 = 0 ;
2733
+ int res1 = 0 ;
2734
+ bool result;
2735
+ VALUE vresult = Qnil;
2736
+
2737
+ if ((argc < 0) || (argc > 0)) {
2738
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2739
+ }
2740
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 );
2741
+ if (!SWIG_IsOK(res1)) {
2742
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","isEncrypted", 1, self ));
2743
+ }
2744
+ arg1 = reinterpret_cast< TagLib::MP4::Properties * >(argp1);
2745
+ result = (bool)((TagLib::MP4::Properties const *)arg1)->isEncrypted();
2746
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2747
+ return vresult;
2748
+ fail:
2749
+ return Qnil;
2750
+ }
2751
+
2752
+
2753
+ SWIGINTERN VALUE
2754
+ _wrap_Properties_codec(int argc, VALUE *argv, VALUE self) {
2755
+ TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ;
2756
+ void *argp1 = 0 ;
2757
+ int res1 = 0 ;
2758
+ TagLib::MP4::Properties::Codec result;
2759
+ VALUE vresult = Qnil;
2760
+
2761
+ if ((argc < 0) || (argc > 0)) {
2762
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2763
+ }
2764
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 );
2765
+ if (!SWIG_IsOK(res1)) {
2766
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","codec", 1, self ));
2767
+ }
2768
+ arg1 = reinterpret_cast< TagLib::MP4::Properties * >(argp1);
2769
+ result = (TagLib::MP4::Properties::Codec)((TagLib::MP4::Properties const *)arg1)->codec();
2770
+ vresult = SWIG_From_int(static_cast< int >(result));
2771
+ return vresult;
2772
+ fail:
2773
+ return Qnil;
2774
+ }
2775
+
2776
+
2589
2777
  static swig_class SwigClassTag;
2590
2778
 
2779
+ SWIGINTERN VALUE
2780
+ _wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) {
2781
+ TagLib::MP4::Tag *result = 0 ;
2782
+
2783
+ if ((argc < 0) || (argc > 0)) {
2784
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2785
+ }
2786
+ result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag();
2787
+ DATA_PTR(self) = result;
2788
+ SWIG_RubyAddTracking(result, self);
2789
+ return self;
2790
+ fail:
2791
+ return Qnil;
2792
+ }
2793
+
2794
+
2591
2795
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2592
2796
  SWIGINTERN VALUE
2593
2797
  _wrap_Tag_allocate(VALUE self) {
@@ -2606,7 +2810,7 @@ _wrap_Tag_allocate(VALUE self) {
2606
2810
 
2607
2811
 
2608
2812
  SWIGINTERN VALUE
2609
- _wrap_new_Tag(int argc, VALUE *argv, VALUE self) {
2813
+ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) {
2610
2814
  TagLib::File *arg1 = (TagLib::File *) 0 ;
2611
2815
  TagLib::MP4::Atoms *arg2 = (TagLib::MP4::Atoms *) 0 ;
2612
2816
  void *argp1 = 0 ;
@@ -2637,6 +2841,43 @@ fail:
2637
2841
  }
2638
2842
 
2639
2843
 
2844
+ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) {
2845
+ int argc;
2846
+ VALUE argv[2];
2847
+ int ii;
2848
+
2849
+ argc = nargs;
2850
+ if (argc > 2) SWIG_fail;
2851
+ for (ii = 0; (ii < argc); ++ii) {
2852
+ argv[ii] = args[ii];
2853
+ }
2854
+ if (argc == 0) {
2855
+ return _wrap_new_Tag__SWIG_0(nargs, args, self);
2856
+ }
2857
+ if (argc == 2) {
2858
+ int _v;
2859
+ void *vptr = 0;
2860
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0);
2861
+ _v = SWIG_CheckState(res);
2862
+ if (_v) {
2863
+ void *vptr = 0;
2864
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__MP4__Atoms, 0);
2865
+ _v = SWIG_CheckState(res);
2866
+ if (_v) {
2867
+ return _wrap_new_Tag__SWIG_1(nargs, args, self);
2868
+ }
2869
+ }
2870
+ }
2871
+
2872
+ fail:
2873
+ Ruby_Format_OverloadedError( argc, 2, "Tag.new",
2874
+ " Tag.new()\n"
2875
+ " Tag.new(TagLib::File *file, TagLib::MP4::Atoms *atoms)\n");
2876
+
2877
+ return Qnil;
2878
+ }
2879
+
2880
+
2640
2881
  SWIGINTERN void
2641
2882
  free_TagLib_MP4_Tag(TagLib::MP4::Tag *arg1) {
2642
2883
  SWIG_RubyRemoveTracking(arg1);
@@ -2802,7 +3043,7 @@ _wrap_Tag_year(int argc, VALUE *argv, VALUE self) {
2802
3043
  TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
2803
3044
  void *argp1 = 0 ;
2804
3045
  int res1 = 0 ;
2805
- TagLib::uint result;
3046
+ unsigned int result;
2806
3047
  VALUE vresult = Qnil;
2807
3048
 
2808
3049
  if ((argc < 0) || (argc > 0)) {
@@ -2813,7 +3054,7 @@ _wrap_Tag_year(int argc, VALUE *argv, VALUE self) {
2813
3054
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","year", 1, self ));
2814
3055
  }
2815
3056
  arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
2816
- result = (TagLib::uint)((TagLib::MP4::Tag const *)arg1)->year();
3057
+ result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->year();
2817
3058
  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
2818
3059
  return vresult;
2819
3060
  fail:
@@ -2826,7 +3067,7 @@ _wrap_Tag_track(int argc, VALUE *argv, VALUE self) {
2826
3067
  TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
2827
3068
  void *argp1 = 0 ;
2828
3069
  int res1 = 0 ;
2829
- TagLib::uint result;
3070
+ unsigned int result;
2830
3071
  VALUE vresult = Qnil;
2831
3072
 
2832
3073
  if ((argc < 0) || (argc > 0)) {
@@ -2837,7 +3078,7 @@ _wrap_Tag_track(int argc, VALUE *argv, VALUE self) {
2837
3078
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","track", 1, self ));
2838
3079
  }
2839
3080
  arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
2840
- result = (TagLib::uint)((TagLib::MP4::Tag const *)arg1)->track();
3081
+ result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->track();
2841
3082
  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
2842
3083
  return vresult;
2843
3084
  fail:
@@ -2983,7 +3224,7 @@ fail:
2983
3224
  SWIGINTERN VALUE
2984
3225
  _wrap_Tag_yeare___(int argc, VALUE *argv, VALUE self) {
2985
3226
  TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
2986
- TagLib::uint arg2 ;
3227
+ unsigned int arg2 ;
2987
3228
  void *argp1 = 0 ;
2988
3229
  int res1 = 0 ;
2989
3230
  unsigned int val2 ;
@@ -2999,9 +3240,9 @@ _wrap_Tag_yeare___(int argc, VALUE *argv, VALUE self) {
2999
3240
  arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3000
3241
  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3001
3242
  if (!SWIG_IsOK(ecode2)) {
3002
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::uint","setYear", 2, argv[0] ));
3243
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setYear", 2, argv[0] ));
3003
3244
  }
3004
- arg2 = static_cast< TagLib::uint >(val2);
3245
+ arg2 = static_cast< unsigned int >(val2);
3005
3246
  (arg1)->setYear(arg2);
3006
3247
  return Qnil;
3007
3248
  fail:
@@ -3012,7 +3253,7 @@ fail:
3012
3253
  SWIGINTERN VALUE
3013
3254
  _wrap_Tag_tracke___(int argc, VALUE *argv, VALUE self) {
3014
3255
  TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3015
- TagLib::uint arg2 ;
3256
+ unsigned int arg2 ;
3016
3257
  void *argp1 = 0 ;
3017
3258
  int res1 = 0 ;
3018
3259
  unsigned int val2 ;
@@ -3028,9 +3269,9 @@ _wrap_Tag_tracke___(int argc, VALUE *argv, VALUE self) {
3028
3269
  arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3029
3270
  ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3030
3271
  if (!SWIG_IsOK(ecode2)) {
3031
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::uint","setTrack", 2, argv[0] ));
3272
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setTrack", 2, argv[0] ));
3032
3273
  }
3033
- arg2 = static_cast< TagLib::uint >(val2);
3274
+ arg2 = static_cast< unsigned int >(val2);
3034
3275
  (arg1)->setTrack(arg2);
3035
3276
  return Qnil;
3036
3277
  fail:
@@ -3039,11 +3280,11 @@ fail:
3039
3280
 
3040
3281
 
3041
3282
  SWIGINTERN VALUE
3042
- _wrap_Tag_item_list_map(int argc, VALUE *argv, VALUE self) {
3283
+ _wrap_Tag_emptyq___(int argc, VALUE *argv, VALUE self) {
3043
3284
  TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3044
3285
  void *argp1 = 0 ;
3045
3286
  int res1 = 0 ;
3046
- TagLib::MP4::ItemListMap *result = 0 ;
3287
+ bool result;
3047
3288
  VALUE vresult = Qnil;
3048
3289
 
3049
3290
  if ((argc < 0) || (argc > 0)) {
@@ -3051,21 +3292,185 @@ _wrap_Tag_item_list_map(int argc, VALUE *argv, VALUE self) {
3051
3292
  }
3052
3293
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3053
3294
  if (!SWIG_IsOK(res1)) {
3054
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","itemListMap", 1, self ));
3295
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","isEmpty", 1, self ));
3055
3296
  }
3056
3297
  arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3057
- result = (TagLib::MP4::ItemListMap *) &(arg1)->itemListMap();
3058
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 );
3298
+ result = (bool)((TagLib::MP4::Tag const *)arg1)->isEmpty();
3299
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3059
3300
  return vresult;
3060
3301
  fail:
3061
3302
  return Qnil;
3062
3303
  }
3063
3304
 
3064
3305
 
3065
- static swig_class SwigClassCoverArt;
3066
-
3067
3306
  SWIGINTERN VALUE
3068
- _wrap_new_CoverArt__SWIG_0(int argc, VALUE *argv, VALUE self) {
3307
+ _wrap_Tag_item_map(int argc, VALUE *argv, VALUE self) {
3308
+ TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3309
+ void *argp1 = 0 ;
3310
+ int res1 = 0 ;
3311
+ TagLib::MP4::ItemMap *result = 0 ;
3312
+ VALUE vresult = Qnil;
3313
+
3314
+ if ((argc < 0) || (argc > 0)) {
3315
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3316
+ }
3317
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3318
+ if (!SWIG_IsOK(res1)) {
3319
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","itemMap", 1, self ));
3320
+ }
3321
+ arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3322
+ result = (TagLib::MP4::ItemMap *) &((TagLib::MP4::Tag const *)arg1)->itemMap();
3323
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 );
3324
+ return vresult;
3325
+ fail:
3326
+ return Qnil;
3327
+ }
3328
+
3329
+
3330
+ SWIGINTERN VALUE
3331
+ _wrap_Tag___getitem__(int argc, VALUE *argv, VALUE self) {
3332
+ TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3333
+ TagLib::String *arg2 = 0 ;
3334
+ void *argp1 = 0 ;
3335
+ int res1 = 0 ;
3336
+ TagLib::String tmp2 ;
3337
+ TagLib::MP4::Item result;
3338
+ VALUE vresult = Qnil;
3339
+
3340
+ if ((argc < 1) || (argc > 1)) {
3341
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3342
+ }
3343
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3344
+ if (!SWIG_IsOK(res1)) {
3345
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","item", 1, self ));
3346
+ }
3347
+ arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3348
+ {
3349
+ tmp2 = ruby_string_to_taglib_string(argv[0]);
3350
+ arg2 = &tmp2;
3351
+ }
3352
+ result = ((TagLib::MP4::Tag const *)arg1)->item((TagLib::String const &)*arg2);
3353
+ vresult = SWIG_NewPointerObj((new TagLib::MP4::Item(static_cast< const TagLib::MP4::Item& >(result))), SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_OWN | 0 );
3354
+ return vresult;
3355
+ fail:
3356
+ return Qnil;
3357
+ }
3358
+
3359
+
3360
+ SWIGINTERN VALUE
3361
+ _wrap_Tag_contains(int argc, VALUE *argv, VALUE self) {
3362
+ TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3363
+ TagLib::String *arg2 = 0 ;
3364
+ void *argp1 = 0 ;
3365
+ int res1 = 0 ;
3366
+ TagLib::String tmp2 ;
3367
+ bool result;
3368
+ VALUE vresult = Qnil;
3369
+
3370
+ if ((argc < 1) || (argc > 1)) {
3371
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3372
+ }
3373
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3374
+ if (!SWIG_IsOK(res1)) {
3375
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","contains", 1, self ));
3376
+ }
3377
+ arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3378
+ {
3379
+ tmp2 = ruby_string_to_taglib_string(argv[0]);
3380
+ arg2 = &tmp2;
3381
+ }
3382
+ result = (bool)((TagLib::MP4::Tag const *)arg1)->contains((TagLib::String const &)*arg2);
3383
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3384
+ return vresult;
3385
+ fail:
3386
+ return Qnil;
3387
+ }
3388
+
3389
+
3390
+
3391
+ /*
3392
+ Document-method: TagLib::MP4::Tag.[]=
3393
+
3394
+ call-seq:
3395
+ []=(string, item) -> VALUE
3396
+
3397
+ Element setter/slicing.
3398
+ */
3399
+ SWIGINTERN VALUE
3400
+ _wrap_Tag___setitem__(int argc, VALUE *argv, VALUE self) {
3401
+ TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3402
+ TagLib::String *arg2 = 0 ;
3403
+ TagLib::MP4::Item *arg3 = 0 ;
3404
+ void *argp1 = 0 ;
3405
+ int res1 = 0 ;
3406
+ TagLib::String tmp2 ;
3407
+ void *argp3 ;
3408
+ int res3 = 0 ;
3409
+ VALUE result;
3410
+ VALUE vresult = Qnil;
3411
+
3412
+ if ((argc < 2) || (argc > 2)) {
3413
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3414
+ }
3415
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3416
+ if (!SWIG_IsOK(res1)) {
3417
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","__setitem__", 1, self ));
3418
+ }
3419
+ arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3420
+ {
3421
+ tmp2 = ruby_string_to_taglib_string(argv[0]);
3422
+ arg2 = &tmp2;
3423
+ }
3424
+ res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 );
3425
+ if (!SWIG_IsOK(res3)) {
3426
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","__setitem__", 3, argv[1] ));
3427
+ }
3428
+ if (!argp3) {
3429
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","__setitem__", 3, argv[1]));
3430
+ }
3431
+ arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3);
3432
+ result = (VALUE)TagLib_MP4_Tag___setitem__(arg1,(TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3);
3433
+ vresult = result;
3434
+ return vresult;
3435
+ fail:
3436
+ return Qnil;
3437
+ }
3438
+
3439
+
3440
+ SWIGINTERN VALUE
3441
+ _wrap_Tag_remove_item(int argc, VALUE *argv, VALUE self) {
3442
+ TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ;
3443
+ TagLib::String *arg2 = 0 ;
3444
+ void *argp1 = 0 ;
3445
+ int res1 = 0 ;
3446
+ TagLib::String tmp2 ;
3447
+ VALUE result;
3448
+ VALUE vresult = Qnil;
3449
+
3450
+ if ((argc < 1) || (argc > 1)) {
3451
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3452
+ }
3453
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 );
3454
+ if (!SWIG_IsOK(res1)) {
3455
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","remove_item", 1, self ));
3456
+ }
3457
+ arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1);
3458
+ {
3459
+ tmp2 = ruby_string_to_taglib_string(argv[0]);
3460
+ arg2 = &tmp2;
3461
+ }
3462
+ result = (VALUE)TagLib_MP4_Tag_remove_item(arg1,(TagLib::String const &)*arg2);
3463
+ vresult = result;
3464
+ return vresult;
3465
+ fail:
3466
+ return Qnil;
3467
+ }
3468
+
3469
+
3470
+ static swig_class SwigClassCoverArt;
3471
+
3472
+ SWIGINTERN VALUE
3473
+ _wrap_new_CoverArt__SWIG_0(int argc, VALUE *argv, VALUE self) {
3069
3474
  TagLib::MP4::CoverArt::Format arg1 ;
3070
3475
  TagLib::ByteVector *arg2 = 0 ;
3071
3476
  int val1 ;
@@ -3314,6 +3719,78 @@ fail:
3314
3719
 
3315
3720
  SWIGINTERN VALUE
3316
3721
  _wrap_new_Item__SWIG_3(int argc, VALUE *argv, VALUE self) {
3722
+ unsigned char arg1 ;
3723
+ unsigned char val1 ;
3724
+ int ecode1 = 0 ;
3725
+ TagLib::MP4::Item *result = 0 ;
3726
+
3727
+ if ((argc < 1) || (argc > 1)) {
3728
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3729
+ }
3730
+ ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
3731
+ if (!SWIG_IsOK(ecode1)) {
3732
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","Item", 1, argv[0] ));
3733
+ }
3734
+ arg1 = static_cast< unsigned char >(val1);
3735
+ result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1);
3736
+ DATA_PTR(self) = result;
3737
+ SWIG_RubyAddTracking(result, self);
3738
+ return self;
3739
+ fail:
3740
+ return Qnil;
3741
+ }
3742
+
3743
+
3744
+ SWIGINTERN VALUE
3745
+ _wrap_new_Item__SWIG_4(int argc, VALUE *argv, VALUE self) {
3746
+ unsigned int arg1 ;
3747
+ unsigned int val1 ;
3748
+ int ecode1 = 0 ;
3749
+ TagLib::MP4::Item *result = 0 ;
3750
+
3751
+ if ((argc < 1) || (argc > 1)) {
3752
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3753
+ }
3754
+ ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
3755
+ if (!SWIG_IsOK(ecode1)) {
3756
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Item", 1, argv[0] ));
3757
+ }
3758
+ arg1 = static_cast< unsigned int >(val1);
3759
+ result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1);
3760
+ DATA_PTR(self) = result;
3761
+ SWIG_RubyAddTracking(result, self);
3762
+ return self;
3763
+ fail:
3764
+ return Qnil;
3765
+ }
3766
+
3767
+
3768
+ SWIGINTERN VALUE
3769
+ _wrap_new_Item__SWIG_5(int argc, VALUE *argv, VALUE self) {
3770
+ long long arg1 ;
3771
+ long long val1 ;
3772
+ int ecode1 = 0 ;
3773
+ TagLib::MP4::Item *result = 0 ;
3774
+
3775
+ if ((argc < 1) || (argc > 1)) {
3776
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3777
+ }
3778
+ ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1);
3779
+ if (!SWIG_IsOK(ecode1)) {
3780
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","Item", 1, argv[0] ));
3781
+ }
3782
+ arg1 = static_cast< long long >(val1);
3783
+ result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1);
3784
+ DATA_PTR(self) = result;
3785
+ SWIG_RubyAddTracking(result, self);
3786
+ return self;
3787
+ fail:
3788
+ return Qnil;
3789
+ }
3790
+
3791
+
3792
+ SWIGINTERN VALUE
3793
+ _wrap_new_Item__SWIG_6(int argc, VALUE *argv, VALUE self) {
3317
3794
  bool arg1 ;
3318
3795
  bool val1 ;
3319
3796
  int ecode1 = 0 ;
@@ -3337,7 +3814,7 @@ fail:
3337
3814
 
3338
3815
 
3339
3816
  SWIGINTERN VALUE
3340
- _wrap_new_Item__SWIG_4(int argc, VALUE *argv, VALUE self) {
3817
+ _wrap_new_Item__SWIG_7(int argc, VALUE *argv, VALUE self) {
3341
3818
  int arg1 ;
3342
3819
  int arg2 ;
3343
3820
  int val1 ;
@@ -3369,7 +3846,7 @@ fail:
3369
3846
 
3370
3847
 
3371
3848
  SWIGINTERN VALUE
3372
- _wrap_new_Item__SWIG_5(int argc, VALUE *argv, VALUE self) {
3849
+ _wrap_new_Item__SWIG_8(int argc, VALUE *argv, VALUE self) {
3373
3850
  TagLib::StringList *arg1 = 0 ;
3374
3851
  TagLib::StringList tmp1 ;
3375
3852
  TagLib::MP4::Item *result = 0 ;
@@ -3390,6 +3867,33 @@ fail:
3390
3867
  }
3391
3868
 
3392
3869
 
3870
+ SWIGINTERN VALUE
3871
+ _wrap_new_Item__SWIG_9(int argc, VALUE *argv, VALUE self) {
3872
+ TagLib::ByteVectorList *arg1 = 0 ;
3873
+ void *argp1 ;
3874
+ int res1 = 0 ;
3875
+ TagLib::MP4::Item *result = 0 ;
3876
+
3877
+ if ((argc < 1) || (argc > 1)) {
3878
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3879
+ }
3880
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__ByteVectorList, 0 );
3881
+ if (!SWIG_IsOK(res1)) {
3882
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ByteVectorList const &","Item", 1, argv[0] ));
3883
+ }
3884
+ if (!argp1) {
3885
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ByteVectorList const &","Item", 1, argv[0]));
3886
+ }
3887
+ arg1 = reinterpret_cast< TagLib::ByteVectorList * >(argp1);
3888
+ result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::ByteVectorList const &)*arg1);
3889
+ DATA_PTR(self) = result;
3890
+ SWIG_RubyAddTracking(result, self);
3891
+ return self;
3892
+ fail:
3893
+ return Qnil;
3894
+ }
3895
+
3896
+
3393
3897
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3394
3898
  SWIGINTERN VALUE
3395
3899
  _wrap_Item_allocate(VALUE self) {
@@ -3408,7 +3912,7 @@ _wrap_Item_allocate(VALUE self) {
3408
3912
 
3409
3913
 
3410
3914
  SWIGINTERN VALUE
3411
- _wrap_new_Item__SWIG_6(int argc, VALUE *argv, VALUE self) {
3915
+ _wrap_new_Item__SWIG_10(int argc, VALUE *argv, VALUE self) {
3412
3916
  TagLib::MP4::CoverArtList *arg1 = 0 ;
3413
3917
  TagLib::MP4::CoverArtList tmp1 ;
3414
3918
  TagLib::MP4::Item *result = 0 ;
@@ -3457,7 +3961,16 @@ SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) {
3457
3961
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__StringList, 0);
3458
3962
  _v = SWIG_CheckState(res);
3459
3963
  if (_v) {
3460
- return _wrap_new_Item__SWIG_5(nargs, args, self);
3964
+ return _wrap_new_Item__SWIG_8(nargs, args, self);
3965
+ }
3966
+ }
3967
+ if (argc == 1) {
3968
+ int _v;
3969
+ void *vptr = 0;
3970
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVectorList, 0);
3971
+ _v = SWIG_CheckState(res);
3972
+ if (_v) {
3973
+ return _wrap_new_Item__SWIG_9(nargs, args, self);
3461
3974
  }
3462
3975
  }
3463
3976
  if (argc == 1) {
@@ -3466,7 +3979,27 @@ SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) {
3466
3979
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__CoverArtList, 0);
3467
3980
  _v = SWIG_CheckState(res);
3468
3981
  if (_v) {
3469
- return _wrap_new_Item__SWIG_6(nargs, args, self);
3982
+ return _wrap_new_Item__SWIG_10(nargs, args, self);
3983
+ }
3984
+ }
3985
+ if (argc == 1) {
3986
+ int _v;
3987
+ {
3988
+ int res = SWIG_AsVal_unsigned_SS_char(argv[0], NULL);
3989
+ _v = SWIG_CheckState(res);
3990
+ }
3991
+ if (_v) {
3992
+ return _wrap_new_Item__SWIG_3(nargs, args, self);
3993
+ }
3994
+ }
3995
+ if (argc == 1) {
3996
+ int _v;
3997
+ {
3998
+ int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
3999
+ _v = SWIG_CheckState(res);
4000
+ }
4001
+ if (_v) {
4002
+ return _wrap_new_Item__SWIG_4(nargs, args, self);
3470
4003
  }
3471
4004
  }
3472
4005
  if (argc == 1) {
@@ -3479,6 +4012,16 @@ SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) {
3479
4012
  return _wrap_new_Item__SWIG_2(nargs, args, self);
3480
4013
  }
3481
4014
  }
4015
+ if (argc == 1) {
4016
+ int _v;
4017
+ {
4018
+ int res = SWIG_AsVal_long_SS_long(argv[0], NULL);
4019
+ _v = SWIG_CheckState(res);
4020
+ }
4021
+ if (_v) {
4022
+ return _wrap_new_Item__SWIG_5(nargs, args, self);
4023
+ }
4024
+ }
3482
4025
  if (argc == 1) {
3483
4026
  int _v;
3484
4027
  {
@@ -3486,7 +4029,7 @@ SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) {
3486
4029
  _v = SWIG_CheckState(res);
3487
4030
  }
3488
4031
  if (_v) {
3489
- return _wrap_new_Item__SWIG_3(nargs, args, self);
4032
+ return _wrap_new_Item__SWIG_6(nargs, args, self);
3490
4033
  }
3491
4034
  }
3492
4035
  if (argc == 2) {
@@ -3501,7 +4044,7 @@ SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) {
3501
4044
  _v = SWIG_CheckState(res);
3502
4045
  }
3503
4046
  if (_v) {
3504
- return _wrap_new_Item__SWIG_4(nargs, args, self);
4047
+ return _wrap_new_Item__SWIG_7(nargs, args, self);
3505
4048
  }
3506
4049
  }
3507
4050
  }
@@ -3511,9 +4054,13 @@ fail:
3511
4054
  " Item.new()\n"
3512
4055
  " Item.new(TagLib::MP4::Item const &item)\n"
3513
4056
  " Item.new(int value)\n"
4057
+ " Item.new(unsigned char value)\n"
4058
+ " Item.new(unsigned int value)\n"
4059
+ " Item.new(long long value)\n"
3514
4060
  " Item.new(bool value)\n"
3515
4061
  " Item.new(int first, int second)\n"
3516
4062
  " Item.new(TagLib::StringList const &value)\n"
4063
+ " Item.new(TagLib::ByteVectorList const &value)\n"
3517
4064
  " Item.new(TagLib::MP4::CoverArtList const &value)\n");
3518
4065
 
3519
4066
  return Qnil;
@@ -3544,6 +4091,78 @@ fail:
3544
4091
  }
3545
4092
 
3546
4093
 
4094
+ SWIGINTERN VALUE
4095
+ _wrap_Item_to_byte(int argc, VALUE *argv, VALUE self) {
4096
+ TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
4097
+ void *argp1 = 0 ;
4098
+ int res1 = 0 ;
4099
+ unsigned char result;
4100
+ VALUE vresult = Qnil;
4101
+
4102
+ if ((argc < 0) || (argc > 0)) {
4103
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4104
+ }
4105
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4106
+ if (!SWIG_IsOK(res1)) {
4107
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByte", 1, self ));
4108
+ }
4109
+ arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1);
4110
+ result = (unsigned char)((TagLib::MP4::Item const *)arg1)->toByte();
4111
+ vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
4112
+ return vresult;
4113
+ fail:
4114
+ return Qnil;
4115
+ }
4116
+
4117
+
4118
+ SWIGINTERN VALUE
4119
+ _wrap_Item_to_uint(int argc, VALUE *argv, VALUE self) {
4120
+ TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
4121
+ void *argp1 = 0 ;
4122
+ int res1 = 0 ;
4123
+ unsigned int result;
4124
+ VALUE vresult = Qnil;
4125
+
4126
+ if ((argc < 0) || (argc > 0)) {
4127
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4128
+ }
4129
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4130
+ if (!SWIG_IsOK(res1)) {
4131
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toUInt", 1, self ));
4132
+ }
4133
+ arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1);
4134
+ result = (unsigned int)((TagLib::MP4::Item const *)arg1)->toUInt();
4135
+ vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
4136
+ return vresult;
4137
+ fail:
4138
+ return Qnil;
4139
+ }
4140
+
4141
+
4142
+ SWIGINTERN VALUE
4143
+ _wrap_Item_to_long_long(int argc, VALUE *argv, VALUE self) {
4144
+ TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
4145
+ void *argp1 = 0 ;
4146
+ int res1 = 0 ;
4147
+ long long result;
4148
+ VALUE vresult = Qnil;
4149
+
4150
+ if ((argc < 0) || (argc > 0)) {
4151
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4152
+ }
4153
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4154
+ if (!SWIG_IsOK(res1)) {
4155
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toLongLong", 1, self ));
4156
+ }
4157
+ arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1);
4158
+ result = (long long)((TagLib::MP4::Item const *)arg1)->toLongLong();
4159
+ vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
4160
+ return vresult;
4161
+ fail:
4162
+ return Qnil;
4163
+ }
4164
+
4165
+
3547
4166
  SWIGINTERN VALUE
3548
4167
  _wrap_Item_to_bool(int argc, VALUE *argv, VALUE self) {
3549
4168
  TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
@@ -3620,6 +4239,30 @@ fail:
3620
4239
  }
3621
4240
 
3622
4241
 
4242
+ SWIGINTERN VALUE
4243
+ _wrap_Item_to_byte_vector_list(int argc, VALUE *argv, VALUE self) {
4244
+ TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
4245
+ void *argp1 = 0 ;
4246
+ int res1 = 0 ;
4247
+ TagLib::ByteVectorList result;
4248
+ VALUE vresult = Qnil;
4249
+
4250
+ if ((argc < 0) || (argc > 0)) {
4251
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4252
+ }
4253
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4254
+ if (!SWIG_IsOK(res1)) {
4255
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByteVectorList", 1, self ));
4256
+ }
4257
+ arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1);
4258
+ result = ((TagLib::MP4::Item const *)arg1)->toByteVectorList();
4259
+ vresult = SWIG_NewPointerObj((new TagLib::ByteVectorList(static_cast< const TagLib::ByteVectorList& >(result))), SWIGTYPE_p_TagLib__ByteVectorList, SWIG_POINTER_OWN | 0 );
4260
+ return vresult;
4261
+ fail:
4262
+ return Qnil;
4263
+ }
4264
+
4265
+
3623
4266
  SWIGINTERN VALUE
3624
4267
  _wrap_Item_to_cover_art_list(int argc, VALUE *argv, VALUE self) {
3625
4268
  TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ;
@@ -3670,6 +4313,78 @@ fail:
3670
4313
  }
3671
4314
 
3672
4315
 
4316
+ SWIGINTERN VALUE
4317
+ _wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) {
4318
+ bool arg1 ;
4319
+ bool val1 ;
4320
+ int ecode1 = 0 ;
4321
+ TagLib::MP4::Item *result = 0 ;
4322
+ VALUE vresult = Qnil;
4323
+
4324
+ if ((argc < 1) || (argc > 1)) {
4325
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4326
+ }
4327
+ ecode1 = SWIG_AsVal_bool(argv[0], &val1);
4328
+ if (!SWIG_IsOK(ecode1)) {
4329
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","TagLib_MP4_Item_from_bool", 1, argv[0] ));
4330
+ }
4331
+ arg1 = static_cast< bool >(val1);
4332
+ result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_bool(arg1);
4333
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4334
+ return vresult;
4335
+ fail:
4336
+ return Qnil;
4337
+ }
4338
+
4339
+
4340
+ SWIGINTERN VALUE
4341
+ _wrap_Item_from_byte(int argc, VALUE *argv, VALUE self) {
4342
+ unsigned char arg1 ;
4343
+ unsigned char val1 ;
4344
+ int ecode1 = 0 ;
4345
+ TagLib::MP4::Item *result = 0 ;
4346
+ VALUE vresult = Qnil;
4347
+
4348
+ if ((argc < 1) || (argc > 1)) {
4349
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4350
+ }
4351
+ ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
4352
+ if (!SWIG_IsOK(ecode1)) {
4353
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","TagLib_MP4_Item_from_byte", 1, argv[0] ));
4354
+ }
4355
+ arg1 = static_cast< unsigned char >(val1);
4356
+ result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte(arg1);
4357
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4358
+ return vresult;
4359
+ fail:
4360
+ return Qnil;
4361
+ }
4362
+
4363
+
4364
+ SWIGINTERN VALUE
4365
+ _wrap_Item_from_uint(int argc, VALUE *argv, VALUE self) {
4366
+ unsigned int arg1 ;
4367
+ unsigned int val1 ;
4368
+ int ecode1 = 0 ;
4369
+ TagLib::MP4::Item *result = 0 ;
4370
+ VALUE vresult = Qnil;
4371
+
4372
+ if ((argc < 1) || (argc > 1)) {
4373
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4374
+ }
4375
+ ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
4376
+ if (!SWIG_IsOK(ecode1)) {
4377
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","TagLib_MP4_Item_from_uint", 1, argv[0] ));
4378
+ }
4379
+ arg1 = static_cast< unsigned int >(val1);
4380
+ result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_uint(arg1);
4381
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4382
+ return vresult;
4383
+ fail:
4384
+ return Qnil;
4385
+ }
4386
+
4387
+
3673
4388
  SWIGINTERN VALUE
3674
4389
  _wrap_Item_from_int(int argc, VALUE *argv, VALUE self) {
3675
4390
  int arg1 ;
@@ -3695,9 +4410,9 @@ fail:
3695
4410
 
3696
4411
 
3697
4412
  SWIGINTERN VALUE
3698
- _wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) {
3699
- bool arg1 ;
3700
- bool val1 ;
4413
+ _wrap_Item_from_long_long(int argc, VALUE *argv, VALUE self) {
4414
+ long long arg1 ;
4415
+ long long val1 ;
3701
4416
  int ecode1 = 0 ;
3702
4417
  TagLib::MP4::Item *result = 0 ;
3703
4418
  VALUE vresult = Qnil;
@@ -3705,12 +4420,12 @@ _wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) {
3705
4420
  if ((argc < 1) || (argc > 1)) {
3706
4421
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3707
4422
  }
3708
- ecode1 = SWIG_AsVal_bool(argv[0], &val1);
4423
+ ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1);
3709
4424
  if (!SWIG_IsOK(ecode1)) {
3710
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","TagLib_MP4_Item_from_bool", 1, argv[0] ));
4425
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","TagLib_MP4_Item_from_long_long", 1, argv[0] ));
3711
4426
  }
3712
- arg1 = static_cast< bool >(val1);
3713
- result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_bool(arg1);
4427
+ arg1 = static_cast< long long >(val1);
4428
+ result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_long_long(arg1);
3714
4429
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
3715
4430
  return vresult;
3716
4431
  fail:
@@ -3762,11 +4477,38 @@ fail:
3762
4477
  }
3763
4478
 
3764
4479
 
4480
+ SWIGINTERN VALUE
4481
+ _wrap_Item_from_byte_vector_list(int argc, VALUE *argv, VALUE self) {
4482
+ TagLib::ByteVectorList *arg1 = 0 ;
4483
+ void *argp1 ;
4484
+ int res1 = 0 ;
4485
+ TagLib::MP4::Item *result = 0 ;
4486
+ VALUE vresult = Qnil;
4487
+
4488
+ if ((argc < 1) || (argc > 1)) {
4489
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4490
+ }
4491
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__ByteVectorList, 0 );
4492
+ if (!SWIG_IsOK(res1)) {
4493
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ByteVectorList const &","TagLib_MP4_Item_from_byte_vector_list", 1, argv[0] ));
4494
+ }
4495
+ if (!argp1) {
4496
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ByteVectorList const &","TagLib_MP4_Item_from_byte_vector_list", 1, argv[0]));
4497
+ }
4498
+ arg1 = reinterpret_cast< TagLib::ByteVectorList * >(argp1);
4499
+ result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte_vector_list((TagLib::ByteVectorList const &)*arg1);
4500
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 );
4501
+ return vresult;
4502
+ fail:
4503
+ return Qnil;
4504
+ }
4505
+
4506
+
3765
4507
  static swig_class SwigClassFile;
3766
4508
 
3767
4509
  SWIGINTERN VALUE
3768
4510
  _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3769
- SwigValueWrapper< TagLib::FileName > arg1 ;
4511
+ TagLib::FileName arg1 ;
3770
4512
  bool arg2 ;
3771
4513
  TagLib::MP4::Properties::ReadStyle arg3 ;
3772
4514
  bool val2 ;
@@ -3805,7 +4547,7 @@ fail:
3805
4547
 
3806
4548
  SWIGINTERN VALUE
3807
4549
  _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
3808
- SwigValueWrapper< TagLib::FileName > arg1 ;
4550
+ TagLib::FileName arg1 ;
3809
4551
  bool arg2 ;
3810
4552
  bool val2 ;
3811
4553
  int ecode2 = 0 ;
@@ -3853,7 +4595,7 @@ _wrap_File_allocate(VALUE self) {
3853
4595
 
3854
4596
  SWIGINTERN VALUE
3855
4597
  _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
3856
- SwigValueWrapper< TagLib::FileName > arg1 ;
4598
+ TagLib::FileName arg1 ;
3857
4599
  TagLib::MP4::File *result = 0 ;
3858
4600
 
3859
4601
  if ((argc < 1) || (argc > 1)) {
@@ -4009,6 +4751,30 @@ fail:
4009
4751
  }
4010
4752
 
4011
4753
 
4754
+ SWIGINTERN VALUE
4755
+ _wrap_File_mp4_tagq___(int argc, VALUE *argv, VALUE self) {
4756
+ TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ;
4757
+ void *argp1 = 0 ;
4758
+ int res1 = 0 ;
4759
+ bool result;
4760
+ VALUE vresult = Qnil;
4761
+
4762
+ if ((argc < 0) || (argc > 0)) {
4763
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4764
+ }
4765
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 );
4766
+ if (!SWIG_IsOK(res1)) {
4767
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","hasMP4Tag", 1, self ));
4768
+ }
4769
+ arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1);
4770
+ result = (bool)((TagLib::MP4::File const *)arg1)->hasMP4Tag();
4771
+ vresult = SWIG_From_bool(static_cast< bool >(result));
4772
+ return vresult;
4773
+ fail:
4774
+ return Qnil;
4775
+ }
4776
+
4777
+
4012
4778
  SWIGINTERN VALUE
4013
4779
  _wrap_File_close(int argc, VALUE *argv, VALUE self) {
4014
4780
  TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ;
@@ -4030,10 +4796,10 @@ fail:
4030
4796
  }
4031
4797
 
4032
4798
 
4033
- static swig_class SwigClassItemListMap;
4799
+ static swig_class SwigClassItemMap;
4034
4800
 
4035
4801
  SWIGINTERN VALUE
4036
- _wrap_new_ItemListMap__SWIG_0(int argc, VALUE *argv, VALUE self) {
4802
+ _wrap_new_ItemMap__SWIG_0(int argc, VALUE *argv, VALUE self) {
4037
4803
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ;
4038
4804
 
4039
4805
  if ((argc < 0) || (argc > 0)) {
@@ -4050,10 +4816,10 @@ fail:
4050
4816
 
4051
4817
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
4052
4818
  SWIGINTERN VALUE
4053
- _wrap_ItemListMap_allocate(VALUE self) {
4819
+ _wrap_ItemMap_allocate(VALUE self) {
4054
4820
  #else
4055
4821
  SWIGINTERN VALUE
4056
- _wrap_ItemListMap_allocate(int argc, VALUE *argv, VALUE self) {
4822
+ _wrap_ItemMap_allocate(int argc, VALUE *argv, VALUE self) {
4057
4823
  #endif
4058
4824
 
4059
4825
 
@@ -4066,7 +4832,7 @@ _wrap_ItemListMap_allocate(VALUE self) {
4066
4832
 
4067
4833
 
4068
4834
  SWIGINTERN VALUE
4069
- _wrap_new_ItemListMap__SWIG_1(int argc, VALUE *argv, VALUE self) {
4835
+ _wrap_new_ItemMap__SWIG_1(int argc, VALUE *argv, VALUE self) {
4070
4836
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = 0 ;
4071
4837
  void *argp1 ;
4072
4838
  int res1 = 0 ;
@@ -4092,7 +4858,7 @@ fail:
4092
4858
  }
4093
4859
 
4094
4860
 
4095
- SWIGINTERN VALUE _wrap_new_ItemListMap(int nargs, VALUE *args, VALUE self) {
4861
+ SWIGINTERN VALUE _wrap_new_ItemMap(int nargs, VALUE *args, VALUE self) {
4096
4862
  int argc;
4097
4863
  VALUE argv[1];
4098
4864
  int ii;
@@ -4103,7 +4869,7 @@ SWIGINTERN VALUE _wrap_new_ItemListMap(int nargs, VALUE *args, VALUE self) {
4103
4869
  argv[ii] = args[ii];
4104
4870
  }
4105
4871
  if (argc == 0) {
4106
- return _wrap_new_ItemListMap__SWIG_0(nargs, args, self);
4872
+ return _wrap_new_ItemMap__SWIG_0(nargs, args, self);
4107
4873
  }
4108
4874
  if (argc == 1) {
4109
4875
  int _v;
@@ -4111,14 +4877,14 @@ SWIGINTERN VALUE _wrap_new_ItemListMap(int nargs, VALUE *args, VALUE self) {
4111
4877
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0);
4112
4878
  _v = SWIG_CheckState(res);
4113
4879
  if (_v) {
4114
- return _wrap_new_ItemListMap__SWIG_1(nargs, args, self);
4880
+ return _wrap_new_ItemMap__SWIG_1(nargs, args, self);
4115
4881
  }
4116
4882
  }
4117
4883
 
4118
4884
  fail:
4119
- Ruby_Format_OverloadedError( argc, 1, "ItemListMap.new",
4120
- " ItemListMap.new()\n"
4121
- " ItemListMap.new(TagLib::Map< TagLib::String,TagLib::MP4::Item > const &m)\n");
4885
+ Ruby_Format_OverloadedError( argc, 1, "ItemMap.new",
4886
+ " ItemMap.new()\n"
4887
+ " ItemMap.new(TagLib::Map< TagLib::String,TagLib::MP4::Item > const &m)\n");
4122
4888
 
4123
4889
  return Qnil;
4124
4890
  }
@@ -4132,19 +4898,19 @@ free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_(TagLib::Map< TagLib::Str
4132
4898
 
4133
4899
 
4134
4900
  /*
4135
- Document-method: TagLib::MP4::ItemListMap.size
4901
+ Document-method: TagLib::MP4::ItemMap.size
4136
4902
 
4137
4903
  call-seq:
4138
- size -> TagLib::uint
4904
+ size -> unsigned int
4139
4905
 
4140
- Size or Length of the ItemListMap.
4906
+ Size or Length of the ItemMap.
4141
4907
  */
4142
4908
  SWIGINTERN VALUE
4143
- _wrap_ItemListMap_size(int argc, VALUE *argv, VALUE self) {
4909
+ _wrap_ItemMap_size(int argc, VALUE *argv, VALUE self) {
4144
4910
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4145
4911
  void *argp1 = 0 ;
4146
4912
  int res1 = 0 ;
4147
- TagLib::uint result;
4913
+ unsigned int result;
4148
4914
  VALUE vresult = Qnil;
4149
4915
 
4150
4916
  if ((argc < 0) || (argc > 0)) {
@@ -4155,7 +4921,7 @@ _wrap_ItemListMap_size(int argc, VALUE *argv, VALUE self) {
4155
4921
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","size", 1, self ));
4156
4922
  }
4157
4923
  arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1);
4158
- result = (TagLib::uint)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->size();
4924
+ result = (unsigned int)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->size();
4159
4925
  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
4160
4926
  return vresult;
4161
4927
  fail:
@@ -4164,7 +4930,7 @@ fail:
4164
4930
 
4165
4931
 
4166
4932
  SWIGINTERN VALUE
4167
- _wrap_ItemListMap_emptyq___(int argc, VALUE *argv, VALUE self) {
4933
+ _wrap_ItemMap_emptyq___(int argc, VALUE *argv, VALUE self) {
4168
4934
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4169
4935
  void *argp1 = 0 ;
4170
4936
  int res1 = 0 ;
@@ -4188,7 +4954,7 @@ fail:
4188
4954
 
4189
4955
 
4190
4956
  SWIGINTERN VALUE
4191
- _wrap_ItemListMap_contains(int argc, VALUE *argv, VALUE self) {
4957
+ _wrap_ItemMap_contains(int argc, VALUE *argv, VALUE self) {
4192
4958
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4193
4959
  TagLib::String *arg2 = 0 ;
4194
4960
  void *argp1 = 0 ;
@@ -4219,15 +4985,15 @@ fail:
4219
4985
 
4220
4986
 
4221
4987
  /*
4222
- Document-method: TagLib::MP4::ItemListMap.to_a
4988
+ Document-method: TagLib::MP4::ItemMap.to_a
4223
4989
 
4224
4990
  call-seq:
4225
4991
  to_a -> VALUE
4226
4992
 
4227
- Convert ItemListMap to an Array.
4993
+ Convert ItemMap to an Array.
4228
4994
  */
4229
4995
  SWIGINTERN VALUE
4230
- _wrap_ItemListMap_to_a(int argc, VALUE *argv, VALUE self) {
4996
+ _wrap_ItemMap_to_a(int argc, VALUE *argv, VALUE self) {
4231
4997
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4232
4998
  void *argp1 = 0 ;
4233
4999
  int res1 = 0 ;
@@ -4251,7 +5017,31 @@ fail:
4251
5017
 
4252
5018
 
4253
5019
  SWIGINTERN VALUE
4254
- _wrap_ItemListMap_fetch(int argc, VALUE *argv, VALUE self) {
5020
+ _wrap_ItemMap_to_h(int argc, VALUE *argv, VALUE self) {
5021
+ TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
5022
+ void *argp1 = 0 ;
5023
+ int res1 = 0 ;
5024
+ VALUE result;
5025
+ VALUE vresult = Qnil;
5026
+
5027
+ if ((argc < 0) || (argc > 0)) {
5028
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5029
+ }
5030
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 );
5031
+ if (!SWIG_IsOK(res1)) {
5032
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","to_h", 1, self ));
5033
+ }
5034
+ arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1);
5035
+ result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_h(arg1);
5036
+ vresult = result;
5037
+ return vresult;
5038
+ fail:
5039
+ return Qnil;
5040
+ }
5041
+
5042
+
5043
+ SWIGINTERN VALUE
5044
+ _wrap_ItemMap_fetch(int argc, VALUE *argv, VALUE self) {
4255
5045
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4256
5046
  TagLib::String *arg2 = 0 ;
4257
5047
  void *argp1 = 0 ;
@@ -4281,7 +5071,7 @@ fail:
4281
5071
 
4282
5072
 
4283
5073
  SWIGINTERN VALUE
4284
- _wrap_ItemListMap__clear(int argc, VALUE *argv, VALUE self) {
5074
+ _wrap_ItemMap__clear(int argc, VALUE *argv, VALUE self) {
4285
5075
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4286
5076
  void *argp1 = 0 ;
4287
5077
  int res1 = 0 ;
@@ -4305,7 +5095,7 @@ fail:
4305
5095
 
4306
5096
 
4307
5097
  SWIGINTERN VALUE
4308
- _wrap_ItemListMap_erase(int argc, VALUE *argv, VALUE self) {
5098
+ _wrap_ItemMap_erase(int argc, VALUE *argv, VALUE self) {
4309
5099
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4310
5100
  TagLib::String *arg2 = 0 ;
4311
5101
  void *argp1 = 0 ;
@@ -4335,7 +5125,7 @@ fail:
4335
5125
 
4336
5126
 
4337
5127
  SWIGINTERN VALUE
4338
- _wrap_ItemListMap__insert(int argc, VALUE *argv, VALUE self) {
5128
+ _wrap_ItemMap__insert(int argc, VALUE *argv, VALUE self) {
4339
5129
  TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ;
4340
5130
  TagLib::String *arg2 = 0 ;
4341
5131
  TagLib::MP4::Item *arg3 = 0 ;
@@ -4387,9 +5177,8 @@ static void *_p_TagLib__MP4__PropertiesTo_p_TagLib__AudioProperties(void *x, int
4387
5177
  static void *_p_TagLib__MP4__TagTo_p_TagLib__Tag(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4388
5178
  return (void *)((TagLib::Tag *) ((TagLib::MP4::Tag *) x));
4389
5179
  }
4390
- static swig_type_info _swigt__p_ConstIterator = {"_p_ConstIterator", "ConstIterator *", 0, 0, (void*)0, 0};
4391
- static swig_type_info _swigt__p_Iterator = {"_p_Iterator", "Iterator *", 0, 0, (void*)0, 0};
4392
5180
  static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
5181
+ static swig_type_info _swigt__p_TagLib__ByteVectorList = {"_p_TagLib__ByteVectorList", "TagLib::ByteVectorList *", 0, 0, (void*)0, 0};
4393
5182
  static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
4394
5183
  static swig_type_info _swigt__p_TagLib__MP4__Atoms = {"_p_TagLib__MP4__Atoms", "TagLib::MP4::Atoms *", 0, 0, (void*)0, 0};
4395
5184
  static swig_type_info _swigt__p_TagLib__MP4__CoverArt = {"_p_TagLib__MP4__CoverArt", "TagLib::MP4::CoverArt *", 0, 0, (void*)0, 0};
@@ -4398,7 +5187,7 @@ static swig_type_info _swigt__p_TagLib__MP4__File = {"_p_TagLib__MP4__File", "Ta
4398
5187
  static swig_type_info _swigt__p_TagLib__MP4__Item = {"_p_TagLib__MP4__Item", "TagLib::MP4::Item *", 0, 0, (void*)0, 0};
4399
5188
  static swig_type_info _swigt__p_TagLib__MP4__Properties = {"_p_TagLib__MP4__Properties", "TagLib::MP4::Properties *", 0, 0, (void*)0, 0};
4400
5189
  static swig_type_info _swigt__p_TagLib__MP4__Tag = {"_p_TagLib__MP4__Tag", "TagLib::MP4::Tag *", 0, 0, (void*)0, 0};
4401
- static swig_type_info _swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t = {"_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *|TagLib::MP4::ItemListMap *", 0, 0, (void*)0, 0};
5190
+ static swig_type_info _swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t = {"_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *|TagLib::MP4::ItemListMap *|TagLib::MP4::ItemMap *", 0, 0, (void*)0, 0};
4402
5191
  static swig_type_info _swigt__p_TagLib__StringList = {"_p_TagLib__StringList", "TagLib::StringList *", 0, 0, (void*)0, 0};
4403
5192
  static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
4404
5193
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
@@ -4408,9 +5197,8 @@ static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ul
4408
5197
  static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
4409
5198
 
4410
5199
  static swig_type_info *swig_type_initial[] = {
4411
- &_swigt__p_ConstIterator,
4412
- &_swigt__p_Iterator,
4413
5200
  &_swigt__p_TagLib__AudioProperties,
5201
+ &_swigt__p_TagLib__ByteVectorList,
4414
5202
  &_swigt__p_TagLib__File,
4415
5203
  &_swigt__p_TagLib__MP4__Atoms,
4416
5204
  &_swigt__p_TagLib__MP4__CoverArt,
@@ -4429,9 +5217,8 @@ static swig_type_info *swig_type_initial[] = {
4429
5217
  &_swigt__p_wchar_t,
4430
5218
  };
4431
5219
 
4432
- static swig_cast_info _swigc__p_ConstIterator[] = { {&_swigt__p_ConstIterator, 0, 0, 0},{0, 0, 0, 0}};
4433
- static swig_cast_info _swigc__p_Iterator[] = { {&_swigt__p_Iterator, 0, 0, 0},{0, 0, 0, 0}};
4434
5220
  static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__MP4__Properties, _p_TagLib__MP4__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
5221
+ static swig_cast_info _swigc__p_TagLib__ByteVectorList[] = { {&_swigt__p_TagLib__ByteVectorList, 0, 0, 0},{0, 0, 0, 0}};
4435
5222
  static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0}, {&_swigt__p_TagLib__MP4__File, _p_TagLib__MP4__FileTo_p_TagLib__File, 0, 0},{0, 0, 0, 0}};
4436
5223
  static swig_cast_info _swigc__p_TagLib__MP4__Atoms[] = { {&_swigt__p_TagLib__MP4__Atoms, 0, 0, 0},{0, 0, 0, 0}};
4437
5224
  static swig_cast_info _swigc__p_TagLib__MP4__CoverArt[] = { {&_swigt__p_TagLib__MP4__CoverArt, 0, 0, 0},{0, 0, 0, 0}};
@@ -4450,9 +5237,8 @@ static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long,
4450
5237
  static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, 0, 0, 0}};
4451
5238
 
4452
5239
  static swig_cast_info *swig_cast_initial[] = {
4453
- _swigc__p_ConstIterator,
4454
- _swigc__p_Iterator,
4455
5240
  _swigc__p_TagLib__AudioProperties,
5241
+ _swigc__p_TagLib__ByteVectorList,
4456
5242
  _swigc__p_TagLib__File,
4457
5243
  _swigc__p_TagLib__MP4__Atoms,
4458
5244
  _swigc__p_TagLib__MP4__CoverArt,
@@ -4476,18 +5262,18 @@ static swig_cast_info *swig_cast_initial[] = {
4476
5262
 
4477
5263
  /* -----------------------------------------------------------------------------
4478
5264
  * Type initialization:
4479
- * This problem is tough by the requirement that no dynamic
4480
- * memory is used. Also, since swig_type_info structures store pointers to
5265
+ * This problem is tough by the requirement that no dynamic
5266
+ * memory is used. Also, since swig_type_info structures store pointers to
4481
5267
  * swig_cast_info structures and swig_cast_info structures store pointers back
4482
- * to swig_type_info structures, we need some lookup code at initialization.
4483
- * The idea is that swig generates all the structures that are needed.
4484
- * The runtime then collects these partially filled structures.
4485
- * The SWIG_InitializeModule function takes these initial arrays out of
5268
+ * to swig_type_info structures, we need some lookup code at initialization.
5269
+ * The idea is that swig generates all the structures that are needed.
5270
+ * The runtime then collects these partially filled structures.
5271
+ * The SWIG_InitializeModule function takes these initial arrays out of
4486
5272
  * swig_module, and does all the lookup, filling in the swig_module.types
4487
5273
  * array with the correct data and linking the correct swig_cast_info
4488
5274
  * structures together.
4489
5275
  *
4490
- * The generated swig_type_info structures are assigned staticly to an initial
5276
+ * The generated swig_type_info structures are assigned statically to an initial
4491
5277
  * array. We just loop through that array, and handle each type individually.
4492
5278
  * First we lookup if this type has been already loaded, and if so, use the
4493
5279
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -4497,17 +5283,17 @@ static swig_cast_info *swig_cast_initial[] = {
4497
5283
  * a column is one of the swig_cast_info structures for that type.
4498
5284
  * The cast_initial array is actually an array of arrays, because each row has
4499
5285
  * a variable number of columns. So to actually build the cast linked list,
4500
- * we find the array of casts associated with the type, and loop through it
5286
+ * we find the array of casts associated with the type, and loop through it
4501
5287
  * adding the casts to the list. The one last trick we need to do is making
4502
5288
  * sure the type pointer in the swig_cast_info struct is correct.
4503
5289
  *
4504
- * First off, we lookup the cast->type name to see if it is already loaded.
5290
+ * First off, we lookup the cast->type name to see if it is already loaded.
4505
5291
  * There are three cases to handle:
4506
5292
  * 1) If the cast->type has already been loaded AND the type we are adding
4507
5293
  * casting info to has not been loaded (it is in this module), THEN we
4508
5294
  * replace the cast->type pointer with the type pointer that has already
4509
5295
  * been loaded.
4510
- * 2) If BOTH types (the one we are adding casting info to, and the
5296
+ * 2) If BOTH types (the one we are adding casting info to, and the
4511
5297
  * cast->type) are loaded, THEN the cast info has already been loaded by
4512
5298
  * the previous module so we just ignore it.
4513
5299
  * 3) Finally, if cast->type has not already been loaded, then we add that
@@ -4531,7 +5317,7 @@ SWIGRUNTIME void
4531
5317
  SWIG_InitializeModule(void *clientdata) {
4532
5318
  size_t i;
4533
5319
  swig_module_info *module_head, *iter;
4534
- int found, init;
5320
+ int init;
4535
5321
 
4536
5322
  /* check to see if the circular list has been setup, if not, set it up */
4537
5323
  if (swig_module.next==0) {
@@ -4550,27 +5336,23 @@ SWIG_InitializeModule(void *clientdata) {
4550
5336
  /* This is the first module loaded for this interpreter */
4551
5337
  /* so set the swig module into the interpreter */
4552
5338
  SWIG_SetModule(clientdata, &swig_module);
4553
- module_head = &swig_module;
4554
5339
  } else {
4555
5340
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4556
- found=0;
4557
5341
  iter=module_head;
4558
5342
  do {
4559
5343
  if (iter==&swig_module) {
4560
- found=1;
4561
- break;
5344
+ /* Our module is already in the list, so there's nothing more to do. */
5345
+ return;
4562
5346
  }
4563
5347
  iter=iter->next;
4564
5348
  } while (iter!= module_head);
4565
5349
 
4566
- /* if the is found in the list, then all is done and we may leave */
4567
- if (found) return;
4568
- /* otherwise we must add out module into the list */
5350
+ /* otherwise we must add our module into the list */
4569
5351
  swig_module.next = module_head->next;
4570
5352
  module_head->next = &swig_module;
4571
5353
  }
4572
5354
 
4573
- /* When multiple interpeters are used, a module could have already been initialized in
5355
+ /* When multiple interpreters are used, a module could have already been initialized in
4574
5356
  a different interpreter, but not yet have a pointer in this interpreter.
4575
5357
  In this case, we do not want to continue adding types... everything should be
4576
5358
  set up already */
@@ -4584,7 +5366,7 @@ SWIG_InitializeModule(void *clientdata) {
4584
5366
  swig_type_info *type = 0;
4585
5367
  swig_type_info *ret;
4586
5368
  swig_cast_info *cast;
4587
-
5369
+
4588
5370
  #ifdef SWIGRUNTIME_DEBUG
4589
5371
  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4590
5372
  #endif
@@ -4611,7 +5393,7 @@ SWIG_InitializeModule(void *clientdata) {
4611
5393
  /* Insert casting types */
4612
5394
  cast = swig_module.cast_initial[i];
4613
5395
  while (cast->type) {
4614
-
5396
+
4615
5397
  /* Don't need to add information already in the list */
4616
5398
  ret = 0;
4617
5399
  #ifdef SWIGRUNTIME_DEBUG
@@ -4734,11 +5516,17 @@ SWIGEXPORT void Init_taglib_mp4(void) {
4734
5516
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__Properties, (void *) &SwigClassProperties);
4735
5517
  rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
4736
5518
  rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
4737
- rb_define_method(SwigClassProperties.klass, "length", VALUEFUNC(_wrap_Properties_length), -1);
5519
+ rb_define_const(SwigClassProperties.klass, "Unknown", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::Unknown)));
5520
+ rb_define_const(SwigClassProperties.klass, "AAC", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::AAC)));
5521
+ rb_define_const(SwigClassProperties.klass, "ALAC", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::ALAC)));
5522
+ rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
5523
+ rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
4738
5524
  rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
4739
5525
  rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
4740
5526
  rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);
4741
5527
  rb_define_method(SwigClassProperties.klass, "bits_per_sample", VALUEFUNC(_wrap_Properties_bits_per_sample), -1);
5528
+ rb_define_method(SwigClassProperties.klass, "encrypted?", VALUEFUNC(_wrap_Properties_encryptedq___), -1);
5529
+ rb_define_method(SwigClassProperties.klass, "codec", VALUEFUNC(_wrap_Properties_codec), -1);
4742
5530
  SwigClassProperties.mark = 0;
4743
5531
  SwigClassProperties.destroy = (void (*)(void *)) free_TagLib_MP4_Properties;
4744
5532
  SwigClassProperties.trackObjects = 1;
@@ -4762,7 +5550,12 @@ SWIGEXPORT void Init_taglib_mp4(void) {
4762
5550
  rb_define_method(SwigClassTag.klass, "genre=", VALUEFUNC(_wrap_Tag_genree___), -1);
4763
5551
  rb_define_method(SwigClassTag.klass, "year=", VALUEFUNC(_wrap_Tag_yeare___), -1);
4764
5552
  rb_define_method(SwigClassTag.klass, "track=", VALUEFUNC(_wrap_Tag_tracke___), -1);
4765
- rb_define_method(SwigClassTag.klass, "item_list_map", VALUEFUNC(_wrap_Tag_item_list_map), -1);
5553
+ rb_define_method(SwigClassTag.klass, "empty?", VALUEFUNC(_wrap_Tag_emptyq___), -1);
5554
+ rb_define_method(SwigClassTag.klass, "item_map", VALUEFUNC(_wrap_Tag_item_map), -1);
5555
+ rb_define_method(SwigClassTag.klass, "[]", VALUEFUNC(_wrap_Tag___getitem__), -1);
5556
+ rb_define_method(SwigClassTag.klass, "contains", VALUEFUNC(_wrap_Tag_contains), -1);
5557
+ rb_define_method(SwigClassTag.klass, "[]=", VALUEFUNC(_wrap_Tag___setitem__), -1);
5558
+ rb_define_method(SwigClassTag.klass, "remove_item", VALUEFUNC(_wrap_Tag_remove_item), -1);
4766
5559
  SwigClassTag.mark = 0;
4767
5560
  SwigClassTag.destroy = (void (*)(void *)) free_TagLib_MP4_Tag;
4768
5561
  SwigClassTag.trackObjects = 1;
@@ -4773,6 +5566,9 @@ SWIGEXPORT void Init_taglib_mp4(void) {
4773
5566
  rb_define_method(SwigClassCoverArt.klass, "initialize", VALUEFUNC(_wrap_new_CoverArt), -1);
4774
5567
  rb_define_const(SwigClassCoverArt.klass, "JPEG", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::JPEG)));
4775
5568
  rb_define_const(SwigClassCoverArt.klass, "PNG", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::PNG)));
5569
+ rb_define_const(SwigClassCoverArt.klass, "BMP", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::BMP)));
5570
+ rb_define_const(SwigClassCoverArt.klass, "GIF", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::GIF)));
5571
+ rb_define_const(SwigClassCoverArt.klass, "Unknown", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::Unknown)));
4776
5572
  rb_define_method(SwigClassCoverArt.klass, "format", VALUEFUNC(_wrap_CoverArt_format), -1);
4777
5573
  rb_define_method(SwigClassCoverArt.klass, "data", VALUEFUNC(_wrap_CoverArt_data), -1);
4778
5574
  SwigClassCoverArt.mark = 0;
@@ -4784,15 +5580,23 @@ SWIGEXPORT void Init_taglib_mp4(void) {
4784
5580
  rb_define_alloc_func(SwigClassItem.klass, _wrap_Item_allocate);
4785
5581
  rb_define_method(SwigClassItem.klass, "initialize", VALUEFUNC(_wrap_new_Item), -1);
4786
5582
  rb_define_method(SwigClassItem.klass, "to_int", VALUEFUNC(_wrap_Item_to_int), -1);
5583
+ rb_define_method(SwigClassItem.klass, "to_byte", VALUEFUNC(_wrap_Item_to_byte), -1);
5584
+ rb_define_method(SwigClassItem.klass, "to_uint", VALUEFUNC(_wrap_Item_to_uint), -1);
5585
+ rb_define_method(SwigClassItem.klass, "to_long_long", VALUEFUNC(_wrap_Item_to_long_long), -1);
4787
5586
  rb_define_method(SwigClassItem.klass, "to_bool", VALUEFUNC(_wrap_Item_to_bool), -1);
4788
5587
  rb_define_method(SwigClassItem.klass, "to_int_pair", VALUEFUNC(_wrap_Item_to_int_pair), -1);
4789
5588
  rb_define_method(SwigClassItem.klass, "to_string_list", VALUEFUNC(_wrap_Item_to_string_list), -1);
5589
+ rb_define_method(SwigClassItem.klass, "to_byte_vector_list", VALUEFUNC(_wrap_Item_to_byte_vector_list), -1);
4790
5590
  rb_define_method(SwigClassItem.klass, "to_cover_art_list", VALUEFUNC(_wrap_Item_to_cover_art_list), -1);
4791
5591
  rb_define_method(SwigClassItem.klass, "valid?", VALUEFUNC(_wrap_Item_validq___), -1);
4792
- rb_define_singleton_method(SwigClassItem.klass, "from_int", VALUEFUNC(_wrap_Item_from_int), -1);
4793
5592
  rb_define_singleton_method(SwigClassItem.klass, "from_bool", VALUEFUNC(_wrap_Item_from_bool), -1);
5593
+ rb_define_singleton_method(SwigClassItem.klass, "from_byte", VALUEFUNC(_wrap_Item_from_byte), -1);
5594
+ rb_define_singleton_method(SwigClassItem.klass, "from_uint", VALUEFUNC(_wrap_Item_from_uint), -1);
5595
+ rb_define_singleton_method(SwigClassItem.klass, "from_int", VALUEFUNC(_wrap_Item_from_int), -1);
5596
+ rb_define_singleton_method(SwigClassItem.klass, "from_long_long", VALUEFUNC(_wrap_Item_from_long_long), -1);
4794
5597
  rb_define_singleton_method(SwigClassItem.klass, "from_string_list", VALUEFUNC(_wrap_Item_from_string_list), -1);
4795
5598
  rb_define_singleton_method(SwigClassItem.klass, "from_cover_art_list", VALUEFUNC(_wrap_Item_from_cover_art_list), -1);
5599
+ rb_define_singleton_method(SwigClassItem.klass, "from_byte_vector_list", VALUEFUNC(_wrap_Item_from_byte_vector_list), -1);
4796
5600
  SwigClassItem.mark = 0;
4797
5601
  SwigClassItem.destroy = (void (*)(void *)) free_TagLib_MP4_Item;
4798
5602
  SwigClassItem.trackObjects = 1;
@@ -4804,27 +5608,29 @@ SWIGEXPORT void Init_taglib_mp4(void) {
4804
5608
  rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1);
4805
5609
  rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1);
4806
5610
  rb_define_method(SwigClassFile.klass, "save", VALUEFUNC(_wrap_File_save), -1);
5611
+ rb_define_method(SwigClassFile.klass, "mp4_tag?", VALUEFUNC(_wrap_File_mp4_tagq___), -1);
4807
5612
  rb_define_method(SwigClassFile.klass, "close", VALUEFUNC(_wrap_File_close), -1);
4808
5613
  SwigClassFile.mark = 0;
4809
5614
  SwigClassFile.destroy = (void (*)(void *)) free_taglib_mp4_file;
4810
5615
  SwigClassFile.trackObjects = 1;
4811
5616
 
4812
- SwigClassItemListMap.klass = rb_define_class_under(mMP4, "ItemListMap", rb_cObject);
4813
- SWIG_TypeClientData(SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, (void *) &SwigClassItemListMap);
4814
- rb_define_alloc_func(SwigClassItemListMap.klass, _wrap_ItemListMap_allocate);
4815
- rb_define_method(SwigClassItemListMap.klass, "initialize", VALUEFUNC(_wrap_new_ItemListMap), -1);
4816
- rb_define_method(SwigClassItemListMap.klass, "size", VALUEFUNC(_wrap_ItemListMap_size), -1);
4817
- rb_define_method(SwigClassItemListMap.klass, "empty?", VALUEFUNC(_wrap_ItemListMap_emptyq___), -1);
4818
- rb_define_method(SwigClassItemListMap.klass, "contains", VALUEFUNC(_wrap_ItemListMap_contains), -1);
4819
- rb_define_alias(SwigClassItemListMap.klass, "include?", "contains");
4820
- rb_define_alias(SwigClassItemListMap.klass, "has_key?", "contains");
4821
- rb_define_method(SwigClassItemListMap.klass, "to_a", VALUEFUNC(_wrap_ItemListMap_to_a), -1);
4822
- rb_define_method(SwigClassItemListMap.klass, "fetch", VALUEFUNC(_wrap_ItemListMap_fetch), -1);
4823
- rb_define_method(SwigClassItemListMap.klass, "_clear", VALUEFUNC(_wrap_ItemListMap__clear), -1);
4824
- rb_define_method(SwigClassItemListMap.klass, "erase", VALUEFUNC(_wrap_ItemListMap_erase), -1);
4825
- rb_define_method(SwigClassItemListMap.klass, "_insert", VALUEFUNC(_wrap_ItemListMap__insert), -1);
4826
- SwigClassItemListMap.mark = 0;
4827
- SwigClassItemListMap.destroy = (void (*)(void *)) free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_;
4828
- SwigClassItemListMap.trackObjects = 1;
5617
+ SwigClassItemMap.klass = rb_define_class_under(mMP4, "ItemMap", rb_cObject);
5618
+ SWIG_TypeClientData(SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, (void *) &SwigClassItemMap);
5619
+ rb_define_alloc_func(SwigClassItemMap.klass, _wrap_ItemMap_allocate);
5620
+ rb_define_method(SwigClassItemMap.klass, "initialize", VALUEFUNC(_wrap_new_ItemMap), -1);
5621
+ rb_define_method(SwigClassItemMap.klass, "size", VALUEFUNC(_wrap_ItemMap_size), -1);
5622
+ rb_define_method(SwigClassItemMap.klass, "empty?", VALUEFUNC(_wrap_ItemMap_emptyq___), -1);
5623
+ rb_define_method(SwigClassItemMap.klass, "contains", VALUEFUNC(_wrap_ItemMap_contains), -1);
5624
+ rb_define_alias(SwigClassItemMap.klass, "include?", "contains");
5625
+ rb_define_alias(SwigClassItemMap.klass, "has_key?", "contains");
5626
+ rb_define_method(SwigClassItemMap.klass, "to_a", VALUEFUNC(_wrap_ItemMap_to_a), -1);
5627
+ rb_define_method(SwigClassItemMap.klass, "to_h", VALUEFUNC(_wrap_ItemMap_to_h), -1);
5628
+ rb_define_method(SwigClassItemMap.klass, "fetch", VALUEFUNC(_wrap_ItemMap_fetch), -1);
5629
+ rb_define_method(SwigClassItemMap.klass, "_clear", VALUEFUNC(_wrap_ItemMap__clear), -1);
5630
+ rb_define_method(SwigClassItemMap.klass, "erase", VALUEFUNC(_wrap_ItemMap_erase), -1);
5631
+ rb_define_method(SwigClassItemMap.klass, "_insert", VALUEFUNC(_wrap_ItemMap__insert), -1);
5632
+ SwigClassItemMap.mark = 0;
5633
+ SwigClassItemMap.destroy = (void (*)(void *)) free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_;
5634
+ SwigClassItemMap.trackObjects = 1;
4829
5635
  }
4830
5636