ext/cdio/rubycdio_wrap.c in rbcdio-0.03 vs ext/cdio/rubycdio_wrap.c in rbcdio-0.04
- old
+ new
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.33
+ * Version 1.3.36
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
@@ -49,10 +49,16 @@
# else
# define SWIGUNUSED
# endif
#endif
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+# pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
@@ -152,10 +158,16 @@
# else
# define SWIGUNUSED
# endif
#endif
+#ifndef SWIG_MSC_UNSUPPRESS_4505
+# if defined(_MSC_VER)
+# pragma warning(disable : 4505) /* unreferenced local function has been removed */
+# endif
+#endif
+
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
@@ -222,11 +234,11 @@
* type checking.
* ----------------------------------------------------------------------------- */
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
@@ -257,10 +269,11 @@
# define SWIG_BUFFER_SIZE 1024
#endif
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -397,14 +410,14 @@
#ifdef __cplusplus
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
struct swig_cast_info *cast; /* linked list of types that can cast into this type */
@@ -527,12 +540,12 @@
/*
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
Dynamic pointer casting. Down an inheritance hierarchy
*/
@@ -838,17 +851,49 @@
# define RSTRING_LEN(x) RSTRING(x)->len
#endif
#ifndef RSTRING_PTR
# define RSTRING_PTR(x) RSTRING(x)->ptr
#endif
+#ifndef RSTRING_END
+# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
+#endif
#ifndef RARRAY_LEN
# define RARRAY_LEN(x) RARRAY(x)->len
#endif
#ifndef RARRAY_PTR
# define RARRAY_PTR(x) RARRAY(x)->ptr
#endif
+#ifndef RFLOAT_VALUE
+# define RFLOAT_VALUE(x) RFLOAT(x)->value
+#endif
+#ifndef DOUBLE2NUM
+# define DOUBLE2NUM(x) rb_float_new(x)
+#endif
+#ifndef RHASH_TBL
+# define RHASH_TBL(x) (RHASH(x)->tbl)
+#endif
+#ifndef RHASH_ITER_LEV
+# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
+#endif
+#ifndef RHASH_IFNONE
+# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
+#endif
+#ifndef RHASH_SIZE
+# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
+#endif
+#ifndef RHASH_EMPTY_P
+# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
+#endif
+#ifndef RSTRUCT_LEN
+# define RSTRUCT_LEN(x) RSTRUCT(x)->len
+#endif
+#ifndef RSTRUCT_PTR
+# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
+#endif
+
+
/*
* Need to be very careful about how these macros are defined, especially
* when compiling C++ code or C code with an ANSI C compiler.
*
* VALUEFUNC(f) is a macro used to typecast a C function that implements
@@ -1319,10 +1364,11 @@
#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
+#include "assert.h"
/* -----------------------------------------------------------------------------
* pointers/data manipulation
* ----------------------------------------------------------------------------- */
@@ -1580,12 +1626,15 @@
return SWIG_ERROR;
}
tc = SWIG_TypeCheck(c, ty);
if (!tc) {
return SWIG_ERROR;
+ } else {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
}
- *ptr = SWIG_TypeCast(tc, vptr);
} else {
*ptr = vptr;
}
return SWIG_OK;
@@ -1716,17 +1765,19 @@
#define SWIGTYPE_p_Buf_triple_t swig_types[0]
#define SWIGTYPE_p_CdIo_t swig_types[1]
#define SWIGTYPE_p_HWInfo_t swig_types[2]
#define SWIGTYPE_p_cdio_hwinfo_t swig_types[3]
#define SWIGTYPE_p_cdio_read_mode_t swig_types[4]
-#define SWIGTYPE_p_char swig_types[5]
-#define SWIGTYPE_p_int swig_types[6]
-#define SWIGTYPE_p_long swig_types[7]
-#define SWIGTYPE_p_off_t swig_types[8]
-#define SWIGTYPE_p_unsigned_int swig_types[9]
-static swig_type_info *swig_types[11];
-static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
+#define SWIGTYPE_p_cdtext_t swig_types[5]
+#define SWIGTYPE_p_char swig_types[6]
+#define SWIGTYPE_p_int swig_types[7]
+#define SWIGTYPE_p_long swig_types[8]
+#define SWIGTYPE_p_off_t swig_types[9]
+#define SWIGTYPE_p_unsigned_int swig_types[10]
+#define SWIGTYPE_p_unsigned_long swig_types[11]
+static swig_type_info *swig_types[13];
+static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
/* -------- TYPES TABLE (END) -------- */
@@ -1737,11 +1788,11 @@
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
#define SWIG_RUBY_THREAD_END_BLOCK
-#define SWIGVERSION 0x010333
+#define SWIGVERSION 0x010336
#define SWIG_VERSION SWIGVERSION
#define SWIG_as_voidptr(a) (void *)((const void *)(a))
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
@@ -2432,20 +2483,20 @@
CdIo_t *arg1 = (CdIo_t *) 0 ;
void *arg2 = (void *) 0 ;
lsn_t arg3 ;
cdio_read_mode_t arg4 ;
unsigned int arg5 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
int val3 ;
int ecode3 = 0 ;
int val4 ;
int ecode4 = 0 ;
unsigned int val5 ;
int ecode5 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 5) || (argc > 5)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
}
@@ -2482,14 +2533,14 @@
SWIGINTERN VALUE
_wrap_cdio_eject_media_drive(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
- driver_return_code_t result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -2520,13 +2571,13 @@
Pause playing CD through analog output..
*/
SWIGINTERN VALUE
_wrap_audio_pause(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -2557,17 +2608,17 @@
SWIGINTERN VALUE
_wrap_audio_play_lsn(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
lsn_t arg2 ;
lsn_t arg3 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 3) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
}
@@ -2605,13 +2656,13 @@
Resume playing an audio CD..
*/
SWIGINTERN VALUE
_wrap_audio_resume(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -2639,13 +2690,13 @@
Stop playing an audio CD..
*/
SWIGINTERN VALUE
_wrap_audio_stop(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -2733,13 +2784,13 @@
SWIGINTERN VALUE
_wrap_Buf_triple_t_data_get(int argc, VALUE *argv, VALUE self) {
Buf_triple_t *arg1 = (Buf_triple_t *) 0 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -2795,23 +2846,22 @@
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","size", 2, argv[0] ));
}
arg2 = (size_t)(val2);
if (arg1) (arg1)->size = arg2;
-
return Qnil;
fail:
return Qnil;
}
SWIGINTERN VALUE
_wrap_Buf_triple_t_size_get(int argc, VALUE *argv, VALUE self) {
Buf_triple_t *arg1 = (Buf_triple_t *) 0 ;
- size_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ size_t result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -2869,23 +2919,22 @@
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "driver_return_code_t","drc", 2, argv[0] ));
}
arg2 = (driver_return_code_t)(val2);
if (arg1) (arg1)->drc = arg2;
-
return Qnil;
fail:
return Qnil;
}
SWIGINTERN VALUE
_wrap_Buf_triple_t_drc_get(int argc, VALUE *argv, VALUE self) {
Buf_triple_t *arg1 = (Buf_triple_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -2936,12 +2985,12 @@
Buf_triple_t *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
- result = (Buf_triple_t *)(Buf_triple_t *) calloc(1, sizeof(Buf_triple_t));DATA_PTR(self) = result;
-
+ result = (Buf_triple_t *)calloc(1, sizeof(Buf_triple_t));
+ DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
@@ -2964,17 +3013,17 @@
SWIGINTERN VALUE
_wrap_lseek(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
off_t arg2 ;
int arg3 = (int) SEEK_SET ;
- off_t result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
int val3 ;
int ecode3 = 0 ;
+ off_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3021,15 +3070,15 @@
*/
SWIGINTERN VALUE
_wrap_read_cd(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
size_t arg2 ;
- Buf_triple_t result;
void *argp1 = 0 ;
int res1 = 0 ;
size_t val2 ;
int ecode2 = 0 ;
+ Buf_triple_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3077,19 +3126,19 @@
_wrap_read_sectors(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
lsn_t arg2 ;
cdio_read_mode_t arg3 ;
size_t arg4 ;
- Buf_triple_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
size_t val4 ;
int ecode4 = 0 ;
+ Buf_triple_t result;
VALUE vresult = Qnil;
if ((argc < 4) || (argc > 4)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
}
@@ -3147,19 +3196,19 @@
_wrap_read_data_bytes(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
lsn_t arg2 ;
int16_t arg3 ;
size_t arg4 ;
- Buf_triple_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
int val3 ;
int ecode3 = 0 ;
size_t val4 ;
int ecode4 = 0 ;
+ Buf_triple_t result;
VALUE vresult = Qnil;
if ((argc < 4) || (argc > 4)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
}
@@ -3203,10 +3252,53 @@
}
/*
+ Document-method: Rubycdio.get_cdtext
+
+ call-seq:
+ get_cdtext(p_cdio, i_track) -> cdtext_t
+
+cdio_get_cdtext(track)->cdtext
+ Get the CDText object for the given track number.
+ Use track 0 for the disc's CDText object..
+*/
+SWIGINTERN VALUE
+_wrap_get_cdtext(int argc, VALUE *argv, VALUE self) {
+ CdIo_t *arg1 = (CdIo_t *) 0 ;
+ track_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ unsigned int val2 ;
+ int ecode2 = 0 ;
+ cdtext_t *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_CdIo_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdIo_t *","cdio_get_cdtext", 1, argv[0] ));
+ }
+ arg1 = (CdIo_t *)(argp1);
+ ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "track_t","cdio_get_cdtext", 2, argv[1] ));
+ }
+ arg2 = (track_t)(val2);
+ result = (cdtext_t *)cdio_get_cdtext(arg1,arg2);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cdtext_t, 0 | 0 );
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+
+/*
Document-method: Rubycdio.get_first_track_num
call-seq:
get_first_track_num(p_cdio) -> track_t
@@ -3217,13 +3309,13 @@
a problem..
*/
SWIGINTERN VALUE
_wrap_get_first_track_num(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- track_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ track_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -3252,13 +3344,13 @@
pycdio.INVALID_TRACK is if there was a problem..
*/
SWIGINTERN VALUE
_wrap_get_last_track_num(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- track_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ track_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -3293,15 +3385,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
lsn_t arg2 ;
- track_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ track_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3337,15 +3429,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_channels(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- int result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3382,15 +3474,15 @@
*/
SWIGINTERN VALUE
_wrap_track_copy_permitq___(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3425,15 +3517,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_format(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3473,15 +3565,15 @@
*/
SWIGINTERN VALUE
_wrap_track_greenq___(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- bool result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3517,15 +3609,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_last_lsn(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- lsn_t result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ lsn_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3568,15 +3660,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_lba(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- lba_t result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ lba_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3617,15 +3709,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_lsn(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- lsn_t result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ lsn_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3667,15 +3759,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_msf(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3711,15 +3803,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_preemphasis(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- track_flag_t result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ track_flag_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3759,15 +3851,15 @@
*/
SWIGINTERN VALUE
_wrap_get_track_sec_count(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
track_t arg2 ;
- unsigned int result;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ unsigned int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -3789,37 +3881,195 @@
}
/*
- Document-method: Rubycdio.close_tray
+ Document-method: Rubycdio.cdtext_field2str
call-seq:
- close_tray(psz_drive, p_driver_id=DRIVER_UNKNOWN) -> driver_return_code_t
+ cdtext_field2str(key) -> char
-get_track_sec_count(cdio, track)->int
+cdtext_field2str(key)->string
+Get the name of the key..
+*/
+SWIGINTERN VALUE
+_wrap_cdtext_field2str(int argc, VALUE *argv, VALUE self) {
+ cdtext_field_t arg1 ;
+ unsigned long val1 ;
+ int ecode1 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "cdtext_field_t","cdtext_field2str", 1, argv[0] ));
+ }
+ arg1 = (cdtext_field_t)(val1);
+ result = (char *)cdtext_field2str(arg1);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
-Get the number of sectors between this track an the next. This
-includes any pregap sectors before the start of the next track.
-Track numbers usually start at something
-greater than 0, usually 1.
-0 is returned if there is an error..
+
+/*
+ Document-method: Rubycdio.cdtext_get
+
+ call-seq:
+ cdtext_get(key, cdtext) -> char
+
+cdtext_get(key, p_cdtext)->string
+Get the value associated with key..
*/
SWIGINTERN VALUE
+_wrap_cdtext_get(int argc, VALUE *argv, VALUE self) {
+ cdtext_field_t arg1 ;
+ cdtext_t *arg2 = (cdtext_t *) 0 ;
+ unsigned long val1 ;
+ int ecode1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "cdtext_field_t","cdtext_get", 1, argv[0] ));
+ }
+ arg1 = (cdtext_field_t)(val1);
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_cdtext_t, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "cdtext_t const *","cdtext_get", 2, argv[1] ));
+ }
+ arg2 = (cdtext_t *)(argp2);
+ result = (char *)cdtext_get(arg1,(cdtext_t const *)arg2);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+
+/*
+ Document-method: Rubycdio.cdtext_is_keyword
+
+ call-seq:
+ cdtext_is_keyword(key) -> cdtext_field_t
+
+cdtext_is_keyword(string)->int
+Returns enum value of keyword if the key is a CD-Text keyword,
+returns MAX_CDTEXT_FIELDS otherwise..
+*/
+SWIGINTERN VALUE
+_wrap_cdtext_is_keyword(int argc, VALUE *argv, VALUE self) {
+ char *arg1 = (char *) 0 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ cdtext_field_t result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","cdtext_is_keyword", 1, argv[0] ));
+ }
+ arg1 = (char *)(buf1);
+ result = (cdtext_field_t)cdtext_is_keyword((char const *)arg1);
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ return vresult;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ return Qnil;
+}
+
+
+
+/*
+ Document-method: Rubycdio.cdtext_set
+
+ call-seq:
+ cdtext_set(key, value, cdtext)
+
+cdtext_set(key, string, p_cdtext)
+Set the value associated with key..
+*/
+SWIGINTERN VALUE
+_wrap_cdtext_set(int argc, VALUE *argv, VALUE self) {
+ cdtext_field_t arg1 ;
+ char *arg2 = (char *) 0 ;
+ cdtext_t *arg3 = (cdtext_t *) 0 ;
+ unsigned long val1 ;
+ int ecode1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ void *argp3 = 0 ;
+ int res3 = 0 ;
+
+ if ((argc < 3) || (argc > 3)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+ }
+ ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "cdtext_field_t","cdtext_set", 1, argv[0] ));
+ }
+ arg1 = (cdtext_field_t)(val1);
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","cdtext_set", 2, argv[1] ));
+ }
+ arg2 = (char *)(buf2);
+ res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_cdtext_t, 0 | 0 );
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "cdtext_t *","cdtext_set", 3, argv[2] ));
+ }
+ arg3 = (cdtext_t *)(argp3);
+ cdtext_set(arg1,(char const *)arg2,arg3);
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ return Qnil;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ return Qnil;
+}
+
+
+
+/*
+ Document-method: Rubycdio.close_tray
+
+ call-seq:
+ close_tray(psz_drive, p_driver_id=DRIVER_UNKNOWN) -> driver_return_code_t
+
+cdtext_set(key, string, p_cdtext)
+Set the value associated with key..
+*/
+SWIGINTERN VALUE
_wrap_close_tray(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
driver_id_t arg2 = (driver_id_t) DRIVER_UNKNOWN ;
driver_id_t *arg3 = (driver_id_t *) 0 ;
- driver_return_code_t result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
driver_id_t temp3 ;
int res3 = SWIG_TMPOBJ ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
arg3 = &temp3;
if ((argc < 1) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -3898,13 +4148,13 @@
.
*/
SWIGINTERN VALUE
_wrap_driver_errmsg(int argc, VALUE *argv, VALUE self) {
driver_return_code_t arg1 ;
- char *result = 0 ;
long val1 ;
int ecode1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -3934,13 +4184,13 @@
.
*/
SWIGINTERN VALUE
_wrap_eject_media(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -3971,14 +4221,14 @@
The operation status is returned..
*/
SWIGINTERN VALUE
_wrap_eject_media_drive(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) NULL ;
- driver_return_code_t result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -4012,16 +4262,16 @@
*/
SWIGINTERN VALUE
_wrap_get_arg(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
char *arg2 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -4063,13 +4313,13 @@
nil even though there may be a hardware CD-ROM..
*/
SWIGINTERN VALUE
_wrap_get_device(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) NULL ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -4105,15 +4355,15 @@
*/
SWIGINTERN VALUE
_wrap_get_default_device_driver(int argc, VALUE *argv, VALUE self) {
driver_id_t arg1 ;
driver_id_t *arg2 = (driver_id_t *) 0 ;
- char *result = 0 ;
unsigned int val1 ;
int ecode1 = 0 ;
driver_id_t temp2 ;
int res2 = SWIG_TMPOBJ ;
+ char *result = 0 ;
VALUE vresult = Qnil;
arg2 = &temp2;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -4153,13 +4403,13 @@
nil is returned as the device if we couldn't get a default device..
*/
SWIGINTERN VALUE
_wrap_get_devices(int argc, VALUE *argv, VALUE self) {
driver_id_t arg1 ;
- DeviceList_t result;
unsigned int val1 ;
int ecode1 = 0 ;
+ DeviceList_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4169,13 +4419,13 @@
}
arg1 = (driver_id_t)(val1);
result = (DeviceList_t)cdio_get_devices(arg1);
{
// result is of type DeviceList_t
- char **p = result;
+ char **p = result;
- if (result) {
+ if (result && *result) {
VALUE aDevices = rb_ary_new();
for (p = result; *p; p++) {
rb_ary_push(aDevices, rb_str_new2(*p));
}
cdio_free_device_list(result);
@@ -4206,15 +4456,15 @@
*/
SWIGINTERN VALUE
_wrap_get_devices_ret(int argc, VALUE *argv, VALUE self) {
driver_id_t arg1 ;
driver_id_t *arg2 = (driver_id_t *) 0 ;
- DeviceList_t result;
unsigned int val1 ;
int ecode1 = 0 ;
driver_id_t temp2 ;
int res2 = SWIG_TMPOBJ ;
+ DeviceList_t result;
VALUE vresult = Qnil;
arg2 = &temp2;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -4225,13 +4475,13 @@
}
arg1 = (driver_id_t)(val1);
result = (DeviceList_t)get_devices_ret(arg1,arg2);
{
// result is of type DeviceList_t
- char **p = result;
+ char **p = result;
- if (result) {
+ if (result && *result) {
VALUE aDevices = rb_ary_new();
for (p = result; *p; p++) {
rb_ary_push(aDevices, rb_str_new2(*p));
}
cdio_free_device_list(result);
@@ -4277,15 +4527,15 @@
*/
SWIGINTERN VALUE
_wrap_get_devices_with_cap(int argc, VALUE *argv, VALUE self) {
unsigned int arg1 ;
bool arg2 ;
- DeviceList_t result;
unsigned int val1 ;
int ecode1 = 0 ;
bool val2 ;
int ecode2 = 0 ;
+ DeviceList_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -4300,13 +4550,13 @@
}
arg2 = (bool)(val2);
result = (DeviceList_t)get_devices_with_cap(arg1,arg2);
{
// result is of type DeviceList_t
- char **p = result;
+ char **p = result;
- if (result) {
+ if (result && *result) {
VALUE aDevices = rb_ary_new();
for (p = result; *p; p++) {
rb_ary_push(aDevices, rb_str_new2(*p));
}
cdio_free_device_list(result);
@@ -4336,17 +4586,17 @@
SWIGINTERN VALUE
_wrap_get_devices_with_cap_ret(int argc, VALUE *argv, VALUE self) {
unsigned int arg1 ;
bool arg2 ;
driver_id_t *arg3 = (driver_id_t *) 0 ;
- DeviceList_t result;
unsigned int val1 ;
int ecode1 = 0 ;
bool val2 ;
int ecode2 = 0 ;
driver_id_t temp3 ;
int res3 = SWIG_TMPOBJ ;
+ DeviceList_t result;
VALUE vresult = Qnil;
arg3 = &temp3;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -4362,13 +4612,13 @@
}
arg2 = (bool)(val2);
result = (DeviceList_t)get_devices_with_cap_ret(arg1,arg2,arg3);
{
// result is of type DeviceList_t
- char **p = result;
+ char **p = result;
- if (result) {
+ if (result && *result) {
VALUE aDevices = rb_ary_new();
for (p = result; *p; p++) {
rb_ary_push(aDevices, rb_str_new2(*p));
}
cdio_free_device_list(result);
@@ -4569,13 +4819,13 @@
.
*/
SWIGINTERN VALUE
_wrap_get_driver_name(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4606,13 +4856,13 @@
return pycdio.DRIVER_UNKNOWN..
*/
SWIGINTERN VALUE
_wrap_get_driver_id(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- driver_id_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ driver_id_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4644,15 +4894,15 @@
*/
SWIGINTERN VALUE
_wrap_get_last_session(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
lsn_t *arg2 = (lsn_t *) 0 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
lsn_t temp2 ;
int res2 = SWIG_TMPOBJ ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
arg2 = &temp2;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -4689,13 +4939,13 @@
if driver id is out of range..
*/
SWIGINTERN VALUE
_wrap_have_driver(int argc, VALUE *argv, VALUE self) {
unsigned int arg1 ;
- int result;
unsigned int val1 ;
int ecode1 = 0 ;
+ int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4723,13 +4973,13 @@
return True if CD-ROM understand ATAPI commands..
*/
SWIGINTERN VALUE
_wrap_ATAPIq___(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- bool result;
void *argp1 = 0 ;
int res1 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4762,14 +5012,14 @@
nil if not a BIN file..
*/
SWIGINTERN VALUE
_wrap_is_binfile(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
- buf_t result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ buf_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4804,14 +5054,14 @@
nil if not a CUE file..
*/
SWIGINTERN VALUE
_wrap_is_cuefile(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
- buf_t result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ buf_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4847,16 +5097,16 @@
*/
SWIGINTERN VALUE
_wrap_cdio_is_device(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
driver_id_t arg2 = (driver_id_t) DRIVER_UNKNOWN ;
- bool result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4899,16 +5149,16 @@
*/
SWIGINTERN VALUE
_wrap_deviceq___(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
driver_id_t arg2 ;
- bool result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -4944,14 +5194,14 @@
Determine if nrg_name is a Nero CD disc image.
*/
SWIGINTERN VALUE
_wrap_nrgq___(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
- bool result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -4982,14 +5232,14 @@
Determine if tocfile_name is a cdrdao CD disc image.
*/
SWIGINTERN VALUE
_wrap_tocfileq___(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
- bool result;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5022,13 +5272,13 @@
return codes are the same as driver_return_code_t.
*/
SWIGINTERN VALUE
_wrap_get_media_changed(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- int result;
void *argp1 = 0 ;
int res1 = 0 ;
+ int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5113,23 +5363,22 @@
} else {
arg2 = *((cdio_hwinfo_t *)(argp2));
}
}
if (arg1) (arg1)->hw = arg2;
-
return Qnil;
fail:
return Qnil;
}
SWIGINTERN VALUE
_wrap_HWInfo_t_hw_get(int argc, VALUE *argv, VALUE self) {
HWInfo_t *arg1 = (HWInfo_t *) 0 ;
- cdio_hwinfo_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ cdio_hwinfo_t result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -5193,23 +5442,22 @@
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","result", 2, argv[0] ));
}
arg2 = (bool)(val2);
if (arg1) (arg1)->result = arg2;
-
return Qnil;
fail:
return Qnil;
}
SWIGINTERN VALUE
_wrap_HWInfo_t_result_get(int argc, VALUE *argv, VALUE self) {
HWInfo_t *arg1 = (HWInfo_t *) 0 ;
- bool result;
void *argp1 = 0 ;
int res1 = 0 ;
+ bool result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
@@ -5260,12 +5508,12 @@
HWInfo_t *result = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
- result = (HWInfo_t *)(HWInfo_t *) calloc(1, sizeof(HWInfo_t));DATA_PTR(self) = result;
-
+ result = (HWInfo_t *)calloc(1, sizeof(HWInfo_t));
+ DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
@@ -5289,13 +5537,13 @@
return codes are the same as driver_return_code_t.
*/
SWIGINTERN VALUE
_wrap_get_hwinfo(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- HWInfo_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ HWInfo_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5340,15 +5588,15 @@
*/
SWIGINTERN VALUE
_wrap_set_blocksize(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
int arg2 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -5382,15 +5630,15 @@
*/
SWIGINTERN VALUE
_wrap_set_speed(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
int arg2 ;
- driver_return_code_t result;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
+ driver_return_code_t result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
@@ -5434,19 +5682,19 @@
SWIGINTERN VALUE
_wrap_open_cd(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
driver_id_t arg2 = (driver_id_t) DRIVER_UNKNOWN ;
char *arg3 = (char *) NULL ;
- CdIo_t *result = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
+ CdIo_t *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5489,18 +5737,18 @@
get_disc_last_lsn(p_cdio) -> lsn_t
get_disc_last_lsn(cdio)->lsn
Get the LSN of the end of the CD.
-perlcdio.INVALID_LSN is returned on error..
+rubycdio.INVALID_LSN is returned on error..
*/
SWIGINTERN VALUE
_wrap_get_disc_last_lsn(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- lsn_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ lsn_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5531,13 +5779,13 @@
DVD's..
*/
SWIGINTERN VALUE
_wrap_get_disc_mode(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5568,13 +5816,13 @@
filesystem..
*/
SWIGINTERN VALUE
_wrap_get_joliet_level(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- int result;
void *argp1 = 0 ;
int res1 = 0 ;
+ int result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5605,13 +5853,13 @@
filesystem..
*/
SWIGINTERN VALUE
_wrap_get_mcn(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- char *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
+ char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5642,13 +5890,13 @@
On error rubycdio::INVALID_TRACK is returned..
*/
SWIGINTERN VALUE
_wrap_get_num_tracks(int argc, VALUE *argv, VALUE self) {
CdIo_t *arg1 = (CdIo_t *) 0 ;
- track_t result;
void *argp1 = 0 ;
int res1 = 0 ;
+ track_t result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
@@ -5671,51 +5919,59 @@
static swig_type_info _swigt__p_Buf_triple_t = {"_p_Buf_triple_t", "Buf_triple_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CdIo_t = {"_p_CdIo_t", "CdIo_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_HWInfo_t = {"_p_HWInfo_t", "HWInfo_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_cdio_hwinfo_t = {"_p_cdio_hwinfo_t", "cdio_hwinfo_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_cdio_read_mode_t = {"_p_cdio_read_mode_t", "enum cdio_read_mode_t *|cdio_read_mode_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_cdtext_t = {"_p_cdtext_t", "cdtext_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|lba_t *|track_flag_t *|lsn_t *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "my_ssize_t *|ssize_t *|long *|driver_return_code_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_off_t = {"_p_off_t", "off_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "track_t *|unsigned int *|cdio_drive_write_cap_t *|cdio_drive_misc_cap_t *|cdio_drive_read_cap_t *|driver_id_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|cdtext_field_t *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_Buf_triple_t,
&_swigt__p_CdIo_t,
&_swigt__p_HWInfo_t,
&_swigt__p_cdio_hwinfo_t,
&_swigt__p_cdio_read_mode_t,
+ &_swigt__p_cdtext_t,
&_swigt__p_char,
&_swigt__p_int,
&_swigt__p_long,
&_swigt__p_off_t,
&_swigt__p_unsigned_int,
+ &_swigt__p_unsigned_long,
};
static swig_cast_info _swigc__p_Buf_triple_t[] = { {&_swigt__p_Buf_triple_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CdIo_t[] = { {&_swigt__p_CdIo_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HWInfo_t[] = { {&_swigt__p_HWInfo_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cdio_hwinfo_t[] = { {&_swigt__p_cdio_hwinfo_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_cdio_read_mode_t[] = { {&_swigt__p_cdio_read_mode_t, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_cdtext_t[] = { {&_swigt__p_cdtext_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_off_t[] = { {&_swigt__p_off_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_Buf_triple_t,
_swigc__p_CdIo_t,
_swigc__p_HWInfo_t,
_swigc__p_cdio_hwinfo_t,
_swigc__p_cdio_read_mode_t,
+ _swigc__p_cdtext_t,
_swigc__p_char,
_swigc__p_int,
_swigc__p_long,
_swigc__p_off_t,
_swigc__p_unsigned_int,
+ _swigc__p_unsigned_long,
};
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
@@ -5774,20 +6030,23 @@
SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
/* Initialize the swig_module */
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
module_head = SWIG_GetModule(clientdata);
if (!module_head) {
@@ -5812,10 +6071,16 @@
/* otherwise we must add out module into the list */
swig_module.next = module_head->next;
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
for (i = 0; i < swig_module.size; ++i) {
@@ -6029,10 +6294,11 @@
rb_define_const(mRubycdio, "MODE2_FORM2", SWIG_From_long((long)(MODE2_FORM2)));
rb_define_const(mRubycdio, "MODE2_FORM_MIX", SWIG_From_long((long)(MODE2_FORM_MIX)));
rb_define_const(mRubycdio, "MODE2_RAW", SWIG_From_long((long)(MODE2_RAW)));
rb_define_const(mRubycdio, "INVALID_TRACK", SWIG_From_long((long)(CDIO_INVALID_TRACK)));
rb_define_const(mRubycdio, "CDROM_LEADOUT_TRACK", SWIG_From_long((long)(0xAA)));
+ rb_define_module_function(mRubycdio, "get_cdtext", _wrap_get_cdtext, -1);
rb_define_module_function(mRubycdio, "get_first_track_num", _wrap_get_first_track_num, -1);
rb_define_module_function(mRubycdio, "get_last_track_num", _wrap_get_last_track_num, -1);
rb_define_module_function(mRubycdio, "get_track", _wrap_get_track, -1);
rb_define_module_function(mRubycdio, "get_track_channels", _wrap_get_track_channels, -1);
rb_define_module_function(mRubycdio, "track_copy_permit?", _wrap_track_copy_permitq___, -1);
@@ -6042,9 +6308,29 @@
rb_define_module_function(mRubycdio, "get_track_lba", _wrap_get_track_lba, -1);
rb_define_module_function(mRubycdio, "get_track_lsn", _wrap_get_track_lsn, -1);
rb_define_module_function(mRubycdio, "get_track_msf", _wrap_get_track_msf, -1);
rb_define_module_function(mRubycdio, "get_track_preemphasis", _wrap_get_track_preemphasis, -1);
rb_define_module_function(mRubycdio, "get_track_sec_count", _wrap_get_track_sec_count, -1);
+ rb_define_const(mRubycdio, "CDTEXT_ARRANGER", SWIG_From_long((long)(CDTEXT_ARRANGER)));
+ rb_define_const(mRubycdio, "CDTEXT_COMPOSER", SWIG_From_long((long)(CDTEXT_COMPOSER)));
+ rb_define_const(mRubycdio, "CDTEXT_DISCID", SWIG_From_long((long)(CDTEXT_DISCID)));
+ rb_define_const(mRubycdio, "CDTEXT_GENRE", SWIG_From_long((long)(CDTEXT_GENRE)));
+ rb_define_const(mRubycdio, "CDTEXT_MESSAGE", SWIG_From_long((long)(CDTEXT_MESSAGE)));
+ rb_define_const(mRubycdio, "CDTEXT_ISRC", SWIG_From_long((long)(CDTEXT_ISRC)));
+ rb_define_const(mRubycdio, "CDTEXT_PERFORMER", SWIG_From_long((long)(CDTEXT_PERFORMER)));
+ rb_define_const(mRubycdio, "CDTEXT_SIZE_INFO", SWIG_From_long((long)(CDTEXT_SIZE_INFO)));
+ rb_define_const(mRubycdio, "CDTEXT_SONGWRITER", SWIG_From_long((long)(CDTEXT_SONGWRITER)));
+ rb_define_const(mRubycdio, "CDTEXT_TITLE", SWIG_From_long((long)(CDTEXT_TITLE)));
+ rb_define_const(mRubycdio, "CDTEXT_TOC_INFO", SWIG_From_long((long)(CDTEXT_TOC_INFO)));
+ rb_define_const(mRubycdio, "CDTEXT_TOC_INFO2", SWIG_From_long((long)(CDTEXT_TOC_INFO2)));
+ rb_define_const(mRubycdio, "CDTEXT_UPC_EAN", SWIG_From_long((long)(CDTEXT_UPC_EAN)));
+ rb_define_const(mRubycdio, "CDTEXT_INVALID", SWIG_From_long((long)(CDTEXT_INVALID)));
+ rb_define_const(mRubycdio, "MIN_CDTEXT_FIELD", SWIG_From_long((long)(MIN_CDTEXT_FIELD)));
+ rb_define_const(mRubycdio, "MAX_CDTEXT_FIELDS", SWIG_From_long((long)(MAX_CDTEXT_FIELDS)));
+ rb_define_module_function(mRubycdio, "cdtext_field2str", _wrap_cdtext_field2str, -1);
+ rb_define_module_function(mRubycdio, "cdtext_get", _wrap_cdtext_get, -1);
+ rb_define_module_function(mRubycdio, "cdtext_is_keyword", _wrap_cdtext_is_keyword, -1);
+ rb_define_module_function(mRubycdio, "cdtext_set", _wrap_cdtext_set, -1);
rb_define_const(mRubycdio, "DRIVE_CAP_ERROR", SWIG_From_long((long)(CDIO_DRIVE_CAP_ERROR)));
rb_define_const(mRubycdio, "DRIVE_CAP_UNKNOWN", SWIG_From_long((long)(CDIO_DRIVE_CAP_UNKNOWN)));
rb_define_const(mRubycdio, "DRIVE_CAP_MISC_CLOSE_TRAY", SWIG_From_long((long)(CDIO_DRIVE_CAP_MISC_CLOSE_TRAY)));
rb_define_const(mRubycdio, "DRIVE_CAP_MISC_EJECT", SWIG_From_long((long)(CDIO_DRIVE_CAP_MISC_EJECT)));
rb_define_const(mRubycdio, "DRIVE_CAP_MISC_LOCK", SWIG_From_long((long)(CDIO_DRIVE_CAP_MISC_LOCK)));