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

/*
* Copyright (c) 2016 Felipe Escoto (https://github.com/Philip-Scott/Notes-up)
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authored by: Felipe Escoto <felescoto95@hotmail.com>
*/

#include <glib-object.h>
#include <glib.h>
#include <gee.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 ENOTES_TYPE_PLUGIN_MANAGER (enotes_plugin_manager_get_type ())
#define ENOTES_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_PLUGIN_MANAGER, ENotesPluginManager))
#define ENOTES_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_PLUGIN_MANAGER, ENotesPluginManagerClass))
#define ENOTES_IS_PLUGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_PLUGIN_MANAGER))
#define ENOTES_IS_PLUGIN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_PLUGIN_MANAGER))
#define ENOTES_PLUGIN_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_PLUGIN_MANAGER, ENotesPluginManagerClass))

typedef struct _ENotesPluginManager ENotesPluginManager;
typedef struct _ENotesPluginManagerClass ENotesPluginManagerClass;
typedef struct _ENotesPluginManagerPrivate ENotesPluginManagerPrivate;

#define ENOTES_TYPE_PLUGIN (enotes_plugin_get_type ())
#define ENOTES_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_PLUGIN, ENotesPlugin))
#define ENOTES_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_PLUGIN, ENotesPluginClass))
#define ENOTES_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_PLUGIN))
#define ENOTES_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_PLUGIN))
#define ENOTES_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_PLUGIN, ENotesPluginClass))

typedef struct _ENotesPlugin ENotesPlugin;
typedef struct _ENotesPluginClass ENotesPluginClass;
enum  {
	ENOTES_PLUGIN_MANAGER_0_PROPERTY,
	ENOTES_PLUGIN_MANAGER_NUM_PROPERTIES
};
static GParamSpec* enotes_plugin_manager_properties[ENOTES_PLUGIN_MANAGER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ENOTES_TYPE_COLOR (enotes_color_get_type ())
#define ENOTES_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_COLOR, ENotesColor))
#define ENOTES_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_COLOR, ENotesColorClass))
#define ENOTES_IS_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_COLOR))
#define ENOTES_IS_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_COLOR))
#define ENOTES_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_COLOR, ENotesColorClass))

typedef struct _ENotesColor ENotesColor;
typedef struct _ENotesColorClass ENotesColorClass;

#define ENOTES_TYPE_YOUTUBE (enotes_youtube_get_type ())
#define ENOTES_YOUTUBE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_YOUTUBE, ENotesYoutube))
#define ENOTES_YOUTUBE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_YOUTUBE, ENotesYoutubeClass))
#define ENOTES_IS_YOUTUBE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_YOUTUBE))
#define ENOTES_IS_YOUTUBE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_YOUTUBE))
#define ENOTES_YOUTUBE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_YOUTUBE, ENotesYoutubeClass))

typedef struct _ENotesYoutube ENotesYoutube;
typedef struct _ENotesYoutubeClass ENotesYoutubeClass;

#define ENOTES_TYPE_BREAK (enotes_break_get_type ())
#define ENOTES_BREAK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_BREAK, ENotesBreak))
#define ENOTES_BREAK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_BREAK, ENotesBreakClass))
#define ENOTES_IS_BREAK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_BREAK))
#define ENOTES_IS_BREAK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_BREAK))
#define ENOTES_BREAK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_BREAK, ENotesBreakClass))

typedef struct _ENotesBreak ENotesBreak;
typedef struct _ENotesBreakClass ENotesBreakClass;

#define ENOTES_TYPE_HIGHLIGHT (enotes_highlight_get_type ())
#define ENOTES_HIGHLIGHT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_HIGHLIGHT, ENotesHighlight))
#define ENOTES_HIGHLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_HIGHLIGHT, ENotesHighlightClass))
#define ENOTES_IS_HIGHLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_HIGHLIGHT))
#define ENOTES_IS_HIGHLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_HIGHLIGHT))
#define ENOTES_HIGHLIGHT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_HIGHLIGHT, ENotesHighlightClass))

typedef struct _ENotesHighlight ENotesHighlight;
typedef struct _ENotesHighlightClass ENotesHighlightClass;

#define ENOTES_TYPE_IMAGE_PLUGIN (enotes_image_plugin_get_type ())
#define ENOTES_IMAGE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_IMAGE_PLUGIN, ENotesImagePlugin))
#define ENOTES_IMAGE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_IMAGE_PLUGIN, ENotesImagePluginClass))
#define ENOTES_IS_IMAGE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_IMAGE_PLUGIN))
#define ENOTES_IS_IMAGE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_IMAGE_PLUGIN))
#define ENOTES_IMAGE_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_IMAGE_PLUGIN, ENotesImagePluginClass))

typedef struct _ENotesImagePlugin ENotesImagePlugin;
typedef struct _ENotesImagePluginClass ENotesImagePluginClass;

#define ENOTES_TYPE_PAGE_LINK (enotes_page_link_get_type ())
#define ENOTES_PAGE_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENOTES_TYPE_PAGE_LINK, ENotesPageLink))
#define ENOTES_PAGE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENOTES_TYPE_PAGE_LINK, ENotesPageLinkClass))
#define ENOTES_IS_PAGE_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENOTES_TYPE_PAGE_LINK))
#define ENOTES_IS_PAGE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ENOTES_TYPE_PAGE_LINK))
#define ENOTES_PAGE_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ENOTES_TYPE_PAGE_LINK, ENotesPageLinkClass))

typedef struct _ENotesPageLink ENotesPageLink;
typedef struct _ENotesPageLinkClass ENotesPageLinkClass;

#define TYPE_BL_MEMBER (bl_member_get_type ())
#define BL_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BL_MEMBER, BLMember))
#define BL_MEMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BL_MEMBER, BLMemberClass))
#define IS_BL_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BL_MEMBER))
#define IS_BL_MEMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BL_MEMBER))
#define BL_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BL_MEMBER, BLMemberClass))

typedef struct _BLMember BLMember;
typedef struct _BLMemberClass BLMemberClass;
#define _bl_member_unref0(var) ((var == NULL) ? NULL : (var = (bl_member_unref (var), NULL)))

struct _ENotesPluginManager {
	GObject parent_instance;
	ENotesPluginManagerPrivate * priv;
};

struct _ENotesPluginManagerClass {
	GObjectClass parent_class;
};

struct _ENotesPluginManagerPrivate {
	ENotesPlugin** plug_list;
	gint plug_list_length1;
	gint _plug_list_size_;
};

static gint ENotesPluginManager_private_offset;
static gpointer enotes_plugin_manager_parent_class = NULL;
static ENotesPluginManager* enotes_plugin_manager_instance;
static ENotesPluginManager* enotes_plugin_manager_instance = NULL;

VALA_EXTERN GType enotes_plugin_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPluginManager, g_object_unref)
VALA_EXTERN GType enotes_plugin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPlugin, g_object_unref)
static ENotesPluginManager* enotes_plugin_manager_new (void);
static ENotesPluginManager* enotes_plugin_manager_construct (GType object_type);
VALA_EXTERN ENotesPluginManager* enotes_plugin_manager_get_instance (void);
static void enotes_plugin_manager_load_plugins (ENotesPluginManager* self);
VALA_EXTERN ENotesColor* enotes_color_new (void);
VALA_EXTERN ENotesColor* enotes_color_construct (GType object_type);
VALA_EXTERN GType enotes_color_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesColor, g_object_unref)
static void _vala_array_add5 (ENotesPlugin** * array,
                       gint* length,
                       gint* size,
                       ENotesPlugin* value);
VALA_EXTERN ENotesYoutube* enotes_youtube_new (void);
VALA_EXTERN ENotesYoutube* enotes_youtube_construct (GType object_type);
VALA_EXTERN GType enotes_youtube_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesYoutube, g_object_unref)
static void _vala_array_add6 (ENotesPlugin** * array,
                       gint* length,
                       gint* size,
                       ENotesPlugin* value);
VALA_EXTERN ENotesBreak* enotes_break_new (void);
VALA_EXTERN ENotesBreak* enotes_break_construct (GType object_type);
VALA_EXTERN GType enotes_break_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesBreak, g_object_unref)
static void _vala_array_add7 (ENotesPlugin** * array,
                       gint* length,
                       gint* size,
                       ENotesPlugin* value);
VALA_EXTERN ENotesHighlight* enotes_highlight_new (void);
VALA_EXTERN ENotesHighlight* enotes_highlight_construct (GType object_type);
VALA_EXTERN GType enotes_highlight_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesHighlight, g_object_unref)
static void _vala_array_add8 (ENotesPlugin** * array,
                       gint* length,
                       gint* size,
                       ENotesPlugin* value);
VALA_EXTERN ENotesImagePlugin* enotes_image_plugin_new (void);
VALA_EXTERN ENotesImagePlugin* enotes_image_plugin_construct (GType object_type);
VALA_EXTERN GType enotes_image_plugin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesImagePlugin, g_object_unref)
static void _vala_array_add9 (ENotesPlugin** * array,
                       gint* length,
                       gint* size,
                       ENotesPlugin* value);
VALA_EXTERN ENotesPageLink* enotes_page_link_new (void);
VALA_EXTERN ENotesPageLink* enotes_page_link_construct (GType object_type);
VALA_EXTERN GType enotes_page_link_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ENotesPageLink, g_object_unref)
static void _vala_array_add10 (ENotesPlugin** * array,
                        gint* length,
                        gint* size,
                        ENotesPlugin* value);
VALA_EXTERN ENotesPlugin** enotes_plugin_manager_get_plugs (ENotesPluginManager* self,
                                                gint* result_length1);
VALA_EXTERN gpointer bl_member_ref (gpointer instance);
VALA_EXTERN void bl_member_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_bl_member (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_bl_member (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_bl_member (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_bl_member (const GValue* value);
VALA_EXTERN GType bl_member_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BLMember, bl_member_unref)
VALA_EXTERN GeeList* enotes_plugin_manager_get_all_blacklist_members (ENotesPluginManager* self);
VALA_EXTERN GeeList* enotes_plugin_get_blacklist_members (ENotesPlugin* self);
static void enotes_plugin_manager_finalize (GObject * obj);
static GType enotes_plugin_manager_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 _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
enotes_plugin_manager_get_instance_private (ENotesPluginManager* self)
{
	return G_STRUCT_MEMBER_P (self, ENotesPluginManager_private_offset);
}

static ENotesPluginManager*
enotes_plugin_manager_construct (GType object_type)
{
	ENotesPluginManager * self = NULL;
	self = (ENotesPluginManager*) g_object_new (object_type, NULL);
	return self;
}

static ENotesPluginManager*
enotes_plugin_manager_new (void)
{
	return enotes_plugin_manager_construct (ENOTES_TYPE_PLUGIN_MANAGER);
}

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

ENotesPluginManager*
enotes_plugin_manager_get_instance (void)
{
	ENotesPluginManager* _tmp0_;
	ENotesPluginManager* _tmp3_;
	ENotesPluginManager* _tmp4_;
	ENotesPluginManager* result;
	_tmp0_ = enotes_plugin_manager_instance;
	if (_tmp0_ == NULL) {
		ENotesPluginManager* _tmp1_;
		ENotesPluginManager* _tmp2_;
		_tmp1_ = enotes_plugin_manager_new ();
		_g_object_unref0 (enotes_plugin_manager_instance);
		enotes_plugin_manager_instance = _tmp1_;
		_tmp2_ = enotes_plugin_manager_instance;
		enotes_plugin_manager_load_plugins (_tmp2_);
	}
	_tmp3_ = enotes_plugin_manager_instance;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	result = _tmp4_;
	return result;
}

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

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

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

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

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

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

static void
enotes_plugin_manager_load_plugins (ENotesPluginManager* self)
{
	ENotesColor* _tmp0_;
	ENotesYoutube* _tmp1_;
	ENotesBreak* _tmp2_;
	ENotesHighlight* _tmp3_;
	ENotesImagePlugin* _tmp4_;
	ENotesPageLink* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = enotes_color_new ();
	_vala_array_add5 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp0_);
	_tmp1_ = enotes_youtube_new ();
	_vala_array_add6 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp1_);
	_tmp2_ = enotes_break_new ();
	_vala_array_add7 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp2_);
	_tmp3_ = enotes_highlight_new ();
	_vala_array_add8 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp3_);
	_tmp4_ = enotes_image_plugin_new ();
	_vala_array_add9 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp4_);
	_tmp5_ = enotes_page_link_new ();
	_vala_array_add10 (&self->priv->plug_list, &self->priv->plug_list_length1, &self->priv->_plug_list_size_, (ENotesPlugin*) _tmp5_);
}

ENotesPlugin**
enotes_plugin_manager_get_plugs (ENotesPluginManager* self,
                                 gint* result_length1)
{
	ENotesPlugin** _tmp0_;
	gint _tmp0__length1;
	ENotesPlugin** _tmp1_;
	gint _tmp1__length1;
	ENotesPlugin** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->plug_list;
	_tmp0__length1 = self->priv->plug_list_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

GeeList*
enotes_plugin_manager_get_all_blacklist_members (ENotesPluginManager* self)
{
	GeeLinkedList* _result_ = NULL;
	GeeLinkedList* _tmp0_;
	ENotesPlugin** _tmp1_;
	gint _tmp1__length1;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_linked_list_new (TYPE_BL_MEMBER, (GBoxedCopyFunc) bl_member_ref, (GDestroyNotify) bl_member_unref, NULL, NULL, NULL);
	_result_ = _tmp0_;
	_tmp1_ = self->priv->plug_list;
	_tmp1__length1 = self->priv->plug_list_length1;
	{
		ENotesPlugin** plugin_collection = NULL;
		gint plugin_collection_length1 = 0;
		gint _plugin_collection_size_ = 0;
		gint plugin_it = 0;
		plugin_collection = _tmp1_;
		plugin_collection_length1 = _tmp1__length1;
		for (plugin_it = 0; plugin_it < plugin_collection_length1; plugin_it = plugin_it + 1) {
			ENotesPlugin* _tmp2_;
			ENotesPlugin* plugin = NULL;
			_tmp2_ = _g_object_ref0 (plugin_collection[plugin_it]);
			plugin = _tmp2_;
			{
				ENotesPlugin* _tmp3_;
				GeeList* _tmp4_;
				GeeList* _tmp5_;
				gboolean _tmp6_;
				_tmp3_ = plugin;
				_tmp4_ = enotes_plugin_get_blacklist_members (_tmp3_);
				_tmp5_ = _tmp4_;
				_tmp6_ = _tmp5_ != NULL;
				_g_object_unref0 (_tmp5_);
				if (_tmp6_) {
					{
						GeeList* _blacklist_member_list = NULL;
						ENotesPlugin* _tmp7_;
						GeeList* _tmp8_;
						gint _blacklist_member_size = 0;
						GeeList* _tmp9_;
						gint _tmp10_;
						gint _tmp11_;
						gint _blacklist_member_index = 0;
						_tmp7_ = plugin;
						_tmp8_ = enotes_plugin_get_blacklist_members (_tmp7_);
						_blacklist_member_list = _tmp8_;
						_tmp9_ = _blacklist_member_list;
						_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
						_tmp11_ = _tmp10_;
						_blacklist_member_size = _tmp11_;
						_blacklist_member_index = -1;
						while (TRUE) {
							gint _tmp12_;
							gint _tmp13_;
							BLMember* blacklist_member = NULL;
							GeeList* _tmp14_;
							gpointer _tmp15_;
							GeeLinkedList* _tmp16_;
							BLMember* _tmp17_;
							_blacklist_member_index = _blacklist_member_index + 1;
							_tmp12_ = _blacklist_member_index;
							_tmp13_ = _blacklist_member_size;
							if (!(_tmp12_ < _tmp13_)) {
								break;
							}
							_tmp14_ = _blacklist_member_list;
							_tmp15_ = gee_list_get (_tmp14_, _blacklist_member_index);
							blacklist_member = (BLMember*) _tmp15_;
							_tmp16_ = _result_;
							_tmp17_ = blacklist_member;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp17_);
							_bl_member_unref0 (blacklist_member);
						}
						_g_object_unref0 (_blacklist_member_list);
					}
				}
				_g_object_unref0 (plugin);
			}
		}
	}
	result = (GeeList*) _result_;
	return result;
}

static void
enotes_plugin_manager_class_init (ENotesPluginManagerClass * klass,
                                  gpointer klass_data)
{
	enotes_plugin_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ENotesPluginManager_private_offset);
	G_OBJECT_CLASS (klass)->finalize = enotes_plugin_manager_finalize;
}

static void
enotes_plugin_manager_instance_init (ENotesPluginManager * self,
                                     gpointer klass)
{
	ENotesPlugin** _tmp0_;
	self->priv = enotes_plugin_manager_get_instance_private (self);
	_tmp0_ = g_new0 (ENotesPlugin*, 0 + 1);
	self->priv->plug_list = _tmp0_;
	self->priv->plug_list_length1 = 0;
	self->priv->_plug_list_size_ = self->priv->plug_list_length1;
}

static void
enotes_plugin_manager_finalize (GObject * obj)
{
	ENotesPluginManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ENOTES_TYPE_PLUGIN_MANAGER, ENotesPluginManager);
	self->priv->plug_list = (_vala_array_free (self->priv->plug_list, self->priv->plug_list_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (enotes_plugin_manager_parent_class)->finalize (obj);
}

static GType
enotes_plugin_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ENotesPluginManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enotes_plugin_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ENotesPluginManager), 0, (GInstanceInitFunc) enotes_plugin_manager_instance_init, NULL };
	GType enotes_plugin_manager_type_id;
	enotes_plugin_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "ENotesPluginManager", &g_define_type_info, 0);
	ENotesPluginManager_private_offset = g_type_add_instance_private (enotes_plugin_manager_type_id, sizeof (ENotesPluginManagerPrivate));
	return enotes_plugin_manager_type_id;
}

GType
enotes_plugin_manager_get_type (void)
{
	static volatile gsize enotes_plugin_manager_type_id__once = 0;
	if (g_once_init_enter (&enotes_plugin_manager_type_id__once)) {
		GType enotes_plugin_manager_type_id;
		enotes_plugin_manager_type_id = enotes_plugin_manager_get_type_once ();
		g_once_init_leave (&enotes_plugin_manager_type_id__once, enotes_plugin_manager_type_id);
	}
	return enotes_plugin_manager_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);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

