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
@@ -3,45 +3,41 @@
3
3
  #include <taglib/taglib.h>
4
4
  #include <taglib/flacfile.h>
5
5
  #include <taglib/flacproperties.h>
6
- #include <taglib/flacpicture.h>
7
6
  #include <taglib/id3v1tag.h>
8
7
  #include <taglib/id3v2tag.h>
9
8
  %}
10
9
 
11
10
  %include "../taglib_base/includes.i"
12
11
  %import(module="taglib_base") "../taglib_base/taglib_base.i"
12
+ %include "../taglib_flac_picture/includes.i"
13
+ %import(module="taglib_flac_picture") "../taglib_flac_picture/taglib_flac_picture.i"
13
14
 
14
- %{
15
- VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List<TagLib::FLAC::Picture *> & list) {
16
- VALUE ary = rb_ary_new2(list.size());
17
- for (TagLib::List<TagLib::FLAC::Picture *>::ConstIterator it = list.begin(); it != list.end(); it++) {
18
- TagLib::FLAC::Picture *picture = *it;
19
- VALUE p = SWIG_NewPointerObj(picture, SWIGTYPE_p_TagLib__FLAC__Picture, 0);
20
- rb_ary_push(ary, p);
21
- }
22
- return ary;
23
- }
24
- %}
15
+ // Deprecated
16
+ %ignore TagLib::FLAC::Properties::length;
17
+ %ignore TagLib::FLAC::Properties::sampleWidth;
25
18
 
26
19
  %include <taglib/flacproperties.h>
27
20
 
28
- %include <taglib/flacmetadatablock.h>
29
- %include <taglib/flacpicture.h>
21
+ // Ignore IOStream and all the constructors using it.
22
+ %ignore IOStream;
23
+ %ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*, bool, Properties::ReadStyle);
24
+ %ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*, bool);
25
+ %ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*);
30
26
 
31
27
  %rename(id3v1_tag) TagLib::FLAC::File::ID3v1Tag;
32
28
  %rename(id3v2_tag) TagLib::FLAC::File::ID3v2Tag;
33
29
  %rename(set_id3v2_frame_factory) TagLib::FLAC::File::setID3v2FrameFactory;
34
30
 
35
- %typemap(out) TagLib::List<TagLib::FLAC::Picture *> {
36
- $result = taglib_flac_picturelist_to_ruby_array($1);
37
- }
38
-
39
31
  %freefunc TagLib::FLAC::File "free_taglib_flac_file";
40
32
 
41
33
  %apply SWIGTYPE *DISOWN { TagLib::FLAC::Picture *picture };
42
34
  // Don't expose second parameter, memory should be freed by TagLib
43
35
  %ignore TagLib::FLAC::File::removePicture(Picture *, bool);
44
36
 
37
+ %rename("xiph_comment?") TagLib::FLAC::File::hasXiphComment;
38
+ %rename("id3v1_tag?") TagLib::FLAC::File::hasID3v1Tag;
39
+ %rename("id3v2_tag?") TagLib::FLAC::File::hasID3v2Tag;
40
+
45
41
  %include <taglib/flacfile.h>
46
42
 
47
43
  // Unlink Ruby objects from the deleted C++ objects. Otherwise Ruby code
@@ -90,6 +86,13 @@ VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List<TagLib::FLAC::Pic
90
86
  SWIG_RubyRemoveTracking(properties);
91
87
  }
92
88
 
89
+ TagLib::List<TagLib::FLAC::Picture *> list = file->pictureList();
90
+ for (TagLib::List<TagLib::FLAC::Picture *>::ConstIterator it = list.begin(); it != list.end(); it++) {
91
+ TagLib::FLAC::Picture *picture = (*it);
92
+ SWIG_RubyUnlinkObjects(picture);
93
+ SWIG_RubyRemoveTracking(picture);
94
+ }
95
+
93
96
  SWIG_RubyUnlinkObjects(ptr);
94
97
  SWIG_RubyRemoveTracking(ptr);
95
98
 
@@ -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_flac_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);
@@ -1819,23 +1833,22 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1819
1833
  #define SWIGTYPE_p_TagLib__AudioProperties swig_types[0]
1820
1834
  #define SWIGTYPE_p_TagLib__ByteVector swig_types[1]
1821
1835
  #define SWIGTYPE_p_TagLib__FLAC__File swig_types[2]
1822
- #define SWIGTYPE_p_TagLib__FLAC__MetadataBlock swig_types[3]
1823
- #define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[4]
1824
- #define SWIGTYPE_p_TagLib__FLAC__Properties swig_types[5]
1825
- #define SWIGTYPE_p_TagLib__File swig_types[6]
1826
- #define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[7]
1827
- #define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[8]
1828
- #define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[9]
1829
- #define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[10]
1830
- #define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[11]
1831
- #define SWIGTYPE_p_TagLib__Tag swig_types[12]
1832
- #define SWIGTYPE_p_char swig_types[13]
1833
- #define SWIGTYPE_p_unsigned_char swig_types[14]
1834
- #define SWIGTYPE_p_unsigned_int swig_types[15]
1835
- #define SWIGTYPE_p_unsigned_long swig_types[16]
1836
- #define SWIGTYPE_p_wchar_t swig_types[17]
1837
- static swig_type_info *swig_types[19];
1838
- static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
1836
+ #define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[3]
1837
+ #define SWIGTYPE_p_TagLib__FLAC__Properties swig_types[4]
1838
+ #define SWIGTYPE_p_TagLib__File swig_types[5]
1839
+ #define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[6]
1840
+ #define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[7]
1841
+ #define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[8]
1842
+ #define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[9]
1843
+ #define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[10]
1844
+ #define SWIGTYPE_p_TagLib__Tag swig_types[11]
1845
+ #define SWIGTYPE_p_char swig_types[12]
1846
+ #define SWIGTYPE_p_unsigned_char swig_types[13]
1847
+ #define SWIGTYPE_p_unsigned_int swig_types[14]
1848
+ #define SWIGTYPE_p_unsigned_long swig_types[15]
1849
+ #define SWIGTYPE_p_wchar_t swig_types[16]
1850
+ static swig_type_info *swig_types[18];
1851
+ static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
1839
1852
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1840
1853
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1841
1854
 
@@ -1850,7 +1863,7 @@ static VALUE mFLAC;
1850
1863
  #define SWIG_RUBY_THREAD_END_BLOCK
1851
1864
 
1852
1865
 
1853
- #define SWIGVERSION 0x020009
1866
+ #define SWIGVERSION 0x030007
1854
1867
  #define SWIG_VERSION SWIGVERSION
1855
1868
 
1856
1869
 
@@ -1864,7 +1877,6 @@ static VALUE mFLAC;
1864
1877
  #include <taglib/taglib.h>
1865
1878
  #include <taglib/flacfile.h>
1866
1879
  #include <taglib/flacproperties.h>
1867
- #include <taglib/flacpicture.h>
1868
1880
  #include <taglib/id3v1tag.h>
1869
1881
  #include <taglib/id3v2tag.h>
1870
1882
 
@@ -1876,9 +1888,11 @@ static VALUE mFLAC;
1876
1888
  #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1877
1889
  # include <ruby/encoding.h>
1878
1890
  # define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
1891
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
1879
1892
  # define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
1880
1893
  #else
1881
1894
  # define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
1895
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value)
1882
1896
  # define CONVERT_TO_UTF8(value) value
1883
1897
  #endif
1884
1898
 
@@ -1886,7 +1900,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
1886
1900
  if (byteVector.isNull()) {
1887
1901
  return Qnil;
1888
1902
  } else {
1889
- return rb_tainted_str_new(byteVector.data(), byteVector.size());
1903
+ return rb_str_new(byteVector.data(), byteVector.size());
1890
1904
  }
1891
1905
  }
1892
1906
 
@@ -1902,7 +1916,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
1902
1916
  if (string.isNull()) {
1903
1917
  return Qnil;
1904
1918
  } else {
1905
- VALUE result = rb_tainted_str_new2(string.toCString(true));
1919
+ VALUE result = rb_str_new2(string.toCString(true));
1906
1920
  ASSOCIATE_UTF8_ENCODING(result);
1907
1921
  return result;
1908
1922
  }
@@ -1931,7 +1945,7 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1931
1945
  return result;
1932
1946
  }
1933
1947
  for (long i = 0; i < RARRAY_LEN(ary); i++) {
1934
- VALUE e = RARRAY_PTR(ary)[i];
1948
+ VALUE e = rb_ary_entry(ary, i);
1935
1949
  TagLib::String s = ruby_string_to_taglib_string(e);
1936
1950
  result.append(s);
1937
1951
  }
@@ -1939,12 +1953,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1939
1953
  }
1940
1954
 
1941
1955
  VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1956
+ VALUE result;
1942
1957
  #ifdef _WIN32
1943
1958
  const char *s = (const char *) filename;
1944
- return rb_tainted_str_new2(s);
1959
+ result = rb_str_new2(s);
1945
1960
  #else
1946
- return rb_tainted_str_new2(filename);
1961
+ result = rb_str_new2(filename);
1947
1962
  #endif
1963
+ ASSOCIATE_FILESYSTEM_ENCODING(result);
1964
+ return result;
1948
1965
  }
1949
1966
 
1950
1967
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
@@ -1994,7 +2011,7 @@ SWIG_ruby_failed(void)
1994
2011
  }
1995
2012
 
1996
2013
 
1997
- /*@SWIG:/usr/local/share/swig/2.0.9/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2014
+ /*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1998
2015
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1999
2016
  {
2000
2017
  VALUE obj = args[0];
@@ -2059,6 +2076,40 @@ SWIG_From_int (int value)
2059
2076
  }
2060
2077
 
2061
2078
 
2079
+ SWIGINTERNINLINE VALUE
2080
+ SWIG_From_long_SS_long (long long value)
2081
+ {
2082
+ return LL2NUM(value);
2083
+ }
2084
+
2085
+
2086
+ SWIGINTERNINLINE VALUE
2087
+ SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
2088
+ {
2089
+ return ULL2NUM(value);
2090
+ }
2091
+
2092
+
2093
+ SWIGINTERN int
2094
+ SWIG_AsVal_bool (VALUE obj, bool *val)
2095
+ {
2096
+ if (obj == Qtrue) {
2097
+ if (val) *val = true;
2098
+ return SWIG_OK;
2099
+ } else if (obj == Qfalse) {
2100
+ if (val) *val = false;
2101
+ return SWIG_OK;
2102
+ } else {
2103
+ int res = 0;
2104
+ if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
2105
+ if (val) *val = res ? true : false;
2106
+ return SWIG_OK;
2107
+ }
2108
+ }
2109
+ return SWIG_TypeError;
2110
+ }
2111
+
2112
+
2062
2113
  SWIGINTERN swig_type_info*
2063
2114
  SWIG_pchar_descriptor(void)
2064
2115
  {
@@ -2115,26 +2166,6 @@ SWIG_From_bool (bool value)
2115
2166
  return value ? Qtrue : Qfalse;
2116
2167
  }
2117
2168
 
2118
-
2119
- SWIGINTERN int
2120
- SWIG_AsVal_bool (VALUE obj, bool *val)
2121
- {
2122
- if (obj == Qtrue) {
2123
- if (val) *val = true;
2124
- return SWIG_OK;
2125
- } else if (obj == Qfalse) {
2126
- if (val) *val = false;
2127
- return SWIG_OK;
2128
- } else {
2129
- int res = 0;
2130
- if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
2131
- if (val) *val = res ? true : false;
2132
- return SWIG_OK;
2133
- }
2134
- }
2135
- return SWIG_TypeError;
2136
- }
2137
-
2138
2169
  SWIGINTERN void TagLib_FLAC_File_close(TagLib::FLAC::File *self){
2139
2170
  free_taglib_flac_file(self);
2140
2171
  }
@@ -2179,6 +2210,13 @@ SWIGINTERN void TagLib_FLAC_File_close(TagLib::FLAC::File *self){
2179
2210
  SWIG_RubyRemoveTracking(properties);
2180
2211
  }
2181
2212
 
2213
+ TagLib::List<TagLib::FLAC::Picture *> list = file->pictureList();
2214
+ for (TagLib::List<TagLib::FLAC::Picture *>::ConstIterator it = list.begin(); it != list.end(); it++) {
2215
+ TagLib::FLAC::Picture *picture = (*it);
2216
+ SWIG_RubyUnlinkObjects(picture);
2217
+ SWIG_RubyRemoveTracking(picture);
2218
+ }
2219
+
2182
2220
  SWIG_RubyUnlinkObjects(ptr);
2183
2221
  SWIG_RubyRemoveTracking(ptr);
2184
2222
 
@@ -2433,7 +2471,7 @@ free_TagLib_FLAC_Properties(TagLib::FLAC::Properties *arg1) {
2433
2471
  }
2434
2472
 
2435
2473
  SWIGINTERN VALUE
2436
- _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2474
+ _wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
2437
2475
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2438
2476
  void *argp1 = 0 ;
2439
2477
  int res1 = 0 ;
@@ -2445,10 +2483,10 @@ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2445
2483
  }
2446
2484
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2447
2485
  if (!SWIG_IsOK(res1)) {
2448
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","length", 1, self ));
2486
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","lengthInSeconds", 1, self ));
2449
2487
  }
2450
2488
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2451
- result = (int)((TagLib::FLAC::Properties const *)arg1)->length();
2489
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->lengthInSeconds();
2452
2490
  vresult = SWIG_From_int(static_cast< int >(result));
2453
2491
  return vresult;
2454
2492
  fail:
@@ -2457,7 +2495,7 @@ fail:
2457
2495
 
2458
2496
 
2459
2497
  SWIGINTERN VALUE
2460
- _wrap_Properties_bitrate(int argc, VALUE *argv, VALUE self) {
2498
+ _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
2461
2499
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2462
2500
  void *argp1 = 0 ;
2463
2501
  int res1 = 0 ;
@@ -2469,10 +2507,10 @@ _wrap_Properties_bitrate(int argc, VALUE *argv, VALUE self) {
2469
2507
  }
2470
2508
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2471
2509
  if (!SWIG_IsOK(res1)) {
2472
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","bitrate", 1, self ));
2510
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","lengthInMilliseconds", 1, self ));
2473
2511
  }
2474
2512
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2475
- result = (int)((TagLib::FLAC::Properties const *)arg1)->bitrate();
2513
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->lengthInMilliseconds();
2476
2514
  vresult = SWIG_From_int(static_cast< int >(result));
2477
2515
  return vresult;
2478
2516
  fail:
@@ -2481,7 +2519,7 @@ fail:
2481
2519
 
2482
2520
 
2483
2521
  SWIGINTERN VALUE
2484
- _wrap_Properties_sample_rate(int argc, VALUE *argv, VALUE self) {
2522
+ _wrap_Properties_bitrate(int argc, VALUE *argv, VALUE self) {
2485
2523
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2486
2524
  void *argp1 = 0 ;
2487
2525
  int res1 = 0 ;
@@ -2493,10 +2531,10 @@ _wrap_Properties_sample_rate(int argc, VALUE *argv, VALUE self) {
2493
2531
  }
2494
2532
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2495
2533
  if (!SWIG_IsOK(res1)) {
2496
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","sampleRate", 1, self ));
2534
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","bitrate", 1, self ));
2497
2535
  }
2498
2536
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2499
- result = (int)((TagLib::FLAC::Properties const *)arg1)->sampleRate();
2537
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->bitrate();
2500
2538
  vresult = SWIG_From_int(static_cast< int >(result));
2501
2539
  return vresult;
2502
2540
  fail:
@@ -2505,7 +2543,7 @@ fail:
2505
2543
 
2506
2544
 
2507
2545
  SWIGINTERN VALUE
2508
- _wrap_Properties_channels(int argc, VALUE *argv, VALUE self) {
2546
+ _wrap_Properties_sample_rate(int argc, VALUE *argv, VALUE self) {
2509
2547
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2510
2548
  void *argp1 = 0 ;
2511
2549
  int res1 = 0 ;
@@ -2517,10 +2555,10 @@ _wrap_Properties_channels(int argc, VALUE *argv, VALUE self) {
2517
2555
  }
2518
2556
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2519
2557
  if (!SWIG_IsOK(res1)) {
2520
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","channels", 1, self ));
2558
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","sampleRate", 1, self ));
2521
2559
  }
2522
2560
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2523
- result = (int)((TagLib::FLAC::Properties const *)arg1)->channels();
2561
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->sampleRate();
2524
2562
  vresult = SWIG_From_int(static_cast< int >(result));
2525
2563
  return vresult;
2526
2564
  fail:
@@ -2529,7 +2567,7 @@ fail:
2529
2567
 
2530
2568
 
2531
2569
  SWIGINTERN VALUE
2532
- _wrap_Properties_sample_width(int argc, VALUE *argv, VALUE self) {
2570
+ _wrap_Properties_channels(int argc, VALUE *argv, VALUE self) {
2533
2571
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2534
2572
  void *argp1 = 0 ;
2535
2573
  int res1 = 0 ;
@@ -2541,10 +2579,10 @@ _wrap_Properties_sample_width(int argc, VALUE *argv, VALUE self) {
2541
2579
  }
2542
2580
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2543
2581
  if (!SWIG_IsOK(res1)) {
2544
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","sampleWidth", 1, self ));
2582
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","channels", 1, self ));
2545
2583
  }
2546
2584
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2547
- result = (int)((TagLib::FLAC::Properties const *)arg1)->sampleWidth();
2585
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->channels();
2548
2586
  vresult = SWIG_From_int(static_cast< int >(result));
2549
2587
  return vresult;
2550
2588
  fail:
@@ -2553,11 +2591,11 @@ fail:
2553
2591
 
2554
2592
 
2555
2593
  SWIGINTERN VALUE
2556
- _wrap_Properties_signature(int argc, VALUE *argv, VALUE self) {
2594
+ _wrap_Properties_bits_per_sample(int argc, VALUE *argv, VALUE self) {
2557
2595
  TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2558
2596
  void *argp1 = 0 ;
2559
2597
  int res1 = 0 ;
2560
- TagLib::ByteVector result;
2598
+ int result;
2561
2599
  VALUE vresult = Qnil;
2562
2600
 
2563
2601
  if ((argc < 0) || (argc > 0)) {
@@ -2565,45 +2603,35 @@ _wrap_Properties_signature(int argc, VALUE *argv, VALUE self) {
2565
2603
  }
2566
2604
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2567
2605
  if (!SWIG_IsOK(res1)) {
2568
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","signature", 1, self ));
2606
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","bitsPerSample", 1, self ));
2569
2607
  }
2570
2608
  arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2571
- result = ((TagLib::FLAC::Properties const *)arg1)->signature();
2572
- {
2573
- vresult = taglib_bytevector_to_ruby_string(result);
2574
- }
2609
+ result = (int)((TagLib::FLAC::Properties const *)arg1)->bitsPerSample();
2610
+ vresult = SWIG_From_int(static_cast< int >(result));
2575
2611
  return vresult;
2576
2612
  fail:
2577
2613
  return Qnil;
2578
2614
  }
2579
2615
 
2580
2616
 
2581
- static swig_class SwigClassMetadataBlock;
2582
-
2583
- SWIGINTERN void
2584
- free_TagLib_FLAC_MetadataBlock(TagLib::FLAC::MetadataBlock *arg1) {
2585
- SWIG_RubyRemoveTracking(arg1);
2586
- delete arg1;
2587
- }
2588
-
2589
2617
  SWIGINTERN VALUE
2590
- _wrap_MetadataBlock_code(int argc, VALUE *argv, VALUE self) {
2591
- TagLib::FLAC::MetadataBlock *arg1 = (TagLib::FLAC::MetadataBlock *) 0 ;
2618
+ _wrap_Properties_sample_frames(int argc, VALUE *argv, VALUE self) {
2619
+ TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2592
2620
  void *argp1 = 0 ;
2593
2621
  int res1 = 0 ;
2594
- int result;
2622
+ unsigned long long result;
2595
2623
  VALUE vresult = Qnil;
2596
2624
 
2597
2625
  if ((argc < 0) || (argc > 0)) {
2598
2626
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2599
2627
  }
2600
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__MetadataBlock, 0 | 0 );
2628
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2601
2629
  if (!SWIG_IsOK(res1)) {
2602
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::MetadataBlock const *","code", 1, self ));
2630
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","sampleFrames", 1, self ));
2603
2631
  }
2604
- arg1 = reinterpret_cast< TagLib::FLAC::MetadataBlock * >(argp1);
2605
- result = (int)((TagLib::FLAC::MetadataBlock const *)arg1)->code();
2606
- vresult = SWIG_From_int(static_cast< int >(result));
2632
+ arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2633
+ result = (unsigned long long)((TagLib::FLAC::Properties const *)arg1)->sampleFrames();
2634
+ vresult = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
2607
2635
  return vresult;
2608
2636
  fail:
2609
2637
  return Qnil;
@@ -2611,8 +2639,8 @@ fail:
2611
2639
 
2612
2640
 
2613
2641
  SWIGINTERN VALUE
2614
- _wrap_MetadataBlock_render(int argc, VALUE *argv, VALUE self) {
2615
- TagLib::FLAC::MetadataBlock *arg1 = (TagLib::FLAC::MetadataBlock *) 0 ;
2642
+ _wrap_Properties_signature(int argc, VALUE *argv, VALUE self) {
2643
+ TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ;
2616
2644
  void *argp1 = 0 ;
2617
2645
  int res1 = 0 ;
2618
2646
  TagLib::ByteVector result;
@@ -2621,12 +2649,12 @@ _wrap_MetadataBlock_render(int argc, VALUE *argv, VALUE self) {
2621
2649
  if ((argc < 0) || (argc > 0)) {
2622
2650
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2623
2651
  }
2624
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__MetadataBlock, 0 | 0 );
2652
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 );
2625
2653
  if (!SWIG_IsOK(res1)) {
2626
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::MetadataBlock const *","render", 1, self ));
2654
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","signature", 1, self ));
2627
2655
  }
2628
- arg1 = reinterpret_cast< TagLib::FLAC::MetadataBlock * >(argp1);
2629
- result = ((TagLib::FLAC::MetadataBlock const *)arg1)->render();
2656
+ arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1);
2657
+ result = ((TagLib::FLAC::Properties const *)arg1)->signature();
2630
2658
  {
2631
2659
  vresult = taglib_bytevector_to_ruby_string(result);
2632
2660
  }
@@ -2636,16 +2664,39 @@ fail:
2636
2664
  }
2637
2665
 
2638
2666
 
2639
- static swig_class SwigClassPicture;
2667
+ static swig_class SwigClassFile;
2640
2668
 
2641
2669
  SWIGINTERN VALUE
2642
- _wrap_new_Picture__SWIG_0(int argc, VALUE *argv, VALUE self) {
2643
- TagLib::FLAC::Picture *result = 0 ;
2670
+ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
2671
+ TagLib::FileName arg1 ;
2672
+ bool arg2 ;
2673
+ TagLib::FLAC::Properties::ReadStyle arg3 ;
2674
+ bool val2 ;
2675
+ int ecode2 = 0 ;
2676
+ int val3 ;
2677
+ int ecode3 = 0 ;
2678
+ TagLib::FLAC::File *result = 0 ;
2644
2679
 
2645
- if ((argc < 0) || (argc > 0)) {
2646
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2680
+ if ((argc < 3) || (argc > 3)) {
2681
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2682
+ }
2683
+ {
2684
+ arg1 = ruby_string_to_taglib_filename(argv[0]);
2685
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2686
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2687
+ }
2647
2688
  }
2648
- result = (TagLib::FLAC::Picture *)new TagLib::FLAC::Picture();
2689
+ ecode2 = SWIG_AsVal_bool(argv[1], &val2);
2690
+ if (!SWIG_IsOK(ecode2)) {
2691
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
2692
+ }
2693
+ arg2 = static_cast< bool >(val2);
2694
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
2695
+ if (!SWIG_IsOK(ecode3)) {
2696
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties::ReadStyle","File", 3, argv[2] ));
2697
+ }
2698
+ arg3 = static_cast< TagLib::FLAC::Properties::ReadStyle >(val3);
2699
+ result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1,arg2,arg3);
2649
2700
  DATA_PTR(self) = result;
2650
2701
  SWIG_RubyAddTracking(result, self);
2651
2702
  return self;
@@ -2654,37 +2705,29 @@ fail:
2654
2705
  }
2655
2706
 
2656
2707
 
2657
- #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2658
- SWIGINTERN VALUE
2659
- _wrap_Picture_allocate(VALUE self) {
2660
- #else
2661
- SWIGINTERN VALUE
2662
- _wrap_Picture_allocate(int argc, VALUE *argv, VALUE self) {
2663
- #endif
2664
-
2665
-
2666
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__FLAC__Picture);
2667
- #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2668
- rb_obj_call_init(vresult, argc, argv);
2669
- #endif
2670
- return vresult;
2671
- }
2672
-
2673
-
2674
2708
  SWIGINTERN VALUE
2675
- _wrap_new_Picture__SWIG_1(int argc, VALUE *argv, VALUE self) {
2676
- TagLib::ByteVector *arg1 = 0 ;
2677
- TagLib::ByteVector tmp1 ;
2678
- TagLib::FLAC::Picture *result = 0 ;
2709
+ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
2710
+ TagLib::FileName arg1 ;
2711
+ bool arg2 ;
2712
+ bool val2 ;
2713
+ int ecode2 = 0 ;
2714
+ TagLib::FLAC::File *result = 0 ;
2679
2715
 
2680
- if ((argc < 1) || (argc > 1)) {
2681
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2716
+ if ((argc < 2) || (argc > 2)) {
2717
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2682
2718
  }
2683
2719
  {
2684
- tmp1 = ruby_string_to_taglib_bytevector(argv[0]);
2685
- arg1 = &tmp1;
2720
+ arg1 = ruby_string_to_taglib_filename(argv[0]);
2721
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2722
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2723
+ }
2686
2724
  }
2687
- result = (TagLib::FLAC::Picture *)new TagLib::FLAC::Picture((TagLib::ByteVector const &)*arg1);
2725
+ ecode2 = SWIG_AsVal_bool(argv[1], &val2);
2726
+ if (!SWIG_IsOK(ecode2)) {
2727
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
2728
+ }
2729
+ arg2 = static_cast< bool >(val2);
2730
+ result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1,arg2);
2688
2731
  DATA_PTR(self) = result;
2689
2732
  SWIG_RubyAddTracking(result, self);
2690
2733
  return self;
@@ -2693,637 +2736,24 @@ fail:
2693
2736
  }
2694
2737
 
2695
2738
 
2696
- SWIGINTERN VALUE _wrap_new_Picture(int nargs, VALUE *args, VALUE self) {
2697
- int argc;
2698
- VALUE argv[1];
2699
- int ii;
2739
+ SWIGINTERN VALUE
2740
+ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
2741
+ TagLib::FileName arg1 ;
2742
+ TagLib::FLAC::File *result = 0 ;
2700
2743
 
2701
- argc = nargs;
2702
- if (argc > 1) SWIG_fail;
2703
- for (ii = 0; (ii < argc); ++ii) {
2704
- argv[ii] = args[ii];
2705
- }
2706
- if (argc == 0) {
2707
- return _wrap_new_Picture__SWIG_0(nargs, args, self);
2744
+ if ((argc < 1) || (argc > 1)) {
2745
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2708
2746
  }
2709
- if (argc == 1) {
2710
- int _v;
2711
- int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
2712
- _v = SWIG_CheckState(res);
2713
- if (_v) {
2714
- return _wrap_new_Picture__SWIG_1(nargs, args, self);
2747
+ {
2748
+ arg1 = ruby_string_to_taglib_filename(argv[0]);
2749
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
2750
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
2715
2751
  }
2716
2752
  }
2717
-
2718
- fail:
2719
- Ruby_Format_OverloadedError( argc, 1, "Picture.new",
2720
- " Picture.new()\n"
2721
- " Picture.new(TagLib::ByteVector const &data)\n");
2722
-
2723
- return Qnil;
2724
- }
2725
-
2726
-
2727
- SWIGINTERN void
2728
- free_TagLib_FLAC_Picture(TagLib::FLAC::Picture *arg1) {
2729
- SWIG_RubyRemoveTracking(arg1);
2730
- delete arg1;
2731
- }
2732
-
2733
- SWIGINTERN VALUE
2734
- _wrap_Picture_type(int argc, VALUE *argv, VALUE self) {
2735
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2736
- void *argp1 = 0 ;
2737
- int res1 = 0 ;
2738
- TagLib::FLAC::Picture::Type result;
2739
- VALUE vresult = Qnil;
2740
-
2741
- if ((argc < 0) || (argc > 0)) {
2742
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2743
- }
2744
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2745
- if (!SWIG_IsOK(res1)) {
2746
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","type", 1, self ));
2747
- }
2748
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2749
- result = (TagLib::FLAC::Picture::Type)((TagLib::FLAC::Picture const *)arg1)->type();
2750
- vresult = SWIG_From_int(static_cast< int >(result));
2751
- return vresult;
2752
- fail:
2753
- return Qnil;
2754
- }
2755
-
2756
-
2757
- SWIGINTERN VALUE
2758
- _wrap_Picture_typee___(int argc, VALUE *argv, VALUE self) {
2759
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2760
- TagLib::FLAC::Picture::Type arg2 ;
2761
- void *argp1 = 0 ;
2762
- int res1 = 0 ;
2763
- int val2 ;
2764
- int ecode2 = 0 ;
2765
-
2766
- if ((argc < 1) || (argc > 1)) {
2767
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2768
- }
2769
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2770
- if (!SWIG_IsOK(res1)) {
2771
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setType", 1, self ));
2772
- }
2773
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2774
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
2775
- if (!SWIG_IsOK(ecode2)) {
2776
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture::Type","setType", 2, argv[0] ));
2777
- }
2778
- arg2 = static_cast< TagLib::FLAC::Picture::Type >(val2);
2779
- (arg1)->setType(arg2);
2780
- return Qnil;
2781
- fail:
2782
- return Qnil;
2783
- }
2784
-
2785
-
2786
- SWIGINTERN VALUE
2787
- _wrap_Picture_mime_type(int argc, VALUE *argv, VALUE self) {
2788
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2789
- void *argp1 = 0 ;
2790
- int res1 = 0 ;
2791
- TagLib::String result;
2792
- VALUE vresult = Qnil;
2793
-
2794
- if ((argc < 0) || (argc > 0)) {
2795
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2796
- }
2797
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2798
- if (!SWIG_IsOK(res1)) {
2799
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","mimeType", 1, self ));
2800
- }
2801
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2802
- result = ((TagLib::FLAC::Picture const *)arg1)->mimeType();
2803
- {
2804
- vresult = taglib_string_to_ruby_string(result);
2805
- }
2806
- return vresult;
2807
- fail:
2808
- return Qnil;
2809
- }
2810
-
2811
-
2812
- SWIGINTERN VALUE
2813
- _wrap_Picture_mime_typee___(int argc, VALUE *argv, VALUE self) {
2814
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2815
- TagLib::String *arg2 = 0 ;
2816
- void *argp1 = 0 ;
2817
- int res1 = 0 ;
2818
- TagLib::String tmp2 ;
2819
-
2820
- if ((argc < 1) || (argc > 1)) {
2821
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2822
- }
2823
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2824
- if (!SWIG_IsOK(res1)) {
2825
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setMimeType", 1, self ));
2826
- }
2827
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2828
- {
2829
- tmp2 = ruby_string_to_taglib_string(argv[0]);
2830
- arg2 = &tmp2;
2831
- }
2832
- (arg1)->setMimeType((TagLib::String const &)*arg2);
2833
- return Qnil;
2834
- fail:
2835
- return Qnil;
2836
- }
2837
-
2838
-
2839
- SWIGINTERN VALUE
2840
- _wrap_Picture_description(int argc, VALUE *argv, VALUE self) {
2841
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2842
- void *argp1 = 0 ;
2843
- int res1 = 0 ;
2844
- TagLib::String result;
2845
- VALUE vresult = Qnil;
2846
-
2847
- if ((argc < 0) || (argc > 0)) {
2848
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2849
- }
2850
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2851
- if (!SWIG_IsOK(res1)) {
2852
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","description", 1, self ));
2853
- }
2854
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2855
- result = ((TagLib::FLAC::Picture const *)arg1)->description();
2856
- {
2857
- vresult = taglib_string_to_ruby_string(result);
2858
- }
2859
- return vresult;
2860
- fail:
2861
- return Qnil;
2862
- }
2863
-
2864
-
2865
- SWIGINTERN VALUE
2866
- _wrap_Picture_descriptione___(int argc, VALUE *argv, VALUE self) {
2867
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2868
- TagLib::String *arg2 = 0 ;
2869
- void *argp1 = 0 ;
2870
- int res1 = 0 ;
2871
- TagLib::String tmp2 ;
2872
-
2873
- if ((argc < 1) || (argc > 1)) {
2874
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2875
- }
2876
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2877
- if (!SWIG_IsOK(res1)) {
2878
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setDescription", 1, self ));
2879
- }
2880
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2881
- {
2882
- tmp2 = ruby_string_to_taglib_string(argv[0]);
2883
- arg2 = &tmp2;
2884
- }
2885
- (arg1)->setDescription((TagLib::String const &)*arg2);
2886
- return Qnil;
2887
- fail:
2888
- return Qnil;
2889
- }
2890
-
2891
-
2892
- SWIGINTERN VALUE
2893
- _wrap_Picture_width(int argc, VALUE *argv, VALUE self) {
2894
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2895
- void *argp1 = 0 ;
2896
- int res1 = 0 ;
2897
- int result;
2898
- VALUE vresult = Qnil;
2899
-
2900
- if ((argc < 0) || (argc > 0)) {
2901
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2902
- }
2903
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2904
- if (!SWIG_IsOK(res1)) {
2905
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","width", 1, self ));
2906
- }
2907
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2908
- result = (int)((TagLib::FLAC::Picture const *)arg1)->width();
2909
- vresult = SWIG_From_int(static_cast< int >(result));
2910
- return vresult;
2911
- fail:
2912
- return Qnil;
2913
- }
2914
-
2915
-
2916
- SWIGINTERN VALUE
2917
- _wrap_Picture_widthe___(int argc, VALUE *argv, VALUE self) {
2918
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2919
- int arg2 ;
2920
- void *argp1 = 0 ;
2921
- int res1 = 0 ;
2922
- int val2 ;
2923
- int ecode2 = 0 ;
2924
-
2925
- if ((argc < 1) || (argc > 1)) {
2926
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2927
- }
2928
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2929
- if (!SWIG_IsOK(res1)) {
2930
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setWidth", 1, self ));
2931
- }
2932
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2933
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
2934
- if (!SWIG_IsOK(ecode2)) {
2935
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setWidth", 2, argv[0] ));
2936
- }
2937
- arg2 = static_cast< int >(val2);
2938
- (arg1)->setWidth(arg2);
2939
- return Qnil;
2940
- fail:
2941
- return Qnil;
2942
- }
2943
-
2944
-
2945
- SWIGINTERN VALUE
2946
- _wrap_Picture_height(int argc, VALUE *argv, VALUE self) {
2947
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2948
- void *argp1 = 0 ;
2949
- int res1 = 0 ;
2950
- int result;
2951
- VALUE vresult = Qnil;
2952
-
2953
- if ((argc < 0) || (argc > 0)) {
2954
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2955
- }
2956
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2957
- if (!SWIG_IsOK(res1)) {
2958
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","height", 1, self ));
2959
- }
2960
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2961
- result = (int)((TagLib::FLAC::Picture const *)arg1)->height();
2962
- vresult = SWIG_From_int(static_cast< int >(result));
2963
- return vresult;
2964
- fail:
2965
- return Qnil;
2966
- }
2967
-
2968
-
2969
- SWIGINTERN VALUE
2970
- _wrap_Picture_heighte___(int argc, VALUE *argv, VALUE self) {
2971
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
2972
- int arg2 ;
2973
- void *argp1 = 0 ;
2974
- int res1 = 0 ;
2975
- int val2 ;
2976
- int ecode2 = 0 ;
2977
-
2978
- if ((argc < 1) || (argc > 1)) {
2979
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2980
- }
2981
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
2982
- if (!SWIG_IsOK(res1)) {
2983
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setHeight", 1, self ));
2984
- }
2985
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
2986
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
2987
- if (!SWIG_IsOK(ecode2)) {
2988
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setHeight", 2, argv[0] ));
2989
- }
2990
- arg2 = static_cast< int >(val2);
2991
- (arg1)->setHeight(arg2);
2992
- return Qnil;
2993
- fail:
2994
- return Qnil;
2995
- }
2996
-
2997
-
2998
- SWIGINTERN VALUE
2999
- _wrap_Picture_color_depth(int argc, VALUE *argv, VALUE self) {
3000
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3001
- void *argp1 = 0 ;
3002
- int res1 = 0 ;
3003
- int result;
3004
- VALUE vresult = Qnil;
3005
-
3006
- if ((argc < 0) || (argc > 0)) {
3007
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3008
- }
3009
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3010
- if (!SWIG_IsOK(res1)) {
3011
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","colorDepth", 1, self ));
3012
- }
3013
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3014
- result = (int)((TagLib::FLAC::Picture const *)arg1)->colorDepth();
3015
- vresult = SWIG_From_int(static_cast< int >(result));
3016
- return vresult;
3017
- fail:
3018
- return Qnil;
3019
- }
3020
-
3021
-
3022
- SWIGINTERN VALUE
3023
- _wrap_Picture_color_depthe___(int argc, VALUE *argv, VALUE self) {
3024
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3025
- int arg2 ;
3026
- void *argp1 = 0 ;
3027
- int res1 = 0 ;
3028
- int val2 ;
3029
- int ecode2 = 0 ;
3030
-
3031
- if ((argc < 1) || (argc > 1)) {
3032
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3033
- }
3034
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3035
- if (!SWIG_IsOK(res1)) {
3036
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setColorDepth", 1, self ));
3037
- }
3038
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3039
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
3040
- if (!SWIG_IsOK(ecode2)) {
3041
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setColorDepth", 2, argv[0] ));
3042
- }
3043
- arg2 = static_cast< int >(val2);
3044
- (arg1)->setColorDepth(arg2);
3045
- return Qnil;
3046
- fail:
3047
- return Qnil;
3048
- }
3049
-
3050
-
3051
- SWIGINTERN VALUE
3052
- _wrap_Picture_num_colors(int argc, VALUE *argv, VALUE self) {
3053
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3054
- void *argp1 = 0 ;
3055
- int res1 = 0 ;
3056
- int result;
3057
- VALUE vresult = Qnil;
3058
-
3059
- if ((argc < 0) || (argc > 0)) {
3060
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3061
- }
3062
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3063
- if (!SWIG_IsOK(res1)) {
3064
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","numColors", 1, self ));
3065
- }
3066
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3067
- result = (int)((TagLib::FLAC::Picture const *)arg1)->numColors();
3068
- vresult = SWIG_From_int(static_cast< int >(result));
3069
- return vresult;
3070
- fail:
3071
- return Qnil;
3072
- }
3073
-
3074
-
3075
- SWIGINTERN VALUE
3076
- _wrap_Picture_num_colorse___(int argc, VALUE *argv, VALUE self) {
3077
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3078
- int arg2 ;
3079
- void *argp1 = 0 ;
3080
- int res1 = 0 ;
3081
- int val2 ;
3082
- int ecode2 = 0 ;
3083
-
3084
- if ((argc < 1) || (argc > 1)) {
3085
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3086
- }
3087
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3088
- if (!SWIG_IsOK(res1)) {
3089
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setNumColors", 1, self ));
3090
- }
3091
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3092
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
3093
- if (!SWIG_IsOK(ecode2)) {
3094
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setNumColors", 2, argv[0] ));
3095
- }
3096
- arg2 = static_cast< int >(val2);
3097
- (arg1)->setNumColors(arg2);
3098
- return Qnil;
3099
- fail:
3100
- return Qnil;
3101
- }
3102
-
3103
-
3104
- SWIGINTERN VALUE
3105
- _wrap_Picture_data(int argc, VALUE *argv, VALUE self) {
3106
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3107
- void *argp1 = 0 ;
3108
- int res1 = 0 ;
3109
- TagLib::ByteVector result;
3110
- VALUE vresult = Qnil;
3111
-
3112
- if ((argc < 0) || (argc > 0)) {
3113
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3114
- }
3115
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3116
- if (!SWIG_IsOK(res1)) {
3117
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","data", 1, self ));
3118
- }
3119
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3120
- result = ((TagLib::FLAC::Picture const *)arg1)->data();
3121
- {
3122
- vresult = taglib_bytevector_to_ruby_string(result);
3123
- }
3124
- return vresult;
3125
- fail:
3126
- return Qnil;
3127
- }
3128
-
3129
-
3130
- SWIGINTERN VALUE
3131
- _wrap_Picture_datae___(int argc, VALUE *argv, VALUE self) {
3132
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3133
- TagLib::ByteVector *arg2 = 0 ;
3134
- void *argp1 = 0 ;
3135
- int res1 = 0 ;
3136
- TagLib::ByteVector tmp2 ;
3137
-
3138
- if ((argc < 1) || (argc > 1)) {
3139
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3140
- }
3141
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3142
- if (!SWIG_IsOK(res1)) {
3143
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","setData", 1, self ));
3144
- }
3145
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3146
- {
3147
- tmp2 = ruby_string_to_taglib_bytevector(argv[0]);
3148
- arg2 = &tmp2;
3149
- }
3150
- (arg1)->setData((TagLib::ByteVector const &)*arg2);
3151
- return Qnil;
3152
- fail:
3153
- return Qnil;
3154
- }
3155
-
3156
-
3157
- SWIGINTERN VALUE
3158
- _wrap_Picture_code(int argc, VALUE *argv, VALUE self) {
3159
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3160
- void *argp1 = 0 ;
3161
- int res1 = 0 ;
3162
- int result;
3163
- VALUE vresult = Qnil;
3164
-
3165
- if ((argc < 0) || (argc > 0)) {
3166
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3167
- }
3168
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3169
- if (!SWIG_IsOK(res1)) {
3170
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","code", 1, self ));
3171
- }
3172
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3173
- result = (int)((TagLib::FLAC::Picture const *)arg1)->code();
3174
- vresult = SWIG_From_int(static_cast< int >(result));
3175
- return vresult;
3176
- fail:
3177
- return Qnil;
3178
- }
3179
-
3180
-
3181
- SWIGINTERN VALUE
3182
- _wrap_Picture_render(int argc, VALUE *argv, VALUE self) {
3183
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3184
- void *argp1 = 0 ;
3185
- int res1 = 0 ;
3186
- TagLib::ByteVector result;
3187
- VALUE vresult = Qnil;
3188
-
3189
- if ((argc < 0) || (argc > 0)) {
3190
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3191
- }
3192
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3193
- if (!SWIG_IsOK(res1)) {
3194
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture const *","render", 1, self ));
3195
- }
3196
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3197
- result = ((TagLib::FLAC::Picture const *)arg1)->render();
3198
- {
3199
- vresult = taglib_bytevector_to_ruby_string(result);
3200
- }
3201
- return vresult;
3202
- fail:
3203
- return Qnil;
3204
- }
3205
-
3206
-
3207
- SWIGINTERN VALUE
3208
- _wrap_Picture_parse(int argc, VALUE *argv, VALUE self) {
3209
- TagLib::FLAC::Picture *arg1 = (TagLib::FLAC::Picture *) 0 ;
3210
- TagLib::ByteVector *arg2 = 0 ;
3211
- void *argp1 = 0 ;
3212
- int res1 = 0 ;
3213
- TagLib::ByteVector tmp2 ;
3214
- bool result;
3215
- VALUE vresult = Qnil;
3216
-
3217
- if ((argc < 1) || (argc > 1)) {
3218
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3219
- }
3220
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Picture, 0 | 0 );
3221
- if (!SWIG_IsOK(res1)) {
3222
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","parse", 1, self ));
3223
- }
3224
- arg1 = reinterpret_cast< TagLib::FLAC::Picture * >(argp1);
3225
- {
3226
- tmp2 = ruby_string_to_taglib_bytevector(argv[0]);
3227
- arg2 = &tmp2;
3228
- }
3229
- result = (bool)(arg1)->parse((TagLib::ByteVector const &)*arg2);
3230
- vresult = SWIG_From_bool(static_cast< bool >(result));
3231
- return vresult;
3232
- fail:
3233
- return Qnil;
3234
- }
3235
-
3236
-
3237
- static swig_class SwigClassFile;
3238
-
3239
- SWIGINTERN VALUE
3240
- _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3241
- SwigValueWrapper< TagLib::FileName > arg1 ;
3242
- bool arg2 ;
3243
- TagLib::FLAC::Properties::ReadStyle arg3 ;
3244
- bool val2 ;
3245
- int ecode2 = 0 ;
3246
- int val3 ;
3247
- int ecode3 = 0 ;
3248
- TagLib::FLAC::File *result = 0 ;
3249
-
3250
- if ((argc < 3) || (argc > 3)) {
3251
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3252
- }
3253
- {
3254
- arg1 = ruby_string_to_taglib_filename(argv[0]);
3255
- if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3256
- SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3257
- }
3258
- }
3259
- ecode2 = SWIG_AsVal_bool(argv[1], &val2);
3260
- if (!SWIG_IsOK(ecode2)) {
3261
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
3262
- }
3263
- arg2 = static_cast< bool >(val2);
3264
- ecode3 = SWIG_AsVal_int(argv[2], &val3);
3265
- if (!SWIG_IsOK(ecode3)) {
3266
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties::ReadStyle","File", 3, argv[2] ));
3267
- }
3268
- arg3 = static_cast< TagLib::FLAC::Properties::ReadStyle >(val3);
3269
- result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1,arg2,arg3);
3270
- DATA_PTR(self) = result;
3271
- SWIG_RubyAddTracking(result, self);
3272
- return self;
3273
- fail:
3274
- return Qnil;
3275
- }
3276
-
3277
-
3278
- SWIGINTERN VALUE
3279
- _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
3280
- SwigValueWrapper< TagLib::FileName > arg1 ;
3281
- bool arg2 ;
3282
- bool val2 ;
3283
- int ecode2 = 0 ;
3284
- TagLib::FLAC::File *result = 0 ;
3285
-
3286
- if ((argc < 2) || (argc > 2)) {
3287
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3288
- }
3289
- {
3290
- arg1 = ruby_string_to_taglib_filename(argv[0]);
3291
- if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3292
- SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3293
- }
3294
- }
3295
- ecode2 = SWIG_AsVal_bool(argv[1], &val2);
3296
- if (!SWIG_IsOK(ecode2)) {
3297
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
3298
- }
3299
- arg2 = static_cast< bool >(val2);
3300
- result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1,arg2);
3301
- DATA_PTR(self) = result;
3302
- SWIG_RubyAddTracking(result, self);
3303
- return self;
3304
- fail:
3305
- return Qnil;
3306
- }
3307
-
3308
-
3309
- SWIGINTERN VALUE
3310
- _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
3311
- SwigValueWrapper< TagLib::FileName > arg1 ;
3312
- TagLib::FLAC::File *result = 0 ;
3313
-
3314
- if ((argc < 1) || (argc > 1)) {
3315
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3316
- }
3317
- {
3318
- arg1 = ruby_string_to_taglib_filename(argv[0]);
3319
- if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3320
- SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3321
- }
3322
- }
3323
- result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1);
3324
- DATA_PTR(self) = result;
3325
- SWIG_RubyAddTracking(result, self);
3326
- return self;
2753
+ result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1);
2754
+ DATA_PTR(self) = result;
2755
+ SWIG_RubyAddTracking(result, self);
2756
+ return self;
3327
2757
  fail:
3328
2758
  return Qnil;
3329
2759
  }
@@ -3331,7 +2761,7 @@ fail:
3331
2761
 
3332
2762
  SWIGINTERN VALUE
3333
2763
  _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
3334
- SwigValueWrapper< TagLib::FileName > arg1 ;
2764
+ TagLib::FileName arg1 ;
3335
2765
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3336
2766
  bool arg3 ;
3337
2767
  TagLib::FLAC::Properties::ReadStyle arg4 ;
@@ -3378,7 +2808,7 @@ fail:
3378
2808
 
3379
2809
  SWIGINTERN VALUE
3380
2810
  _wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) {
3381
- SwigValueWrapper< TagLib::FileName > arg1 ;
2811
+ TagLib::FileName arg1 ;
3382
2812
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3383
2813
  bool arg3 ;
3384
2814
  void *argp2 = 0 ;
@@ -3434,7 +2864,7 @@ _wrap_File_allocate(VALUE self) {
3434
2864
 
3435
2865
  SWIGINTERN VALUE
3436
2866
  _wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) {
3437
- SwigValueWrapper< TagLib::FileName > arg1 ;
2867
+ TagLib::FileName arg1 ;
3438
2868
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3439
2869
  void *argp2 = 0 ;
3440
2870
  int res2 = 0 ;
@@ -4066,6 +3496,35 @@ fail:
4066
3496
  }
4067
3497
 
4068
3498
 
3499
+ SWIGINTERN VALUE
3500
+ _wrap_File_remove_picture(int argc, VALUE *argv, VALUE self) {
3501
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3502
+ TagLib::FLAC::Picture *arg2 = (TagLib::FLAC::Picture *) 0 ;
3503
+ void *argp1 = 0 ;
3504
+ int res1 = 0 ;
3505
+ int res2 = 0 ;
3506
+
3507
+ if ((argc < 1) || (argc > 1)) {
3508
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3509
+ }
3510
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3511
+ if (!SWIG_IsOK(res1)) {
3512
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","removePicture", 1, self ));
3513
+ }
3514
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3515
+ res2 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_TagLib__FLAC__Picture, SWIG_POINTER_DISOWN | 0 );
3516
+ if (!SWIG_IsOK(res2)) {
3517
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture *","removePicture", 2, argv[0] ));
3518
+ }
3519
+ SWIG_RubyUnlinkObjects(arg2);
3520
+ SWIG_RubyRemoveTracking(arg2);
3521
+ (arg1)->removePicture(arg2);
3522
+ return Qnil;
3523
+ fail:
3524
+ return Qnil;
3525
+ }
3526
+
3527
+
4069
3528
  SWIGINTERN VALUE
4070
3529
  _wrap_File_remove_pictures(int argc, VALUE *argv, VALUE self) {
4071
3530
  TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
@@ -4116,6 +3575,173 @@ fail:
4116
3575
  }
4117
3576
 
4118
3577
 
3578
+ SWIGINTERN VALUE
3579
+ _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) {
3580
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3581
+ int arg2 ;
3582
+ void *argp1 = 0 ;
3583
+ int res1 = 0 ;
3584
+ int val2 ;
3585
+ int ecode2 = 0 ;
3586
+
3587
+ if ((argc < 1) || (argc > 1)) {
3588
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3589
+ }
3590
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3591
+ if (!SWIG_IsOK(res1)) {
3592
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","strip", 1, self ));
3593
+ }
3594
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3595
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
3596
+ if (!SWIG_IsOK(ecode2)) {
3597
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] ));
3598
+ }
3599
+ arg2 = static_cast< int >(val2);
3600
+ (arg1)->strip(arg2);
3601
+ return Qnil;
3602
+ fail:
3603
+ return Qnil;
3604
+ }
3605
+
3606
+
3607
+ SWIGINTERN VALUE
3608
+ _wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) {
3609
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3610
+ void *argp1 = 0 ;
3611
+ int res1 = 0 ;
3612
+
3613
+ if ((argc < 0) || (argc > 0)) {
3614
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3615
+ }
3616
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3617
+ if (!SWIG_IsOK(res1)) {
3618
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","strip", 1, self ));
3619
+ }
3620
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3621
+ (arg1)->strip();
3622
+ return Qnil;
3623
+ fail:
3624
+ return Qnil;
3625
+ }
3626
+
3627
+
3628
+ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
3629
+ int argc;
3630
+ VALUE argv[3];
3631
+ int ii;
3632
+
3633
+ argc = nargs + 1;
3634
+ argv[0] = self;
3635
+ if (argc > 3) SWIG_fail;
3636
+ for (ii = 1; (ii < argc); ++ii) {
3637
+ argv[ii] = args[ii-1];
3638
+ }
3639
+ if (argc == 1) {
3640
+ int _v;
3641
+ void *vptr = 0;
3642
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__FLAC__File, 0);
3643
+ _v = SWIG_CheckState(res);
3644
+ if (_v) {
3645
+ return _wrap_File_strip__SWIG_1(nargs, args, self);
3646
+ }
3647
+ }
3648
+ if (argc == 2) {
3649
+ int _v;
3650
+ void *vptr = 0;
3651
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__FLAC__File, 0);
3652
+ _v = SWIG_CheckState(res);
3653
+ if (_v) {
3654
+ {
3655
+ int res = SWIG_AsVal_int(argv[1], NULL);
3656
+ _v = SWIG_CheckState(res);
3657
+ }
3658
+ if (_v) {
3659
+ return _wrap_File_strip__SWIG_0(nargs, args, self);
3660
+ }
3661
+ }
3662
+ }
3663
+
3664
+ fail:
3665
+ Ruby_Format_OverloadedError( argc, 3, "File.strip",
3666
+ " void File.strip(int tags)\n"
3667
+ " void File.strip()\n");
3668
+
3669
+ return Qnil;
3670
+ }
3671
+
3672
+
3673
+ SWIGINTERN VALUE
3674
+ _wrap_File_xiph_commentq___(int argc, VALUE *argv, VALUE self) {
3675
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3676
+ void *argp1 = 0 ;
3677
+ int res1 = 0 ;
3678
+ bool result;
3679
+ VALUE vresult = Qnil;
3680
+
3681
+ if ((argc < 0) || (argc > 0)) {
3682
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3683
+ }
3684
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3685
+ if (!SWIG_IsOK(res1)) {
3686
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File const *","hasXiphComment", 1, self ));
3687
+ }
3688
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3689
+ result = (bool)((TagLib::FLAC::File const *)arg1)->hasXiphComment();
3690
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3691
+ return vresult;
3692
+ fail:
3693
+ return Qnil;
3694
+ }
3695
+
3696
+
3697
+ SWIGINTERN VALUE
3698
+ _wrap_File_id3v1_tagq___(int argc, VALUE *argv, VALUE self) {
3699
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3700
+ void *argp1 = 0 ;
3701
+ int res1 = 0 ;
3702
+ bool result;
3703
+ VALUE vresult = Qnil;
3704
+
3705
+ if ((argc < 0) || (argc > 0)) {
3706
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3707
+ }
3708
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3709
+ if (!SWIG_IsOK(res1)) {
3710
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File const *","hasID3v1Tag", 1, self ));
3711
+ }
3712
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3713
+ result = (bool)((TagLib::FLAC::File const *)arg1)->hasID3v1Tag();
3714
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3715
+ return vresult;
3716
+ fail:
3717
+ return Qnil;
3718
+ }
3719
+
3720
+
3721
+ SWIGINTERN VALUE
3722
+ _wrap_File_id3v2_tagq___(int argc, VALUE *argv, VALUE self) {
3723
+ TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
3724
+ void *argp1 = 0 ;
3725
+ int res1 = 0 ;
3726
+ bool result;
3727
+ VALUE vresult = Qnil;
3728
+
3729
+ if ((argc < 0) || (argc > 0)) {
3730
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3731
+ }
3732
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 );
3733
+ if (!SWIG_IsOK(res1)) {
3734
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File const *","hasID3v2Tag", 1, self ));
3735
+ }
3736
+ arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1);
3737
+ result = (bool)((TagLib::FLAC::File const *)arg1)->hasID3v2Tag();
3738
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3739
+ return vresult;
3740
+ fail:
3741
+ return Qnil;
3742
+ }
3743
+
3744
+
4119
3745
  SWIGINTERN VALUE
4120
3746
  _wrap_File_close(int argc, VALUE *argv, VALUE self) {
4121
3747
  TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ;
@@ -4146,13 +3772,9 @@ static void *_p_TagLib__FLAC__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM
4146
3772
  static void *_p_TagLib__FLAC__PropertiesTo_p_TagLib__AudioProperties(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4147
3773
  return (void *)((TagLib::AudioProperties *) ((TagLib::FLAC::Properties *) x));
4148
3774
  }
4149
- static void *_p_TagLib__FLAC__PictureTo_p_TagLib__FLAC__MetadataBlock(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4150
- return (void *)((TagLib::FLAC::MetadataBlock *) ((TagLib::FLAC::Picture *) x));
4151
- }
4152
3775
  static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
4153
3776
  static swig_type_info _swigt__p_TagLib__ByteVector = {"_p_TagLib__ByteVector", "TagLib::ByteVector *", 0, 0, (void*)0, 0};
4154
3777
  static swig_type_info _swigt__p_TagLib__FLAC__File = {"_p_TagLib__FLAC__File", "TagLib::FLAC::File *", 0, 0, (void*)0, 0};
4155
- static swig_type_info _swigt__p_TagLib__FLAC__MetadataBlock = {"_p_TagLib__FLAC__MetadataBlock", "TagLib::FLAC::MetadataBlock *", 0, 0, (void*)0, 0};
4156
3778
  static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0};
4157
3779
  static swig_type_info _swigt__p_TagLib__FLAC__Properties = {"_p_TagLib__FLAC__Properties", "TagLib::FLAC::Properties *", 0, 0, (void*)0, 0};
4158
3780
  static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
@@ -4172,7 +3794,6 @@ static swig_type_info *swig_type_initial[] = {
4172
3794
  &_swigt__p_TagLib__AudioProperties,
4173
3795
  &_swigt__p_TagLib__ByteVector,
4174
3796
  &_swigt__p_TagLib__FLAC__File,
4175
- &_swigt__p_TagLib__FLAC__MetadataBlock,
4176
3797
  &_swigt__p_TagLib__FLAC__Picture,
4177
3798
  &_swigt__p_TagLib__FLAC__Properties,
4178
3799
  &_swigt__p_TagLib__File,
@@ -4192,7 +3813,6 @@ static swig_type_info *swig_type_initial[] = {
4192
3813
  static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__FLAC__Properties, _p_TagLib__FLAC__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
4193
3814
  static swig_cast_info _swigc__p_TagLib__ByteVector[] = { {&_swigt__p_TagLib__ByteVector, 0, 0, 0},{0, 0, 0, 0}};
4194
3815
  static swig_cast_info _swigc__p_TagLib__FLAC__File[] = { {&_swigt__p_TagLib__FLAC__File, 0, 0, 0},{0, 0, 0, 0}};
4195
- static swig_cast_info _swigc__p_TagLib__FLAC__MetadataBlock[] = { {&_swigt__p_TagLib__FLAC__MetadataBlock, 0, 0, 0}, {&_swigt__p_TagLib__FLAC__Picture, _p_TagLib__FLAC__PictureTo_p_TagLib__FLAC__MetadataBlock, 0, 0},{0, 0, 0, 0}};
4196
3816
  static swig_cast_info _swigc__p_TagLib__FLAC__Picture[] = { {&_swigt__p_TagLib__FLAC__Picture, 0, 0, 0},{0, 0, 0, 0}};
4197
3817
  static swig_cast_info _swigc__p_TagLib__FLAC__Properties[] = { {&_swigt__p_TagLib__FLAC__Properties, 0, 0, 0},{0, 0, 0, 0}};
4198
3818
  static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__FLAC__File, _p_TagLib__FLAC__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
@@ -4212,7 +3832,6 @@ static swig_cast_info *swig_cast_initial[] = {
4212
3832
  _swigc__p_TagLib__AudioProperties,
4213
3833
  _swigc__p_TagLib__ByteVector,
4214
3834
  _swigc__p_TagLib__FLAC__File,
4215
- _swigc__p_TagLib__FLAC__MetadataBlock,
4216
3835
  _swigc__p_TagLib__FLAC__Picture,
4217
3836
  _swigc__p_TagLib__FLAC__Properties,
4218
3837
  _swigc__p_TagLib__File,
@@ -4234,18 +3853,18 @@ static swig_cast_info *swig_cast_initial[] = {
4234
3853
 
4235
3854
  /* -----------------------------------------------------------------------------
4236
3855
  * Type initialization:
4237
- * This problem is tough by the requirement that no dynamic
4238
- * memory is used. Also, since swig_type_info structures store pointers to
3856
+ * This problem is tough by the requirement that no dynamic
3857
+ * memory is used. Also, since swig_type_info structures store pointers to
4239
3858
  * swig_cast_info structures and swig_cast_info structures store pointers back
4240
- * to swig_type_info structures, we need some lookup code at initialization.
4241
- * The idea is that swig generates all the structures that are needed.
4242
- * The runtime then collects these partially filled structures.
4243
- * The SWIG_InitializeModule function takes these initial arrays out of
3859
+ * to swig_type_info structures, we need some lookup code at initialization.
3860
+ * The idea is that swig generates all the structures that are needed.
3861
+ * The runtime then collects these partially filled structures.
3862
+ * The SWIG_InitializeModule function takes these initial arrays out of
4244
3863
  * swig_module, and does all the lookup, filling in the swig_module.types
4245
3864
  * array with the correct data and linking the correct swig_cast_info
4246
3865
  * structures together.
4247
3866
  *
4248
- * The generated swig_type_info structures are assigned staticly to an initial
3867
+ * The generated swig_type_info structures are assigned statically to an initial
4249
3868
  * array. We just loop through that array, and handle each type individually.
4250
3869
  * First we lookup if this type has been already loaded, and if so, use the
4251
3870
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -4255,17 +3874,17 @@ static swig_cast_info *swig_cast_initial[] = {
4255
3874
  * a column is one of the swig_cast_info structures for that type.
4256
3875
  * The cast_initial array is actually an array of arrays, because each row has
4257
3876
  * a variable number of columns. So to actually build the cast linked list,
4258
- * we find the array of casts associated with the type, and loop through it
3877
+ * we find the array of casts associated with the type, and loop through it
4259
3878
  * adding the casts to the list. The one last trick we need to do is making
4260
3879
  * sure the type pointer in the swig_cast_info struct is correct.
4261
3880
  *
4262
- * First off, we lookup the cast->type name to see if it is already loaded.
3881
+ * First off, we lookup the cast->type name to see if it is already loaded.
4263
3882
  * There are three cases to handle:
4264
3883
  * 1) If the cast->type has already been loaded AND the type we are adding
4265
3884
  * casting info to has not been loaded (it is in this module), THEN we
4266
3885
  * replace the cast->type pointer with the type pointer that has already
4267
3886
  * been loaded.
4268
- * 2) If BOTH types (the one we are adding casting info to, and the
3887
+ * 2) If BOTH types (the one we are adding casting info to, and the
4269
3888
  * cast->type) are loaded, THEN the cast info has already been loaded by
4270
3889
  * the previous module so we just ignore it.
4271
3890
  * 3) Finally, if cast->type has not already been loaded, then we add that
@@ -4289,7 +3908,7 @@ SWIGRUNTIME void
4289
3908
  SWIG_InitializeModule(void *clientdata) {
4290
3909
  size_t i;
4291
3910
  swig_module_info *module_head, *iter;
4292
- int found, init;
3911
+ int init;
4293
3912
 
4294
3913
  /* check to see if the circular list has been setup, if not, set it up */
4295
3914
  if (swig_module.next==0) {
@@ -4308,27 +3927,23 @@ SWIG_InitializeModule(void *clientdata) {
4308
3927
  /* This is the first module loaded for this interpreter */
4309
3928
  /* so set the swig module into the interpreter */
4310
3929
  SWIG_SetModule(clientdata, &swig_module);
4311
- module_head = &swig_module;
4312
3930
  } else {
4313
3931
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4314
- found=0;
4315
3932
  iter=module_head;
4316
3933
  do {
4317
3934
  if (iter==&swig_module) {
4318
- found=1;
4319
- break;
3935
+ /* Our module is already in the list, so there's nothing more to do. */
3936
+ return;
4320
3937
  }
4321
3938
  iter=iter->next;
4322
3939
  } while (iter!= module_head);
4323
3940
 
4324
- /* if the is found in the list, then all is done and we may leave */
4325
- if (found) return;
4326
- /* otherwise we must add out module into the list */
3941
+ /* otherwise we must add our module into the list */
4327
3942
  swig_module.next = module_head->next;
4328
3943
  module_head->next = &swig_module;
4329
3944
  }
4330
3945
 
4331
- /* When multiple interpeters are used, a module could have already been initialized in
3946
+ /* When multiple interpreters are used, a module could have already been initialized in
4332
3947
  a different interpreter, but not yet have a pointer in this interpreter.
4333
3948
  In this case, we do not want to continue adding types... everything should be
4334
3949
  set up already */
@@ -4342,7 +3957,7 @@ SWIG_InitializeModule(void *clientdata) {
4342
3957
  swig_type_info *type = 0;
4343
3958
  swig_type_info *ret;
4344
3959
  swig_cast_info *cast;
4345
-
3960
+
4346
3961
  #ifdef SWIGRUNTIME_DEBUG
4347
3962
  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4348
3963
  #endif
@@ -4369,7 +3984,7 @@ SWIG_InitializeModule(void *clientdata) {
4369
3984
  /* Insert casting types */
4370
3985
  cast = swig_module.cast_initial[i];
4371
3986
  while (cast->type) {
4372
-
3987
+
4373
3988
  /* Don't need to add information already in the list */
4374
3989
  ret = 0;
4375
3990
  #ifdef SWIGRUNTIME_DEBUG
@@ -4487,89 +4102,33 @@ SWIGEXPORT void Init_taglib_flac(void) {
4487
4102
 
4488
4103
  SWIG_RubyInitializeTrackings();
4489
4104
  rb_require("taglib_base");
4105
+ rb_require("taglib_flac_picture");
4490
4106
 
4491
4107
  SwigClassProperties.klass = rb_define_class_under(mFLAC, "Properties", ((swig_class *) SWIGTYPE_p_TagLib__AudioProperties->clientdata)->klass);
4492
4108
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__Properties, (void *) &SwigClassProperties);
4493
4109
  rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
4494
4110
  rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
4495
- rb_define_method(SwigClassProperties.klass, "length", VALUEFUNC(_wrap_Properties_length), -1);
4111
+ rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
4112
+ rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
4496
4113
  rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
4497
4114
  rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
4498
4115
  rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);
4499
- rb_define_method(SwigClassProperties.klass, "sample_width", VALUEFUNC(_wrap_Properties_sample_width), -1);
4116
+ rb_define_method(SwigClassProperties.klass, "bits_per_sample", VALUEFUNC(_wrap_Properties_bits_per_sample), -1);
4117
+ rb_define_method(SwigClassProperties.klass, "sample_frames", VALUEFUNC(_wrap_Properties_sample_frames), -1);
4500
4118
  rb_define_method(SwigClassProperties.klass, "signature", VALUEFUNC(_wrap_Properties_signature), -1);
4501
4119
  SwigClassProperties.mark = 0;
4502
4120
  SwigClassProperties.destroy = (void (*)(void *)) free_TagLib_FLAC_Properties;
4503
4121
  SwigClassProperties.trackObjects = 1;
4504
4122
 
4505
- SwigClassMetadataBlock.klass = rb_define_class_under(mFLAC, "MetadataBlock", rb_cObject);
4506
- SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__MetadataBlock, (void *) &SwigClassMetadataBlock);
4507
- rb_undef_alloc_func(SwigClassMetadataBlock.klass);
4508
- rb_define_const(SwigClassMetadataBlock.klass, "StreamInfo", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::StreamInfo)));
4509
- rb_define_const(SwigClassMetadataBlock.klass, "Padding", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::Padding)));
4510
- rb_define_const(SwigClassMetadataBlock.klass, "Application", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::Application)));
4511
- rb_define_const(SwigClassMetadataBlock.klass, "SeekTable", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::SeekTable)));
4512
- rb_define_const(SwigClassMetadataBlock.klass, "VorbisComment", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::VorbisComment)));
4513
- rb_define_const(SwigClassMetadataBlock.klass, "CueSheet", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::CueSheet)));
4514
- rb_define_const(SwigClassMetadataBlock.klass, "Picture", SWIG_From_int(static_cast< int >(TagLib::FLAC::MetadataBlock::Picture)));
4515
- rb_define_method(SwigClassMetadataBlock.klass, "code", VALUEFUNC(_wrap_MetadataBlock_code), -1);
4516
- rb_define_method(SwigClassMetadataBlock.klass, "render", VALUEFUNC(_wrap_MetadataBlock_render), -1);
4517
- SwigClassMetadataBlock.mark = 0;
4518
- SwigClassMetadataBlock.destroy = (void (*)(void *)) free_TagLib_FLAC_MetadataBlock;
4519
- SwigClassMetadataBlock.trackObjects = 1;
4520
-
4521
- SwigClassPicture.klass = rb_define_class_under(mFLAC, "Picture", ((swig_class *) SWIGTYPE_p_TagLib__FLAC__MetadataBlock->clientdata)->klass);
4522
- SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__Picture, (void *) &SwigClassPicture);
4523
- rb_define_alloc_func(SwigClassPicture.klass, _wrap_Picture_allocate);
4524
- rb_define_method(SwigClassPicture.klass, "initialize", VALUEFUNC(_wrap_new_Picture), -1);
4525
- rb_define_const(SwigClassPicture.klass, "Other", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Other)));
4526
- rb_define_const(SwigClassPicture.klass, "FileIcon", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::FileIcon)));
4527
- rb_define_const(SwigClassPicture.klass, "OtherFileIcon", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::OtherFileIcon)));
4528
- rb_define_const(SwigClassPicture.klass, "FrontCover", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::FrontCover)));
4529
- rb_define_const(SwigClassPicture.klass, "BackCover", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::BackCover)));
4530
- rb_define_const(SwigClassPicture.klass, "LeafletPage", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::LeafletPage)));
4531
- rb_define_const(SwigClassPicture.klass, "Media", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Media)));
4532
- rb_define_const(SwigClassPicture.klass, "LeadArtist", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::LeadArtist)));
4533
- rb_define_const(SwigClassPicture.klass, "Artist", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Artist)));
4534
- rb_define_const(SwigClassPicture.klass, "Conductor", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Conductor)));
4535
- rb_define_const(SwigClassPicture.klass, "Band", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Band)));
4536
- rb_define_const(SwigClassPicture.klass, "Composer", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Composer)));
4537
- rb_define_const(SwigClassPicture.klass, "Lyricist", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Lyricist)));
4538
- rb_define_const(SwigClassPicture.klass, "RecordingLocation", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::RecordingLocation)));
4539
- rb_define_const(SwigClassPicture.klass, "DuringRecording", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::DuringRecording)));
4540
- rb_define_const(SwigClassPicture.klass, "DuringPerformance", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::DuringPerformance)));
4541
- rb_define_const(SwigClassPicture.klass, "MovieScreenCapture", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::MovieScreenCapture)));
4542
- rb_define_const(SwigClassPicture.klass, "ColouredFish", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::ColouredFish)));
4543
- rb_define_const(SwigClassPicture.klass, "Illustration", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Illustration)));
4544
- rb_define_const(SwigClassPicture.klass, "BandLogo", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::BandLogo)));
4545
- rb_define_const(SwigClassPicture.klass, "PublisherLogo", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::PublisherLogo)));
4546
- rb_define_method(SwigClassPicture.klass, "type", VALUEFUNC(_wrap_Picture_type), -1);
4547
- rb_define_method(SwigClassPicture.klass, "type=", VALUEFUNC(_wrap_Picture_typee___), -1);
4548
- rb_define_method(SwigClassPicture.klass, "mime_type", VALUEFUNC(_wrap_Picture_mime_type), -1);
4549
- rb_define_method(SwigClassPicture.klass, "mime_type=", VALUEFUNC(_wrap_Picture_mime_typee___), -1);
4550
- rb_define_method(SwigClassPicture.klass, "description", VALUEFUNC(_wrap_Picture_description), -1);
4551
- rb_define_method(SwigClassPicture.klass, "description=", VALUEFUNC(_wrap_Picture_descriptione___), -1);
4552
- rb_define_method(SwigClassPicture.klass, "width", VALUEFUNC(_wrap_Picture_width), -1);
4553
- rb_define_method(SwigClassPicture.klass, "width=", VALUEFUNC(_wrap_Picture_widthe___), -1);
4554
- rb_define_method(SwigClassPicture.klass, "height", VALUEFUNC(_wrap_Picture_height), -1);
4555
- rb_define_method(SwigClassPicture.klass, "height=", VALUEFUNC(_wrap_Picture_heighte___), -1);
4556
- rb_define_method(SwigClassPicture.klass, "color_depth", VALUEFUNC(_wrap_Picture_color_depth), -1);
4557
- rb_define_method(SwigClassPicture.klass, "color_depth=", VALUEFUNC(_wrap_Picture_color_depthe___), -1);
4558
- rb_define_method(SwigClassPicture.klass, "num_colors", VALUEFUNC(_wrap_Picture_num_colors), -1);
4559
- rb_define_method(SwigClassPicture.klass, "num_colors=", VALUEFUNC(_wrap_Picture_num_colorse___), -1);
4560
- rb_define_method(SwigClassPicture.klass, "data", VALUEFUNC(_wrap_Picture_data), -1);
4561
- rb_define_method(SwigClassPicture.klass, "data=", VALUEFUNC(_wrap_Picture_datae___), -1);
4562
- rb_define_method(SwigClassPicture.klass, "code", VALUEFUNC(_wrap_Picture_code), -1);
4563
- rb_define_method(SwigClassPicture.klass, "render", VALUEFUNC(_wrap_Picture_render), -1);
4564
- rb_define_method(SwigClassPicture.klass, "parse", VALUEFUNC(_wrap_Picture_parse), -1);
4565
- SwigClassPicture.mark = 0;
4566
- SwigClassPicture.destroy = (void (*)(void *)) free_TagLib_FLAC_Picture;
4567
- SwigClassPicture.trackObjects = 1;
4568
-
4569
4123
  SwigClassFile.klass = rb_define_class_under(mFLAC, "File", ((swig_class *) SWIGTYPE_p_TagLib__File->clientdata)->klass);
4570
4124
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__File, (void *) &SwigClassFile);
4571
4125
  rb_define_alloc_func(SwigClassFile.klass, _wrap_File_allocate);
4572
4126
  rb_define_method(SwigClassFile.klass, "initialize", VALUEFUNC(_wrap_new_File), -1);
4127
+ rb_define_const(SwigClassFile.klass, "NoTags", SWIG_From_int(static_cast< int >(TagLib::FLAC::File::NoTags)));
4128
+ rb_define_const(SwigClassFile.klass, "XiphComment", SWIG_From_int(static_cast< int >(TagLib::FLAC::File::XiphComment)));
4129
+ rb_define_const(SwigClassFile.klass, "ID3v1", SWIG_From_int(static_cast< int >(TagLib::FLAC::File::ID3v1)));
4130
+ rb_define_const(SwigClassFile.klass, "ID3v2", SWIG_From_int(static_cast< int >(TagLib::FLAC::File::ID3v2)));
4131
+ rb_define_const(SwigClassFile.klass, "AllTags", SWIG_From_int(static_cast< int >(TagLib::FLAC::File::AllTags)));
4573
4132
  rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1);
4574
4133
  rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1);
4575
4134
  rb_define_method(SwigClassFile.klass, "save", VALUEFUNC(_wrap_File_save), -1);
@@ -4580,8 +4139,13 @@ SWIGEXPORT void Init_taglib_flac(void) {
4580
4139
  rb_define_method(SwigClassFile.klass, "stream_info_data", VALUEFUNC(_wrap_File_stream_info_data), -1);
4581
4140
  rb_define_method(SwigClassFile.klass, "stream_length", VALUEFUNC(_wrap_File_stream_length), -1);
4582
4141
  rb_define_method(SwigClassFile.klass, "picture_list", VALUEFUNC(_wrap_File_picture_list), -1);
4142
+ rb_define_method(SwigClassFile.klass, "remove_picture", VALUEFUNC(_wrap_File_remove_picture), -1);
4583
4143
  rb_define_method(SwigClassFile.klass, "remove_pictures", VALUEFUNC(_wrap_File_remove_pictures), -1);
4584
4144
  rb_define_method(SwigClassFile.klass, "add_picture", VALUEFUNC(_wrap_File_add_picture), -1);
4145
+ rb_define_method(SwigClassFile.klass, "strip", VALUEFUNC(_wrap_File_strip), -1);
4146
+ rb_define_method(SwigClassFile.klass, "xiph_comment?", VALUEFUNC(_wrap_File_xiph_commentq___), -1);
4147
+ rb_define_method(SwigClassFile.klass, "id3v1_tag?", VALUEFUNC(_wrap_File_id3v1_tagq___), -1);
4148
+ rb_define_method(SwigClassFile.klass, "id3v2_tag?", VALUEFUNC(_wrap_File_id3v2_tagq___), -1);
4585
4149
  rb_define_method(SwigClassFile.klass, "close", VALUEFUNC(_wrap_File_close), -1);
4586
4150
  SwigClassFile.mark = 0;
4587
4151
  SwigClassFile.destroy = (void (*)(void *)) free_taglib_flac_file;