/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.22 from the
 * contents of GnomeVFSAsync.xs. Do not edit this file, edit GnomeVFSAsync.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "xs/GnomeVFSAsync.xs"
/*
 * Copyright (C) 2003 by the gtk2-perl team
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * $Id$
 */

#include "vfs2perl.h"
#include <gperl_marshal.h>
#include <libgnomevfs/gnome-vfs-job-limit.h>

/* ------------------------------------------------------------------------- */

#if 0
GHashTable *vfs2perl_async_callbacks = NULL;
G_LOCK_DEFINE_STATIC (vfs2perl_async_callbacks);

void
vfs2perl_async_callbacks_add (GnomeVFSAsyncHandle *handle, GPerlCallback *callback)
{
	G_LOCK (vfs2perl_async_callbacks);
	{
		GList *list;

		if (vfs2perl_async_callbacks == NULL)
			vfs2perl_async_callbacks =
			  g_hash_table_new_full (NULL,
			                         NULL,
			                         NULL,
			                         (GDestroyNotify)
			                           g_list_free);

		list = g_hash_table_lookup (vfs2perl_async_callbacks, handle);
		list = g_list_append (list, callback);

		g_hash_table_insert (vfs2perl_async_callbacks, handle, list);
	}
	G_UNLOCK (vfs2perl_async_callbacks);
}

void vfs2perl_async_callbacks_destroy (GnomeVFSAsyncHandle *handle)
{
	G_LOCK (vfs2perl_async_callbacks);
	{
		if (vfs2perl_async_callbacks != NULL) {
			GList *list = g_hash_table_lookup (vfs2perl_async_callbacks, handle);

			if (list != NULL) {
				/* GPerlCallback *callback = g_list_last (list)->data;

				if (callback != NULL)
					gperl_callback_destroy (callback); */

				GList *i;

				for (i = list; i != NULL; i = i->next)
					if (i->data != NULL)
						gperl_callback_destroy ((GPerlCallback *) i->data);

				if (g_list_length (list) == 0)
					g_hash_table_remove (vfs2perl_async_callbacks, handle);
			}

			if (g_hash_table_size (vfs2perl_async_callbacks) == 0) {
				g_hash_table_destroy (vfs2perl_async_callbacks);
				vfs2perl_async_callbacks = NULL;
			}
		}
	}
	G_UNLOCK (vfs2perl_async_callbacks);
}
#endif

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_callback (GnomeVFSAsyncHandle *handle,
                         GnomeVFSResult result,
                         GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_read_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_read_callback (GnomeVFSAsyncHandle *handle,
                              GnomeVFSResult result,
                              char* buffer,
                              GnomeVFSFileSize bytes_requested,
                              GnomeVFSFileSize bytes_read,
                              GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 5);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVpv (buffer, bytes_read)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileSize (bytes_requested)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileSize (bytes_read)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_write_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_write_callback (GnomeVFSAsyncHandle *handle,
                               GnomeVFSResult result,
                               char* buffer,
                               GnomeVFSFileSize bytes_requested,
                               GnomeVFSFileSize bytes_written,
                               GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 5);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVpv (buffer, bytes_written)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileSize (bytes_requested)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileSize (bytes_written)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_directory_load_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_directory_load_callback (GnomeVFSAsyncHandle *handle,
                                        GnomeVFSResult result,
                                        GList *list,
                                        guint entries_read,
                                        GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 4);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfoGList (list)));
	PUSHs (sv_2mortal (newSVuv (entries_read)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_get_file_info_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_get_file_info_callback (GnomeVFSAsyncHandle *handle,
                                       GList *results,
                                       GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSGetFileInfoResultGList (results)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_xfer_progress_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

/* G_LOCK_DEFINE_STATIC (vfs2perl_async_xfer_progress_callback); */

static void
vfs2perl_async_xfer_progress_callback (GnomeVFSAsyncHandle *handle,
                                       GnomeVFSXferProgressInfo *info,
                                       GPerlCallback *callback)
{
	/* G_LOCK (vfs2perl_async_xfer_progress_callback);
	{ */
		dGPERL_CALLBACK_MARSHAL_SP;
		GPERL_CALLBACK_MARSHAL_INIT (callback);

		ENTER;
		SAVETMPS;

		PUSHMARK (SP);

		EXTEND (SP, 2);
		PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
		PUSHs (sv_2mortal (newSVGnomeVFSXferProgressInfo (info)));
		if (callback->data)
			XPUSHs (sv_2mortal (newSVsv (callback->data)));

		PUTBACK;

		call_sv (callback->func, G_DISCARD);

		FREETMPS;
		LEAVE;
	/* }
	G_UNLOCK (vfs2perl_async_xfer_progress_callback); */
}

extern GPerlCallback *
vfs2perl_xfer_progress_callback_create (SV *func, SV *data);

extern gint
vfs2perl_xfer_progress_callback (GnomeVFSXferProgressInfo *info,
                                 GPerlCallback *callback);

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_find_directory_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_find_directory_callback (GnomeVFSAsyncHandle *handle,
                                        GList *results,
                                        GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSFindDirectoryResultGList (results)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

static GPerlCallback *
vfs2perl_async_set_file_info_callback_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static void
vfs2perl_async_set_file_info_callback (GnomeVFSAsyncHandle *handle,
                                       GnomeVFSResult result,
                                       GnomeVFSFileInfo *file_info,
                                       GPerlCallback* callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle)));
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfo (file_info)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

#line 410 "xs/GnomeVFSAsync.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage        S_croak_xs_usage
#endif

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#line 552 "xs/GnomeVFSAsync.c"

XS_EUPXS(XS_Gnome2__VFS__Async_set_job_limit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_set_job_limit)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, limit");
    {
	int	limit = (int)SvIV(ST(1))
;

	gnome_vfs_async_set_job_limit(limit);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__VFS__Async_get_job_limit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_get_job_limit)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	int	RETVAL;
	dXSTARG;

	RETVAL = gnome_vfs_async_get_job_limit(/* void */);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_open); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_open)
{
    dVAR; dXSARGS;
    if (items < 5 || items > 6)
       croak_xs_usage(cv,  "class, text_uri, open_mode, priority, func, data=NULL");
    {
	const gchar *	text_uri;
	GnomeVFSOpenMode	open_mode = SvGnomeVFSOpenMode (ST(2))
;
	int	priority = (int)SvIV(ST(3))
;
	SV *	func = ST(4)
;
	SV *	data;
#line 424 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 604 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	text_uri = (const gchar *)SvPV_nolen (ST(1))
;

	if (items < 6)
	    data = NULL;
	else {
	    data = ST(5)
;
	}
#line 426 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_open (&RETVAL,
                              text_uri,
                              open_mode,
                              priority,
                              (GnomeVFSAsyncOpenCallback)
                                vfs2perl_async_callback,
                              callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 632 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_open_uri); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_open_uri)
{
    dVAR; dXSARGS;
    if (items < 5 || items > 6)
       croak_xs_usage(cv,  "class, uri, open_mode, priority, func, data=NULL");
    {
	GnomeVFSURI *	uri = SvGnomeVFSURI (ST(1))
;
	GnomeVFSOpenMode	open_mode = SvGnomeVFSOpenMode (ST(2))
;
	int	priority = (int)SvIV(ST(3))
;
	SV *	func = ST(4)
;
	SV *	data;
#line 451 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 658 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 6)
	    data = NULL;
	else {
	    data = ST(5)
;
	}
#line 453 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_open_uri (&RETVAL,
                                  uri,
                                  open_mode,
                                  priority,
                                  (GnomeVFSAsyncOpenCallback)
                                    vfs2perl_async_callback,
                                  callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 681 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_create); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_create)
{
    dVAR; dXSARGS;
    if (items < 7 || items > 8)
       croak_xs_usage(cv,  "class, text_uri, open_mode, exclusive, perm, priority, func, data=NULL");
    {
	const gchar *	text_uri;
	GnomeVFSOpenMode	open_mode = SvGnomeVFSOpenMode (ST(2))
;
	gboolean	exclusive = (bool)SvTRUE(ST(3))
;
	guint	perm = (guint)SvUV(ST(4))
;
	int	priority = (int)SvIV(ST(5))
;
	SV *	func = ST(6)
;
	SV *	data;
#line 502 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 710 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	text_uri = (const gchar *)SvPV_nolen (ST(1))
;

	if (items < 8)
	    data = NULL;
	else {
	    data = ST(7)
;
	}
#line 504 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_create (&RETVAL,
	                        text_uri,
	                        open_mode,
	                        exclusive,
	                        perm,
	                        priority,
	                        (GnomeVFSAsyncCreateCallback)
	                          vfs2perl_async_callback,
	                        callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 740 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_create_uri); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_create_uri)
{
    dVAR; dXSARGS;
    if (items < 7 || items > 8)
       croak_xs_usage(cv,  "class, uri, open_mode, exclusive, perm, priority, func, data=NULL");
    {
	GnomeVFSURI *	uri = SvGnomeVFSURI (ST(1))
;
	GnomeVFSOpenMode	open_mode = SvGnomeVFSOpenMode (ST(2))
;
	gboolean	exclusive = (bool)SvTRUE(ST(3))
;
	guint	perm = (guint)SvUV(ST(4))
;
	int	priority = (int)SvIV(ST(5))
;
	SV *	func = ST(6)
;
	SV *	data;
#line 533 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 770 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 8)
	    data = NULL;
	else {
	    data = ST(7)
;
	}
#line 535 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_create_uri (&RETVAL,
	                            uri,
	                            open_mode,
	                            exclusive,
	                            perm,
	                            priority,
	                            (GnomeVFSAsyncOpenCallback)
	                              vfs2perl_async_callback,
	                            callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 795 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_create_symbolic_link); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_create_symbolic_link)
{
    dVAR; dXSARGS;
    if (items < 5 || items > 6)
       croak_xs_usage(cv,  "class, uri, uri_reference, priority, func, data=NULL");
    {
	GnomeVFSURI *	uri = SvGnomeVFSURI (ST(1))
;
	const gchar *	uri_reference;
	int	priority = (int)SvIV(ST(3))
;
	SV *	func = ST(4)
;
	SV *	data;
#line 562 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 820 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	uri_reference = (const gchar *)SvPV_nolen (ST(2))
;

	if (items < 6)
	    data = NULL;
	else {
	    data = ST(5)
;
	}
#line 564 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_create_symbolic_link (&RETVAL,
	                                      uri,
	                                      uri_reference,
	                                      priority,
	                                      (GnomeVFSAsyncOpenCallback)
	                                        vfs2perl_async_callback,
	                                      callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 848 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_get_file_info); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_get_file_info)
{
    dVAR; dXSARGS;
    if (items < 5 || items > 6)
       croak_xs_usage(cv,  "class, uri_ref, options, priority, func, data=NULL");
    {
	SV *	uri_ref = ST(1)
;
	GnomeVFSFileInfoOptions	options = SvGnomeVFSFileInfoOptions (ST(2))
;
	int	priority = (int)SvIV(ST(3))
;
	SV *	func = ST(4)
;
	SV *	data;
#line 589 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
	GList *uri_list;
#line 875 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 6)
	    data = NULL;
	else {
	    data = ST(5)
;
	}
#line 592 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_get_file_info_callback_create (func, data);
	uri_list = SvGnomeVFSURIGList (uri_ref);

	gnome_vfs_async_get_file_info (&RETVAL,
	                               uri_list,
	                               options,
	                               priority,
	                               (GnomeVFSAsyncGetFileInfoCallback)
	                                 vfs2perl_async_get_file_info_callback,
	                               callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	g_list_free (uri_list);

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 901 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_set_file_info); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_set_file_info)
{
    dVAR; dXSARGS;
    if (items < 7 || items > 8)
       croak_xs_usage(cv,  "class, uri, info, mask, options, priority, func, data=NULL");
    {
	GnomeVFSURI *	uri = SvGnomeVFSURI (ST(1))
;
	GnomeVFSFileInfo *	info = SvGnomeVFSFileInfo (ST(2))
;
	GnomeVFSSetFileInfoMask	mask = SvGnomeVFSSetFileInfoMask (ST(3))
;
	GnomeVFSFileInfoOptions	options = SvGnomeVFSFileInfoOptions (ST(4))
;
	int	priority = (int)SvIV(ST(5))
;
	SV *	func = ST(6)
;
	SV *	data;
#line 622 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 931 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 8)
	    data = NULL;
	else {
	    data = ST(7)
;
	}
#line 624 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_set_file_info_callback_create (func, data);

	gnome_vfs_async_set_file_info (&RETVAL,
	                               uri,
	                               info,
	                               mask,
	                               options,
	                               priority,
	                               (GnomeVFSAsyncSetFileInfoCallback)
	                                 vfs2perl_async_set_file_info_callback,
	                               callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 956 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_load_directory); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_load_directory)
{
    dVAR; dXSARGS;
    if (items < 6 || items > 7)
       croak_xs_usage(cv,  "class, text_uri, options, items_per_notification, priority, func, data=NULL");
    {
	const gchar *	text_uri;
	GnomeVFSFileInfoOptions	options = SvGnomeVFSFileInfoOptions (ST(2))
;
	guint	items_per_notification = (guint)SvUV(ST(3))
;
	int	priority = (int)SvIV(ST(4))
;
	SV *	func = ST(5)
;
	SV *	data;
#line 652 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 983 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	text_uri = (const gchar *)SvPV_nolen (ST(1))
;

	if (items < 7)
	    data = NULL;
	else {
	    data = ST(6)
;
	}
#line 654 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_directory_load_callback_create (func, data);

	gnome_vfs_async_load_directory (&RETVAL,
	                                text_uri,
	                                options,
                                        items_per_notification,
	                                priority,
	                                (GnomeVFSAsyncDirectoryLoadCallback)
	                                  vfs2perl_async_directory_load_callback,
	                                callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1012 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_load_directory_uri); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_load_directory_uri)
{
    dVAR; dXSARGS;
    if (items < 6 || items > 7)
       croak_xs_usage(cv,  "class, uri, options, items_per_notification, priority, func, data=NULL");
    {
	GnomeVFSURI *	uri = SvGnomeVFSURI (ST(1))
;
	GnomeVFSFileInfoOptions	options = SvGnomeVFSFileInfoOptions (ST(2))
;
	guint	items_per_notification = (guint)SvUV(ST(3))
;
	int	priority = (int)SvIV(ST(4))
;
	SV *	func = ST(5)
;
	SV *	data;
#line 681 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 1040 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 7)
	    data = NULL;
	else {
	    data = ST(6)
;
	}
#line 683 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_directory_load_callback_create (func, data);

	gnome_vfs_async_load_directory_uri (&RETVAL,
	                                    uri,
	                                    options,
                                            items_per_notification,
	                                    priority,
	                                    (GnomeVFSAsyncDirectoryLoadCallback)
	                                      vfs2perl_async_directory_load_callback,
	                                    callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1064 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async_xfer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_xfer)
{
    dVAR; dXSARGS;
    if (items < 10 || items > 11)
       croak_xs_usage(cv,  "class, source_ref, target_ref, xfer_options, error_mode, overwrite_mode, priority, func_update, data_update, func_sync, data_sync=NULL");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	SV *	source_ref = ST(1)
;
	SV *	target_ref = ST(2)
;
	GnomeVFSXferOptions	xfer_options = SvGnomeVFSXferOptions (ST(3))
;
	GnomeVFSXferErrorMode	error_mode = SvGnomeVFSXferErrorMode (ST(4))
;
	GnomeVFSXferOverwriteMode	overwrite_mode = SvGnomeVFSXferOverwriteMode (ST(5))
;
	int	priority = (int)SvIV(ST(6))
;
	SV *	func_update = ST(7)
;
	SV *	data_update = ST(8)
;
	SV *	func_sync = ST(9)
;
	SV *	data_sync;
#line 719 "xs/GnomeVFSAsync.xs"
	GnomeVFSResult result;
	GnomeVFSAsyncHandle *handle_return;
	GList *source_uri_list;
	GList *target_uri_list;
	GPerlCallback *callback_update;
	GPerlCallback *callback_sync;
#line 1107 "xs/GnomeVFSAsync.c"

	if (items < 11)
	    data_sync = NULL;
	else {
	    data_sync = ST(10)
;
	}
#line 726 "xs/GnomeVFSAsync.xs"
	source_uri_list = SvGnomeVFSURIGList (source_ref);
	target_uri_list = SvGnomeVFSURIGList (target_ref);

	callback_update = vfs2perl_async_xfer_progress_callback_create (func_update, data_update);
	callback_sync = vfs2perl_xfer_progress_callback_create (func_sync, data_sync);

	result = gnome_vfs_async_xfer (&handle_return,
	                               source_uri_list,
	                               target_uri_list,
	                               xfer_options,
	                               error_mode,
	                               overwrite_mode,
	                               priority,
	                               (GnomeVFSAsyncXferProgressCallback)
	                                 vfs2perl_async_xfer_progress_callback,
	                               callback_update,
	                               (GnomeVFSXferProgressCallback)
	                                 vfs2perl_xfer_progress_callback,
	                               callback_sync);

	/* vfs2perl_async_callbacks_add (handle_return, callback_update);
	vfs2perl_async_callbacks_add (handle_return, callback_sync); */

	g_list_free (source_uri_list);
	g_list_free (target_uri_list);

	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSAsyncHandle (handle_return)));

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1147 "xs/GnomeVFSAsync.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__VFS__Async_find_directory); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async_find_directory)
{
    dVAR; dXSARGS;
    if (items < 8 || items > 9)
       croak_xs_usage(cv,  "class, near_ref, kind, create_if_needed, find_if_needed, permissions, priority, func, data=NULL");
    {
	SV *	near_ref = ST(1)
;
	GnomeVFSFindDirectoryKind	kind = SvGnomeVFSFindDirectoryKind (ST(2))
;
	gboolean	create_if_needed = (bool)SvTRUE(ST(3))
;
	gboolean	find_if_needed = (bool)SvTRUE(ST(4))
;
	guint	permissions = (guint)SvUV(ST(5))
;
	int	priority = (int)SvIV(ST(6))
;
	SV *	func = ST(7)
;
	SV *	data;
#line 770 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
	GList *near_uri_list;
#line 1179 "xs/GnomeVFSAsync.c"
	GnomeVFSAsyncHandle *	RETVAL;

	if (items < 9)
	    data = NULL;
	else {
	    data = ST(8)
;
	}
#line 773 "xs/GnomeVFSAsync.xs"
	near_uri_list = SvGnomeVFSURIGList (near_ref);
	callback = vfs2perl_async_find_directory_callback_create (func, data);

	gnome_vfs_async_find_directory (&RETVAL,
	                                near_uri_list,
	                                kind,
	                                create_if_needed,
	                                find_if_needed,
	                                permissions,
	                                priority,
	                                (GnomeVFSAsyncFindDirectoryCallback)
	                                  vfs2perl_async_find_directory_callback,
	                                callback);

	/* vfs2perl_async_callbacks_add (RETVAL, callback); */

	g_list_free (near_uri_list);

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1208 "xs/GnomeVFSAsync.c"
	ST(0) = newSVGnomeVFSAsyncHandle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__VFS__Async__Handle_close); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async__Handle_close)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, func, data=NULL");
    {
	GnomeVFSAsyncHandle *	handle = SvGnomeVFSAsyncHandle (ST(0))
;
	SV *	func = ST(1)
;
	SV *	data;
#line 846 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 1230 "xs/GnomeVFSAsync.c"

	if (items < 3)
	    data = NULL;
	else {
	    data = ST(2)
;
	}
#line 848 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_close (handle,
                               (GnomeVFSAsyncCloseCallback)
                                 vfs2perl_async_callback,
                               callback);

	/* vfs2perl_async_callbacks_add (handle, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1249 "xs/GnomeVFSAsync.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__VFS__Async__Handle_cancel); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async__Handle_cancel)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	GnomeVFSAsyncHandle *	handle = SvGnomeVFSAsyncHandle (ST(0))
;

	gnome_vfs_async_cancel(handle);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__VFS__Async__Handle_read); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async__Handle_read)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "handle, bytes, func, data=NULL");
    {
	GnomeVFSAsyncHandle *	handle = SvGnomeVFSAsyncHandle (ST(0))
;
	guint	bytes = (guint)SvUV(ST(1))
;
	SV *	func = ST(2)
;
	SV *	data;
#line 874 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
	char *buffer;
#line 1288 "xs/GnomeVFSAsync.c"

	if (items < 4)
	    data = NULL;
	else {
	    data = ST(3)
;
	}
#line 877 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_read_callback_create (func, data);
	buffer = g_new0 (char, bytes);

	gnome_vfs_async_read (handle,
	                      buffer,
	                      bytes,
	                      (GnomeVFSAsyncReadCallback)
	                        vfs2perl_async_read_callback,
	                      callback);

	/* vfs2perl_async_callbacks_add (handle, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction?
	                        and the buffer? */
#line 1311 "xs/GnomeVFSAsync.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__VFS__Async__Handle_write); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async__Handle_write)
{
    dVAR; dXSARGS;
    if (items < 4 || items > 5)
       croak_xs_usage(cv,  "handle, buffer, bytes, func, data=NULL");
    {
	GnomeVFSAsyncHandle *	handle = SvGnomeVFSAsyncHandle (ST(0))
;
	char*	buffer = (char *)SvPV_nolen(ST(1))
;
	guint	bytes = (guint)SvUV(ST(2))
;
	SV *	func = ST(3)
;
	SV *	data;
#line 901 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 1335 "xs/GnomeVFSAsync.c"

	if (items < 5)
	    data = NULL;
	else {
	    data = ST(4)
;
	}
#line 903 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_write_callback_create (func, data);

	gnome_vfs_async_write (handle,
	                       buffer,
	                       bytes,
	                       (GnomeVFSAsyncWriteCallback)
	                         vfs2perl_async_write_callback,
	                       callback);

	/* vfs2perl_async_callbacks_add (handle, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1356 "xs/GnomeVFSAsync.c"
    }
    XSRETURN_EMPTY;
}

#if VFS_CHECK_VERSION (2, 6, 0)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gnome2__VFS__Async__Handle_seek); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__VFS__Async__Handle_seek)
{
    dVAR; dXSARGS;
    if (items < 4 || items > 5)
       croak_xs_usage(cv,  "handle, whence, offset, func, data=NULL");
    {
	GnomeVFSAsyncHandle *	handle = SvGnomeVFSAsyncHandle (ST(0))
;
	GnomeVFSSeekPosition	whence = SvGnomeVFSSeekPosition (ST(1))
;
	GnomeVFSFileOffset	offset = SvGnomeVFSFileOffset (ST(2))
;
	SV *	func = ST(3)
;
	SV *	data;
#line 927 "xs/GnomeVFSAsync.xs"
	GPerlCallback *callback;
#line 1383 "xs/GnomeVFSAsync.c"

	if (items < 5)
	    data = NULL;
	else {
	    data = ST(4)
;
	}
#line 929 "xs/GnomeVFSAsync.xs"
	callback = vfs2perl_async_callback_create (func, data);

	gnome_vfs_async_seek (handle,
	                      whence,
	                      offset,
	                      (GnomeVFSAsyncSeekCallback)
	                        vfs2perl_async_callback,
	                      callback);

	/* vfs2perl_async_callbacks_add (handle, callback); */

	/* FIXME, FIXME, FIXME: what about callback destruction? */
#line 1404 "xs/GnomeVFSAsync.c"
    }
    XSRETURN_EMPTY;
}

#endif /* 2.6 */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gnome2__VFS__Async); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gnome2__VFS__Async)
{
    dVAR; dXSARGS;
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

        newXS("Gnome2::VFS::Async::set_job_limit", XS_Gnome2__VFS__Async_set_job_limit, file);
        newXS("Gnome2::VFS::Async::get_job_limit", XS_Gnome2__VFS__Async_get_job_limit, file);
        newXS("Gnome2::VFS::Async::open", XS_Gnome2__VFS__Async_open, file);
        newXS("Gnome2::VFS::Async::open_uri", XS_Gnome2__VFS__Async_open_uri, file);
        newXS("Gnome2::VFS::Async::create", XS_Gnome2__VFS__Async_create, file);
        newXS("Gnome2::VFS::Async::create_uri", XS_Gnome2__VFS__Async_create_uri, file);
        newXS("Gnome2::VFS::Async::create_symbolic_link", XS_Gnome2__VFS__Async_create_symbolic_link, file);
        newXS("Gnome2::VFS::Async::get_file_info", XS_Gnome2__VFS__Async_get_file_info, file);
        newXS("Gnome2::VFS::Async::set_file_info", XS_Gnome2__VFS__Async_set_file_info, file);
        newXS("Gnome2::VFS::Async::load_directory", XS_Gnome2__VFS__Async_load_directory, file);
        newXS("Gnome2::VFS::Async::load_directory_uri", XS_Gnome2__VFS__Async_load_directory_uri, file);
        newXS("Gnome2::VFS::Async::xfer", XS_Gnome2__VFS__Async_xfer, file);
        newXS("Gnome2::VFS::Async::find_directory", XS_Gnome2__VFS__Async_find_directory, file);
        newXS("Gnome2::VFS::Async::Handle::close", XS_Gnome2__VFS__Async__Handle_close, file);
        newXS("Gnome2::VFS::Async::Handle::cancel", XS_Gnome2__VFS__Async__Handle_cancel, file);
        newXS("Gnome2::VFS::Async::Handle::read", XS_Gnome2__VFS__Async__Handle_read, file);
        newXS("Gnome2::VFS::Async::Handle::write", XS_Gnome2__VFS__Async__Handle_write, file);
#if XSubPPtmpAAAA
        newXS("Gnome2::VFS::Async::Handle::seek", XS_Gnome2__VFS__Async__Handle_seek, file);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#line 1455 "xs/GnomeVFSAsync.c"

    /* End of Initialisation Section */

#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

