From bbdd6edcf2a403190bbdc03f16f882fec653acc4 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 11 Apr 2024 16:24:35 +0200 Subject: [PATCH] More taglib 2 build fixes --- .github/workflows/ci.yml | 2 +- ext/taglib_aiff/taglib_aiff.i | 3 +- ext/taglib_aiff/taglib_aiff_wrap.cxx | 260 +- ext/taglib_base/includes.i | 9 +- ext/taglib_base/taglib_base.i | 26 +- ext/taglib_base/taglib_base_wrap.cxx | 636 ++- ext/taglib_flac/taglib_flac.i | 11 +- ext/taglib_flac/taglib_flac_wrap.cxx | 567 ++- ext/taglib_flac_picture/taglib_flac_picture.i | 1 + .../taglib_flac_picture_wrap.cxx | 244 +- ext/taglib_id3v1/taglib_id3v1.i | 2 - ext/taglib_id3v1/taglib_id3v1_wrap.cxx | 139 +- ext/taglib_id3v2/taglib_id3v2.i | 2 +- ext/taglib_id3v2/taglib_id3v2_wrap.cxx | 1042 +++-- ext/taglib_mp4/taglib_mp4.i | 39 +- ext/taglib_mp4/taglib_mp4_wrap.cxx | 3574 ++++++++++------- ext/taglib_mpeg/taglib_mpeg.i | 7 +- ext/taglib_mpeg/taglib_mpeg_wrap.cxx | 712 ++-- ext/taglib_ogg/taglib_ogg.i | 2 - ext/taglib_ogg/taglib_ogg_wrap.cxx | 82 +- ext/taglib_vorbis/taglib_vorbis_wrap.cxx | 73 +- ext/taglib_wav/taglib_wav.i | 7 +- ext/taglib_wav/taglib_wav_wrap.cxx | 288 +- tasks/build.rb | 2 +- 24 files changed, 4434 insertions(+), 3296 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 330962cd..b6c6dc5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: env: MAKEFLAGS: -j2 PLATFORM: x86_64-linux - TAGLIB_VERSION: 1.11.1 + TAGLIB_VERSION: 2.0.1 SWIG_DIR: .swig-v4.1.1 steps: diff --git a/ext/taglib_aiff/taglib_aiff.i b/ext/taglib_aiff/taglib_aiff.i index 276406ac..c14c8535 100644 --- a/ext/taglib_aiff/taglib_aiff.i +++ b/ext/taglib_aiff/taglib_aiff.i @@ -4,8 +4,6 @@ #include #include #include -#include -using namespace TagLib; %} %include "../taglib_base/includes.i" @@ -22,6 +20,7 @@ using namespace TagLib; // Ignore IOStream and all the constructors using it. %ignore IOStream; +%ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool, Properties::ReadStyle, ID3v2::FrameFactory *); %ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool, Properties::ReadStyle); %ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool); %ignore TagLib::RIFF::AIFF::File::File(IOStream *); diff --git a/ext/taglib_aiff/taglib_aiff_wrap.cxx b/ext/taglib_aiff/taglib_aiff_wrap.cxx index 360014a0..2948f4d9 100644 --- a/ext/taglib_aiff/taglib_aiff_wrap.cxx +++ b/ext/taglib_aiff/taglib_aiff_wrap.cxx @@ -1854,16 +1854,19 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_TagLib__AudioProperties swig_types[0] -#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[1] -#define SWIGTYPE_p_TagLib__RIFF__AIFF__File swig_types[2] -#define SWIGTYPE_p_TagLib__RIFF__AIFF__Properties swig_types[3] -#define SWIGTYPE_p_char swig_types[4] -#define SWIGTYPE_p_unsigned_char swig_types[5] -#define SWIGTYPE_p_unsigned_int swig_types[6] -#define SWIGTYPE_p_unsigned_long swig_types[7] -#define SWIGTYPE_p_wchar_t swig_types[8] -static swig_type_info *swig_types[10]; -static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0}; +#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[1] +#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[2] +#define SWIGTYPE_p_TagLib__ID3v2__Version swig_types[3] +#define SWIGTYPE_p_TagLib__RIFF__AIFF__File swig_types[4] +#define SWIGTYPE_p_TagLib__RIFF__AIFF__Properties swig_types[5] +#define SWIGTYPE_p_char swig_types[6] +#define SWIGTYPE_p_long_long swig_types[7] +#define SWIGTYPE_p_unsigned_char swig_types[8] +#define SWIGTYPE_p_unsigned_int swig_types[9] +#define SWIGTYPE_p_unsigned_long swig_types[10] +#define SWIGTYPE_p_wchar_t swig_types[11] +static swig_type_info *swig_types[13]; +static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1957,34 +1960,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2073,6 +2068,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} #include @@ -2326,30 +2328,6 @@ free_TagLib_RIFF_AIFF_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::RIFF::AIFF::Properties *arg1 = (TagLib::RIFF::AIFF::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__AIFF__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::RIFF::AIFF::Properties * >(argp1); - result = (int)((TagLib::RIFF::AIFF::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::AIFF::Properties *arg1 = (TagLib::RIFF::AIFF::Properties *) 0 ; @@ -2574,6 +2552,53 @@ static swig_class SwigClassFile; SWIGINTERN VALUE _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::RIFF::AIFF::Properties::ReadStyle arg3 ; + TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + TagLib::RIFF::AIFF::File *result = 0 ; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::RIFF::AIFF::Properties::ReadStyle >(val3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] )); + } + arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4); + result = (TagLib::RIFF::AIFF::File *)new TagLib::RIFF::AIFF::File(arg1,arg2,arg3,arg4); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; TagLib::RIFF::AIFF::Properties::ReadStyle arg3 ; @@ -2612,7 +2637,7 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; bool val2 ; @@ -2658,7 +2683,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::RIFF::AIFF::File *result = 0 ; @@ -2682,11 +2707,11 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int argc; - VALUE argv[3]; + VALUE argv[4]; int ii; argc = nargs; - if (argc > 3) SWIG_fail; + if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } @@ -2695,7 +2720,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_2(nargs, args, self); + return _wrap_new_File__SWIG_3(nargs, args, self); } } if (argc == 2) { @@ -2708,7 +2733,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_1(nargs, args, self); + return _wrap_new_File__SWIG_2(nargs, args, self); } } } @@ -2727,14 +2752,40 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_0(nargs, args, self); + return _wrap_new_File__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_File__SWIG_0(nargs, args, self); + } } } } } fail: - Ruby_Format_OverloadedError( argc, 3, "File.new", + Ruby_Format_OverloadedError( argc, 4, "File.new", + " File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::AIFF::Properties::ReadStyle propertiesStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n" " File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::AIFF::Properties::ReadStyle propertiesStyle)\n" " File.new(TagLib::FileName file, bool readProperties)\n" " File.new(TagLib::FileName file)\n"); @@ -2792,7 +2843,7 @@ _wrap_File_audio_properties(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_File_save(int argc, VALUE *argv, VALUE self) { +_wrap_File_save__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -2815,6 +2866,88 @@ _wrap_File_save(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ; + TagLib::ID3v2::Version arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::File *","save", 1, self )); + } + arg1 = reinterpret_cast< TagLib::RIFF::AIFF::File * >(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__ID3v2__Version, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ID3v2::Version","save", 2, argv[0])); + } else { + arg2 = *(reinterpret_cast< TagLib::ID3v2::Version * >(argp2)); + } + } + result = (bool)(arg1)->save(arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_File_save__SWIG_0(nargs, args, self); + } + } + if (argc == 2) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__ID3v2__Version, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_File_save__SWIG_1(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "File.save", + " bool File.save()\n" + " bool File.save(TagLib::ID3v2::Version version)\n"); + + return Qnil; +} + + SWIGINTERN VALUE _wrap_File_id3v2_tagq___(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ; @@ -2867,10 +3000,13 @@ static void *_p_TagLib__RIFF__AIFF__PropertiesTo_p_TagLib__AudioProperties(void return (void *)((TagLib::AudioProperties *) ((TagLib::RIFF::AIFF::Properties *) x)); } static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__ID3v2__FrameFactory = {"_p_TagLib__ID3v2__FrameFactory", "TagLib::ID3v2::FrameFactory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__Tag = {"_p_TagLib__ID3v2__Tag", "TagLib::ID3v2::Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__ID3v2__Version = {"_p_TagLib__ID3v2__Version", "TagLib::ID3v2::Version *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__RIFF__AIFF__File = {"_p_TagLib__RIFF__AIFF__File", "TagLib::RIFF::AIFF::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__RIFF__AIFF__Properties = {"_p_TagLib__RIFF__AIFF__Properties", "TagLib::RIFF::AIFF::Properties *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -2878,10 +3014,13 @@ static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__AudioProperties, + &_swigt__p_TagLib__ID3v2__FrameFactory, &_swigt__p_TagLib__ID3v2__Tag, + &_swigt__p_TagLib__ID3v2__Version, &_swigt__p_TagLib__RIFF__AIFF__File, &_swigt__p_TagLib__RIFF__AIFF__Properties, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -2889,10 +3028,13 @@ static swig_type_info *swig_type_initial[] = { }; static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__RIFF__AIFF__Properties, _p_TagLib__RIFF__AIFF__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__Tag[] = { {&_swigt__p_TagLib__ID3v2__Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__ID3v2__Version[] = { {&_swigt__p_TagLib__ID3v2__Version, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__RIFF__AIFF__File[] = { {&_swigt__p_TagLib__RIFF__AIFF__File, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__RIFF__AIFF__Properties[] = { {&_swigt__p_TagLib__RIFF__AIFF__Properties, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -2900,10 +3042,13 @@ static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__AudioProperties, + _swigc__p_TagLib__ID3v2__FrameFactory, _swigc__p_TagLib__ID3v2__Tag, + _swigc__p_TagLib__ID3v2__Version, _swigc__p_TagLib__RIFF__AIFF__File, _swigc__p_TagLib__RIFF__AIFF__Properties, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -3173,7 +3318,6 @@ SWIGEXPORT void Init_taglib_aiff(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__RIFF__AIFF__Properties, (void *) &SwigClassProperties); rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate); rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); diff --git a/ext/taglib_base/includes.i b/ext/taglib_base/includes.i index 37439742..d2885513 100644 --- a/ext/taglib_base/includes.i +++ b/ext/taglib_base/includes.i @@ -5,7 +5,6 @@ #define TAGLIB_IGNORE_MISSING_DESTRUCTOR #define TAGLIB_DEPRECATED #define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE -%include // Replaces the typemap from swigtype.swg and just adds the line // SWIG_RubyUnlinkObjects. This is done to be safe in the case when a @@ -25,7 +24,6 @@ #include #include #include -#include #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H # include @@ -147,6 +145,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} %} // vim: set filetype=cpp sw=2 ts=2 expandtab: diff --git a/ext/taglib_base/taglib_base.i b/ext/taglib_base/taglib_base.i index 08878fc4..06af7281 100644 --- a/ext/taglib_base/taglib_base.i +++ b/ext/taglib_base/taglib_base.i @@ -6,10 +6,7 @@ #include #include #include -#include -#include -#include -using namespace TagLib; + %} %include "includes.i" @@ -30,6 +27,7 @@ namespace TagLib { typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned long ulong; + using offset_t = long long; } %constant int TAGLIB_MAJOR_VERSION = TAGLIB_MAJOR_VERSION; @@ -129,6 +127,10 @@ namespace TagLib { %typemap(typecheck) TagLib::FileName = char *; %feature("valuewrapper") TagLib::FileName; +%typemap(out) TagLib::offset_t { + $result = taglib_offset_t_to_ruby_int($1); +} + %ignore TagLib::List::operator[]; %ignore TagLib::List::operator=; %ignore TagLib::List::operator!=; @@ -139,6 +141,10 @@ namespace TagLib { %ignore TagLib::Tag::setProperties; %ignore TagLib::Tag::removeUnsupportedProperties; +%ignore TagLib::Tag::complexProperties; +%ignore TagLib::Tag::setComplexProperties; +%ignore TagLib::Tag::complexPropertyKeys; + %include %ignore TagLib::AudioProperties::length; // Deprecated. @@ -151,8 +157,20 @@ namespace TagLib { %ignore TagLib::File::setProperties; %ignore TagLib::File::removeUnsupportedProperties; +%ignore TagLib::File::complexProperties; +%ignore TagLib::File::setComplexProperties; +%ignore TagLib::File::complexPropertyKeys; + %include +%ignore TagLib::FileRef::properties; +%ignore TagLib::FileRef::setProperties; +%ignore TagLib::FileRef::removeUnsupportedProperties; + +%ignore TagLib::FileRef::complexProperties; +%ignore TagLib::FileRef::setComplexProperties; +%ignore TagLib::FileRef::complexPropertyKeys; + // Ignore IOStream and all the constructors using it. %ignore IOStream; %ignore TagLib::FileRef::FileRef(IOStream*, bool, AudioProperties::ReadStyle); diff --git a/ext/taglib_base/taglib_base_wrap.cxx b/ext/taglib_base/taglib_base_wrap.cxx index 82559352..a09e840c 100644 --- a/ext/taglib_base/taglib_base_wrap.cxx +++ b/ext/taglib_base/taglib_base_wrap.cxx @@ -1860,12 +1860,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__String swig_types[4] #define SWIGTYPE_p_TagLib__Tag swig_types[5] #define SWIGTYPE_p_char swig_types[6] -#define SWIGTYPE_p_unsigned_char swig_types[7] -#define SWIGTYPE_p_unsigned_int swig_types[8] -#define SWIGTYPE_p_unsigned_long swig_types[9] -#define SWIGTYPE_p_wchar_t swig_types[10] -static swig_type_info *swig_types[12]; -static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[7] +#define SWIGTYPE_p_unsigned_char swig_types[8] +#define SWIGTYPE_p_unsigned_int swig_types[9] +#define SWIGTYPE_p_unsigned_long swig_types[10] +#define SWIGTYPE_p_wchar_t swig_types[11] +static swig_type_info *swig_types[13]; +static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1943,6 +1944,7 @@ template T SwigValueInit() { #include + #include #include #include @@ -1961,34 +1963,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2077,6 +2071,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} #include @@ -2288,6 +2289,96 @@ SWIG_AsVal_bool (VALUE obj, bool *val) return SWIG_TypeError; } + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (VALUE obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + SWIGINTERN void TagLib_FileRef_close(TagLib::FileRef *self){ free_taglib_fileref(self); } @@ -2877,6 +2968,30 @@ SWIGINTERN VALUE _wrap_Tag_duplicate(int nargs, VALUE *args, VALUE self) { } +SWIGINTERN VALUE +_wrap_Tag_join_tag_values(int argc, VALUE *argv, VALUE self) { + TagLib::StringList *arg1 = 0 ; + TagLib::StringList tmp1 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_array_to_taglib_string_list(argv[0]); + arg1 = &tmp1; + } + result = TagLib::Tag::joinTagValues((TagLib::StringList const &)*arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + static swig_class SwigClassAudioProperties; SWIGINTERN void @@ -3116,10 +3231,10 @@ _wrap_File_save(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_read_block(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - unsigned long arg2 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned long val2 ; + size_t val2 ; int ecode2 = 0 ; TagLib::ByteVector result; VALUE vresult = Qnil; @@ -3132,11 +3247,11 @@ _wrap_File_read_block(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","readBlock", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); + ecode2 = SWIG_AsVal_size_t(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned long","readBlock", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","readBlock", 2, argv[0] )); } - arg2 = static_cast< unsigned long >(val2); + arg2 = static_cast< size_t >(val2); result = (arg1)->readBlock(arg2); { vresult = taglib_bytevector_to_ruby_string(result); @@ -3178,9 +3293,9 @@ _wrap_File_write_block(int argc, VALUE *argv, VALUE self) { Document-method: TagLib::File.find call-seq: - find(pattern, fromOffset=0, before=TagLib::ByteVector()) -> long - find(pattern, fromOffset=0) -> long - find(pattern) -> long + find(pattern, fromOffset=0, before=TagLib::ByteVector()) -> TagLib::offset_t + find(pattern, fromOffset=0) -> TagLib::offset_t + find(pattern) -> TagLib::offset_t Find an element in the class. */ @@ -3188,15 +3303,15 @@ SWIGINTERN VALUE _wrap_File_find__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - long arg3 ; + TagLib::offset_t arg3 ; TagLib::ByteVector *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long val3 ; + long long val3 ; int ecode3 = 0 ; TagLib::ByteVector tmp4 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { @@ -3211,17 +3326,19 @@ _wrap_File_find__SWIG_0(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","find", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","find", 3, argv[1] )); } - arg3 = static_cast< long >(val3); + arg3 = static_cast< TagLib::offset_t >(val3); { tmp4 = ruby_string_to_taglib_bytevector(argv[2]); arg4 = &tmp4; } - result = (long)(arg1)->find((TagLib::ByteVector const &)*arg2,arg3,(TagLib::ByteVector const &)*arg4); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->find((TagLib::ByteVector const &)*arg2,arg3,(TagLib::ByteVector const &)*arg4); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3232,13 +3349,13 @@ SWIGINTERN VALUE _wrap_File_find__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - long arg3 ; + TagLib::offset_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long val3 ; + long long val3 ; int ecode3 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -3253,13 +3370,15 @@ _wrap_File_find__SWIG_1(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","find", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","find", 3, argv[1] )); } - arg3 = static_cast< long >(val3); - result = (long)(arg1)->find((TagLib::ByteVector const &)*arg2,arg3); - vresult = SWIG_From_long(static_cast< long >(result)); + arg3 = static_cast< TagLib::offset_t >(val3); + result = (TagLib::offset_t)(arg1)->find((TagLib::ByteVector const &)*arg2,arg3); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3273,7 +3392,7 @@ _wrap_File_find__SWIG_2(int argc, VALUE *argv, VALUE self) { void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3288,8 +3407,10 @@ _wrap_File_find__SWIG_2(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - result = (long)(arg1)->find((TagLib::ByteVector const &)*arg2); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->find((TagLib::ByteVector const &)*arg2); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3330,7 +3451,7 @@ SWIGINTERN VALUE _wrap_File_find(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3349,7 +3470,7 @@ SWIGINTERN VALUE _wrap_File_find(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3365,9 +3486,9 @@ SWIGINTERN VALUE _wrap_File_find(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 5, "File.find", - " long File.find(TagLib::ByteVector const &pattern, long fromOffset, TagLib::ByteVector const &before)\n" - " long File.find(TagLib::ByteVector const &pattern, long fromOffset)\n" - " long File.find(TagLib::ByteVector const &pattern)\n"); + " TagLib::offset_t File.find(TagLib::ByteVector const &pattern, TagLib::offset_t fromOffset, TagLib::ByteVector const &before)\n" + " TagLib::offset_t File.find(TagLib::ByteVector const &pattern, TagLib::offset_t fromOffset)\n" + " TagLib::offset_t File.find(TagLib::ByteVector const &pattern)\n"); return Qnil; } @@ -3377,15 +3498,15 @@ SWIGINTERN VALUE _wrap_File_rfind__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - long arg3 ; + TagLib::offset_t arg3 ; TagLib::ByteVector *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long val3 ; + long long val3 ; int ecode3 = 0 ; TagLib::ByteVector tmp4 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { @@ -3400,17 +3521,19 @@ _wrap_File_rfind__SWIG_0(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","rfind", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","rfind", 3, argv[1] )); } - arg3 = static_cast< long >(val3); + arg3 = static_cast< TagLib::offset_t >(val3); { tmp4 = ruby_string_to_taglib_bytevector(argv[2]); arg4 = &tmp4; } - result = (long)(arg1)->rfind((TagLib::ByteVector const &)*arg2,arg3,(TagLib::ByteVector const &)*arg4); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->rfind((TagLib::ByteVector const &)*arg2,arg3,(TagLib::ByteVector const &)*arg4); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3421,13 +3544,13 @@ SWIGINTERN VALUE _wrap_File_rfind__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - long arg3 ; + TagLib::offset_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long val3 ; + long long val3 ; int ecode3 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { @@ -3442,13 +3565,15 @@ _wrap_File_rfind__SWIG_1(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "long","rfind", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","rfind", 3, argv[1] )); } - arg3 = static_cast< long >(val3); - result = (long)(arg1)->rfind((TagLib::ByteVector const &)*arg2,arg3); - vresult = SWIG_From_long(static_cast< long >(result)); + arg3 = static_cast< TagLib::offset_t >(val3); + result = (TagLib::offset_t)(arg1)->rfind((TagLib::ByteVector const &)*arg2,arg3); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3462,7 +3587,7 @@ _wrap_File_rfind__SWIG_2(int argc, VALUE *argv, VALUE self) { void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -3477,8 +3602,10 @@ _wrap_File_rfind__SWIG_2(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - result = (long)(arg1)->rfind((TagLib::ByteVector const &)*arg2); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->rfind((TagLib::ByteVector const &)*arg2); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -3519,7 +3646,7 @@ SWIGINTERN VALUE _wrap_File_rfind(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3538,7 +3665,7 @@ SWIGINTERN VALUE _wrap_File_rfind(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3554,9 +3681,9 @@ SWIGINTERN VALUE _wrap_File_rfind(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 5, "File.rfind", - " long File.rfind(TagLib::ByteVector const &pattern, long fromOffset, TagLib::ByteVector const &before)\n" - " long File.rfind(TagLib::ByteVector const &pattern, long fromOffset)\n" - " long File.rfind(TagLib::ByteVector const &pattern)\n"); + " TagLib::offset_t File.rfind(TagLib::ByteVector const &pattern, TagLib::offset_t fromOffset, TagLib::ByteVector const &before)\n" + " TagLib::offset_t File.rfind(TagLib::ByteVector const &pattern, TagLib::offset_t fromOffset)\n" + " TagLib::offset_t File.rfind(TagLib::ByteVector const &pattern)\n"); return Qnil; } @@ -3576,14 +3703,14 @@ SWIGINTERN VALUE _wrap_File_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - unsigned long arg3 ; - unsigned long arg4 ; + TagLib::offset_t arg3 ; + size_t arg4 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - unsigned long val3 ; + long long val3 ; int ecode3 = 0 ; - unsigned long val4 ; + size_t val4 ; int ecode4 = 0 ; if ((argc < 3) || (argc > 3)) { @@ -3598,16 +3725,16 @@ _wrap_File_insert__SWIG_0(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_unsigned_SS_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned long","insert", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","insert", 3, argv[1] )); } - arg3 = static_cast< unsigned long >(val3); - ecode4 = SWIG_AsVal_unsigned_SS_long(argv[2], &val4); + arg3 = static_cast< TagLib::offset_t >(val3); + ecode4 = SWIG_AsVal_size_t(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned long","insert", 4, argv[2] )); + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","insert", 4, argv[2] )); } - arg4 = static_cast< unsigned long >(val4); + arg4 = static_cast< size_t >(val4); (arg1)->insert((TagLib::ByteVector const &)*arg2,arg3,arg4); return Qnil; fail: @@ -3619,11 +3746,11 @@ SWIGINTERN VALUE _wrap_File_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; TagLib::ByteVector *arg2 = 0 ; - unsigned long arg3 ; + TagLib::offset_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - unsigned long val3 ; + long long val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { @@ -3638,11 +3765,11 @@ _wrap_File_insert__SWIG_1(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_unsigned_SS_long(argv[1], &val3); + ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned long","insert", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::offset_t","insert", 3, argv[1] )); } - arg3 = static_cast< unsigned long >(val3); + arg3 = static_cast< TagLib::offset_t >(val3); (arg1)->insert((TagLib::ByteVector const &)*arg2,arg3); return Qnil; fail: @@ -3711,7 +3838,7 @@ SWIGINTERN VALUE _wrap_File_insert(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3730,12 +3857,12 @@ SWIGINTERN VALUE _wrap_File_insert(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[2], NULL); + int res = SWIG_AsVal_long_SS_long(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[3], NULL); + int res = SWIG_AsVal_size_t(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3748,8 +3875,8 @@ SWIGINTERN VALUE _wrap_File_insert(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 5, "File.insert", - " void File.insert(TagLib::ByteVector const &data, unsigned long start, unsigned long replace)\n" - " void File.insert(TagLib::ByteVector const &data, unsigned long start)\n" + " void File.insert(TagLib::ByteVector const &data, TagLib::offset_t start, size_t replace)\n" + " void File.insert(TagLib::ByteVector const &data, TagLib::offset_t start)\n" " void File.insert(TagLib::ByteVector const &data)\n"); return Qnil; @@ -3759,13 +3886,13 @@ SWIGINTERN VALUE _wrap_File_insert(int nargs, VALUE *args, VALUE self) { SWIGINTERN VALUE _wrap_File_remove_block__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - unsigned long arg2 ; - unsigned long arg3 ; + TagLib::offset_t arg2 ; + size_t arg3 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned long val2 ; + long long val2 ; int ecode2 = 0 ; - unsigned long val3 ; + size_t val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { @@ -3776,16 +3903,16 @@ _wrap_File_remove_block__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","removeBlock", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned long","removeBlock", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","removeBlock", 2, argv[0] )); } - arg2 = static_cast< unsigned long >(val2); - ecode3 = SWIG_AsVal_unsigned_SS_long(argv[1], &val3); + arg2 = static_cast< TagLib::offset_t >(val2); + ecode3 = SWIG_AsVal_size_t(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned long","removeBlock", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","removeBlock", 3, argv[1] )); } - arg3 = static_cast< unsigned long >(val3); + arg3 = static_cast< size_t >(val3); (arg1)->removeBlock(arg2,arg3); return Qnil; fail: @@ -3796,10 +3923,10 @@ _wrap_File_remove_block__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_remove_block__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - unsigned long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned long val2 ; + long long val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { @@ -3810,11 +3937,11 @@ _wrap_File_remove_block__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","removeBlock", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned long","removeBlock", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","removeBlock", 2, argv[0] )); } - arg2 = static_cast< unsigned long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); (arg1)->removeBlock(arg2); return Qnil; fail: @@ -3870,7 +3997,7 @@ SWIGINTERN VALUE _wrap_File_remove_block(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3885,12 +4012,12 @@ SWIGINTERN VALUE _wrap_File_remove_block(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { - int res = SWIG_AsVal_unsigned_SS_long(argv[2], NULL); + int res = SWIG_AsVal_size_t(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3902,8 +4029,8 @@ SWIGINTERN VALUE _wrap_File_remove_block(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 4, "File.remove_block", - " void File.remove_block(unsigned long start, unsigned long length)\n" - " void File.remove_block(unsigned long start)\n" + " void File.remove_block(TagLib::offset_t start, size_t length)\n" + " void File.remove_block(TagLib::offset_t start)\n" " void File.remove_block()\n"); return Qnil; @@ -3985,11 +4112,11 @@ _wrap_File_validq___(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_seek__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; TagLib::File::Position arg3 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; @@ -4002,11 +4129,11 @@ _wrap_File_seek__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","seek", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","seek", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","seek", 2, argv[0] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::Position","seek", 3, argv[1] )); @@ -4022,10 +4149,10 @@ _wrap_File_seek__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_seek__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { @@ -4036,11 +4163,11 @@ _wrap_File_seek__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","seek", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","seek", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","seek", 2, argv[0] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); (arg1)->seek(arg2); return Qnil; fail: @@ -4066,7 +4193,7 @@ SWIGINTERN VALUE _wrap_File_seek(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -4081,7 +4208,7 @@ SWIGINTERN VALUE _wrap_File_seek(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -4098,8 +4225,8 @@ SWIGINTERN VALUE _wrap_File_seek(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 4, "File.seek", - " void File.seek(long offset, TagLib::File::Position p)\n" - " void File.seek(long offset)\n"); + " void File.seek(TagLib::offset_t offset, TagLib::File::Position p)\n" + " void File.seek(TagLib::offset_t offset)\n"); return Qnil; } @@ -4131,7 +4258,7 @@ _wrap_File_tell(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4142,8 +4269,10 @@ _wrap_File_tell(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File const *","tell", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - result = (long)((TagLib::File const *)arg1)->tell(); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)((TagLib::File const *)arg1)->tell(); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -4155,7 +4284,7 @@ _wrap_File_length(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4166,64 +4295,12 @@ _wrap_File_length(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","length", 1, self )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - result = (long)(arg1)->length(); - vresult = SWIG_From_long(static_cast< long >(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_File_readableq___(int argc, VALUE *argv, VALUE self) { - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - bool result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","TagLib::File::isReadable", 1, argv[0] )); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (bool)TagLib::File::isReadable((char const *)arg1); - vresult = SWIG_From_bool(static_cast< bool >(result)); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return vresult; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_File_writableq___(int argc, VALUE *argv, VALUE self) { - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - bool result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","TagLib::File::isWritable", 1, argv[0] )); + result = (TagLib::offset_t)(arg1)->length(); + { + vresult = taglib_offset_t_to_ruby_int(result); } - arg1 = reinterpret_cast< char * >(buf1); - result = (bool)TagLib::File::isWritable((char const *)arg1); - vresult = SWIG_From_bool(static_cast< bool >(result)); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return vresult; fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return Qnil; } @@ -4619,6 +4696,18 @@ _wrap_FileRef_add_file_type_resolver(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_FileRef_clear_file_type_resolvers(int argc, VALUE *argv, VALUE self) { + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + TagLib::FileRef::clearFileTypeResolvers(); + return Qnil; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_FileRef_default_file_extensions(int argc, VALUE *argv, VALUE self) { TagLib::StringList result; @@ -4704,162 +4793,6 @@ _wrap_FileRef___eq__(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE -_wrap_FileRef_create__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - bool arg2 ; - TagLib::AudioProperties::ReadStyle arg3 ; - bool val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - TagLib::File *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; - } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } - } - ecode2 = SWIG_AsVal_bool(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","TagLib::FileRef::create", 2, argv[1] )); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","TagLib::FileRef::create", 3, argv[2] )); - } - arg3 = static_cast< TagLib::AudioProperties::ReadStyle >(val3); - result = (TagLib::File *)TagLib::FileRef::create(SWIG_STD_MOVE(arg1),arg2,arg3); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__File, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_FileRef_create__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - bool arg2 ; - bool val2 ; - int ecode2 = 0 ; - TagLib::File *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } - } - ecode2 = SWIG_AsVal_bool(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","TagLib::FileRef::create", 2, argv[1] )); - } - arg2 = static_cast< bool >(val2); - result = (TagLib::File *)TagLib::FileRef::create(SWIG_STD_MOVE(arg1),arg2); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__File, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_FileRef_create__SWIG_2(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - TagLib::File *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } - } - result = (TagLib::File *)TagLib::FileRef::create(SWIG_STD_MOVE(arg1)); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__File, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE _wrap_FileRef_create(int nargs, VALUE *args, VALUE self) { - int argc; - VALUE argv[3]; - int ii; - - argc = nargs; - if (argc > 3) SWIG_fail; - for (ii = 0; (ii < argc); ++ii) { - argv[ii] = args[ii]; - } - if (argc == 1) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FileRef_create__SWIG_2(nargs, args, self); - } - } - if (argc == 2) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FileRef_create__SWIG_1(nargs, args, self); - } - } - } - if (argc == 3) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FileRef_create__SWIG_0(nargs, args, self); - } - } - } - } - -fail: - Ruby_Format_OverloadedError( argc, 3, "FileRef.create", - " TagLib::File FileRef.create(TagLib::FileName fileName, bool readAudioProperties, TagLib::AudioProperties::ReadStyle audioPropertiesStyle)\n" - " TagLib::File FileRef.create(TagLib::FileName fileName, bool readAudioProperties)\n" - " TagLib::File * FileRef.create(TagLib::FileName fileName)\n"); - - return Qnil; -} - - SWIGINTERN VALUE _wrap_FileRef_close(int argc, VALUE *argv, VALUE self) { TagLib::FileRef *arg1 = (TagLib::FileRef *) 0 ; @@ -4891,6 +4824,7 @@ static swig_type_info _swigt__p_TagLib__FileRef__FileTypeResolver = {"_p_TagLib_ static swig_type_info _swigt__p_TagLib__String = {"_p_TagLib__String", "TagLib::String *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -4904,6 +4838,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__String, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -4917,6 +4852,7 @@ static swig_cast_info _swigc__p_TagLib__FileRef__FileTypeResolver[] = { {&_swig static swig_cast_info _swigc__p_TagLib__String[] = { {&_swigt__p_TagLib__String, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -4930,6 +4866,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__String, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -5227,6 +5164,7 @@ SWIGEXPORT void Init_taglib_base(void) { rb_define_method(SwigClassTag.klass, "track=", VALUEFUNC(_wrap_Tag_tracke___), -1); rb_define_method(SwigClassTag.klass, "empty?", VALUEFUNC(_wrap_Tag_emptyq___), -1); rb_define_singleton_method(SwigClassTag.klass, "duplicate", VALUEFUNC(_wrap_Tag_duplicate), -1); + rb_define_singleton_method(SwigClassTag.klass, "join_tag_values", VALUEFUNC(_wrap_Tag_join_tag_values), -1); SwigClassTag.mark = 0; SwigClassTag.destroy = (void (*)(void *)) free_TagLib_Tag; SwigClassTag.trackObjects = 1; @@ -5252,6 +5190,10 @@ SWIGEXPORT void Init_taglib_base(void) { rb_define_const(SwigClassFile.klass, "Beginning", SWIG_From_int(static_cast< int >(TagLib::File::Beginning))); rb_define_const(SwigClassFile.klass, "Current", SWIG_From_int(static_cast< int >(TagLib::File::Current))); rb_define_const(SwigClassFile.klass, "End", SWIG_From_int(static_cast< int >(TagLib::File::End))); + rb_define_const(SwigClassFile.klass, "StripNone", SWIG_From_int(static_cast< int >(TagLib::File::StripNone))); + rb_define_const(SwigClassFile.klass, "StripOthers", SWIG_From_int(static_cast< int >(TagLib::File::StripOthers))); + rb_define_const(SwigClassFile.klass, "Duplicate", SWIG_From_int(static_cast< int >(TagLib::File::Duplicate))); + rb_define_const(SwigClassFile.klass, "DoNotDuplicate", SWIG_From_int(static_cast< int >(TagLib::File::DoNotDuplicate))); rb_define_method(SwigClassFile.klass, "name", VALUEFUNC(_wrap_File_name), -1); rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1); rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1); @@ -5269,8 +5211,6 @@ SWIGEXPORT void Init_taglib_base(void) { rb_define_method(SwigClassFile.klass, "clear", VALUEFUNC(_wrap_File_clear), -1); rb_define_method(SwigClassFile.klass, "tell", VALUEFUNC(_wrap_File_tell), -1); rb_define_method(SwigClassFile.klass, "length", VALUEFUNC(_wrap_File_length), -1); - rb_define_singleton_method(SwigClassFile.klass, "readable?", VALUEFUNC(_wrap_File_readableq___), -1); - rb_define_singleton_method(SwigClassFile.klass, "writable?", VALUEFUNC(_wrap_File_writableq___), -1); SwigClassFile.mark = 0; SwigClassFile.destroy = (void (*)(void *)) free_TagLib_File; SwigClassFile.trackObjects = 1; @@ -5284,10 +5224,10 @@ SWIGEXPORT void Init_taglib_base(void) { rb_define_method(SwigClassFileRef.klass, "file", VALUEFUNC(_wrap_FileRef_file), -1); rb_define_method(SwigClassFileRef.klass, "save", VALUEFUNC(_wrap_FileRef_save), -1); rb_define_singleton_method(SwigClassFileRef.klass, "add_file_type_resolver", VALUEFUNC(_wrap_FileRef_add_file_type_resolver), -1); + rb_define_singleton_method(SwigClassFileRef.klass, "clear_file_type_resolvers", VALUEFUNC(_wrap_FileRef_clear_file_type_resolvers), -1); rb_define_singleton_method(SwigClassFileRef.klass, "default_file_extensions", VALUEFUNC(_wrap_FileRef_default_file_extensions), -1); rb_define_method(SwigClassFileRef.klass, "null?", VALUEFUNC(_wrap_FileRef_nullq___), -1); rb_define_method(SwigClassFileRef.klass, "==", VALUEFUNC(_wrap_FileRef___eq__), -1); - rb_define_singleton_method(SwigClassFileRef.klass, "create", VALUEFUNC(_wrap_FileRef_create), -1); rb_define_method(SwigClassFileRef.klass, "close", VALUEFUNC(_wrap_FileRef_close), -1); SwigClassFileRef.mark = 0; SwigClassFileRef.destroy = (void (*)(void *)) free_TagLib_FileRef; diff --git a/ext/taglib_flac/taglib_flac.i b/ext/taglib_flac/taglib_flac.i index 8e3c6f05..07b3dac2 100644 --- a/ext/taglib_flac/taglib_flac.i +++ b/ext/taglib_flac/taglib_flac.i @@ -5,7 +5,6 @@ #include #include #include -using namespace TagLib; %} %include "../taglib_base/includes.i" @@ -21,9 +20,13 @@ using namespace TagLib; // Ignore IOStream and all the constructors using it. %ignore IOStream; -%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*, bool, Properties::ReadStyle); -%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*, bool); -%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory*); +%ignore TagLib::FLAC::File::File(IOStream*, bool, Properties::ReadStyle, ID3v2::FrameFactory *); +%ignore TagLib::FLAC::File::File(IOStream*, bool, Properties::ReadStyle); +%ignore TagLib::FLAC::File::File(IOStream*, bool); +%ignore TagLib::FLAC::File::File(IOStream*); +%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory *, bool, Properties::ReadStyle); +%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory *, bool); +%ignore TagLib::FLAC::File::File(IOStream*, ID3v2::FrameFactory *); %ignore TagLib::FLAC::File::isSupported(IOStream *); %rename(id3v1_tag) TagLib::FLAC::File::ID3v1Tag; diff --git a/ext/taglib_flac/taglib_flac_wrap.cxx b/ext/taglib_flac/taglib_flac_wrap.cxx index f1564d81..7b6a722c 100644 --- a/ext/taglib_flac/taglib_flac_wrap.cxx +++ b/ext/taglib_flac/taglib_flac_wrap.cxx @@ -1854,18 +1854,18 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_TagLib__AudioProperties swig_types[0] -#define SWIGTYPE_p_TagLib__ByteVector swig_types[1] -#define SWIGTYPE_p_TagLib__FLAC__File swig_types[2] -#define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[3] -#define SWIGTYPE_p_TagLib__FLAC__Properties swig_types[4] -#define SWIGTYPE_p_TagLib__File swig_types[5] -#define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[6] -#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[7] -#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[8] -#define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[9] -#define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[10] -#define SWIGTYPE_p_TagLib__Tag swig_types[11] -#define SWIGTYPE_p_char swig_types[12] +#define SWIGTYPE_p_TagLib__FLAC__File swig_types[1] +#define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[2] +#define SWIGTYPE_p_TagLib__FLAC__Properties swig_types[3] +#define SWIGTYPE_p_TagLib__File swig_types[4] +#define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[5] +#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[6] +#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[7] +#define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[8] +#define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[9] +#define SWIGTYPE_p_TagLib__Tag swig_types[10] +#define SWIGTYPE_p_char swig_types[11] +#define SWIGTYPE_p_long_long swig_types[12] #define SWIGTYPE_p_unsigned_char swig_types[13] #define SWIGTYPE_p_unsigned_int swig_types[14] #define SWIGTYPE_p_unsigned_long swig_types[15] @@ -1966,34 +1966,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2082,6 +2074,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List & list) { @@ -2102,6 +2101,53 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) } +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + /*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) { @@ -2132,16 +2178,6 @@ SWIG_AsVal_long (VALUE obj, long* val) } -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - SWIGINTERN int SWIG_AsVal_int (VALUE obj, int *val) { @@ -2158,50 +2194,6 @@ SWIG_AsVal_int (VALUE obj, int *val) } - #define SWIG_From_long LONG2NUM - - -SWIGINTERNINLINE VALUE -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} - - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERNINLINE VALUE -SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) -{ - return ULL2NUM(value); -} -#endif - - -SWIGINTERN int -SWIG_AsVal_bool (VALUE obj, bool *val) -{ - if (obj == Qtrue) { - if (val) *val = true; - return SWIG_OK; - } else if (obj == Qfalse) { - if (val) *val = false; - return SWIG_OK; - } else { - int res = 0; - if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { - if (val) *val = res ? true : false; - return SWIG_OK; - } - } - return SWIG_TypeError; -} - - SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { @@ -2252,6 +2244,45 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) + #define SWIG_From_long LONG2NUM + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return ULL2NUM(value); +} +#endif + + +SWIGINTERN int +SWIG_AsVal_bool (VALUE obj, bool *val) +{ + if (obj == Qtrue) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Qfalse) { + if (val) *val = false; + return SWIG_OK; + } else { + int res = 0; + if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { + if (val) *val = res ? true : false; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + SWIGINTERNINLINE VALUE SWIG_From_bool (bool value) { @@ -2319,12 +2350,11 @@ static swig_class SwigClassProperties; SWIGINTERN VALUE _wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::ByteVector arg1 ; - long arg2 ; + TagLib::ByteVector *arg1 = 0 ; + TagLib::offset_t arg2 ; TagLib::AudioProperties::ReadStyle arg3 ; - void *argp1 ; - int res1 = 0 ; - long val2 ; + TagLib::ByteVector tmp1 ; + long long val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; @@ -2334,97 +2364,20 @@ _wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } { - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__ByteVector, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ByteVector","Properties", 1, argv[0] )); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ByteVector","Properties", 1, argv[0])); - } else { - arg1 = *(reinterpret_cast< TagLib::ByteVector * >(argp1)); - } + tmp1 = ruby_string_to_taglib_bytevector(argv[0]); + arg1 = &tmp1; } - ecode2 = SWIG_AsVal_long(argv[1], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Properties", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Properties", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); ecode3 = SWIG_AsVal_int(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 3, argv[2] )); } arg3 = static_cast< TagLib::AudioProperties::ReadStyle >(val3); - result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties(arg1,arg2,arg3); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_new_Properties__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::ByteVector arg1 ; - long arg2 ; - void *argp1 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - TagLib::FLAC::Properties *result = 0 ; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - { - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__ByteVector, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ByteVector","Properties", 1, argv[0] )); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ByteVector","Properties", 1, argv[0])); - } else { - arg1 = *(reinterpret_cast< TagLib::ByteVector * >(argp1)); - } - } - ecode2 = SWIG_AsVal_long(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Properties", 2, argv[1] )); - } - arg2 = static_cast< long >(val2); - result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties(arg1,arg2); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_new_Properties__SWIG_2(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; - TagLib::AudioProperties::ReadStyle arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - TagLib::FLAC::Properties *result = 0 ; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","Properties", 1, argv[0] )); - } - arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 2, argv[1] )); - } - arg2 = static_cast< TagLib::AudioProperties::ReadStyle >(val2); - result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties(arg1,arg2); + result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties((TagLib::ByteVector const &)*arg1,arg2,arg3); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2449,21 +2402,27 @@ _wrap_Properties_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_Properties__SWIG_3(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +_wrap_new_Properties__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::ByteVector *arg1 = 0 ; + TagLib::offset_t arg2 ; + TagLib::ByteVector tmp1 ; + long long val2 ; + int ecode2 = 0 ; TagLib::FLAC::Properties *result = 0 ; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","Properties", 1, argv[0] )); + { + tmp1 = ruby_string_to_taglib_bytevector(argv[0]); + arg1 = &tmp1; } - arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1); - result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties(arg1); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Properties", 2, argv[1] )); + } + arg2 = static_cast< TagLib::offset_t >(val2); + result = (TagLib::FLAC::Properties *)new TagLib::FLAC::Properties((TagLib::ByteVector const &)*arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2482,38 +2441,13 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) { for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } - if (argc == 1) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__FLAC__File, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Properties__SWIG_3(nargs, args, self); - } - } - if (argc == 2) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__FLAC__File, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Properties__SWIG_2(nargs, args, self); - } - } - } if (argc == 2) { int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVector, SWIG_POINTER_NO_NULL); + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -2523,12 +2457,11 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) { } if (argc == 3) { int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVector, SWIG_POINTER_NO_NULL); + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -2545,10 +2478,8 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 3, "Properties.new", - " Properties.new(TagLib::ByteVector data, long streamLength, TagLib::AudioProperties::ReadStyle style)\n" - " Properties.new(TagLib::ByteVector data, long streamLength)\n" - " Properties.new(TagLib::FLAC::File *file, TagLib::AudioProperties::ReadStyle style)\n" - " Properties.new(TagLib::FLAC::File *file)\n"); + " Properties.new(TagLib::ByteVector const &data, TagLib::offset_t streamLength, TagLib::AudioProperties::ReadStyle style)\n" + " Properties.new(TagLib::ByteVector const &data, TagLib::offset_t streamLength)\n"); return Qnil; } @@ -2561,30 +2492,6 @@ free_TagLib_FLAC_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::FLAC::Properties * >(argp1); - result = (int)((TagLib::FLAC::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::FLAC::Properties *arg1 = (TagLib::FLAC::Properties *) 0 ; @@ -2759,6 +2666,53 @@ static swig_class SwigClassFile; SWIGINTERN VALUE _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::FLAC::Properties::ReadStyle arg3 ; + TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + TagLib::FLAC::File *result = 0 ; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::FLAC::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::FLAC::Properties::ReadStyle >(val3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] )); + } + arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4); + result = (TagLib::FLAC::File *)new TagLib::FLAC::File(arg1,arg2,arg3,arg4); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; TagLib::FLAC::Properties::ReadStyle arg3 ; @@ -2797,7 +2751,7 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; bool val2 ; @@ -2828,7 +2782,7 @@ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::FLAC::File *result = 0 ; @@ -2851,7 +2805,7 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; bool arg3 ; @@ -2898,7 +2852,7 @@ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; bool arg3 ; @@ -2952,7 +2906,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_6(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; void *argp2 = 0 ; @@ -2997,7 +2951,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_2(nargs, args, self); + return _wrap_new_File__SWIG_3(nargs, args, self); } } if (argc == 2) { @@ -3009,7 +2963,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_5(nargs, args, self); + return _wrap_new_File__SWIG_6(nargs, args, self); } } } @@ -3023,7 +2977,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_1(nargs, args, self); + return _wrap_new_File__SWIG_2(nargs, args, self); } } } @@ -3041,7 +2995,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_4(nargs, args, self); + return _wrap_new_File__SWIG_5(nargs, args, self); } } } @@ -3061,7 +3015,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_0(nargs, args, self); + return _wrap_new_File__SWIG_1(nargs, args, self); } } } @@ -3085,7 +3039,32 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_3(nargs, args, self); + return _wrap_new_File__SWIG_4(nargs, args, self); + } + } + } + } + } + if (argc == 4) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_File__SWIG_0(nargs, args, self); } } } @@ -3094,6 +3073,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 4, "File.new", + " File.new(TagLib::FileName file, bool readProperties, TagLib::FLAC::Properties::ReadStyle propertiesStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n" " File.new(TagLib::FileName file, bool readProperties, TagLib::FLAC::Properties::ReadStyle propertiesStyle)\n" " File.new(TagLib::FileName file, bool readProperties)\n" " File.new(TagLib::FileName file)\n" @@ -3480,85 +3460,6 @@ SWIGINTERN VALUE _wrap_File_xiph_comment(int nargs, VALUE *args, VALUE self) { } -SWIGINTERN VALUE -_wrap_File_set_id3v2_frame_factory(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; - TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","setID3v2FrameFactory", 1, self )); - } - arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1); - res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","setID3v2FrameFactory", 2, argv[0] )); - } - arg2 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp2); - (arg1)->setID3v2FrameFactory((TagLib::ID3v2::FrameFactory const *)arg2); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_File_stream_info_data(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::ByteVector result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","streamInfoData", 1, self )); - } - arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1); - result = (arg1)->streamInfoData(); - { - vresult = taglib_bytevector_to_ruby_string(result); - } - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_File_stream_length(int argc, VALUE *argv, VALUE self) { - TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__FLAC__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::FLAC::File *","streamLength", 1, self )); - } - arg1 = reinterpret_cast< TagLib::FLAC::File * >(argp1); - result = (long)(arg1)->streamLength(); - vresult = SWIG_From_long(static_cast< long >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_File_picture_list(int argc, VALUE *argv, VALUE self) { TagLib::FLAC::File *arg1 = (TagLib::FLAC::File *) 0 ; @@ -3862,7 +3763,6 @@ static void *_p_TagLib__FLAC__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM return (void *)((TagLib::File *) ((TagLib::FLAC::File *) x)); } static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TagLib__ByteVector = {"_p_TagLib__ByteVector", "TagLib::ByteVector *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__FLAC__File = {"_p_TagLib__FLAC__File", "TagLib::FLAC::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__FLAC__Properties = {"_p_TagLib__FLAC__Properties", "TagLib::FLAC::Properties *", 0, 0, (void*)0, 0}; @@ -3874,6 +3774,7 @@ static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_Tag static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -3881,7 +3782,6 @@ static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__AudioProperties, - &_swigt__p_TagLib__ByteVector, &_swigt__p_TagLib__FLAC__File, &_swigt__p_TagLib__FLAC__Picture, &_swigt__p_TagLib__FLAC__Properties, @@ -3893,6 +3793,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__Ogg__XiphComment, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -3900,7 +3801,6 @@ static swig_type_info *swig_type_initial[] = { }; 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}}; -static swig_cast_info _swigc__p_TagLib__ByteVector[] = { {&_swigt__p_TagLib__ByteVector, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__FLAC__File[] = { {&_swigt__p_TagLib__FLAC__File, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__FLAC__Picture[] = { {&_swigt__p_TagLib__FLAC__Picture, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__FLAC__Properties[] = { {&_swigt__p_TagLib__FLAC__Properties, 0, 0, 0},{0, 0, 0, 0}}; @@ -3912,6 +3812,7 @@ static swig_cast_info _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t[] = { {&_ static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -3919,7 +3820,6 @@ static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__AudioProperties, - _swigc__p_TagLib__ByteVector, _swigc__p_TagLib__FLAC__File, _swigc__p_TagLib__FLAC__Picture, _swigc__p_TagLib__FLAC__Properties, @@ -3931,6 +3831,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__Ogg__XiphComment, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -4200,7 +4101,6 @@ SWIGEXPORT void Init_taglib_flac(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__Properties, (void *) &SwigClassProperties); rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate); rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); @@ -4227,9 +4127,6 @@ SWIGEXPORT void Init_taglib_flac(void) { rb_define_method(SwigClassFile.klass, "id3v2_tag", VALUEFUNC(_wrap_File_id3v2_tag), -1); rb_define_method(SwigClassFile.klass, "id3v1_tag", VALUEFUNC(_wrap_File_id3v1_tag), -1); rb_define_method(SwigClassFile.klass, "xiph_comment", VALUEFUNC(_wrap_File_xiph_comment), -1); - rb_define_method(SwigClassFile.klass, "set_id3v2_frame_factory", VALUEFUNC(_wrap_File_set_id3v2_frame_factory), -1); - rb_define_method(SwigClassFile.klass, "stream_info_data", VALUEFUNC(_wrap_File_stream_info_data), -1); - rb_define_method(SwigClassFile.klass, "stream_length", VALUEFUNC(_wrap_File_stream_length), -1); rb_define_method(SwigClassFile.klass, "picture_list", VALUEFUNC(_wrap_File_picture_list), -1); rb_define_method(SwigClassFile.klass, "remove_picture", VALUEFUNC(_wrap_File_remove_picture), -1); rb_define_method(SwigClassFile.klass, "remove_pictures", VALUEFUNC(_wrap_File_remove_pictures), -1); diff --git a/ext/taglib_flac_picture/taglib_flac_picture.i b/ext/taglib_flac_picture/taglib_flac_picture.i index e878c7a1..02fcf7ef 100644 --- a/ext/taglib_flac_picture/taglib_flac_picture.i +++ b/ext/taglib_flac_picture/taglib_flac_picture.i @@ -11,5 +11,6 @@ %ignore TagLib::FLAC::MetadataBlock::render; // Only useful internally. %include +%include %ignore TagLib::FLAC::Picture::render; // Only useful internally. %include diff --git a/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx b/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx index f0046c47..694c2988 100644 --- a/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +++ b/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx @@ -1854,12 +1854,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__FLAC__Picture swig_types[1] #define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[2] #define SWIGTYPE_p_char swig_types[3] -#define SWIGTYPE_p_unsigned_char swig_types[4] -#define SWIGTYPE_p_unsigned_int swig_types[5] -#define SWIGTYPE_p_unsigned_long swig_types[6] -#define SWIGTYPE_p_wchar_t swig_types[7] -static swig_type_info *swig_types[9]; -static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[4] +#define SWIGTYPE_p_unsigned_char swig_types[5] +#define SWIGTYPE_p_unsigned_int swig_types[6] +#define SWIGTYPE_p_unsigned_long swig_types[7] +#define SWIGTYPE_p_wchar_t swig_types[8] +static swig_type_info *swig_types[10]; +static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1951,34 +1952,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2067,6 +2060,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List & list) { @@ -2100,56 +2100,6 @@ SWIG_From_int (int value) } -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) -{ - if (TYPE(obj) == T_STRING) { - char *cstr = StringValuePtr(obj); - size_t size = RSTRING_LEN(obj) + 1; - if (cptr) { - if (alloc) { - if (*alloc == SWIG_NEWOBJ) { - *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size))); - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } - } - if (psize) *psize = size; - return SWIG_OK; - } else { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *)vptr; - if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - - - - SWIGINTERN VALUE SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) { @@ -2203,6 +2153,56 @@ SWIG_AsVal_int (VALUE obj, int *val) } +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) +{ + if (TYPE(obj) == T_STRING) { + char *cstr = StringValuePtr(obj); + size_t size = RSTRING_LEN(obj) + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size))); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *)vptr; + if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + SWIGINTERNINLINE VALUE SWIG_From_bool (bool value) { @@ -2242,8 +2242,104 @@ _wrap_MetadataBlock_code(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_picture_type_to_string(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib::Utils::pictureTypeToString", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + result = TagLib::Utils::pictureTypeToString(arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_picture_type_from_string(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; + } + result = (int)TagLib::Utils::pictureTypeFromString((TagLib::String const &)*arg1); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + static swig_class SwigClassPicture; +SWIGINTERN VALUE +_wrap_Picture_type_to_string(int argc, VALUE *argv, VALUE self) { + TagLib::FLAC::Picture::Type arg1 ; + int val1 ; + int ecode1 = 0 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::FLAC::Picture::Type","TagLib::FLAC::Picture::typeToString", 1, argv[0] )); + } + arg1 = static_cast< TagLib::FLAC::Picture::Type >(val1); + result = TagLib::FLAC::Picture::typeToString(arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Picture_type_from_string(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + TagLib::FLAC::Picture::Type result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; + } + result = (TagLib::FLAC::Picture::Type)TagLib::FLAC::Picture::typeFromString((TagLib::String const &)*arg1); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_new_Picture__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::FLAC::Picture *result = 0 ; @@ -2823,6 +2919,7 @@ static swig_type_info _swigt__p_TagLib__FLAC__MetadataBlock = {"_p_TagLib__FLAC_ static swig_type_info _swigt__p_TagLib__FLAC__Picture = {"_p_TagLib__FLAC__Picture", "TagLib::FLAC::Picture *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::FLAC::PictureList *|TagLib::List< TagLib::FLAC::Picture > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -2833,6 +2930,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__FLAC__Picture, &_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -2843,6 +2941,7 @@ static swig_cast_info _swigc__p_TagLib__FLAC__MetadataBlock[] = { {&_swigt__p_T static swig_cast_info _swigc__p_TagLib__FLAC__Picture[] = { {&_swigt__p_TagLib__FLAC__Picture, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t[] = { {&_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -2853,6 +2952,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__FLAC__Picture, _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -3131,6 +3231,8 @@ SWIGEXPORT void Init_taglib_flac_picture(void) { SwigClassMetadataBlock.mark = 0; SwigClassMetadataBlock.destroy = (void (*)(void *)) free_TagLib_FLAC_MetadataBlock; SwigClassMetadataBlock.trackObjects = 1; + rb_define_module_function(mFLAC, "picture_type_to_string", VALUEFUNC(_wrap_picture_type_to_string), -1); + rb_define_module_function(mFLAC, "picture_type_from_string", VALUEFUNC(_wrap_picture_type_from_string), -1); SwigClassPicture.klass = rb_define_class_under(mFLAC, "Picture", ((swig_class *) SWIGTYPE_p_TagLib__FLAC__MetadataBlock->clientdata)->klass); SWIG_TypeClientData(SWIGTYPE_p_TagLib__FLAC__Picture, (void *) &SwigClassPicture); @@ -3157,6 +3259,8 @@ SWIGEXPORT void Init_taglib_flac_picture(void) { rb_define_const(SwigClassPicture.klass, "Illustration", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::Illustration))); rb_define_const(SwigClassPicture.klass, "BandLogo", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::BandLogo))); rb_define_const(SwigClassPicture.klass, "PublisherLogo", SWIG_From_int(static_cast< int >(TagLib::FLAC::Picture::PublisherLogo))); + rb_define_singleton_method(SwigClassPicture.klass, "type_to_string", VALUEFUNC(_wrap_Picture_type_to_string), -1); + rb_define_singleton_method(SwigClassPicture.klass, "type_from_string", VALUEFUNC(_wrap_Picture_type_from_string), -1); rb_define_method(SwigClassPicture.klass, "type", VALUEFUNC(_wrap_Picture_type), -1); rb_define_method(SwigClassPicture.klass, "type=", VALUEFUNC(_wrap_Picture_typee___), -1); rb_define_method(SwigClassPicture.klass, "mime_type", VALUEFUNC(_wrap_Picture_mime_type), -1); diff --git a/ext/taglib_id3v1/taglib_id3v1.i b/ext/taglib_id3v1/taglib_id3v1.i index f751f220..c1cf49fb 100644 --- a/ext/taglib_id3v1/taglib_id3v1.i +++ b/ext/taglib_id3v1/taglib_id3v1.i @@ -2,8 +2,6 @@ %{ #include #include -#include -using namespace TagLib; %} %include "../taglib_base/includes.i" diff --git a/ext/taglib_id3v1/taglib_id3v1_wrap.cxx b/ext/taglib_id3v1/taglib_id3v1_wrap.cxx index 56f78def..37cdd1df 100644 --- a/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +++ b/ext/taglib_id3v1/taglib_id3v1_wrap.cxx @@ -1856,12 +1856,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[3] #define SWIGTYPE_p_TagLib__Tag swig_types[4] #define SWIGTYPE_p_char swig_types[5] -#define SWIGTYPE_p_unsigned_char swig_types[6] -#define SWIGTYPE_p_unsigned_int swig_types[7] -#define SWIGTYPE_p_unsigned_long swig_types[8] -#define SWIGTYPE_p_wchar_t swig_types[9] -static swig_type_info *swig_types[11]; -static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[6] +#define SWIGTYPE_p_unsigned_char swig_types[7] +#define SWIGTYPE_p_unsigned_int swig_types[8] +#define SWIGTYPE_p_unsigned_long swig_types[9] +#define SWIGTYPE_p_wchar_t swig_types[10] +static swig_type_info *swig_types[12]; +static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1953,34 +1954,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2069,6 +2062,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} SWIGINTERN swig_type_info* @@ -2128,43 +2128,50 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) } +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE /*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ -SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) { VALUE *args = (VALUE *)arg; VALUE obj = args[0]; VALUE type = TYPE(obj); - long *res = (long *)(args[1]); - *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); return obj; } /*@SWIG@*/ SWIGINTERN int -SWIG_AsVal_long (VALUE obj, long* val) +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { - long v; + long long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); - if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif #endif @@ -2231,6 +2238,36 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) } +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long *res = (long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long (VALUE obj, long* val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + SWIGINTERN int SWIG_AsVal_int (VALUE obj, int *val) { @@ -2297,6 +2334,13 @@ _wrap_new_StringHandler(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN void +free_TagLib_ID3v1_StringHandler(void *self) { + TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + SWIGINTERN VALUE _wrap_StringHandler_parse(int argc, VALUE *argv, VALUE self) { TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *) 0 ; @@ -2361,13 +2405,6 @@ _wrap_StringHandler_render(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN void -free_TagLib_ID3v1_StringHandler(void *self) { - TagLib::ID3v1::StringHandler *arg1 = (TagLib::ID3v1::StringHandler *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - static swig_class SwigClassTag; SWIGINTERN VALUE @@ -2404,10 +2441,10 @@ _wrap_Tag_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; TagLib::ID3v1::Tag *result = 0 ; @@ -2419,11 +2456,11 @@ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[1], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Tag", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Tag", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); result = (TagLib::ID3v1::Tag *)new TagLib::ID3v1::Tag(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); @@ -2453,7 +2490,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -2465,7 +2502,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 2, "Tag.new", " Tag.new()\n" - " Tag.new(TagLib::File *file, long tagOffset)\n"); + " Tag.new(TagLib::File *file, TagLib::offset_t tagOffset)\n"); return Qnil; } @@ -3063,6 +3100,7 @@ static swig_type_info _swigt__p_TagLib__ID3v1__StringHandler = {"_p_TagLib__ID3v static swig_type_info _swigt__p_TagLib__ID3v1__Tag = {"_p_TagLib__ID3v1__Tag", "TagLib::ID3v1::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -3075,6 +3113,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__ID3v1__Tag, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -3087,6 +3126,7 @@ static swig_cast_info _swigc__p_TagLib__ID3v1__StringHandler[] = { {&_swigt__p_ static swig_cast_info _swigc__p_TagLib__ID3v1__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__ID3v1__Tag, _p_TagLib__ID3v1__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -3099,6 +3139,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__ID3v1__Tag, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, diff --git a/ext/taglib_id3v2/taglib_id3v2.i b/ext/taglib_id3v2/taglib_id3v2.i index 2ed4e6c5..587da613 100644 --- a/ext/taglib_id3v2/taglib_id3v2.i +++ b/ext/taglib_id3v2/taglib_id3v2.i @@ -20,7 +20,6 @@ #include #include #include -using namespace TagLib; %} %include "../taglib_base/includes.i" @@ -133,6 +132,7 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) { %include "relativevolumeframe.i" +%include %include // Ignore the unified property interface. diff --git a/ext/taglib_id3v2/taglib_id3v2_wrap.cxx b/ext/taglib_id3v2/taglib_id3v2_wrap.cxx index 708f6519..f526be15 100644 --- a/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +++ b/ext/taglib_id3v2/taglib_id3v2_wrap.cxx @@ -1859,9 +1859,9 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__ID3v2__ChapterFrame swig_types[6] #define SWIGTYPE_p_TagLib__ID3v2__CommentsFrame swig_types[7] #define SWIGTYPE_p_TagLib__ID3v2__ExtendedHeader swig_types[8] -#define SWIGTYPE_p_TagLib__ID3v2__Footer swig_types[9] -#define SWIGTYPE_p_TagLib__ID3v2__Frame swig_types[10] -#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[11] +#define SWIGTYPE_p_TagLib__ID3v2__Frame swig_types[9] +#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[10] +#define SWIGTYPE_p_TagLib__ID3v2__Frame__Header swig_types[11] #define SWIGTYPE_p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame swig_types[12] #define SWIGTYPE_p_TagLib__ID3v2__Header swig_types[13] #define SWIGTYPE_p_TagLib__ID3v2__PopularimeterFrame swig_types[14] @@ -1880,12 +1880,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__ListT_TagLib__ID3v2__Frame_p_t swig_types[27] #define SWIGTYPE_p_TagLib__Tag swig_types[28] #define SWIGTYPE_p_char swig_types[29] -#define SWIGTYPE_p_unsigned_char swig_types[30] -#define SWIGTYPE_p_unsigned_int swig_types[31] -#define SWIGTYPE_p_unsigned_long swig_types[32] -#define SWIGTYPE_p_wchar_t swig_types[33] -static swig_type_info *swig_types[35]; -static swig_module_info swig_module = {swig_types, 34, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[30] +#define SWIGTYPE_p_unsigned_char swig_types[31] +#define SWIGTYPE_p_unsigned_int swig_types[32] +#define SWIGTYPE_p_unsigned_long swig_types[33] +#define SWIGTYPE_p_wchar_t swig_types[34] +static swig_type_info *swig_types[36]; +static swig_module_info swig_module = {swig_types, 35, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1995,34 +1996,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2111,6 +2104,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} VALUE taglib_id3v2_frame_to_ruby_object(const TagLib::ID3v2::Frame *frame) { @@ -2162,6 +2162,26 @@ VALUE taglib_id3v2_framelist_to_ruby_array(TagLib::ID3v2::FrameList *list) { } +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + + #define SWIG_From_long LONG2NUM + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { @@ -2212,19 +2232,6 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - - #define SWIG_From_long LONG2NUM - - SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_long (unsigned long value) { @@ -2345,31 +2352,41 @@ SWIG_AsVal_int (VALUE obj, int *val) } +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); + return obj; +} +/*@SWIG@*/ + SWIGINTERN int -SWIG_AsVal_bool (VALUE obj, bool *val) +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) { - if (obj == Qtrue) { - if (val) *val = true; - return SWIG_OK; - } else if (obj == Qfalse) { - if (val) *val = false; - return SWIG_OK; - } else { - int res = 0; - if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { - if (val) *val = res ? true : false; + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; return SWIG_OK; } - } + } return SWIG_TypeError; } - - -SWIGINTERNINLINE VALUE -SWIG_From_int (int value) -{ - return SWIG_From_long (value); -} +#endif SWIGINTERNINLINE VALUE @@ -2519,6 +2536,26 @@ SWIG_From_unsigned_SS_char (unsigned char value) return SWIG_From_unsigned_SS_long (value); } + +SWIGINTERN int +SWIG_AsVal_bool (VALUE obj, bool *val) +{ + if (obj == Qtrue) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Qfalse) { + if (val) *val = false; + return SWIG_OK; + } else { + int res = 0; + if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { + if (val) *val = res ? true : false; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + static swig_class SwigClassHeader; SWIGINTERN VALUE @@ -3104,6 +3141,32 @@ _wrap_Frame_to_string(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_Frame_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::Frame *arg1 = (TagLib::ID3v2::Frame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::Frame const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::Frame * >(argp1); + result = ((TagLib::ID3v2::Frame const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_Frame_render(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::Frame *arg1 = (TagLib::ID3v2::Frame *) 0 ; @@ -3130,6 +3193,30 @@ _wrap_Frame_render(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_Frame_header(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::Frame *arg1 = (TagLib::ID3v2::Frame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::ID3v2::Frame::Header *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::Frame const *","header", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::Frame * >(argp1); + result = (TagLib::ID3v2::Frame::Header *)((TagLib::ID3v2::Frame const *)arg1)->header(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Frame__Header, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_Frame_text_delimiter(int argc, VALUE *argv, VALUE self) { TagLib::String::Type arg1 ; @@ -3156,6 +3243,54 @@ _wrap_Frame_text_delimiter(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_Frame_key_to_frame_id(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + TagLib::ByteVector result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; + } + result = TagLib::ID3v2::Frame::keyToFrameID((TagLib::String const &)*arg1); + { + vresult = taglib_bytevector_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Frame_frame_idto_key(int argc, VALUE *argv, VALUE self) { + TagLib::ByteVector *arg1 = 0 ; + TagLib::ByteVector tmp1 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_bytevector(argv[0]); + arg1 = &tmp1; + } + result = TagLib::ID3v2::Frame::frameIDToKey((TagLib::ByteVector const &)*arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + static swig_class SwigClassTag; SWIGINTERN VALUE @@ -3177,11 +3312,11 @@ _wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; TagLib::ID3v2::FrameFactory *arg3 = (TagLib::ID3v2::FrameFactory *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; @@ -3195,11 +3330,11 @@ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[1], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Tag", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Tag", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","Tag", 3, argv[2] )); @@ -3232,10 +3367,10 @@ _wrap_Tag_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE _wrap_new_Tag__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::File *arg1 = (TagLib::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; TagLib::ID3v2::Tag *result = 0 ; @@ -3247,11 +3382,11 @@ _wrap_new_Tag__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); } arg1 = reinterpret_cast< TagLib::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[1], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Tag", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Tag", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); result = (TagLib::ID3v2::Tag *)new TagLib::ID3v2::Tag(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); @@ -3281,7 +3416,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3296,7 +3431,7 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -3313,8 +3448,8 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 3, "Tag.new", " Tag.new()\n" - " Tag.new(TagLib::File *file, long tagOffset, TagLib::ID3v2::FrameFactory const *factory)\n" - " Tag.new(TagLib::File *file, long tagOffset)\n"); + " Tag.new(TagLib::File *file, TagLib::offset_t tagOffset, TagLib::ID3v2::FrameFactory const *factory)\n" + " Tag.new(TagLib::File *file, TagLib::offset_t tagOffset)\n"); return Qnil; } @@ -3770,30 +3905,6 @@ _wrap_Tag_extended_header(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE -_wrap_Tag_footer(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::Tag *arg1 = (TagLib::ID3v2::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::ID3v2::Footer *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::Tag const *","footer", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::Tag * >(argp1); - result = (TagLib::ID3v2::Footer *)((TagLib::ID3v2::Tag const *)arg1)->footer(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Footer, 0 | 0 ); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Tag_frame_list_map(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::Tag *arg1 = (TagLib::ID3v2::Tag *) 0 ; @@ -4023,15 +4134,15 @@ _wrap_FrameFactory_instance(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_FrameFactory_create_frame__SWIG_0(int argc, VALUE *argv, VALUE self) { +_wrap_FrameFactory_create_frame(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; TagLib::ByteVector *arg2 = 0 ; - bool arg3 ; + TagLib::ID3v2::Header *arg3 = (TagLib::ID3v2::Header *) 0 ; void *argp1 = 0 ; int res1 = 0 ; TagLib::ByteVector tmp2 ; - bool val3 ; - int ecode3 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; TagLib::ID3v2::Frame *result = 0 ; VALUE vresult = Qnil; @@ -4047,12 +4158,12 @@ _wrap_FrameFactory_create_frame__SWIG_0(int argc, VALUE *argv, VALUE self) { tmp2 = ruby_string_to_taglib_bytevector(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_bool(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","createFrame", 3, argv[1] )); - } - arg3 = static_cast< bool >(val3); - result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrame((TagLib::ByteVector const &)*arg2,arg3); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_TagLib__ID3v2__Header, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::ID3v2::Header const *","createFrame", 3, argv[1] )); + } + arg3 = reinterpret_cast< TagLib::ID3v2::Header * >(argp3); + result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrame((TagLib::ByteVector const &)*arg2,(TagLib::ID3v2::Header const *)arg3); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); return vresult; fail: @@ -4061,15 +4172,14 @@ _wrap_FrameFactory_create_frame__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_FrameFactory_create_frame__SWIG_1(int argc, VALUE *argv, VALUE self) { +_wrap_FrameFactory_create_frame_for_property(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; - TagLib::ByteVector *arg2 = 0 ; - unsigned int arg3 ; + TagLib::String *arg2 = 0 ; + TagLib::StringList *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ByteVector tmp2 ; - unsigned int val3 ; - int ecode3 = 0 ; + TagLib::String tmp2 ; + TagLib::StringList tmp3 ; TagLib::ID3v2::Frame *result = 0 ; VALUE vresult = Qnil; @@ -4078,19 +4188,18 @@ _wrap_FrameFactory_create_frame__SWIG_1(int argc, VALUE *argv, VALUE self) { } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","createFrame", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","createFrameForProperty", 1, self )); } arg1 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp1); { - tmp2 = ruby_string_to_taglib_bytevector(argv[0]); + tmp2 = ruby_string_to_taglib_string(argv[0]); arg2 = &tmp2; } - ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","createFrame", 3, argv[1] )); - } - arg3 = static_cast< unsigned int >(val3); - result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrame((TagLib::ByteVector const &)*arg2,arg3); + { + tmp3 = ruby_array_to_taglib_string_list(argv[1]); + arg3 = &tmp3; + } + result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrameForProperty((TagLib::String const &)*arg2,(TagLib::StringList const &)*arg3); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); return vresult; fail: @@ -4099,29 +4208,23 @@ _wrap_FrameFactory_create_frame__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_FrameFactory_create_frame__SWIG_2(int argc, VALUE *argv, VALUE self) { +_wrap_FrameFactory_default_text_encoding(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; - TagLib::ByteVector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ByteVector tmp2 ; - TagLib::ID3v2::Frame *result = 0 ; + TagLib::String::Type result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","createFrame", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","defaultTextEncoding", 1, self )); } arg1 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp1); - { - tmp2 = ruby_string_to_taglib_bytevector(argv[0]); - arg2 = &tmp2; - } - result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrame((TagLib::ByteVector const &)*arg2); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); + result = (TagLib::String::Type)((TagLib::ID3v2::FrameFactory const *)arg1)->defaultTextEncoding(); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; @@ -4129,141 +4232,40 @@ _wrap_FrameFactory_create_frame__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_FrameFactory_create_frame__SWIG_3(int argc, VALUE *argv, VALUE self) { +_wrap_FrameFactory_default_text_encodinge___(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; - TagLib::ByteVector *arg2 = 0 ; - TagLib::ID3v2::Header *arg3 = (TagLib::ID3v2::Header *) 0 ; + TagLib::String::Type arg2 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ByteVector tmp2 ; - void *argp3 = 0 ; - int res3 = 0 ; - TagLib::ID3v2::Frame *result = 0 ; - VALUE vresult = Qnil; + int val2 ; + int ecode2 = 0 ; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","createFrame", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","setDefaultTextEncoding", 1, self )); } arg1 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp1); - { - tmp2 = ruby_string_to_taglib_bytevector(argv[0]); - arg2 = &tmp2; - } - res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_TagLib__ID3v2__Header, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::ID3v2::Header *","createFrame", 3, argv[1] )); - } - arg3 = reinterpret_cast< TagLib::ID3v2::Header * >(argp3); - result = (TagLib::ID3v2::Frame *)((TagLib::ID3v2::FrameFactory const *)arg1)->createFrame((TagLib::ByteVector const &)*arg2,arg3); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Frame, 0 | 0 ); - return vresult; -fail: + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::String::Type","setDefaultTextEncoding", 2, argv[0] )); + } + arg2 = static_cast< TagLib::String::Type >(val2); + (arg1)->setDefaultTextEncoding(arg2); return Qnil; -} - - -SWIGINTERN VALUE _wrap_FrameFactory_create_frame(int nargs, VALUE *args, VALUE self) { - int argc; - VALUE argv[4]; - int ii; - - argc = nargs + 1; - argv[0] = self; - if (argc > 4) SWIG_fail; - for (ii = 1; (ii < argc); ++ii) { - argv[ii] = args[ii-1]; - } - if (argc == 2) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FrameFactory_create_frame__SWIG_2(nargs, args, self); - } - } - } - if (argc == 3) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TagLib__ID3v2__Header, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FrameFactory_create_frame__SWIG_3(nargs, args, self); - } - } - } - } - if (argc == 3) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FrameFactory_create_frame__SWIG_1(nargs, args, self); - } - } - } - } - if (argc == 3) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FrameFactory_create_frame__SWIG_0(nargs, args, self); - } - } - } - } - fail: - Ruby_Format_OverloadedError( argc, 4, "FrameFactory.create_frame", - " TagLib::ID3v2::Frame FrameFactory.create_frame(TagLib::ByteVector const &data, bool synchSafeInts)\n" - " TagLib::ID3v2::Frame FrameFactory.create_frame(TagLib::ByteVector const &data, unsigned int version)\n" - " TagLib::ID3v2::Frame FrameFactory.create_frame(TagLib::ByteVector const &data)\n" - " TagLib::ID3v2::Frame * FrameFactory.create_frame(TagLib::ByteVector const &data, TagLib::ID3v2::Header *tagHeader)\n"); - return Qnil; } SWIGINTERN VALUE -_wrap_FrameFactory_default_text_encoding(int argc, VALUE *argv, VALUE self) { +_wrap_FrameFactory_is_using_default_text_encoding(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String::Type result; + bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4271,46 +4273,17 @@ _wrap_FrameFactory_default_text_encoding(int argc, VALUE *argv, VALUE self) { } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","defaultTextEncoding", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","isUsingDefaultTextEncoding", 1, self )); } arg1 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp1); - result = (TagLib::String::Type)((TagLib::ID3v2::FrameFactory const *)arg1)->defaultTextEncoding(); - vresult = SWIG_From_int(static_cast< int >(result)); + result = (bool)((TagLib::ID3v2::FrameFactory const *)arg1)->isUsingDefaultTextEncoding(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } -SWIGINTERN VALUE -_wrap_FrameFactory_default_text_encodinge___(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::FrameFactory *arg1 = (TagLib::ID3v2::FrameFactory *) 0 ; - TagLib::String::Type arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","setDefaultTextEncoding", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp1); - ecode2 = SWIG_AsVal_int(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::String::Type","setDefaultTextEncoding", 2, argv[0] )); - } - arg2 = static_cast< TagLib::String::Type >(val2); - (arg1)->setDefaultTextEncoding(arg2); - return Qnil; -fail: - return Qnil; -} - - static swig_class SwigClassRelativeVolumeFrame; SWIGINTERN VALUE @@ -4462,59 +4435,6 @@ _wrap_RelativeVolumeFrame_channels(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE -_wrap_RelativeVolumeFrame_channel_type(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame *arg1 = (TagLib::ID3v2::RelativeVolumeFrame *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::ID3v2::RelativeVolumeFrame::ChannelType result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame const *","channelType", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame * >(argp1); - result = (TagLib::ID3v2::RelativeVolumeFrame::ChannelType)((TagLib::ID3v2::RelativeVolumeFrame const *)arg1)->channelType(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_RelativeVolumeFrame_channel_typee___(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame *arg1 = (TagLib::ID3v2::RelativeVolumeFrame *) 0 ; - TagLib::ID3v2::RelativeVolumeFrame::ChannelType arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame *","setChannelType", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame * >(argp1); - ecode2 = SWIG_AsVal_int(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::ChannelType","setChannelType", 2, argv[0] )); - } - arg2 = static_cast< TagLib::ID3v2::RelativeVolumeFrame::ChannelType >(val2); - (arg1)->setChannelType(arg2); - return Qnil; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_RelativeVolumeFrame_volume_adjustment_index__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::RelativeVolumeFrame *arg1 = (TagLib::ID3v2::RelativeVolumeFrame *) 0 ; @@ -5246,6 +5166,112 @@ _wrap_RelativeVolumeFrame_identificatione___(int argc, VALUE *argv, VALUE self) static swig_class SwigClassPeakVolume; +SWIGINTERN VALUE +_wrap_PeakVolume_bits_representing_peak_set(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; + unsigned char arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned char val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","bitsRepresentingPeak", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned char","bitsRepresentingPeak", 2, argv[0] )); + } + arg2 = static_cast< unsigned char >(val2); + if (arg1) (arg1)->bitsRepresentingPeak = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_PeakVolume_bits_representing_peak_get(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned char result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","bitsRepresentingPeak", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); + result = (unsigned char) ((arg1)->bitsRepresentingPeak); + vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_PeakVolume_peak_volume_set(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; + TagLib::ByteVector *arg2 = (TagLib::ByteVector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::ByteVector tmp2 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","peakVolume", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); + { + tmp2 = ruby_string_to_taglib_bytevector(argv[0]); + arg2 = &tmp2; + } + if (arg1) (arg1)->peakVolume = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_PeakVolume_peak_volume_get(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::ByteVector *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","peakVolume", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); + result = (TagLib::ByteVector *)& ((arg1)->peakVolume); + { + vresult = taglib_bytevector_to_ruby_string(*(result)); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE #ifdef HAVE_RB_DEFINE_ALLOC_FUNC _wrap_PeakVolume_allocate(VALUE self) @@ -5277,121 +5303,111 @@ _wrap_new_PeakVolume(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN void +free_TagLib_ID3v2_RelativeVolumeFrame_PeakVolume(void *self) { + TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + SWIGINTERN VALUE -_wrap_PeakVolume_bits_representing_peak_set(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; - unsigned char arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; +_wrap_picture_type_to_string(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + TagLib::String result; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","bitsRepresentingPeak", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned char","bitsRepresentingPeak", 2, argv[0] )); + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib::Utils::pictureTypeToString", 1, argv[0] )); } - arg2 = static_cast< unsigned char >(val2); - if (arg1) (arg1)->bitsRepresentingPeak = arg2; - return Qnil; + arg1 = static_cast< int >(val1); + result = TagLib::Utils::pictureTypeToString(arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_PeakVolume_bits_representing_peak_get(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char result; +_wrap_picture_type_from_string(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + int result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","bitsRepresentingPeak", 1, self )); + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); - result = (unsigned char) ((arg1)->bitsRepresentingPeak); - vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); + result = (int)TagLib::Utils::pictureTypeFromString((TagLib::String const &)*arg1); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } +static swig_class SwigClassAttachedPictureFrame; + SWIGINTERN VALUE -_wrap_PeakVolume_peak_volume_set(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; - TagLib::ByteVector *arg2 = (TagLib::ByteVector *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::ByteVector tmp2 ; +_wrap_AttachedPictureFrame_type_to_string(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::AttachedPictureFrame::Type arg1 ; + int val1 ; + int ecode1 = 0 ; + TagLib::String result; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","peakVolume", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::ID3v2::AttachedPictureFrame::Type","TagLib::ID3v2::AttachedPictureFrame::typeToString", 1, argv[0] )); + } + arg1 = static_cast< TagLib::ID3v2::AttachedPictureFrame::Type >(val1); + result = TagLib::ID3v2::AttachedPictureFrame::typeToString(arg1); { - tmp2 = ruby_string_to_taglib_bytevector(argv[0]); - arg2 = &tmp2; + vresult = taglib_string_to_ruby_string(result); } - if (arg1) (arg1)->peakVolume = *arg2; - return Qnil; + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_PeakVolume_peak_volume_get(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::ByteVector *result = 0 ; +_wrap_AttachedPictureFrame_type_from_string(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + TagLib::ID3v2::AttachedPictureFrame::Type result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__RelativeVolumeFrame__PeakVolume, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *","peakVolume", 1, self )); + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - arg1 = reinterpret_cast< TagLib::ID3v2::RelativeVolumeFrame::PeakVolume * >(argp1); - result = (TagLib::ByteVector *)& ((arg1)->peakVolume); { - vresult = taglib_bytevector_to_ruby_string(*(result)); + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; } + result = (TagLib::ID3v2::AttachedPictureFrame::Type)TagLib::ID3v2::AttachedPictureFrame::typeFromString((TagLib::String const &)*arg1); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } -SWIGINTERN void -free_TagLib_ID3v2_RelativeVolumeFrame_PeakVolume(void *self) { - TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *arg1 = (TagLib::ID3v2::RelativeVolumeFrame::PeakVolume *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - -static swig_class SwigClassAttachedPictureFrame; - SWIGINTERN VALUE _wrap_new_AttachedPictureFrame__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::AttachedPictureFrame *result = 0 ; @@ -5509,6 +5525,32 @@ _wrap_AttachedPictureFrame_to_string(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_AttachedPictureFrame_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::AttachedPictureFrame *arg1 = (TagLib::ID3v2::AttachedPictureFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__AttachedPictureFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::AttachedPictureFrame const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::AttachedPictureFrame * >(argp1); + result = ((TagLib::ID3v2::AttachedPictureFrame const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_AttachedPictureFrame_text_encoding(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::AttachedPictureFrame *arg1 = (TagLib::ID3v2::AttachedPictureFrame *) 0 ; @@ -7205,6 +7247,32 @@ _wrap_GeneralEncapsulatedObjectFrame_to_string(int argc, VALUE *argv, VALUE self } +SWIGINTERN VALUE +_wrap_GeneralEncapsulatedObjectFrame_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::GeneralEncapsulatedObjectFrame *arg1 = (TagLib::ID3v2::GeneralEncapsulatedObjectFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::GeneralEncapsulatedObjectFrame const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::GeneralEncapsulatedObjectFrame * >(argp1); + result = ((TagLib::ID3v2::GeneralEncapsulatedObjectFrame const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_GeneralEncapsulatedObjectFrame_text_encoding(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::GeneralEncapsulatedObjectFrame *arg1 = (TagLib::ID3v2::GeneralEncapsulatedObjectFrame *) 0 ; @@ -7589,6 +7657,32 @@ _wrap_PopularimeterFrame_to_string(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_PopularimeterFrame_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::PopularimeterFrame *arg1 = (TagLib::ID3v2::PopularimeterFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__PopularimeterFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::PopularimeterFrame const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::PopularimeterFrame * >(argp1); + result = ((TagLib::ID3v2::PopularimeterFrame const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_PopularimeterFrame_email(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::PopularimeterFrame *arg1 = (TagLib::ID3v2::PopularimeterFrame *) 0 ; @@ -9037,6 +9131,32 @@ _wrap_TextIdentificationFrame_to_string(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_TextIdentificationFrame_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::ID3v2::TextIdentificationFrame *arg1 = (TagLib::ID3v2::TextIdentificationFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__TextIdentificationFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::TextIdentificationFrame const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::ID3v2::TextIdentificationFrame * >(argp1); + result = ((TagLib::ID3v2::TextIdentificationFrame const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_TextIdentificationFrame_text_encoding(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::TextIdentificationFrame *arg1 = (TagLib::ID3v2::TextIdentificationFrame *) 0 ; @@ -9335,6 +9455,13 @@ SWIGINTERN VALUE _wrap_new_UserTextIdentificationFrame(int nargs, VALUE *args, V } +SWIGINTERN void +free_TagLib_ID3v2_UserTextIdentificationFrame(void *self) { + TagLib::ID3v2::UserTextIdentificationFrame *arg1 = (TagLib::ID3v2::UserTextIdentificationFrame *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + SWIGINTERN VALUE _wrap_UserTextIdentificationFrame_to_string(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::UserTextIdentificationFrame *arg1 = (TagLib::ID3v2::UserTextIdentificationFrame *) 0 ; @@ -9414,32 +9541,6 @@ _wrap_UserTextIdentificationFrame_descriptione___(int argc, VALUE *argv, VALUE s } -SWIGINTERN VALUE -_wrap_UserTextIdentificationFrame_field_list(int argc, VALUE *argv, VALUE self) { - TagLib::ID3v2::UserTextIdentificationFrame *arg1 = (TagLib::ID3v2::UserTextIdentificationFrame *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::StringList result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__ID3v2__UserTextIdentificationFrame, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::UserTextIdentificationFrame const *","fieldList", 1, self )); - } - arg1 = reinterpret_cast< TagLib::ID3v2::UserTextIdentificationFrame * >(argp1); - result = ((TagLib::ID3v2::UserTextIdentificationFrame const *)arg1)->fieldList(); - { - vresult = taglib_string_list_to_ruby_array(result); - } - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_UserTextIdentificationFrame_texte___(int argc, VALUE *argv, VALUE self) { TagLib::ID3v2::UserTextIdentificationFrame *arg1 = (TagLib::ID3v2::UserTextIdentificationFrame *) 0 ; @@ -9517,14 +9618,14 @@ _wrap_UserTextIdentificationFrame_find(int argc, VALUE *argv, VALUE self) { } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__ID3v2__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::Tag *","TagLib::ID3v2::UserTextIdentificationFrame::find", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::ID3v2::Tag const *","TagLib::ID3v2::UserTextIdentificationFrame::find", 1, argv[0] )); } arg1 = reinterpret_cast< TagLib::ID3v2::Tag * >(argp1); { tmp2 = ruby_string_to_taglib_string(argv[1]); arg2 = &tmp2; } - result = (TagLib::ID3v2::UserTextIdentificationFrame *)TagLib::ID3v2::UserTextIdentificationFrame::find(arg1,(TagLib::String const &)*arg2); + result = (TagLib::ID3v2::UserTextIdentificationFrame *)TagLib::ID3v2::UserTextIdentificationFrame::find((TagLib::ID3v2::Tag const *)arg1,(TagLib::String const &)*arg2); vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__UserTextIdentificationFrame, 0 | 0 ); return vresult; fail: @@ -9532,13 +9633,54 @@ _wrap_UserTextIdentificationFrame_find(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN void -free_TagLib_ID3v2_UserTextIdentificationFrame(void *self) { - TagLib::ID3v2::UserTextIdentificationFrame *arg1 = (TagLib::ID3v2::UserTextIdentificationFrame *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; +SWIGINTERN VALUE +_wrap_UserTextIdentificationFrame_key_to_txxx(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; + } + result = TagLib::ID3v2::UserTextIdentificationFrame::keyToTXXX((TagLib::String const &)*arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_UserTextIdentificationFrame_txxx_to_key(int argc, VALUE *argv, VALUE self) { + TagLib::String *arg1 = 0 ; + TagLib::String tmp1 ; + TagLib::String result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + tmp1 = ruby_string_to_taglib_string(argv[0]); + arg1 = &tmp1; + } + result = TagLib::ID3v2::UserTextIdentificationFrame::txxxToKey((TagLib::String const &)*arg1); + { + vresult = taglib_string_to_ruby_string(result); + } + return vresult; +fail: + return Qnil; } + static swig_class SwigClassUniqueFileIdentifierFrame; SWIGINTERN VALUE @@ -10733,9 +10875,9 @@ static swig_type_info _swigt__p_TagLib__ID3v2__AttachedPictureFrameV22 = {"_p_Ta static swig_type_info _swigt__p_TagLib__ID3v2__ChapterFrame = {"_p_TagLib__ID3v2__ChapterFrame", "TagLib::ID3v2::ChapterFrame *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__CommentsFrame = {"_p_TagLib__ID3v2__CommentsFrame", "TagLib::ID3v2::CommentsFrame *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__ExtendedHeader = {"_p_TagLib__ID3v2__ExtendedHeader", "TagLib::ID3v2::ExtendedHeader *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TagLib__ID3v2__Footer = {"_p_TagLib__ID3v2__Footer", "TagLib::ID3v2::Footer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__Frame = {"_p_TagLib__ID3v2__Frame", "TagLib::ID3v2::Frame *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__FrameFactory = {"_p_TagLib__ID3v2__FrameFactory", "TagLib::ID3v2::FrameFactory *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__ID3v2__Frame__Header = {"_p_TagLib__ID3v2__Frame__Header", "TagLib::ID3v2::Frame::Header *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame = {"_p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame", "TagLib::ID3v2::GeneralEncapsulatedObjectFrame *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__Header = {"_p_TagLib__ID3v2__Header", "TagLib::ID3v2::Header *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__PopularimeterFrame = {"_p_TagLib__ID3v2__PopularimeterFrame", "TagLib::ID3v2::PopularimeterFrame *", 0, 0, (void*)0, 0}; @@ -10754,6 +10896,7 @@ static swig_type_info _swigt__p_TagLib__ID3v2__UserUrlLinkFrame = {"_p_TagLib__I static swig_type_info _swigt__p_TagLib__ListT_TagLib__ID3v2__Frame_p_t = {"_p_TagLib__ListT_TagLib__ID3v2__Frame_p_t", "TagLib::ID3v2::FrameList *|TagLib::List< TagLib::ID3v2::Frame * > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -10769,9 +10912,9 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__ID3v2__ChapterFrame, &_swigt__p_TagLib__ID3v2__CommentsFrame, &_swigt__p_TagLib__ID3v2__ExtendedHeader, - &_swigt__p_TagLib__ID3v2__Footer, &_swigt__p_TagLib__ID3v2__Frame, &_swigt__p_TagLib__ID3v2__FrameFactory, + &_swigt__p_TagLib__ID3v2__Frame__Header, &_swigt__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame, &_swigt__p_TagLib__ID3v2__Header, &_swigt__p_TagLib__ID3v2__PopularimeterFrame, @@ -10790,6 +10933,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__ListT_TagLib__ID3v2__Frame_p_t, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -10805,9 +10949,9 @@ static swig_cast_info _swigc__p_TagLib__ID3v2__AttachedPictureFrameV22[] = { {& static swig_cast_info _swigc__p_TagLib__ID3v2__ChapterFrame[] = { {&_swigt__p_TagLib__ID3v2__ChapterFrame, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__CommentsFrame[] = { {&_swigt__p_TagLib__ID3v2__CommentsFrame, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__ExtendedHeader[] = { {&_swigt__p_TagLib__ID3v2__ExtendedHeader, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_TagLib__ID3v2__Footer[] = { {&_swigt__p_TagLib__ID3v2__Footer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__Frame[] = { {&_swigt__p_TagLib__ID3v2__Frame, 0, 0, 0}, {&_swigt__p_TagLib__ID3v2__AttachedPictureFrame, _p_TagLib__ID3v2__AttachedPictureFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__AttachedPictureFrameV22, _p_TagLib__ID3v2__AttachedPictureFrameV22To_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__ChapterFrame, _p_TagLib__ID3v2__ChapterFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__CommentsFrame, _p_TagLib__ID3v2__CommentsFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame, _p_TagLib__ID3v2__GeneralEncapsulatedObjectFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__PopularimeterFrame, _p_TagLib__ID3v2__PopularimeterFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__PrivateFrame, _p_TagLib__ID3v2__PrivateFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__RelativeVolumeFrame, _p_TagLib__ID3v2__RelativeVolumeFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__TableOfContentsFrame, _p_TagLib__ID3v2__TableOfContentsFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__TextIdentificationFrame, _p_TagLib__ID3v2__TextIdentificationFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UniqueFileIdentifierFrame, _p_TagLib__ID3v2__UniqueFileIdentifierFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UnknownFrame, _p_TagLib__ID3v2__UnknownFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UnsynchronizedLyricsFrame, _p_TagLib__ID3v2__UnsynchronizedLyricsFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UrlLinkFrame, _p_TagLib__ID3v2__UrlLinkFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UserTextIdentificationFrame, _p_TagLib__ID3v2__UserTextIdentificationFrameTo_p_TagLib__ID3v2__Frame, 0, 0}, {&_swigt__p_TagLib__ID3v2__UserUrlLinkFrame, _p_TagLib__ID3v2__UserUrlLinkFrameTo_p_TagLib__ID3v2__Frame, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__ID3v2__Frame__Header[] = { {&_swigt__p_TagLib__ID3v2__Frame__Header, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame[] = { {&_swigt__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__Header[] = { {&_swigt__p_TagLib__ID3v2__Header, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__PopularimeterFrame[] = { {&_swigt__p_TagLib__ID3v2__PopularimeterFrame, 0, 0, 0},{0, 0, 0, 0}}; @@ -10826,6 +10970,7 @@ static swig_cast_info _swigc__p_TagLib__ID3v2__UserUrlLinkFrame[] = { {&_swigt_ static swig_cast_info _swigc__p_TagLib__ListT_TagLib__ID3v2__Frame_p_t[] = { {&_swigt__p_TagLib__ListT_TagLib__ID3v2__Frame_p_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__ID3v2__Tag, _p_TagLib__ID3v2__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -10841,9 +10986,9 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__ID3v2__ChapterFrame, _swigc__p_TagLib__ID3v2__CommentsFrame, _swigc__p_TagLib__ID3v2__ExtendedHeader, - _swigc__p_TagLib__ID3v2__Footer, _swigc__p_TagLib__ID3v2__Frame, _swigc__p_TagLib__ID3v2__FrameFactory, + _swigc__p_TagLib__ID3v2__Frame__Header, _swigc__p_TagLib__ID3v2__GeneralEncapsulatedObjectFrame, _swigc__p_TagLib__ID3v2__Header, _swigc__p_TagLib__ID3v2__PopularimeterFrame, @@ -10862,6 +11007,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__ListT_TagLib__ID3v2__Frame_p_t, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -11125,6 +11271,8 @@ SWIGEXPORT void Init_taglib_id3v2(void) { SWIG_RubyInitializeTrackings(); rb_require("taglib_base"); + rb_define_const(mID3v2, "V3", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v3))); + rb_define_const(mID3v2, "V4", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v4))); SwigClassHeader.klass = rb_define_class_under(mID3v2, "Header", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_TagLib__ID3v2__Header, (void *) &SwigClassHeader); @@ -11156,8 +11304,12 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_method(SwigClassFrame.klass, "data=", VALUEFUNC(_wrap_Frame_datae___), -1); rb_define_method(SwigClassFrame.klass, "text=", VALUEFUNC(_wrap_Frame_texte___), -1); rb_define_method(SwigClassFrame.klass, "to_string", VALUEFUNC(_wrap_Frame_to_string), -1); + rb_define_method(SwigClassFrame.klass, "to_string_list", VALUEFUNC(_wrap_Frame_to_string_list), -1); rb_define_method(SwigClassFrame.klass, "render", VALUEFUNC(_wrap_Frame_render), -1); + rb_define_method(SwigClassFrame.klass, "header", VALUEFUNC(_wrap_Frame_header), -1); rb_define_singleton_method(SwigClassFrame.klass, "text_delimiter", VALUEFUNC(_wrap_Frame_text_delimiter), -1); + rb_define_singleton_method(SwigClassFrame.klass, "key_to_frame_id", VALUEFUNC(_wrap_Frame_key_to_frame_id), -1); + rb_define_singleton_method(SwigClassFrame.klass, "frame_idto_key", VALUEFUNC(_wrap_Frame_frame_idto_key), -1); SwigClassFrame.mark = 0; SwigClassFrame.destroy = (void (*)(void *)) free_TagLib_ID3v2_Frame; SwigClassFrame.trackObjects = 1; @@ -11183,7 +11335,6 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_method(SwigClassTag.klass, "empty?", VALUEFUNC(_wrap_Tag_emptyq___), -1); rb_define_method(SwigClassTag.klass, "header", VALUEFUNC(_wrap_Tag_header), -1); rb_define_method(SwigClassTag.klass, "extended_header", VALUEFUNC(_wrap_Tag_extended_header), -1); - rb_define_method(SwigClassTag.klass, "footer", VALUEFUNC(_wrap_Tag_footer), -1); rb_define_method(SwigClassTag.klass, "frame_list_map", VALUEFUNC(_wrap_Tag_frame_list_map), -1); rb_define_method(SwigClassTag.klass, "frame_list", VALUEFUNC(_wrap_Tag_frame_list), -1); rb_define_method(SwigClassTag.klass, "add_frame", VALUEFUNC(_wrap_Tag_add_frame), -1); @@ -11198,8 +11349,10 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_undef_alloc_func(SwigClassFrameFactory.klass); rb_define_singleton_method(SwigClassFrameFactory.klass, "instance", VALUEFUNC(_wrap_FrameFactory_instance), -1); rb_define_method(SwigClassFrameFactory.klass, "create_frame", VALUEFUNC(_wrap_FrameFactory_create_frame), -1); + rb_define_method(SwigClassFrameFactory.klass, "create_frame_for_property", VALUEFUNC(_wrap_FrameFactory_create_frame_for_property), -1); rb_define_method(SwigClassFrameFactory.klass, "default_text_encoding", VALUEFUNC(_wrap_FrameFactory_default_text_encoding), -1); rb_define_method(SwigClassFrameFactory.klass, "default_text_encoding=", VALUEFUNC(_wrap_FrameFactory_default_text_encodinge___), -1); + rb_define_method(SwigClassFrameFactory.klass, "is_using_default_text_encoding", VALUEFUNC(_wrap_FrameFactory_is_using_default_text_encoding), -1); SwigClassFrameFactory.mark = 0; SwigClassFrameFactory.trackObjects = 1; @@ -11218,8 +11371,6 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_const(SwigClassRelativeVolumeFrame.klass, "Subwoofer", SWIG_From_int(static_cast< int >(TagLib::ID3v2::RelativeVolumeFrame::Subwoofer))); rb_define_method(SwigClassRelativeVolumeFrame.klass, "to_string", VALUEFUNC(_wrap_RelativeVolumeFrame_to_string), -1); rb_define_method(SwigClassRelativeVolumeFrame.klass, "channels", VALUEFUNC(_wrap_RelativeVolumeFrame_channels), -1); - rb_define_method(SwigClassRelativeVolumeFrame.klass, "channel_type", VALUEFUNC(_wrap_RelativeVolumeFrame_channel_type), -1); - rb_define_method(SwigClassRelativeVolumeFrame.klass, "channel_type=", VALUEFUNC(_wrap_RelativeVolumeFrame_channel_typee___), -1); rb_define_method(SwigClassRelativeVolumeFrame.klass, "volume_adjustment_index", VALUEFUNC(_wrap_RelativeVolumeFrame_volume_adjustment_index), -1); rb_define_method(SwigClassRelativeVolumeFrame.klass, "set_volume_adjustment_index", VALUEFUNC(_wrap_RelativeVolumeFrame_set_volume_adjustment_index), -1); rb_define_method(SwigClassRelativeVolumeFrame.klass, "volume_adjustment", VALUEFUNC(_wrap_RelativeVolumeFrame_volume_adjustment), -1); @@ -11243,6 +11394,8 @@ SWIGEXPORT void Init_taglib_id3v2(void) { SwigClassPeakVolume.mark = 0; SwigClassPeakVolume.destroy = (void (*)(void *)) free_TagLib_ID3v2_RelativeVolumeFrame_PeakVolume; SwigClassPeakVolume.trackObjects = 1; + rb_define_module_function(mID3v2, "picture_type_to_string", VALUEFUNC(_wrap_picture_type_to_string), -1); + rb_define_module_function(mID3v2, "picture_type_from_string", VALUEFUNC(_wrap_picture_type_from_string), -1); SwigClassAttachedPictureFrame.klass = rb_define_class_under(mID3v2, "AttachedPictureFrame", ((swig_class *) SWIGTYPE_p_TagLib__ID3v2__Frame->clientdata)->klass); SWIG_TypeClientData(SWIGTYPE_p_TagLib__ID3v2__AttachedPictureFrame, (void *) &SwigClassAttachedPictureFrame); @@ -11269,7 +11422,10 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_const(SwigClassAttachedPictureFrame.klass, "Illustration", SWIG_From_int(static_cast< int >(TagLib::ID3v2::AttachedPictureFrame::Illustration))); rb_define_const(SwigClassAttachedPictureFrame.klass, "BandLogo", SWIG_From_int(static_cast< int >(TagLib::ID3v2::AttachedPictureFrame::BandLogo))); rb_define_const(SwigClassAttachedPictureFrame.klass, "PublisherLogo", SWIG_From_int(static_cast< int >(TagLib::ID3v2::AttachedPictureFrame::PublisherLogo))); + rb_define_singleton_method(SwigClassAttachedPictureFrame.klass, "type_to_string", VALUEFUNC(_wrap_AttachedPictureFrame_type_to_string), -1); + rb_define_singleton_method(SwigClassAttachedPictureFrame.klass, "type_from_string", VALUEFUNC(_wrap_AttachedPictureFrame_type_from_string), -1); rb_define_method(SwigClassAttachedPictureFrame.klass, "to_string", VALUEFUNC(_wrap_AttachedPictureFrame_to_string), -1); + rb_define_method(SwigClassAttachedPictureFrame.klass, "to_string_list", VALUEFUNC(_wrap_AttachedPictureFrame_to_string_list), -1); rb_define_method(SwigClassAttachedPictureFrame.klass, "text_encoding", VALUEFUNC(_wrap_AttachedPictureFrame_text_encoding), -1); rb_define_method(SwigClassAttachedPictureFrame.klass, "text_encoding=", VALUEFUNC(_wrap_AttachedPictureFrame_text_encodinge___), -1); rb_define_method(SwigClassAttachedPictureFrame.klass, "mime_type", VALUEFUNC(_wrap_AttachedPictureFrame_mime_type), -1); @@ -11339,6 +11495,7 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_alloc_func(SwigClassGeneralEncapsulatedObjectFrame.klass, _wrap_GeneralEncapsulatedObjectFrame_allocate); rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "initialize", VALUEFUNC(_wrap_new_GeneralEncapsulatedObjectFrame), -1); rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "to_string", VALUEFUNC(_wrap_GeneralEncapsulatedObjectFrame_to_string), -1); + rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "to_string_list", VALUEFUNC(_wrap_GeneralEncapsulatedObjectFrame_to_string_list), -1); rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "text_encoding", VALUEFUNC(_wrap_GeneralEncapsulatedObjectFrame_text_encoding), -1); rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "text_encoding=", VALUEFUNC(_wrap_GeneralEncapsulatedObjectFrame_text_encodinge___), -1); rb_define_method(SwigClassGeneralEncapsulatedObjectFrame.klass, "mime_type", VALUEFUNC(_wrap_GeneralEncapsulatedObjectFrame_mime_type), -1); @@ -11358,6 +11515,7 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_alloc_func(SwigClassPopularimeterFrame.klass, _wrap_PopularimeterFrame_allocate); rb_define_method(SwigClassPopularimeterFrame.klass, "initialize", VALUEFUNC(_wrap_new_PopularimeterFrame), -1); rb_define_method(SwigClassPopularimeterFrame.klass, "to_string", VALUEFUNC(_wrap_PopularimeterFrame_to_string), -1); + rb_define_method(SwigClassPopularimeterFrame.klass, "to_string_list", VALUEFUNC(_wrap_PopularimeterFrame_to_string_list), -1); rb_define_method(SwigClassPopularimeterFrame.klass, "email", VALUEFUNC(_wrap_PopularimeterFrame_email), -1); rb_define_method(SwigClassPopularimeterFrame.klass, "email=", VALUEFUNC(_wrap_PopularimeterFrame_emaile___), -1); rb_define_method(SwigClassPopularimeterFrame.klass, "rating", VALUEFUNC(_wrap_PopularimeterFrame_rating), -1); @@ -11415,6 +11573,7 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_method(SwigClassTextIdentificationFrame.klass, "field_list=", VALUEFUNC(_wrap_TextIdentificationFrame_field_liste___), -1); rb_define_method(SwigClassTextIdentificationFrame.klass, "text=", VALUEFUNC(_wrap_TextIdentificationFrame_texte___), -1); rb_define_method(SwigClassTextIdentificationFrame.klass, "to_string", VALUEFUNC(_wrap_TextIdentificationFrame_to_string), -1); + rb_define_method(SwigClassTextIdentificationFrame.klass, "to_string_list", VALUEFUNC(_wrap_TextIdentificationFrame_to_string_list), -1); rb_define_method(SwigClassTextIdentificationFrame.klass, "text_encoding", VALUEFUNC(_wrap_TextIdentificationFrame_text_encoding), -1); rb_define_method(SwigClassTextIdentificationFrame.klass, "text_encoding=", VALUEFUNC(_wrap_TextIdentificationFrame_text_encodinge___), -1); rb_define_method(SwigClassTextIdentificationFrame.klass, "field_list", VALUEFUNC(_wrap_TextIdentificationFrame_field_list), -1); @@ -11429,10 +11588,11 @@ SWIGEXPORT void Init_taglib_id3v2(void) { rb_define_method(SwigClassUserTextIdentificationFrame.klass, "to_string", VALUEFUNC(_wrap_UserTextIdentificationFrame_to_string), -1); rb_define_method(SwigClassUserTextIdentificationFrame.klass, "description", VALUEFUNC(_wrap_UserTextIdentificationFrame_description), -1); rb_define_method(SwigClassUserTextIdentificationFrame.klass, "description=", VALUEFUNC(_wrap_UserTextIdentificationFrame_descriptione___), -1); - rb_define_method(SwigClassUserTextIdentificationFrame.klass, "field_list", VALUEFUNC(_wrap_UserTextIdentificationFrame_field_list), -1); rb_define_method(SwigClassUserTextIdentificationFrame.klass, "text=", VALUEFUNC(_wrap_UserTextIdentificationFrame_texte___), -1); rb_define_method(SwigClassUserTextIdentificationFrame.klass, "field_list=", VALUEFUNC(_wrap_UserTextIdentificationFrame_field_liste___), -1); rb_define_singleton_method(SwigClassUserTextIdentificationFrame.klass, "find", VALUEFUNC(_wrap_UserTextIdentificationFrame_find), -1); + rb_define_singleton_method(SwigClassUserTextIdentificationFrame.klass, "key_to_txxx", VALUEFUNC(_wrap_UserTextIdentificationFrame_key_to_txxx), -1); + rb_define_singleton_method(SwigClassUserTextIdentificationFrame.klass, "txxx_to_key", VALUEFUNC(_wrap_UserTextIdentificationFrame_txxx_to_key), -1); SwigClassUserTextIdentificationFrame.mark = 0; SwigClassUserTextIdentificationFrame.destroy = (void (*)(void *)) free_TagLib_ID3v2_UserTextIdentificationFrame; SwigClassUserTextIdentificationFrame.trackObjects = 1; diff --git a/ext/taglib_mp4/taglib_mp4.i b/ext/taglib_mp4/taglib_mp4.i index 00921774..046f9506 100644 --- a/ext/taglib_mp4/taglib_mp4.i +++ b/ext/taglib_mp4/taglib_mp4.i @@ -5,10 +5,6 @@ #include #include #include -#include -// To resolve some symbols, like AtomDataType in Item. -using namespace TagLib::MP4; -using namespace TagLib; %} %include "../taglib_base/includes.i" @@ -86,16 +82,6 @@ namespace TagLib { %ignore TagLib::Map::erase(Iterator); %ignore TagLib::Map::erase(const TagLib::String &); -%ignore TagLib::MP4::Tag::itemListMap; // Deprecated. - -%rename("__getitem__") TagLib::MP4::Tag::item; - -// We will create a safe version of these below in an %extend -// TagLib::MP4::Tag::item does not need to be reimplemented as it return an Item by value. -%ignore TagLib::MP4::Tag::setItem; -%ignore TagLib::MP4::Tag::removeItem; - -%include %typemap(out) TagLib::MP4::CoverArtList { $result = taglib_cover_art_list_to_ruby_array($1); @@ -119,13 +105,32 @@ namespace TagLib { %ignore TagLib::MP4::Item::setAtomDataType; %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) IntPair; +%ignore ItemMap; %include +namespace TagLib { + namespace MP4 { + %template(ItemMap) ::TagLib::Map; + } +} + +%ignore TagLib::MP4::Tag::itemListMap; // Deprecated. + +%rename("__getitem__") TagLib::MP4::Tag::item; + +// We will create a safe version of these below in an %extend +// TagLib::MP4::Tag::item does not need to be reimplemented as it return an Item by value. +%ignore TagLib::MP4::Tag::setItem; +%ignore TagLib::MP4::Tag::removeItem; + +%include + %freefunc TagLib::MP4::File "free_taglib_mp4_file"; // Ignore IOStream and all the constructors using it. %ignore IOStream; %ignore TagLib::MP4::File::File(IOStream *, bool, Properties::ReadStyle); +%ignore TagLib::MP4::File::File(IOStream *, bool, Properties::ReadStyle, ItemFactory *); %ignore TagLib::MP4::File::File(IOStream *, bool); %ignore TagLib::MP4::File::File(IOStream *); %ignore TagLib::MP4::File::isSupported(IOStream *); @@ -138,12 +143,6 @@ namespace TagLib { %rename("mp4_tag?") TagLib::MP4::File::hasMP4Tag; %include -namespace TagLib { - namespace MP4 { - %template(ItemMap) ::TagLib::Map; - } -} - // Unlink Ruby objects from the deleted C++ objects. Otherwise Ruby code // that calls a method on a tag after the file is deleted segfaults. %begin %{ diff --git a/ext/taglib_mp4/taglib_mp4_wrap.cxx b/ext/taglib_mp4/taglib_mp4_wrap.cxx index b2e945af..70bf6b63 100644 --- a/ext/taglib_mp4/taglib_mp4_wrap.cxx +++ b/ext/taglib_mp4/taglib_mp4_wrap.cxx @@ -1861,17 +1861,20 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__MP4__CoverArtList swig_types[5] #define SWIGTYPE_p_TagLib__MP4__File swig_types[6] #define SWIGTYPE_p_TagLib__MP4__Item swig_types[7] -#define SWIGTYPE_p_TagLib__MP4__Properties swig_types[8] -#define SWIGTYPE_p_TagLib__MP4__Tag swig_types[9] -#define SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t swig_types[10] -#define SWIGTYPE_p_TagLib__Tag swig_types[11] -#define SWIGTYPE_p_char swig_types[12] -#define SWIGTYPE_p_unsigned_char swig_types[13] -#define SWIGTYPE_p_unsigned_int swig_types[14] -#define SWIGTYPE_p_unsigned_long swig_types[15] -#define SWIGTYPE_p_wchar_t swig_types[16] -static swig_type_info *swig_types[18]; -static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0}; +#define SWIGTYPE_p_TagLib__MP4__ItemFactory swig_types[8] +#define SWIGTYPE_p_TagLib__MP4__Properties swig_types[9] +#define SWIGTYPE_p_TagLib__MP4__Tag swig_types[10] +#define SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t swig_types[11] +#define SWIGTYPE_p_TagLib__Tag swig_types[12] +#define SWIGTYPE_p_char swig_types[13] +#define SWIGTYPE_p_long_long swig_types[14] +#define SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator swig_types[15] +#define SWIGTYPE_p_unsigned_char swig_types[16] +#define SWIGTYPE_p_unsigned_int swig_types[17] +#define SWIGTYPE_p_unsigned_long swig_types[18] +#define SWIGTYPE_p_wchar_t swig_types[19] +static swig_type_info *swig_types[21]; +static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1946,8 +1949,6 @@ template T SwigValueInit() { #include #include #include -// To resolve some symbols, like AtomDataType in Item. -using namespace TagLib::MP4; #include @@ -1968,34 +1969,26 @@ using namespace TagLib::MP4; #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2084,6 +2077,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} static void unlink_taglib_mp4_item_map_iterator(const TagLib::MP4::ItemMap::ConstIterator &it) { @@ -2207,20 +2207,6 @@ SWIG_From_bool (bool value) } -SWIGINTERNINLINE VALUE -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return ULONG2NUM(value); -} - - -SWIGINTERNINLINE VALUE -SWIG_From_unsigned_SS_int (unsigned int value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { @@ -2302,47 +2288,31 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) +SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { + if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { - if (val) *val = static_cast< unsigned int >(v); + if (val) *val = static_cast< unsigned char >(v); } } return res; } -SWIGINTERN VALUE TagLib_MP4_Tag___setitem__(TagLib::MP4::Tag *self,TagLib::String const &string,TagLib::MP4::Item const &item){ - TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string); - if (it != self->itemMap().end()) { - unlink_taglib_mp4_item_map_iterator(it); - } - self->setItem(string, item); - return Qnil; - } -SWIGINTERN VALUE TagLib_MP4_Tag_remove_item(TagLib::MP4::Tag *self,TagLib::String const &string){ - TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string); - if (it != self->itemMap().end()) { - unlink_taglib_mp4_item_map_iterator(it); - self->removeItem(string); - } - return Qnil; - } SWIGINTERN int -SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val) +SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { - if ((v > UCHAR_MAX)) { + if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { - if (val) *val = static_cast< unsigned char >(v); + if (val) *val = static_cast< unsigned int >(v); } } return res; @@ -2406,6 +2376,13 @@ SWIG_AsVal_bool (VALUE obj, bool *val) } +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return ULONG2NUM(value); +} + + SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_char (unsigned char value) { @@ -2413,6 +2390,13 @@ SWIG_From_unsigned_SS_char (unsigned char value) } +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + #ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERNINLINE VALUE SWIG_From_long_SS_long (long long value) @@ -2445,9 +2429,6 @@ SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_cover_art_list(TagLib::MP4::C SWIGINTERN TagLib::MP4::Item *TagLib_MP4_Item_from_byte_vector_list(TagLib::ByteVectorList const &byte_vector_list){ return new TagLib::MP4::Item(byte_vector_list); } -SWIGINTERN void TagLib_MP4_File_close(TagLib::MP4::File *self){ - free_taglib_mp4_file(self); - } SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_a(TagLib::Map< TagLib::String,TagLib::MP4::Item > *self){ VALUE ary = rb_ary_new2(self->size()); for (TagLib::MP4::ItemMap::Iterator it = self->begin(); it != self->end(); it++) { @@ -2501,6 +2482,25 @@ SWIGINTERN VALUE TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___insert(TagL self->insert(string, item); return Qnil; } +SWIGINTERN VALUE TagLib_MP4_Tag___setitem__(TagLib::MP4::Tag *self,TagLib::String const &string,TagLib::MP4::Item const &item){ + TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string); + if (it != self->itemMap().end()) { + unlink_taglib_mp4_item_map_iterator(it); + } + self->setItem(string, item); + return Qnil; + } +SWIGINTERN VALUE TagLib_MP4_Tag_remove_item(TagLib::MP4::Tag *self,TagLib::String const &string){ + TagLib::MP4::ItemMap::ConstIterator it = self->itemMap().find(string); + if (it != self->itemMap().end()) { + unlink_taglib_mp4_item_map_iterator(it); + self->removeItem(string); + } + return Qnil; + } +SWIGINTERN void TagLib_MP4_File_close(TagLib::MP4::File *self){ + free_taglib_mp4_file(self); + } static void free_taglib_mp4_file(void *ptr) { TagLib::MP4::File *file = (TagLib::MP4::File *) ptr; @@ -2558,7 +2558,7 @@ _wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) { arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__MP4__Atoms, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms *","Properties", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms const *","Properties", 2, argv[1] )); } arg2 = reinterpret_cast< TagLib::MP4::Atoms * >(argp2); ecode3 = SWIG_AsVal_int(argv[2], &val3); @@ -2566,7 +2566,7 @@ _wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 3, argv[2] )); } arg3 = static_cast< TagLib::AudioProperties::ReadStyle >(val3); - result = (TagLib::MP4::Properties *)new TagLib::MP4::Properties(arg1,arg2,arg3); + result = (TagLib::MP4::Properties *)new TagLib::MP4::Properties(arg1,(TagLib::MP4::Atoms const *)arg2,arg3); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2610,10 +2610,10 @@ _wrap_new_Properties__SWIG_1(int argc, VALUE *argv, VALUE self) { arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__MP4__Atoms, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms *","Properties", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms const *","Properties", 2, argv[1] )); } arg2 = reinterpret_cast< TagLib::MP4::Atoms * >(argp2); - result = (TagLib::MP4::Properties *)new TagLib::MP4::Properties(arg1,arg2); + result = (TagLib::MP4::Properties *)new TagLib::MP4::Properties(arg1,(TagLib::MP4::Atoms const *)arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2669,8 +2669,8 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 3, "Properties.new", - " Properties.new(TagLib::MP4::File *file, TagLib::MP4::Atoms *atoms, TagLib::AudioProperties::ReadStyle style)\n" - " Properties.new(TagLib::MP4::File *file, TagLib::MP4::Atoms *atoms)\n"); + " Properties.new(TagLib::MP4::File *file, TagLib::MP4::Atoms const *atoms, TagLib::AudioProperties::ReadStyle style)\n" + " Properties.new(TagLib::MP4::File *file, TagLib::MP4::Atoms const *atoms)\n"); return Qnil; } @@ -2683,30 +2683,6 @@ free_TagLib_MP4_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Properties * >(argp1); - result = (int)((TagLib::MP4::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::MP4::Properties *arg1 = (TagLib::MP4::Properties *) 0 ; @@ -2875,16 +2851,30 @@ _wrap_Properties_codec(int argc, VALUE *argv, VALUE self) { } -static swig_class SwigClassTag; +static swig_class SwigClassCoverArt; SWIGINTERN VALUE -_wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *result = 0 ; +_wrap_new_CoverArt__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArt::Format arg1 ; + TagLib::ByteVector *arg2 = 0 ; + int val1 ; + int ecode1 = 0 ; + TagLib::ByteVector tmp2 ; + TagLib::MP4::CoverArt *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag(); + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt::Format","CoverArt", 1, argv[0] )); + } + arg1 = static_cast< TagLib::MP4::CoverArt::Format >(val1); + { + tmp2 = ruby_string_to_taglib_bytevector(argv[1]); + arg2 = &tmp2; + } + result = (TagLib::MP4::CoverArt *)new TagLib::MP4::CoverArt(arg1,(TagLib::ByteVector const &)*arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2893,14 +2883,21 @@ _wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN void +free_TagLib_MP4_CoverArt(void *self) { + TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + SWIGINTERN VALUE #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -_wrap_Tag_allocate(VALUE self) +_wrap_CoverArt_allocate(VALUE self) #else -_wrap_Tag_allocate(int argc, VALUE *argv, VALUE self) +_wrap_CoverArt_allocate(int argc, VALUE *argv, VALUE self) #endif { - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__Tag); + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__CoverArt); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif @@ -2909,29 +2906,24 @@ _wrap_Tag_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::File *arg1 = (TagLib::File *) 0 ; - TagLib::MP4::Atoms *arg2 = (TagLib::MP4::Atoms *) 0 ; +_wrap_new_CoverArt__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArt *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - TagLib::MP4::Tag *result = 0 ; + TagLib::MP4::CoverArt *result = 0 ; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MP4__CoverArt, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const &","CoverArt", 1, argv[0] )); } - arg1 = reinterpret_cast< TagLib::File * >(argp1); - res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__MP4__Atoms, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms *","Tag", 2, argv[1] )); + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::CoverArt const &","CoverArt", 1, argv[0])); } - arg2 = reinterpret_cast< TagLib::MP4::Atoms * >(argp2); - result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag(arg1,arg2); + arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); + result = (TagLib::MP4::CoverArt *)new TagLib::MP4::CoverArt((TagLib::MP4::CoverArt const &)*arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -2940,7 +2932,7 @@ _wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { +SWIGINTERN VALUE _wrap_new_CoverArt(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; @@ -2950,58 +2942,57 @@ SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } - if (argc == 0) { - return _wrap_new_Tag__SWIG_0(nargs, args, self); - } - if (argc == 2) { + if (argc == 1) { int _v = 0; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__CoverArt, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__MP4__Atoms, 0); + return _wrap_new_CoverArt__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v = 0; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Tag__SWIG_1(nargs, args, self); + return _wrap_new_CoverArt__SWIG_0(nargs, args, self); } } } fail: - Ruby_Format_OverloadedError( argc, 2, "Tag.new", - " Tag.new()\n" - " Tag.new(TagLib::File *file, TagLib::MP4::Atoms *atoms)\n"); + Ruby_Format_OverloadedError( argc, 2, "CoverArt.new", + " CoverArt.new(TagLib::MP4::CoverArt::Format format, TagLib::ByteVector const &data)\n" + " CoverArt.new(TagLib::MP4::CoverArt const &item)\n"); return Qnil; } -SWIGINTERN void -free_TagLib_MP4_Tag(void *self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - SWIGINTERN VALUE -_wrap_Tag_save(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; +_wrap_CoverArt_format(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool result; + TagLib::MP4::CoverArt::Format result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__CoverArt, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","save", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const *","format", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = (bool)(arg1)->save(); - vresult = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); + result = (TagLib::MP4::CoverArt::Format)((TagLib::MP4::CoverArt const *)arg1)->format(); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; @@ -3009,24 +3000,24 @@ _wrap_Tag_save(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Tag_title(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; +_wrap_CoverArt_data(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String result; + TagLib::ByteVector result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__CoverArt, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","title", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const *","data", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = ((TagLib::MP4::Tag const *)arg1)->title(); + arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); + result = ((TagLib::MP4::CoverArt const *)arg1)->data(); { - vresult = taglib_string_to_ruby_string(result); + vresult = taglib_bytevector_to_ruby_string(result); } return vresult; fail: @@ -3034,680 +3025,660 @@ _wrap_Tag_title(int argc, VALUE *argv, VALUE self) { } +/* + Document-method: TagLib::MP4::CoverArt.== + + call-seq: + ==(other) -> bool + +Equality comparison operator. +*/ SWIGINTERN VALUE -_wrap_Tag_artist(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; +_wrap_CoverArt___eq__(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *) 0 ; + TagLib::MP4::CoverArt *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String result; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__CoverArt, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","artist", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const *","operator ==", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = ((TagLib::MP4::Tag const *)arg1)->artist(); - { - vresult = taglib_string_to_ruby_string(result); + arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__MP4__CoverArt, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const &","operator ==", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::CoverArt const &","operator ==", 2, argv[0])); } + arg2 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp2); + result = (bool)((TagLib::MP4::CoverArt const *)arg1)->operator ==((TagLib::MP4::CoverArt const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } +static swig_class SwigClassItem; + SWIGINTERN VALUE -_wrap_Tag_album(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String result; - VALUE vresult = Qnil; +_wrap_new_Item__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","album", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = ((TagLib::MP4::Tag const *)arg1)->album(); - { - vresult = taglib_string_to_ruby_string(result); - } - return vresult; + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_comment(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; +_wrap_new_Item__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String result; - VALUE vresult = Qnil; + TagLib::MP4::Item *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MP4__Item, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","comment", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","Item", 1, argv[0] )); } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = ((TagLib::MP4::Tag const *)arg1)->comment(); - { - vresult = taglib_string_to_ruby_string(result); + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","Item", 1, argv[0])); } - return vresult; + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::MP4::Item const &)*arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } -SWIGINTERN VALUE -_wrap_Tag_genre(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","genre", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = ((TagLib::MP4::Tag const *)arg1)->genre(); - { - vresult = taglib_string_to_ruby_string(result); - } - return vresult; -fail: - return Qnil; +SWIGINTERN void +free_TagLib_MP4_Item(void *self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; } - SWIGINTERN VALUE -_wrap_Tag_year(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int result; - VALUE vresult = Qnil; +_wrap_new_Item__SWIG_2(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + TagLib::MP4::Item *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","year", 1, self )); + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->year(); - vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return vresult; + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Item", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_track(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int result; - VALUE vresult = Qnil; +_wrap_new_Item__SWIG_3(int argc, VALUE *argv, VALUE self) { + unsigned char arg1 ; + unsigned char val1 ; + int ecode1 = 0 ; + TagLib::MP4::Item *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","track", 1, self )); + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->track(); - vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return vresult; + ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","Item", 1, argv[0] )); + } + arg1 = static_cast< unsigned char >(val1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_titlee___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; +_wrap_new_Item__SWIG_4(int argc, VALUE *argv, VALUE self) { + unsigned int arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + TagLib::MP4::Item *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setTitle", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - (arg1)->setTitle((TagLib::String const &)*arg2); - return Qnil; + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Item", 1, argv[0] )); + } + arg1 = static_cast< unsigned int >(val1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_artiste___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; +_wrap_new_Item__SWIG_5(int argc, VALUE *argv, VALUE self) { + long long arg1 ; + long long val1 ; + int ecode1 = 0 ; + TagLib::MP4::Item *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setArtist", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - (arg1)->setArtist((TagLib::String const &)*arg2); - return Qnil; + ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","Item", 1, argv[0] )); + } + arg1 = static_cast< long long >(val1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_albume___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; +_wrap_new_Item__SWIG_6(int argc, VALUE *argv, VALUE self) { + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + TagLib::MP4::Item *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setAlbum", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - (arg1)->setAlbum((TagLib::String const &)*arg2); - return Qnil; + ecode1 = SWIG_AsVal_bool(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","Item", 1, argv[0] )); + } + arg1 = static_cast< bool >(val1); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_commente___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setComment", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - (arg1)->setComment((TagLib::String const &)*arg2); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_Tag_genree___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setGenre", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - (arg1)->setGenre((TagLib::String const &)*arg2); - return Qnil; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_Tag_yeare___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; +_wrap_new_Item__SWIG_7(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int arg2 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; int ecode2 = 0 ; + TagLib::MP4::Item *result = 0 ; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setYear", 1, self )); + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Item", 1, argv[0] )); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setYear", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Item", 2, argv[1] )); } - arg2 = static_cast< unsigned int >(val2); - (arg1)->setYear(arg2); - return Qnil; + arg2 = static_cast< int >(val2); + result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1,arg2); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_tracke___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; +_wrap_new_Item__SWIG_8(int argc, VALUE *argv, VALUE self) { + TagLib::StringList *arg1 = 0 ; + TagLib::StringList tmp1 ; + TagLib::MP4::Item *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setTrack", 1, self )); + { + tmp1 = ruby_array_to_taglib_string_list(argv[0]); + arg1 = &tmp1; } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setTrack", 2, argv[0] )); - } - arg2 = static_cast< unsigned int >(val2); - (arg1)->setTrack(arg2); - return Qnil; + result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::StringList const &)*arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_emptyq___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - VALUE vresult = Qnil; +_wrap_new_Item__SWIG_9(int argc, VALUE *argv, VALUE self) { + TagLib::ByteVectorList *arg1 = 0 ; + TagLib::ByteVectorList tmp1 ; + TagLib::MP4::Item *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","isEmpty", 1, self )); + { + tmp1 = ruby_array_to_taglib_bytevectorlist(argv[0]); + arg1 = &tmp1; } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = (bool)((TagLib::MP4::Tag const *)arg1)->isEmpty(); - vresult = SWIG_From_bool(static_cast< bool >(result)); - return vresult; + result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::ByteVectorList const &)*arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Tag_item_map(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::MP4::ItemMap *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","itemMap", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - result = (TagLib::MP4::ItemMap *) &((TagLib::MP4::Tag const *)arg1)->itemMap(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_Item_allocate(VALUE self) +#else +_wrap_Item_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__Item); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif return vresult; -fail: - return Qnil; } SWIGINTERN VALUE -_wrap_Tag___getitem__(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - TagLib::MP4::Item result; - VALUE vresult = Qnil; +_wrap_new_Item__SWIG_10(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArtList *arg1 = 0 ; + TagLib::MP4::CoverArtList tmp1 ; + TagLib::MP4::Item *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","item", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + tmp1 = ruby_array_to_taglib_cover_art_list(argv[0]); + arg1 = &tmp1; } - result = ((TagLib::MP4::Tag const *)arg1)->item((TagLib::String const &)*arg2); - vresult = SWIG_NewPointerObj((new TagLib::MP4::Item(result)), SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_OWN | 0 ); - return vresult; + result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::MP4::CoverArtList const &)*arg1); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } -SWIGINTERN VALUE -_wrap_Tag_contains(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - bool result; - VALUE vresult = Qnil; +SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[2]; + int ii; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + argc = nargs; + if (argc > 2) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","contains", 1, self )); + if (argc == 0) { + return _wrap_new_Item__SWIG_0(nargs, args, self); } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + if (argc == 1) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Item__SWIG_1(nargs, args, self); + } } - result = (bool)((TagLib::MP4::Tag const *)arg1)->contains((TagLib::String const &)*arg2); - vresult = SWIG_From_bool(static_cast< bool >(result)); - return vresult; -fail: - return Qnil; -} - - -/* - Document-method: TagLib::MP4::Tag.[]= - - call-seq: - []=(string, item) -> VALUE - -Element setter/slicing. -*/ -SWIGINTERN VALUE -_wrap_Tag___setitem__(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; - TagLib::MP4::Item *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - void *argp3 = 0 ; - int res3 = 0 ; - VALUE result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if (argc == 1) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVectorList, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Item__SWIG_9(nargs, args, self); + } } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","__setitem__", 1, self )); + if (argc == 1) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__CoverArtList, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Item__SWIG_10(nargs, args, self); + } } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_unsigned_SS_char(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_3(nargs, args, self); + } } - res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","__setitem__", 3, argv[1] )); + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_4(nargs, args, self); + } } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","__setitem__", 3, argv[1])); + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_2(nargs, args, self); + } } - arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3); - result = (VALUE)TagLib_MP4_Tag___setitem__(arg1,(TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3); - vresult = result; - return vresult; + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_long_SS_long(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_5(nargs, args, self); + } + } + if (argc == 1) { + int _v = 0; + { + _v = TYPE(argv[0]) == T_ARRAY ? 1 : 0; + } + if (_v) { + return _wrap_new_Item__SWIG_8(nargs, args, self); + } + } + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_bool(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_6(nargs, args, self); + } + } + if (argc == 2) { + int _v = 0; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Item__SWIG_7(nargs, args, self); + } + } + } + fail: + Ruby_Format_OverloadedError( argc, 2, "Item.new", + " Item.new()\n" + " Item.new(TagLib::MP4::Item const &item)\n" + " Item.new(int value)\n" + " Item.new(unsigned char value)\n" + " Item.new(unsigned int value)\n" + " Item.new(long long value)\n" + " Item.new(bool value)\n" + " Item.new(int value1, int value2)\n" + " Item.new(TagLib::StringList const &value)\n" + " Item.new(TagLib::ByteVectorList const &value)\n" + " Item.new(TagLib::MP4::CoverArtList const &value)\n"); + return Qnil; } SWIGINTERN VALUE -_wrap_Tag_remove_item(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; - TagLib::String *arg2 = 0 ; +_wrap_Item_to_int(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String tmp2 ; - VALUE result; + int result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","remove_item", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toInt", 1, self )); } - result = (VALUE)TagLib_MP4_Tag_remove_item(arg1,(TagLib::String const &)*arg2); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (int)((TagLib::MP4::Item const *)arg1)->toInt(); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } -static swig_class SwigClassCoverArt; - SWIGINTERN VALUE -_wrap_new_CoverArt__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArt::Format arg1 ; - TagLib::ByteVector *arg2 = 0 ; - int val1 ; - int ecode1 = 0 ; - TagLib::ByteVector tmp2 ; - TagLib::MP4::CoverArt *result = 0 ; +_wrap_Item_to_byte(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned char result; + VALUE vresult = Qnil; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_int(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt::Format","CoverArt", 1, argv[0] )); - } - arg1 = static_cast< TagLib::MP4::CoverArt::Format >(val1); - { - tmp2 = ruby_string_to_taglib_bytevector(argv[1]); - arg2 = &tmp2; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByte", 1, self )); } - result = (TagLib::MP4::CoverArt *)new TagLib::MP4::CoverArt(arg1,(TagLib::ByteVector const &)*arg2); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (unsigned char)((TagLib::MP4::Item const *)arg1)->toByte(); + vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); + return vresult; fail: return Qnil; } -SWIGINTERN void -free_TagLib_MP4_CoverArt(void *self) { - TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - -SWIGINTERN VALUE -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC -_wrap_CoverArt_allocate(VALUE self) -#else -_wrap_CoverArt_allocate(int argc, VALUE *argv, VALUE self) -#endif -{ - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__CoverArt); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif - return vresult; -} - - SWIGINTERN VALUE -_wrap_new_CoverArt__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArt *arg1 = 0 ; +_wrap_Item_to_uint(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::CoverArt *result = 0 ; + unsigned int result; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MP4__CoverArt, 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const &","CoverArt", 1, argv[0] )); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::CoverArt const &","CoverArt", 1, argv[0])); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toUInt", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); - result = (TagLib::MP4::CoverArt *)new TagLib::MP4::CoverArt((TagLib::MP4::CoverArt const &)*arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (unsigned int)((TagLib::MP4::Item const *)arg1)->toUInt(); + vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return vresult; fail: return Qnil; } -SWIGINTERN VALUE _wrap_new_CoverArt(int nargs, VALUE *args, VALUE self) { - int argc; - VALUE argv[2]; - int ii; +SWIGINTERN VALUE +_wrap_Item_to_long_long(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + long long result; + VALUE vresult = Qnil; - argc = nargs; - if (argc > 2) SWIG_fail; - for (ii = 0; (ii < argc); ++ii) { - argv[ii] = args[ii]; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - if (argc == 1) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__CoverArt, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_CoverArt__SWIG_1(nargs, args, self); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toLongLong", 1, self )); } - if (argc == 2) { - int _v = 0; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_CoverArt__SWIG_0(nargs, args, self); - } - } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (long long)((TagLib::MP4::Item const *)arg1)->toLongLong(); + vresult = SWIG_From_long_SS_long(static_cast< long long >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Item_to_bool(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toBool", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (bool)((TagLib::MP4::Item const *)arg1)->toBool(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Item_to_int_pair(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::MP4::Item::IntPair result; + VALUE vresult = Qnil; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toIntPair", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = ((TagLib::MP4::Item const *)arg1)->toIntPair(); + { + vresult = taglib_mp4_item_int_pair_to_ruby_array(result); + } + return vresult; fail: - Ruby_Format_OverloadedError( argc, 2, "CoverArt.new", - " CoverArt.new(TagLib::MP4::CoverArt::Format format, TagLib::ByteVector const &data)\n" - " CoverArt.new(TagLib::MP4::CoverArt const &item)\n"); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Item_to_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::StringList result; + VALUE vresult = Qnil; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toStringList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = ((TagLib::MP4::Item const *)arg1)->toStringList(); + { + vresult = taglib_string_list_to_ruby_array(result); + } + return vresult; +fail: return Qnil; } SWIGINTERN VALUE -_wrap_CoverArt_format(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *) 0 ; +_wrap_Item_to_byte_vector_list(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::CoverArt::Format result; + TagLib::ByteVectorList result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__CoverArt, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const *","format", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByteVectorList", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = ((TagLib::MP4::Item const *)arg1)->toByteVectorList(); + { + vresult = taglib_bytevectorlist_to_ruby_array(result); } - arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); - result = (TagLib::MP4::CoverArt::Format)((TagLib::MP4::CoverArt const *)arg1)->format(); - vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; @@ -3715,24 +3686,24 @@ _wrap_CoverArt_format(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_CoverArt_data(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArt *arg1 = (TagLib::MP4::CoverArt *) 0 ; +_wrap_Item_to_cover_art_list(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ByteVector result; + TagLib::MP4::CoverArtList result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__CoverArt, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::CoverArt const *","data", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toCoverArtList", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::CoverArt * >(argp1); - result = ((TagLib::MP4::CoverArt const *)arg1)->data(); + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = ((TagLib::MP4::Item const *)arg1)->toCoverArtList(); { - vresult = taglib_bytevector_to_ruby_string(result); + vresult = taglib_cover_art_list_to_ruby_array(result); } return vresult; fail: @@ -3740,237 +3711,267 @@ _wrap_CoverArt_data(int argc, VALUE *argv, VALUE self) { } -static swig_class SwigClassItem; +SWIGINTERN VALUE +_wrap_Item_validq___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","isValid", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (bool)((TagLib::MP4::Item const *)arg1)->isValid(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + SWIGINTERN VALUE -_wrap_new_Item__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *result = 0 ; +_wrap_Item_type(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::MP4::Item::Type result; + VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","type", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); + result = (TagLib::MP4::Item::Type)((TagLib::MP4::Item const *)arg1)->type(); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; fail: return Qnil; } +/* + Document-method: TagLib::MP4::Item.== + + call-seq: + ==(other) -> bool + +Equality comparison operator. +*/ SWIGINTERN VALUE -_wrap_new_Item__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = 0 ; +_wrap_Item___eq__(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; + TagLib::MP4::Item *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::Item *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MP4__Item, 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","Item", 1, argv[0] )); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","Item", 1, argv[0])); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","operator ==", 1, self )); } arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::MP4::Item const &)*arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__MP4__Item, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","operator ==", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","operator ==", 2, argv[0])); + } + arg2 = reinterpret_cast< TagLib::MP4::Item * >(argp2); + result = (bool)((TagLib::MP4::Item const *)arg1)->operator ==((TagLib::MP4::Item const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; fail: return Qnil; } -SWIGINTERN void -free_TagLib_MP4_Item(void *self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - SWIGINTERN VALUE -_wrap_new_Item__SWIG_2(int argc, VALUE *argv, VALUE self) { - int arg1 ; - int val1 ; +_wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) { + bool arg1 ; + bool val1 ; int ecode1 = 0 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_int(argv[0], &val1); + ecode1 = SWIG_AsVal_bool(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Item", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","TagLib_MP4_Item_from_bool", 1, argv[0] )); } - arg1 = static_cast< int >(val1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = static_cast< bool >(val1); + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_bool(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_3(int argc, VALUE *argv, VALUE self) { +_wrap_Item_from_byte(int argc, VALUE *argv, VALUE self) { unsigned char arg1 ; unsigned char val1 ; int ecode1 = 0 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","Item", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","TagLib_MP4_Item_from_byte", 1, argv[0] )); } arg1 = static_cast< unsigned char >(val1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_4(int argc, VALUE *argv, VALUE self) { +_wrap_Item_from_uint(int argc, VALUE *argv, VALUE self) { unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Item", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","TagLib_MP4_Item_from_uint", 1, argv[0] )); } arg1 = static_cast< unsigned int >(val1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_uint(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_5(int argc, VALUE *argv, VALUE self) { - long long arg1 ; - long long val1 ; +_wrap_Item_from_int(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; int ecode1 = 0 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1); + ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","Item", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib_MP4_Item_from_int", 1, argv[0] )); } - arg1 = static_cast< long long >(val1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = static_cast< int >(val1); + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_int(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_6(int argc, VALUE *argv, VALUE self) { - bool arg1 ; - bool val1 ; +_wrap_Item_from_long_long(int argc, VALUE *argv, VALUE self) { + long long arg1 ; + long long val1 ; int ecode1 = 0 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_bool(argv[0], &val1); + ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","Item", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","TagLib_MP4_Item_from_long_long", 1, argv[0] )); } - arg1 = static_cast< bool >(val1); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = static_cast< long long >(val1); + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_long_long(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_7(int argc, VALUE *argv, VALUE self) { - int arg1 ; - int arg2 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; +_wrap_Item_from_string_list(int argc, VALUE *argv, VALUE self) { + TagLib::StringList *arg1 = 0 ; + TagLib::StringList tmp1 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_int(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Item", 1, argv[0] )); - } - arg1 = static_cast< int >(val1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Item", 2, argv[1] )); - } - arg2 = static_cast< int >(val2); - result = (TagLib::MP4::Item *)new TagLib::MP4::Item(arg1,arg2); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + { + tmp1 = ruby_array_to_taglib_string_list(argv[0]); + arg1 = &tmp1; + } + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_string_list((TagLib::StringList const &)*arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_8(int argc, VALUE *argv, VALUE self) { - TagLib::StringList *arg1 = 0 ; - TagLib::StringList tmp1 ; +_wrap_Item_from_cover_art_list(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::CoverArtList *arg1 = 0 ; + TagLib::MP4::CoverArtList tmp1 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { - tmp1 = ruby_array_to_taglib_string_list(argv[0]); + tmp1 = ruby_array_to_taglib_cover_art_list(argv[0]); arg1 = &tmp1; } - result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::StringList const &)*arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_cover_art_list((TagLib::MP4::CoverArtList const &)*arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_Item__SWIG_9(int argc, VALUE *argv, VALUE self) { +_wrap_Item_from_byte_vector_list(int argc, VALUE *argv, VALUE self) { TagLib::ByteVectorList *arg1 = 0 ; TagLib::ByteVectorList tmp1 ; TagLib::MP4::Item *result = 0 ; + VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; @@ -3979,7 +3980,51 @@ _wrap_new_Item__SWIG_9(int argc, VALUE *argv, VALUE self) { tmp1 = ruby_array_to_taglib_bytevectorlist(argv[0]); arg1 = &tmp1; } - result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::ByteVectorList const &)*arg1); + result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte_vector_list((TagLib::ByteVectorList const &)*arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +static swig_class SwigClassItemMap; + +SWIGINTERN VALUE +_wrap_new_ItemMap__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)new TagLib::Map< TagLib::String,TagLib::MP4::Item >(); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_ItemMap__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","Map<(TagLib::String,TagLib::MP4::Item)>", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","Map<(TagLib::String,TagLib::MP4::Item)>", 1, argv[0])); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)new TagLib::Map< TagLib::String,TagLib::MP4::Item >((TagLib::Map< TagLib::String,TagLib::MP4::Item > const &)*arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -3990,12 +4035,12 @@ _wrap_new_Item__SWIG_9(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -_wrap_Item_allocate(VALUE self) +_wrap_ItemMap_allocate(VALUE self) #else -_wrap_Item_allocate(int argc, VALUE *argv, VALUE self) +_wrap_ItemMap_allocate(int argc, VALUE *argv, VALUE self) #endif { - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__Item); + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif @@ -4004,19 +4049,15 @@ _wrap_Item_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_Item__SWIG_10(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArtList *arg1 = 0 ; - TagLib::MP4::CoverArtList tmp1 ; - TagLib::MP4::Item *result = 0 ; +_wrap_new_ItemMap__SWIG_2(int argc, VALUE *argv, VALUE self) { + SwigValueWrapper< std::initializer_list< std::pair< TagLib::String const,TagLib::MP4::Item > > > arg1 ; + TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - { - tmp1 = ruby_array_to_taglib_cover_art_list(argv[0]); - arg1 = &tmp1; - } - result = (TagLib::MP4::Item *)new TagLib::MP4::Item((TagLib::MP4::CoverArtList const &)*arg1); + + result = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)new TagLib::Map< TagLib::String,TagLib::MP4::Item >(arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -4025,158 +4066,411 @@ _wrap_new_Item__SWIG_10(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE _wrap_new_Item(int nargs, VALUE *args, VALUE self) { +SWIGINTERN VALUE _wrap_new_ItemMap(int nargs, VALUE *args, VALUE self) { int argc; - VALUE argv[2]; + VALUE argv[1]; int ii; argc = nargs; - if (argc > 2) SWIG_fail; + if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { - return _wrap_new_Item__SWIG_0(nargs, args, self); + return _wrap_new_ItemMap__SWIG_0(nargs, args, self); } if (argc == 1) { int _v = 0; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_NO_NULL); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Item__SWIG_1(nargs, args, self); + return _wrap_new_ItemMap__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVectorList, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); + if (_v) { - return _wrap_new_Item__SWIG_9(nargs, args, self); + return _wrap_new_ItemMap__SWIG_2(nargs, args, self); } } - if (argc == 1) { - int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__CoverArtList, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Item__SWIG_10(nargs, args, self); - } + +fail: + Ruby_Format_OverloadedError( argc, 1, "ItemMap.new", + " ItemMap.new()\n" + " ItemMap.new(TagLib::Map< TagLib::String,TagLib::MP4::Item > const &m)\n" + " ItemMap.new(std::initializer_list< std::pair< TagLib::String const,TagLib::MP4::Item > > init)\n"); + + return Qnil; +} + + +SWIGINTERN void +free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_(void *self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + +SWIGINTERN VALUE +_wrap_ItemMap_cbegin(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::map< TagLib::String,TagLib::MP4::Item >::const_iterator > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - if (argc == 1) { - int _v = 0; - { - int res = SWIG_AsVal_unsigned_SS_char(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Item__SWIG_3(nargs, args, self); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","cbegin", 1, self )); } - if (argc == 1) { - int _v = 0; - { - int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Item__SWIG_4(nargs, args, self); - } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->cbegin(); + vresult = SWIG_NewPointerObj((new TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator(result)), SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_cend(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + SwigValueWrapper< std::map< TagLib::String,TagLib::MP4::Item >::const_iterator > result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - if (argc == 1) { - int _v = 0; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Item__SWIG_2(nargs, args, self); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","cend", 1, self )); } - if (argc == 1) { - int _v = 0; - { - int res = SWIG_AsVal_long_SS_long(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Item__SWIG_5(nargs, args, self); - } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->cend(); + vresult = SWIG_NewPointerObj((new TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator(result)), SWIGTYPE_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: TagLib::MP4::ItemMap.size + + call-seq: + size -> unsigned int + +Size or Length of the ItemMap. +*/ +SWIGINTERN VALUE +_wrap_ItemMap_size(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - if (argc == 1) { - int _v = 0; - { - _v = TYPE(argv[0]) == T_ARRAY ? 1 : 0; - } - if (_v) { - return _wrap_new_Item__SWIG_8(nargs, args, self); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","size", 1, self )); } - if (argc == 1) { - int _v = 0; - { - int res = SWIG_AsVal_bool(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Item__SWIG_6(nargs, args, self); - } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (unsigned int)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->size(); + vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_emptyq___(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","isEmpty", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (bool)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->isEmpty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_contains(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","contains", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = (bool)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->contains((TagLib::String const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_value__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + TagLib::MP4::Item *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + TagLib::MP4::Item result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","value", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","value", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","value", 3, argv[1])); + } + arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3); + result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->value((TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3); + vresult = SWIG_NewPointerObj((new TagLib::MP4::Item(result)), SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_value__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + TagLib::MP4::Item result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","value", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = ((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->value((TagLib::String const &)*arg2); + vresult = SWIG_NewPointerObj((new TagLib::MP4::Item(result)), SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE _wrap_ItemMap_value(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[4]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 4) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; } if (argc == 2) { int _v = 0; - { - int res = SWIG_AsVal_int(argv[0], NULL); + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ItemMap_value__SWIG_1(nargs, args, self); + } } + } + if (argc == 3) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0); + _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Item__SWIG_7(nargs, args, self); + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ItemMap_value__SWIG_0(nargs, args, self); + } } } } fail: - Ruby_Format_OverloadedError( argc, 2, "Item.new", - " Item.new()\n" - " Item.new(TagLib::MP4::Item const &item)\n" - " Item.new(int value)\n" - " Item.new(unsigned char value)\n" - " Item.new(unsigned int value)\n" - " Item.new(long long value)\n" - " Item.new(bool value)\n" - " Item.new(int first, int second)\n" - " Item.new(TagLib::StringList const &value)\n" - " Item.new(TagLib::ByteVectorList const &value)\n" - " Item.new(TagLib::MP4::CoverArtList const &value)\n"); + Ruby_Format_OverloadedError( argc, 4, "ItemMap.value", + " TagLib::MP4::Item ItemMap.value(TagLib::String const &key, TagLib::MP4::Item const &defaultValue)\n" + " TagLib::MP4::Item ItemMap.value(TagLib::String const &key)\n"); return Qnil; } SWIGINTERN VALUE -_wrap_Item_to_int(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_ItemMap_swap(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int result; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","swap", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > &","swap", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::Map< TagLib::String,TagLib::MP4::Item > &","swap", 2, argv[0])); + } + arg2 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp2); + (arg1)->swap(*arg2); + return Qnil; +fail: + return Qnil; +} + + +/* + Document-method: TagLib::MP4::ItemMap.== + + call-seq: + ==(m) -> bool + +Equality comparison operator. +*/ +SWIGINTERN VALUE +_wrap_ItemMap___eq__(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","operator ==", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","operator ==", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","operator ==", 2, argv[0])); + } + arg2 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp2); + result = (bool)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->operator ==((TagLib::Map< TagLib::String,TagLib::MP4::Item > const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: TagLib::MP4::ItemMap.to_a + + call-seq: + to_a -> VALUE + +Convert ItemMap to an Array. +*/ +SWIGINTERN VALUE +_wrap_ItemMap_to_a(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toInt", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","to_a", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (int)((TagLib::MP4::Item const *)arg1)->toInt(); - vresult = SWIG_From_int(static_cast< int >(result)); + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_a(arg1); + vresult = result; return vresult; fail: return Qnil; @@ -4184,80 +4478,326 @@ _wrap_Item_to_int(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_to_byte(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_ItemMap_to_h(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned char result; + VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByte", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","to_h", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (unsigned char)((TagLib::MP4::Item const *)arg1)->toByte(); - vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_h(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_fetch(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","fetch", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__fetch(arg1,(TagLib::String const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap__clear(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","_clear", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___clear(arg1); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap_erase(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","erase", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__erase(arg1,(TagLib::String const &)*arg2); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ItemMap__insert(int argc, VALUE *argv, VALUE self) { + TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; + TagLib::String *arg2 = 0 ; + TagLib::MP4::Item *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + VALUE result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","_insert", 1, self )); + } + arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","_insert", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","_insert", 3, argv[1])); + } + arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3); + result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___insert(arg1,(TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3); + vresult = result; + return vresult; +fail: + return Qnil; +} + + +static swig_class SwigClassTag; + +SWIGINTERN VALUE +_wrap_new_Tag__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag(); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_Tag__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::File *arg1 = (TagLib::File *) 0 ; + TagLib::MP4::Atoms *arg2 = (TagLib::MP4::Atoms *) 0 ; + TagLib::MP4::ItemFactory *arg3 = (TagLib::MP4::ItemFactory *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + TagLib::MP4::Tag *result = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); + } + arg1 = reinterpret_cast< TagLib::File * >(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__MP4__Atoms, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms *","Tag", 2, argv[1] )); + } + arg2 = reinterpret_cast< TagLib::MP4::Atoms * >(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_TagLib__MP4__ItemFactory, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::ItemFactory const *","Tag", 3, argv[2] )); + } + arg3 = reinterpret_cast< TagLib::MP4::ItemFactory * >(argp3); + result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag(arg1,arg2,(TagLib::MP4::ItemFactory const *)arg3); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_Tag_allocate(VALUE self) +#else +_wrap_Tag_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__Tag); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif return vresult; -fail: - return Qnil; } SWIGINTERN VALUE -_wrap_Item_to_uint(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_new_Tag__SWIG_2(int argc, VALUE *argv, VALUE self) { + TagLib::File *arg1 = (TagLib::File *) 0 ; + TagLib::MP4::Atoms *arg2 = (TagLib::MP4::Atoms *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int result; - VALUE vresult = Qnil; + void *argp2 = 0 ; + int res2 = 0 ; + TagLib::MP4::Tag *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toUInt", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Tag", 1, argv[0] )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (unsigned int)((TagLib::MP4::Item const *)arg1)->toUInt(); - vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return vresult; + arg1 = reinterpret_cast< TagLib::File * >(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_TagLib__MP4__Atoms, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::MP4::Atoms *","Tag", 2, argv[1] )); + } + arg2 = reinterpret_cast< TagLib::MP4::Atoms * >(argp2); + result = (TagLib::MP4::Tag *)new TagLib::MP4::Tag(arg1,arg2); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } -SWIGINTERN VALUE -_wrap_Item_to_long_long(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long result; - VALUE vresult = Qnil; +SWIGINTERN VALUE _wrap_new_Tag(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + argc = nargs; + if (argc > 3) SWIG_fail; + for (ii = 0; (ii < argc); ++ii) { + argv[ii] = args[ii]; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toLongLong", 1, self )); + if (argc == 0) { + return _wrap_new_Tag__SWIG_0(nargs, args, self); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (long long)((TagLib::MP4::Item const *)arg1)->toLongLong(); - vresult = SWIG_From_long_SS_long(static_cast< long long >(result)); - return vresult; + if (argc == 2) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__MP4__Atoms, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Tag__SWIG_2(nargs, args, self); + } + } + } + if (argc == 3) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__MP4__Atoms, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TagLib__MP4__ItemFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Tag__SWIG_1(nargs, args, self); + } + } + } + } + fail: + Ruby_Format_OverloadedError( argc, 3, "Tag.new", + " Tag.new()\n" + " Tag.new(TagLib::File *file, TagLib::MP4::Atoms *atoms, TagLib::MP4::ItemFactory const *factory)\n" + " Tag.new(TagLib::File *file, TagLib::MP4::Atoms *atoms)\n"); + return Qnil; } +SWIGINTERN void +free_TagLib_MP4_Tag(void *self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *)self; + SWIG_RubyRemoveTracking(arg1); + delete arg1; +} + SWIGINTERN VALUE -_wrap_Item_to_bool(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_save(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; @@ -4266,12 +4806,12 @@ _wrap_Item_to_bool(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toBool", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","save", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (bool)((TagLib::MP4::Item const *)arg1)->toBool(); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (bool)(arg1)->save(); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -4280,24 +4820,24 @@ _wrap_Item_to_bool(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_to_int_pair(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_title(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::Item::IntPair result; + TagLib::String result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toIntPair", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","title", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = ((TagLib::MP4::Item const *)arg1)->toIntPair(); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = ((TagLib::MP4::Tag const *)arg1)->title(); { - vresult = taglib_mp4_item_int_pair_to_ruby_array(result); + vresult = taglib_string_to_ruby_string(result); } return vresult; fail: @@ -4306,24 +4846,24 @@ _wrap_Item_to_int_pair(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_to_string_list(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_artist(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::StringList result; + TagLib::String result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toStringList", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","artist", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = ((TagLib::MP4::Item const *)arg1)->toStringList(); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = ((TagLib::MP4::Tag const *)arg1)->artist(); { - vresult = taglib_string_list_to_ruby_array(result); + vresult = taglib_string_to_ruby_string(result); } return vresult; fail: @@ -4332,24 +4872,24 @@ _wrap_Item_to_string_list(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_to_byte_vector_list(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_album(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ByteVectorList result; + TagLib::String result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toByteVectorList", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","album", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = ((TagLib::MP4::Item const *)arg1)->toByteVectorList(); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = ((TagLib::MP4::Tag const *)arg1)->album(); { - vresult = taglib_bytevectorlist_to_ruby_array(result); + vresult = taglib_string_to_ruby_string(result); } return vresult; fail: @@ -4358,24 +4898,24 @@ _wrap_Item_to_byte_vector_list(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_to_cover_art_list(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_comment(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::CoverArtList result; + TagLib::String result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","toCoverArtList", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","comment", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = ((TagLib::MP4::Item const *)arg1)->toCoverArtList(); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = ((TagLib::MP4::Tag const *)arg1)->comment(); { - vresult = taglib_cover_art_list_to_ruby_array(result); + vresult = taglib_string_to_ruby_string(result); } return vresult; fail: @@ -4384,47 +4924,25 @@ _wrap_Item_to_cover_art_list(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_validq___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::Item *arg1 = (TagLib::MP4::Item *) 0 ; +_wrap_Tag_genre(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool result; + TagLib::String result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Item const *","isValid", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","genre", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::Item * >(argp1); - result = (bool)((TagLib::MP4::Item const *)arg1)->isValid(); - vresult = SWIG_From_bool(static_cast< bool >(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) { - bool arg1 ; - bool val1 ; - int ecode1 = 0 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = ((TagLib::MP4::Tag const *)arg1)->genre(); + { + vresult = taglib_string_to_ruby_string(result); } - ecode1 = SWIG_AsVal_bool(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "bool","TagLib_MP4_Item_from_bool", 1, argv[0] )); - } - arg1 = static_cast< bool >(val1); - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_bool(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); return vresult; fail: return Qnil; @@ -4432,23 +4950,23 @@ _wrap_Item_from_bool(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_from_byte(int argc, VALUE *argv, VALUE self) { - unsigned char arg1 ; - unsigned char val1 ; - int ecode1 = 0 ; - TagLib::MP4::Item *result = 0 ; +_wrap_Tag_year(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned char","TagLib_MP4_Item_from_byte", 1, argv[0] )); - } - arg1 = static_cast< unsigned char >(val1); - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","year", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->year(); + vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; @@ -4456,23 +4974,23 @@ _wrap_Item_from_byte(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_from_uint(int argc, VALUE *argv, VALUE self) { - unsigned int arg1 ; - unsigned int val1 ; - int ecode1 = 0 ; - TagLib::MP4::Item *result = 0 ; +_wrap_Tag_track(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","TagLib_MP4_Item_from_uint", 1, argv[0] )); - } - arg1 = static_cast< unsigned int >(val1); - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_uint(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","track", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (unsigned int)((TagLib::MP4::Tag const *)arg1)->track(); + vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; @@ -4480,310 +4998,300 @@ _wrap_Item_from_uint(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_Item_from_int(int argc, VALUE *argv, VALUE self) { - int arg1 ; - int val1 ; - int ecode1 = 0 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; +_wrap_Tag_titlee___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_int(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","TagLib_MP4_Item_from_int", 1, argv[0] )); - } - arg1 = static_cast< int >(val1); - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_int(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - return vresult; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setTitle", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + (arg1)->setTitle((TagLib::String const &)*arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Item_from_long_long(int argc, VALUE *argv, VALUE self) { - long long arg1 ; - long long val1 ; - int ecode1 = 0 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; +_wrap_Tag_artiste___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - ecode1 = SWIG_AsVal_long_SS_long(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "long long","TagLib_MP4_Item_from_long_long", 1, argv[0] )); - } - arg1 = static_cast< long long >(val1); - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_long_long(arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - return vresult; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setArtist", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + (arg1)->setArtist((TagLib::String const &)*arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Item_from_string_list(int argc, VALUE *argv, VALUE self) { - TagLib::StringList *arg1 = 0 ; - TagLib::StringList tmp1 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; +_wrap_Tag_albume___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setAlbum", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); { - tmp1 = ruby_array_to_taglib_string_list(argv[0]); - arg1 = &tmp1; + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; } - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_string_list((TagLib::StringList const &)*arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - return vresult; + (arg1)->setAlbum((TagLib::String const &)*arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Item_from_cover_art_list(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::CoverArtList *arg1 = 0 ; - TagLib::MP4::CoverArtList tmp1 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; +_wrap_Tag_commente___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setComment", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); { - tmp1 = ruby_array_to_taglib_cover_art_list(argv[0]); - arg1 = &tmp1; + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; } - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_cover_art_list((TagLib::MP4::CoverArtList const &)*arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - return vresult; + (arg1)->setComment((TagLib::String const &)*arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_Item_from_byte_vector_list(int argc, VALUE *argv, VALUE self) { - TagLib::ByteVectorList *arg1 = 0 ; - TagLib::ByteVectorList tmp1 ; - TagLib::MP4::Item *result = 0 ; - VALUE vresult = Qnil; +_wrap_Tag_genree___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setGenre", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); { - tmp1 = ruby_array_to_taglib_bytevectorlist(argv[0]); - arg1 = &tmp1; + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; } - result = (TagLib::MP4::Item *)TagLib_MP4_Item_from_byte_vector_list((TagLib::ByteVectorList const &)*arg1); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Item, 0 | 0 ); - return vresult; + (arg1)->setGenre((TagLib::String const &)*arg2); + return Qnil; fail: return Qnil; } -static swig_class SwigClassFile; - SWIGINTERN VALUE -_wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - bool arg2 ; - TagLib::MP4::Properties::ReadStyle arg3 ; - bool val2 ; +_wrap_Tag_yeare___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - TagLib::MP4::File *result = 0 ; - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setYear", 1, self )); } - ecode2 = SWIG_AsVal_bool(argv[1], &val2); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MP4::Properties::ReadStyle","File", 3, argv[2] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setYear", 2, argv[0] )); } - arg3 = static_cast< TagLib::MP4::Properties::ReadStyle >(val3); - result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1,arg2,arg3); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg2 = static_cast< unsigned int >(val2); + (arg1)->setYear(arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - bool arg2 ; - bool val2 ; +_wrap_Tag_tracke___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; int ecode2 = 0 ; - TagLib::MP4::File *result = 0 ; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","setTrack", 1, self )); } - ecode2 = SWIG_AsVal_bool(argv[1], &val2); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setTrack", 2, argv[0] )); } - arg2 = static_cast< bool >(val2); - result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1,arg2); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg2 = static_cast< unsigned int >(val2); + (arg1)->setTrack(arg2); + return Qnil; fail: return Qnil; } SWIGINTERN VALUE -#ifdef HAVE_RB_DEFINE_ALLOC_FUNC -_wrap_File_allocate(VALUE self) -#else -_wrap_File_allocate(int argc, VALUE *argv, VALUE self) -#endif -{ - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__File); -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); -#endif +_wrap_Tag_emptyq___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","isEmpty", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (bool)((TagLib::MP4::Tag const *)arg1)->isEmpty(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; +fail: + return Qnil; } SWIGINTERN VALUE -_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { - TagLib::FileName arg1 ; - TagLib::MP4::File *result = 0 ; +_wrap_Tag_item_map(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::MP4::ItemMap *result = 0 ; + VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - { - arg1 = ruby_string_to_taglib_filename(argv[0]); - if ((const char *)(TagLib::FileName)(arg1) == NULL) { - SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","itemMap", 1, self )); } - result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (TagLib::MP4::ItemMap *) &((TagLib::MP4::Tag const *)arg1)->itemMap(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + return vresult; fail: return Qnil; } -SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { - int argc; - VALUE argv[3]; - int ii; +SWIGINTERN VALUE +_wrap_Tag___getitem__(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::String tmp2 ; + TagLib::MP4::Item result; + VALUE vresult = Qnil; - argc = nargs; - if (argc > 3) SWIG_fail; - for (ii = 0; (ii < argc); ++ii) { - argv[ii] = args[ii]; - } - if (argc == 1) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_File__SWIG_2(nargs, args, self); - } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - if (argc == 2) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_File__SWIG_1(nargs, args, self); - } - } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","item", 1, self )); } - if (argc == 3) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_File__SWIG_0(nargs, args, self); - } - } - } + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; } - + result = ((TagLib::MP4::Tag const *)arg1)->item((TagLib::String const &)*arg2); + vresult = SWIG_NewPointerObj((new TagLib::MP4::Item(result)), SWIGTYPE_p_TagLib__MP4__Item, SWIG_POINTER_OWN | 0 ); + return vresult; fail: - Ruby_Format_OverloadedError( argc, 3, "File.new", - " File.new(TagLib::FileName file, bool readProperties, TagLib::MP4::Properties::ReadStyle audioPropertiesStyle)\n" - " File.new(TagLib::FileName file, bool readProperties)\n" - " File.new(TagLib::FileName file)\n"); - return Qnil; } SWIGINTERN VALUE -_wrap_File_tag(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; +_wrap_Tag_contains(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::Tag *result = 0 ; + TagLib::String tmp2 ; + bool result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","tag", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag const *","contains", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); - result = (TagLib::MP4::Tag *)((TagLib::MP4::File const *)arg1)->tag(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = (bool)((TagLib::MP4::Tag const *)arg1)->contains((TagLib::String const &)*arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; @@ -4791,47 +5299,72 @@ _wrap_File_tag(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_File_audio_properties(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; +_wrap_Tag_strip(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::MP4::Properties *result = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","audioProperties", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","strip", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); - result = (TagLib::MP4::Properties *)((TagLib::MP4::File const *)arg1)->audioProperties(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 ); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + result = (bool)(arg1)->strip(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } +/* + Document-method: TagLib::MP4::Tag.[]= + + call-seq: + []=(string, item) -> VALUE + +Element setter/slicing. +*/ SWIGINTERN VALUE -_wrap_File_save(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; +_wrap_Tag___setitem__(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; + TagLib::MP4::Item *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool result; + TagLib::String tmp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + VALUE result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","save", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","__setitem__", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); - result = (bool)(arg1)->save(); - vresult = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","__setitem__", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","__setitem__", 3, argv[1])); + } + arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3); + result = (VALUE)TagLib_MP4_Tag___setitem__(arg1,(TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3); + vresult = result; return vresult; fail: return Qnil; @@ -4839,60 +5372,146 @@ _wrap_File_save(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_File_mp4_tagq___(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; +_wrap_Tag_remove_item(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::Tag *arg1 = (TagLib::MP4::Tag *) 0 ; + TagLib::String *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool result; + TagLib::String tmp2 ; + VALUE result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","hasMP4Tag", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::Tag *","remove_item", 1, self )); } - arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); - result = (bool)((TagLib::MP4::File const *)arg1)->hasMP4Tag(); - vresult = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< TagLib::MP4::Tag * >(argp1); + { + tmp2 = ruby_string_to_taglib_string(argv[0]); + arg2 = &tmp2; + } + result = (VALUE)TagLib_MP4_Tag_remove_item(arg1,(TagLib::String const &)*arg2); + vresult = result; return vresult; fail: return Qnil; } +static swig_class SwigClassFile; + +SWIGINTERN VALUE +_wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::MP4::Properties::ReadStyle arg3 ; + TagLib::MP4::ItemFactory *arg4 = (TagLib::MP4::ItemFactory *) 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + TagLib::MP4::File *result = 0 ; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MP4::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::MP4::Properties::ReadStyle >(val3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__MP4__ItemFactory, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::MP4::ItemFactory *","File", 4, argv[3] )); + } + arg4 = reinterpret_cast< TagLib::MP4::ItemFactory * >(argp4); + result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1,arg2,arg3,arg4); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + SWIGINTERN VALUE -_wrap_File_close(int argc, VALUE *argv, VALUE self) { - TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::MP4::Properties::ReadStyle arg3 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + TagLib::MP4::File *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","close", 1, self )); + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } } - arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); - TagLib_MP4_File_close(arg1); - return Qnil; + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MP4::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::MP4::Properties::ReadStyle >(val3); + result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1,arg2,arg3); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; fail: return Qnil; } -static swig_class SwigClassItemMap; - SWIGINTERN VALUE -_wrap_new_ItemMap__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ; +_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + bool val2 ; + int ecode2 = 0 ; + TagLib::MP4::File *result = 0 ; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - result = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)new TagLib::Map< TagLib::String,TagLib::MP4::Item >(); + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -4903,12 +5522,12 @@ _wrap_new_ItemMap__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -_wrap_ItemMap_allocate(VALUE self) +_wrap_File_allocate(VALUE self) #else -_wrap_ItemMap_allocate(int argc, VALUE *argv, VALUE self) +_wrap_File_allocate(int argc, VALUE *argv, VALUE self) #endif { - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t); + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MP4__File); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif @@ -4917,24 +5536,20 @@ _wrap_ItemMap_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_ItemMap__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::Map< TagLib::String,TagLib::MP4::Item > *result = 0 ; +_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + TagLib::MP4::File *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","Map<(TagLib::String,TagLib::MP4::Item)>", 1, argv[0] )); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const &","Map<(TagLib::String,TagLib::MP4::Item)>", 1, argv[0])); + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)new TagLib::Map< TagLib::String,TagLib::MP4::Item >((TagLib::Map< TagLib::String,TagLib::MP4::Item > const &)*arg1); + result = (TagLib::MP4::File *)new TagLib::MP4::File(arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); return self; @@ -4943,157 +5558,137 @@ _wrap_new_ItemMap__SWIG_1(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE _wrap_new_ItemMap(int nargs, VALUE *args, VALUE self) { +SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int argc; - VALUE argv[1]; + VALUE argv[4]; int ii; argc = nargs; - if (argc > 1) SWIG_fail; + if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } - if (argc == 0) { - return _wrap_new_ItemMap__SWIG_0(nargs, args, self); - } if (argc == 1) { int _v = 0; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, SWIG_POINTER_NO_NULL); + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_ItemMap__SWIG_1(nargs, args, self); + return _wrap_new_File__SWIG_3(nargs, args, self); } } - -fail: - Ruby_Format_OverloadedError( argc, 1, "ItemMap.new", - " ItemMap.new()\n" - " ItemMap.new(TagLib::Map< TagLib::String,TagLib::MP4::Item > const &m)\n"); - - return Qnil; -} - - -SWIGINTERN void -free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_(void *self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *)self; - SWIG_RubyRemoveTracking(arg1); - delete arg1; -} - -/* - Document-method: TagLib::MP4::ItemMap.size - - call-seq: - size -> unsigned int - -Size or Length of the ItemMap. -*/ -SWIGINTERN VALUE -_wrap_ItemMap_size(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if (argc == 2) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_File__SWIG_2(nargs, args, self); + } + } } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","size", 1, self )); + if (argc == 3) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_File__SWIG_1(nargs, args, self); + } + } + } } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (unsigned int)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->size(); - vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); - return vresult; + if (argc == 4) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__MP4__ItemFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_File__SWIG_0(nargs, args, self); + } + } + } + } + } + fail: + Ruby_Format_OverloadedError( argc, 4, "File.new", + " File.new(TagLib::FileName file, bool readProperties, TagLib::MP4::Properties::ReadStyle audioPropertiesStyle, TagLib::MP4::ItemFactory *itemFactory)\n" + " File.new(TagLib::FileName file, bool readProperties, TagLib::MP4::Properties::ReadStyle audioPropertiesStyle)\n" + " File.new(TagLib::FileName file, bool readProperties)\n" + " File.new(TagLib::FileName file)\n"); + return Qnil; } SWIGINTERN VALUE -_wrap_ItemMap_emptyq___(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; +_wrap_File_tag(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - bool result; + TagLib::MP4::Tag *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","isEmpty", 1, self )); - } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (bool)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->isEmpty(); - vresult = SWIG_From_bool(static_cast< bool >(result)); - return vresult; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_ItemMap_contains(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; - TagLib::String *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - TagLib::String tmp2 ; - bool result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > const *","contains", 1, self )); - } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","tag", 1, self )); } - result = (bool)((TagLib::Map< TagLib::String,TagLib::MP4::Item > const *)arg1)->contains((TagLib::String const &)*arg2); - vresult = SWIG_From_bool(static_cast< bool >(result)); + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + result = (TagLib::MP4::Tag *)((TagLib::MP4::File const *)arg1)->tag(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Tag, 0 | 0 ); return vresult; fail: return Qnil; } - -/* - Document-method: TagLib::MP4::ItemMap.to_a - - call-seq: - to_a -> VALUE - -Convert ItemMap to an Array. -*/ + SWIGINTERN VALUE -_wrap_ItemMap_to_a(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; +_wrap_File_audio_properties(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - VALUE result; + TagLib::MP4::Properties *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","to_a", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","audioProperties", 1, self )); } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_a(arg1); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + result = (TagLib::MP4::Properties *)((TagLib::MP4::File const *)arg1)->audioProperties(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MP4__Properties, 0 | 0 ); return vresult; fail: return Qnil; @@ -5101,23 +5696,23 @@ _wrap_ItemMap_to_a(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_ItemMap_to_h(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; +_wrap_File_save(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - VALUE result; + bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","to_h", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","save", 1, self )); } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__to_h(arg1); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + result = (bool)(arg1)->save(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; @@ -5125,29 +5720,31 @@ _wrap_ItemMap_to_h(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_ItemMap_fetch(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; - TagLib::String *arg2 = 0 ; +_wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String tmp2 ; - VALUE result; + int val2 ; + int ecode2 = 0 ; + bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","fetch", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","strip", 1, self )); } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__fetch(arg1,(TagLib::String const &)*arg2); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + result = (bool)(arg1)->strip(arg2); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; @@ -5155,53 +5752,92 @@ _wrap_ItemMap_fetch(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_ItemMap__clear(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; +_wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - VALUE result; + bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","_clear", 1, self )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","strip", 1, self )); } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___clear(arg1); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + result = (bool)(arg1)->strip(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } +SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) { + int argc; + VALUE argv[3]; + int ii; + + argc = nargs + 1; + argv[0] = self; + if (argc > 3) SWIG_fail; + for (ii = 1; (ii < argc); ++ii) { + argv[ii] = args[ii-1]; + } + if (argc == 1) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_File_strip__SWIG_1(nargs, args, self); + } + } + if (argc == 2) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MP4__File, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_File_strip__SWIG_0(nargs, args, self); + } + } + } + +fail: + Ruby_Format_OverloadedError( argc, 3, "File.strip", + " bool File.strip(int tags)\n" + " bool File.strip()\n"); + + return Qnil; +} + + SWIGINTERN VALUE -_wrap_ItemMap_erase(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; - TagLib::String *arg2 = 0 ; +_wrap_File_mp4_tagq___(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String tmp2 ; - VALUE result; + bool result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","erase", 1, self )); - } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File const *","hasMP4Tag", 1, self )); } - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg__erase(arg1,(TagLib::String const &)*arg2); - vresult = result; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + result = (bool)((TagLib::MP4::File const *)arg1)->hasMP4Tag(); + vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; @@ -5209,41 +5845,21 @@ _wrap_ItemMap_erase(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_ItemMap__insert(int argc, VALUE *argv, VALUE self) { - TagLib::Map< TagLib::String,TagLib::MP4::Item > *arg1 = (TagLib::Map< TagLib::String,TagLib::MP4::Item > *) 0 ; - TagLib::String *arg2 = 0 ; - TagLib::MP4::Item *arg3 = 0 ; +_wrap_File_close(int argc, VALUE *argv, VALUE self) { + TagLib::MP4::File *arg1 = (TagLib::MP4::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::String tmp2 ; - void *argp3 = 0 ; - int res3 = 0 ; - VALUE result; - VALUE vresult = Qnil; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MP4__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Map< TagLib::String,TagLib::MP4::Item > *","_insert", 1, self )); - } - arg1 = reinterpret_cast< TagLib::Map< TagLib::String,TagLib::MP4::Item > * >(argp1); - { - tmp2 = ruby_string_to_taglib_string(argv[0]); - arg2 = &tmp2; - } - res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_TagLib__MP4__Item, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MP4::Item const &","_insert", 3, argv[1] )); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MP4::Item const &","_insert", 3, argv[1])); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MP4::File *","close", 1, self )); } - arg3 = reinterpret_cast< TagLib::MP4::Item * >(argp3); - result = (VALUE)TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg___insert(arg1,(TagLib::String const &)*arg2,(TagLib::MP4::Item const &)*arg3); - vresult = result; - return vresult; + arg1 = reinterpret_cast< TagLib::MP4::File * >(argp1); + TagLib_MP4_File_close(arg1); + return Qnil; fail: return Qnil; } @@ -5269,11 +5885,14 @@ static swig_type_info _swigt__p_TagLib__MP4__CoverArt = {"_p_TagLib__MP4__CoverA static swig_type_info _swigt__p_TagLib__MP4__CoverArtList = {"_p_TagLib__MP4__CoverArtList", "TagLib::MP4::CoverArtList *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__MP4__File = {"_p_TagLib__MP4__File", "TagLib::MP4::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__MP4__Item = {"_p_TagLib__MP4__Item", "TagLib::MP4::Item *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__MP4__ItemFactory = {"_p_TagLib__MP4__ItemFactory", "TagLib::MP4::ItemFactory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__MP4__Properties = {"_p_TagLib__MP4__Properties", "TagLib::MP4::Properties *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__MP4__Tag = {"_p_TagLib__MP4__Tag", "TagLib::MP4::Tag *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t = {"_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t", "TagLib::MP4::ItemListMap *|TagLib::MP4::ItemMap *|TagLib::Map< TagLib::String,TagLib::MP4::Item > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t = {"_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t", "TagLib::MP4::ItemMap *|TagLib::Map< TagLib::String,TagLib::MP4::Item > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator = {"_p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator", "TagLib::Map< TagLib::String,TagLib::MP4::Item >::ConstIterator *|std::map< TagLib::String,TagLib::MP4::Item >::const_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -5288,11 +5907,14 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__MP4__CoverArtList, &_swigt__p_TagLib__MP4__File, &_swigt__p_TagLib__MP4__Item, + &_swigt__p_TagLib__MP4__ItemFactory, &_swigt__p_TagLib__MP4__Properties, &_swigt__p_TagLib__MP4__Tag, &_swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, + &_swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -5307,11 +5929,14 @@ static swig_cast_info _swigc__p_TagLib__MP4__CoverArt[] = { {&_swigt__p_TagLib_ static swig_cast_info _swigc__p_TagLib__MP4__CoverArtList[] = { {&_swigt__p_TagLib__MP4__CoverArtList, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__MP4__File[] = { {&_swigt__p_TagLib__MP4__File, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__MP4__Item[] = { {&_swigt__p_TagLib__MP4__Item, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__MP4__ItemFactory[] = { {&_swigt__p_TagLib__MP4__ItemFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__MP4__Properties[] = { {&_swigt__p_TagLib__MP4__Properties, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__MP4__Tag[] = { {&_swigt__p_TagLib__MP4__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t[] = { {&_swigt__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__MP4__Tag, _p_TagLib__MP4__TagTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator[] = { {&_swigt__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -5326,11 +5951,14 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__MP4__CoverArtList, _swigc__p_TagLib__MP4__File, _swigc__p_TagLib__MP4__Item, + _swigc__p_TagLib__MP4__ItemFactory, _swigc__p_TagLib__MP4__Properties, _swigc__p_TagLib__MP4__Tag, _swigc__p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, + _swigc__p_std__mapT_TagLib__String_TagLib__MP4__Item_t__const_iterator, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -5602,7 +6230,6 @@ SWIGEXPORT void Init_taglib_mp4(void) { rb_define_const(SwigClassProperties.klass, "Unknown", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::Unknown))); rb_define_const(SwigClassProperties.klass, "AAC", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::AAC))); rb_define_const(SwigClassProperties.klass, "ALAC", SWIG_From_int(static_cast< int >(TagLib::MP4::Properties::ALAC))); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); @@ -5614,35 +6241,6 @@ SWIGEXPORT void Init_taglib_mp4(void) { SwigClassProperties.destroy = (void (*)(void *)) free_TagLib_MP4_Properties; SwigClassProperties.trackObjects = 1; - SwigClassTag.klass = rb_define_class_under(mMP4, "Tag", ((swig_class *) SWIGTYPE_p_TagLib__Tag->clientdata)->klass); - SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__Tag, (void *) &SwigClassTag); - rb_define_alloc_func(SwigClassTag.klass, _wrap_Tag_allocate); - rb_define_method(SwigClassTag.klass, "initialize", VALUEFUNC(_wrap_new_Tag), -1); - rb_define_method(SwigClassTag.klass, "save", VALUEFUNC(_wrap_Tag_save), -1); - rb_define_method(SwigClassTag.klass, "title", VALUEFUNC(_wrap_Tag_title), -1); - rb_define_method(SwigClassTag.klass, "artist", VALUEFUNC(_wrap_Tag_artist), -1); - rb_define_method(SwigClassTag.klass, "album", VALUEFUNC(_wrap_Tag_album), -1); - rb_define_method(SwigClassTag.klass, "comment", VALUEFUNC(_wrap_Tag_comment), -1); - rb_define_method(SwigClassTag.klass, "genre", VALUEFUNC(_wrap_Tag_genre), -1); - rb_define_method(SwigClassTag.klass, "year", VALUEFUNC(_wrap_Tag_year), -1); - rb_define_method(SwigClassTag.klass, "track", VALUEFUNC(_wrap_Tag_track), -1); - rb_define_method(SwigClassTag.klass, "title=", VALUEFUNC(_wrap_Tag_titlee___), -1); - rb_define_method(SwigClassTag.klass, "artist=", VALUEFUNC(_wrap_Tag_artiste___), -1); - rb_define_method(SwigClassTag.klass, "album=", VALUEFUNC(_wrap_Tag_albume___), -1); - rb_define_method(SwigClassTag.klass, "comment=", VALUEFUNC(_wrap_Tag_commente___), -1); - rb_define_method(SwigClassTag.klass, "genre=", VALUEFUNC(_wrap_Tag_genree___), -1); - rb_define_method(SwigClassTag.klass, "year=", VALUEFUNC(_wrap_Tag_yeare___), -1); - rb_define_method(SwigClassTag.klass, "track=", VALUEFUNC(_wrap_Tag_tracke___), -1); - rb_define_method(SwigClassTag.klass, "empty?", VALUEFUNC(_wrap_Tag_emptyq___), -1); - rb_define_method(SwigClassTag.klass, "item_map", VALUEFUNC(_wrap_Tag_item_map), -1); - rb_define_method(SwigClassTag.klass, "[]", VALUEFUNC(_wrap_Tag___getitem__), -1); - rb_define_method(SwigClassTag.klass, "contains", VALUEFUNC(_wrap_Tag_contains), -1); - rb_define_method(SwigClassTag.klass, "[]=", VALUEFUNC(_wrap_Tag___setitem__), -1); - rb_define_method(SwigClassTag.klass, "remove_item", VALUEFUNC(_wrap_Tag_remove_item), -1); - SwigClassTag.mark = 0; - SwigClassTag.destroy = (void (*)(void *)) free_TagLib_MP4_Tag; - SwigClassTag.trackObjects = 1; - SwigClassCoverArt.klass = rb_define_class_under(mMP4, "CoverArt", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__CoverArt, (void *) &SwigClassCoverArt); rb_define_alloc_func(SwigClassCoverArt.klass, _wrap_CoverArt_allocate); @@ -5654,6 +6252,7 @@ SWIGEXPORT void Init_taglib_mp4(void) { rb_define_const(SwigClassCoverArt.klass, "Unknown", SWIG_From_int(static_cast< int >(TagLib::MP4::CoverArt::Unknown))); rb_define_method(SwigClassCoverArt.klass, "format", VALUEFUNC(_wrap_CoverArt_format), -1); rb_define_method(SwigClassCoverArt.klass, "data", VALUEFUNC(_wrap_CoverArt_data), -1); + rb_define_method(SwigClassCoverArt.klass, "==", VALUEFUNC(_wrap_CoverArt___eq__), -1); SwigClassCoverArt.mark = 0; SwigClassCoverArt.destroy = (void (*)(void *)) free_TagLib_MP4_CoverArt; SwigClassCoverArt.trackObjects = 1; @@ -5662,6 +6261,16 @@ SWIGEXPORT void Init_taglib_mp4(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__Item, (void *) &SwigClassItem); rb_define_alloc_func(SwigClassItem.klass, _wrap_Item_allocate); rb_define_method(SwigClassItem.klass, "initialize", VALUEFUNC(_wrap_new_Item), -1); + rb_define_const(SwigClassItem.klass, "Type_Void", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::Void))); + rb_define_const(SwigClassItem.klass, "Type_Bool", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::Bool))); + rb_define_const(SwigClassItem.klass, "Type_Int", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::Int))); + rb_define_const(SwigClassItem.klass, "Type_IntPair", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::IntPair))); + rb_define_const(SwigClassItem.klass, "Type_Byte", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::Byte))); + rb_define_const(SwigClassItem.klass, "Type_UInt", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::UInt))); + rb_define_const(SwigClassItem.klass, "Type_LongLong", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::LongLong))); + rb_define_const(SwigClassItem.klass, "Type_StringList", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::StringList))); + rb_define_const(SwigClassItem.klass, "Type_ByteVectorList", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::ByteVectorList))); + rb_define_const(SwigClassItem.klass, "Type_CoverArtList", SWIG_From_int(static_cast< int >(TagLib::MP4::Item::Type::CoverArtList))); rb_define_method(SwigClassItem.klass, "to_int", VALUEFUNC(_wrap_Item_to_int), -1); rb_define_method(SwigClassItem.klass, "to_byte", VALUEFUNC(_wrap_Item_to_byte), -1); rb_define_method(SwigClassItem.klass, "to_uint", VALUEFUNC(_wrap_Item_to_uint), -1); @@ -5672,6 +6281,8 @@ SWIGEXPORT void Init_taglib_mp4(void) { rb_define_method(SwigClassItem.klass, "to_byte_vector_list", VALUEFUNC(_wrap_Item_to_byte_vector_list), -1); rb_define_method(SwigClassItem.klass, "to_cover_art_list", VALUEFUNC(_wrap_Item_to_cover_art_list), -1); rb_define_method(SwigClassItem.klass, "valid?", VALUEFUNC(_wrap_Item_validq___), -1); + rb_define_method(SwigClassItem.klass, "type", VALUEFUNC(_wrap_Item_type), -1); + rb_define_method(SwigClassItem.klass, "==", VALUEFUNC(_wrap_Item___eq__), -1); rb_define_singleton_method(SwigClassItem.klass, "from_bool", VALUEFUNC(_wrap_Item_from_bool), -1); rb_define_singleton_method(SwigClassItem.klass, "from_byte", VALUEFUNC(_wrap_Item_from_byte), -1); rb_define_singleton_method(SwigClassItem.klass, "from_uint", VALUEFUNC(_wrap_Item_from_uint), -1); @@ -5684,28 +6295,20 @@ SWIGEXPORT void Init_taglib_mp4(void) { SwigClassItem.destroy = (void (*)(void *)) free_TagLib_MP4_Item; SwigClassItem.trackObjects = 1; - SwigClassFile.klass = rb_define_class_under(mMP4, "File", ((swig_class *) SWIGTYPE_p_TagLib__File->clientdata)->klass); - SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__File, (void *) &SwigClassFile); - rb_define_alloc_func(SwigClassFile.klass, _wrap_File_allocate); - rb_define_method(SwigClassFile.klass, "initialize", VALUEFUNC(_wrap_new_File), -1); - rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1); - rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1); - rb_define_method(SwigClassFile.klass, "save", VALUEFUNC(_wrap_File_save), -1); - rb_define_method(SwigClassFile.klass, "mp4_tag?", VALUEFUNC(_wrap_File_mp4_tagq___), -1); - rb_define_method(SwigClassFile.klass, "close", VALUEFUNC(_wrap_File_close), -1); - SwigClassFile.mark = 0; - SwigClassFile.destroy = (void (*)(void *)) free_taglib_mp4_file; - SwigClassFile.trackObjects = 1; - SwigClassItemMap.klass = rb_define_class_under(mMP4, "ItemMap", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_TagLib__MapT_TagLib__String_TagLib__MP4__Item_t, (void *) &SwigClassItemMap); rb_define_alloc_func(SwigClassItemMap.klass, _wrap_ItemMap_allocate); rb_define_method(SwigClassItemMap.klass, "initialize", VALUEFUNC(_wrap_new_ItemMap), -1); + rb_define_method(SwigClassItemMap.klass, "cbegin", VALUEFUNC(_wrap_ItemMap_cbegin), -1); + rb_define_method(SwigClassItemMap.klass, "cend", VALUEFUNC(_wrap_ItemMap_cend), -1); rb_define_method(SwigClassItemMap.klass, "size", VALUEFUNC(_wrap_ItemMap_size), -1); rb_define_method(SwigClassItemMap.klass, "empty?", VALUEFUNC(_wrap_ItemMap_emptyq___), -1); rb_define_method(SwigClassItemMap.klass, "contains", VALUEFUNC(_wrap_ItemMap_contains), -1); rb_define_alias(SwigClassItemMap.klass, "include?", "contains"); rb_define_alias(SwigClassItemMap.klass, "has_key?", "contains"); + rb_define_method(SwigClassItemMap.klass, "value", VALUEFUNC(_wrap_ItemMap_value), -1); + rb_define_method(SwigClassItemMap.klass, "swap", VALUEFUNC(_wrap_ItemMap_swap), -1); + rb_define_method(SwigClassItemMap.klass, "==", VALUEFUNC(_wrap_ItemMap___eq__), -1); rb_define_method(SwigClassItemMap.klass, "to_a", VALUEFUNC(_wrap_ItemMap_to_a), -1); rb_define_method(SwigClassItemMap.klass, "to_h", VALUEFUNC(_wrap_ItemMap_to_h), -1); rb_define_method(SwigClassItemMap.klass, "fetch", VALUEFUNC(_wrap_ItemMap_fetch), -1); @@ -5715,5 +6318,52 @@ SWIGEXPORT void Init_taglib_mp4(void) { SwigClassItemMap.mark = 0; SwigClassItemMap.destroy = (void (*)(void *)) free_TagLib_Map_Sl_TagLib_String_Sc_TagLib_MP4_Item_Sg_; SwigClassItemMap.trackObjects = 1; + + SwigClassTag.klass = rb_define_class_under(mMP4, "Tag", ((swig_class *) SWIGTYPE_p_TagLib__Tag->clientdata)->klass); + SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__Tag, (void *) &SwigClassTag); + rb_define_alloc_func(SwigClassTag.klass, _wrap_Tag_allocate); + rb_define_method(SwigClassTag.klass, "initialize", VALUEFUNC(_wrap_new_Tag), -1); + rb_define_method(SwigClassTag.klass, "save", VALUEFUNC(_wrap_Tag_save), -1); + rb_define_method(SwigClassTag.klass, "title", VALUEFUNC(_wrap_Tag_title), -1); + rb_define_method(SwigClassTag.klass, "artist", VALUEFUNC(_wrap_Tag_artist), -1); + rb_define_method(SwigClassTag.klass, "album", VALUEFUNC(_wrap_Tag_album), -1); + rb_define_method(SwigClassTag.klass, "comment", VALUEFUNC(_wrap_Tag_comment), -1); + rb_define_method(SwigClassTag.klass, "genre", VALUEFUNC(_wrap_Tag_genre), -1); + rb_define_method(SwigClassTag.klass, "year", VALUEFUNC(_wrap_Tag_year), -1); + rb_define_method(SwigClassTag.klass, "track", VALUEFUNC(_wrap_Tag_track), -1); + rb_define_method(SwigClassTag.klass, "title=", VALUEFUNC(_wrap_Tag_titlee___), -1); + rb_define_method(SwigClassTag.klass, "artist=", VALUEFUNC(_wrap_Tag_artiste___), -1); + rb_define_method(SwigClassTag.klass, "album=", VALUEFUNC(_wrap_Tag_albume___), -1); + rb_define_method(SwigClassTag.klass, "comment=", VALUEFUNC(_wrap_Tag_commente___), -1); + rb_define_method(SwigClassTag.klass, "genre=", VALUEFUNC(_wrap_Tag_genree___), -1); + rb_define_method(SwigClassTag.klass, "year=", VALUEFUNC(_wrap_Tag_yeare___), -1); + rb_define_method(SwigClassTag.klass, "track=", VALUEFUNC(_wrap_Tag_tracke___), -1); + rb_define_method(SwigClassTag.klass, "empty?", VALUEFUNC(_wrap_Tag_emptyq___), -1); + rb_define_method(SwigClassTag.klass, "item_map", VALUEFUNC(_wrap_Tag_item_map), -1); + rb_define_method(SwigClassTag.klass, "[]", VALUEFUNC(_wrap_Tag___getitem__), -1); + rb_define_method(SwigClassTag.klass, "contains", VALUEFUNC(_wrap_Tag_contains), -1); + rb_define_method(SwigClassTag.klass, "strip", VALUEFUNC(_wrap_Tag_strip), -1); + rb_define_method(SwigClassTag.klass, "[]=", VALUEFUNC(_wrap_Tag___setitem__), -1); + rb_define_method(SwigClassTag.klass, "remove_item", VALUEFUNC(_wrap_Tag_remove_item), -1); + SwigClassTag.mark = 0; + SwigClassTag.destroy = (void (*)(void *)) free_TagLib_MP4_Tag; + SwigClassTag.trackObjects = 1; + + SwigClassFile.klass = rb_define_class_under(mMP4, "File", ((swig_class *) SWIGTYPE_p_TagLib__File->clientdata)->klass); + SWIG_TypeClientData(SWIGTYPE_p_TagLib__MP4__File, (void *) &SwigClassFile); + rb_define_alloc_func(SwigClassFile.klass, _wrap_File_allocate); + rb_define_method(SwigClassFile.klass, "initialize", VALUEFUNC(_wrap_new_File), -1); + rb_define_const(SwigClassFile.klass, "NoTags", SWIG_From_int(static_cast< int >(TagLib::MP4::File::NoTags))); + rb_define_const(SwigClassFile.klass, "MP4", SWIG_From_int(static_cast< int >(TagLib::MP4::File::MP4))); + rb_define_const(SwigClassFile.klass, "AllTags", SWIG_From_int(static_cast< int >(TagLib::MP4::File::AllTags))); + rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1); + rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1); + rb_define_method(SwigClassFile.klass, "save", VALUEFUNC(_wrap_File_save), -1); + rb_define_method(SwigClassFile.klass, "strip", VALUEFUNC(_wrap_File_strip), -1); + rb_define_method(SwigClassFile.klass, "mp4_tag?", VALUEFUNC(_wrap_File_mp4_tagq___), -1); + rb_define_method(SwigClassFile.klass, "close", VALUEFUNC(_wrap_File_close), -1); + SwigClassFile.mark = 0; + SwigClassFile.destroy = (void (*)(void *)) free_taglib_mp4_file; + SwigClassFile.trackObjects = 1; } diff --git a/ext/taglib_mpeg/taglib_mpeg.i b/ext/taglib_mpeg/taglib_mpeg.i index 8509f065..766270e4 100644 --- a/ext/taglib_mpeg/taglib_mpeg.i +++ b/ext/taglib_mpeg/taglib_mpeg.i @@ -6,8 +6,6 @@ #include #include #include -#include -using namespace TagLib; %} %include "../taglib_base/includes.i" @@ -16,6 +14,7 @@ using namespace TagLib; %ignore TagLib::MPEG::Header::operator=; %include +%include %include %ignore TagLib::MPEG::length; // Deprecated. @@ -32,6 +31,10 @@ using namespace TagLib; %ignore TagLib::MPEG::File::File(IOStream *, ID3v2::FrameFactory *, bool, Properties::ReadStyle); %ignore TagLib::MPEG::File::File(IOStream *, ID3v2::FrameFactory *, bool); %ignore TagLib::MPEG::File::File(IOStream *, ID3v2::FrameFactory *); +%ignore TagLib::MPEG::File::File(IOStream *, bool, Properties::ReadStyle, ID3v2::FrameFactory *); +%ignore TagLib::MPEG::File::File(IOStream *, bool, Properties::ReadStyle); +%ignore TagLib::MPEG::File::File(IOStream *, bool); +%ignore TagLib::MPEG::File::File(IOStream *); %ignore TagLib::MPEG::File::isSupported(IOStream *); %rename("id3v1_tag?") TagLib::MPEG::File::hasID3v1Tag; %rename("id3v2_tag?") TagLib::MPEG::File::hasID3v2Tag; diff --git a/ext/taglib_mpeg/taglib_mpeg_wrap.cxx b/ext/taglib_mpeg/taglib_mpeg_wrap.cxx index 68ae96a3..d5ca3e46 100644 --- a/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +++ b/ext/taglib_mpeg/taglib_mpeg_wrap.cxx @@ -1865,12 +1865,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__MPEG__XingHeader swig_types[9] #define SWIGTYPE_p_TagLib__Tag swig_types[10] #define SWIGTYPE_p_char swig_types[11] -#define SWIGTYPE_p_unsigned_char swig_types[12] -#define SWIGTYPE_p_unsigned_int swig_types[13] -#define SWIGTYPE_p_unsigned_long swig_types[14] -#define SWIGTYPE_p_wchar_t swig_types[15] -static swig_type_info *swig_types[17]; -static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[12] +#define SWIGTYPE_p_unsigned_char swig_types[13] +#define SWIGTYPE_p_unsigned_int swig_types[14] +#define SWIGTYPE_p_unsigned_long swig_types[15] +#define SWIGTYPE_p_wchar_t swig_types[16] +static swig_type_info *swig_types[18]; +static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1966,34 +1967,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2082,6 +2075,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} #include @@ -2182,6 +2182,43 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) } +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long long *res = (long long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long_SS_long (VALUE obj, long long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} +#endif + + /*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) { @@ -2433,70 +2470,16 @@ _wrap_XingHeader_type(int argc, VALUE *argv, VALUE self) { } -SWIGINTERN VALUE -_wrap_XingHeader_xing_header_offset(int argc, VALUE *argv, VALUE self) { - TagLib::MPEG::Header::Version arg1 ; - TagLib::MPEG::Header::ChannelMode arg2 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; - } - ecode1 = SWIG_AsVal_int(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::Version","TagLib::MPEG::XingHeader::xingHeaderOffset", 1, argv[0] )); - } - arg1 = static_cast< TagLib::MPEG::Header::Version >(val1); - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::ChannelMode","TagLib::MPEG::XingHeader::xingHeaderOffset", 2, argv[1] )); - } - arg2 = static_cast< TagLib::MPEG::Header::ChannelMode >(val2); - result = (int)TagLib::MPEG::XingHeader::xingHeaderOffset(arg1,arg2); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - static swig_class SwigClassHeader; SWIGINTERN VALUE _wrap_new_Header__SWIG_0(int argc, VALUE *argv, VALUE self) { - TagLib::ByteVector *arg1 = 0 ; - TagLib::ByteVector tmp1 ; - TagLib::MPEG::Header *result = 0 ; - - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - { - tmp1 = ruby_string_to_taglib_bytevector(argv[0]); - arg1 = &tmp1; - } - result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header((TagLib::ByteVector const &)*arg1); - DATA_PTR(self) = result; - SWIG_RubyAddTracking(result, self); - return self; -fail: - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) { - TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - long arg2 ; + TagLib::File *arg1 = (TagLib::File *) 0 ; + TagLib::offset_t arg2 ; bool arg3 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -2505,16 +2488,16 @@ _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) { if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","Header", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Header", 1, argv[0] )); } - arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[1], &val2); + arg1 = reinterpret_cast< TagLib::File * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Header", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Header", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); ecode3 = SWIG_AsVal_bool(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","Header", 3, argv[2] )); @@ -2530,28 +2513,28 @@ _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_Header__SWIG_2(int argc, VALUE *argv, VALUE self) { - TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - long arg2 ; +_wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) { + TagLib::File *arg1 = (TagLib::File *) 0 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; TagLib::MPEG::Header *result = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } - res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","Header", 1, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Header", 1, argv[0] )); } - arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[1], &val2); + arg1 = reinterpret_cast< TagLib::File * >(argp1); + ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Header", 2, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Header", 2, argv[1] )); } - arg2 = static_cast< long >(val2); + arg2 = static_cast< TagLib::offset_t >(val2); result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); @@ -2577,7 +2560,7 @@ _wrap_Header_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_Header__SWIG_3(int argc, VALUE *argv, VALUE self) { +_wrap_new_Header__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::Header *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -2619,40 +2602,32 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) { int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__Header, SWIG_POINTER_NO_NULL); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Header__SWIG_3(nargs, args, self); - } - } - if (argc == 1) { - int _v = 0; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Header__SWIG_0(nargs, args, self); + return _wrap_new_Header__SWIG_2(nargs, args, self); } } if (argc == 2) { int _v = 0; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0); _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_Header__SWIG_2(nargs, args, self); + return _wrap_new_Header__SWIG_1(nargs, args, self); } } } if (argc == 3) { int _v = 0; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0); _v = SWIG_CheckState(res); if (_v) { { - int res = SWIG_AsVal_long(argv[1], NULL); + int res = SWIG_AsVal_long_SS_long(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -2661,7 +2636,7 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_Header__SWIG_1(nargs, args, self); + return _wrap_new_Header__SWIG_0(nargs, args, self); } } } @@ -2669,9 +2644,8 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 3, "Header.new", - " Header.new(TagLib::ByteVector const &data)\n" - " Header.new(TagLib::MPEG::File *file, long offset, bool checkLength)\n" - " Header.new(TagLib::MPEG::File *file, long offset)\n" + " Header.new(TagLib::File *file, TagLib::offset_t offset, bool checkLength)\n" + " Header.new(TagLib::File *file, TagLib::offset_t offset)\n" " Header.new(TagLib::MPEG::Header const &h)\n"); return Qnil; @@ -2877,6 +2851,54 @@ _wrap_Header_channel_mode(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_Header_channel_configuration(int argc, VALUE *argv, VALUE self) { + TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::MPEG::Header::ChannelConfiguration result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","channelConfiguration", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1); + result = (TagLib::MPEG::Header::ChannelConfiguration)((TagLib::MPEG::Header const *)arg1)->channelConfiguration(); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Header_is_adts(int argc, VALUE *argv, VALUE self) { + TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isADTS", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1); + result = (bool)((TagLib::MPEG::Header const *)arg1)->isADTS(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_Header_copyrightedq___(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ; @@ -3097,30 +3119,6 @@ free_TagLib_MPEG_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1); - result = (int)((TagLib::MPEG::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ; @@ -3337,6 +3335,54 @@ _wrap_Properties_channel_mode(int argc, VALUE *argv, VALUE self) { } +SWIGINTERN VALUE +_wrap_Properties_channel_configuration(int argc, VALUE *argv, VALUE self) { + TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + TagLib::MPEG::Header::ChannelConfiguration result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","channelConfiguration", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1); + result = (TagLib::MPEG::Header::ChannelConfiguration)((TagLib::MPEG::Properties const *)arg1)->channelConfiguration(); + vresult = SWIG_From_int(static_cast< int >(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_Properties_is_adts(int argc, VALUE *argv, VALUE self) { + TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","isADTS", 1, self )); + } + arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1); + result = (bool)((TagLib::MPEG::Properties const *)arg1)->isADTS(); + vresult = SWIG_From_bool(static_cast< bool >(result)); + return vresult; +fail: + return Qnil; +} + + SWIGINTERN VALUE _wrap_Properties_copyrightedq___(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ; @@ -3389,6 +3435,53 @@ static swig_class SwigClassFile; SWIGINTERN VALUE _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::MPEG::Properties::ReadStyle arg3 ; + TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + TagLib::MPEG::File *result = 0 ; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::MPEG::Properties::ReadStyle >(val3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] )); + } + arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4); + result = (TagLib::MPEG::File *)new TagLib::MPEG::File(arg1,arg2,arg3,arg4); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; TagLib::MPEG::Properties::ReadStyle arg3 ; @@ -3427,7 +3520,7 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; bool val2 ; @@ -3458,7 +3551,7 @@ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::MPEG::File *result = 0 ; @@ -3481,7 +3574,7 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; bool arg3 ; @@ -3528,7 +3621,7 @@ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; bool arg3 ; @@ -3582,7 +3675,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_6(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; void *argp2 = 0 ; @@ -3627,7 +3720,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_2(nargs, args, self); + return _wrap_new_File__SWIG_3(nargs, args, self); } } if (argc == 2) { @@ -3639,7 +3732,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_5(nargs, args, self); + return _wrap_new_File__SWIG_6(nargs, args, self); } } } @@ -3653,7 +3746,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_1(nargs, args, self); + return _wrap_new_File__SWIG_2(nargs, args, self); } } } @@ -3671,7 +3764,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_4(nargs, args, self); + return _wrap_new_File__SWIG_5(nargs, args, self); } } } @@ -3691,7 +3784,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_0(nargs, args, self); + return _wrap_new_File__SWIG_1(nargs, args, self); } } } @@ -3715,7 +3808,32 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_3(nargs, args, self); + return _wrap_new_File__SWIG_4(nargs, args, self); + } + } + } + } + } + if (argc == 4) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_File__SWIG_0(nargs, args, self); } } } @@ -3724,10 +3842,11 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 4, "File.new", - " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle propertiesStyle)\n" + " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n" + " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle)\n" " File.new(TagLib::FileName file, bool readProperties)\n" " File.new(TagLib::FileName file)\n" - " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties, TagLib::MPEG::Properties::ReadStyle propertiesStyle)\n" + " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle)\n" " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties)\n" " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory)\n"); @@ -3811,15 +3930,24 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; int arg2 ; + TagLib::File::StripTags arg3 ; + TagLib::ID3v2::Version arg4 ; + TagLib::File::DuplicateTags arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3831,7 +3959,22 @@ _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] )); } arg2 = static_cast< int >(val2); - result = (bool)(arg1)->save(arg2); + ecode3 = SWIG_AsVal_int(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] )); + } + arg3 = static_cast< TagLib::File::StripTags >(val3); + ecode4 = SWIG_AsVal_int(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 4, argv[2] )); + } + arg4 = static_cast< TagLib::ID3v2::Version >(val4); + ecode5 = SWIG_AsVal_int(argv[3], &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "TagLib::File::DuplicateTags","save", 5, argv[3] )); + } + arg5 = static_cast< TagLib::File::DuplicateTags >(val5); + result = (bool)(arg1)->save(arg2,arg3,arg4,arg5); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -3843,18 +3986,21 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; int arg2 ; - bool arg3 ; + TagLib::File::StripTags arg3 ; + TagLib::ID3v2::Version arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - bool val3 ; + int val3 ; int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3866,12 +4012,17 @@ _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] )); } arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); + ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] )); } - arg3 = static_cast< bool >(val3); - result = (bool)(arg1)->save(arg2,arg3); + arg3 = static_cast< TagLib::File::StripTags >(val3); + ecode4 = SWIG_AsVal_int(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 4, argv[2] )); + } + arg4 = static_cast< TagLib::ID3v2::Version >(val4); + result = (bool)(arg1)->save(arg2,arg3,arg4); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -3883,21 +4034,18 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_3(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; int arg2 ; - bool arg3 ; - int arg4 ; + TagLib::File::StripTags arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - bool val3 ; + int val3 ; int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 3) || (argc > 3)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3909,17 +4057,12 @@ _wrap_File_save__SWIG_3(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] )); } arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); + ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] )); + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] )); } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_int(argv[2], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] )); - } - arg4 = static_cast< int >(val4); - result = (bool)(arg1)->save(arg2,arg3,arg4); + arg3 = static_cast< TagLib::File::StripTags >(val3); + result = (bool)(arg1)->save(arg2,arg3); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -3931,24 +4074,15 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_4(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; int arg2 ; - bool arg3 ; - int arg4 ; - bool arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - bool val5 ; - int ecode5 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 4) || (argc > 4)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3960,22 +4094,7 @@ _wrap_File_save__SWIG_4(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] )); } arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] )); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_int(argv[2], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] )); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_bool(argv[3], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","save", 5, argv[3] )); - } - arg5 = static_cast< bool >(val5); - result = (bool)(arg1)->save(arg2,arg3,arg4,arg5); + result = (bool)(arg1)->save(arg2); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -4014,7 +4133,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_save__SWIG_1(nargs, args, self); + return _wrap_File_save__SWIG_4(nargs, args, self); } } } @@ -4030,11 +4149,11 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { } if (_v) { { - int res = SWIG_AsVal_bool(argv[2], NULL); + int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_save__SWIG_2(nargs, args, self); + return _wrap_File_save__SWIG_3(nargs, args, self); } } } @@ -4051,7 +4170,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { } if (_v) { { - int res = SWIG_AsVal_bool(argv[2], NULL); + int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -4060,7 +4179,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_save__SWIG_3(nargs, args, self); + return _wrap_File_save__SWIG_2(nargs, args, self); } } } @@ -4078,7 +4197,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { } if (_v) { { - int res = SWIG_AsVal_bool(argv[2], NULL); + int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { @@ -4088,11 +4207,11 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { } if (_v) { { - int res = SWIG_AsVal_bool(argv[4], NULL); + int res = SWIG_AsVal_int(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_save__SWIG_4(nargs, args, self); + return _wrap_File_save__SWIG_1(nargs, args, self); } } } @@ -4103,10 +4222,10 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 6, "File.save", " bool File.save()\n" - " bool File.save(int tags)\n" - " bool File.save(int tags, bool stripOthers)\n" - " bool File.save(int tags, bool stripOthers, int id3v2Version)\n" - " bool File.save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags)\n"); + " bool File.save(int tags, TagLib::File::StripTags strip, TagLib::ID3v2::Version version, TagLib::File::DuplicateTags duplicate)\n" + " bool File.save(int tags, TagLib::File::StripTags strip, TagLib::ID3v2::Version version)\n" + " bool File.save(int tags, TagLib::File::StripTags strip)\n" + " bool File.save(int tags)\n"); return Qnil; } @@ -4419,15 +4538,18 @@ SWIGINTERN VALUE _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; int arg2 ; + bool arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4439,7 +4561,12 @@ _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] )); } arg2 = static_cast< int >(val2); - result = (bool)(arg1)->strip(arg2); + ecode3 = SWIG_AsVal_bool(argv[1], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","strip", 3, argv[1] )); + } + arg3 = static_cast< bool >(val3); + result = (bool)(arg1)->strip(arg2,arg3); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -4450,20 +4577,28 @@ _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; + int arg2 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","strip", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - result = (bool)(arg1)->strip(); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] )); + } + arg2 = static_cast< int >(val2); + result = (bool)(arg1)->strip(arg2); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -4474,36 +4609,20 @@ _wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_strip__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - int arg2 ; - bool arg3 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; bool result; VALUE vresult = Qnil; - if ((argc < 2) || (argc > 2)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","strip", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - ecode2 = SWIG_AsVal_int(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] )); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","strip", 3, argv[1] )); - } - arg3 = static_cast< bool >(val3); - result = (bool)(arg1)->strip(arg2,arg3); + result = (bool)(arg1)->strip(); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: @@ -4528,7 +4647,7 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) { int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_File_strip__SWIG_1(nargs, args, self); + return _wrap_File_strip__SWIG_2(nargs, args, self); } } if (argc == 2) { @@ -4542,7 +4661,7 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_strip__SWIG_0(nargs, args, self); + return _wrap_File_strip__SWIG_1(nargs, args, self); } } } @@ -4562,7 +4681,7 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_File_strip__SWIG_2(nargs, args, self); + return _wrap_File_strip__SWIG_0(nargs, args, self); } } } @@ -4570,39 +4689,10 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 4, "File.strip", + " bool File.strip(int tags, bool freeMemory)\n" " bool File.strip(int tags)\n" - " bool File.strip()\n" - " bool File.strip(int tags, bool freeMemory)\n"); - - return Qnil; -} - - -SWIGINTERN VALUE -_wrap_File_set_id3v2_frame_factory(int argc, VALUE *argv, VALUE self) { - TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + " bool File.strip()\n"); - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","setID3v2FrameFactory", 1, self )); - } - arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","setID3v2FrameFactory", 2, argv[0] )); - } - arg2 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp2); - (arg1)->setID3v2FrameFactory((TagLib::ID3v2::FrameFactory const *)arg2); - return Qnil; -fail: return Qnil; } @@ -4612,7 +4702,7 @@ _wrap_File_first_frame_offset(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4623,8 +4713,10 @@ _wrap_File_first_frame_offset(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","firstFrameOffset", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - result = (long)(arg1)->firstFrameOffset(); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->firstFrameOffset(); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -4634,12 +4726,12 @@ _wrap_File_first_frame_offset(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_next_frame_offset(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -4650,13 +4742,15 @@ _wrap_File_next_frame_offset(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","nextFrameOffset", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","nextFrameOffset", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","nextFrameOffset", 2, argv[0] )); } - arg2 = static_cast< long >(val2); - result = (long)(arg1)->nextFrameOffset(arg2); - vresult = SWIG_From_long(static_cast< long >(result)); + arg2 = static_cast< TagLib::offset_t >(val2); + result = (TagLib::offset_t)(arg1)->nextFrameOffset(arg2); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -4666,12 +4760,12 @@ _wrap_File_next_frame_offset(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_File_previous_frame_offset(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; - long arg2 ; + TagLib::offset_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - long val2 ; + long long val2 ; int ecode2 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { @@ -4682,13 +4776,15 @@ _wrap_File_previous_frame_offset(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","previousFrameOffset", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - ecode2 = SWIG_AsVal_long(argv[0], &val2); + ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","previousFrameOffset", 2, argv[0] )); + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","previousFrameOffset", 2, argv[0] )); } - arg2 = static_cast< long >(val2); - result = (long)(arg1)->previousFrameOffset(arg2); - vresult = SWIG_From_long(static_cast< long >(result)); + arg2 = static_cast< TagLib::offset_t >(val2); + result = (TagLib::offset_t)(arg1)->previousFrameOffset(arg2); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -4700,7 +4796,7 @@ _wrap_File_last_frame_offset(int argc, VALUE *argv, VALUE self) { TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - long result; + TagLib::offset_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -4711,8 +4807,10 @@ _wrap_File_last_frame_offset(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","lastFrameOffset", 1, self )); } arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1); - result = (long)(arg1)->lastFrameOffset(); - vresult = SWIG_From_long(static_cast< long >(result)); + result = (TagLib::offset_t)(arg1)->lastFrameOffset(); + { + vresult = taglib_offset_t_to_ruby_int(result); + } return vresult; fail: return Qnil; @@ -4833,6 +4931,7 @@ static swig_type_info _swigt__p_TagLib__MPEG__Properties = {"_p_TagLib__MPEG__Pr static swig_type_info _swigt__p_TagLib__MPEG__XingHeader = {"_p_TagLib__MPEG__XingHeader", "TagLib::MPEG::XingHeader *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -4851,6 +4950,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__MPEG__XingHeader, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -4869,6 +4969,7 @@ static swig_cast_info _swigc__p_TagLib__MPEG__Properties[] = { {&_swigt__p_TagL static swig_cast_info _swigc__p_TagLib__MPEG__XingHeader[] = { {&_swigt__p_TagLib__MPEG__XingHeader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -4887,6 +4988,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__MPEG__XingHeader, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -5162,10 +5264,11 @@ SWIGEXPORT void Init_taglib_mpeg(void) { rb_define_method(SwigClassXingHeader.klass, "total_frames", VALUEFUNC(_wrap_XingHeader_total_frames), -1); rb_define_method(SwigClassXingHeader.klass, "total_size", VALUEFUNC(_wrap_XingHeader_total_size), -1); rb_define_method(SwigClassXingHeader.klass, "type", VALUEFUNC(_wrap_XingHeader_type), -1); - rb_define_singleton_method(SwigClassXingHeader.klass, "xing_header_offset", VALUEFUNC(_wrap_XingHeader_xing_header_offset), -1); SwigClassXingHeader.mark = 0; SwigClassXingHeader.destroy = (void (*)(void *)) free_TagLib_MPEG_XingHeader; SwigClassXingHeader.trackObjects = 1; + rb_define_const(mMPEG, "V3", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v3))); + rb_define_const(mMPEG, "V4", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v4))); SwigClassHeader.klass = rb_define_class_under(mMPEG, "Header", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Header, (void *) &SwigClassHeader); @@ -5175,6 +5278,7 @@ SWIGEXPORT void Init_taglib_mpeg(void) { rb_define_const(SwigClassHeader.klass, "Version1", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version1))); rb_define_const(SwigClassHeader.klass, "Version2", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2))); rb_define_const(SwigClassHeader.klass, "Version2_5", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2_5))); + rb_define_const(SwigClassHeader.klass, "Version4", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version4))); rb_define_method(SwigClassHeader.klass, "version", VALUEFUNC(_wrap_Header_version), -1); rb_define_method(SwigClassHeader.klass, "layer", VALUEFUNC(_wrap_Header_layer), -1); rb_define_method(SwigClassHeader.klass, "protection_enabled", VALUEFUNC(_wrap_Header_protection_enabled), -1); @@ -5186,6 +5290,16 @@ SWIGEXPORT void Init_taglib_mpeg(void) { rb_define_const(SwigClassHeader.klass, "DualChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::DualChannel))); rb_define_const(SwigClassHeader.klass, "SingleChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::SingleChannel))); rb_define_method(SwigClassHeader.klass, "channel_mode", VALUEFUNC(_wrap_Header_channel_mode), -1); + rb_define_const(SwigClassHeader.klass, "Custom", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Custom))); + rb_define_const(SwigClassHeader.klass, "FrontCenter", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenter))); + rb_define_const(SwigClassHeader.klass, "FrontLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontLeftRight))); + rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRight))); + rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackCenter", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackCenter))); + rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackLeftRight))); + rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackLeftRightLFE", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackLeftRightLFE))); + rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightSideLeftRightBackLeftRightLFE", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightSideLeftRightBackLeftRightLFE))); + rb_define_method(SwigClassHeader.klass, "channel_configuration", VALUEFUNC(_wrap_Header_channel_configuration), -1); + rb_define_method(SwigClassHeader.klass, "is_adts", VALUEFUNC(_wrap_Header_is_adts), -1); rb_define_method(SwigClassHeader.klass, "copyrighted?", VALUEFUNC(_wrap_Header_copyrightedq___), -1); rb_define_method(SwigClassHeader.klass, "original?", VALUEFUNC(_wrap_Header_originalq___), -1); rb_define_method(SwigClassHeader.klass, "frame_length", VALUEFUNC(_wrap_Header_frame_length), -1); @@ -5198,7 +5312,6 @@ SWIGEXPORT void Init_taglib_mpeg(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Properties, (void *) &SwigClassProperties); rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate); rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); @@ -5208,6 +5321,8 @@ SWIGEXPORT void Init_taglib_mpeg(void) { rb_define_method(SwigClassProperties.klass, "layer", VALUEFUNC(_wrap_Properties_layer), -1); rb_define_method(SwigClassProperties.klass, "protection_enabled", VALUEFUNC(_wrap_Properties_protection_enabled), -1); rb_define_method(SwigClassProperties.klass, "channel_mode", VALUEFUNC(_wrap_Properties_channel_mode), -1); + rb_define_method(SwigClassProperties.klass, "channel_configuration", VALUEFUNC(_wrap_Properties_channel_configuration), -1); + rb_define_method(SwigClassProperties.klass, "is_adts", VALUEFUNC(_wrap_Properties_is_adts), -1); rb_define_method(SwigClassProperties.klass, "copyrighted?", VALUEFUNC(_wrap_Properties_copyrightedq___), -1); rb_define_method(SwigClassProperties.klass, "original?", VALUEFUNC(_wrap_Properties_originalq___), -1); SwigClassProperties.mark = 0; @@ -5230,7 +5345,6 @@ SWIGEXPORT void Init_taglib_mpeg(void) { rb_define_method(SwigClassFile.klass, "id3v1_tag", VALUEFUNC(_wrap_File_id3v1_tag), -1); rb_define_method(SwigClassFile.klass, "apetag", VALUEFUNC(_wrap_File_apetag), -1); rb_define_method(SwigClassFile.klass, "strip", VALUEFUNC(_wrap_File_strip), -1); - rb_define_method(SwigClassFile.klass, "set_id3v2_frame_factory", VALUEFUNC(_wrap_File_set_id3v2_frame_factory), -1); rb_define_method(SwigClassFile.klass, "first_frame_offset", VALUEFUNC(_wrap_File_first_frame_offset), -1); rb_define_method(SwigClassFile.klass, "next_frame_offset", VALUEFUNC(_wrap_File_next_frame_offset), -1); rb_define_method(SwigClassFile.klass, "previous_frame_offset", VALUEFUNC(_wrap_File_previous_frame_offset), -1); diff --git a/ext/taglib_ogg/taglib_ogg.i b/ext/taglib_ogg/taglib_ogg.i index 28b6fd23..7f306c38 100644 --- a/ext/taglib_ogg/taglib_ogg.i +++ b/ext/taglib_ogg/taglib_ogg.i @@ -4,8 +4,6 @@ #include #include #include -// Help find FLAC:: -using namespace TagLib; %} %include "../taglib_base/includes.i" diff --git a/ext/taglib_ogg/taglib_ogg_wrap.cxx b/ext/taglib_ogg/taglib_ogg_wrap.cxx index 94079e83..4d8b8235 100644 --- a/ext/taglib_ogg/taglib_ogg_wrap.cxx +++ b/ext/taglib_ogg/taglib_ogg_wrap.cxx @@ -1859,12 +1859,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[6] #define SWIGTYPE_p_TagLib__Tag swig_types[7] #define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_unsigned_char swig_types[9] -#define SWIGTYPE_p_unsigned_int swig_types[10] -#define SWIGTYPE_p_unsigned_long swig_types[11] -#define SWIGTYPE_p_wchar_t swig_types[12] -static swig_type_info *swig_types[14]; -static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[9] +#define SWIGTYPE_p_unsigned_char swig_types[10] +#define SWIGTYPE_p_unsigned_int swig_types[11] +#define SWIGTYPE_p_unsigned_long swig_types[12] +#define SWIGTYPE_p_wchar_t swig_types[13] +static swig_type_info *swig_types[15]; +static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1938,8 +1939,6 @@ template T SwigValueInit() { #include #include #include -// Help find FLAC:: -using namespace TagLib; #include @@ -1960,34 +1959,26 @@ using namespace TagLib; #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2076,6 +2067,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List & list) { @@ -3340,20 +3338,28 @@ _wrap_XiphComment_containsq___(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_XiphComment_render__SWIG_0(int argc, VALUE *argv, VALUE self) { TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ; + bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; TagLib::ByteVector result; VALUE vresult = Qnil; - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self )); } arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1); - result = ((TagLib::Ogg::XiphComment const *)arg1)->render(); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] )); + } + arg2 = static_cast< bool >(val2); + result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2); { vresult = taglib_bytevector_to_ruby_string(result); } @@ -3366,28 +3372,20 @@ _wrap_XiphComment_render__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_XiphComment_render__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ; - bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; TagLib::ByteVector result; VALUE vresult = Qnil; - if ((argc < 1) || (argc > 1)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self )); } arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1); - ecode2 = SWIG_AsVal_bool(argv[0], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] )); - } - arg2 = static_cast< bool >(val2); - result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2); + result = ((TagLib::Ogg::XiphComment const *)arg1)->render(); { vresult = taglib_bytevector_to_ruby_string(result); } @@ -3414,7 +3412,7 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) { int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_XiphComment_render__SWIG_0(nargs, args, self); + return _wrap_XiphComment_render__SWIG_1(nargs, args, self); } } if (argc == 2) { @@ -3428,15 +3426,15 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_XiphComment_render__SWIG_1(nargs, args, self); + return _wrap_XiphComment_render__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "XiphComment.render", - " TagLib::ByteVector XiphComment.render()\n" - " TagLib::ByteVector XiphComment.render(bool addFramingBit)\n"); + " TagLib::ByteVector XiphComment.render(bool addFramingBit)\n" + " TagLib::ByteVector XiphComment.render()\n"); return Qnil; } @@ -3657,6 +3655,7 @@ static swig_type_info _swigt__p_TagLib__Ogg__PageHeader = {"_p_TagLib__Ogg__Page static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -3672,6 +3671,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__Ogg__XiphComment, &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -3687,6 +3687,7 @@ static swig_cast_info _swigc__p_TagLib__Ogg__PageHeader[] = { {&_swigt__p_TagLi static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__Ogg__XiphComment, _p_TagLib__Ogg__XiphCommentTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -3702,6 +3703,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__Ogg__XiphComment, _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, diff --git a/ext/taglib_vorbis/taglib_vorbis_wrap.cxx b/ext/taglib_vorbis/taglib_vorbis_wrap.cxx index 40c5ad24..75ee1b8c 100644 --- a/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +++ b/ext/taglib_vorbis/taglib_vorbis_wrap.cxx @@ -1862,12 +1862,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) #define SWIGTYPE_p_TagLib__Vorbis__File swig_types[6] #define SWIGTYPE_p_TagLib__Vorbis__Properties swig_types[7] #define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_unsigned_char swig_types[9] -#define SWIGTYPE_p_unsigned_int swig_types[10] -#define SWIGTYPE_p_unsigned_long swig_types[11] -#define SWIGTYPE_p_wchar_t swig_types[12] -static swig_type_info *swig_types[14]; -static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[9] +#define SWIGTYPE_p_unsigned_char swig_types[10] +#define SWIGTYPE_p_unsigned_int swig_types[11] +#define SWIGTYPE_p_unsigned_long swig_types[12] +#define SWIGTYPE_p_wchar_t swig_types[13] +static swig_type_info *swig_types[15]; +static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1960,34 +1961,26 @@ template T SwigValueInit() { #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2076,6 +2069,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} #include @@ -2376,30 +2376,6 @@ free_TagLib_Vorbis_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1); - result = (int)((TagLib::Vorbis::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ; @@ -2874,14 +2850,15 @@ static void *_p_TagLib__Vorbis__FileTo_p_TagLib__Ogg__File(void *x, int *SWIGUNU return (void *)((TagLib::Ogg::File *) ((TagLib::Vorbis::File *) x)); } static swig_type_info _swigt__p_MapT_TagLib__String_TagLib__StringList_t = {"_p_MapT_TagLib__String_TagLib__StringList_t", "TagLib::Ogg::FieldListMap *|Map< TagLib::String,TagLib::StringList > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::Ogg::Vorbis::AudioProperties *|TagLib::AudioProperties *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::FLAC::PictureList *|TagLib::List< TagLib::FLAC::Picture > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__Vorbis__File = {"_p_TagLib__Vorbis__File", "TagLib::Ogg::Vorbis::File *|TagLib::Vorbis::File *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_TagLib__Vorbis__Properties = {"_p_TagLib__Vorbis__Properties", "TagLib::Vorbis::Properties *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__Vorbis__Properties = {"_p_TagLib__Vorbis__Properties", "TagLib::Ogg::Vorbis::Properties *|TagLib::Vorbis::Properties *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; @@ -2897,6 +2874,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_TagLib__Vorbis__File, &_swigt__p_TagLib__Vorbis__Properties, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, @@ -2912,6 +2890,7 @@ static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagL static swig_cast_info _swigc__p_TagLib__Vorbis__File[] = { {&_swigt__p_TagLib__Vorbis__File, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__Vorbis__Properties[] = { {&_swigt__p_TagLib__Vorbis__Properties, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; @@ -2927,6 +2906,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_TagLib__Vorbis__File, _swigc__p_TagLib__Vorbis__Properties, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -3198,7 +3178,6 @@ SWIGEXPORT void Init_taglib_vorbis(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__Vorbis__Properties, (void *) &SwigClassProperties); rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate); rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); diff --git a/ext/taglib_wav/taglib_wav.i b/ext/taglib_wav/taglib_wav.i index 2ca3afe3..ebaf615f 100644 --- a/ext/taglib_wav/taglib_wav.i +++ b/ext/taglib_wav/taglib_wav.i @@ -4,9 +4,7 @@ #include #include #include -#include using namespace TagLib::RIFF; -using namespace TagLib; using StripTags = TagLib::File::StripTags; %} @@ -31,6 +29,7 @@ namespace TagLib { // Ignore IOStream and all the constructors using it. %ignore IOStream; +%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool, Properties::ReadStyle, ID3v2::FrameFactory *f); %ignore TagLib::RIFF::WAV::File::File(IOStream *, bool, Properties::ReadStyle); %ignore TagLib::RIFF::WAV::File::File(IOStream *, bool); %ignore TagLib::RIFF::WAV::File::File(IOStream *); @@ -58,11 +57,7 @@ namespace TagLib { static void free_taglib_riff_wav_file(void *ptr) { TagLib::RIFF::WAV::File *file = (TagLib::RIFF::WAV::File *) ptr; -#if TAGLIB_MAJOR_VERSION >= 2 TagLib::ID3v2::Tag *id3v2tag = file->ID3v2Tag(); -#else - TagLib::ID3v2::Tag *id3v2tag = file->tag(); -#endif if (id3v2tag) { TagLib::ID3v2::FrameList frames = id3v2tag->frameList(); for (TagLib::ID3v2::FrameList::ConstIterator it = frames.begin(); it != frames.end(); it++) { diff --git a/ext/taglib_wav/taglib_wav_wrap.cxx b/ext/taglib_wav/taglib_wav_wrap.cxx index a75a793b..df032bef 100644 --- a/ext/taglib_wav/taglib_wav_wrap.cxx +++ b/ext/taglib_wav/taglib_wav_wrap.cxx @@ -1853,17 +1853,22 @@ int SWIG_Ruby_arity( VALUE proc, int minimal ) /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_TagLib__AudioProperties swig_types[0] -#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[1] -#define SWIGTYPE_p_TagLib__RIFF__WAV__File swig_types[2] -#define SWIGTYPE_p_TagLib__RIFF__WAV__Properties swig_types[3] -#define SWIGTYPE_p_char swig_types[4] -#define SWIGTYPE_p_unsigned_char swig_types[5] -#define SWIGTYPE_p_unsigned_int swig_types[6] -#define SWIGTYPE_p_unsigned_long swig_types[7] -#define SWIGTYPE_p_wchar_t swig_types[8] -static swig_type_info *swig_types[10]; -static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0}; +#define SWIGTYPE_p_StripTags swig_types[0] +#define SWIGTYPE_p_TagLib__AudioProperties swig_types[1] +#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[2] +#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[3] +#define SWIGTYPE_p_TagLib__ID3v2__Version swig_types[4] +#define SWIGTYPE_p_TagLib__RIFF__WAV__File swig_types[5] +#define SWIGTYPE_p_TagLib__RIFF__WAV__Properties swig_types[6] +#define SWIGTYPE_p_TagLib__Tag swig_types[7] +#define SWIGTYPE_p_char swig_types[8] +#define SWIGTYPE_p_long_long swig_types[9] +#define SWIGTYPE_p_unsigned_char swig_types[10] +#define SWIGTYPE_p_unsigned_int swig_types[11] +#define SWIGTYPE_p_unsigned_long swig_types[12] +#define SWIGTYPE_p_wchar_t swig_types[13] +static swig_type_info *swig_types[15]; +static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1938,6 +1943,7 @@ template T SwigValueInit() { #include #include using namespace TagLib::RIFF; +using StripTags = TagLib::File::StripTags; #include @@ -1958,34 +1964,26 @@ using namespace TagLib::RIFF; #endif VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) { - if (byteVector.isNull()) { - return Qnil; - } else { - return rb_str_new(byteVector.data(), byteVector.size()); - } + return rb_str_new(byteVector.data(), byteVector.size()); } TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) { if (NIL_P(s)) { - return TagLib::ByteVector::null; + return TagLib::ByteVector(); } else { return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s)); } } VALUE taglib_string_to_ruby_string(const TagLib::String & string) { - if (string.isNull()) { - return Qnil; - } else { - VALUE result = rb_str_new2(string.toCString(true)); - ASSOCIATE_UTF8_ENCODING(result); - return result; - } + VALUE result = rb_str_new2(string.toCString(true)); + ASSOCIATE_UTF8_ENCODING(result); + return result; } TagLib::String ruby_string_to_taglib_string(VALUE s) { if (NIL_P(s)) { - return TagLib::String::null; + return TagLib::String(); } else { return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8); } @@ -2074,6 +2072,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) { #endif } +VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) { +#ifdef _WIN32 + return LL2NUM(off); +#else + return OFFT2NUM(off); +#endif +} #include @@ -2246,7 +2251,7 @@ SWIGINTERN void TagLib_RIFF_WAV_File_close(TagLib::RIFF::WAV::File *self){ static void free_taglib_riff_wav_file(void *ptr) { TagLib::RIFF::WAV::File *file = (TagLib::RIFF::WAV::File *) ptr; - TagLib::ID3v2::Tag *id3v2tag = file->tag(); + TagLib::ID3v2::Tag *id3v2tag = file->ID3v2Tag(); if (id3v2tag) { TagLib::ID3v2::FrameList frames = id3v2tag->frameList(); for (TagLib::ID3v2::FrameList::ConstIterator it = frames.begin(); it != frames.end(); it++) { @@ -2327,30 +2332,6 @@ free_TagLib_RIFF_WAV_Properties(void *self) { delete arg1; } -SWIGINTERN VALUE -_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) { - TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) { - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; - } - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","lengthInSeconds", 1, self )); - } - arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1); - result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->lengthInSeconds(); - vresult = SWIG_From_int(static_cast< int >(result)); - return vresult; -fail: - return Qnil; -} - - SWIGINTERN VALUE _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ; @@ -2523,6 +2504,53 @@ static swig_class SwigClassFile; SWIGINTERN VALUE _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { + TagLib::FileName arg1 ; + bool arg2 ; + TagLib::RIFF::WAV::Properties::ReadStyle arg3 ; + TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + TagLib::RIFF::WAV::File *result = 0 ; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + { + arg1 = ruby_string_to_taglib_filename(argv[0]); + if ((const char *)(TagLib::FileName)(arg1) == NULL) { + SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name."); + } + } + ecode2 = SWIG_AsVal_bool(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] )); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties::ReadStyle","File", 3, argv[2] )); + } + arg3 = static_cast< TagLib::RIFF::WAV::Properties::ReadStyle >(val3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] )); + } + arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4); + result = (TagLib::RIFF::WAV::File *)new TagLib::RIFF::WAV::File(arg1,arg2,arg3,arg4); + DATA_PTR(self) = result; + SWIG_RubyAddTracking(result, self); + return self; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; TagLib::RIFF::WAV::Properties::ReadStyle arg3 ; @@ -2561,7 +2589,7 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE -_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; bool arg2 ; bool val2 ; @@ -2607,7 +2635,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self) SWIGINTERN VALUE -_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { +_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) { TagLib::FileName arg1 ; TagLib::RIFF::WAV::File *result = 0 ; @@ -2631,11 +2659,11 @@ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int argc; - VALUE argv[3]; + VALUE argv[4]; int ii; argc = nargs; - if (argc > 3) SWIG_fail; + if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } @@ -2644,7 +2672,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_File__SWIG_2(nargs, args, self); + return _wrap_new_File__SWIG_3(nargs, args, self); } } if (argc == 2) { @@ -2657,7 +2685,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_1(nargs, args, self); + return _wrap_new_File__SWIG_2(nargs, args, self); } } } @@ -2676,14 +2704,40 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - return _wrap_new_File__SWIG_0(nargs, args, self); + return _wrap_new_File__SWIG_1(nargs, args, self); + } + } + } + } + if (argc == 4) { + int _v = 0; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_File__SWIG_0(nargs, args, self); + } } } } } fail: - Ruby_Format_OverloadedError( argc, 3, "File.new", + Ruby_Format_OverloadedError( argc, 4, "File.new", + " File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::WAV::Properties::ReadStyle propertiesStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n" " File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::WAV::Properties::ReadStyle propertiesStyle)\n" " File.new(TagLib::FileName file, bool readProperties)\n" " File.new(TagLib::FileName file)\n"); @@ -2697,7 +2751,7 @@ _wrap_File_tag(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - TagLib::ID3v2::Tag *result = 0 ; + TagLib::Tag *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { @@ -2708,8 +2762,8 @@ _wrap_File_tag(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","tag", 1, self )); } arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1); - result = (TagLib::ID3v2::Tag *)((TagLib::RIFF::WAV::File const *)arg1)->tag(); - vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Tag, 0 | 0 ); + result = (TagLib::Tag *)((TagLib::RIFF::WAV::File const *)arg1)->tag(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__Tag, 0 | 0 ); return vresult; fail: return Qnil; @@ -2887,16 +2941,16 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ; TagLib::RIFF::WAV::File::TagTypes arg2 ; - bool arg3 ; - int arg4 ; + StripTags arg3 ; + TagLib::ID3v2::Version arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; bool result; VALUE vresult = Qnil; @@ -2913,16 +2967,28 @@ _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","save", 2, argv[0] )); } arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] )); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_int(argv[2], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] )); - } - arg4 = static_cast< int >(val4); + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_StripTags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "StripTags","save", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "StripTags","save", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< StripTags * >(argp3)); + } + } + { + res4 = SWIG_ConvertPtr(argv[2], &argp4, SWIGTYPE_p_TagLib__ID3v2__Version, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 4, argv[2] )); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ID3v2::Version","save", 4, argv[2])); + } else { + arg4 = *(reinterpret_cast< TagLib::ID3v2::Version * >(argp4)); + } + } result = (bool)(arg1)->save(arg2,arg3,arg4); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; @@ -2935,13 +3001,13 @@ SWIGINTERN VALUE _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) { TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ; TagLib::RIFF::WAV::File::TagTypes arg2 ; - bool arg3 ; + StripTags arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; + void *argp3 ; + int res3 = 0 ; bool result; VALUE vresult = Qnil; @@ -2958,11 +3024,17 @@ _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","save", 2, argv[0] )); } arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2); - ecode3 = SWIG_AsVal_bool(argv[1], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] )); - } - arg3 = static_cast< bool >(val3); + { + res3 = SWIG_ConvertPtr(argv[1], &argp3, SWIGTYPE_p_StripTags, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "StripTags","save", 3, argv[1] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "StripTags","save", 3, argv[1])); + } else { + arg3 = *(reinterpret_cast< StripTags * >(argp3)); + } + } result = (bool)(arg1)->save(arg2,arg3); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; @@ -3049,10 +3121,9 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_StripTags, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); if (_v) { return _wrap_File_save__SWIG_2(nargs, args, self); } @@ -3070,15 +3141,13 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { _v = SWIG_CheckState(res); } if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_StripTags, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__Version, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); if (_v) { return _wrap_File_save__SWIG_1(nargs, args, self); } @@ -3090,8 +3159,8 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) { fail: Ruby_Format_OverloadedError( argc, 5, "File.save", " bool File.save()\n" - " bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, bool stripOthers, int id3v2Version)\n" - " bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, bool stripOthers)\n" + " bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, StripTags strip, TagLib::ID3v2::Version version)\n" + " bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, StripTags strip)\n" " bool File.save(TagLib::RIFF::WAV::File::TagTypes tags)\n"); return Qnil; @@ -3173,44 +3242,64 @@ _wrap_File_close(int argc, VALUE *argv, VALUE self) { static void *_p_TagLib__RIFF__WAV__PropertiesTo_p_TagLib__AudioProperties(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((TagLib::AudioProperties *) ((TagLib::RIFF::WAV::Properties *) x)); } +static swig_type_info _swigt__p_StripTags = {"_p_StripTags", "StripTags *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__ID3v2__FrameFactory = {"_p_TagLib__ID3v2__FrameFactory", "TagLib::ID3v2::FrameFactory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__ID3v2__Tag = {"_p_TagLib__ID3v2__Tag", "TagLib::ID3v2::Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__ID3v2__Version = {"_p_TagLib__ID3v2__Version", "TagLib::ID3v2::Version *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__RIFF__WAV__File = {"_p_TagLib__RIFF__WAV__File", "TagLib::RIFF::WAV::File *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TagLib__RIFF__WAV__Properties = {"_p_TagLib__RIFF__WAV__Properties", "TagLib::RIFF::WAV::Properties *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { + &_swigt__p_StripTags, &_swigt__p_TagLib__AudioProperties, + &_swigt__p_TagLib__ID3v2__FrameFactory, &_swigt__p_TagLib__ID3v2__Tag, + &_swigt__p_TagLib__ID3v2__Version, &_swigt__p_TagLib__RIFF__WAV__File, &_swigt__p_TagLib__RIFF__WAV__Properties, + &_swigt__p_TagLib__Tag, &_swigt__p_char, + &_swigt__p_long_long, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long, &_swigt__p_wchar_t, }; +static swig_cast_info _swigc__p_StripTags[] = { {&_swigt__p_StripTags, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__RIFF__WAV__Properties, _p_TagLib__RIFF__WAV__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__ID3v2__Tag[] = { {&_swigt__p_TagLib__ID3v2__Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__ID3v2__Version[] = { {&_swigt__p_TagLib__ID3v2__Version, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__RIFF__WAV__File[] = { {&_swigt__p_TagLib__RIFF__WAV__File, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TagLib__RIFF__WAV__Properties[] = { {&_swigt__p_TagLib__RIFF__WAV__Properties, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { + _swigc__p_StripTags, _swigc__p_TagLib__AudioProperties, + _swigc__p_TagLib__ID3v2__FrameFactory, _swigc__p_TagLib__ID3v2__Tag, + _swigc__p_TagLib__ID3v2__Version, _swigc__p_TagLib__RIFF__WAV__File, _swigc__p_TagLib__RIFF__WAV__Properties, + _swigc__p_TagLib__Tag, _swigc__p_char, + _swigc__p_long_long, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long, @@ -3480,7 +3569,6 @@ SWIGEXPORT void Init_taglib_wav(void) { SWIG_TypeClientData(SWIGTYPE_p_TagLib__RIFF__WAV__Properties, (void *) &SwigClassProperties); rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate); rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1); - rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1); rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1); rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1); rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1); diff --git a/tasks/build.rb b/tasks/build.rb index a7e24da6..ebb13bad 100644 --- a/tasks/build.rb +++ b/tasks/build.rb @@ -7,7 +7,7 @@ def plat end def version - ENV['TAGLIB_VERSION'] || '1.11.1' + ENV['TAGLIB_VERSION'] || '2.0.1' end def dir