/* interfaces.c generated by valac 0.56.19, the Vala compiler
 * generated from interfaces.vala, do not modify */

/*
 * Copyright (c) 2026 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "ft_plugin_xfce.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	XFCE_SCREEN_SAVER_ACTIVE_CHANGED_SIGNAL,
	XFCE_SCREEN_SAVER_NUM_SIGNALS
};
static guint xfce_screen_saver_signals[XFCE_SCREEN_SAVER_NUM_SIGNALS] = {0};
typedef GDBusProxy XfceScreenSaverProxy;
typedef GDBusProxyClass XfceScreenSaverProxyClass;
typedef struct _XfceScreenSaverGetActiveReadyData XfceScreenSaverGetActiveReadyData;
typedef struct _XfceScreenSaverLockReadyData XfceScreenSaverLockReadyData;

struct _XfceScreenSaverGetActiveReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _XfceScreenSaverLockReadyData {
	GDBusMethodInvocation* _invocation_;
};

static GType xfce_screen_saver_type_id = 0;

static void xfce_screen_saver_proxy_g_signal (GDBusProxy* proxy,
                                       const gchar* sender_name,
                                       const gchar* signal_name,
                                       GVariant* parameters);
static void _dbus_handle_xfce_screen_saver_active_changed (XfceScreenSaver* self,
                                                    GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void xfce_screen_saver_proxy_get_active_async (XfceScreenSaver* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static gboolean xfce_screen_saver_proxy_get_active_finish (XfceScreenSaver* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
static void xfce_screen_saver_proxy_lock_async (XfceScreenSaver* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static void xfce_screen_saver_proxy_lock_finish (XfceScreenSaver* self,
                                          GAsyncResult* _res_,
                                          GError** error);
static void xfce_screen_saver_proxy_xfce_screen_saver_interface_init (XfceScreenSaverIface* iface);
static void _dbus_xfce_screen_saver_get_active (XfceScreenSaver* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation);
static void _dbus_xfce_screen_saver_get_active_ready (GObject * source_object,
                                               GAsyncResult * _res_,
                                               gpointer _user_data_);
static void _dbus_xfce_screen_saver_lock (XfceScreenSaver* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation);
static void _dbus_xfce_screen_saver_lock_ready (GObject * source_object,
                                         GAsyncResult * _res_,
                                         gpointer _user_data_);
static void xfce_screen_saver_dbus_interface_method_call (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* method_name,
                                                   GVariant* parameters,
                                                   GDBusMethodInvocation* invocation,
                                                   gpointer user_data);
static GVariant* xfce_screen_saver_dbus_interface_get_property (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* property_name,
                                                         GError** error,
                                                         gpointer user_data);
static gboolean xfce_screen_saver_dbus_interface_set_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GVariant* value,
                                                        GError** error,
                                                        gpointer user_data);
static void _dbus_xfce_screen_saver_active_changed (GObject* _sender,
                                             gboolean new_value,
                                             gpointer* _data);
static void _xfce_screen_saver_unregister_object (gpointer user_data);

static const GDBusArgInfo _xfce_screen_saver_dbus_arg_info_get_active_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _xfce_screen_saver_dbus_arg_info_get_active_in[] = {NULL};
static const GDBusArgInfo * const _xfce_screen_saver_dbus_arg_info_get_active_out[] = {&_xfce_screen_saver_dbus_arg_info_get_active_result, NULL};
static const GDBusMethodInfo _xfce_screen_saver_dbus_method_info_get_active = {-1, "GetActive", (GDBusArgInfo **) (&_xfce_screen_saver_dbus_arg_info_get_active_in), (GDBusArgInfo **) (&_xfce_screen_saver_dbus_arg_info_get_active_out), NULL};
static const GDBusArgInfo * const _xfce_screen_saver_dbus_arg_info_lock_in[] = {NULL};
static const GDBusArgInfo * const _xfce_screen_saver_dbus_arg_info_lock_out[] = {NULL};
static const GDBusMethodInfo _xfce_screen_saver_dbus_method_info_lock = {-1, "Lock", (GDBusArgInfo **) (&_xfce_screen_saver_dbus_arg_info_lock_in), (GDBusArgInfo **) (&_xfce_screen_saver_dbus_arg_info_lock_out), NULL};
static const GDBusMethodInfo * const _xfce_screen_saver_dbus_method_info[] = {&_xfce_screen_saver_dbus_method_info_get_active, &_xfce_screen_saver_dbus_method_info_lock, NULL};
static const GDBusArgInfo _xfce_screen_saver_dbus_arg_info_active_changed_new_value = {-1, "new_value", "b", NULL};
static const GDBusArgInfo * const _xfce_screen_saver_dbus_arg_info_active_changed[] = {&_xfce_screen_saver_dbus_arg_info_active_changed_new_value, NULL};
static const GDBusSignalInfo _xfce_screen_saver_dbus_signal_info_active_changed = {-1, "ActiveChanged", (GDBusArgInfo **) (&_xfce_screen_saver_dbus_arg_info_active_changed), NULL};
static const GDBusSignalInfo * const _xfce_screen_saver_dbus_signal_info[] = {&_xfce_screen_saver_dbus_signal_info_active_changed, NULL};
static const GDBusPropertyInfo * const _xfce_screen_saver_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _xfce_screen_saver_dbus_interface_info = {-1, "org.xfce.ScreenSaver", (GDBusMethodInfo **) (&_xfce_screen_saver_dbus_method_info), (GDBusSignalInfo **) (&_xfce_screen_saver_dbus_signal_info), (GDBusPropertyInfo **) (&_xfce_screen_saver_dbus_property_info), NULL};
static const GDBusInterfaceVTable _xfce_screen_saver_dbus_interface_vtable = {xfce_screen_saver_dbus_interface_method_call, xfce_screen_saver_dbus_interface_get_property, xfce_screen_saver_dbus_interface_set_property};

void
xfce_screen_saver_get_active (XfceScreenSaver* self,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	XfceScreenSaverIface* _iface_;
	_iface_ = XFCE_SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->get_active) {
		_iface_->get_active (self, _callback_, _user_data_);
	}
}

gboolean
xfce_screen_saver_get_active_finish (XfceScreenSaver* self,
                                     GAsyncResult* _res_,
                                     GError** error)
{
	XfceScreenSaverIface* _iface_;
	_iface_ = XFCE_SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->get_active_finish) {
		return _iface_->get_active_finish (self, _res_, error);
	}
	return FALSE;
}

void
xfce_screen_saver_lock (XfceScreenSaver* self,
                        GAsyncReadyCallback _callback_,
                        gpointer _user_data_)
{
	XfceScreenSaverIface* _iface_;
	_iface_ = XFCE_SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->lock) {
		_iface_->lock (self, _callback_, _user_data_);
	}
}

void
xfce_screen_saver_lock_finish (XfceScreenSaver* self,
                               GAsyncResult* _res_,
                               GError** error)
{
	XfceScreenSaverIface* _iface_;
	_iface_ = XFCE_SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->lock_finish) {
		_iface_->lock_finish (self, _res_, error);
	}
}

static void
xfce_screen_saver_default_init (XfceScreenSaverIface * iface,
                                gpointer iface_data)
{
	xfce_screen_saver_signals[XFCE_SCREEN_SAVER_ACTIVE_CHANGED_SIGNAL] = g_signal_new ("active-changed", XFCE_TYPE_SCREEN_SAVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

/**
     * https://docs.xfce.org/apps/xfce4-screensaver/dbus
     */
GType
xfce_screen_saver_get_type (void)
{
	return xfce_screen_saver_type_id;
}

GType
xfce_screen_saver_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (XfceScreenSaverIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xfce_screen_saver_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	xfce_screen_saver_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "XfceScreenSaver", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (xfce_screen_saver_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (xfce_screen_saver_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) xfce_screen_saver_proxy_get_type);
	g_type_set_qdata (xfce_screen_saver_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.xfce.ScreenSaver");
	g_type_set_qdata (xfce_screen_saver_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_xfce_screen_saver_dbus_interface_info));
	g_type_set_qdata (xfce_screen_saver_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) xfce_screen_saver_register_object);
	return xfce_screen_saver_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (XfceScreenSaverProxy, xfce_screen_saver_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (XFCE_TYPE_SCREEN_SAVER, xfce_screen_saver_proxy_xfce_screen_saver_interface_init) )
static void
xfce_screen_saver_proxy_class_init (XfceScreenSaverProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = xfce_screen_saver_proxy_g_signal;
}

static void
_dbus_handle_xfce_screen_saver_active_changed (XfceScreenSaver* self,
                                               GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gboolean new_value = FALSE;
	GVariant* _tmp0_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	new_value = g_variant_get_boolean (_tmp0_);
	g_variant_unref (_tmp0_);
	g_signal_emit_by_name (self, "active-changed", new_value);
}

static void
xfce_screen_saver_proxy_g_signal (GDBusProxy* proxy,
                                  const gchar* sender_name,
                                  const gchar* signal_name,
                                  GVariant* parameters)
{
	if (strcmp (signal_name, "ActiveChanged") == 0) {
		_dbus_handle_xfce_screen_saver_active_changed ((XfceScreenSaver*) proxy, parameters);
	}
}

static void
xfce_screen_saver_proxy_class_finalize (XfceScreenSaverProxyClass* klass)
{
}

void
xfce_screen_saver_proxy_register_dynamic_type (GTypeModule* module)
{
	xfce_screen_saver_proxy_register_type (module);
}

static void
xfce_screen_saver_proxy_init (XfceScreenSaverProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_xfce_screen_saver_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
xfce_screen_saver_proxy_get_active_async (XfceScreenSaver* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.xfce.ScreenSaver", "GetActive");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static gboolean
xfce_screen_saver_proxy_get_active_finish (XfceScreenSaver* self,
                                           GAsyncResult* _res_,
                                           GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp3_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		gboolean _tmp1_ = FALSE;
		return _tmp1_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp2_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp2_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp3_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp3_);
	g_variant_unref (_tmp3_);
	g_object_unref (_reply_message);
	return _result;
}

static void
xfce_screen_saver_proxy_lock_async (XfceScreenSaver* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.xfce.ScreenSaver", "Lock");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
xfce_screen_saver_proxy_lock_finish (XfceScreenSaver* self,
                                     GAsyncResult* _res_,
                                     GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
xfce_screen_saver_proxy_xfce_screen_saver_interface_init (XfceScreenSaverIface* iface)
{
	iface->get_active = xfce_screen_saver_proxy_get_active_async;
	iface->get_active_finish = xfce_screen_saver_proxy_get_active_finish;
	iface->lock = xfce_screen_saver_proxy_lock_async;
	iface->lock_finish = xfce_screen_saver_proxy_lock_finish;
}

static void
_dbus_xfce_screen_saver_get_active (XfceScreenSaver* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	XfceScreenSaverGetActiveReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (XfceScreenSaverGetActiveReadyData);
	_ready_data->_invocation_ = invocation;
	xfce_screen_saver_get_active (self, (GAsyncReadyCallback) _dbus_xfce_screen_saver_get_active_ready, _ready_data);
}

static void
_dbus_xfce_screen_saver_get_active_ready (GObject * source_object,
                                          GAsyncResult * _res_,
                                          gpointer _user_data_)
{
	XfceScreenSaverGetActiveReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = xfce_screen_saver_get_active_finish ((XfceScreenSaver*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	g_slice_free (XfceScreenSaverGetActiveReadyData, _ready_data);
}

static void
_dbus_xfce_screen_saver_lock (XfceScreenSaver* self,
                              GVariant* _parameters_,
                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	XfceScreenSaverLockReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (XfceScreenSaverLockReadyData);
	_ready_data->_invocation_ = invocation;
	xfce_screen_saver_lock (self, (GAsyncReadyCallback) _dbus_xfce_screen_saver_lock_ready, _ready_data);
}

static void
_dbus_xfce_screen_saver_lock_ready (GObject * source_object,
                                    GAsyncResult * _res_,
                                    gpointer _user_data_)
{
	XfceScreenSaverLockReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	xfce_screen_saver_lock_finish ((XfceScreenSaver*) source_object, _res_, &error);
	_error:
	g_slice_free (XfceScreenSaverLockReadyData, _ready_data);
}

static void
xfce_screen_saver_dbus_interface_method_call (GDBusConnection* connection,
                                              const gchar* sender,
                                              const gchar* object_path,
                                              const gchar* interface_name,
                                              const gchar* method_name,
                                              GVariant* parameters,
                                              GDBusMethodInvocation* invocation,
                                              gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "GetActive") == 0) {
		_dbus_xfce_screen_saver_get_active (object, parameters, invocation);
	} else if (strcmp (method_name, "Lock") == 0) {
		_dbus_xfce_screen_saver_lock (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
xfce_screen_saver_dbus_interface_get_property (GDBusConnection* connection,
                                               const gchar* sender,
                                               const gchar* object_path,
                                               const gchar* interface_name,
                                               const gchar* property_name,
                                               GError** error,
                                               gpointer user_data)
{
	return NULL;
}

static gboolean
xfce_screen_saver_dbus_interface_set_property (GDBusConnection* connection,
                                               const gchar* sender,
                                               const gchar* object_path,
                                               const gchar* interface_name,
                                               const gchar* property_name,
                                               GVariant* value,
                                               GError** error,
                                               gpointer user_data)
{
	return FALSE;
}

static void
_dbus_xfce_screen_saver_active_changed (GObject* _sender,
                                        gboolean new_value,
                                        gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (new_value));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.xfce.ScreenSaver", "ActiveChanged", _arguments, NULL);
}

guint
xfce_screen_saver_register_object (gpointer object,
                                   GDBusConnection* connection,
                                   const gchar* path,
                                   GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_xfce_screen_saver_dbus_interface_info), &_xfce_screen_saver_dbus_interface_vtable, data, _xfce_screen_saver_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "active-changed", (GCallback) _dbus_xfce_screen_saver_active_changed, data);
	return result;
}

static void
_xfce_screen_saver_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_xfce_screen_saver_active_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

