/* gitg-recursive-monitor.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-recursive-monitor.vala, do not modify */

/*
 *
 * Copyright (C) 2015 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <gee.h>
#include <glib.h>
#include <stdlib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GITG_TYPE_RECURSIVE_MONITOR (gitg_recursive_monitor_get_type ())
#define GITG_RECURSIVE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_RECURSIVE_MONITOR, GitgRecursiveMonitor))
#define GITG_RECURSIVE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_RECURSIVE_MONITOR, GitgRecursiveMonitorClass))
#define GITG_IS_RECURSIVE_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_RECURSIVE_MONITOR))
#define GITG_IS_RECURSIVE_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_RECURSIVE_MONITOR))
#define GITG_RECURSIVE_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_RECURSIVE_MONITOR, GitgRecursiveMonitorClass))

typedef struct _GitgRecursiveMonitor GitgRecursiveMonitor;
typedef struct _GitgRecursiveMonitorClass GitgRecursiveMonitorClass;
typedef struct _GitgRecursiveMonitorPrivate GitgRecursiveMonitorPrivate;

#define GITG_RECURSIVE_MONITOR_TYPE_MONITOR (gitg_recursive_monitor_monitor_get_type ())
#define GITG_RECURSIVE_MONITOR_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_RECURSIVE_MONITOR_TYPE_MONITOR, GitgRecursiveMonitorMonitor))
#define GITG_RECURSIVE_MONITOR_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_RECURSIVE_MONITOR_TYPE_MONITOR, GitgRecursiveMonitorMonitorClass))
#define GITG_RECURSIVE_MONITOR_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_RECURSIVE_MONITOR_TYPE_MONITOR))
#define GITG_RECURSIVE_MONITOR_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_RECURSIVE_MONITOR_TYPE_MONITOR))
#define GITG_RECURSIVE_MONITOR_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_RECURSIVE_MONITOR_TYPE_MONITOR, GitgRecursiveMonitorMonitorClass))

typedef struct _GitgRecursiveMonitorMonitor GitgRecursiveMonitorMonitor;
typedef struct _GitgRecursiveMonitorMonitorClass GitgRecursiveMonitorMonitorClass;
typedef gboolean (*GitgRecursiveMonitorFilterFunc) (GFile* file, gpointer user_data);
enum  {
	GITG_RECURSIVE_MONITOR_0_PROPERTY,
	GITG_RECURSIVE_MONITOR_NUM_PROPERTIES
};
static GParamSpec* gitg_recursive_monitor_properties[GITG_RECURSIVE_MONITOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _GitgRecursiveMonitorEnumerateData GitgRecursiveMonitorEnumerateData;
typedef struct _GitgRecursiveMonitorMonitorPrivate GitgRecursiveMonitorMonitorPrivate;
enum  {
	GITG_RECURSIVE_MONITOR_MONITOR_0_PROPERTY,
	GITG_RECURSIVE_MONITOR_MONITOR_NUM_PROPERTIES
};
static GParamSpec* gitg_recursive_monitor_monitor_properties[GITG_RECURSIVE_MONITOR_MONITOR_NUM_PROPERTIES];
enum  {
	GITG_RECURSIVE_MONITOR_CHANGED_SIGNAL,
	GITG_RECURSIVE_MONITOR_NUM_SIGNALS
};
static guint gitg_recursive_monitor_signals[GITG_RECURSIVE_MONITOR_NUM_SIGNALS] = {0};

struct _GitgRecursiveMonitor {
	GObject parent_instance;
	GitgRecursiveMonitorPrivate * priv;
};

struct _GitgRecursiveMonitorClass {
	GObjectClass parent_class;
};

struct _GitgRecursiveMonitorPrivate {
	GFileMonitor* d_monitor;
	GeeList* d_sub_monitors;
	guint d_monitor_changed_timeout_id;
	GitgRecursiveMonitorFilterFunc d_filter_func;
	gpointer d_filter_func_target;
	GDestroyNotify d_filter_func_target_destroy_notify;
	GCancellable* d_cancellable;
	GFile** d_changed_files;
	gint d_changed_files_length1;
	gint _d_changed_files_size_;
};

struct _GitgRecursiveMonitorEnumerateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgRecursiveMonitor* self;
	GFile* location;
	GFileEnumerator* e;
	GCancellable* _tmp0_;
	GFileEnumerator* _tmp1_;
	GFile** allfiles;
	GFile** _tmp2_;
	gint allfiles_length1;
	gint _allfiles_size_;
	GList* files;
	GFileEnumerator* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	GList* _tmp6_;
	GList* f_collection;
	GList* f_it;
	GFileInfo* _tmp7_;
	GFileInfo* f;
	GFileInfo* _tmp8_;
	GFileInfo* _tmp9_;
	const gchar* _tmp10_;
	GFile* _tmp11_;
	GFileEnumerator* _tmp12_;
	GCancellable* _tmp13_;
	GFile** _tmp14_;
	gint _tmp14__length1;
	GFile** _vala1_f_collection;
	gint _vala1_f_collection_length1;
	gint __vala1_f_collection_size_;
	gint _vala1_f_it;
	GFile* _tmp15_;
	GFile* _vala1_f;
	GFile* _tmp16_;
	GError* _inner_error0_;
};

struct _GitgRecursiveMonitorMonitor {
	GObject parent_instance;
	GitgRecursiveMonitorMonitorPrivate * priv;
	GFile* location;
	GitgRecursiveMonitor* monitor;
};

struct _GitgRecursiveMonitorMonitorClass {
	GObjectClass parent_class;
};

static gint GitgRecursiveMonitor_private_offset;
static gpointer gitg_recursive_monitor_parent_class = NULL;
static gpointer gitg_recursive_monitor_monitor_parent_class = NULL;

VALA_EXTERN GType gitg_recursive_monitor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgRecursiveMonitor, g_object_unref)
static GType gitg_recursive_monitor_monitor_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgRecursiveMonitorMonitor, g_object_unref)
VALA_EXTERN GitgRecursiveMonitor* gitg_recursive_monitor_new (GFile* location,
                                                  GitgRecursiveMonitorFilterFunc filter_func,
                                                  gpointer filter_func_target,
                                                  GDestroyNotify filter_func_target_destroy_notify);
VALA_EXTERN GitgRecursiveMonitor* gitg_recursive_monitor_construct (GType object_type,
                                                        GFile* location,
                                                        GitgRecursiveMonitorFilterFunc filter_func,
                                                        gpointer filter_func_target,
                                                        GDestroyNotify filter_func_target_destroy_notify);
static void gitg_recursive_monitor_monitor_changed_timeout (GitgRecursiveMonitor* self,
                                                     GFile* file,
                                                     GFile* other_file,
                                                     GFileMonitorEvent event);
static void _gitg_recursive_monitor_monitor_changed_timeout_g_file_monitor_changed (GFileMonitor* _sender,
                                                                             GFile* file,
                                                                             GFile* other_file,
                                                                             GFileMonitorEvent event_type,
                                                                             gpointer self);
static void gitg_recursive_monitor_enumerate (GitgRecursiveMonitor* self,
                                       GFile* location,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static void gitg_recursive_monitor_enumerate_finish (GitgRecursiveMonitor* self,
                                              GAsyncResult* _res_,
                                              GError** error);
static void __lambda152_ (GitgRecursiveMonitor* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ___lambda152__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void gitg_recursive_monitor_enumerate_data_free (gpointer _data);
static gboolean gitg_recursive_monitor_enumerate_co (GitgRecursiveMonitorEnumerateData* _data_);
static void gitg_recursive_monitor_enumerate_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void _vala_array_add25 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static void gitg_recursive_monitor_add_submonitor (GitgRecursiveMonitor* self,
                                            GFile* location);
static gboolean __lambda149_ (GitgRecursiveMonitor* self,
                       GFile* l);
static gboolean ___lambda149__gitg_recursive_monitor_filter_func (GFile* file,
                                                           gpointer self);
static GitgRecursiveMonitorMonitor* gitg_recursive_monitor_monitor_new (GFile* location,
                                                                 GitgRecursiveMonitor* monitor);
static GitgRecursiveMonitorMonitor* gitg_recursive_monitor_monitor_construct (GType object_type,
                                                                       GFile* location,
                                                                       GitgRecursiveMonitor* monitor);
static void __lambda150_ (GitgRecursiveMonitor* self,
                   GFile** files,
                   gint files_length1);
static void gitg_recursive_monitor_changed_timeout (GitgRecursiveMonitor* self,
                                             GFile** files,
                                             gint files_length1);
static void ___lambda150__gitg_recursive_monitor_changed (GitgRecursiveMonitor* _sender,
                                                   GFile** files,
                                                   gint files_length1,
                                                   gpointer self);
static void gitg_recursive_monitor_add_submonitor_if_directory (GitgRecursiveMonitor* self,
                                                         GFile* location);
static void gitg_recursive_monitor_real_dispose (GObject* base);
VALA_EXTERN void gitg_recursive_monitor_cancel (GitgRecursiveMonitor* self);
static void gitg_recursive_monitor_remove_submonitor (GitgRecursiveMonitor* self,
                                               GFile* location);
static void _vala_array_add26 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static gboolean ___lambda151_ (GitgRecursiveMonitor* self);
static gboolean ____lambda151__gsource_func (gpointer self);
static void g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure,
                                                GValue * return_value,
                                                guint n_param_values,
                                                const GValue * param_values,
                                                gpointer invocation_hint,
                                                gpointer marshal_data);
static void gitg_recursive_monitor_monitor_finalize (GObject * obj);
static GType gitg_recursive_monitor_monitor_get_type_once (void);
static void gitg_recursive_monitor_finalize (GObject * obj);
static GType gitg_recursive_monitor_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
gitg_recursive_monitor_get_instance_private (GitgRecursiveMonitor* self)
{
	return G_STRUCT_MEMBER_P (self, GitgRecursiveMonitor_private_offset);
}

static void
_gitg_recursive_monitor_monitor_changed_timeout_g_file_monitor_changed (GFileMonitor* _sender,
                                                                        GFile* file,
                                                                        GFile* other_file,
                                                                        GFileMonitorEvent event_type,
                                                                        gpointer self)
{
	gitg_recursive_monitor_monitor_changed_timeout ((GitgRecursiveMonitor*) self, file, other_file, event_type);
}

static void
__lambda152_ (GitgRecursiveMonitor* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		gitg_recursive_monitor_enumerate_finish (self, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda152__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda152_ ((GitgRecursiveMonitor*) self, source_object, res);
	g_object_unref (self);
}

GitgRecursiveMonitor*
gitg_recursive_monitor_construct (GType object_type,
                                  GFile* location,
                                  GitgRecursiveMonitorFilterFunc filter_func,
                                  gpointer filter_func_target,
                                  GDestroyNotify filter_func_target_destroy_notify)
{
	GitgRecursiveMonitor * self = NULL;
	GitgRecursiveMonitorFilterFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	GeeLinkedList* _tmp1_;
	GFileMonitor* _tmp5_;
	GCancellable* _tmp7_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (location != NULL, NULL);
	self = (GitgRecursiveMonitor*) g_object_new (object_type, NULL);
	_tmp0_ = filter_func;
	_tmp0__target = filter_func_target;
	_tmp0__target_destroy_notify = filter_func_target_destroy_notify;
	filter_func = NULL;
	filter_func_target = NULL;
	filter_func_target_destroy_notify = NULL;
	(self->priv->d_filter_func_target_destroy_notify == NULL) ? NULL : (self->priv->d_filter_func_target_destroy_notify (self->priv->d_filter_func_target), NULL);
	self->priv->d_filter_func = NULL;
	self->priv->d_filter_func_target = NULL;
	self->priv->d_filter_func_target_destroy_notify = NULL;
	self->priv->d_filter_func = _tmp0_;
	self->priv->d_filter_func_target = _tmp0__target;
	self->priv->d_filter_func_target_destroy_notify = _tmp0__target_destroy_notify;
	_tmp1_ = gee_linked_list_new (GITG_RECURSIVE_MONITOR_TYPE_MONITOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->d_sub_monitors);
	self->priv->d_sub_monitors = (GeeList*) _tmp1_;
	{
		GFileMonitor* _tmp2_ = NULL;
		GFileMonitor* _tmp3_;
		GFileMonitor* _tmp4_;
		_tmp3_ = g_file_monitor_directory (location, G_FILE_MONITOR_NONE, NULL, &_inner_error0_);
		_tmp2_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp4_ = _tmp2_;
		_tmp2_ = NULL;
		_g_object_unref0 (self->priv->d_monitor);
		self->priv->d_monitor = _tmp4_;
		_g_object_unref0 (_tmp2_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		(filter_func_target_destroy_notify == NULL) ? NULL : (filter_func_target_destroy_notify (filter_func_target), NULL);
		filter_func = NULL;
		filter_func_target = NULL;
		filter_func_target_destroy_notify = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	_tmp5_ = self->priv->d_monitor;
	if (_tmp5_ != NULL) {
		GFileMonitor* _tmp6_;
		_tmp6_ = self->priv->d_monitor;
		g_signal_connect_object (_tmp6_, "changed", (GCallback) _gitg_recursive_monitor_monitor_changed_timeout_g_file_monitor_changed, self, 0);
	}
	_tmp7_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->d_cancellable);
	self->priv->d_cancellable = _tmp7_;
	gitg_recursive_monitor_enumerate (self, location, ___lambda152__gasync_ready_callback, g_object_ref (self));
	(filter_func_target_destroy_notify == NULL) ? NULL : (filter_func_target_destroy_notify (filter_func_target), NULL);
	filter_func = NULL;
	filter_func_target = NULL;
	filter_func_target_destroy_notify = NULL;
	return self;
}

GitgRecursiveMonitor*
gitg_recursive_monitor_new (GFile* location,
                            GitgRecursiveMonitorFilterFunc filter_func,
                            gpointer filter_func_target,
                            GDestroyNotify filter_func_target_destroy_notify)
{
	return gitg_recursive_monitor_construct (GITG_TYPE_RECURSIVE_MONITOR, location, filter_func, filter_func_target, filter_func_target_destroy_notify);
}

static void
gitg_recursive_monitor_enumerate_data_free (gpointer _data)
{
	GitgRecursiveMonitorEnumerateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->location);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgRecursiveMonitorEnumerateData, _data_);
}

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

static void
gitg_recursive_monitor_enumerate (GitgRecursiveMonitor* self,
                                  GFile* location,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	GitgRecursiveMonitorEnumerateData* _data_;
	GitgRecursiveMonitor* _tmp0_;
	GFile* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	_data_ = g_slice_new0 (GitgRecursiveMonitorEnumerateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_recursive_monitor_enumerate_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (location);
	_g_object_unref0 (_data_->location);
	_data_->location = _tmp1_;
	gitg_recursive_monitor_enumerate_co (_data_);
}

static void
gitg_recursive_monitor_enumerate_finish (GitgRecursiveMonitor* self,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	GitgRecursiveMonitorEnumerateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
gitg_recursive_monitor_enumerate_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	GitgRecursiveMonitorEnumerateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_recursive_monitor_enumerate_co (_data_);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
_vala_array_add25 (GFile** * array,
                   gint* length,
                   gint* size,
                   GFile* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GFile*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
gitg_recursive_monitor_enumerate_co (GitgRecursiveMonitorEnumerateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->d_cancellable;
	_data_->_state_ = 1;
	g_file_enumerate_children_async (_data_->location, G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, _data_->_tmp0_, gitg_recursive_monitor_enumerate_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = g_file_enumerate_children_finish (_data_->location, _data_->_res_, &_data_->_inner_error0_);
	_data_->e = _data_->_tmp1_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = g_new0 (GFile*, 0 + 1);
	_data_->allfiles = _data_->_tmp2_;
	_data_->allfiles_length1 = 0;
	_data_->_allfiles_size_ = _data_->allfiles_length1;
	while (TRUE) {
		_data_->_tmp3_ = _data_->e;
		_data_->_state_ = 2;
		g_file_enumerator_next_files_async (_data_->_tmp3_, 10, G_PRIORITY_DEFAULT, NULL, gitg_recursive_monitor_enumerate_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp4_ = g_file_enumerator_next_files_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error0_);
		_data_->files = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_data_->allfiles = (_vala_array_free (_data_->allfiles, _data_->allfiles_length1, (GDestroyNotify) g_object_unref), NULL);
			_g_object_unref0 (_data_->e);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp5_ = _data_->files;
		if (_data_->_tmp5_ == NULL) {
			(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
			break;
		}
		_data_->_tmp6_ = _data_->files;
		{
			_data_->f_collection = _data_->_tmp6_;
			for (_data_->f_it = _data_->f_collection; _data_->f_it != NULL; _data_->f_it = _data_->f_it->next) {
				_data_->_tmp7_ = _g_object_ref0 ((GFileInfo*) _data_->f_it->data);
				_data_->f = _data_->_tmp7_;
				{
					_data_->_tmp8_ = _data_->f;
					if (g_file_info_get_file_type (_data_->_tmp8_) == G_FILE_TYPE_DIRECTORY) {
						_data_->_tmp9_ = _data_->f;
						_data_->_tmp10_ = g_file_info_get_name (_data_->_tmp9_);
						_data_->_tmp11_ = g_file_get_child (_data_->location, _data_->_tmp10_);
						_vala_array_add25 (&_data_->allfiles, &_data_->allfiles_length1, &_data_->_allfiles_size_, _data_->_tmp11_);
					}
					_g_object_unref0 (_data_->f);
				}
			}
		}
		(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
	}
	_data_->_tmp12_ = _data_->e;
	_data_->_tmp13_ = _data_->self->priv->d_cancellable;
	_data_->_state_ = 3;
	g_file_enumerator_close_async (_data_->_tmp12_, G_PRIORITY_DEFAULT, _data_->_tmp13_, gitg_recursive_monitor_enumerate_ready, _data_);
	return FALSE;
	_state_3:
	g_file_enumerator_close_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_data_->allfiles = (_vala_array_free (_data_->allfiles, _data_->allfiles_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (_data_->e);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp14_ = _data_->allfiles;
	_data_->_tmp14__length1 = _data_->allfiles_length1;
	{
		_data_->_vala1_f_collection_length1 = 0;
		_data_->__vala1_f_collection_size_ = 0;
		_data_->_vala1_f_collection = _data_->_tmp14_;
		_data_->_vala1_f_collection_length1 = _data_->_tmp14__length1;
		for (_data_->_vala1_f_it = 0; _data_->_vala1_f_it < _data_->_vala1_f_collection_length1; _data_->_vala1_f_it = _data_->_vala1_f_it + 1) {
			_data_->_tmp15_ = _g_object_ref0 (_data_->_vala1_f_collection[_data_->_vala1_f_it]);
			_data_->_vala1_f = _data_->_tmp15_;
			{
				_data_->_tmp16_ = _data_->_vala1_f;
				gitg_recursive_monitor_add_submonitor (_data_->self, _data_->_tmp16_);
				_g_object_unref0 (_data_->_vala1_f);
			}
		}
	}
	_data_->allfiles = (_vala_array_free (_data_->allfiles, _data_->allfiles_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (_data_->e);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
__lambda149_ (GitgRecursiveMonitor* self,
              GFile* l)
{
	GitgRecursiveMonitorFilterFunc _tmp0_;
	gpointer _tmp0__target;
	gboolean result;
	g_return_val_if_fail (l != NULL, FALSE);
	_tmp0_ = self->priv->d_filter_func;
	_tmp0__target = self->priv->d_filter_func_target;
	result = _tmp0_ (l, _tmp0__target);
	return result;
}

static gboolean
___lambda149__gitg_recursive_monitor_filter_func (GFile* file,
                                                  gpointer self)
{
	gboolean result;
	result = __lambda149_ ((GitgRecursiveMonitor*) self, file);
	return result;
}

static void
__lambda150_ (GitgRecursiveMonitor* self,
              GFile** files,
              gint files_length1)
{
	gitg_recursive_monitor_changed_timeout (self, files, (gint) files_length1);
}

static void
___lambda150__gitg_recursive_monitor_changed (GitgRecursiveMonitor* _sender,
                                              GFile** files,
                                              gint files_length1,
                                              gpointer self)
{
	__lambda150_ ((GitgRecursiveMonitor*) self, files, files_length1);
}

static void
gitg_recursive_monitor_add_submonitor (GitgRecursiveMonitor* self,
                                       GFile* location)
{
	gboolean _tmp0_ = FALSE;
	GitgRecursiveMonitorFilterFunc _tmp1_;
	gpointer _tmp1__target;
	GitgRecursiveMonitor* mon = NULL;
	GitgRecursiveMonitor* _tmp3_;
	GeeList* _tmp4_;
	GitgRecursiveMonitor* _tmp5_;
	GitgRecursiveMonitorMonitor* _tmp6_;
	GitgRecursiveMonitorMonitor* _tmp7_;
	GitgRecursiveMonitor* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	_tmp1_ = self->priv->d_filter_func;
	_tmp1__target = self->priv->d_filter_func_target;
	if (_tmp1_ != NULL) {
		GitgRecursiveMonitorFilterFunc _tmp2_;
		gpointer _tmp2__target;
		_tmp2_ = self->priv->d_filter_func;
		_tmp2__target = self->priv->d_filter_func_target;
		_tmp0_ = !_tmp2_ (location, _tmp2__target);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = gitg_recursive_monitor_new (location, ___lambda149__gitg_recursive_monitor_filter_func, g_object_ref (self), g_object_unref);
	mon = _tmp3_;
	_tmp4_ = self->priv->d_sub_monitors;
	_tmp5_ = mon;
	_tmp6_ = gitg_recursive_monitor_monitor_new (location, _tmp5_);
	_tmp7_ = _tmp6_;
	gee_collection_add ((GeeCollection*) _tmp4_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = mon;
	g_signal_connect_object (_tmp8_, "changed", (GCallback) ___lambda150__gitg_recursive_monitor_changed, self, 0);
	_g_object_unref0 (mon);
}

static void
gitg_recursive_monitor_add_submonitor_if_directory (GitgRecursiveMonitor* self,
                                                    GFile* location)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	{
		GFileInfo* info = NULL;
		GFileInfo* _tmp0_;
		_tmp0_ = g_file_query_info (location, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NONE, NULL, &_inner_error0_);
		info = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
			gitg_recursive_monitor_add_submonitor (self, location);
		}
		_g_object_unref0 (info);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
gitg_recursive_monitor_real_dispose (GObject* base)
{
	GitgRecursiveMonitor * self;
	self = (GitgRecursiveMonitor*) base;
	gitg_recursive_monitor_cancel (self);
	G_OBJECT_CLASS (gitg_recursive_monitor_parent_class)->dispose (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject));
}

static void
gitg_recursive_monitor_remove_submonitor (GitgRecursiveMonitor* self,
                                          GFile* location)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp0_;
		gint _monitor_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _monitor_index = 0;
		_tmp0_ = self->priv->d_sub_monitors;
		_monitor_list = _tmp0_;
		_tmp1_ = _monitor_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_monitor_size = _tmp3_;
		_monitor_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			GitgRecursiveMonitorMonitor* monitor = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			GitgRecursiveMonitorMonitor* _tmp8_;
			GFile* _tmp9_;
			_monitor_index = _monitor_index + 1;
			_tmp4_ = _monitor_index;
			_tmp5_ = _monitor_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _monitor_list;
			_tmp7_ = gee_list_get (_tmp6_, _monitor_index);
			monitor = (GitgRecursiveMonitorMonitor*) _tmp7_;
			_tmp8_ = monitor;
			_tmp9_ = _tmp8_->location;
			if (g_file_equal (location, _tmp9_)) {
				GeeList* _tmp10_;
				GitgRecursiveMonitorMonitor* _tmp11_;
				_tmp10_ = self->priv->d_sub_monitors;
				_tmp11_ = monitor;
				gee_collection_remove ((GeeCollection*) _tmp10_, _tmp11_);
				_g_object_unref0 (monitor);
				return;
			}
			_g_object_unref0 (monitor);
		}
	}
}

static void
gitg_recursive_monitor_monitor_changed_timeout (GitgRecursiveMonitor* self,
                                                GFile* file,
                                                GFile* other_file,
                                                GFileMonitorEvent event)
{
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile** _tmp2_;
	GFile** _tmp3_;
	gint _tmp3__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	if (event == G_FILE_MONITOR_EVENT_CREATED) {
		gitg_recursive_monitor_add_submonitor_if_directory (self, file);
	} else {
		if (event == G_FILE_MONITOR_EVENT_DELETED) {
			gitg_recursive_monitor_remove_submonitor (self, file);
		} else {
			if (event == G_FILE_MONITOR_EVENT_MOVED) {
				gitg_recursive_monitor_remove_submonitor (self, file);
				if (other_file != NULL) {
					gitg_recursive_monitor_add_submonitor_if_directory (self, other_file);
				}
			}
		}
	}
	_tmp0_ = _g_object_ref0 (file);
	_tmp1_ = _g_object_ref0 (other_file);
	_tmp2_ = g_new0 (GFile*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 2;
	gitg_recursive_monitor_changed_timeout (self, _tmp3_, (gint) 2);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_object_unref), NULL);
}

static void
_vala_array_add26 (GFile** * array,
                   gint* length,
                   gint* size,
                   GFile* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GFile*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
___lambda151_ (GitgRecursiveMonitor* self)
{
	GFile** _tmp0_;
	gint _tmp0__length1;
	GFile** _tmp1_;
	gboolean result;
	self->priv->d_monitor_changed_timeout_id = (guint) 0;
	_tmp0_ = self->priv->d_changed_files;
	_tmp0__length1 = self->priv->d_changed_files_length1;
	g_signal_emit (self, gitg_recursive_monitor_signals[GITG_RECURSIVE_MONITOR_CHANGED_SIGNAL], 0, _tmp0_, (gint) _tmp0__length1);
	_tmp1_ = g_new0 (GFile*, 0 + 1);
	self->priv->d_changed_files = (_vala_array_free (self->priv->d_changed_files, self->priv->d_changed_files_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->d_changed_files = _tmp1_;
	self->priv->d_changed_files_length1 = 0;
	self->priv->_d_changed_files_size_ = self->priv->d_changed_files_length1;
	result = FALSE;
	return result;
}

static gboolean
____lambda151__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda151_ ((GitgRecursiveMonitor*) self);
	return result;
}

static void
gitg_recursive_monitor_changed_timeout (GitgRecursiveMonitor* self,
                                        GFile** files,
                                        gint files_length1)
{
	GFile** _tmp9_;
	gint _tmp9__length1;
	g_return_if_fail (self != NULL);
	{
		GFile** f_collection = NULL;
		gint f_collection_length1 = 0;
		gint _f_collection_size_ = 0;
		gint f_it = 0;
		f_collection = files;
		f_collection_length1 = files_length1;
		for (f_it = 0; f_it < f_collection_length1; f_it = f_it + 1) {
			GFile* _tmp0_;
			GFile* f = NULL;
			_tmp0_ = _g_object_ref0 (f_collection[f_it]);
			f = _tmp0_;
			{
				gboolean _tmp1_ = FALSE;
				GFile* _tmp2_;
				_tmp2_ = f;
				if (_tmp2_ != NULL) {
					gboolean _tmp3_ = FALSE;
					GitgRecursiveMonitorFilterFunc _tmp4_;
					gpointer _tmp4__target;
					_tmp4_ = self->priv->d_filter_func;
					_tmp4__target = self->priv->d_filter_func_target;
					if (_tmp4_ == NULL) {
						_tmp3_ = TRUE;
					} else {
						GitgRecursiveMonitorFilterFunc _tmp5_;
						gpointer _tmp5__target;
						GFile* _tmp6_;
						_tmp5_ = self->priv->d_filter_func;
						_tmp5__target = self->priv->d_filter_func_target;
						_tmp6_ = f;
						_tmp3_ = _tmp5_ (_tmp6_, _tmp5__target);
					}
					_tmp1_ = _tmp3_;
				} else {
					_tmp1_ = FALSE;
				}
				if (_tmp1_) {
					GFile* _tmp7_;
					GFile* _tmp8_;
					_tmp7_ = f;
					_tmp8_ = _g_object_ref0 (_tmp7_);
					_vala_array_add26 (&self->priv->d_changed_files, &self->priv->d_changed_files_length1, &self->priv->_d_changed_files_size_, _tmp8_);
				}
				_g_object_unref0 (f);
			}
		}
	}
	if (self->priv->d_monitor_changed_timeout_id != ((guint) 0)) {
		return;
	}
	_tmp9_ = self->priv->d_changed_files;
	_tmp9__length1 = self->priv->d_changed_files_length1;
	if (_tmp9__length1 > 0) {
		self->priv->d_monitor_changed_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ____lambda151__gsource_func, g_object_ref (self), g_object_unref);
	}
}

void
gitg_recursive_monitor_cancel (GitgRecursiveMonitor* self)
{
	GCancellable* _tmp0_;
	GeeList* _tmp11_;
	GFileMonitor* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->d_cancellable;
	g_cancellable_cancel (_tmp0_);
	if (self->priv->d_monitor_changed_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->d_monitor_changed_timeout_id);
		self->priv->d_monitor_changed_timeout_id = (guint) 0;
	}
	{
		GeeList* _monitor_list = NULL;
		GeeList* _tmp1_;
		gint _monitor_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _monitor_index = 0;
		_tmp1_ = self->priv->d_sub_monitors;
		_monitor_list = _tmp1_;
		_tmp2_ = _monitor_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_monitor_size = _tmp4_;
		_monitor_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			GitgRecursiveMonitorMonitor* monitor = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			GitgRecursiveMonitorMonitor* _tmp9_;
			GitgRecursiveMonitor* _tmp10_;
			_monitor_index = _monitor_index + 1;
			_tmp5_ = _monitor_index;
			_tmp6_ = _monitor_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _monitor_list;
			_tmp8_ = gee_list_get (_tmp7_, _monitor_index);
			monitor = (GitgRecursiveMonitorMonitor*) _tmp8_;
			_tmp9_ = monitor;
			_tmp10_ = _tmp9_->monitor;
			gitg_recursive_monitor_cancel (_tmp10_);
			_g_object_unref0 (monitor);
		}
	}
	_tmp11_ = self->priv->d_sub_monitors;
	gee_collection_clear ((GeeCollection*) _tmp11_);
	_tmp12_ = self->priv->d_monitor;
	if (_tmp12_ != NULL) {
		GFileMonitor* _tmp13_;
		_tmp13_ = self->priv->d_monitor;
		g_file_monitor_cancel (_tmp13_);
		_g_object_unref0 (self->priv->d_monitor);
		self->priv->d_monitor = NULL;
	}
}

static void
g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__POINTER_INT) (gpointer data1, gpointer arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__POINTER_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	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__POINTER_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_pointer (param_values + 1), g_value_get_int (param_values + 2), data2);
}

static GitgRecursiveMonitorMonitor*
gitg_recursive_monitor_monitor_construct (GType object_type,
                                          GFile* location,
                                          GitgRecursiveMonitor* monitor)
{
	GitgRecursiveMonitorMonitor * self = NULL;
	GFile* _tmp0_;
	GitgRecursiveMonitor* _tmp1_;
	g_return_val_if_fail (location != NULL, NULL);
	g_return_val_if_fail (monitor != NULL, NULL);
	self = (GitgRecursiveMonitorMonitor*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (location);
	_g_object_unref0 (self->location);
	self->location = _tmp0_;
	_tmp1_ = _g_object_ref0 (monitor);
	_g_object_unref0 (self->monitor);
	self->monitor = _tmp1_;
	return self;
}

static GitgRecursiveMonitorMonitor*
gitg_recursive_monitor_monitor_new (GFile* location,
                                    GitgRecursiveMonitor* monitor)
{
	return gitg_recursive_monitor_monitor_construct (GITG_RECURSIVE_MONITOR_TYPE_MONITOR, location, monitor);
}

static void
gitg_recursive_monitor_monitor_class_init (GitgRecursiveMonitorMonitorClass * klass,
                                           gpointer klass_data)
{
	gitg_recursive_monitor_monitor_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = gitg_recursive_monitor_monitor_finalize;
}

static void
gitg_recursive_monitor_monitor_instance_init (GitgRecursiveMonitorMonitor * self,
                                              gpointer klass)
{
}

static void
gitg_recursive_monitor_monitor_finalize (GObject * obj)
{
	GitgRecursiveMonitorMonitor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_RECURSIVE_MONITOR_TYPE_MONITOR, GitgRecursiveMonitorMonitor);
	_g_object_unref0 (self->location);
	_g_object_unref0 (self->monitor);
	G_OBJECT_CLASS (gitg_recursive_monitor_monitor_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_recursive_monitor_monitor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgRecursiveMonitorMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_recursive_monitor_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRecursiveMonitorMonitor), 0, (GInstanceInitFunc) gitg_recursive_monitor_monitor_instance_init, NULL };
	GType gitg_recursive_monitor_monitor_type_id;
	gitg_recursive_monitor_monitor_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgRecursiveMonitorMonitor", &g_define_type_info, 0);
	return gitg_recursive_monitor_monitor_type_id;
}

static GType
gitg_recursive_monitor_monitor_get_type (void)
{
	static gsize gitg_recursive_monitor_monitor_type_id__once = 0;
	if (g_once_init_enter (&gitg_recursive_monitor_monitor_type_id__once)) {
		GType gitg_recursive_monitor_monitor_type_id;
		gitg_recursive_monitor_monitor_type_id = gitg_recursive_monitor_monitor_get_type_once ();
		g_once_init_leave (&gitg_recursive_monitor_monitor_type_id__once, gitg_recursive_monitor_monitor_type_id);
	}
	return gitg_recursive_monitor_monitor_type_id__once;
}

static void
gitg_recursive_monitor_class_init (GitgRecursiveMonitorClass * klass,
                                   gpointer klass_data)
{
	gitg_recursive_monitor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgRecursiveMonitor_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) gitg_recursive_monitor_real_dispose;
	G_OBJECT_CLASS (klass)->finalize = gitg_recursive_monitor_finalize;
	gitg_recursive_monitor_signals[GITG_RECURSIVE_MONITOR_CHANGED_SIGNAL] = g_signal_new ("changed", GITG_TYPE_RECURSIVE_MONITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_INT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_INT);
}

static void
gitg_recursive_monitor_instance_init (GitgRecursiveMonitor * self,
                                      gpointer klass)
{
	self->priv = gitg_recursive_monitor_get_instance_private (self);
}

static void
gitg_recursive_monitor_finalize (GObject * obj)
{
	GitgRecursiveMonitor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_RECURSIVE_MONITOR, GitgRecursiveMonitor);
	_g_object_unref0 (self->priv->d_monitor);
	_g_object_unref0 (self->priv->d_sub_monitors);
	(self->priv->d_filter_func_target_destroy_notify == NULL) ? NULL : (self->priv->d_filter_func_target_destroy_notify (self->priv->d_filter_func_target), NULL);
	self->priv->d_filter_func = NULL;
	self->priv->d_filter_func_target = NULL;
	self->priv->d_filter_func_target_destroy_notify = NULL;
	_g_object_unref0 (self->priv->d_cancellable);
	self->priv->d_changed_files = (_vala_array_free (self->priv->d_changed_files, self->priv->d_changed_files_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (gitg_recursive_monitor_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_recursive_monitor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgRecursiveMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_recursive_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRecursiveMonitor), 0, (GInstanceInitFunc) gitg_recursive_monitor_instance_init, NULL };
	GType gitg_recursive_monitor_type_id;
	gitg_recursive_monitor_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgRecursiveMonitor", &g_define_type_info, 0);
	GitgRecursiveMonitor_private_offset = g_type_add_instance_private (gitg_recursive_monitor_type_id, sizeof (GitgRecursiveMonitorPrivate));
	return gitg_recursive_monitor_type_id;
}

GType
gitg_recursive_monitor_get_type (void)
{
	static gsize gitg_recursive_monitor_type_id__once = 0;
	if (g_once_init_enter (&gitg_recursive_monitor_type_id__once)) {
		GType gitg_recursive_monitor_type_id;
		gitg_recursive_monitor_type_id = gitg_recursive_monitor_get_type_once ();
		g_once_init_leave (&gitg_recursive_monitor_type_id__once, gitg_recursive_monitor_type_id);
	}
	return gitg_recursive_monitor_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

