taglib-ruby 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,20 +2,21 @@
2
2
  %{
3
3
  #include <taglib/taglib.h>
4
4
  #include <taglib/tfile.h>
5
+ #include <taglib/tstringlist.h>
6
+ #include <taglib/xingheader.h>
7
+ #include <taglib/mpegheader.h>
5
8
  #include <taglib/mpegproperties.h>
6
9
  #include <taglib/mpegfile.h>
7
10
  #include <taglib/id3v2tag.h>
8
11
  %}
9
12
 
10
- %include <std_list.i>
11
-
13
+ %include "../taglib_base/includes.i"
12
14
  %import(module="taglib_base") "../taglib_base/taglib_base.i"
13
15
 
14
- namespace TagLib {
15
- namespace MPEG {
16
- class Properties;
17
- }
18
- }
16
+ %ignore TagLib::MPEG::Header::operator=;
17
+ %include <taglib/xingheader.h>
18
+ %include <taglib/mpegheader.h>
19
+ %include <taglib/mpegproperties.h>
19
20
 
20
21
  %rename(id3v1_tag) TagLib::MPEG::File::ID3v1Tag;
21
22
  %rename(id3v2_tag) TagLib::MPEG::File::ID3v2Tag;
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.1
3
+ * Version 2.0.4
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -1811,32 +1811,24 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1811
1811
 
1812
1812
 
1813
1813
 
1814
- #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0)
1815
-
1816
-
1817
1814
  /* -------- TYPES TABLE (BEGIN) -------- */
1818
1815
 
1819
1816
  #define SWIGTYPE_p_TagLib__APE__Tag swig_types[0]
1820
- #define SWIGTYPE_p_TagLib__File swig_types[1]
1821
- #define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[2]
1822
- #define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[3]
1823
- #define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[4]
1824
- #define SWIGTYPE_p_TagLib__MPEG__File swig_types[5]
1825
- #define SWIGTYPE_p_TagLib__MPEG__Properties swig_types[6]
1826
- #define SWIGTYPE_p_TagLib__MPEG__Properties__ReadStyle swig_types[7]
1827
- #define SWIGTYPE_p_TagLib__Tag swig_types[8]
1828
- #define SWIGTYPE_p_char swig_types[9]
1829
- #define SWIGTYPE_p_p_void swig_types[10]
1830
- #define SWIGTYPE_p_std__basic_stringT_wchar_t_t swig_types[11]
1831
- #define SWIGTYPE_p_swig__ConstIterator swig_types[12]
1832
- #define SWIGTYPE_p_swig__GC_VALUE swig_types[13]
1833
- #define SWIGTYPE_p_swig__Iterator swig_types[14]
1834
- #define SWIGTYPE_p_unsigned_char swig_types[15]
1835
- #define SWIGTYPE_p_unsigned_int swig_types[16]
1836
- #define SWIGTYPE_p_unsigned_long swig_types[17]
1837
- #define SWIGTYPE_p_wchar_t swig_types[18]
1838
- static swig_type_info *swig_types[20];
1839
- static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
1817
+ #define SWIGTYPE_p_TagLib__AudioProperties swig_types[1]
1818
+ #define SWIGTYPE_p_TagLib__ByteVector swig_types[2]
1819
+ #define SWIGTYPE_p_TagLib__File swig_types[3]
1820
+ #define SWIGTYPE_p_TagLib__ID3v1__Tag swig_types[4]
1821
+ #define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[5]
1822
+ #define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[6]
1823
+ #define SWIGTYPE_p_TagLib__MPEG__File swig_types[7]
1824
+ #define SWIGTYPE_p_TagLib__MPEG__Header swig_types[8]
1825
+ #define SWIGTYPE_p_TagLib__MPEG__Properties swig_types[9]
1826
+ #define SWIGTYPE_p_TagLib__MPEG__XingHeader swig_types[10]
1827
+ #define SWIGTYPE_p_TagLib__Tag swig_types[11]
1828
+ #define SWIGTYPE_p_char swig_types[12]
1829
+ #define SWIGTYPE_p_unsigned_int swig_types[13]
1830
+ static swig_type_info *swig_types[15];
1831
+ static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
1840
1832
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1841
1833
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1842
1834
 
@@ -1851,7 +1843,7 @@ static VALUE mMPEG;
1851
1843
  #define SWIG_RUBY_THREAD_END_BLOCK
1852
1844
 
1853
1845
 
1854
- #define SWIGVERSION 0x020001
1846
+ #define SWIGVERSION 0x020004
1855
1847
  #define SWIG_VERSION SWIGVERSION
1856
1848
 
1857
1849
 
@@ -1864,548 +1856,100 @@ static VALUE mMPEG;
1864
1856
 
1865
1857
  #include <taglib/taglib.h>
1866
1858
  #include <taglib/tfile.h>
1859
+ #include <taglib/tstringlist.h>
1860
+ #include <taglib/xingheader.h>
1861
+ #include <taglib/mpegheader.h>
1867
1862
  #include <taglib/mpegproperties.h>
1868
1863
  #include <taglib/mpegfile.h>
1869
1864
  #include <taglib/id3v2tag.h>
1870
1865
 
1871
1866
 
1872
- #include <iostream>
1873
-
1874
-
1875
- #include <stdexcept>
1876
-
1877
-
1878
- namespace swig {
1879
- class GC_VALUE {
1880
- protected:
1881
- // Hash of all GC_VALUE's currently in use
1882
- static VALUE _hash;
1883
-
1884
- VALUE _obj;
1885
-
1886
- static ID hash_id;
1887
- static ID lt_id;
1888
- static ID gt_id;
1889
- static ID eq_id;
1890
- static ID le_id;
1891
- static ID ge_id;
1892
-
1893
- static ID pos_id;
1894
- static ID neg_id;
1895
- static ID inv_id;
1896
-
1897
- static ID add_id;
1898
- static ID sub_id;
1899
- static ID mul_id;
1900
- static ID div_id;
1901
- static ID mod_id;
1902
-
1903
- static ID and_id;
1904
- static ID or_id;
1905
- static ID xor_id;
1906
-
1907
- static ID lshift_id;
1908
- static ID rshift_id;
1909
-
1910
- struct OpArgs
1911
- {
1912
- VALUE src;
1913
- ID id;
1914
- int nargs;
1915
- VALUE target;
1916
- };
1917
-
1918
-
1919
- public:
1920
- static void initialize()
1921
- {
1922
- if ( _hash == Qnil )
1923
- {
1924
- _hash = rb_hash_new();
1925
- rb_gc_register_address( &_hash );
1926
- }
1927
- }
1928
-
1929
- // this function is never called. Provided for symmetry only.
1930
- static void cleanup()
1931
- {
1932
- rb_gc_unregister_address( &_hash );
1933
- }
1934
-
1935
- GC_VALUE() : _obj( Qnil )
1936
- {
1937
- }
1938
-
1939
- GC_VALUE(const GC_VALUE& item) : _obj(item._obj)
1940
- {
1941
- GC_register();
1942
- }
1943
-
1944
- GC_VALUE(VALUE obj) :_obj(obj)
1945
- {
1946
- GC_register();
1947
- }
1948
-
1949
- ~GC_VALUE()
1950
- {
1951
- GC_unregister();
1952
- }
1953
-
1954
- GC_VALUE & operator=(const GC_VALUE& item)
1955
- {
1956
- GC_unregister();
1957
- _obj = item._obj;
1958
- GC_register();
1959
- return *this;
1960
- }
1961
-
1962
- void GC_register()
1963
- {
1964
- if ( FIXNUM_P(_obj) || SPECIAL_CONST_P(_obj) || SYMBOL_P(_obj) )
1965
- return;
1966
- VALUE val = rb_hash_aref( _hash, _obj );
1967
- unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 0;
1968
- ++n;
1969
- rb_hash_aset( _hash, _obj, INT2NUM(n) );
1970
- }
1971
-
1972
- void GC_unregister()
1973
- {
1974
- if ( FIXNUM_P(_obj) || SPECIAL_CONST_P(_obj) || SYMBOL_P(_obj) )
1975
- return;
1976
- // this test should not be needed but I've noticed some very erratic
1977
- // behavior of none being unregistered in some very rare situations.
1978
- if ( BUILTIN_TYPE(_obj) == T_NONE ) return;
1979
-
1980
- VALUE val = rb_hash_aref( _hash, _obj );
1981
- unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 1;
1982
- --n;
1983
- if ( n )
1984
- rb_hash_aset( _hash, _obj, INT2NUM(n) );
1985
- else
1986
- rb_hash_delete( _hash, _obj );
1987
- }
1988
-
1989
- operator VALUE() const
1990
- {
1991
- return _obj;
1992
- }
1993
-
1994
- VALUE inspect() const
1995
- {
1996
- return rb_inspect(_obj);
1997
- }
1998
-
1999
- VALUE to_s() const
2000
- {
2001
- return rb_inspect(_obj);
2002
- }
2003
-
2004
- static VALUE swig_protect_funcall( VALUE p )
2005
- {
2006
- OpArgs* args = (OpArgs*) p;
2007
- return rb_funcall( args->src, args->id, args->nargs, args->target );
2008
- }
2009
-
2010
-
2011
- #define GC_VALUE_CMP( op_id, op, cmp, cmpval ) \
2012
- bool op( const GC_VALUE& other ) const \
2013
- { \
2014
- if ( FIXNUM_P(_obj) && FIXNUM_P(other._obj) ) \
2015
- { \
2016
- return _obj cmp other._obj; \
2017
- } \
2018
- bool res = false; \
2019
- VALUE ret = Qnil; \
2020
- SWIG_RUBY_THREAD_BEGIN_BLOCK; \
2021
- if ( rb_respond_to( _obj, op_id ) == Qtrue ) \
2022
- { \
2023
- int status; \
2024
- OpArgs args; \
2025
- args.src = _obj; \
2026
- args.id = op_id; \
2027
- args.nargs = 1; \
2028
- args.target = VALUE(other); \
2029
- ret = rb_protect( PROTECTFUNC(swig_protect_funcall), \
2030
- VALUE(&args), &status ); \
2031
- } \
2032
- if ( ret == Qnil ) { \
2033
- VALUE a = rb_funcall( _obj, hash_id, 0 ); \
2034
- VALUE b = rb_funcall( VALUE(other), hash_id, 0 ); \
2035
- res = a cmp b; \
2036
- } \
2037
- else \
2038
- { \
2039
- res = RTEST( ret ); \
2040
- } \
2041
- SWIG_RUBY_THREAD_END_BLOCK; \
2042
- return res; \
2043
- }
2044
-
2045
-
2046
- GC_VALUE_CMP( eq_id, operator==, ==, == 0 )
2047
- GC_VALUE_CMP( lt_id, operator<, < , < 0 )
2048
- GC_VALUE_CMP( le_id, operator<=, <=, <= 0 )
2049
- GC_VALUE_CMP( gt_id, operator>, > , > 0 )
2050
- GC_VALUE_CMP( ge_id, operator>=, >=, >= 0 )
2051
- #undef GC_VALUE_CMP
2052
-
2053
- bool operator!=( const GC_VALUE& other )
2054
- {
2055
- return !(this->operator==(other));
2056
- }
2057
-
2058
- #define GC_VALUE_UNARY( proc_id, op ) \
2059
- GC_VALUE op() const \
2060
- { \
2061
- VALUE ret = Qnil; \
2062
- SWIG_RUBY_THREAD_BEGIN_BLOCK; \
2063
- int status; \
2064
- OpArgs args; \
2065
- args.src = _obj; \
2066
- args.id = proc_id; \
2067
- args.nargs = 0; \
2068
- args.target = Qnil; \
2069
- ret = rb_protect( PROTECTFUNC(swig_protect_funcall), VALUE(&args), \
2070
- &status ); \
2071
- SWIG_RUBY_THREAD_END_BLOCK; \
2072
- return ret; \
2073
- }
2074
-
2075
- GC_VALUE_UNARY( pos_id, operator+ )
2076
- GC_VALUE_UNARY( neg_id, operator- )
2077
- GC_VALUE_UNARY( inv_id, operator~ )
2078
- #undef GC_VALUE_BINARY
2079
-
2080
- #define GC_VALUE_BINARY( proc_id, op ) \
2081
- GC_VALUE op( const GC_VALUE& other ) const \
2082
- { \
2083
- VALUE ret = Qnil; \
2084
- SWIG_RUBY_THREAD_BEGIN_BLOCK; \
2085
- int status; \
2086
- OpArgs args; \
2087
- args.src = _obj; \
2088
- args.id = proc_id; \
2089
- args.nargs = 1; \
2090
- args.target = VALUE(other); \
2091
- ret = rb_protect( PROTECTFUNC(swig_protect_funcall), VALUE(&args), \
2092
- &status ); \
2093
- SWIG_RUBY_THREAD_END_BLOCK; \
2094
- return GC_VALUE(ret); \
2095
- }
2096
-
2097
- GC_VALUE_BINARY( add_id, operator+ );
2098
- GC_VALUE_BINARY( sub_id, operator- );
2099
- GC_VALUE_BINARY( mul_id, operator* );
2100
- GC_VALUE_BINARY( div_id, operator/ );
2101
- GC_VALUE_BINARY( mod_id, operator% );
2102
-
2103
- GC_VALUE_BINARY( and_id, operator& );
2104
- GC_VALUE_BINARY( xor_id, operator^ );
2105
- GC_VALUE_BINARY( or_id, operator| );
2106
-
2107
- GC_VALUE_BINARY( lshift_id, operator<< );
2108
- GC_VALUE_BINARY( rshift_id, operator>> );
2109
- #undef GC_VALUE_BINARY
2110
-
2111
- };
2112
-
2113
- ID GC_VALUE::hash_id = rb_intern("hash");
2114
- ID GC_VALUE::lt_id = rb_intern("<");
2115
- ID GC_VALUE::gt_id = rb_intern(">");
2116
- ID GC_VALUE::eq_id = rb_intern("==");
2117
- ID GC_VALUE::le_id = rb_intern("<=");
2118
- ID GC_VALUE::ge_id = rb_intern(">=");
2119
-
2120
- ID GC_VALUE::pos_id = rb_intern("+@");
2121
- ID GC_VALUE::neg_id = rb_intern("-@");
2122
- ID GC_VALUE::inv_id = rb_intern("~");
2123
-
2124
- ID GC_VALUE::add_id = rb_intern("+");
2125
- ID GC_VALUE::sub_id = rb_intern("-");
2126
- ID GC_VALUE::mul_id = rb_intern("*");
2127
- ID GC_VALUE::div_id = rb_intern("/");
2128
- ID GC_VALUE::mod_id = rb_intern("%");
2129
-
2130
- ID GC_VALUE::and_id = rb_intern("&");
2131
- ID GC_VALUE::or_id = rb_intern("|");
2132
- ID GC_VALUE::xor_id = rb_intern("^");
2133
-
2134
- ID GC_VALUE::lshift_id = rb_intern("<<");
2135
- ID GC_VALUE::rshift_id = rb_intern(">>");
2136
-
2137
- VALUE GC_VALUE::_hash = Qnil;
2138
-
2139
- typedef GC_VALUE LANGUAGE_OBJ;
2140
-
2141
- } // namespace swig
2142
-
2143
-
2144
-
2145
- #if defined(__GNUC__)
2146
- # if __GNUC__ == 2 && __GNUC_MINOR <= 96
2147
- # define SWIG_STD_NOMODERN_STL
2148
- # endif
1867
+ #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1868
+ # include <ruby/encoding.h>
1869
+ # define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
1870
+ # define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
1871
+ #else
1872
+ # define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
1873
+ # define CONVERT_TO_UTF8(value) value
2149
1874
  #endif
2150
1875
 
1876
+ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
1877
+ if (byteVector.isNull()) {
1878
+ return Qnil;
1879
+ } else {
1880
+ return rb_tainted_str_new(byteVector.data(), byteVector.size());
1881
+ }
1882
+ }
2151
1883
 
2152
- #include <string>
2153
- #include <stdexcept>
2154
-
2155
-
2156
- namespace swig {
2157
- struct stop_iteration {
2158
- };
2159
-
2160
- /**
2161
- * Abstract base class used to represent all iterators of STL containers.
2162
- */
2163
- struct ConstIterator {
2164
- public:
2165
- typedef ConstIterator self_type;
2166
-
2167
- protected:
2168
- GC_VALUE _seq;
2169
-
2170
- protected:
2171
- ConstIterator(VALUE seq) : _seq(seq)
2172
- {
2173
- }
2174
-
2175
- // Random access iterator methods, but not required in Ruby
2176
- virtual ptrdiff_t distance(const ConstIterator &x) const
2177
- {
2178
- throw std::invalid_argument("distance not supported");
2179
- }
2180
-
2181
- virtual bool equal (const ConstIterator &x) const
2182
- {
2183
- throw std::invalid_argument("equal not supported");
2184
- }
2185
-
2186
- virtual self_type* advance(ptrdiff_t n)
2187
- {
2188
- throw std::invalid_argument("advance not supported");
2189
- }
2190
-
2191
- public:
2192
- virtual ~ConstIterator() {}
2193
-
2194
- // Access iterator method, required by Ruby
2195
- virtual VALUE value() const {
2196
- throw std::invalid_argument("value not supported");
2197
- return Qnil;
2198
- };
2199
-
2200
- virtual VALUE setValue( const VALUE& v ) {
2201
- throw std::invalid_argument("value= not supported");
2202
- return Qnil;
2203
- }
2204
-
2205
- virtual self_type* next( size_t n = 1 )
2206
- {
2207
- return this->advance( n );
2208
- }
2209
-
2210
- virtual self_type* previous( size_t n = 1 )
2211
- {
2212
- ptrdiff_t nn = n;
2213
- return this->advance( -nn );
2214
- }
2215
-
2216
- virtual VALUE to_s() const {
2217
- throw std::invalid_argument("to_s not supported");
2218
- return Qnil;
2219
- }
2220
-
2221
- virtual VALUE inspect() const {
2222
- throw std::invalid_argument("inspect not supported");
2223
- return Qnil;
2224
- }
2225
-
2226
- virtual ConstIterator *dup() const
2227
- {
2228
- throw std::invalid_argument("dup not supported");
2229
- return NULL;
2230
- }
2231
-
2232
- //
2233
- // C++ common/needed methods. We emulate a bidirectional
2234
- // operator, to be compatible with all the STL.
2235
- // The iterator traits will then tell the STL what type of
2236
- // iterator we really are.
2237
- //
2238
- ConstIterator() : _seq( Qnil )
2239
- {
2240
- }
2241
-
2242
- ConstIterator( const self_type& b ) : _seq( b._seq )
2243
- {
2244
- }
2245
-
2246
- self_type& operator=( const self_type& b )
2247
- {
2248
- _seq = b._seq;
2249
- return *this;
2250
- }
2251
-
2252
- bool operator == (const ConstIterator& x) const
2253
- {
2254
- return equal(x);
2255
- }
2256
-
2257
- bool operator != (const ConstIterator& x) const
2258
- {
2259
- return ! operator==(x);
2260
- }
2261
-
2262
- // Pre-decrement operator
2263
- self_type& operator--()
2264
- {
2265
- return *previous();
2266
- }
2267
-
2268
- // Pre-increment operator
2269
- self_type& operator++()
2270
- {
2271
- return *next();
2272
- }
2273
-
2274
- // Post-decrement operator
2275
- self_type operator--(int)
2276
- {
2277
- self_type r = *this;
2278
- previous();
2279
- return r;
2280
- }
1884
+ TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
1885
+ return TagLib::ByteVector(RSTRING_PTR(s), RSTRING_LEN(s));
1886
+ }
2281
1887
 
2282
- // Post-increment operator
2283
- self_type operator++(int)
2284
- {
2285
- self_type r = *this;
2286
- next();
2287
- return r;
2288
- }
1888
+ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
1889
+ if (string.isNull()) {
1890
+ return Qnil;
1891
+ } else {
1892
+ VALUE result = rb_tainted_str_new2(string.toCString(true));
1893
+ ASSOCIATE_UTF8_ENCODING(result);
1894
+ return result;
1895
+ }
1896
+ }
2289
1897
 
2290
- ConstIterator& operator += (ptrdiff_t n)
2291
- {
2292
- return *advance(n);
2293
- }
1898
+ TagLib::String ruby_string_to_taglib_string(VALUE s) {
1899
+ return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(s)), TagLib::String::UTF8);
1900
+ }
2294
1901
 
2295
- ConstIterator& operator -= (ptrdiff_t n)
2296
- {
2297
- return *advance(-n);
2298
- }
1902
+ VALUE taglib_string_list_to_ruby_array(const TagLib::StringList & list) {
1903
+ VALUE ary = rb_ary_new2(list.size());
1904
+ for (TagLib::StringList::ConstIterator it = list.begin(); it != list.end(); it++) {
1905
+ VALUE s = taglib_string_to_ruby_string(*it);
1906
+ rb_ary_push(ary, s);
1907
+ }
1908
+ return ary;
1909
+ }
2299
1910
 
2300
- ConstIterator* operator + (ptrdiff_t n) const
2301
- {
2302
- return dup()->advance(n);
2303
- }
1911
+ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1912
+ TagLib::StringList result = TagLib::StringList();
1913
+ for (long i = 0; i < RARRAY_LEN(ary); i++) {
1914
+ VALUE e = RARRAY_PTR(ary)[i];
1915
+ TagLib::String s = ruby_string_to_taglib_string(e);
1916
+ result.append(s);
1917
+ }
1918
+ return result;
1919
+ }
2304
1920
 
2305
- ConstIterator* operator - (ptrdiff_t n) const
2306
- {
2307
- return dup()->advance(-n);
2308
- }
2309
-
2310
- ptrdiff_t operator - (const ConstIterator& x) const
2311
- {
2312
- return x.distance(*this);
2313
- }
2314
-
2315
- static swig_type_info* descriptor() {
2316
- static int init = 0;
2317
- static swig_type_info* desc = 0;
2318
- if (!init) {
2319
- desc = SWIG_TypeQuery("swig::ConstIterator *");
2320
- init = 1;
2321
- }
2322
- return desc;
2323
- }
2324
- };
2325
1921
 
1922
+ SWIGINTERNINLINE VALUE
1923
+ SWIG_From_bool (bool value)
1924
+ {
1925
+ return value ? Qtrue : Qfalse;
1926
+ }
2326
1927
 
2327
- /**
2328
- * Abstract base class used to represent all non-const iterators of STL containers.
2329
- *
2330
- */
2331
- struct Iterator : public ConstIterator {
2332
- public:
2333
- typedef Iterator self_type;
2334
1928
 
2335
- protected:
2336
- Iterator(VALUE seq) : ConstIterator(seq)
2337
- {
2338
- }
1929
+ #include <limits.h>
1930
+ #if !defined(SWIG_NO_LLONG_MAX)
1931
+ # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1932
+ # define LLONG_MAX __LONG_LONG_MAX__
1933
+ # define LLONG_MIN (-LLONG_MAX - 1LL)
1934
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1935
+ # endif
1936
+ #endif
2339
1937
 
2340
- virtual self_type* advance(ptrdiff_t n)
2341
- {
2342
- throw std::invalid_argument("operation not supported");
2343
- }
2344
1938
 
2345
- public:
2346
- static swig_type_info* descriptor() {
2347
- static int init = 0;
2348
- static swig_type_info* desc = 0;
2349
- if (!init) {
2350
- desc = SWIG_TypeQuery("swig::Iterator *");
2351
- init = 1;
2352
- }
2353
- return desc;
2354
- }
2355
-
2356
- virtual Iterator *dup() const
2357
- {
2358
- throw std::invalid_argument("dup not supported");
2359
- return NULL;
2360
- }
2361
-
2362
- virtual self_type* next( size_t n = 1 )
2363
- {
2364
- return this->advance( n );
2365
- }
1939
+ #define SWIG_From_long LONG2NUM
2366
1940
 
2367
- virtual self_type* previous( size_t n = 1 )
2368
- {
2369
- ptrdiff_t nn = n;
2370
- return this->advance( -nn );
2371
- }
2372
1941
 
2373
- bool operator == (const ConstIterator& x) const
2374
- {
2375
- return equal(x);
2376
- }
2377
-
2378
- bool operator != (const Iterator& x) const
2379
- {
2380
- return ! operator==(x);
2381
- }
2382
-
2383
- Iterator& operator += (ptrdiff_t n)
2384
- {
2385
- return *advance(n);
2386
- }
1942
+ SWIGINTERNINLINE VALUE
1943
+ SWIG_From_unsigned_SS_long (unsigned long value)
1944
+ {
1945
+ return ULONG2NUM(value);
1946
+ }
2387
1947
 
2388
- Iterator& operator -= (ptrdiff_t n)
2389
- {
2390
- return *advance(-n);
2391
- }
2392
-
2393
- Iterator* operator + (ptrdiff_t n) const
2394
- {
2395
- return dup()->advance(n);
2396
- }
2397
-
2398
- Iterator* operator - (ptrdiff_t n) const
2399
- {
2400
- return dup()->advance(-n);
2401
- }
2402
-
2403
- ptrdiff_t operator - (const Iterator& x) const
2404
- {
2405
- return x.distance(*this);
2406
- }
2407
- };
2408
1948
 
1949
+ SWIGINTERNINLINE VALUE
1950
+ SWIG_From_unsigned_SS_int (unsigned int value)
1951
+ {
1952
+ return SWIG_From_unsigned_SS_long (value);
2409
1953
  }
2410
1954
 
2411
1955
 
@@ -2416,52 +1960,6 @@ SWIG_ruby_failed(void)
2416
1960
  }
2417
1961
 
2418
1962
 
2419
- /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2420
- SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2421
- {
2422
- VALUE obj = args[0];
2423
- VALUE type = TYPE(obj);
2424
- unsigned long *res = (unsigned long *)(args[1]);
2425
- *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
2426
- return obj;
2427
- }
2428
- /*@SWIG@*/
2429
-
2430
- SWIGINTERN int
2431
- SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
2432
- {
2433
- VALUE type = TYPE(obj);
2434
- if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2435
- unsigned long v;
2436
- VALUE a[2];
2437
- a[0] = obj;
2438
- a[1] = (VALUE)(&v);
2439
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2440
- if (val) *val = v;
2441
- return SWIG_OK;
2442
- }
2443
- }
2444
- return SWIG_TypeError;
2445
- }
2446
-
2447
-
2448
- SWIGINTERNINLINE int
2449
- SWIG_AsVal_size_t (VALUE obj, size_t *val)
2450
- {
2451
- unsigned long v;
2452
- int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2453
- if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
2454
- return res;
2455
- }
2456
-
2457
-
2458
- SWIGINTERNINLINE VALUE
2459
- SWIG_From_bool (bool value)
2460
- {
2461
- return value ? Qtrue : Qfalse;
2462
- }
2463
-
2464
-
2465
1963
  /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2466
1964
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2467
1965
  {
@@ -2491,45 +1989,22 @@ SWIG_AsVal_long (VALUE obj, long* val)
2491
1989
  }
2492
1990
 
2493
1991
 
2494
- SWIGINTERNINLINE int
2495
- SWIG_AsVal_ptrdiff_t (VALUE obj, ptrdiff_t *val)
1992
+ SWIGINTERN int
1993
+ SWIG_AsVal_int (VALUE obj, int *val)
2496
1994
  {
2497
1995
  long v;
2498
- int res = SWIG_AsVal_long (obj, val ? &v : 0);
2499
- if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
1996
+ int res = SWIG_AsVal_long (obj, &v);
1997
+ if (SWIG_IsOK(res)) {
1998
+ if ((v < INT_MIN || v > INT_MAX)) {
1999
+ return SWIG_OverflowError;
2000
+ } else {
2001
+ if (val) *val = static_cast< int >(v);
2002
+ }
2003
+ }
2500
2004
  return res;
2501
2005
  }
2502
2006
 
2503
2007
 
2504
- #include <limits.h>
2505
- #if !defined(SWIG_NO_LLONG_MAX)
2506
- # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2507
- # define LLONG_MAX __LONG_LONG_MAX__
2508
- # define LLONG_MIN (-LLONG_MAX - 1LL)
2509
- # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2510
- # endif
2511
- #endif
2512
-
2513
-
2514
- #define SWIG_From_long LONG2NUM
2515
-
2516
-
2517
- SWIGINTERNINLINE VALUE
2518
- SWIG_From_ptrdiff_t (ptrdiff_t value)
2519
- {
2520
- return SWIG_From_long (static_cast< long >(value));
2521
- }
2522
-
2523
-
2524
- #include <stdexcept>
2525
-
2526
-
2527
- #include <algorithm>
2528
-
2529
-
2530
- #include <list>
2531
-
2532
-
2533
2008
  SWIGINTERNINLINE VALUE
2534
2009
  SWIG_From_int (int value)
2535
2010
  {
@@ -2591,22 +2066,6 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2591
2066
 
2592
2067
 
2593
2068
 
2594
- SWIGINTERN int
2595
- SWIG_AsVal_int (VALUE obj, int *val)
2596
- {
2597
- long v;
2598
- int res = SWIG_AsVal_long (obj, &v);
2599
- if (SWIG_IsOK(res)) {
2600
- if ((v < INT_MIN || v > INT_MAX)) {
2601
- return SWIG_OverflowError;
2602
- } else {
2603
- if (val) *val = static_cast< int >(v);
2604
- }
2605
- }
2606
- return res;
2607
- }
2608
-
2609
-
2610
2069
  SWIGINTERN int
2611
2070
  SWIG_AsVal_bool (VALUE obj, bool *val)
2612
2071
  {
@@ -2654,240 +2113,335 @@ SWIG_AsVal_bool (VALUE obj, bool *val)
2654
2113
  delete file;
2655
2114
  }
2656
2115
 
2657
- swig_class SwigClassGCVALUE;
2116
+ swig_class SwigClassXingHeader;
2658
2117
 
2118
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2119
+ SWIGINTERN VALUE
2120
+ _wrap_XingHeader_allocate(VALUE self) {
2121
+ #else
2122
+ SWIGINTERN VALUE
2123
+ _wrap_XingHeader_allocate(int argc, VALUE *argv, VALUE self) {
2124
+ #endif
2125
+
2126
+
2127
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MPEG__XingHeader);
2128
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2129
+ rb_obj_call_init(vresult, argc, argv);
2130
+ #endif
2131
+ return vresult;
2132
+ }
2133
+
2659
2134
 
2660
- /*
2661
- Document-method: TagLib::MPEG::GCVALUE.inspect
2135
+ SWIGINTERN VALUE
2136
+ _wrap_new_XingHeader(int argc, VALUE *argv, VALUE self) {
2137
+ TagLib::ByteVector *arg1 = 0 ;
2138
+ TagLib::ByteVector tmp1 ;
2139
+ TagLib::MPEG::XingHeader *result = 0 ;
2140
+
2141
+ if ((argc < 1) || (argc > 1)) {
2142
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2143
+ }
2144
+ {
2145
+ tmp1 = ruby_string_to_taglib_bytevector(argv[0]);
2146
+ arg1 = &tmp1;
2147
+ }
2148
+ result = (TagLib::MPEG::XingHeader *)new TagLib::MPEG::XingHeader((TagLib::ByteVector const &)*arg1);
2149
+ DATA_PTR(self) = result;
2150
+ SWIG_RubyAddTracking(result, self);
2151
+ return self;
2152
+ fail:
2153
+ return Qnil;
2154
+ }
2662
2155
 
2663
- call-seq:
2664
- inspect -> VALUE
2665
2156
 
2666
- Inspect class and its contents.
2667
- */
2157
+ SWIGINTERN void
2158
+ free_TagLib_MPEG_XingHeader(TagLib::MPEG::XingHeader *arg1) {
2159
+ SWIG_RubyRemoveTracking(arg1);
2160
+ delete arg1;
2161
+ }
2162
+
2668
2163
  SWIGINTERN VALUE
2669
- _wrap_GCVALUE_inspect(int argc, VALUE *argv, VALUE self) {
2670
- swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
2164
+ _wrap_XingHeader_validq___(int argc, VALUE *argv, VALUE self) {
2165
+ TagLib::MPEG::XingHeader *arg1 = (TagLib::MPEG::XingHeader *) 0 ;
2671
2166
  void *argp1 = 0 ;
2672
2167
  int res1 = 0 ;
2673
- VALUE result;
2168
+ bool result;
2674
2169
  VALUE vresult = Qnil;
2675
2170
 
2676
2171
  if ((argc < 0) || (argc > 0)) {
2677
2172
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2678
2173
  }
2679
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__GC_VALUE, 0 | 0 );
2174
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__XingHeader, 0 | 0 );
2680
2175
  if (!SWIG_IsOK(res1)) {
2681
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::GC_VALUE const *","inspect", 1, self ));
2176
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::XingHeader const *","isValid", 1, self ));
2682
2177
  }
2683
- arg1 = reinterpret_cast< swig::GC_VALUE * >(argp1);
2684
- result = (VALUE)((swig::GC_VALUE const *)arg1)->inspect();
2685
- vresult = result;
2178
+ arg1 = reinterpret_cast< TagLib::MPEG::XingHeader * >(argp1);
2179
+ result = (bool)((TagLib::MPEG::XingHeader const *)arg1)->isValid();
2180
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2686
2181
  return vresult;
2687
2182
  fail:
2688
2183
  return Qnil;
2689
2184
  }
2690
2185
 
2691
2186
 
2187
+ SWIGINTERN VALUE
2188
+ _wrap_XingHeader_total_frames(int argc, VALUE *argv, VALUE self) {
2189
+ TagLib::MPEG::XingHeader *arg1 = (TagLib::MPEG::XingHeader *) 0 ;
2190
+ void *argp1 = 0 ;
2191
+ int res1 = 0 ;
2192
+ TagLib::uint result;
2193
+ VALUE vresult = Qnil;
2194
+
2195
+ if ((argc < 0) || (argc > 0)) {
2196
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2197
+ }
2198
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__XingHeader, 0 | 0 );
2199
+ if (!SWIG_IsOK(res1)) {
2200
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::XingHeader const *","totalFrames", 1, self ));
2201
+ }
2202
+ arg1 = reinterpret_cast< TagLib::MPEG::XingHeader * >(argp1);
2203
+ result = (TagLib::uint)((TagLib::MPEG::XingHeader const *)arg1)->totalFrames();
2204
+ vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
2205
+ return vresult;
2206
+ fail:
2207
+ return Qnil;
2208
+ }
2692
2209
 
2693
- /*
2694
- Document-method: TagLib::MPEG::GCVALUE.to_s
2695
-
2696
- call-seq:
2697
- to_s -> VALUE
2698
2210
 
2699
- Convert class to a String representation.
2700
- */
2701
2211
  SWIGINTERN VALUE
2702
- _wrap_GCVALUE_to_s(int argc, VALUE *argv, VALUE self) {
2703
- swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
2212
+ _wrap_XingHeader_total_size(int argc, VALUE *argv, VALUE self) {
2213
+ TagLib::MPEG::XingHeader *arg1 = (TagLib::MPEG::XingHeader *) 0 ;
2704
2214
  void *argp1 = 0 ;
2705
2215
  int res1 = 0 ;
2706
- VALUE result;
2216
+ TagLib::uint result;
2707
2217
  VALUE vresult = Qnil;
2708
2218
 
2709
2219
  if ((argc < 0) || (argc > 0)) {
2710
2220
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2711
2221
  }
2712
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__GC_VALUE, 0 | 0 );
2222
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__XingHeader, 0 | 0 );
2713
2223
  if (!SWIG_IsOK(res1)) {
2714
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::GC_VALUE const *","to_s", 1, self ));
2224
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::XingHeader const *","totalSize", 1, self ));
2715
2225
  }
2716
- arg1 = reinterpret_cast< swig::GC_VALUE * >(argp1);
2717
- result = (VALUE)((swig::GC_VALUE const *)arg1)->to_s();
2718
- vresult = result;
2226
+ arg1 = reinterpret_cast< TagLib::MPEG::XingHeader * >(argp1);
2227
+ result = (TagLib::uint)((TagLib::MPEG::XingHeader const *)arg1)->totalSize();
2228
+ vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
2719
2229
  return vresult;
2720
2230
  fail:
2721
2231
  return Qnil;
2722
2232
  }
2723
2233
 
2724
2234
 
2725
- swig_class SwigClassConstIterator;
2235
+ SWIGINTERN VALUE
2236
+ _wrap_XingHeader_xing_header_offset(int argc, VALUE *argv, VALUE self) {
2237
+ TagLib::MPEG::Header::Version arg1 ;
2238
+ TagLib::MPEG::Header::ChannelMode arg2 ;
2239
+ int val1 ;
2240
+ int ecode1 = 0 ;
2241
+ int val2 ;
2242
+ int ecode2 = 0 ;
2243
+ int result;
2244
+ VALUE vresult = Qnil;
2245
+
2246
+ if ((argc < 2) || (argc > 2)) {
2247
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2248
+ }
2249
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2250
+ if (!SWIG_IsOK(ecode1)) {
2251
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::Version","TagLib::MPEG::XingHeader::xingHeaderOffset", 1, argv[0] ));
2252
+ }
2253
+ arg1 = static_cast< TagLib::MPEG::Header::Version >(val1);
2254
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2255
+ if (!SWIG_IsOK(ecode2)) {
2256
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::ChannelMode","TagLib::MPEG::XingHeader::xingHeaderOffset", 2, argv[1] ));
2257
+ }
2258
+ arg2 = static_cast< TagLib::MPEG::Header::ChannelMode >(val2);
2259
+ result = (int)TagLib::MPEG::XingHeader::xingHeaderOffset(arg1,arg2);
2260
+ vresult = SWIG_From_int(static_cast< int >(result));
2261
+ return vresult;
2262
+ fail:
2263
+ return Qnil;
2264
+ }
2726
2265
 
2727
- SWIGINTERN void
2728
- free_swig_ConstIterator(swig::ConstIterator *arg1) {
2729
- delete arg1;
2266
+
2267
+ swig_class SwigClassHeader;
2268
+
2269
+ SWIGINTERN VALUE
2270
+ _wrap_new_Header__SWIG_0(int argc, VALUE *argv, VALUE self) {
2271
+ TagLib::ByteVector *arg1 = 0 ;
2272
+ TagLib::ByteVector tmp1 ;
2273
+ TagLib::MPEG::Header *result = 0 ;
2274
+
2275
+ if ((argc < 1) || (argc > 1)) {
2276
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2277
+ }
2278
+ {
2279
+ tmp1 = ruby_string_to_taglib_bytevector(argv[0]);
2280
+ arg1 = &tmp1;
2281
+ }
2282
+ result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header((TagLib::ByteVector const &)*arg1);
2283
+ DATA_PTR(self) = result;
2284
+ SWIG_RubyAddTracking(result, self);
2285
+ return self;
2286
+ fail:
2287
+ return Qnil;
2730
2288
  }
2731
2289
 
2290
+
2291
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2732
2292
  SWIGINTERN VALUE
2733
- _wrap_ConstIterator_value(int argc, VALUE *argv, VALUE self) {
2734
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2735
- void *argp1 = 0 ;
2293
+ _wrap_Header_allocate(VALUE self) {
2294
+ #else
2295
+ SWIGINTERN VALUE
2296
+ _wrap_Header_allocate(int argc, VALUE *argv, VALUE self) {
2297
+ #endif
2298
+
2299
+
2300
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MPEG__Header);
2301
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2302
+ rb_obj_call_init(vresult, argc, argv);
2303
+ #endif
2304
+ return vresult;
2305
+ }
2306
+
2307
+
2308
+ SWIGINTERN VALUE
2309
+ _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) {
2310
+ TagLib::MPEG::Header *arg1 = 0 ;
2311
+ void *argp1 ;
2736
2312
  int res1 = 0 ;
2737
- VALUE result;
2738
- VALUE vresult = Qnil;
2313
+ TagLib::MPEG::Header *result = 0 ;
2739
2314
 
2740
- if ((argc < 0) || (argc > 0)) {
2741
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2315
+ if ((argc < 1) || (argc > 1)) {
2316
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2742
2317
  }
2743
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2318
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_TagLib__MPEG__Header, 0 );
2744
2319
  if (!SWIG_IsOK(res1)) {
2745
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","value", 1, self ));
2320
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const &","TagLib::MPEG::Header", 1, argv[0] ));
2321
+ }
2322
+ if (!argp1) {
2323
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MPEG::Header const &","TagLib::MPEG::Header", 1, argv[0]));
2324
+ }
2325
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2326
+ result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header((TagLib::MPEG::Header const &)*arg1);
2327
+ DATA_PTR(self) = result;
2328
+ SWIG_RubyAddTracking(result, self);
2329
+ return self;
2330
+ fail:
2331
+ return Qnil;
2332
+ }
2333
+
2334
+
2335
+ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) {
2336
+ int argc;
2337
+ VALUE argv[1];
2338
+ int ii;
2339
+
2340
+ argc = nargs;
2341
+ if (argc > 1) SWIG_fail;
2342
+ for (ii = 0; (ii < argc); ++ii) {
2343
+ argv[ii] = args[ii];
2746
2344
  }
2747
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2748
- try {
2749
- result = (VALUE)((swig::ConstIterator const *)arg1)->value();
2345
+ if (argc == 1) {
2346
+ int _v;
2347
+ void *vptr = 0;
2348
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__ByteVector, 0);
2349
+ _v = SWIG_CheckState(res);
2350
+ if (_v) {
2351
+ return _wrap_new_Header__SWIG_0(nargs, args, self);
2352
+ }
2750
2353
  }
2751
- catch(swig::stop_iteration &_e) {
2752
- {
2753
- (void)_e;
2754
- SWIG_Ruby_ExceptionType(NULL, Qnil);
2755
- SWIG_fail;
2354
+ if (argc == 1) {
2355
+ int _v;
2356
+ void *vptr = 0;
2357
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__Header, 0);
2358
+ _v = SWIG_CheckState(res);
2359
+ if (_v) {
2360
+ return _wrap_new_Header__SWIG_1(nargs, args, self);
2756
2361
  }
2757
2362
  }
2758
2363
 
2759
- vresult = result;
2760
- return vresult;
2761
2364
  fail:
2365
+ Ruby_Format_OverloadedError( argc, 1, "Header.new",
2366
+ " Header.new(TagLib::ByteVector const &data)\n"
2367
+ " Header.new(TagLib::MPEG::Header const &h)\n");
2368
+
2762
2369
  return Qnil;
2763
2370
  }
2764
2371
 
2765
2372
 
2373
+ SWIGINTERN void
2374
+ free_TagLib_MPEG_Header(TagLib::MPEG::Header *arg1) {
2375
+ SWIG_RubyRemoveTracking(arg1);
2376
+ delete arg1;
2377
+ }
2766
2378
 
2767
- /*
2768
- Document-method: TagLib::MPEG::ConstIterator.dup
2769
-
2770
- call-seq:
2771
- dup -> ConstIterator
2772
-
2773
- Create a duplicate of the class and unfreeze it if needed.
2774
- */
2775
2379
  SWIGINTERN VALUE
2776
- _wrap_ConstIterator_dup(int argc, VALUE *argv, VALUE self) {
2777
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2380
+ _wrap_Header_validq___(int argc, VALUE *argv, VALUE self) {
2381
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2778
2382
  void *argp1 = 0 ;
2779
2383
  int res1 = 0 ;
2780
- swig::ConstIterator *result = 0 ;
2384
+ bool result;
2781
2385
  VALUE vresult = Qnil;
2782
2386
 
2783
2387
  if ((argc < 0) || (argc > 0)) {
2784
2388
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2785
2389
  }
2786
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2390
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2787
2391
  if (!SWIG_IsOK(res1)) {
2788
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","dup", 1, self ));
2392
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isValid", 1, self ));
2789
2393
  }
2790
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2791
- result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->dup();
2792
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 );
2394
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2395
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->isValid();
2396
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2793
2397
  return vresult;
2794
2398
  fail:
2795
2399
  return Qnil;
2796
2400
  }
2797
2401
 
2798
2402
 
2799
-
2800
- /*
2801
- Document-method: TagLib::MPEG::ConstIterator.inspect
2802
-
2803
- call-seq:
2804
- inspect -> VALUE
2805
-
2806
- Inspect class and its contents.
2807
- */
2808
2403
  SWIGINTERN VALUE
2809
- _wrap_ConstIterator_inspect(int argc, VALUE *argv, VALUE self) {
2810
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2404
+ _wrap_Header_version(int argc, VALUE *argv, VALUE self) {
2405
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2811
2406
  void *argp1 = 0 ;
2812
2407
  int res1 = 0 ;
2813
- VALUE result;
2408
+ TagLib::MPEG::Header::Version result;
2814
2409
  VALUE vresult = Qnil;
2815
2410
 
2816
2411
  if ((argc < 0) || (argc > 0)) {
2817
2412
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2818
2413
  }
2819
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2414
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2820
2415
  if (!SWIG_IsOK(res1)) {
2821
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","inspect", 1, self ));
2416
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","version", 1, self ));
2822
2417
  }
2823
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2824
- result = (VALUE)((swig::ConstIterator const *)arg1)->inspect();
2825
- vresult = result;
2418
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2419
+ result = (TagLib::MPEG::Header::Version)((TagLib::MPEG::Header const *)arg1)->version();
2420
+ vresult = SWIG_From_int(static_cast< int >(result));
2826
2421
  return vresult;
2827
2422
  fail:
2828
2423
  return Qnil;
2829
2424
  }
2830
2425
 
2831
2426
 
2832
-
2833
- /*
2834
- Document-method: TagLib::MPEG::ConstIterator.to_s
2835
-
2836
- call-seq:
2837
- to_s -> VALUE
2838
-
2839
- Convert class to a String representation.
2840
- */
2841
2427
  SWIGINTERN VALUE
2842
- _wrap_ConstIterator_to_s(int argc, VALUE *argv, VALUE self) {
2843
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2428
+ _wrap_Header_layer(int argc, VALUE *argv, VALUE self) {
2429
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2844
2430
  void *argp1 = 0 ;
2845
2431
  int res1 = 0 ;
2846
- VALUE result;
2432
+ int result;
2847
2433
  VALUE vresult = Qnil;
2848
2434
 
2849
2435
  if ((argc < 0) || (argc > 0)) {
2850
2436
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2851
2437
  }
2852
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2853
- if (!SWIG_IsOK(res1)) {
2854
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","to_s", 1, self ));
2855
- }
2856
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2857
- result = (VALUE)((swig::ConstIterator const *)arg1)->to_s();
2858
- vresult = result;
2859
- return vresult;
2860
- fail:
2861
- return Qnil;
2862
- }
2863
-
2864
-
2865
- SWIGINTERN VALUE
2866
- _wrap_ConstIterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
2867
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2868
- size_t arg2 ;
2869
- void *argp1 = 0 ;
2870
- int res1 = 0 ;
2871
- size_t val2 ;
2872
- int ecode2 = 0 ;
2873
- swig::ConstIterator *result = 0 ;
2874
- VALUE vresult = Qnil;
2875
-
2876
- if ((argc < 1) || (argc > 1)) {
2877
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2878
- }
2879
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2438
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2880
2439
  if (!SWIG_IsOK(res1)) {
2881
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self ));
2440
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","layer", 1, self ));
2882
2441
  }
2883
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2884
- ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2885
- if (!SWIG_IsOK(ecode2)) {
2886
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
2887
- }
2888
- arg2 = static_cast< size_t >(val2);
2889
- result = (swig::ConstIterator *)(arg1)->next(arg2);
2890
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2442
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2443
+ result = (int)((TagLib::MPEG::Header const *)arg1)->layer();
2444
+ vresult = SWIG_From_int(static_cast< int >(result));
2891
2445
  return vresult;
2892
2446
  fail:
2893
2447
  return Qnil;
@@ -2895,110 +2449,47 @@ fail:
2895
2449
 
2896
2450
 
2897
2451
  SWIGINTERN VALUE
2898
- _wrap_ConstIterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
2899
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2452
+ _wrap_Header_protection_enabled(int argc, VALUE *argv, VALUE self) {
2453
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2900
2454
  void *argp1 = 0 ;
2901
2455
  int res1 = 0 ;
2902
- swig::ConstIterator *result = 0 ;
2456
+ bool result;
2903
2457
  VALUE vresult = Qnil;
2904
2458
 
2905
2459
  if ((argc < 0) || (argc > 0)) {
2906
2460
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2907
2461
  }
2908
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2462
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2909
2463
  if (!SWIG_IsOK(res1)) {
2910
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self ));
2911
- }
2912
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2913
- try {
2914
- result = (swig::ConstIterator *)(arg1)->next();
2915
- }
2916
- catch(swig::stop_iteration &_e) {
2917
- {
2918
- (void)_e;
2919
- SWIG_Ruby_ExceptionType(NULL, Qnil);
2920
- SWIG_fail;
2921
- }
2464
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","protectionEnabled", 1, self ));
2922
2465
  }
2923
-
2924
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2466
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2467
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->protectionEnabled();
2468
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2925
2469
  return vresult;
2926
2470
  fail:
2927
2471
  return Qnil;
2928
2472
  }
2929
2473
 
2930
2474
 
2931
- SWIGINTERN VALUE _wrap_ConstIterator_next(int nargs, VALUE *args, VALUE self) {
2932
- int argc;
2933
- VALUE argv[3];
2934
- int ii;
2935
-
2936
- argc = nargs + 1;
2937
- argv[0] = self;
2938
- if (argc > 3) SWIG_fail;
2939
- for (ii = 1; (ii < argc); ++ii) {
2940
- argv[ii] = args[ii-1];
2941
- }
2942
- if (argc == 1) {
2943
- int _v;
2944
- void *vptr = 0;
2945
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
2946
- _v = SWIG_CheckState(res);
2947
- if (_v) {
2948
- return _wrap_ConstIterator_next__SWIG_1(nargs, args, self);
2949
- }
2950
- }
2951
- if (argc == 2) {
2952
- int _v;
2953
- void *vptr = 0;
2954
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
2955
- _v = SWIG_CheckState(res);
2956
- if (_v) {
2957
- {
2958
- int res = SWIG_AsVal_size_t(argv[1], NULL);
2959
- _v = SWIG_CheckState(res);
2960
- }
2961
- if (_v) {
2962
- return _wrap_ConstIterator_next__SWIG_0(nargs, args, self);
2963
- }
2964
- }
2965
- }
2966
-
2967
- fail:
2968
- Ruby_Format_OverloadedError( argc, 3, "ConstIterator.next",
2969
- " swig::ConstIterator * ConstIterator.next(size_t n)\n"
2970
- " swig::ConstIterator * ConstIterator.next()\n");
2971
-
2972
- return Qnil;
2973
- }
2974
-
2975
-
2976
2475
  SWIGINTERN VALUE
2977
- _wrap_ConstIterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
2978
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2979
- size_t arg2 ;
2476
+ _wrap_Header_bitrate(int argc, VALUE *argv, VALUE self) {
2477
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2980
2478
  void *argp1 = 0 ;
2981
2479
  int res1 = 0 ;
2982
- size_t val2 ;
2983
- int ecode2 = 0 ;
2984
- swig::ConstIterator *result = 0 ;
2480
+ int result;
2985
2481
  VALUE vresult = Qnil;
2986
2482
 
2987
- if ((argc < 1) || (argc > 1)) {
2988
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2483
+ if ((argc < 0) || (argc > 0)) {
2484
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2989
2485
  }
2990
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2486
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2991
2487
  if (!SWIG_IsOK(res1)) {
2992
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self ));
2488
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","bitrate", 1, self ));
2993
2489
  }
2994
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
2995
- ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2996
- if (!SWIG_IsOK(ecode2)) {
2997
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
2998
- }
2999
- arg2 = static_cast< size_t >(val2);
3000
- result = (swig::ConstIterator *)(arg1)->previous(arg2);
3001
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2490
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2491
+ result = (int)((TagLib::MPEG::Header const *)arg1)->bitrate();
2492
+ vresult = SWIG_From_int(static_cast< int >(result));
3002
2493
  return vresult;
3003
2494
  fail:
3004
2495
  return Qnil;
@@ -3006,121 +2497,46 @@ fail:
3006
2497
 
3007
2498
 
3008
2499
  SWIGINTERN VALUE
3009
- _wrap_ConstIterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
3010
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
2500
+ _wrap_Header_sample_rate(int argc, VALUE *argv, VALUE self) {
2501
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3011
2502
  void *argp1 = 0 ;
3012
2503
  int res1 = 0 ;
3013
- swig::ConstIterator *result = 0 ;
2504
+ int result;
3014
2505
  VALUE vresult = Qnil;
3015
2506
 
3016
2507
  if ((argc < 0) || (argc > 0)) {
3017
2508
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3018
2509
  }
3019
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2510
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3020
2511
  if (!SWIG_IsOK(res1)) {
3021
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self ));
3022
- }
3023
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
3024
- try {
3025
- result = (swig::ConstIterator *)(arg1)->previous();
3026
- }
3027
- catch(swig::stop_iteration &_e) {
3028
- {
3029
- (void)_e;
3030
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3031
- SWIG_fail;
3032
- }
2512
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","sampleRate", 1, self ));
3033
2513
  }
3034
-
3035
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2514
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2515
+ result = (int)((TagLib::MPEG::Header const *)arg1)->sampleRate();
2516
+ vresult = SWIG_From_int(static_cast< int >(result));
3036
2517
  return vresult;
3037
2518
  fail:
3038
2519
  return Qnil;
3039
2520
  }
3040
2521
 
3041
2522
 
3042
- SWIGINTERN VALUE _wrap_ConstIterator_previous(int nargs, VALUE *args, VALUE self) {
3043
- int argc;
3044
- VALUE argv[3];
3045
- int ii;
3046
-
3047
- argc = nargs + 1;
3048
- argv[0] = self;
3049
- if (argc > 3) SWIG_fail;
3050
- for (ii = 1; (ii < argc); ++ii) {
3051
- argv[ii] = args[ii-1];
3052
- }
3053
- if (argc == 1) {
3054
- int _v;
3055
- void *vptr = 0;
3056
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
3057
- _v = SWIG_CheckState(res);
3058
- if (_v) {
3059
- return _wrap_ConstIterator_previous__SWIG_1(nargs, args, self);
3060
- }
3061
- }
3062
- if (argc == 2) {
3063
- int _v;
3064
- void *vptr = 0;
3065
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
3066
- _v = SWIG_CheckState(res);
3067
- if (_v) {
3068
- {
3069
- int res = SWIG_AsVal_size_t(argv[1], NULL);
3070
- _v = SWIG_CheckState(res);
3071
- }
3072
- if (_v) {
3073
- return _wrap_ConstIterator_previous__SWIG_0(nargs, args, self);
3074
- }
3075
- }
3076
- }
3077
-
3078
- fail:
3079
- Ruby_Format_OverloadedError( argc, 3, "ConstIterator.previous",
3080
- " swig::ConstIterator * ConstIterator.previous(size_t n)\n"
3081
- " swig::ConstIterator * ConstIterator.previous()\n");
3082
-
3083
- return Qnil;
3084
- }
3085
-
3086
-
3087
-
3088
- /*
3089
- Document-method: TagLib::MPEG::ConstIterator.==
3090
-
3091
- call-seq:
3092
- ==(x) -> bool
3093
-
3094
- Equality comparison operator.
3095
- */
3096
2523
  SWIGINTERN VALUE
3097
- _wrap_ConstIterator___eq__(int argc, VALUE *argv, VALUE self) {
3098
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
3099
- swig::ConstIterator *arg2 = 0 ;
2524
+ _wrap_Header_paddedq___(int argc, VALUE *argv, VALUE self) {
2525
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3100
2526
  void *argp1 = 0 ;
3101
2527
  int res1 = 0 ;
3102
- void *argp2 ;
3103
- int res2 = 0 ;
3104
2528
  bool result;
3105
2529
  VALUE vresult = Qnil;
3106
2530
 
3107
- if ((argc < 1) || (argc > 1)) {
3108
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2531
+ if ((argc < 0) || (argc > 0)) {
2532
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3109
2533
  }
3110
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2534
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3111
2535
  if (!SWIG_IsOK(res1)) {
3112
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator ==", 1, self ));
3113
- }
3114
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
3115
- res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 );
3116
- if (!SWIG_IsOK(res2)) {
3117
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator ==", 2, argv[0] ));
3118
- }
3119
- if (!argp2) {
3120
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator ==", 2, argv[0]));
2536
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isPadded", 1, self ));
3121
2537
  }
3122
- arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
3123
- result = (bool)((swig::ConstIterator const *)arg1)->operator ==((swig::ConstIterator const &)*arg2);
2538
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2539
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->isPadded();
3124
2540
  vresult = SWIG_From_bool(static_cast< bool >(result));
3125
2541
  return vresult;
3126
2542
  fail:
@@ -3128,103 +2544,48 @@ fail:
3128
2544
  }
3129
2545
 
3130
2546
 
3131
-
3132
- /*
3133
- Document-method: TagLib::MPEG::ConstIterator.+
3134
-
3135
- call-seq:
3136
- +(n) -> ConstIterator
3137
-
3138
- Add operator.
3139
- */
3140
2547
  SWIGINTERN VALUE
3141
- _wrap_ConstIterator___add__(int argc, VALUE *argv, VALUE self) {
3142
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
3143
- ptrdiff_t arg2 ;
2548
+ _wrap_Header_channel_mode(int argc, VALUE *argv, VALUE self) {
2549
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3144
2550
  void *argp1 = 0 ;
3145
2551
  int res1 = 0 ;
3146
- ptrdiff_t val2 ;
3147
- int ecode2 = 0 ;
3148
- swig::ConstIterator *result = 0 ;
2552
+ TagLib::MPEG::Header::ChannelMode result;
3149
2553
  VALUE vresult = Qnil;
3150
2554
 
3151
- if ((argc < 1) || (argc > 1)) {
3152
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2555
+ if ((argc < 0) || (argc > 0)) {
2556
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3153
2557
  }
3154
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2558
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3155
2559
  if (!SWIG_IsOK(res1)) {
3156
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator +", 1, self ));
3157
- }
3158
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
3159
- ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
3160
- if (!SWIG_IsOK(ecode2)) {
3161
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
3162
- }
3163
- arg2 = static_cast< ptrdiff_t >(val2);
3164
- try {
3165
- result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator +(arg2);
3166
- }
3167
- catch(swig::stop_iteration &_e) {
3168
- {
3169
- (void)_e;
3170
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3171
- SWIG_fail;
3172
- }
2560
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","channelMode", 1, self ));
3173
2561
  }
3174
-
3175
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 );
2562
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2563
+ result = (TagLib::MPEG::Header::ChannelMode)((TagLib::MPEG::Header const *)arg1)->channelMode();
2564
+ vresult = SWIG_From_int(static_cast< int >(result));
3176
2565
  return vresult;
3177
2566
  fail:
3178
2567
  return Qnil;
3179
2568
  }
3180
2569
 
3181
2570
 
3182
-
3183
- /*
3184
- Document-method: TagLib::MPEG::ConstIterator.-
3185
-
3186
- call-seq:
3187
- -(n) -> ConstIterator
3188
- -(x) -> ptrdiff_t
3189
-
3190
- Substraction operator.
3191
- */
3192
2571
  SWIGINTERN VALUE
3193
- _wrap_ConstIterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
3194
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
3195
- ptrdiff_t arg2 ;
2572
+ _wrap_Header_copyrightedq___(int argc, VALUE *argv, VALUE self) {
2573
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3196
2574
  void *argp1 = 0 ;
3197
2575
  int res1 = 0 ;
3198
- ptrdiff_t val2 ;
3199
- int ecode2 = 0 ;
3200
- swig::ConstIterator *result = 0 ;
2576
+ bool result;
3201
2577
  VALUE vresult = Qnil;
3202
2578
 
3203
- if ((argc < 1) || (argc > 1)) {
3204
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2579
+ if ((argc < 0) || (argc > 0)) {
2580
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3205
2581
  }
3206
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2582
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3207
2583
  if (!SWIG_IsOK(res1)) {
3208
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self ));
2584
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isCopyrighted", 1, self ));
3209
2585
  }
3210
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
3211
- ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
3212
- if (!SWIG_IsOK(ecode2)) {
3213
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
3214
- }
3215
- arg2 = static_cast< ptrdiff_t >(val2);
3216
- try {
3217
- result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator -(arg2);
3218
- }
3219
- catch(swig::stop_iteration &_e) {
3220
- {
3221
- (void)_e;
3222
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3223
- SWIG_fail;
3224
- }
3225
- }
3226
-
3227
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 );
2586
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2587
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->isCopyrighted();
2588
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3228
2589
  return vresult;
3229
2590
  fail:
3230
2591
  return Qnil;
@@ -3232,290 +2593,220 @@ fail:
3232
2593
 
3233
2594
 
3234
2595
  SWIGINTERN VALUE
3235
- _wrap_ConstIterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
3236
- swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
3237
- swig::ConstIterator *arg2 = 0 ;
2596
+ _wrap_Header_originalq___(int argc, VALUE *argv, VALUE self) {
2597
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3238
2598
  void *argp1 = 0 ;
3239
2599
  int res1 = 0 ;
3240
- void *argp2 ;
3241
- int res2 = 0 ;
3242
- ptrdiff_t result;
2600
+ bool result;
3243
2601
  VALUE vresult = Qnil;
3244
2602
 
3245
- if ((argc < 1) || (argc > 1)) {
3246
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2603
+ if ((argc < 0) || (argc > 0)) {
2604
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3247
2605
  }
3248
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 | 0 );
2606
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3249
2607
  if (!SWIG_IsOK(res1)) {
3250
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self ));
3251
- }
3252
- arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
3253
- res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator, 0 );
3254
- if (!SWIG_IsOK(res2)) {
3255
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator -", 2, argv[0] ));
2608
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isOriginal", 1, self ));
3256
2609
  }
3257
- if (!argp2) {
3258
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator -", 2, argv[0]));
3259
- }
3260
- arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
3261
- result = ((swig::ConstIterator const *)arg1)->operator -((swig::ConstIterator const &)*arg2);
3262
- vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
2610
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2611
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->isOriginal();
2612
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3263
2613
  return vresult;
3264
2614
  fail:
3265
2615
  return Qnil;
3266
2616
  }
3267
2617
 
3268
2618
 
3269
- SWIGINTERN VALUE _wrap_ConstIterator___sub__(int nargs, VALUE *args, VALUE self) {
3270
- int argc;
3271
- VALUE argv[3];
3272
- int ii;
3273
-
3274
- argc = nargs + 1;
3275
- argv[0] = self;
3276
- if (argc > 3) SWIG_fail;
3277
- for (ii = 1; (ii < argc); ++ii) {
3278
- argv[ii] = args[ii-1];
3279
- }
3280
- if (argc == 2) {
3281
- int _v;
3282
- void *vptr = 0;
3283
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
3284
- _v = SWIG_CheckState(res);
3285
- if (_v) {
3286
- void *vptr = 0;
3287
- int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
3288
- _v = SWIG_CheckState(res);
3289
- if (_v) {
3290
- return _wrap_ConstIterator___sub____SWIG_1(nargs, args, self);
3291
- }
3292
- }
3293
- }
3294
- if (argc == 2) {
3295
- int _v;
3296
- void *vptr = 0;
3297
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
3298
- _v = SWIG_CheckState(res);
3299
- if (_v) {
3300
- {
3301
- int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
3302
- _v = SWIG_CheckState(res);
3303
- }
3304
- if (_v) {
3305
- return _wrap_ConstIterator___sub____SWIG_0(nargs, args, self);
3306
- }
3307
- }
3308
- }
3309
-
3310
- fail:
3311
- Ruby_Format_OverloadedError( argc, 3, "__sub__.new",
3312
- " __sub__.new(ptrdiff_t n)\n"
3313
- " __sub__.new(swig::ConstIterator const &x)\n");
3314
-
3315
- return Qnil;
3316
- }
3317
-
3318
-
3319
- swig_class SwigClassIterator;
3320
-
3321
2619
  SWIGINTERN VALUE
3322
- _wrap_Iterator_valuee___(int argc, VALUE *argv, VALUE self) {
3323
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3324
- VALUE *arg2 = 0 ;
2620
+ _wrap_Header_frame_length(int argc, VALUE *argv, VALUE self) {
2621
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3325
2622
  void *argp1 = 0 ;
3326
2623
  int res1 = 0 ;
3327
- VALUE temp2 ;
3328
- VALUE result;
2624
+ int result;
3329
2625
  VALUE vresult = Qnil;
3330
2626
 
3331
- if ((argc < 1) || (argc > 1)) {
3332
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2627
+ if ((argc < 0) || (argc > 0)) {
2628
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3333
2629
  }
3334
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2630
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3335
2631
  if (!SWIG_IsOK(res1)) {
3336
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","setValue", 1, self ));
2632
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","frameLength", 1, self ));
3337
2633
  }
3338
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3339
- temp2 = static_cast< VALUE >(argv[0]);
3340
- arg2 = &temp2;
3341
- result = (VALUE)(arg1)->setValue((VALUE const &)*arg2);
3342
- vresult = result;
2634
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2635
+ result = (int)((TagLib::MPEG::Header const *)arg1)->frameLength();
2636
+ vresult = SWIG_From_int(static_cast< int >(result));
3343
2637
  return vresult;
3344
2638
  fail:
3345
2639
  return Qnil;
3346
2640
  }
3347
2641
 
3348
2642
 
3349
-
3350
- /*
3351
- Document-method: TagLib::MPEG::Iterator.dup
3352
-
3353
- call-seq:
3354
- dup -> Iterator
3355
-
3356
- Create a duplicate of the class and unfreeze it if needed.
3357
- */
3358
2643
  SWIGINTERN VALUE
3359
- _wrap_Iterator_dup(int argc, VALUE *argv, VALUE self) {
3360
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
2644
+ _wrap_Header_samples_per_frame(int argc, VALUE *argv, VALUE self) {
2645
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
3361
2646
  void *argp1 = 0 ;
3362
2647
  int res1 = 0 ;
3363
- swig::Iterator *result = 0 ;
2648
+ int result;
3364
2649
  VALUE vresult = Qnil;
3365
2650
 
3366
2651
  if ((argc < 0) || (argc > 0)) {
3367
2652
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3368
2653
  }
3369
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2654
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
3370
2655
  if (!SWIG_IsOK(res1)) {
3371
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","dup", 1, self ));
2656
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","samplesPerFrame", 1, self ));
3372
2657
  }
3373
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3374
- result = (swig::Iterator *)((swig::Iterator const *)arg1)->dup();
3375
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 );
2658
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2659
+ result = (int)((TagLib::MPEG::Header const *)arg1)->samplesPerFrame();
2660
+ vresult = SWIG_From_int(static_cast< int >(result));
3376
2661
  return vresult;
3377
2662
  fail:
3378
2663
  return Qnil;
3379
2664
  }
3380
2665
 
3381
2666
 
2667
+ swig_class SwigClassProperties;
2668
+
3382
2669
  SWIGINTERN VALUE
3383
- _wrap_Iterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
3384
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3385
- size_t arg2 ;
2670
+ _wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) {
2671
+ TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
2672
+ TagLib::AudioProperties::ReadStyle arg2 ;
3386
2673
  void *argp1 = 0 ;
3387
2674
  int res1 = 0 ;
3388
- size_t val2 ;
2675
+ int val2 ;
3389
2676
  int ecode2 = 0 ;
3390
- swig::Iterator *result = 0 ;
3391
- VALUE vresult = Qnil;
2677
+ TagLib::MPEG::Properties *result = 0 ;
3392
2678
 
3393
- if ((argc < 1) || (argc > 1)) {
3394
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2679
+ if ((argc < 2) || (argc > 2)) {
2680
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3395
2681
  }
3396
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2682
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3397
2683
  if (!SWIG_IsOK(res1)) {
3398
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self ));
2684
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","TagLib::MPEG::Properties", 1, argv[0] ));
3399
2685
  }
3400
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3401
- ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
2686
+ arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
2687
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3402
2688
  if (!SWIG_IsOK(ecode2)) {
3403
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
2689
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","TagLib::MPEG::Properties", 2, argv[1] ));
3404
2690
  }
3405
- arg2 = static_cast< size_t >(val2);
3406
- result = (swig::Iterator *)(arg1)->next(arg2);
3407
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 );
3408
- return vresult;
2691
+ arg2 = static_cast< TagLib::AudioProperties::ReadStyle >(val2);
2692
+ result = (TagLib::MPEG::Properties *)new TagLib::MPEG::Properties(arg1,arg2);
2693
+ DATA_PTR(self) = result;
2694
+ SWIG_RubyAddTracking(result, self);
2695
+ return self;
3409
2696
  fail:
3410
2697
  return Qnil;
3411
2698
  }
3412
2699
 
3413
2700
 
2701
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2702
+ SWIGINTERN VALUE
2703
+ _wrap_Properties_allocate(VALUE self) {
2704
+ #else
2705
+ SWIGINTERN VALUE
2706
+ _wrap_Properties_allocate(int argc, VALUE *argv, VALUE self) {
2707
+ #endif
2708
+
2709
+
2710
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_TagLib__MPEG__Properties);
2711
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2712
+ rb_obj_call_init(vresult, argc, argv);
2713
+ #endif
2714
+ return vresult;
2715
+ }
2716
+
2717
+
3414
2718
  SWIGINTERN VALUE
3415
- _wrap_Iterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
3416
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
2719
+ _wrap_new_Properties__SWIG_1(int argc, VALUE *argv, VALUE self) {
2720
+ TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
3417
2721
  void *argp1 = 0 ;
3418
2722
  int res1 = 0 ;
3419
- swig::Iterator *result = 0 ;
3420
- VALUE vresult = Qnil;
2723
+ TagLib::MPEG::Properties *result = 0 ;
3421
2724
 
3422
- if ((argc < 0) || (argc > 0)) {
3423
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2725
+ if ((argc < 1) || (argc > 1)) {
2726
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3424
2727
  }
3425
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2728
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3426
2729
  if (!SWIG_IsOK(res1)) {
3427
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self ));
3428
- }
3429
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3430
- try {
3431
- result = (swig::Iterator *)(arg1)->next();
2730
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","TagLib::MPEG::Properties", 1, argv[0] ));
3432
2731
  }
3433
- catch(swig::stop_iteration &_e) {
3434
- {
3435
- (void)_e;
3436
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3437
- SWIG_fail;
3438
- }
3439
- }
3440
-
3441
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 );
3442
- return vresult;
2732
+ arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
2733
+ result = (TagLib::MPEG::Properties *)new TagLib::MPEG::Properties(arg1);
2734
+ DATA_PTR(self) = result;
2735
+ SWIG_RubyAddTracking(result, self);
2736
+ return self;
3443
2737
  fail:
3444
2738
  return Qnil;
3445
2739
  }
3446
2740
 
3447
2741
 
3448
- SWIGINTERN VALUE _wrap_Iterator_next(int nargs, VALUE *args, VALUE self) {
2742
+ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) {
3449
2743
  int argc;
3450
- VALUE argv[3];
2744
+ VALUE argv[2];
3451
2745
  int ii;
3452
2746
 
3453
- argc = nargs + 1;
3454
- argv[0] = self;
3455
- if (argc > 3) SWIG_fail;
3456
- for (ii = 1; (ii < argc); ++ii) {
3457
- argv[ii] = args[ii-1];
2747
+ argc = nargs;
2748
+ if (argc > 2) SWIG_fail;
2749
+ for (ii = 0; (ii < argc); ++ii) {
2750
+ argv[ii] = args[ii];
3458
2751
  }
3459
2752
  if (argc == 1) {
3460
2753
  int _v;
3461
2754
  void *vptr = 0;
3462
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
2755
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3463
2756
  _v = SWIG_CheckState(res);
3464
2757
  if (_v) {
3465
- return _wrap_Iterator_next__SWIG_1(nargs, args, self);
2758
+ return _wrap_new_Properties__SWIG_1(nargs, args, self);
3466
2759
  }
3467
2760
  }
3468
2761
  if (argc == 2) {
3469
2762
  int _v;
3470
2763
  void *vptr = 0;
3471
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
2764
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3472
2765
  _v = SWIG_CheckState(res);
3473
2766
  if (_v) {
3474
2767
  {
3475
- int res = SWIG_AsVal_size_t(argv[1], NULL);
2768
+ int res = SWIG_AsVal_int(argv[1], NULL);
3476
2769
  _v = SWIG_CheckState(res);
3477
2770
  }
3478
2771
  if (_v) {
3479
- return _wrap_Iterator_next__SWIG_0(nargs, args, self);
2772
+ return _wrap_new_Properties__SWIG_0(nargs, args, self);
3480
2773
  }
3481
2774
  }
3482
2775
  }
3483
2776
 
3484
2777
  fail:
3485
- Ruby_Format_OverloadedError( argc, 3, "Iterator.next",
3486
- " swig::Iterator * Iterator.next(size_t n)\n"
3487
- " swig::Iterator * Iterator.next()\n");
2778
+ Ruby_Format_OverloadedError( argc, 2, "Properties.new",
2779
+ " Properties.new(TagLib::MPEG::File *file, TagLib::AudioProperties::ReadStyle style)\n"
2780
+ " Properties.new(TagLib::MPEG::File *file)\n");
3488
2781
 
3489
2782
  return Qnil;
3490
2783
  }
3491
2784
 
3492
2785
 
2786
+ SWIGINTERN void
2787
+ free_TagLib_MPEG_Properties(TagLib::MPEG::Properties *arg1) {
2788
+ SWIG_RubyRemoveTracking(arg1);
2789
+ delete arg1;
2790
+ }
2791
+
3493
2792
  SWIGINTERN VALUE
3494
- _wrap_Iterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
3495
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3496
- size_t arg2 ;
2793
+ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2794
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3497
2795
  void *argp1 = 0 ;
3498
2796
  int res1 = 0 ;
3499
- size_t val2 ;
3500
- int ecode2 = 0 ;
3501
- swig::Iterator *result = 0 ;
2797
+ int result;
3502
2798
  VALUE vresult = Qnil;
3503
2799
 
3504
- if ((argc < 1) || (argc > 1)) {
3505
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2800
+ if ((argc < 0) || (argc > 0)) {
2801
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3506
2802
  }
3507
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2803
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3508
2804
  if (!SWIG_IsOK(res1)) {
3509
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self ));
2805
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","length", 1, self ));
3510
2806
  }
3511
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3512
- ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
3513
- if (!SWIG_IsOK(ecode2)) {
3514
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
3515
- }
3516
- arg2 = static_cast< size_t >(val2);
3517
- result = (swig::Iterator *)(arg1)->previous(arg2);
3518
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 );
2807
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2808
+ result = (int)((TagLib::MPEG::Properties const *)arg1)->length();
2809
+ vresult = SWIG_From_int(static_cast< int >(result));
3519
2810
  return vresult;
3520
2811
  fail:
3521
2812
  return Qnil;
@@ -3523,291 +2814,167 @@ fail:
3523
2814
 
3524
2815
 
3525
2816
  SWIGINTERN VALUE
3526
- _wrap_Iterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
3527
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
2817
+ _wrap_Properties_bitrate(int argc, VALUE *argv, VALUE self) {
2818
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3528
2819
  void *argp1 = 0 ;
3529
2820
  int res1 = 0 ;
3530
- swig::Iterator *result = 0 ;
2821
+ int result;
3531
2822
  VALUE vresult = Qnil;
3532
2823
 
3533
2824
  if ((argc < 0) || (argc > 0)) {
3534
2825
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3535
2826
  }
3536
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2827
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3537
2828
  if (!SWIG_IsOK(res1)) {
3538
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self ));
2829
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","bitrate", 1, self ));
3539
2830
  }
3540
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3541
- try {
3542
- result = (swig::Iterator *)(arg1)->previous();
3543
- }
3544
- catch(swig::stop_iteration &_e) {
3545
- {
3546
- (void)_e;
3547
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3548
- SWIG_fail;
3549
- }
3550
- }
3551
-
3552
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 | 0 );
2831
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2832
+ result = (int)((TagLib::MPEG::Properties const *)arg1)->bitrate();
2833
+ vresult = SWIG_From_int(static_cast< int >(result));
3553
2834
  return vresult;
3554
2835
  fail:
3555
2836
  return Qnil;
3556
2837
  }
3557
2838
 
3558
2839
 
3559
- SWIGINTERN VALUE _wrap_Iterator_previous(int nargs, VALUE *args, VALUE self) {
3560
- int argc;
3561
- VALUE argv[3];
3562
- int ii;
2840
+ SWIGINTERN VALUE
2841
+ _wrap_Properties_sample_rate(int argc, VALUE *argv, VALUE self) {
2842
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
2843
+ void *argp1 = 0 ;
2844
+ int res1 = 0 ;
2845
+ int result;
2846
+ VALUE vresult = Qnil;
3563
2847
 
3564
- argc = nargs + 1;
3565
- argv[0] = self;
3566
- if (argc > 3) SWIG_fail;
3567
- for (ii = 1; (ii < argc); ++ii) {
3568
- argv[ii] = args[ii-1];
3569
- }
3570
- if (argc == 1) {
3571
- int _v;
3572
- void *vptr = 0;
3573
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
3574
- _v = SWIG_CheckState(res);
3575
- if (_v) {
3576
- return _wrap_Iterator_previous__SWIG_1(nargs, args, self);
3577
- }
2848
+ if ((argc < 0) || (argc > 0)) {
2849
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3578
2850
  }
3579
- if (argc == 2) {
3580
- int _v;
3581
- void *vptr = 0;
3582
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
3583
- _v = SWIG_CheckState(res);
3584
- if (_v) {
3585
- {
3586
- int res = SWIG_AsVal_size_t(argv[1], NULL);
3587
- _v = SWIG_CheckState(res);
3588
- }
3589
- if (_v) {
3590
- return _wrap_Iterator_previous__SWIG_0(nargs, args, self);
3591
- }
3592
- }
2851
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
2852
+ if (!SWIG_IsOK(res1)) {
2853
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","sampleRate", 1, self ));
3593
2854
  }
3594
-
2855
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2856
+ result = (int)((TagLib::MPEG::Properties const *)arg1)->sampleRate();
2857
+ vresult = SWIG_From_int(static_cast< int >(result));
2858
+ return vresult;
3595
2859
  fail:
3596
- Ruby_Format_OverloadedError( argc, 3, "Iterator.previous",
3597
- " swig::Iterator * Iterator.previous(size_t n)\n"
3598
- " swig::Iterator * Iterator.previous()\n");
3599
-
3600
2860
  return Qnil;
3601
2861
  }
3602
2862
 
3603
2863
 
3604
-
3605
- /*
3606
- Document-method: TagLib::MPEG::Iterator.inspect
3607
-
3608
- call-seq:
3609
- inspect -> VALUE
3610
-
3611
- Inspect class and its contents.
3612
- */
3613
2864
  SWIGINTERN VALUE
3614
- _wrap_Iterator_inspect(int argc, VALUE *argv, VALUE self) {
3615
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
2865
+ _wrap_Properties_channels(int argc, VALUE *argv, VALUE self) {
2866
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3616
2867
  void *argp1 = 0 ;
3617
2868
  int res1 = 0 ;
3618
- VALUE result;
2869
+ int result;
3619
2870
  VALUE vresult = Qnil;
3620
2871
 
3621
2872
  if ((argc < 0) || (argc > 0)) {
3622
2873
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3623
2874
  }
3624
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2875
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3625
2876
  if (!SWIG_IsOK(res1)) {
3626
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","inspect", 1, self ));
2877
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","channels", 1, self ));
3627
2878
  }
3628
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3629
- result = (VALUE)((swig::Iterator const *)arg1)->inspect();
3630
- vresult = result;
2879
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2880
+ result = (int)((TagLib::MPEG::Properties const *)arg1)->channels();
2881
+ vresult = SWIG_From_int(static_cast< int >(result));
3631
2882
  return vresult;
3632
2883
  fail:
3633
2884
  return Qnil;
3634
2885
  }
3635
2886
 
3636
2887
 
3637
-
3638
- /*
3639
- Document-method: TagLib::MPEG::Iterator.to_s
3640
-
3641
- call-seq:
3642
- to_s -> VALUE
3643
-
3644
- Convert class to a String representation.
3645
- */
3646
2888
  SWIGINTERN VALUE
3647
- _wrap_Iterator_to_s(int argc, VALUE *argv, VALUE self) {
3648
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
2889
+ _wrap_Properties_xing_header(int argc, VALUE *argv, VALUE self) {
2890
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3649
2891
  void *argp1 = 0 ;
3650
2892
  int res1 = 0 ;
3651
- VALUE result;
2893
+ TagLib::MPEG::XingHeader *result = 0 ;
3652
2894
  VALUE vresult = Qnil;
3653
2895
 
3654
2896
  if ((argc < 0) || (argc > 0)) {
3655
2897
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3656
2898
  }
3657
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2899
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3658
2900
  if (!SWIG_IsOK(res1)) {
3659
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","to_s", 1, self ));
2901
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","xingHeader", 1, self ));
3660
2902
  }
3661
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3662
- result = (VALUE)((swig::Iterator const *)arg1)->to_s();
3663
- vresult = result;
2903
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2904
+ result = (TagLib::MPEG::XingHeader *)((TagLib::MPEG::Properties const *)arg1)->xingHeader();
2905
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__MPEG__XingHeader, 0 | 0 );
3664
2906
  return vresult;
3665
2907
  fail:
3666
2908
  return Qnil;
3667
2909
  }
3668
2910
 
3669
2911
 
3670
-
3671
- /*
3672
- Document-method: TagLib::MPEG::Iterator.==
3673
-
3674
- call-seq:
3675
- ==(x) -> bool
3676
-
3677
- Equality comparison operator.
3678
- */
3679
2912
  SWIGINTERN VALUE
3680
- _wrap_Iterator___eq__(int argc, VALUE *argv, VALUE self) {
3681
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3682
- swig::Iterator *arg2 = 0 ;
2913
+ _wrap_Properties_version(int argc, VALUE *argv, VALUE self) {
2914
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3683
2915
  void *argp1 = 0 ;
3684
2916
  int res1 = 0 ;
3685
- void *argp2 ;
3686
- int res2 = 0 ;
3687
- bool result;
2917
+ TagLib::MPEG::Header::Version result;
3688
2918
  VALUE vresult = Qnil;
3689
2919
 
3690
- if ((argc < 1) || (argc > 1)) {
3691
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2920
+ if ((argc < 0) || (argc > 0)) {
2921
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3692
2922
  }
3693
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2923
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3694
2924
  if (!SWIG_IsOK(res1)) {
3695
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator ==", 1, self ));
3696
- }
3697
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3698
- res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 );
3699
- if (!SWIG_IsOK(res2)) {
3700
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator ==", 2, argv[0] ));
2925
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","version", 1, self ));
3701
2926
  }
3702
- if (!argp2) {
3703
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator ==", 2, argv[0]));
3704
- }
3705
- arg2 = reinterpret_cast< swig::Iterator * >(argp2);
3706
- result = (bool)((swig::Iterator const *)arg1)->operator ==((swig::Iterator const &)*arg2);
3707
- vresult = SWIG_From_bool(static_cast< bool >(result));
2927
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2928
+ result = (TagLib::MPEG::Header::Version)((TagLib::MPEG::Properties const *)arg1)->version();
2929
+ vresult = SWIG_From_int(static_cast< int >(result));
3708
2930
  return vresult;
3709
2931
  fail:
3710
2932
  return Qnil;
3711
2933
  }
3712
2934
 
3713
2935
 
3714
-
3715
- /*
3716
- Document-method: TagLib::MPEG::Iterator.+
3717
-
3718
- call-seq:
3719
- +(n) -> Iterator
3720
-
3721
- Add operator.
3722
- */
3723
2936
  SWIGINTERN VALUE
3724
- _wrap_Iterator___add__(int argc, VALUE *argv, VALUE self) {
3725
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3726
- ptrdiff_t arg2 ;
2937
+ _wrap_Properties_layer(int argc, VALUE *argv, VALUE self) {
2938
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3727
2939
  void *argp1 = 0 ;
3728
2940
  int res1 = 0 ;
3729
- ptrdiff_t val2 ;
3730
- int ecode2 = 0 ;
3731
- swig::Iterator *result = 0 ;
2941
+ int result;
3732
2942
  VALUE vresult = Qnil;
3733
2943
 
3734
- if ((argc < 1) || (argc > 1)) {
3735
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2944
+ if ((argc < 0) || (argc > 0)) {
2945
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3736
2946
  }
3737
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2947
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3738
2948
  if (!SWIG_IsOK(res1)) {
3739
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator +", 1, self ));
3740
- }
3741
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3742
- ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
3743
- if (!SWIG_IsOK(ecode2)) {
3744
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
3745
- }
3746
- arg2 = static_cast< ptrdiff_t >(val2);
3747
- try {
3748
- result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator +(arg2);
3749
- }
3750
- catch(swig::stop_iteration &_e) {
3751
- {
3752
- (void)_e;
3753
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3754
- SWIG_fail;
3755
- }
2949
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","layer", 1, self ));
3756
2950
  }
3757
-
3758
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 );
2951
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2952
+ result = (int)((TagLib::MPEG::Properties const *)arg1)->layer();
2953
+ vresult = SWIG_From_int(static_cast< int >(result));
3759
2954
  return vresult;
3760
2955
  fail:
3761
2956
  return Qnil;
3762
2957
  }
3763
2958
 
3764
2959
 
3765
-
3766
- /*
3767
- Document-method: TagLib::MPEG::Iterator.-
3768
-
3769
- call-seq:
3770
- -(n) -> Iterator
3771
- -(x) -> ptrdiff_t
3772
-
3773
- Substraction operator.
3774
- */
3775
2960
  SWIGINTERN VALUE
3776
- _wrap_Iterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
3777
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3778
- ptrdiff_t arg2 ;
2961
+ _wrap_Properties_protection_enabled(int argc, VALUE *argv, VALUE self) {
2962
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3779
2963
  void *argp1 = 0 ;
3780
2964
  int res1 = 0 ;
3781
- ptrdiff_t val2 ;
3782
- int ecode2 = 0 ;
3783
- swig::Iterator *result = 0 ;
2965
+ bool result;
3784
2966
  VALUE vresult = Qnil;
3785
2967
 
3786
- if ((argc < 1) || (argc > 1)) {
3787
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2968
+ if ((argc < 0) || (argc > 0)) {
2969
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3788
2970
  }
3789
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2971
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3790
2972
  if (!SWIG_IsOK(res1)) {
3791
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self ));
3792
- }
3793
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3794
- ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
3795
- if (!SWIG_IsOK(ecode2)) {
3796
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
3797
- }
3798
- arg2 = static_cast< ptrdiff_t >(val2);
3799
- try {
3800
- result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator -(arg2);
3801
- }
3802
- catch(swig::stop_iteration &_e) {
3803
- {
3804
- (void)_e;
3805
- SWIG_Ruby_ExceptionType(NULL, Qnil);
3806
- SWIG_fail;
3807
- }
2973
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","protectionEnabled", 1, self ));
3808
2974
  }
3809
-
3810
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN | 0 );
2975
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
2976
+ result = (bool)((TagLib::MPEG::Properties const *)arg1)->protectionEnabled();
2977
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3811
2978
  return vresult;
3812
2979
  fail:
3813
2980
  return Qnil;
@@ -3815,95 +2982,77 @@ fail:
3815
2982
 
3816
2983
 
3817
2984
  SWIGINTERN VALUE
3818
- _wrap_Iterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
3819
- swig::Iterator *arg1 = (swig::Iterator *) 0 ;
3820
- swig::Iterator *arg2 = 0 ;
2985
+ _wrap_Properties_channel_mode(int argc, VALUE *argv, VALUE self) {
2986
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3821
2987
  void *argp1 = 0 ;
3822
2988
  int res1 = 0 ;
3823
- void *argp2 ;
3824
- int res2 = 0 ;
3825
- ptrdiff_t result;
2989
+ TagLib::MPEG::Header::ChannelMode result;
3826
2990
  VALUE vresult = Qnil;
3827
2991
 
3828
- if ((argc < 1) || (argc > 1)) {
3829
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2992
+ if ((argc < 0) || (argc > 0)) {
2993
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3830
2994
  }
3831
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 | 0 );
2995
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3832
2996
  if (!SWIG_IsOK(res1)) {
3833
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self ));
3834
- }
3835
- arg1 = reinterpret_cast< swig::Iterator * >(argp1);
3836
- res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator, 0 );
3837
- if (!SWIG_IsOK(res2)) {
3838
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator -", 2, argv[0] ));
3839
- }
3840
- if (!argp2) {
3841
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator -", 2, argv[0]));
2997
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","channelMode", 1, self ));
3842
2998
  }
3843
- arg2 = reinterpret_cast< swig::Iterator * >(argp2);
3844
- result = ((swig::Iterator const *)arg1)->operator -((swig::Iterator const &)*arg2);
3845
- vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
2999
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3000
+ result = (TagLib::MPEG::Header::ChannelMode)((TagLib::MPEG::Properties const *)arg1)->channelMode();
3001
+ vresult = SWIG_From_int(static_cast< int >(result));
3846
3002
  return vresult;
3847
3003
  fail:
3848
3004
  return Qnil;
3849
3005
  }
3850
3006
 
3851
3007
 
3852
- SWIGINTERN VALUE _wrap_Iterator___sub__(int nargs, VALUE *args, VALUE self) {
3853
- int argc;
3854
- VALUE argv[3];
3855
- int ii;
3008
+ SWIGINTERN VALUE
3009
+ _wrap_Properties_copyrightedq___(int argc, VALUE *argv, VALUE self) {
3010
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3011
+ void *argp1 = 0 ;
3012
+ int res1 = 0 ;
3013
+ bool result;
3014
+ VALUE vresult = Qnil;
3856
3015
 
3857
- argc = nargs + 1;
3858
- argv[0] = self;
3859
- if (argc > 3) SWIG_fail;
3860
- for (ii = 1; (ii < argc); ++ii) {
3861
- argv[ii] = args[ii-1];
3862
- }
3863
- if (argc == 2) {
3864
- int _v;
3865
- void *vptr = 0;
3866
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
3867
- _v = SWIG_CheckState(res);
3868
- if (_v) {
3869
- void *vptr = 0;
3870
- int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__Iterator, 0);
3871
- _v = SWIG_CheckState(res);
3872
- if (_v) {
3873
- return _wrap_Iterator___sub____SWIG_1(nargs, args, self);
3874
- }
3875
- }
3016
+ if ((argc < 0) || (argc > 0)) {
3017
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3876
3018
  }
3877
- if (argc == 2) {
3878
- int _v;
3879
- void *vptr = 0;
3880
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
3881
- _v = SWIG_CheckState(res);
3882
- if (_v) {
3883
- {
3884
- int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
3885
- _v = SWIG_CheckState(res);
3886
- }
3887
- if (_v) {
3888
- return _wrap_Iterator___sub____SWIG_0(nargs, args, self);
3889
- }
3890
- }
3019
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3020
+ if (!SWIG_IsOK(res1)) {
3021
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","isCopyrighted", 1, self ));
3891
3022
  }
3892
-
3023
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3024
+ result = (bool)((TagLib::MPEG::Properties const *)arg1)->isCopyrighted();
3025
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3026
+ return vresult;
3893
3027
  fail:
3894
- Ruby_Format_OverloadedError( argc, 3, "__sub__.new",
3895
- " __sub__.new(ptrdiff_t n)\n"
3896
- " __sub__.new(swig::Iterator const &x)\n");
3897
-
3898
3028
  return Qnil;
3899
3029
  }
3900
3030
 
3901
3031
 
3902
- SWIGINTERN void
3903
- free_swig_Iterator(swig::Iterator *arg1) {
3904
- delete arg1;
3032
+ SWIGINTERN VALUE
3033
+ _wrap_Properties_originalq___(int argc, VALUE *argv, VALUE self) {
3034
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3035
+ void *argp1 = 0 ;
3036
+ int res1 = 0 ;
3037
+ bool result;
3038
+ VALUE vresult = Qnil;
3039
+
3040
+ if ((argc < 0) || (argc > 0)) {
3041
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3042
+ }
3043
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3044
+ if (!SWIG_IsOK(res1)) {
3045
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","isOriginal", 1, self ));
3046
+ }
3047
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3048
+ result = (bool)((TagLib::MPEG::Properties const *)arg1)->isOriginal();
3049
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3050
+ return vresult;
3051
+ fail:
3052
+ return Qnil;
3905
3053
  }
3906
3054
 
3055
+
3907
3056
  swig_class SwigClassFile;
3908
3057
 
3909
3058
  SWIGINTERN VALUE
@@ -3916,8 +3065,8 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3916
3065
  int alloc1 = 0 ;
3917
3066
  bool val2 ;
3918
3067
  int ecode2 = 0 ;
3919
- void *argp3 ;
3920
- int res3 = 0 ;
3068
+ int val3 ;
3069
+ int ecode3 = 0 ;
3921
3070
  TagLib::MPEG::File *result = 0 ;
3922
3071
 
3923
3072
  if ((argc < 3) || (argc > 3)) {
@@ -3933,17 +3082,11 @@ _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3933
3082
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","TagLib::MPEG::File", 2, argv[1] ));
3934
3083
  }
3935
3084
  arg2 = static_cast< bool >(val2);
3936
- {
3937
- res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_TagLib__MPEG__Properties__ReadStyle, 0 );
3938
- if (!SWIG_IsOK(res3)) {
3939
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 3, argv[2] ));
3940
- }
3941
- if (!argp3) {
3942
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 3, argv[2]));
3943
- } else {
3944
- arg3 = *(reinterpret_cast< TagLib::MPEG::Properties::ReadStyle * >(argp3));
3945
- }
3946
- }
3085
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3086
+ if (!SWIG_IsOK(ecode3)) {
3087
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 3, argv[2] ));
3088
+ }
3089
+ arg3 = static_cast< TagLib::MPEG::Properties::ReadStyle >(val3);
3947
3090
  result = (TagLib::MPEG::File *)new TagLib::MPEG::File(arg1,arg2,arg3);
3948
3091
  DATA_PTR(self) = result;
3949
3092
  SWIG_RubyAddTracking(result, self);
@@ -4030,8 +3173,8 @@ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
4030
3173
  int res2 = 0 ;
4031
3174
  bool val3 ;
4032
3175
  int ecode3 = 0 ;
4033
- void *argp4 ;
4034
- int res4 = 0 ;
3176
+ int val4 ;
3177
+ int ecode4 = 0 ;
4035
3178
  TagLib::MPEG::File *result = 0 ;
4036
3179
 
4037
3180
  if ((argc < 4) || (argc > 4)) {
@@ -4052,17 +3195,11 @@ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
4052
3195
  SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","TagLib::MPEG::File", 3, argv[2] ));
4053
3196
  }
4054
3197
  arg3 = static_cast< bool >(val3);
4055
- {
4056
- res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_TagLib__MPEG__Properties__ReadStyle, 0 );
4057
- if (!SWIG_IsOK(res4)) {
4058
- SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 4, argv[3] ));
4059
- }
4060
- if (!argp4) {
4061
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 4, argv[3]));
4062
- } else {
4063
- arg4 = *(reinterpret_cast< TagLib::MPEG::Properties::ReadStyle * >(argp4));
4064
- }
4065
- }
3198
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3199
+ if (!SWIG_IsOK(ecode4)) {
3200
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","TagLib::MPEG::File", 4, argv[3] ));
3201
+ }
3202
+ arg4 = static_cast< TagLib::MPEG::Properties::ReadStyle >(val4);
4066
3203
  result = (TagLib::MPEG::File *)new TagLib::MPEG::File(arg1,arg2,arg3,arg4);
4067
3204
  DATA_PTR(self) = result;
4068
3205
  SWIG_RubyAddTracking(result, self);
@@ -4243,9 +3380,10 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
4243
3380
  _v = SWIG_CheckState(res);
4244
3381
  }
4245
3382
  if (_v) {
4246
- void *vptr = 0;
4247
- int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TagLib__MPEG__Properties__ReadStyle, 0);
4248
- _v = SWIG_CheckState(res);
3383
+ {
3384
+ int res = SWIG_AsVal_int(argv[2], NULL);
3385
+ _v = SWIG_CheckState(res);
3386
+ }
4249
3387
  if (_v) {
4250
3388
  return _wrap_new_File__SWIG_0(nargs, args, self);
4251
3389
  }
@@ -4266,9 +3404,10 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
4266
3404
  _v = SWIG_CheckState(res);
4267
3405
  }
4268
3406
  if (_v) {
4269
- void *vptr = 0;
4270
- int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__MPEG__Properties__ReadStyle, 0);
4271
- _v = SWIG_CheckState(res);
3407
+ {
3408
+ int res = SWIG_AsVal_int(argv[3], NULL);
3409
+ _v = SWIG_CheckState(res);
3410
+ }
4272
3411
  if (_v) {
4273
3412
  return _wrap_new_File__SWIG_3(nargs, args, self);
4274
3413
  }
@@ -5114,91 +4253,71 @@ fail:
5114
4253
  static void *_p_TagLib__MPEG__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5115
4254
  return (void *)((TagLib::File *) ((TagLib::MPEG::File *) x));
5116
4255
  }
5117
- static void *_p_swig__IteratorTo_p_swig__ConstIterator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
5118
- return (void *)((swig::ConstIterator *) ((swig::Iterator *) x));
4256
+ static void *_p_TagLib__MPEG__PropertiesTo_p_TagLib__AudioProperties(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4257
+ return (void *)((TagLib::AudioProperties *) ((TagLib::MPEG::Properties *) x));
5119
4258
  }
5120
4259
  static swig_type_info _swigt__p_TagLib__APE__Tag = {"_p_TagLib__APE__Tag", "TagLib::APE::Tag *", 0, 0, (void*)0, 0};
4260
+ static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
4261
+ static swig_type_info _swigt__p_TagLib__ByteVector = {"_p_TagLib__ByteVector", "TagLib::ByteVector *", 0, 0, (void*)0, 0};
5121
4262
  static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
5122
4263
  static swig_type_info _swigt__p_TagLib__ID3v1__Tag = {"_p_TagLib__ID3v1__Tag", "TagLib::ID3v1::Tag *", 0, 0, (void*)0, 0};
5123
4264
  static swig_type_info _swigt__p_TagLib__ID3v2__FrameFactory = {"_p_TagLib__ID3v2__FrameFactory", "TagLib::ID3v2::FrameFactory *", 0, 0, (void*)0, 0};
5124
4265
  static swig_type_info _swigt__p_TagLib__ID3v2__Tag = {"_p_TagLib__ID3v2__Tag", "TagLib::ID3v2::Tag *", 0, 0, (void*)0, 0};
5125
4266
  static swig_type_info _swigt__p_TagLib__MPEG__File = {"_p_TagLib__MPEG__File", "TagLib::MPEG::File *", 0, 0, (void*)0, 0};
4267
+ static swig_type_info _swigt__p_TagLib__MPEG__Header = {"_p_TagLib__MPEG__Header", "TagLib::MPEG::Header *", 0, 0, (void*)0, 0};
5126
4268
  static swig_type_info _swigt__p_TagLib__MPEG__Properties = {"_p_TagLib__MPEG__Properties", "TagLib::MPEG::Properties *", 0, 0, (void*)0, 0};
5127
- static swig_type_info _swigt__p_TagLib__MPEG__Properties__ReadStyle = {"_p_TagLib__MPEG__Properties__ReadStyle", "TagLib::MPEG::Properties::ReadStyle *", 0, 0, (void*)0, 0};
4269
+ static swig_type_info _swigt__p_TagLib__MPEG__XingHeader = {"_p_TagLib__MPEG__XingHeader", "TagLib::MPEG::XingHeader *", 0, 0, (void*)0, 0};
5128
4270
  static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
5129
4271
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
5130
- static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **|VALUE *", 0, 0, (void*)0, 0};
5131
- static swig_type_info _swigt__p_std__basic_stringT_wchar_t_t = {"_p_std__basic_stringT_wchar_t_t", "std::basic_string< wchar_t > *|TagLib::wstring *", 0, 0, (void*)0, 0};
5132
- static swig_type_info _swigt__p_swig__ConstIterator = {"_p_swig__ConstIterator", "swig::ConstIterator *", 0, 0, (void*)0, 0};
5133
- static swig_type_info _swigt__p_swig__GC_VALUE = {"_p_swig__GC_VALUE", "swig::GC_VALUE *", 0, 0, (void*)0, 0};
5134
- static swig_type_info _swigt__p_swig__Iterator = {"_p_swig__Iterator", "swig::Iterator *", 0, 0, (void*)0, 0};
5135
- static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
5136
4272
  static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|TagLib::uint *", 0, 0, (void*)0, 0};
5137
- static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
5138
- static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
5139
4273
 
5140
4274
  static swig_type_info *swig_type_initial[] = {
5141
4275
  &_swigt__p_TagLib__APE__Tag,
4276
+ &_swigt__p_TagLib__AudioProperties,
4277
+ &_swigt__p_TagLib__ByteVector,
5142
4278
  &_swigt__p_TagLib__File,
5143
4279
  &_swigt__p_TagLib__ID3v1__Tag,
5144
4280
  &_swigt__p_TagLib__ID3v2__FrameFactory,
5145
4281
  &_swigt__p_TagLib__ID3v2__Tag,
5146
4282
  &_swigt__p_TagLib__MPEG__File,
4283
+ &_swigt__p_TagLib__MPEG__Header,
5147
4284
  &_swigt__p_TagLib__MPEG__Properties,
5148
- &_swigt__p_TagLib__MPEG__Properties__ReadStyle,
4285
+ &_swigt__p_TagLib__MPEG__XingHeader,
5149
4286
  &_swigt__p_TagLib__Tag,
5150
4287
  &_swigt__p_char,
5151
- &_swigt__p_p_void,
5152
- &_swigt__p_std__basic_stringT_wchar_t_t,
5153
- &_swigt__p_swig__ConstIterator,
5154
- &_swigt__p_swig__GC_VALUE,
5155
- &_swigt__p_swig__Iterator,
5156
- &_swigt__p_unsigned_char,
5157
4288
  &_swigt__p_unsigned_int,
5158
- &_swigt__p_unsigned_long,
5159
- &_swigt__p_wchar_t,
5160
4289
  };
5161
4290
 
5162
4291
  static swig_cast_info _swigc__p_TagLib__APE__Tag[] = { {&_swigt__p_TagLib__APE__Tag, 0, 0, 0},{0, 0, 0, 0}};
4292
+ static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__MPEG__Properties, _p_TagLib__MPEG__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
4293
+ static swig_cast_info _swigc__p_TagLib__ByteVector[] = { {&_swigt__p_TagLib__ByteVector, 0, 0, 0},{0, 0, 0, 0}};
5163
4294
  static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__MPEG__File, _p_TagLib__MPEG__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
5164
4295
  static swig_cast_info _swigc__p_TagLib__ID3v1__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, 0, 0, 0},{0, 0, 0, 0}};
5165
4296
  static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}};
5166
4297
  static swig_cast_info _swigc__p_TagLib__ID3v2__Tag[] = { {&_swigt__p_TagLib__ID3v2__Tag, 0, 0, 0},{0, 0, 0, 0}};
5167
4298
  static swig_cast_info _swigc__p_TagLib__MPEG__File[] = { {&_swigt__p_TagLib__MPEG__File, 0, 0, 0},{0, 0, 0, 0}};
4299
+ static swig_cast_info _swigc__p_TagLib__MPEG__Header[] = { {&_swigt__p_TagLib__MPEG__Header, 0, 0, 0},{0, 0, 0, 0}};
5168
4300
  static swig_cast_info _swigc__p_TagLib__MPEG__Properties[] = { {&_swigt__p_TagLib__MPEG__Properties, 0, 0, 0},{0, 0, 0, 0}};
5169
- static swig_cast_info _swigc__p_TagLib__MPEG__Properties__ReadStyle[] = { {&_swigt__p_TagLib__MPEG__Properties__ReadStyle, 0, 0, 0},{0, 0, 0, 0}};
4301
+ static swig_cast_info _swigc__p_TagLib__MPEG__XingHeader[] = { {&_swigt__p_TagLib__MPEG__XingHeader, 0, 0, 0},{0, 0, 0, 0}};
5170
4302
  static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}};
5171
4303
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
5172
- static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
5173
- static swig_cast_info _swigc__p_std__basic_stringT_wchar_t_t[] = { {&_swigt__p_std__basic_stringT_wchar_t_t, 0, 0, 0},{0, 0, 0, 0}};
5174
- static swig_cast_info _swigc__p_swig__ConstIterator[] = { {&_swigt__p_swig__ConstIterator, 0, 0, 0}, {&_swigt__p_swig__Iterator, _p_swig__IteratorTo_p_swig__ConstIterator, 0, 0},{0, 0, 0, 0}};
5175
- static swig_cast_info _swigc__p_swig__GC_VALUE[] = { {&_swigt__p_swig__GC_VALUE, 0, 0, 0},{0, 0, 0, 0}};
5176
- static swig_cast_info _swigc__p_swig__Iterator[] = { {&_swigt__p_swig__Iterator, 0, 0, 0},{0, 0, 0, 0}};
5177
- static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
5178
4304
  static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
5179
- static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
5180
- static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, 0, 0, 0}};
5181
4305
 
5182
4306
  static swig_cast_info *swig_cast_initial[] = {
5183
4307
  _swigc__p_TagLib__APE__Tag,
4308
+ _swigc__p_TagLib__AudioProperties,
4309
+ _swigc__p_TagLib__ByteVector,
5184
4310
  _swigc__p_TagLib__File,
5185
4311
  _swigc__p_TagLib__ID3v1__Tag,
5186
4312
  _swigc__p_TagLib__ID3v2__FrameFactory,
5187
4313
  _swigc__p_TagLib__ID3v2__Tag,
5188
4314
  _swigc__p_TagLib__MPEG__File,
4315
+ _swigc__p_TagLib__MPEG__Header,
5189
4316
  _swigc__p_TagLib__MPEG__Properties,
5190
- _swigc__p_TagLib__MPEG__Properties__ReadStyle,
4317
+ _swigc__p_TagLib__MPEG__XingHeader,
5191
4318
  _swigc__p_TagLib__Tag,
5192
4319
  _swigc__p_char,
5193
- _swigc__p_p_void,
5194
- _swigc__p_std__basic_stringT_wchar_t_t,
5195
- _swigc__p_swig__ConstIterator,
5196
- _swigc__p_swig__GC_VALUE,
5197
- _swigc__p_swig__Iterator,
5198
- _swigc__p_unsigned_char,
5199
4320
  _swigc__p_unsigned_int,
5200
- _swigc__p_unsigned_long,
5201
- _swigc__p_wchar_t,
5202
4321
  };
5203
4322
 
5204
4323
 
@@ -5460,50 +4579,65 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5460
4579
  }
5461
4580
 
5462
4581
  SWIG_RubyInitializeTrackings();
4582
+ rb_require("taglib_base");
5463
4583
 
5464
- SwigClassGCVALUE.klass = rb_define_class_under(mMPEG, "GCVALUE", rb_cObject);
5465
- SWIG_TypeClientData(SWIGTYPE_p_swig__GC_VALUE, (void *) &SwigClassGCVALUE);
5466
- rb_undef_alloc_func(SwigClassGCVALUE.klass);
5467
- rb_define_method(SwigClassGCVALUE.klass, "inspect", VALUEFUNC(_wrap_GCVALUE_inspect), -1);
5468
- rb_define_method(SwigClassGCVALUE.klass, "to_s", VALUEFUNC(_wrap_GCVALUE_to_s), -1);
5469
- SwigClassGCVALUE.mark = 0;
5470
- SwigClassGCVALUE.trackObjects = 0;
5471
-
5472
- swig::GC_VALUE::initialize();
5473
-
4584
+ SwigClassXingHeader.klass = rb_define_class_under(mMPEG, "XingHeader", rb_cObject);
4585
+ SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__XingHeader, (void *) &SwigClassXingHeader);
4586
+ rb_define_alloc_func(SwigClassXingHeader.klass, _wrap_XingHeader_allocate);
4587
+ rb_define_method(SwigClassXingHeader.klass, "initialize", VALUEFUNC(_wrap_new_XingHeader), -1);
4588
+ rb_define_method(SwigClassXingHeader.klass, "valid?", VALUEFUNC(_wrap_XingHeader_validq___), -1);
4589
+ rb_define_method(SwigClassXingHeader.klass, "total_frames", VALUEFUNC(_wrap_XingHeader_total_frames), -1);
4590
+ rb_define_method(SwigClassXingHeader.klass, "total_size", VALUEFUNC(_wrap_XingHeader_total_size), -1);
4591
+ rb_define_singleton_method(SwigClassXingHeader.klass, "xing_header_offset", VALUEFUNC(_wrap_XingHeader_xing_header_offset), -1);
4592
+ SwigClassXingHeader.mark = 0;
4593
+ SwigClassXingHeader.destroy = (void (*)(void *)) free_TagLib_MPEG_XingHeader;
4594
+ SwigClassXingHeader.trackObjects = 1;
5474
4595
 
5475
- SwigClassConstIterator.klass = rb_define_class_under(mMPEG, "ConstIterator", rb_cObject);
5476
- SWIG_TypeClientData(SWIGTYPE_p_swig__ConstIterator, (void *) &SwigClassConstIterator);
5477
- rb_undef_alloc_func(SwigClassConstIterator.klass);
5478
- rb_define_method(SwigClassConstIterator.klass, "value", VALUEFUNC(_wrap_ConstIterator_value), -1);
5479
- rb_define_method(SwigClassConstIterator.klass, "dup", VALUEFUNC(_wrap_ConstIterator_dup), -1);
5480
- rb_define_method(SwigClassConstIterator.klass, "inspect", VALUEFUNC(_wrap_ConstIterator_inspect), -1);
5481
- rb_define_method(SwigClassConstIterator.klass, "to_s", VALUEFUNC(_wrap_ConstIterator_to_s), -1);
5482
- rb_define_method(SwigClassConstIterator.klass, "next", VALUEFUNC(_wrap_ConstIterator_next), -1);
5483
- rb_define_method(SwigClassConstIterator.klass, "previous", VALUEFUNC(_wrap_ConstIterator_previous), -1);
5484
- rb_define_method(SwigClassConstIterator.klass, "==", VALUEFUNC(_wrap_ConstIterator___eq__), -1);
5485
- rb_define_method(SwigClassConstIterator.klass, "+", VALUEFUNC(_wrap_ConstIterator___add__), -1);
5486
- rb_define_method(SwigClassConstIterator.klass, "-", VALUEFUNC(_wrap_ConstIterator___sub__), -1);
5487
- SwigClassConstIterator.mark = 0;
5488
- SwigClassConstIterator.destroy = (void (*)(void *)) free_swig_ConstIterator;
5489
- SwigClassConstIterator.trackObjects = 0;
4596
+ SwigClassHeader.klass = rb_define_class_under(mMPEG, "Header", rb_cObject);
4597
+ SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Header, (void *) &SwigClassHeader);
4598
+ rb_define_alloc_func(SwigClassHeader.klass, _wrap_Header_allocate);
4599
+ rb_define_method(SwigClassHeader.klass, "initialize", VALUEFUNC(_wrap_new_Header), -1);
4600
+ rb_define_method(SwigClassHeader.klass, "valid?", VALUEFUNC(_wrap_Header_validq___), -1);
4601
+ rb_define_const(SwigClassHeader.klass, "Version1", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version1)));
4602
+ rb_define_const(SwigClassHeader.klass, "Version2", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2)));
4603
+ rb_define_const(SwigClassHeader.klass, "Version2_5", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2_5)));
4604
+ rb_define_method(SwigClassHeader.klass, "version", VALUEFUNC(_wrap_Header_version), -1);
4605
+ rb_define_method(SwigClassHeader.klass, "layer", VALUEFUNC(_wrap_Header_layer), -1);
4606
+ rb_define_method(SwigClassHeader.klass, "protection_enabled", VALUEFUNC(_wrap_Header_protection_enabled), -1);
4607
+ rb_define_method(SwigClassHeader.klass, "bitrate", VALUEFUNC(_wrap_Header_bitrate), -1);
4608
+ rb_define_method(SwigClassHeader.klass, "sample_rate", VALUEFUNC(_wrap_Header_sample_rate), -1);
4609
+ rb_define_method(SwigClassHeader.klass, "padded?", VALUEFUNC(_wrap_Header_paddedq___), -1);
4610
+ rb_define_const(SwigClassHeader.klass, "Stereo", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Stereo)));
4611
+ rb_define_const(SwigClassHeader.klass, "JointStereo", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::JointStereo)));
4612
+ rb_define_const(SwigClassHeader.klass, "DualChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::DualChannel)));
4613
+ rb_define_const(SwigClassHeader.klass, "SingleChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::SingleChannel)));
4614
+ rb_define_method(SwigClassHeader.klass, "channel_mode", VALUEFUNC(_wrap_Header_channel_mode), -1);
4615
+ rb_define_method(SwigClassHeader.klass, "copyrighted?", VALUEFUNC(_wrap_Header_copyrightedq___), -1);
4616
+ rb_define_method(SwigClassHeader.klass, "original?", VALUEFUNC(_wrap_Header_originalq___), -1);
4617
+ rb_define_method(SwigClassHeader.klass, "frame_length", VALUEFUNC(_wrap_Header_frame_length), -1);
4618
+ rb_define_method(SwigClassHeader.klass, "samples_per_frame", VALUEFUNC(_wrap_Header_samples_per_frame), -1);
4619
+ SwigClassHeader.mark = 0;
4620
+ SwigClassHeader.destroy = (void (*)(void *)) free_TagLib_MPEG_Header;
4621
+ SwigClassHeader.trackObjects = 1;
5490
4622
 
5491
- SwigClassIterator.klass = rb_define_class_under(mMPEG, "Iterator", ((swig_class *) SWIGTYPE_p_swig__ConstIterator->clientdata)->klass);
5492
- SWIG_TypeClientData(SWIGTYPE_p_swig__Iterator, (void *) &SwigClassIterator);
5493
- rb_undef_alloc_func(SwigClassIterator.klass);
5494
- rb_define_method(SwigClassIterator.klass, "value=", VALUEFUNC(_wrap_Iterator_valuee___), -1);
5495
- rb_define_method(SwigClassIterator.klass, "dup", VALUEFUNC(_wrap_Iterator_dup), -1);
5496
- rb_define_method(SwigClassIterator.klass, "next", VALUEFUNC(_wrap_Iterator_next), -1);
5497
- rb_define_method(SwigClassIterator.klass, "previous", VALUEFUNC(_wrap_Iterator_previous), -1);
5498
- rb_define_method(SwigClassIterator.klass, "inspect", VALUEFUNC(_wrap_Iterator_inspect), -1);
5499
- rb_define_method(SwigClassIterator.klass, "to_s", VALUEFUNC(_wrap_Iterator_to_s), -1);
5500
- rb_define_method(SwigClassIterator.klass, "==", VALUEFUNC(_wrap_Iterator___eq__), -1);
5501
- rb_define_method(SwigClassIterator.klass, "+", VALUEFUNC(_wrap_Iterator___add__), -1);
5502
- rb_define_method(SwigClassIterator.klass, "-", VALUEFUNC(_wrap_Iterator___sub__), -1);
5503
- SwigClassIterator.mark = 0;
5504
- SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator;
5505
- SwigClassIterator.trackObjects = 0;
5506
- rb_require("taglib_base");
4623
+ SwigClassProperties.klass = rb_define_class_under(mMPEG, "Properties", ((swig_class *) SWIGTYPE_p_TagLib__AudioProperties->clientdata)->klass);
4624
+ SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Properties, (void *) &SwigClassProperties);
4625
+ rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
4626
+ rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
4627
+ rb_define_method(SwigClassProperties.klass, "length", VALUEFUNC(_wrap_Properties_length), -1);
4628
+ rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
4629
+ rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
4630
+ rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);
4631
+ rb_define_method(SwigClassProperties.klass, "xing_header", VALUEFUNC(_wrap_Properties_xing_header), -1);
4632
+ rb_define_method(SwigClassProperties.klass, "version", VALUEFUNC(_wrap_Properties_version), -1);
4633
+ rb_define_method(SwigClassProperties.klass, "layer", VALUEFUNC(_wrap_Properties_layer), -1);
4634
+ rb_define_method(SwigClassProperties.klass, "protection_enabled", VALUEFUNC(_wrap_Properties_protection_enabled), -1);
4635
+ rb_define_method(SwigClassProperties.klass, "channel_mode", VALUEFUNC(_wrap_Properties_channel_mode), -1);
4636
+ rb_define_method(SwigClassProperties.klass, "copyrighted?", VALUEFUNC(_wrap_Properties_copyrightedq___), -1);
4637
+ rb_define_method(SwigClassProperties.klass, "original?", VALUEFUNC(_wrap_Properties_originalq___), -1);
4638
+ SwigClassProperties.mark = 0;
4639
+ SwigClassProperties.destroy = (void (*)(void *)) free_TagLib_MPEG_Properties;
4640
+ SwigClassProperties.trackObjects = 1;
5507
4641
 
5508
4642
  SwigClassFile.klass = rb_define_class_under(mMPEG, "File", ((swig_class *) SWIGTYPE_p_TagLib__File->clientdata)->klass);
5509
4643
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__File, (void *) &SwigClassFile);