/* rygel-media-export-recursive-file-monitor.c generated by valac 0.18.1, the Vala compiler
 * generated from rygel-media-export-recursive-file-monitor.vala, do not modify */

/*
 * Copyright (C) 2009 Jens Georg <mail@jensge.org>.
 *
 * This file is part of Rygel.
 *
 * Rygel 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 of the License, or
 * (at your option) any later version.
 *
 * Rygel 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 program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gee.h>
#include <rygel-core.h>
#include <glib/gi18n-lib.h>


#define RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR (rygel_media_export_recursive_file_monitor_get_type ())
#define RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, RygelMediaExportRecursiveFileMonitor))
#define RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, RygelMediaExportRecursiveFileMonitorClass))
#define RYGEL_MEDIA_EXPORT_IS_RECURSIVE_FILE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR))
#define RYGEL_MEDIA_EXPORT_IS_RECURSIVE_FILE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR))
#define RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, RygelMediaExportRecursiveFileMonitorClass))

typedef struct _RygelMediaExportRecursiveFileMonitor RygelMediaExportRecursiveFileMonitor;
typedef struct _RygelMediaExportRecursiveFileMonitorClass RygelMediaExportRecursiveFileMonitorClass;
typedef struct _RygelMediaExportRecursiveFileMonitorPrivate RygelMediaExportRecursiveFileMonitorPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _RygelMediaExportRecursiveFileMonitorAddData RygelMediaExportRecursiveFileMonitorAddData;

struct _RygelMediaExportRecursiveFileMonitor {
	GObject parent_instance;
	RygelMediaExportRecursiveFileMonitorPrivate * priv;
};

struct _RygelMediaExportRecursiveFileMonitorClass {
	GObjectClass parent_class;
};

struct _RygelMediaExportRecursiveFileMonitorPrivate {
	GCancellable* cancellable;
	GeeHashMap* monitors;
	gboolean monitor_changes;
};

struct _RygelMediaExportRecursiveFileMonitorAddData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaExportRecursiveFileMonitor* self;
	GFile* file;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeHashMap* _tmp2_;
	GFile* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GFile* _tmp6_;
	GFileInfo* _tmp7_;
	GFileInfo* info;
	GFileInfo* _tmp8_;
	GFileType _tmp9_;
	GFile* _tmp10_;
	GCancellable* _tmp11_;
	GFileMonitor* _tmp12_;
	GFileMonitor* file_monitor;
	GeeHashMap* _tmp13_;
	GFile* _tmp14_;
	GFileMonitor* _tmp15_;
	GFileMonitor* _tmp16_;
	GError* err;
	const gchar* _tmp17_;
	GFile* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	GError * _inner_error_;
};


static gpointer rygel_media_export_recursive_file_monitor_parent_class = NULL;

GType rygel_media_export_recursive_file_monitor_get_type (void) G_GNUC_CONST;
#define RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, RygelMediaExportRecursiveFileMonitorPrivate))
enum  {
	RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR_DUMMY_PROPERTY
};
RygelMediaExportRecursiveFileMonitor* rygel_media_export_recursive_file_monitor_new (GCancellable* cancellable);
RygelMediaExportRecursiveFileMonitor* rygel_media_export_recursive_file_monitor_construct (GType object_type, GCancellable* cancellable);
void rygel_media_export_recursive_file_monitor_cancel (RygelMediaExportRecursiveFileMonitor* self);
static void _rygel_media_export_recursive_file_monitor_cancel_g_cancellable_cancelled (GCancellable* _sender, gpointer self);
void rygel_media_export_recursive_file_monitor_on_monitor_changed (RygelMediaExportRecursiveFileMonitor* self, GFile* file, GFile* other_file, GFileMonitorEvent event_type);
void rygel_media_export_recursive_file_monitor_add (RygelMediaExportRecursiveFileMonitor* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_media_export_recursive_file_monitor_add_finish (RygelMediaExportRecursiveFileMonitor* self, GAsyncResult* _res_);
static void _rygel_media_export_recursive_file_monitor_on_monitor_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self);
static void rygel_media_export_recursive_file_monitor_add_data_free (gpointer _data);
static gboolean rygel_media_export_recursive_file_monitor_add_co (RygelMediaExportRecursiveFileMonitorAddData* _data_);
static void rygel_media_export_recursive_file_monitor_add_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_ENUM (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void rygel_media_export_recursive_file_monitor_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _rygel_media_export_recursive_file_monitor_cancel_g_cancellable_cancelled (GCancellable* _sender, gpointer self) {
	rygel_media_export_recursive_file_monitor_cancel (self);
}


RygelMediaExportRecursiveFileMonitor* rygel_media_export_recursive_file_monitor_construct (GType object_type, GCancellable* cancellable) {
	RygelMediaExportRecursiveFileMonitor * self = NULL;
	gboolean _tmp3_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
	GeeHashMap* _tmp7_;
	GCancellable* _tmp8_;
	GError * _inner_error_ = NULL;
	self = (RygelMediaExportRecursiveFileMonitor*) g_object_new (object_type, NULL);
	self->priv->monitor_changes = TRUE;
	{
		RygelMetaConfig* _tmp0_ = NULL;
		RygelMetaConfig* config;
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_;
		_tmp0_ = rygel_meta_config_get_default ();
		config = _tmp0_;
		_tmp1_ = rygel_configuration_get_bool ((RygelConfiguration*) config, "MediaExport", "monitor-changes", &_inner_error_);
		_tmp2_ = _tmp1_;
		if (_inner_error_ != NULL) {
			_g_object_unref0 (config);
			goto __catch44_g_error;
		}
		self->priv->monitor_changes = _tmp2_;
		_g_object_unref0 (config);
	}
	goto __finally44;
	__catch44_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		self->priv->monitor_changes = TRUE;
		_g_error_free0 (_error_);
	}
	__finally44:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_tmp3_ = self->priv->monitor_changes;
	if (!_tmp3_) {
		const gchar* _tmp4_ = NULL;
		_tmp4_ = _ ("Will not monitor file changes");
		g_message ("rygel-media-export-recursive-file-monitor.vala:40: %s", _tmp4_);
	}
	_tmp5_ = cancellable;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp6_;
	_tmp7_ = gee_hash_map_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_file_monitor_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeHashDataFunc) g_file_hash, NULL, NULL, (GeeEqualDataFunc) g_file_equal, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->monitors);
	self->priv->monitors = _tmp7_;
	_tmp8_ = cancellable;
	if (_tmp8_ != NULL) {
		GCancellable* _tmp9_;
		_tmp9_ = cancellable;
		g_signal_connect_object (_tmp9_, "cancelled", (GCallback) _rygel_media_export_recursive_file_monitor_cancel_g_cancellable_cancelled, self, 0);
	}
	return self;
}


RygelMediaExportRecursiveFileMonitor* rygel_media_export_recursive_file_monitor_new (GCancellable* cancellable) {
	return rygel_media_export_recursive_file_monitor_construct (RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, cancellable);
}


static void _rygel_media_export_recursive_file_monitor_on_monitor_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) {
	rygel_media_export_recursive_file_monitor_on_monitor_changed (self, file, other_file, event_type);
}


void rygel_media_export_recursive_file_monitor_on_monitor_changed (RygelMediaExportRecursiveFileMonitor* self, GFile* file, GFile* other_file, GFileMonitorEvent event_type) {
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFileMonitorEvent _tmp2_;
	GFileMonitorEvent _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = file;
	_tmp1_ = other_file;
	_tmp2_ = event_type;
	g_signal_emit_by_name (self, "changed", _tmp0_, _tmp1_, _tmp2_);
	_tmp3_ = event_type;
	switch (_tmp3_) {
		case G_FILE_MONITOR_EVENT_CREATED:
		{
			GFile* _tmp4_;
			_tmp4_ = file;
			rygel_media_export_recursive_file_monitor_add (self, _tmp4_, NULL, NULL);
			break;
		}
		case G_FILE_MONITOR_EVENT_DELETED:
		{
			GeeHashMap* _tmp5_;
			GFile* _tmp6_;
			gpointer _tmp7_ = NULL;
			GFileMonitor* file_monitor;
			GFileMonitor* _tmp8_;
			_tmp5_ = self->priv->monitors;
			_tmp6_ = file;
			_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp6_);
			file_monitor = (GFileMonitor*) _tmp7_;
			_tmp8_ = file_monitor;
			if (_tmp8_ != NULL) {
				GFile* _tmp9_;
				gchar* _tmp10_ = NULL;
				gchar* _tmp11_;
				GeeHashMap* _tmp12_;
				GFile* _tmp13_;
				GFileMonitor* _tmp14_;
				GFileMonitor* _tmp15_;
				guint _tmp16_ = 0U;
				_tmp9_ = file;
				_tmp10_ = g_file_get_uri (_tmp9_);
				_tmp11_ = _tmp10_;
				g_debug ("rygel-media-export-recursive-file-monitor.vala:64: Folder %s gone; rem" \
"oving watch", _tmp11_);
				_g_free0 (_tmp11_);
				_tmp12_ = self->priv->monitors;
				_tmp13_ = file;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp12_, _tmp13_, NULL);
				_tmp14_ = file_monitor;
				g_file_monitor_cancel (_tmp14_);
				_tmp15_ = file_monitor;
				g_signal_parse_name ("changed", g_file_monitor_get_type (), &_tmp16_, NULL, FALSE);
				g_signal_handlers_disconnect_matched (_tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _rygel_media_export_recursive_file_monitor_on_monitor_changed_g_file_monitor_changed, self);
			}
			_g_object_unref0 (file_monitor);
			break;
		}
		default:
		{
			break;
		}
	}
}


static void rygel_media_export_recursive_file_monitor_add_data_free (gpointer _data) {
	RygelMediaExportRecursiveFileMonitorAddData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->file);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportRecursiveFileMonitorAddData, _data_);
}


void rygel_media_export_recursive_file_monitor_add (RygelMediaExportRecursiveFileMonitor* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaExportRecursiveFileMonitorAddData* _data_;
	RygelMediaExportRecursiveFileMonitor* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	_data_ = g_slice_new0 (RygelMediaExportRecursiveFileMonitorAddData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_export_recursive_file_monitor_add);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_export_recursive_file_monitor_add_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = file;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->file);
	_data_->file = _tmp2_;
	rygel_media_export_recursive_file_monitor_add_co (_data_);
}


void rygel_media_export_recursive_file_monitor_add_finish (RygelMediaExportRecursiveFileMonitor* self, GAsyncResult* _res_) {
	RygelMediaExportRecursiveFileMonitorAddData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_media_export_recursive_file_monitor_add_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelMediaExportRecursiveFileMonitorAddData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_media_export_recursive_file_monitor_add_co (_data_);
}


static gboolean rygel_media_export_recursive_file_monitor_add_co (RygelMediaExportRecursiveFileMonitorAddData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = _data_->self->priv->monitor_changes;
	if (!_data_->_tmp1_) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp2_ = _data_->self->priv->monitors;
		_data_->_tmp3_ = _data_->file;
		_data_->_tmp4_ = FALSE;
		_data_->_tmp4_ = gee_abstract_map_has_key ((GeeAbstractMap*) _data_->_tmp2_, _data_->_tmp3_);
		_data_->_tmp0_ = _data_->_tmp4_;
	}
	_data_->_tmp5_ = _data_->_tmp0_;
	if (_data_->_tmp5_) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp6_ = _data_->file;
		_data_->_state_ = 1;
		g_file_query_info_async (_data_->_tmp6_, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, NULL, rygel_media_export_recursive_file_monitor_add_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = g_file_query_info_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
		_data_->info = _data_->_tmp7_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch45_g_error;
		}
		_data_->_tmp8_ = _data_->info;
		_data_->_tmp9_ = 0;
		_data_->_tmp9_ = g_file_info_get_file_type (_data_->_tmp8_);
		if (_data_->_tmp9_ == G_FILE_TYPE_DIRECTORY) {
			_data_->_tmp10_ = _data_->file;
			_data_->_tmp11_ = _data_->self->priv->cancellable;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = g_file_monitor_directory (_data_->_tmp10_, G_FILE_MONITOR_NONE, _data_->_tmp11_, &_data_->_inner_error_);
			_data_->file_monitor = _data_->_tmp12_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->info);
				goto __catch45_g_error;
			}
			_data_->_tmp13_ = _data_->self->priv->monitors;
			_data_->_tmp14_ = _data_->file;
			_data_->_tmp15_ = _data_->file_monitor;
			gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp13_, _data_->_tmp14_, _data_->_tmp15_);
			_data_->_tmp16_ = _data_->file_monitor;
			g_signal_connect_object (_data_->_tmp16_, "changed", (GCallback) _rygel_media_export_recursive_file_monitor_on_monitor_changed_g_file_monitor_changed, _data_->self, 0);
			_g_object_unref0 (_data_->file_monitor);
		}
		_g_object_unref0 (_data_->info);
	}
	goto __finally45;
	__catch45_g_error:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = _ ("Failed to get file info for %s");
		_data_->_tmp18_ = _data_->file;
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = g_file_get_uri (_data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		g_warning (_data_->_tmp17_, _data_->_tmp20_);
		_g_free0 (_data_->_tmp20_);
		_g_error_free0 (_data_->err);
	}
	__finally45:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void rygel_media_export_recursive_file_monitor_cancel (RygelMediaExportRecursiveFileMonitor* self) {
	GeeHashMap* _tmp11_;
	g_return_if_fail (self != NULL);
	{
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_;
		GeeIterator* _monitor_it;
		_tmp0_ = self->priv->monitors;
		_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_monitor_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_;
			gpointer _tmp9_ = NULL;
			GFileMonitor* monitor;
			GFileMonitor* _tmp10_;
			_tmp6_ = _monitor_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _monitor_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			monitor = (GFileMonitor*) _tmp9_;
			_tmp10_ = monitor;
			g_file_monitor_cancel (_tmp10_);
			_g_object_unref0 (monitor);
		}
		_g_object_unref0 (_monitor_it);
	}
	_tmp11_ = self->priv->monitors;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp11_);
}


static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_ENUM (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (gpointer data1, gpointer arg_1, gpointer arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT_ENUM callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_enum (param_values + 3), data2);
}


static void rygel_media_export_recursive_file_monitor_class_init (RygelMediaExportRecursiveFileMonitorClass * klass) {
	rygel_media_export_recursive_file_monitor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelMediaExportRecursiveFileMonitorPrivate));
	G_OBJECT_CLASS (klass)->finalize = rygel_media_export_recursive_file_monitor_finalize;
	g_signal_new ("changed", RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_ENUM, G_TYPE_NONE, 3, G_TYPE_FILE, G_TYPE_FILE, g_file_monitor_event_get_type ());
}


static void rygel_media_export_recursive_file_monitor_instance_init (RygelMediaExportRecursiveFileMonitor * self) {
	self->priv = RYGEL_MEDIA_EXPORT_RECURSIVE_FILE_MONITOR_GET_PRIVATE (self);
}


static void rygel_media_export_recursive_file_monitor_finalize (GObject* obj) {
	RygelMediaExportRecursiveFileMonitor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_MEDIA_EXPORT_TYPE_RECURSIVE_FILE_MONITOR, RygelMediaExportRecursiveFileMonitor);
	_g_object_unref0 (self->priv->cancellable);
	_g_object_unref0 (self->priv->monitors);
	G_OBJECT_CLASS (rygel_media_export_recursive_file_monitor_parent_class)->finalize (obj);
}


GType rygel_media_export_recursive_file_monitor_get_type (void) {
	static volatile gsize rygel_media_export_recursive_file_monitor_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_media_export_recursive_file_monitor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMediaExportRecursiveFileMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_export_recursive_file_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaExportRecursiveFileMonitor), 0, (GInstanceInitFunc) rygel_media_export_recursive_file_monitor_instance_init, NULL };
		GType rygel_media_export_recursive_file_monitor_type_id;
		rygel_media_export_recursive_file_monitor_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelMediaExportRecursiveFileMonitor", &g_define_type_info, 0);
		g_once_init_leave (&rygel_media_export_recursive_file_monitor_type_id__volatile, rygel_media_export_recursive_file_monitor_type_id);
	}
	return rygel_media_export_recursive_file_monitor_type_id__volatile;
}



