/* file-op-plugin.c generated by valac 0.56.17, the Vala compiler
 * generated from file-op-plugin.vala, do not modify */

/*
 * Copyright (C) 2010 Michal Hruby <michal.mhr@gmail.com>
 *
 * This program 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.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 *
 * Authored by Alberto Aldegheri <albyrock87+dev@gmail.com>
 *
 */

#include "plugins.h"
#include <glib.h>
#include <gee.h>
#include <glib-object.h>
#include <synapse-core.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.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  {
	SYNAPSE_FILE_OP_PLUGIN_0_PROPERTY,
	SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY,
	SYNAPSE_FILE_OP_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* synapse_file_op_plugin_properties[SYNAPSE_FILE_OP_PLUGIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE (synapse_file_op_plugin_remove_get_type ())
#define SYNAPSE_FILE_OP_PLUGIN_REMOVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE, SynapseFileOpPluginRemove))
#define SYNAPSE_FILE_OP_PLUGIN_REMOVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE, SynapseFileOpPluginRemoveClass))
#define SYNAPSE_FILE_OP_PLUGIN_IS_REMOVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE))
#define SYNAPSE_FILE_OP_PLUGIN_IS_REMOVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE))
#define SYNAPSE_FILE_OP_PLUGIN_REMOVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE, SynapseFileOpPluginRemoveClass))

typedef struct _SynapseFileOpPluginRemove SynapseFileOpPluginRemove;
typedef struct _SynapseFileOpPluginRemoveClass SynapseFileOpPluginRemoveClass;
typedef struct _SynapseFileOpPluginRemovePrivate SynapseFileOpPluginRemovePrivate;
enum  {
	SYNAPSE_FILE_OP_PLUGIN_REMOVE_0_PROPERTY,
	SYNAPSE_FILE_OP_PLUGIN_REMOVE_NUM_PROPERTIES
};
static GParamSpec* synapse_file_op_plugin_remove_properties[SYNAPSE_FILE_OP_PLUGIN_REMOVE_NUM_PROPERTIES];
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO (synapse_file_op_plugin_rename_to_get_type ())
#define SYNAPSE_FILE_OP_PLUGIN_RENAME_TO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO, SynapseFileOpPluginRenameTo))
#define SYNAPSE_FILE_OP_PLUGIN_RENAME_TO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO, SynapseFileOpPluginRenameToClass))
#define SYNAPSE_FILE_OP_PLUGIN_IS_RENAME_TO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO))
#define SYNAPSE_FILE_OP_PLUGIN_IS_RENAME_TO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO))
#define SYNAPSE_FILE_OP_PLUGIN_RENAME_TO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO, SynapseFileOpPluginRenameToClass))

typedef struct _SynapseFileOpPluginRenameTo SynapseFileOpPluginRenameTo;
typedef struct _SynapseFileOpPluginRenameToClass SynapseFileOpPluginRenameToClass;
typedef struct _SynapseFileOpPluginRenameToPrivate SynapseFileOpPluginRenameToPrivate;
enum  {
	SYNAPSE_FILE_OP_PLUGIN_RENAME_TO_0_PROPERTY,
	SYNAPSE_FILE_OP_PLUGIN_RENAME_TO_NUM_PROPERTIES
};
static GParamSpec* synapse_file_op_plugin_rename_to_properties[SYNAPSE_FILE_OP_PLUGIN_RENAME_TO_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SynapseFileOpPluginPrivate {
	gboolean _enabled;
	GeeList* actions;
};

struct _SynapseFileOpPluginRemove {
	SynapseAction parent_instance;
	SynapseFileOpPluginRemovePrivate * priv;
};

struct _SynapseFileOpPluginRemoveClass {
	SynapseActionClass parent_class;
};

struct _SynapseFileOpPluginRenameTo {
	SynapseAction parent_instance;
	SynapseFileOpPluginRenameToPrivate * priv;
};

struct _SynapseFileOpPluginRenameToClass {
	SynapseActionClass parent_class;
};

static gint SynapseFileOpPlugin_private_offset;
static gpointer synapse_file_op_plugin_parent_class = NULL;
static gpointer synapse_file_op_plugin_remove_parent_class = NULL;
static gpointer synapse_file_op_plugin_rename_to_parent_class = NULL;
static SynapseActivatableIface * synapse_file_op_plugin_synapse_activatable_parent_iface = NULL;
static SynapseActionProviderIface * synapse_file_op_plugin_synapse_action_provider_parent_iface = NULL;

static void synapse_file_op_plugin_real_activate (SynapseActivatable* base);
static void synapse_file_op_plugin_real_deactivate (SynapseActivatable* base);
static void synapse_file_op_plugin_register_plugin (void);
static void _synapse_file_op_plugin_register_plugin_synapse_plugin_register_func (void);
static SynapseResultSet* synapse_file_op_plugin_real_find_for_match (SynapseActionProvider* base,
                                                              SynapseQuery* query,
                                                              SynapseMatch* match);
static GType synapse_file_op_plugin_remove_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseFileOpPluginRemove* synapse_file_op_plugin_remove_new (void);
static SynapseFileOpPluginRemove* synapse_file_op_plugin_remove_construct (GType object_type);
static void synapse_file_op_plugin_remove_real_do_execute (SynapseAction* base,
                                                    SynapseMatch* source,
                                                    SynapseMatch* target);
static gboolean synapse_file_op_plugin_remove_real_valid_for_match (SynapseAction* base,
                                                             SynapseMatch* match);
static GType synapse_file_op_plugin_remove_get_type_once (void);
static GType synapse_file_op_plugin_rename_to_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseFileOpPluginRenameTo* synapse_file_op_plugin_rename_to_new (void);
static SynapseFileOpPluginRenameTo* synapse_file_op_plugin_rename_to_construct (GType object_type);
static void synapse_file_op_plugin_rename_to_real_do_execute (SynapseAction* base,
                                                       SynapseMatch* source,
                                                       SynapseMatch* target);
static gboolean synapse_file_op_plugin_rename_to_real_needs_target (SynapseMatch* base);
static SynapseQueryFlags synapse_file_op_plugin_rename_to_real_target_flags (SynapseMatch* base);
static gboolean synapse_file_op_plugin_rename_to_real_valid_for_match (SynapseAction* base,
                                                                SynapseMatch* match);
static GType synapse_file_op_plugin_rename_to_get_type_once (void);
static GObject * synapse_file_op_plugin_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static void synapse_file_op_plugin_finalize (GObject * obj);
static GType synapse_file_op_plugin_get_type_once (void);
static void _vala_synapse_file_op_plugin_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_synapse_file_op_plugin_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
synapse_file_op_plugin_get_instance_private (SynapseFileOpPlugin* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseFileOpPlugin_private_offset);
}

static void
synapse_file_op_plugin_real_activate (SynapseActivatable* base)
{
	SynapseFileOpPlugin * self;
#line 28 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) base;
#line 170 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_real_deactivate (SynapseActivatable* base)
{
	SynapseFileOpPlugin * self;
#line 32 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) base;
#line 179 "file-op-plugin.c"
}

static void
_synapse_file_op_plugin_register_plugin_synapse_plugin_register_func (void)
{
#line 123 "file-op-plugin.vala"
	synapse_file_op_plugin_register_plugin ();
#line 187 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_register_plugin (void)
{
	SynapsePluginRegistry* _tmp0_;
	SynapsePluginRegistry* _tmp1_;
#line 123 "file-op-plugin.vala"
	_tmp0_ = synapse_plugin_registry_get_default ();
#line 123 "file-op-plugin.vala"
	_tmp1_ = _tmp0_;
#line 123 "file-op-plugin.vala"
	synapse_plugin_registry_register_plugin (_tmp1_, SYNAPSE_TYPE_FILE_OP_PLUGIN, _ ("File Operations"), _ ("Copy, Cut, Paste and Delete files"), "stock_copy", _synapse_file_op_plugin_register_plugin_synapse_plugin_register_func, TRUE, "");
#line 123 "file-op-plugin.vala"
	_g_object_unref0 (_tmp1_);
#line 203 "file-op-plugin.c"
}

static SynapseResultSet*
synapse_file_op_plugin_real_find_for_match (SynapseActionProvider* base,
                                            SynapseQuery* query,
                                            SynapseMatch* match)
{
	SynapseFileOpPlugin * self;
	gboolean query_empty = FALSE;
	SynapseQuery _tmp0_;
	const gchar* _tmp1_;
	SynapseResultSet* results = NULL;
	SynapseResultSet* _tmp2_;
	SynapseResultSet* result;
#line 147 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) base;
#line 147 "file-op-plugin.vala"
	g_return_val_if_fail (query != NULL, NULL);
#line 147 "file-op-plugin.vala"
	g_return_val_if_fail (match != NULL, NULL);
#line 149 "file-op-plugin.vala"
	_tmp0_ = *query;
#line 149 "file-op-plugin.vala"
	_tmp1_ = _tmp0_.query_string;
#line 149 "file-op-plugin.vala"
	query_empty = g_strcmp0 (_tmp1_, "") == 0;
#line 150 "file-op-plugin.vala"
	_tmp2_ = synapse_result_set_new ();
#line 150 "file-op-plugin.vala"
	results = _tmp2_;
#line 152 "file-op-plugin.vala"
	if (query_empty) {
#line 236 "file-op-plugin.c"
		{
			GeeList* _action_list = NULL;
			GeeList* _tmp3_;
			gint _action_size = 0;
			GeeList* _tmp4_;
			gint _tmp5_;
			gint _tmp6_;
			gint _action_index = 0;
#line 154 "file-op-plugin.vala"
			_tmp3_ = self->priv->actions;
#line 154 "file-op-plugin.vala"
			_action_list = _tmp3_;
#line 154 "file-op-plugin.vala"
			_tmp4_ = _action_list;
#line 154 "file-op-plugin.vala"
			_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
#line 154 "file-op-plugin.vala"
			_tmp6_ = _tmp5_;
#line 154 "file-op-plugin.vala"
			_action_size = _tmp6_;
#line 154 "file-op-plugin.vala"
			_action_index = -1;
#line 154 "file-op-plugin.vala"
			while (TRUE) {
#line 261 "file-op-plugin.c"
				gint _tmp7_;
				gint _tmp8_;
				SynapseAction* action = NULL;
				GeeList* _tmp9_;
				gpointer _tmp10_;
				SynapseAction* _tmp11_;
#line 154 "file-op-plugin.vala"
				_action_index = _action_index + 1;
#line 154 "file-op-plugin.vala"
				_tmp7_ = _action_index;
#line 154 "file-op-plugin.vala"
				_tmp8_ = _action_size;
#line 154 "file-op-plugin.vala"
				if (!(_tmp7_ < _tmp8_)) {
#line 154 "file-op-plugin.vala"
					break;
#line 278 "file-op-plugin.c"
				}
#line 154 "file-op-plugin.vala"
				_tmp9_ = _action_list;
#line 154 "file-op-plugin.vala"
				_tmp10_ = gee_list_get (_tmp9_, _action_index);
#line 154 "file-op-plugin.vala"
				action = (SynapseAction*) _tmp10_;
#line 156 "file-op-plugin.vala"
				_tmp11_ = action;
#line 156 "file-op-plugin.vala"
				if (synapse_action_valid_for_match (_tmp11_, match)) {
#line 290 "file-op-plugin.c"
					SynapseResultSet* _tmp12_;
					SynapseAction* _tmp13_;
					SynapseAction* _tmp14_;
#line 158 "file-op-plugin.vala"
					_tmp12_ = results;
#line 158 "file-op-plugin.vala"
					_tmp13_ = action;
#line 158 "file-op-plugin.vala"
					_tmp14_ = action;
#line 158 "file-op-plugin.vala"
					synapse_result_set_add (_tmp12_, (SynapseMatch*) _tmp13_, synapse_action_get_relevancy_for_match (_tmp14_, match));
#line 302 "file-op-plugin.c"
				}
#line 154 "file-op-plugin.vala"
				_g_object_unref0 (action);
#line 306 "file-op-plugin.c"
			}
		}
	} else {
		GeeList* matchers = NULL;
		SynapseQuery _tmp15_;
		const gchar* _tmp16_;
		GeeList* _tmp17_;
#line 164 "file-op-plugin.vala"
		_tmp15_ = *query;
#line 164 "file-op-plugin.vala"
		_tmp16_ = _tmp15_.query_string;
#line 164 "file-op-plugin.vala"
		_tmp17_ = synapse_query_get_matchers_for_query (_tmp16_, 0, G_REGEX_OPTIMIZE | G_REGEX_CASELESS);
#line 164 "file-op-plugin.vala"
		matchers = _tmp17_;
#line 322 "file-op-plugin.c"
		{
			GeeList* _action_list = NULL;
			GeeList* _tmp18_;
			gint _action_size = 0;
			GeeList* _tmp19_;
			gint _tmp20_;
			gint _tmp21_;
			gint _action_index = 0;
#line 166 "file-op-plugin.vala"
			_tmp18_ = self->priv->actions;
#line 166 "file-op-plugin.vala"
			_action_list = _tmp18_;
#line 166 "file-op-plugin.vala"
			_tmp19_ = _action_list;
#line 166 "file-op-plugin.vala"
			_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
#line 166 "file-op-plugin.vala"
			_tmp21_ = _tmp20_;
#line 166 "file-op-plugin.vala"
			_action_size = _tmp21_;
#line 166 "file-op-plugin.vala"
			_action_index = -1;
#line 166 "file-op-plugin.vala"
			while (TRUE) {
#line 347 "file-op-plugin.c"
				gint _tmp22_;
				gint _tmp23_;
				SynapseAction* action = NULL;
				GeeList* _tmp24_;
				gpointer _tmp25_;
				SynapseAction* _tmp26_;
#line 166 "file-op-plugin.vala"
				_action_index = _action_index + 1;
#line 166 "file-op-plugin.vala"
				_tmp22_ = _action_index;
#line 166 "file-op-plugin.vala"
				_tmp23_ = _action_size;
#line 166 "file-op-plugin.vala"
				if (!(_tmp22_ < _tmp23_)) {
#line 166 "file-op-plugin.vala"
					break;
#line 364 "file-op-plugin.c"
				}
#line 166 "file-op-plugin.vala"
				_tmp24_ = _action_list;
#line 166 "file-op-plugin.vala"
				_tmp25_ = gee_list_get (_tmp24_, _action_index);
#line 166 "file-op-plugin.vala"
				action = (SynapseAction*) _tmp25_;
#line 168 "file-op-plugin.vala"
				_tmp26_ = action;
#line 168 "file-op-plugin.vala"
				if (!synapse_action_valid_for_match (_tmp26_, match)) {
#line 168 "file-op-plugin.vala"
					_g_object_unref0 (action);
#line 168 "file-op-plugin.vala"
					continue;
#line 380 "file-op-plugin.c"
				}
				{
					GeeList* _matcher_list = NULL;
					GeeList* _tmp27_;
					gint _matcher_size = 0;
					GeeList* _tmp28_;
					gint _tmp29_;
					gint _tmp30_;
					gint _matcher_index = 0;
#line 169 "file-op-plugin.vala"
					_tmp27_ = matchers;
#line 169 "file-op-plugin.vala"
					_matcher_list = _tmp27_;
#line 169 "file-op-plugin.vala"
					_tmp28_ = _matcher_list;
#line 169 "file-op-plugin.vala"
					_tmp29_ = gee_collection_get_size ((GeeCollection*) _tmp28_);
#line 169 "file-op-plugin.vala"
					_tmp30_ = _tmp29_;
#line 169 "file-op-plugin.vala"
					_matcher_size = _tmp30_;
#line 169 "file-op-plugin.vala"
					_matcher_index = -1;
#line 169 "file-op-plugin.vala"
					while (TRUE) {
#line 406 "file-op-plugin.c"
						gint _tmp31_;
						gint _tmp32_;
						GeeMapEntry* matcher = NULL;
						GeeList* _tmp33_;
						gpointer _tmp34_;
						GeeMapEntry* _tmp35_;
						gconstpointer _tmp36_;
						gconstpointer _tmp37_;
						SynapseAction* _tmp38_;
						const gchar* _tmp39_;
						const gchar* _tmp40_;
#line 169 "file-op-plugin.vala"
						_matcher_index = _matcher_index + 1;
#line 169 "file-op-plugin.vala"
						_tmp31_ = _matcher_index;
#line 169 "file-op-plugin.vala"
						_tmp32_ = _matcher_size;
#line 169 "file-op-plugin.vala"
						if (!(_tmp31_ < _tmp32_)) {
#line 169 "file-op-plugin.vala"
							break;
#line 428 "file-op-plugin.c"
						}
#line 169 "file-op-plugin.vala"
						_tmp33_ = _matcher_list;
#line 169 "file-op-plugin.vala"
						_tmp34_ = gee_list_get (_tmp33_, _matcher_index);
#line 169 "file-op-plugin.vala"
						matcher = (GeeMapEntry*) _tmp34_;
#line 171 "file-op-plugin.vala"
						_tmp35_ = matcher;
#line 171 "file-op-plugin.vala"
						_tmp36_ = gee_map_entry_get_key (_tmp35_);
#line 171 "file-op-plugin.vala"
						_tmp37_ = _tmp36_;
#line 171 "file-op-plugin.vala"
						_tmp38_ = action;
#line 171 "file-op-plugin.vala"
						_tmp39_ = synapse_match_get_title ((SynapseMatch*) _tmp38_);
#line 171 "file-op-plugin.vala"
						_tmp40_ = _tmp39_;
#line 171 "file-op-plugin.vala"
						if (g_regex_match ((GRegex*) _tmp37_, _tmp40_, 0, NULL)) {
#line 450 "file-op-plugin.c"
							SynapseResultSet* _tmp41_;
							SynapseAction* _tmp42_;
							GeeMapEntry* _tmp43_;
							gconstpointer _tmp44_;
							gconstpointer _tmp45_;
#line 173 "file-op-plugin.vala"
							_tmp41_ = results;
#line 173 "file-op-plugin.vala"
							_tmp42_ = action;
#line 173 "file-op-plugin.vala"
							_tmp43_ = matcher;
#line 173 "file-op-plugin.vala"
							_tmp44_ = gee_map_entry_get_value (_tmp43_);
#line 173 "file-op-plugin.vala"
							_tmp45_ = _tmp44_;
#line 173 "file-op-plugin.vala"
							synapse_result_set_add (_tmp41_, (SynapseMatch*) _tmp42_, (gint) ((gintptr) _tmp45_));
#line 174 "file-op-plugin.vala"
							_g_object_unref0 (matcher);
#line 174 "file-op-plugin.vala"
							break;
#line 472 "file-op-plugin.c"
						}
#line 169 "file-op-plugin.vala"
						_g_object_unref0 (matcher);
#line 476 "file-op-plugin.c"
					}
				}
#line 166 "file-op-plugin.vala"
				_g_object_unref0 (action);
#line 481 "file-op-plugin.c"
			}
		}
#line 152 "file-op-plugin.vala"
		_g_object_unref0 (matchers);
#line 486 "file-op-plugin.c"
	}
#line 180 "file-op-plugin.vala"
	result = results;
#line 180 "file-op-plugin.vala"
	return result;
#line 492 "file-op-plugin.c"
}

SynapseFileOpPlugin*
synapse_file_op_plugin_construct (GType object_type)
{
	SynapseFileOpPlugin * self = NULL;
#line 24 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) g_object_new (object_type, NULL);
#line 24 "file-op-plugin.vala"
	return self;
#line 503 "file-op-plugin.c"
}

SynapseFileOpPlugin*
synapse_file_op_plugin_new (void)
{
#line 24 "file-op-plugin.vala"
	return synapse_file_op_plugin_construct (SYNAPSE_TYPE_FILE_OP_PLUGIN);
#line 511 "file-op-plugin.c"
}

static gboolean
synapse_file_op_plugin_real_get_enabled (SynapseActivatable* base)
{
	gboolean result;
	SynapseFileOpPlugin* self;
#line 26 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) base;
#line 26 "file-op-plugin.vala"
	result = self->priv->_enabled;
#line 26 "file-op-plugin.vala"
	return result;
#line 525 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_real_set_enabled (SynapseActivatable* base,
                                         gboolean value)
{
	SynapseFileOpPlugin* self;
	gboolean old_value;
#line 26 "file-op-plugin.vala"
	self = (SynapseFileOpPlugin*) base;
#line 26 "file-op-plugin.vala"
	old_value = synapse_file_op_plugin_real_get_enabled (base);
#line 26 "file-op-plugin.vala"
	if (old_value != value) {
#line 26 "file-op-plugin.vala"
		self->priv->_enabled = value;
#line 26 "file-op-plugin.vala"
		g_object_notify_by_pspec ((GObject *) self, synapse_file_op_plugin_properties[SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY]);
#line 544 "file-op-plugin.c"
	}
}

static SynapseFileOpPluginRemove*
synapse_file_op_plugin_remove_construct (GType object_type)
{
	SynapseFileOpPluginRemove * self = NULL;
#line 40 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRemove*) g_object_new (object_type, "title", _ ("Remove"), "description", _ ("Move to Trash"), "icon-name", "user-trash", "has-thumbnail", FALSE, "default-relevancy", SYNAPSE_MATCH_SCORE_POOR, NULL);
#line 38 "file-op-plugin.vala"
	return self;
#line 556 "file-op-plugin.c"
}

static SynapseFileOpPluginRemove*
synapse_file_op_plugin_remove_new (void)
{
#line 38 "file-op-plugin.vala"
	return synapse_file_op_plugin_remove_construct (SYNAPSE_FILE_OP_PLUGIN_TYPE_REMOVE);
#line 564 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_remove_real_do_execute (SynapseAction* base,
                                               SynapseMatch* source,
                                               SynapseMatch* target)
{
	SynapseFileOpPluginRemove * self;
	SynapseUriMatch* uri_match = NULL;
	GFile* f = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GFile* _tmp2_;
	GError* _inner_error0_ = NULL;
#line 46 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRemove*) base;
#line 46 "file-op-plugin.vala"
	g_return_if_fail (source != NULL);
#line 48 "file-op-plugin.vala"
	uri_match = G_TYPE_CHECK_INSTANCE_TYPE (source, SYNAPSE_TYPE_URI_MATCH) ? ((SynapseUriMatch*) source) : NULL;
#line 49 "file-op-plugin.vala"
	g_return_if_fail (uri_match != NULL);
#line 51 "file-op-plugin.vala"
	_tmp0_ = synapse_uri_match_get_uri (uri_match);
#line 51 "file-op-plugin.vala"
	_tmp1_ = _tmp0_;
#line 51 "file-op-plugin.vala"
	_tmp2_ = g_file_new_for_uri (_tmp1_);
#line 51 "file-op-plugin.vala"
	f = _tmp2_;
#line 595 "file-op-plugin.c"
	{
#line 54 "file-op-plugin.vala"
		g_file_trash (f, NULL, &_inner_error0_);
#line 54 "file-op-plugin.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 601 "file-op-plugin.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 52 "file-op-plugin.vala"
		err = _inner_error0_;
#line 52 "file-op-plugin.vala"
		_inner_error0_ = NULL;
#line 58 "file-op-plugin.vala"
		_tmp3_ = err;
#line 58 "file-op-plugin.vala"
		_tmp4_ = _tmp3_->message;
#line 58 "file-op-plugin.vala"
		g_warning ("file-op-plugin.vala:58: %s", _tmp4_);
#line 52 "file-op-plugin.vala"
		_g_error_free0 (err);
#line 623 "file-op-plugin.c"
	}
	__finally0:
#line 52 "file-op-plugin.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 52 "file-op-plugin.vala"
		_g_object_unref0 (f);
#line 52 "file-op-plugin.vala"
		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);
#line 52 "file-op-plugin.vala"
		g_clear_error (&_inner_error0_);
#line 52 "file-op-plugin.vala"
		return;
#line 636 "file-op-plugin.c"
	}
#line 46 "file-op-plugin.vala"
	_g_object_unref0 (f);
#line 640 "file-op-plugin.c"
}

static gboolean
synapse_file_op_plugin_remove_real_valid_for_match (SynapseAction* base,
                                                    SynapseMatch* match)
{
	SynapseFileOpPluginRemove * self;
	gboolean _tmp0_ = FALSE;
	gboolean result;
#line 62 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRemove*) base;
#line 62 "file-op-plugin.vala"
	g_return_val_if_fail (match != NULL, FALSE);
#line 64 "file-op-plugin.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (match, SYNAPSE_TYPE_URI_MATCH)) {
#line 656 "file-op-plugin.c"
		SynapseQueryFlags _tmp1_;
		SynapseQueryFlags _tmp2_;
#line 64 "file-op-plugin.vala"
		_tmp1_ = synapse_uri_match_get_file_type (G_TYPE_CHECK_INSTANCE_CAST (match, SYNAPSE_TYPE_URI_MATCH, SynapseUriMatch));
#line 64 "file-op-plugin.vala"
		_tmp2_ = _tmp1_;
#line 64 "file-op-plugin.vala"
		_tmp0_ = (_tmp2_ & SYNAPSE_QUERY_FLAGS_FILES) != 0;
#line 665 "file-op-plugin.c"
	} else {
#line 64 "file-op-plugin.vala"
		_tmp0_ = FALSE;
#line 669 "file-op-plugin.c"
	}
#line 64 "file-op-plugin.vala"
	result = _tmp0_;
#line 64 "file-op-plugin.vala"
	return result;
#line 675 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_remove_class_init (SynapseFileOpPluginRemoveClass * klass,
                                          gpointer klass_data)
{
#line 36 "file-op-plugin.vala"
	synapse_file_op_plugin_remove_parent_class = g_type_class_peek_parent (klass);
#line 36 "file-op-plugin.vala"
	((SynapseActionClass *) klass)->do_execute = (void (*) (SynapseAction*, SynapseMatch*, SynapseMatch*)) synapse_file_op_plugin_remove_real_do_execute;
#line 36 "file-op-plugin.vala"
	((SynapseActionClass *) klass)->valid_for_match = (gboolean (*) (SynapseAction*, SynapseMatch*)) synapse_file_op_plugin_remove_real_valid_for_match;
#line 688 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_remove_instance_init (SynapseFileOpPluginRemove * self,
                                             gpointer klass)
{
}

static GType
synapse_file_op_plugin_remove_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseFileOpPluginRemoveClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_file_op_plugin_remove_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseFileOpPluginRemove), 0, (GInstanceInitFunc) synapse_file_op_plugin_remove_instance_init, NULL };
	GType synapse_file_op_plugin_remove_type_id;
	synapse_file_op_plugin_remove_type_id = g_type_register_static (SYNAPSE_TYPE_ACTION, "SynapseFileOpPluginRemove", &g_define_type_info, 0);
	return synapse_file_op_plugin_remove_type_id;
}

static GType
synapse_file_op_plugin_remove_get_type (void)
{
	static volatile gsize synapse_file_op_plugin_remove_type_id__once = 0;
	if (g_once_init_enter (&synapse_file_op_plugin_remove_type_id__once)) {
		GType synapse_file_op_plugin_remove_type_id;
		synapse_file_op_plugin_remove_type_id = synapse_file_op_plugin_remove_get_type_once ();
		g_once_init_leave (&synapse_file_op_plugin_remove_type_id__once, synapse_file_op_plugin_remove_type_id);
	}
	return synapse_file_op_plugin_remove_type_id__once;
}

static SynapseFileOpPluginRenameTo*
synapse_file_op_plugin_rename_to_construct (GType object_type)
{
	SynapseFileOpPluginRenameTo * self = NULL;
#line 72 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRenameTo*) g_object_new (object_type, "title", _ ("Rename to"), "description", _ ("Rename the file to..."), "icon-name", "stock_save-as", "has-thumbnail", FALSE, "default-relevancy", SYNAPSE_MATCH_SCORE_AVERAGE, NULL);
#line 70 "file-op-plugin.vala"
	return self;
#line 726 "file-op-plugin.c"
}

static SynapseFileOpPluginRenameTo*
synapse_file_op_plugin_rename_to_new (void)
{
#line 70 "file-op-plugin.vala"
	return synapse_file_op_plugin_rename_to_construct (SYNAPSE_FILE_OP_PLUGIN_TYPE_RENAME_TO);
#line 734 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_rename_to_real_do_execute (SynapseAction* base,
                                                  SynapseMatch* source,
                                                  SynapseMatch* target)
{
	SynapseFileOpPluginRenameTo * self;
	SynapseUriMatch* uri_match = NULL;
	SynapseUriMatch* _tmp0_;
	GFile* f = NULL;
	SynapseUriMatch* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	gchar* newpath = NULL;
	GFile* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	GFile* f2 = NULL;
	const gchar* _tmp18_;
	GFile* _tmp19_;
	GFile* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	const gchar* _tmp23_;
	gboolean done = FALSE;
	GError* _inner_error0_ = NULL;
#line 78 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRenameTo*) base;
#line 78 "file-op-plugin.vala"
	g_return_if_fail (source != NULL);
#line 80 "file-op-plugin.vala"
	if (target == NULL) {
#line 80 "file-op-plugin.vala"
		return;
#line 778 "file-op-plugin.c"
	}
#line 82 "file-op-plugin.vala"
	uri_match = G_TYPE_CHECK_INSTANCE_TYPE (source, SYNAPSE_TYPE_URI_MATCH) ? ((SynapseUriMatch*) source) : NULL;
#line 83 "file-op-plugin.vala"
	_tmp0_ = uri_match;
#line 83 "file-op-plugin.vala"
	if (_tmp0_ == NULL) {
#line 83 "file-op-plugin.vala"
		return;
#line 788 "file-op-plugin.c"
	}
#line 86 "file-op-plugin.vala"
	_tmp1_ = uri_match;
#line 86 "file-op-plugin.vala"
	_tmp2_ = synapse_uri_match_get_uri (_tmp1_);
#line 86 "file-op-plugin.vala"
	_tmp3_ = _tmp2_;
#line 86 "file-op-plugin.vala"
	_tmp4_ = g_file_new_for_uri (_tmp3_);
#line 86 "file-op-plugin.vala"
	_g_object_unref0 (f);
#line 86 "file-op-plugin.vala"
	f = _tmp4_;
#line 87 "file-op-plugin.vala"
	_tmp5_ = f;
#line 87 "file-op-plugin.vala"
	if (!g_file_query_exists (_tmp5_, NULL)) {
#line 806 "file-op-plugin.c"
		SynapseUriMatch* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
#line 89 "file-op-plugin.vala"
		_tmp6_ = uri_match;
#line 89 "file-op-plugin.vala"
		_tmp7_ = synapse_uri_match_get_uri (_tmp6_);
#line 89 "file-op-plugin.vala"
		_tmp8_ = _tmp7_;
#line 89 "file-op-plugin.vala"
		g_warning (_ ("File \"%s\"does not exist."), _tmp8_);
#line 90 "file-op-plugin.vala"
		_g_object_unref0 (f);
#line 90 "file-op-plugin.vala"
		return;
#line 822 "file-op-plugin.c"
	}
#line 92 "file-op-plugin.vala"
	_tmp9_ = f;
#line 92 "file-op-plugin.vala"
	_tmp10_ = g_file_get_path (_tmp9_);
#line 92 "file-op-plugin.vala"
	_tmp11_ = _tmp10_;
#line 92 "file-op-plugin.vala"
	_tmp12_ = g_path_get_dirname (_tmp11_);
#line 92 "file-op-plugin.vala"
	_tmp13_ = _tmp12_;
#line 92 "file-op-plugin.vala"
	_tmp14_ = synapse_match_get_title (target);
#line 92 "file-op-plugin.vala"
	_tmp15_ = _tmp14_;
#line 92 "file-op-plugin.vala"
	_tmp16_ = g_build_filename (_tmp13_, _tmp15_, NULL);
#line 92 "file-op-plugin.vala"
	_tmp17_ = _tmp16_;
#line 92 "file-op-plugin.vala"
	_g_free0 (_tmp13_);
#line 92 "file-op-plugin.vala"
	_g_free0 (_tmp11_);
#line 92 "file-op-plugin.vala"
	newpath = _tmp17_;
#line 93 "file-op-plugin.vala"
	_tmp18_ = newpath;
#line 93 "file-op-plugin.vala"
	_tmp19_ = g_file_new_for_path (_tmp18_);
#line 93 "file-op-plugin.vala"
	f2 = _tmp19_;
#line 94 "file-op-plugin.vala"
	_tmp20_ = f;
#line 94 "file-op-plugin.vala"
	_tmp21_ = g_file_get_path (_tmp20_);
#line 94 "file-op-plugin.vala"
	_tmp22_ = _tmp21_;
#line 94 "file-op-plugin.vala"
	_tmp23_ = newpath;
#line 94 "file-op-plugin.vala"
	g_debug ("file-op-plugin.vala:94: Moving \"%s\" to \"%s\"", _tmp22_, _tmp23_);
#line 94 "file-op-plugin.vala"
	_g_free0 (_tmp22_);
#line 95 "file-op-plugin.vala"
	done = FALSE;
#line 868 "file-op-plugin.c"
	{
		gboolean _tmp24_ = FALSE;
		GFile* _tmp25_;
		GFile* _tmp26_;
#line 97 "file-op-plugin.vala"
		_tmp25_ = f;
#line 97 "file-op-plugin.vala"
		_tmp26_ = f2;
#line 97 "file-op-plugin.vala"
		_tmp24_ = g_file_move (_tmp25_, _tmp26_, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_inner_error0_);
#line 97 "file-op-plugin.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 881 "file-op-plugin.c"
			goto __catch0_g_error;
		}
#line 97 "file-op-plugin.vala"
		done = _tmp24_;
#line 886 "file-op-plugin.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 96 "file-op-plugin.vala"
		g_clear_error (&_inner_error0_);
#line 893 "file-op-plugin.c"
	}
	__finally0:
#line 96 "file-op-plugin.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 96 "file-op-plugin.vala"
		_g_object_unref0 (f2);
#line 96 "file-op-plugin.vala"
		_g_free0 (newpath);
#line 96 "file-op-plugin.vala"
		_g_object_unref0 (f);
#line 96 "file-op-plugin.vala"
		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);
#line 96 "file-op-plugin.vala"
		g_clear_error (&_inner_error0_);
#line 96 "file-op-plugin.vala"
		return;
#line 910 "file-op-plugin.c"
	}
#line 99 "file-op-plugin.vala"
	if (!done) {
#line 914 "file-op-plugin.c"
		GFile* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		const gchar* _tmp30_;
#line 101 "file-op-plugin.vala"
		_tmp27_ = f;
#line 101 "file-op-plugin.vala"
		_tmp28_ = g_file_get_path (_tmp27_);
#line 101 "file-op-plugin.vala"
		_tmp29_ = _tmp28_;
#line 101 "file-op-plugin.vala"
		_tmp30_ = newpath;
#line 101 "file-op-plugin.vala"
		g_warning (_ ("Cannot move \"%s\" to \"%s\""), _tmp29_, _tmp30_);
#line 101 "file-op-plugin.vala"
		_g_free0 (_tmp29_);
#line 931 "file-op-plugin.c"
	}
#line 78 "file-op-plugin.vala"
	_g_object_unref0 (f2);
#line 78 "file-op-plugin.vala"
	_g_free0 (newpath);
#line 78 "file-op-plugin.vala"
	_g_object_unref0 (f);
#line 939 "file-op-plugin.c"
}

static gboolean
synapse_file_op_plugin_rename_to_real_needs_target (SynapseMatch* base)
{
	SynapseFileOpPluginRenameTo * self;
	gboolean result;
#line 105 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRenameTo*) base;
#line 107 "file-op-plugin.vala"
	result = TRUE;
#line 107 "file-op-plugin.vala"
	return result;
#line 953 "file-op-plugin.c"
}

static SynapseQueryFlags
synapse_file_op_plugin_rename_to_real_target_flags (SynapseMatch* base)
{
	SynapseFileOpPluginRenameTo * self;
	SynapseQueryFlags result;
#line 110 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRenameTo*) base;
#line 112 "file-op-plugin.vala"
	result = SYNAPSE_QUERY_FLAGS_TEXT;
#line 112 "file-op-plugin.vala"
	return result;
#line 967 "file-op-plugin.c"
}

static gboolean
synapse_file_op_plugin_rename_to_real_valid_for_match (SynapseAction* base,
                                                       SynapseMatch* match)
{
	SynapseFileOpPluginRenameTo * self;
	gboolean _tmp0_ = FALSE;
	gboolean result;
#line 115 "file-op-plugin.vala"
	self = (SynapseFileOpPluginRenameTo*) base;
#line 115 "file-op-plugin.vala"
	g_return_val_if_fail (match != NULL, FALSE);
#line 117 "file-op-plugin.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (match, SYNAPSE_TYPE_URI_MATCH)) {
#line 983 "file-op-plugin.c"
		SynapseQueryFlags _tmp1_;
		SynapseQueryFlags _tmp2_;
#line 117 "file-op-plugin.vala"
		_tmp1_ = synapse_uri_match_get_file_type (G_TYPE_CHECK_INSTANCE_CAST (match, SYNAPSE_TYPE_URI_MATCH, SynapseUriMatch));
#line 117 "file-op-plugin.vala"
		_tmp2_ = _tmp1_;
#line 117 "file-op-plugin.vala"
		_tmp0_ = (_tmp2_ & SYNAPSE_QUERY_FLAGS_FILES) != 0;
#line 992 "file-op-plugin.c"
	} else {
#line 117 "file-op-plugin.vala"
		_tmp0_ = FALSE;
#line 996 "file-op-plugin.c"
	}
#line 117 "file-op-plugin.vala"
	result = _tmp0_;
#line 117 "file-op-plugin.vala"
	return result;
#line 1002 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_rename_to_class_init (SynapseFileOpPluginRenameToClass * klass,
                                             gpointer klass_data)
{
#line 68 "file-op-plugin.vala"
	synapse_file_op_plugin_rename_to_parent_class = g_type_class_peek_parent (klass);
#line 68 "file-op-plugin.vala"
	((SynapseActionClass *) klass)->do_execute = (void (*) (SynapseAction*, SynapseMatch*, SynapseMatch*)) synapse_file_op_plugin_rename_to_real_do_execute;
#line 68 "file-op-plugin.vala"
	((SynapseMatchClass *) klass)->needs_target = (gboolean (*) (SynapseMatch*)) synapse_file_op_plugin_rename_to_real_needs_target;
#line 68 "file-op-plugin.vala"
	((SynapseMatchClass *) klass)->target_flags = (SynapseQueryFlags (*) (SynapseMatch*)) synapse_file_op_plugin_rename_to_real_target_flags;
#line 68 "file-op-plugin.vala"
	((SynapseActionClass *) klass)->valid_for_match = (gboolean (*) (SynapseAction*, SynapseMatch*)) synapse_file_op_plugin_rename_to_real_valid_for_match;
#line 1019 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_rename_to_instance_init (SynapseFileOpPluginRenameTo * self,
                                                gpointer klass)
{
}

static GType
synapse_file_op_plugin_rename_to_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseFileOpPluginRenameToClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_file_op_plugin_rename_to_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseFileOpPluginRenameTo), 0, (GInstanceInitFunc) synapse_file_op_plugin_rename_to_instance_init, NULL };
	GType synapse_file_op_plugin_rename_to_type_id;
	synapse_file_op_plugin_rename_to_type_id = g_type_register_static (SYNAPSE_TYPE_ACTION, "SynapseFileOpPluginRenameTo", &g_define_type_info, 0);
	return synapse_file_op_plugin_rename_to_type_id;
}

static GType
synapse_file_op_plugin_rename_to_get_type (void)
{
	static volatile gsize synapse_file_op_plugin_rename_to_type_id__once = 0;
	if (g_once_init_enter (&synapse_file_op_plugin_rename_to_type_id__once)) {
		GType synapse_file_op_plugin_rename_to_type_id;
		synapse_file_op_plugin_rename_to_type_id = synapse_file_op_plugin_rename_to_get_type_once ();
		g_once_init_leave (&synapse_file_op_plugin_rename_to_type_id__once, synapse_file_op_plugin_rename_to_type_id);
	}
	return synapse_file_op_plugin_rename_to_type_id__once;
}

static GObject *
synapse_file_op_plugin_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseFileOpPlugin * self;
	GeeArrayList* _tmp0_;
	GeeList* _tmp1_;
	SynapseFileOpPluginRemove* _tmp2_;
	SynapseFileOpPluginRemove* _tmp3_;
	GeeList* _tmp4_;
	SynapseFileOpPluginRenameTo* _tmp5_;
	SynapseFileOpPluginRenameTo* _tmp6_;
#line 139 "file-op-plugin.vala"
	parent_class = G_OBJECT_CLASS (synapse_file_op_plugin_parent_class);
#line 139 "file-op-plugin.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 139 "file-op-plugin.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_FILE_OP_PLUGIN, SynapseFileOpPlugin);
#line 141 "file-op-plugin.vala"
	_tmp0_ = gee_array_list_new (SYNAPSE_TYPE_ACTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 141 "file-op-plugin.vala"
	_g_object_unref0 (self->priv->actions);
#line 141 "file-op-plugin.vala"
	self->priv->actions = (GeeList*) _tmp0_;
#line 143 "file-op-plugin.vala"
	_tmp1_ = self->priv->actions;
#line 143 "file-op-plugin.vala"
	_tmp2_ = synapse_file_op_plugin_remove_new ();
#line 143 "file-op-plugin.vala"
	_tmp3_ = _tmp2_;
#line 143 "file-op-plugin.vala"
	gee_collection_add ((GeeCollection*) _tmp1_, (SynapseAction*) _tmp3_);
#line 143 "file-op-plugin.vala"
	_g_object_unref0 (_tmp3_);
#line 144 "file-op-plugin.vala"
	_tmp4_ = self->priv->actions;
#line 144 "file-op-plugin.vala"
	_tmp5_ = synapse_file_op_plugin_rename_to_new ();
#line 144 "file-op-plugin.vala"
	_tmp6_ = _tmp5_;
#line 144 "file-op-plugin.vala"
	gee_collection_add ((GeeCollection*) _tmp4_, (SynapseAction*) _tmp6_);
#line 144 "file-op-plugin.vala"
	_g_object_unref0 (_tmp6_);
#line 139 "file-op-plugin.vala"
	return obj;
#line 1098 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_class_init (SynapseFileOpPluginClass * klass,
                                   gpointer klass_data)
{
#line 24 "file-op-plugin.vala"
	synapse_file_op_plugin_parent_class = g_type_class_peek_parent (klass);
#line 24 "file-op-plugin.vala"
	g_type_class_adjust_private_offset (klass, &SynapseFileOpPlugin_private_offset);
#line 24 "file-op-plugin.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_synapse_file_op_plugin_get_property;
#line 24 "file-op-plugin.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_synapse_file_op_plugin_set_property;
#line 24 "file-op-plugin.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_file_op_plugin_constructor;
#line 24 "file-op-plugin.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_file_op_plugin_finalize;
#line 24 "file-op-plugin.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY, synapse_file_op_plugin_properties[SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY] = g_param_spec_boolean ("enabled", "enabled", "enabled", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 134 "file-op-plugin.vala"
	synapse_file_op_plugin_register_plugin ();
#line 1121 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_synapse_activatable_interface_init (SynapseActivatableIface * iface,
                                                           gpointer iface_data)
{
#line 24 "file-op-plugin.vala"
	synapse_file_op_plugin_synapse_activatable_parent_iface = g_type_interface_peek_parent (iface);
#line 24 "file-op-plugin.vala"
	iface->activate = (void (*) (SynapseActivatable*)) synapse_file_op_plugin_real_activate;
#line 24 "file-op-plugin.vala"
	iface->deactivate = (void (*) (SynapseActivatable*)) synapse_file_op_plugin_real_deactivate;
#line 24 "file-op-plugin.vala"
	iface->get_enabled = synapse_file_op_plugin_real_get_enabled;
#line 24 "file-op-plugin.vala"
	iface->set_enabled = synapse_file_op_plugin_real_set_enabled;
#line 1138 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_synapse_action_provider_interface_init (SynapseActionProviderIface * iface,
                                                               gpointer iface_data)
{
#line 24 "file-op-plugin.vala"
	synapse_file_op_plugin_synapse_action_provider_parent_iface = g_type_interface_peek_parent (iface);
#line 24 "file-op-plugin.vala"
	iface->find_for_match = (SynapseResultSet* (*) (SynapseActionProvider*, SynapseQuery*, SynapseMatch*)) synapse_file_op_plugin_real_find_for_match;
#line 1149 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_instance_init (SynapseFileOpPlugin * self,
                                      gpointer klass)
{
#line 24 "file-op-plugin.vala"
	self->priv = synapse_file_op_plugin_get_instance_private (self);
#line 26 "file-op-plugin.vala"
	self->priv->_enabled = TRUE;
#line 1160 "file-op-plugin.c"
}

static void
synapse_file_op_plugin_finalize (GObject * obj)
{
	SynapseFileOpPlugin * self;
#line 24 "file-op-plugin.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_FILE_OP_PLUGIN, SynapseFileOpPlugin);
#line 137 "file-op-plugin.vala"
	_g_object_unref0 (self->priv->actions);
#line 24 "file-op-plugin.vala"
	G_OBJECT_CLASS (synapse_file_op_plugin_parent_class)->finalize (obj);
#line 1173 "file-op-plugin.c"
}

static GType
synapse_file_op_plugin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseFileOpPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_file_op_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseFileOpPlugin), 0, (GInstanceInitFunc) synapse_file_op_plugin_instance_init, NULL };
	static const GInterfaceInfo synapse_activatable_info = { (GInterfaceInitFunc) synapse_file_op_plugin_synapse_activatable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo synapse_action_provider_info = { (GInterfaceInitFunc) synapse_file_op_plugin_synapse_action_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType synapse_file_op_plugin_type_id;
	synapse_file_op_plugin_type_id = g_type_register_static (G_TYPE_OBJECT, "SynapseFileOpPlugin", &g_define_type_info, 0);
	g_type_add_interface_static (synapse_file_op_plugin_type_id, SYNAPSE_TYPE_ACTIVATABLE, &synapse_activatable_info);
	g_type_add_interface_static (synapse_file_op_plugin_type_id, SYNAPSE_TYPE_ACTION_PROVIDER, &synapse_action_provider_info);
	SynapseFileOpPlugin_private_offset = g_type_add_instance_private (synapse_file_op_plugin_type_id, sizeof (SynapseFileOpPluginPrivate));
	return synapse_file_op_plugin_type_id;
}

GType
synapse_file_op_plugin_get_type (void)
{
	static volatile gsize synapse_file_op_plugin_type_id__once = 0;
	if (g_once_init_enter (&synapse_file_op_plugin_type_id__once)) {
		GType synapse_file_op_plugin_type_id;
		synapse_file_op_plugin_type_id = synapse_file_op_plugin_get_type_once ();
		g_once_init_leave (&synapse_file_op_plugin_type_id__once, synapse_file_op_plugin_type_id);
	}
	return synapse_file_op_plugin_type_id__once;
}

static void
_vala_synapse_file_op_plugin_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	SynapseFileOpPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_TYPE_FILE_OP_PLUGIN, SynapseFileOpPlugin);
#line 24 "file-op-plugin.vala"
	switch (property_id) {
#line 24 "file-op-plugin.vala"
		case SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY:
#line 24 "file-op-plugin.vala"
		g_value_set_boolean (value, synapse_activatable_get_enabled ((SynapseActivatable*) self));
#line 24 "file-op-plugin.vala"
		break;
#line 1218 "file-op-plugin.c"
		default:
#line 24 "file-op-plugin.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "file-op-plugin.vala"
		break;
#line 1224 "file-op-plugin.c"
	}
}

static void
_vala_synapse_file_op_plugin_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	SynapseFileOpPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_TYPE_FILE_OP_PLUGIN, SynapseFileOpPlugin);
#line 24 "file-op-plugin.vala"
	switch (property_id) {
#line 24 "file-op-plugin.vala"
		case SYNAPSE_FILE_OP_PLUGIN_ENABLED_PROPERTY:
#line 24 "file-op-plugin.vala"
		synapse_activatable_set_enabled ((SynapseActivatable*) self, g_value_get_boolean (value));
#line 24 "file-op-plugin.vala"
		break;
#line 1244 "file-op-plugin.c"
		default:
#line 24 "file-op-plugin.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 24 "file-op-plugin.vala"
		break;
#line 1250 "file-op-plugin.c"
	}
}

