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

#line 1 "xs/GConfEngine.xs"
/*
 * Copyright (c) 2005 by Emmanuele Bassi (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library 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.
 */

#include "gconfperl.h"

#ifdef GCONFPERL_TYPE_ENGINE
GType
gconfperl_gconf_engine_get_type (void)
{
	static GType t = 0;
	if (! t) {
		t = g_boxed_type_register_static ("GConfEngine",
						  (GBoxedCopyFunc) gconf_engine_ref,
						  (GBoxedFreeFunc) gconf_engine_unref);
	}
	return t;
}
#endif /* GCONFPERL_TYPE_ENGINE */

static GPerlCallback *
gconfperl_engine_notify_func_create (SV * func, SV * data)
{
	GType param_types [] = {
		GCONF_TYPE_ENGINE,
		G_TYPE_INT,
		GPERL_TYPE_SV,
	};
	return gperl_callback_new (func, data,
			           G_N_ELEMENTS (param_types),
				   param_types, 0);
}

static void
gconfperl_engine_notify_func (GConfEngine *engine,
		              guint cnxn_id,
			      GConfEntry *entry,
			      gpointer data)
{
	gperl_callback_invoke ((GPerlCallback*)data, NULL,
			       engine,
			       cnxn_id,
			       newSVGConfEntry (entry));
}


#line 72 "xs/GConfEngine.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 214 "xs/GConfEngine.c"

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

	RETVAL = gconf_engine_get_default(/* void */);
	ST(0) = newSVGConfEngine (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_get_for_address); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_get_for_address)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, address");
    {
	const gchar *	address;
#line 113 "xs/GConfEngine.xs"
        GError *err = NULL;
#line 243 "xs/GConfEngine.c"
	GConfEngine_ornull *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	address = (const gchar *)SvPV_nolen (ST(1))
;
#line 115 "xs/GConfEngine.xs"
        RETVAL = gconf_engine_get_for_address (address, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 254 "xs/GConfEngine.c"
	ST(0) = newSVGConfEngine_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#if GCONF_CHECK_VERSION (2, 7, 1)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gnome2__GConf__Engine_get_for_addresses); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_get_for_addresses)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "class, ...");
    {
#line 129 "xs/GConfEngine.xs"
    	GSList *addresses = NULL;
	int i;
    	GError *err = NULL;
#line 276 "xs/GConfEngine.c"
	GConfEngine_ornull *	RETVAL;
#line 133 "xs/GConfEngine.xs"
    	for (i = 1; i < items; i++)
		addresses = g_slist_append (addresses, SvPV_nolen (ST (i)));
	RETVAL = gconf_engine_get_for_addresses (addresses, &err);
	g_slist_free (addresses); /* the contents are handled by Perl */	
	if (err)
		gperl_croak_gerror (NULL, err);
#line 285 "xs/GConfEngine.c"
	ST(0) = newSVGConfEngine_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#endif /* GCONF_CHECK_VERSION (2, 7, 1) */

XS_EUPXS(XS_Gnome2__GConf__Engine_get); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_get)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, key");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
#line 169 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 306 "xs/GConfEngine.c"
	GConfValue *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	key = (const gchar *)SvPV_nolen (ST(1))
;
#line 171 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_get (engine, key, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 317 "xs/GConfEngine.c"
	ST(0) = newSVGConfValue (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_get_without_default); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_get_without_default)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, key");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
#line 186 "xs/GConfEngine.xs"
        GError *err = NULL;
#line 337 "xs/GConfEngine.c"
	GConfValue *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	key = (const gchar *)SvPV_nolen (ST(1))
;
#line 188 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_get_without_default (engine, key, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 348 "xs/GConfEngine.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_get_with_locale); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_get_with_locale)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "engine, key, locale");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
	const gchar *	locale;
#line 209 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 367 "xs/GConfEngine.c"
	GConfValue *	RETVAL;

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

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	locale = (const gchar *)SvPV_nolen (ST(2))
;
#line 211 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_get_with_locale (engine, key, locale, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 383 "xs/GConfEngine.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_set); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_set)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "engine, key, value");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
	GConfValue *	value = SvGConfValue (ST(2))
;
#line 226 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 403 "xs/GConfEngine.c"
	gboolean	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	key = (const gchar *)SvPV_nolen (ST(1))
;
#line 228 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_set (engine, key, value, &err);
	gconf_value_free (value); /* leaks otherwise */
	if (err)
		gperl_croak_gerror (NULL, err);
#line 415 "xs/GConfEngine.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_unset); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_unset)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, key");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
#line 245 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 434 "xs/GConfEngine.c"
	gboolean	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	key = (const gchar *)SvPV_nolen (ST(1))
;
#line 247 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_unset (engine, key, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 445 "xs/GConfEngine.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_associate_schema); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_associate_schema)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "engine, key, schema_key");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	key;
	const gchar *	schema_key;
#line 265 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 465 "xs/GConfEngine.c"
	gboolean	RETVAL;

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

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	schema_key = (const gchar *)SvPV_nolen (ST(2))
;
#line 267 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_associate_schema (engine, key, schema_key, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 481 "xs/GConfEngine.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_all_entries); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_all_entries)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, dir");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	dir;
#line 281 "xs/GConfEngine.xs"
     	GError * err = NULL;
	GSList * l, * tmp;
#line 503 "xs/GConfEngine.c"

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	dir = (const gchar *)SvPV_nolen (ST(1))
;
#line 284 "xs/GConfEngine.xs"
     	l = gconf_engine_all_entries (engine, dir, &err);

	if (err)
		gperl_croak_gerror (NULL, err);
	for (tmp = l; tmp != NULL; tmp = tmp->next) 
		XPUSHs (sv_2mortal (newSVGChar (gconf_entry_get_key(tmp->data))));
	g_slist_free (l);
#line 517 "xs/GConfEngine.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__GConf__Engine_all_dirs); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_all_dirs)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, dir");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	dir;
#line 300 "xs/GConfEngine.xs"
     	GError * err = NULL;
	GSList * l, * tmp;
#line 539 "xs/GConfEngine.c"

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	dir = (const gchar *)SvPV_nolen (ST(1))
;
#line 303 "xs/GConfEngine.xs"
     	l = gconf_engine_all_dirs (engine, dir, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
	for (tmp = l; tmp != NULL; tmp = tmp->next)
		XPUSHs (sv_2mortal (newSVGChar (tmp->data)));
	g_slist_free (l);
#line 552 "xs/GConfEngine.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__GConf__Engine_suggest_sync); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_suggest_sync)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "engine");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
#line 316 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 570 "xs/GConfEngine.c"
#line 318 "xs/GConfEngine.xs"
    	gconf_engine_suggest_sync (engine, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 575 "xs/GConfEngine.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__GConf__Engine_dir_exists); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_dir_exists)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, dir");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	dir;
#line 330 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 593 "xs/GConfEngine.c"
	gboolean	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	dir = (const gchar *)SvPV_nolen (ST(1))
;
#line 332 "xs/GConfEngine.xs"
    	RETVAL = gconf_engine_dir_exists (engine, dir, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 604 "xs/GConfEngine.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_remove_dir); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_remove_dir)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, dir");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	dir;
#line 347 "xs/GConfEngine.xs"
    	GError *err = NULL;
#line 623 "xs/GConfEngine.c"

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	dir = (const gchar *)SvPV_nolen (ST(1))
;
#line 349 "xs/GConfEngine.xs"
    	gconf_engine_remove_dir (engine, dir, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 633 "xs/GConfEngine.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__GConf__Engine_notify_add); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_notify_add)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "engine, namespace_section, func, data=NULL");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	const gchar *	namespace_section;
	SV *	func = ST(2)
;
	SV *	data;
#line 360 "xs/GConfEngine.xs"
     	GPerlCallback * callback;
	GError * err = NULL;
	guint cnxn_id = 0;
#line 656 "xs/GConfEngine.c"
	guint	RETVAL;
	dXSTARG;

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

	if (items < 4)
	    data = NULL;
	else {
	    data = ST(3)
;
	}
#line 364 "xs/GConfEngine.xs"
     	callback = gconfperl_engine_notify_func_create (func, data);
	cnxn_id = gconf_engine_notify_add (engine, namespace_section,
					   gconfperl_engine_notify_func,
					   callback,
					   &err);
	if (err)
		gperl_croak_gerror (NULL, err);
	RETVAL = cnxn_id;
#line 680 "xs/GConfEngine.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_notify_remove); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_notify_remove)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, cnxn_id");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	guint	cnxn_id = (guint)SvUV(ST(1))
;

	gconf_engine_notify_remove(engine, cnxn_id);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__GConf__Engine_commit_change_set); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_commit_change_set)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "engine, cs, remove_committed");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	GConfChangeSet *	cs = SvGConfChangeSet (ST(1))
;
	gboolean	remove_committed = (bool)SvTRUE(ST(2))
;
#line 401 "xs/GConfEngine.xs"
	GError * err = NULL;
	gboolean res;
#line 723 "xs/GConfEngine.c"
#line 404 "xs/GConfEngine.xs"
	res = gconf_engine_commit_change_set (engine, cs, remove_committed, &err);
	if (err) {
		gperl_croak_gerror (NULL, err);
	}
	if ((GIMME_V != G_ARRAY) || (! remove_committed)) {
		/* push on the stack the returned boolean value if the user
		 * wants only that, or if the user does not want to remove
		 * the successfully committed keys. */
		XPUSHs (sv_2mortal (newSViv (res)));
		gconf_change_set_unref (cs);
	}
	else {
		/* push on the stack the returned value AND the reduced set. */
		XPUSHs (sv_2mortal (newSViv (res)));
		XPUSHs (sv_2mortal (newSVGConfChangeSet (cs)));
	}
#line 741 "xs/GConfEngine.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__GConf__Engine_reverse_change_set); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_reverse_change_set)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "engine, cs");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
	GConfChangeSet *	cs = SvGConfChangeSet (ST(1))
;
#line 429 "xs/GConfEngine.xs"
     	GError * err = NULL;
#line 761 "xs/GConfEngine.c"
	GConfChangeSet *	RETVAL;
#line 431 "xs/GConfEngine.xs"
     	RETVAL = gconf_engine_reverse_change_set (engine, cs, &err);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 767 "xs/GConfEngine.c"
	ST(0) = newSVGConfChangeSet (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__GConf__Engine_change_set_from_current); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__GConf__Engine_change_set_from_current)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "engine, key, ...");
    {
	GConfEngine *	engine = SvGConfEngine (ST(0))
;
#line 450 "xs/GConfEngine.xs"
     	char ** keys;
	int i;
	GError * err = NULL;
#line 788 "xs/GConfEngine.c"
	GConfChangeSet *	RETVAL;
#line 454 "xs/GConfEngine.xs"
    	keys = g_new0 (char *, items - 1);
	for (i = 1; i < items; i++)
		keys[i-1] = SvPV_nolen (ST (i));
	RETVAL = gconf_engine_change_set_from_currentv (engine, (const gchar **) keys, &err);
	g_free(keys);
	if (err)
		gperl_croak_gerror (NULL, err);
#line 798 "xs/GConfEngine.c"
	ST(0) = newSVGConfChangeSet (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gnome2__GConf__Engine); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gnome2__GConf__Engine)
{
    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::GConf::Engine::get_default", XS_Gnome2__GConf__Engine_get_default, file);
        newXS("Gnome2::GConf::Engine::get_for_address", XS_Gnome2__GConf__Engine_get_for_address, file);
#if XSubPPtmpAAAA
        newXS("Gnome2::GConf::Engine::get_for_addresses", XS_Gnome2__GConf__Engine_get_for_addresses, file);
#endif
        newXS("Gnome2::GConf::Engine::get", XS_Gnome2__GConf__Engine_get, file);
        newXS("Gnome2::GConf::Engine::get_without_default", XS_Gnome2__GConf__Engine_get_without_default, file);
        newXS("Gnome2::GConf::Engine::get_with_locale", XS_Gnome2__GConf__Engine_get_with_locale, file);
        newXS("Gnome2::GConf::Engine::set", XS_Gnome2__GConf__Engine_set, file);
        newXS("Gnome2::GConf::Engine::unset", XS_Gnome2__GConf__Engine_unset, file);
        newXS("Gnome2::GConf::Engine::associate_schema", XS_Gnome2__GConf__Engine_associate_schema, file);
        newXS("Gnome2::GConf::Engine::all_entries", XS_Gnome2__GConf__Engine_all_entries, file);
        newXS("Gnome2::GConf::Engine::all_dirs", XS_Gnome2__GConf__Engine_all_dirs, file);
        newXS("Gnome2::GConf::Engine::suggest_sync", XS_Gnome2__GConf__Engine_suggest_sync, file);
        newXS("Gnome2::GConf::Engine::dir_exists", XS_Gnome2__GConf__Engine_dir_exists, file);
        newXS("Gnome2::GConf::Engine::remove_dir", XS_Gnome2__GConf__Engine_remove_dir, file);
        newXS("Gnome2::GConf::Engine::notify_add", XS_Gnome2__GConf__Engine_notify_add, file);
        newXS("Gnome2::GConf::Engine::notify_remove", XS_Gnome2__GConf__Engine_notify_remove, file);
        newXS("Gnome2::GConf::Engine::commit_change_set", XS_Gnome2__GConf__Engine_commit_change_set, file);
        newXS("Gnome2::GConf::Engine::reverse_change_set", XS_Gnome2__GConf__Engine_reverse_change_set, file);
        newXS("Gnome2::GConf::Engine::change_set_from_current", XS_Gnome2__GConf__Engine_change_set_from_current, file);

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#line 851 "xs/GConfEngine.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;
}

