+XS(_wrap_rait_device_open_from_children) {
+ {
+ GSList *arg1 = (GSList *) 0 ;
+ int argvi = 0;
+ Device *result = 0 ;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: rait_device_open_from_children(child_devices);");
+ }
+ {
+ AV *av;
+ int i, len;
+
+ if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
+ SWIG_exception(SWIG_TypeError, "Expected an arrayref");
+ }
+ av = (AV *)SvRV(ST(0));
+
+ arg1 = NULL;
+ len = av_len(av);
+ for (i = 0; i <= len; i++) {
+ SV **elt = av_fetch(av, i, 0);
+ Device *d;
+
+ if (elt && !SvOK(*elt)) {
+ arg1 = g_slist_append(arg1, NULL); /* 'undef' => NULL */
+ } else if (!elt || SWIG_ConvertPtr(*elt, (void **)&d, SWIGTYPE_p_Device, 0) == -1) {
+ SWIG_exception(SWIG_TypeError, "array member is not a Device");
+ } else {
+ arg1 = g_slist_append(arg1, d);
+ }
+ }
+ }
+ result = (Device *)rait_device_open_from_children(arg1);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Device, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+ {
+ g_slist_free(arg1);
+ }
+ XSRETURN(argvi);
+ fail:
+ {
+ g_slist_free(arg1);
+ }
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_write_random_to_device) {
+ {
+ guint32 arg1 ;
+ size_t arg2 ;
+ Device *arg3 = (Device *) 0 ;
+ void *argp3 = 0 ;
+ int res3 = 0 ;
+ int argvi = 0;
+ gboolean result;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: write_random_to_device(seed,length,device);");
+ }
+ {
+ arg1 = amglue_SvU32(ST(0));
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg2 = amglue_SvU8(ST(1));
+ } else if (sizeof(size_t) == 2) {
+ arg2 = amglue_SvU16(ST(1));
+ } else if (sizeof(size_t) == 4) {
+ arg2 = amglue_SvU32(ST(1));
+ } else if (sizeof(size_t) == 8) {
+ arg2 = amglue_SvU64(ST(1));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "write_random_to_device" "', argument " "3"" of type '" "Device *""'");
+ }
+ arg3 = (Device *)(argp3);
+ result = (gboolean)write_random_to_device(arg1,arg2,arg3);
+ {
+ if (result)
+ ST(argvi) = &PL_sv_yes;
+ else
+ ST(argvi) = &PL_sv_no;
+ argvi++;
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_verify_random_from_device) {
+ {
+ guint32 arg1 ;
+ size_t arg2 ;
+ Device *arg3 = (Device *) 0 ;
+ void *argp3 = 0 ;
+ int res3 = 0 ;
+ int argvi = 0;
+ gboolean result;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: verify_random_from_device(seed,length,device);");
+ }
+ {
+ arg1 = amglue_SvU32(ST(0));
+ }
+ {
+ if (sizeof(size_t) == 1) {
+ arg2 = amglue_SvU8(ST(1));
+ } else if (sizeof(size_t) == 2) {
+ arg2 = amglue_SvU16(ST(1));
+ } else if (sizeof(size_t) == 4) {
+ arg2 = amglue_SvU32(ST(1));
+ } else if (sizeof(size_t) == 8) {
+ arg2 = amglue_SvU64(ST(1));
+ } else {
+ croak("Unexpected size_t >64 bits?"); /* should be optimized out unless sizeof(size_t) > 8 */
+ }
+ }
+ res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "verify_random_from_device" "', argument " "3"" of type '" "Device *""'");
+ }
+ arg3 = (Device *)(argp3);
+ result = (gboolean)verify_random_from_device(arg1,arg2,arg3);
+ {
+ if (result)
+ ST(argvi) = &PL_sv_yes;
+ else
+ ST(argvi) = &PL_sv_no;
+ argvi++;
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+