+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_read_block" "', argument " "3"" of type '" "int *""'");
+ }
+ arg3 = (int *)(argp3);
+ result = (int)Device_read_block(arg1,arg2,arg3);
+ {
+ ST(argvi) = sv_2mortal(amglue_newSVi64(result));
+ argvi++;
+ }
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Device_read_to_fd) {
+ {
+ Device *arg1 = (Device *) 0 ;
+ queue_fd_t *arg2 = (queue_fd_t *) 0 ;
+ gboolean result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: Device_read_to_fd(self,queue_fd);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_to_fd" "', argument " "1"" of type '" "Device *""'");
+ }
+ arg1 = (Device *)(argp1);
+ res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_queue_fd_t, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Device_read_to_fd" "', argument " "2"" of type '" "queue_fd_t *""'");
+ }
+ arg2 = (queue_fd_t *)(argp2);
+ result = (gboolean)Device_read_to_fd(arg1,arg2);
+ {
+ ST(argvi) = sv_2mortal(amglue_newSVi64(result));
+ argvi++;
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Device_property_list) {
+ {
+ Device *arg1 = (Device *) 0 ;
+ GSList *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 1) || (items > 1)) {
+ SWIG_croak("Usage: Device_property_list(self);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_list" "', argument " "1"" of type '" "Device *""'");
+ }
+ arg1 = (Device *)(argp1);
+ result = (GSList *)Device_property_list(arg1);
+ {
+ GSList *iter;
+
+ /* Count the DeviceProperties */
+ EXTEND(SP, g_slist_length(result)); /* make room for return values */
+
+ /* Note that we set ST(argvi) several times. the nature of
+ * SWIG's wrapping is such that incrementing argvi points
+ * ST(argvi) to the next location in perl's argument stack.
+ */
+
+ for (iter = result; iter; iter = g_slist_next(iter)) {
+ DeviceProperty *prop = iter->data;
+ HV *hash = newHV();
+ SV *rv = newRV_noinc((SV *)hash);
+
+ hv_store(hash, "name", 4,
+ newSVpv(prop->base->name, 0), 0);
+ hv_store(hash, "description", 11,
+ newSVpv(prop->base->description, 0), 0);
+ hv_store(hash, "access", 6,
+ newSViv(prop->access), 0);
+ ST(argvi) = sv_2mortal(rv);
+ argvi++;
+ }
+ }
+
+ XSRETURN(argvi);
+ fail:
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Device_property_get) {
+ {
+ Device *arg1 = (Device *) 0 ;
+ DevicePropertyBase *arg2 = (DevicePropertyBase *) 0 ;
+ GValue *arg3 = (GValue *) 0 ;
+ PropertySurety *arg4 = (PropertySurety *) 0 ;
+ PropertySource *arg5 = (PropertySource *) 0 ;
+ gboolean *arg6 = (gboolean *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ GValue val3 ;
+ PropertySurety surety3 ;
+ PropertySource source3 ;
+ gboolean found3 ;
+ int argvi = 0;
+ dXSARGS;
+
+ {
+ memset(&val3, 0, sizeof(val3));
+ arg3 = &val3;
+ if (GIMME_V == G_ARRAY) {
+ arg4 = &surety3;
+ arg5 = &source3;
+ }
+ arg6 = &found3;
+ }
+ if ((items < 2) || (items > 2)) {
+ SWIG_croak("Usage: Device_property_get(self,pbase,surety,source,val_found);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_get" "', argument " "1"" of type '" "Device *""'");
+ }
+ arg1 = (Device *)(argp1);
+ {
+ char *pname = NULL;
+
+ if (SvPOK(ST(1)))
+ pname = SvPV_nolen(ST(1));
+
+ if (pname) arg2 = (DevicePropertyBase *)device_property_get_by_name(pname);
+ if (!pname || !arg2) {
+ SWIG_exception_fail(SWIG_ValueError, "Invalid property name");
+ }
+ }
+ Device_property_get(arg1,arg2,arg3,arg4,arg5,arg6);
+
+ {
+ /* if the result is valid */
+ if (*arg6) {
+ /* move data from arg3 to ST(argvi), somehow */
+ ST(argvi) = set_sv_from_gvalue(arg3);
+ argvi++;
+
+ /* free any memory for the GValue */
+ g_value_unset(arg3);
+
+ if (GIMME_V == G_ARRAY) {
+ ST(argvi) = newSViv(*arg4);
+ argvi++;
+ ST(argvi) = newSViv(*arg5);
+ argvi++;
+ }
+ }
+ /* otherwise, return nothing */
+ }
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Device_property_set) {
+ {
+ Device *arg1 = (Device *) 0 ;
+ DevicePropertyBase *arg2 = (DevicePropertyBase *) 0 ;
+ SV *arg3 = (SV *) 0 ;
+ gboolean result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: Device_property_set(self,pbase,sv);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_set" "', argument " "1"" of type '" "Device *""'");
+ }
+ arg1 = (Device *)(argp1);
+ {
+ char *pname = NULL;
+
+ if (SvPOK(ST(1)))
+ pname = SvPV_nolen(ST(1));
+
+ if (pname) arg2 = (DevicePropertyBase *)device_property_get_by_name(pname);
+ if (!pname || !arg2) {
+ SWIG_exception_fail(SWIG_ValueError, "Invalid property name");
+ }
+ }
+ arg3 = ST(2);
+ result = (gboolean)Device_property_set(arg1,arg2,arg3);
+ {
+ ST(argvi) = sv_2mortal(amglue_newSVi64(result));
+ argvi++;
+ }
+
+
+
+ XSRETURN(argvi);
+ fail:
+
+
+
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_Device_property_set_ex) {
+ {
+ Device *arg1 = (Device *) 0 ;
+ DevicePropertyBase *arg2 = (DevicePropertyBase *) 0 ;
+ SV *arg3 = (SV *) 0 ;
+ PropertySurety arg4 ;
+ PropertySource arg5 ;
+ gboolean result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 5) || (items > 5)) {
+ SWIG_croak("Usage: Device_property_set_ex(self,pbase,sv,surety,source);");