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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * 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 3 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 Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include "planify.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gee.h>
#include <glib-object.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  {
	OBJECTS_BASE_OBJECT_0_PROPERTY,
	OBJECTS_BASE_OBJECT_ID_PROPERTY,
	OBJECTS_BASE_OBJECT_NAME_PROPERTY,
	OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY,
	OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY,
	OBJECTS_BASE_OBJECT_COLOR_PROPERTY,
	OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY,
	OBJECTS_BASE_OBJECT_ID_STRING_PROPERTY,
	OBJECTS_BASE_OBJECT_LOADING_PROPERTY,
	OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY,
	OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY,
	OBJECTS_BASE_OBJECT_TYPE_DELETE_PROPERTY,
	OBJECTS_BASE_OBJECT_TYPE_ADD_PROPERTY,
	OBJECTS_BASE_OBJECT_TYPE_UPDATE_PROPERTY,
	OBJECTS_BASE_OBJECT_OBJECT_TYPE_PROPERTY,
	OBJECTS_BASE_OBJECT_OBJECT_TYPE_STRING_PROPERTY,
	OBJECTS_BASE_OBJECT_TABLE_NAME_PROPERTY,
	OBJECTS_BASE_OBJECT_COLUMN_ORDER_NAME_PROPERTY,
	OBJECTS_BASE_OBJECT_SOURCE_PROPERTY,
	OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY,
	OBJECTS_BASE_OBJECT_PERCENTAGE_PROPERTY,
	OBJECTS_BASE_OBJECT_NUM_PROPERTIES
};
static GParamSpec* objects_base_object_properties[OBJECTS_BASE_OBJECT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	OBJECTS_BASE_OBJECT_DELETED_SIGNAL,
	OBJECTS_BASE_OBJECT_UPDATED_SIGNAL,
	OBJECTS_BASE_OBJECT_ARCHIVED_SIGNAL,
	OBJECTS_BASE_OBJECT_UNARCHIVED_SIGNAL,
	OBJECTS_BASE_OBJECT_FILTER_ADDED_SIGNAL,
	OBJECTS_BASE_OBJECT_FILTER_REMOVED_SIGNAL,
	OBJECTS_BASE_OBJECT_FILTER_UPDATED_SIGNAL,
	OBJECTS_BASE_OBJECT_HANDLE_SCROLL_VISIBILITY_CHANGE_SIGNAL,
	OBJECTS_BASE_OBJECT_LOADING_CHANGE_SIGNAL,
	OBJECTS_BASE_OBJECT_SENSITIVE_CHANGE_SIGNAL,
	OBJECTS_BASE_OBJECT_COUNT_UPDATED_SIGNAL,
	OBJECTS_BASE_OBJECT_NUM_SIGNALS
};
static guint objects_base_object_signals[OBJECTS_BASE_OBJECT_NUM_SIGNALS] = {0};

struct _ObjectsBaseObjectPrivate {
	gchar* _id;
	gchar* _name;
	gchar* _keywords;
	gchar* _icon_name;
	gchar* _color;
	guint _update_timeout_id;
	gchar* _id_string;
	gboolean _loading;
	gboolean _sensitive;
	gchar* _view_id;
	ObjectsSource* _source;
};

static gint ObjectsBaseObject_private_offset;
static gpointer objects_base_object_parent_class = NULL;

static gchar* objects_base_object_real_get_update_json (ObjectsBaseObject* self,
                                                 const gchar* uuid,
                                                 const gchar* temp_id);
static gchar* objects_base_object_real_get_add_json (ObjectsBaseObject* self,
                                              const gchar* temp_id,
                                              const gchar* uuid);
static gchar* objects_base_object_real_get_move_json (ObjectsBaseObject* self,
                                               const gchar* uuid,
                                               const gchar* new_project_id);
static gchar* objects_base_object_real_to_json (ObjectsBaseObject* self);
static gint objects_base_object_real_update_count (ObjectsBaseObject* self);
static gdouble objects_base_object_real_update_percentage (ObjectsBaseObject* self);
static void objects_base_object_real_count_update (ObjectsBaseObject* self);
static gchar* objects_base_object_real_theme_color (ObjectsBaseObject* self);
static gint* _int_dup (gint* self);
static gdouble* _double_dup (gdouble* self);
static void objects_base_object_finalize (GObject * obj);
static GType objects_base_object_get_type_once (void);
static void _vala_objects_base_object_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_objects_base_object_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
objects_base_object_get_instance_private (ObjectsBaseObject* self)
{
	return G_STRUCT_MEMBER_P (self, ObjectsBaseObject_private_offset);
}

static gchar*
objects_base_object_real_get_update_json (ObjectsBaseObject* self,
                                          const gchar* uuid,
                                          const gchar* temp_id)
{
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
objects_base_object_get_update_json (ObjectsBaseObject* self,
                                     const gchar* uuid,
                                     const gchar* temp_id)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->get_update_json) {
		return _klass_->get_update_json (self, uuid, temp_id);
	}
	return NULL;
}

static gchar*
objects_base_object_real_get_add_json (ObjectsBaseObject* self,
                                       const gchar* temp_id,
                                       const gchar* uuid)
{
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (temp_id != NULL, NULL);
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
objects_base_object_get_add_json (ObjectsBaseObject* self,
                                  const gchar* temp_id,
                                  const gchar* uuid)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->get_add_json) {
		return _klass_->get_add_json (self, temp_id, uuid);
	}
	return NULL;
}

static gchar*
objects_base_object_real_get_move_json (ObjectsBaseObject* self,
                                        const gchar* uuid,
                                        const gchar* new_project_id)
{
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (uuid != NULL, NULL);
	g_return_val_if_fail (new_project_id != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
objects_base_object_get_move_json (ObjectsBaseObject* self,
                                   const gchar* uuid,
                                   const gchar* new_project_id)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->get_move_json) {
		return _klass_->get_move_json (self, uuid, new_project_id);
	}
	return NULL;
}

static gchar*
objects_base_object_real_to_json (ObjectsBaseObject* self)
{
	gchar* _tmp0_;
	gchar* result;
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
objects_base_object_to_json (ObjectsBaseObject* self)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->to_json) {
		return _klass_->to_json (self);
	}
	return NULL;
}

void
objects_base_object_add_filter (ObjectsBaseObject* self,
                                ObjectsFiltersFilterItem* filter)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filter != NULL);
	_tmp0_ = self->filters;
	_tmp1_ = objects_filters_filter_item_get_id (filter);
	_tmp2_ = _tmp1_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		GeeHashMap* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gpointer _tmp9_;
		ObjectsFiltersFilterItem* _tmp10_;
		_tmp3_ = self->filters;
		_tmp4_ = objects_filters_filter_item_get_id (filter);
		_tmp5_ = _tmp4_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp5_, filter);
		_tmp6_ = self->filters;
		_tmp7_ = objects_filters_filter_item_get_id (filter);
		_tmp8_ = _tmp7_;
		_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp8_);
		_tmp10_ = (ObjectsFiltersFilterItem*) _tmp9_;
		g_signal_emit (self, objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_ADDED_SIGNAL], 0, _tmp10_);
		_g_object_unref0 (_tmp10_);
	}
}

void
objects_base_object_remove_filter (ObjectsBaseObject* self,
                                   ObjectsFiltersFilterItem* filter)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filter != NULL);
	_tmp0_ = self->filters;
	_tmp1_ = objects_filters_filter_item_get_id (filter);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->filters;
		_tmp4_ = objects_filters_filter_item_get_id (filter);
		_tmp5_ = _tmp4_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp3_, _tmp5_, NULL);
		g_signal_emit (self, objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_REMOVED_SIGNAL], 0, filter);
	}
}

void
objects_base_object_update_filter (ObjectsBaseObject* self,
                                   ObjectsFiltersFilterItem* filter)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filter != NULL);
	_tmp0_ = self->filters;
	_tmp1_ = objects_filters_filter_item_get_id (filter);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->filters;
		_tmp4_ = objects_filters_filter_item_get_id (filter);
		_tmp5_ = _tmp4_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp5_, filter);
		g_signal_emit (self, objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_UPDATED_SIGNAL], 0, filter);
	}
}

ObjectsFiltersFilterItem*
objects_base_object_get_filter (ObjectsBaseObject* self,
                                const gchar* id)
{
	GeeHashMap* _tmp0_;
	ObjectsFiltersFilterItem* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	_tmp0_ = self->filters;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, id)) {
		GeeHashMap* _tmp1_;
		gpointer _tmp2_;
		_tmp1_ = self->filters;
		_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, id);
		result = (ObjectsFiltersFilterItem*) _tmp2_;
		return result;
	}
	result = NULL;
	return result;
}

static gint
objects_base_object_real_update_count (ObjectsBaseObject* self)
{
	gint result;
	result = 0;
	return result;
}

gint
objects_base_object_update_count (ObjectsBaseObject* self)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, -1);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->update_count) {
		return _klass_->update_count (self);
	}
	return -1;
}

static gdouble
objects_base_object_real_update_percentage (ObjectsBaseObject* self)
{
	gdouble result;
	result = 0.0;
	return result;
}

gdouble
objects_base_object_update_percentage (ObjectsBaseObject* self)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, -1.0);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->update_percentage) {
		return _klass_->update_percentage (self);
	}
	return -1.0;
}

static void
objects_base_object_real_count_update (ObjectsBaseObject* self)
{
}

void
objects_base_object_count_update (ObjectsBaseObject* self)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->count_update) {
		_klass_->count_update (self);
	}
}

static gchar*
objects_base_object_real_theme_color (ObjectsBaseObject* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	_tmp0_ = self->priv->_color;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
objects_base_object_theme_color (ObjectsBaseObject* self)
{
	ObjectsBaseObjectClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = OBJECTS_BASE_OBJECT_GET_CLASS (self);
	if (_klass_->theme_color) {
		return _klass_->theme_color (self);
	}
	return NULL;
}

ObjectsBaseObject*
objects_base_object_construct (GType object_type)
{
	ObjectsBaseObject * self = NULL;
	self = (ObjectsBaseObject*) g_object_new (object_type, NULL);
	return self;
}

ObjectsBaseObject*
objects_base_object_new (void)
{
	return objects_base_object_construct (OBJECTS_TYPE_BASE_OBJECT);
}

const gchar*
objects_base_object_get_id (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_id (ObjectsBaseObject* self,
                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_ID_PROPERTY]);
	}
}

const gchar*
objects_base_object_get_name (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_name (ObjectsBaseObject* self,
                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_NAME_PROPERTY]);
	}
}

const gchar*
objects_base_object_get_keywords (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_keywords;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_keywords (ObjectsBaseObject* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_keywords (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_keywords);
		self->priv->_keywords = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY]);
	}
}

const gchar*
objects_base_object_get_icon_name (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon_name;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_icon_name (ObjectsBaseObject* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_icon_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon_name);
		self->priv->_icon_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY]);
	}
}

const gchar*
objects_base_object_get_color (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_color;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_color (ObjectsBaseObject* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_color (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_color);
		self->priv->_color = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_COLOR_PROPERTY]);
	}
}

guint
objects_base_object_get_update_timeout_id (ObjectsBaseObject* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_update_timeout_id;
	return result;
}

void
objects_base_object_set_update_timeout_id (ObjectsBaseObject* self,
                                           guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_update_timeout_id (self);
	if (old_value != value) {
		self->priv->_update_timeout_id = value;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY]);
	}
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

const gchar*
objects_base_object_get_id_string (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->priv->_id_string);
	self->priv->_id_string = _tmp2_;
	_tmp3_ = self->priv->_id_string;
	result = _tmp3_;
	return result;
}

gboolean
objects_base_object_get_loading (ObjectsBaseObject* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_loading;
	return result;
}

void
objects_base_object_set_loading (ObjectsBaseObject* self,
                                 gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_loading = value;
	g_signal_emit (self, objects_base_object_signals[OBJECTS_BASE_OBJECT_LOADING_CHANGE_SIGNAL], 0);
	g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_LOADING_PROPERTY]);
}

gboolean
objects_base_object_get_sensitive (ObjectsBaseObject* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_sensitive;
	return result;
}

void
objects_base_object_set_sensitive (ObjectsBaseObject* self,
                                   gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_sensitive = value;
	g_signal_emit (self, objects_base_object_signals[OBJECTS_BASE_OBJECT_SENSITIVE_CHANGE_SIGNAL], 0);
	g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY]);
}

const gchar*
objects_base_object_get_view_id (ObjectsBaseObject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_view_id;
	result = _tmp0_;
	return result;
}

void
objects_base_object_set_view_id (ObjectsBaseObject* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = objects_base_object_get_view_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_view_id);
		self->priv->_view_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY]);
	}
}

const gchar*
objects_base_object_get_type_delete (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_ITEM (self)) {
		result = "item_delete";
		return result;
	} else {
		if (OBJECTS_IS_PROJECT (self)) {
			result = "project_delete";
			return result;
		} else {
			if (OBJECTS_IS_SECTION (self)) {
				result = "section_delete";
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = "label_delete";
					return result;
				} else {
					if (OBJECTS_IS_REMINDER (self)) {
						result = "reminder_delete";
						return result;
					} else {
						result = "";
						return result;
					}
				}
			}
		}
	}
}

const gchar*
objects_base_object_get_type_add (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_ITEM (self)) {
		result = "item_add";
		return result;
	} else {
		if (OBJECTS_IS_PROJECT (self)) {
			result = "project_add";
			return result;
		} else {
			if (OBJECTS_IS_SECTION (self)) {
				result = "section_add";
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = "label_add";
					return result;
				} else {
					result = "";
					return result;
				}
			}
		}
	}
}

const gchar*
objects_base_object_get_type_update (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_ITEM (self)) {
		result = "item_update";
		return result;
	} else {
		if (OBJECTS_IS_PROJECT (self)) {
			result = "project_update";
			return result;
		} else {
			if (OBJECTS_IS_SECTION (self)) {
				result = "section_update";
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = "label_update";
					return result;
				} else {
					result = "";
					return result;
				}
			}
		}
	}
}

ObjectType
objects_base_object_get_object_type (ObjectsBaseObject* self)
{
	ObjectType result;
	g_return_val_if_fail (self != NULL, 0);
	if (OBJECTS_IS_PROJECT (self)) {
		result = OBJECT_TYPE_PROJECT;
		return result;
	} else {
		if (OBJECTS_IS_SECTION (self)) {
			result = OBJECT_TYPE_SECTION;
			return result;
		} else {
			if (OBJECTS_IS_ITEM (self)) {
				result = OBJECT_TYPE_ITEM;
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = OBJECT_TYPE_LABEL;
					return result;
				} else {
					result = OBJECT_TYPE_FILTER;
					return result;
				}
			}
		}
	}
}

const gchar*
objects_base_object_get_object_type_string (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_PROJECT (self)) {
		result = "project";
		return result;
	} else {
		if (OBJECTS_IS_SECTION (self)) {
			result = "section";
			return result;
		} else {
			if (OBJECTS_IS_ITEM (self)) {
				result = "item";
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = "label";
					return result;
				} else {
					result = "filter";
					return result;
				}
			}
		}
	}
}

const gchar*
objects_base_object_get_table_name (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_ITEM (self)) {
		result = "Items";
		return result;
	} else {
		if (OBJECTS_IS_SECTION (self)) {
			result = "Sections";
			return result;
		} else {
			if (OBJECTS_IS_PROJECT (self)) {
				result = "Projects";
				return result;
			} else {
				if (OBJECTS_IS_LABEL (self)) {
					result = "Labels";
					return result;
				} else {
					result = "";
					return result;
				}
			}
		}
	}
}

const gchar*
objects_base_object_get_column_order_name (ObjectsBaseObject* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_ITEM (self)) {
		result = "child_order";
		return result;
	}
	if (OBJECTS_IS_SECTION (self)) {
		result = "section_order";
		return result;
	}
	if (OBJECTS_IS_PROJECT (self)) {
		result = "child_order";
		return result;
	}
	if (OBJECTS_IS_LABEL (self)) {
		result = "item_order";
		return result;
	}
	result = "";
	return result;
}

ObjectsSource*
objects_base_object_get_source (ObjectsBaseObject* self)
{
	ObjectsSource* result;
	ObjectsSource* _tmp18_;
	g_return_val_if_fail (self != NULL, NULL);
	if (OBJECTS_IS_PROJECT (self)) {
		ObjectsSource* _tmp0_;
		ObjectsSource* _tmp1_;
		_tmp0_ = objects_project_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, OBJECTS_TYPE_PROJECT, ObjectsProject));
		_tmp1_ = _tmp0_;
		result = _tmp1_;
		return result;
	}
	if (OBJECTS_IS_SECTION (self)) {
		ObjectsProject* _tmp2_;
		ObjectsProject* _tmp3_;
		ObjectsSource* _tmp4_;
		ObjectsSource* _tmp5_;
		_tmp2_ = objects_section_get_project (G_TYPE_CHECK_INSTANCE_CAST (self, OBJECTS_TYPE_SECTION, ObjectsSection));
		_tmp3_ = _tmp2_;
		_tmp4_ = objects_project_get_source (_tmp3_);
		_tmp5_ = _tmp4_;
		result = _tmp5_;
		return result;
	}
	if (OBJECTS_IS_ITEM (self)) {
		ObjectsProject* _tmp6_;
		ObjectsProject* _tmp7_;
		ObjectsSource* _tmp8_;
		ObjectsSource* _tmp9_;
		_tmp6_ = objects_item_get_project (G_TYPE_CHECK_INSTANCE_CAST (self, OBJECTS_TYPE_ITEM, ObjectsItem));
		_tmp7_ = _tmp6_;
		_tmp8_ = objects_project_get_source (_tmp7_);
		_tmp9_ = _tmp8_;
		result = _tmp9_;
		return result;
	}
	if (OBJECTS_IS_LABEL (self)) {
		ObjectsSource* _tmp10_;
		ObjectsSource* _tmp11_;
		_tmp10_ = objects_label_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, OBJECTS_TYPE_LABEL, ObjectsLabel));
		_tmp11_ = _tmp10_;
		result = _tmp11_;
		return result;
	}
	if (OBJECTS_IS_REMINDER (self)) {
		ObjectsItem* _tmp12_;
		ObjectsItem* _tmp13_;
		ObjectsProject* _tmp14_;
		ObjectsProject* _tmp15_;
		ObjectsSource* _tmp16_;
		ObjectsSource* _tmp17_;
		_tmp12_ = objects_reminder_get_item (G_TYPE_CHECK_INSTANCE_CAST (self, OBJECTS_TYPE_REMINDER, ObjectsReminder));
		_tmp13_ = _tmp12_;
		_tmp14_ = objects_item_get_project (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = objects_project_get_source (_tmp15_);
		_tmp17_ = _tmp16_;
		result = _tmp17_;
		return result;
	}
	_tmp18_ = self->priv->_source;
	result = _tmp18_;
	return result;
}

static gint*
_int_dup (gint* self)
{
	gint* dup;
	dup = g_new0 (gint, 1);
	memcpy (dup, self, sizeof (gint));
	return dup;
}

static gpointer
__int_dup0 (gpointer self)
{
	return self ? _int_dup (self) : NULL;
}

gint
objects_base_object_get_item_count (ObjectsBaseObject* self)
{
	gint result;
	gint* _tmp0_;
	gint* _tmp3_;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = self->_item_count;
	if (_tmp0_ == NULL) {
		gint _tmp1_;
		gint* _tmp2_;
		_tmp1_ = objects_base_object_update_count (self);
		_tmp2_ = __int_dup0 (&_tmp1_);
		_g_free0 (self->_item_count);
		self->_item_count = _tmp2_;
	}
	_tmp3_ = self->_item_count;
	result = *_tmp3_;
	return result;
}

void
objects_base_object_set_item_count (ObjectsBaseObject* self,
                                    gint value)
{
	gint* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = __int_dup0 (&value);
	_g_free0 (self->_item_count);
	self->_item_count = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, objects_base_object_properties[OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY]);
}

static gdouble*
_double_dup (gdouble* self)
{
	gdouble* dup;
	dup = g_new0 (gdouble, 1);
	memcpy (dup, self, sizeof (gdouble));
	return dup;
}

static gpointer
__double_dup0 (gpointer self)
{
	return self ? _double_dup (self) : NULL;
}

gdouble
objects_base_object_get_percentage (ObjectsBaseObject* self)
{
	gdouble result;
	gdouble* _tmp0_;
	gdouble* _tmp3_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->_percentage;
	if (_tmp0_ == NULL) {
		gdouble _tmp1_;
		gdouble* _tmp2_;
		_tmp1_ = objects_base_object_update_percentage (self);
		_tmp2_ = __double_dup0 (&_tmp1_);
		_g_free0 (self->_percentage);
		self->_percentage = _tmp2_;
	}
	_tmp3_ = self->_percentage;
	result = *_tmp3_;
	return result;
}

static void
objects_base_object_class_init (ObjectsBaseObjectClass * klass,
                                gpointer klass_data)
{
	objects_base_object_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ObjectsBaseObject_private_offset);
	((ObjectsBaseObjectClass *) klass)->get_update_json = (gchar* (*) (ObjectsBaseObject*, const gchar*, const gchar*)) objects_base_object_real_get_update_json;
	((ObjectsBaseObjectClass *) klass)->get_add_json = (gchar* (*) (ObjectsBaseObject*, const gchar*, const gchar*)) objects_base_object_real_get_add_json;
	((ObjectsBaseObjectClass *) klass)->get_move_json = (gchar* (*) (ObjectsBaseObject*, const gchar*, const gchar*)) objects_base_object_real_get_move_json;
	((ObjectsBaseObjectClass *) klass)->to_json = (gchar* (*) (ObjectsBaseObject*)) objects_base_object_real_to_json;
	((ObjectsBaseObjectClass *) klass)->update_count = (gint (*) (ObjectsBaseObject*)) objects_base_object_real_update_count;
	((ObjectsBaseObjectClass *) klass)->update_percentage = (gdouble (*) (ObjectsBaseObject*)) objects_base_object_real_update_percentage;
	((ObjectsBaseObjectClass *) klass)->count_update = (void (*) (ObjectsBaseObject*)) objects_base_object_real_count_update;
	((ObjectsBaseObjectClass *) klass)->theme_color = (gchar* (*) (ObjectsBaseObject*)) objects_base_object_real_theme_color;
	G_OBJECT_CLASS (klass)->get_property = _vala_objects_base_object_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_objects_base_object_set_property;
	G_OBJECT_CLASS (klass)->finalize = objects_base_object_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_ID_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_NAME_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY] = g_param_spec_string ("keywords", "keywords", "keywords", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY] = g_param_spec_string ("icon-name", "icon-name", "icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_COLOR_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_COLOR_PROPERTY] = g_param_spec_string ("color", "color", "color", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY] = g_param_spec_uint ("update-timeout-id", "update-timeout-id", "update-timeout-id", 0, G_MAXUINT, (guint) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_ID_STRING_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_ID_STRING_PROPERTY] = g_param_spec_string ("id-string", "id-string", "id-string", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_LOADING_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_LOADING_PROPERTY] = g_param_spec_boolean ("loading", "loading", "loading", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY] = g_param_spec_boolean ("sensitive", "sensitive", "sensitive", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY] = g_param_spec_string ("view-id", "view-id", "view-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_TYPE_DELETE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_TYPE_DELETE_PROPERTY] = g_param_spec_string ("type-delete", "type-delete", "type-delete", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_TYPE_ADD_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_TYPE_ADD_PROPERTY] = g_param_spec_string ("type-add", "type-add", "type-add", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_TYPE_UPDATE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_TYPE_UPDATE_PROPERTY] = g_param_spec_string ("type-update", "type-update", "type-update", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_OBJECT_TYPE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_OBJECT_TYPE_PROPERTY] = g_param_spec_enum ("object-type", "object-type", "object-type", TYPE_OBJECT_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_OBJECT_TYPE_STRING_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_OBJECT_TYPE_STRING_PROPERTY] = g_param_spec_string ("object-type-string", "object-type-string", "object-type-string", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_TABLE_NAME_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_TABLE_NAME_PROPERTY] = g_param_spec_string ("table-name", "table-name", "table-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_COLUMN_ORDER_NAME_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_COLUMN_ORDER_NAME_PROPERTY] = g_param_spec_string ("column-order-name", "column-order-name", "column-order-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_SOURCE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_SOURCE_PROPERTY] = g_param_spec_object ("source", "source", "source", OBJECTS_TYPE_SOURCE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY] = g_param_spec_int ("item-count", "item-count", "item-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), OBJECTS_BASE_OBJECT_PERCENTAGE_PROPERTY, objects_base_object_properties[OBJECTS_BASE_OBJECT_PERCENTAGE_PROPERTY] = g_param_spec_double ("percentage", "percentage", "percentage", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	objects_base_object_signals[OBJECTS_BASE_OBJECT_DELETED_SIGNAL] = g_signal_new ("deleted", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_UPDATED_SIGNAL] = g_signal_new ("updated", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_ARCHIVED_SIGNAL] = g_signal_new ("archived", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_UNARCHIVED_SIGNAL] = g_signal_new ("unarchived", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_ADDED_SIGNAL] = g_signal_new ("filter-added", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, OBJECTS_FILTERS_TYPE_FILTER_ITEM);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_REMOVED_SIGNAL] = g_signal_new ("filter-removed", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, OBJECTS_FILTERS_TYPE_FILTER_ITEM);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_FILTER_UPDATED_SIGNAL] = g_signal_new ("filter-updated", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, OBJECTS_FILTERS_TYPE_FILTER_ITEM);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_HANDLE_SCROLL_VISIBILITY_CHANGE_SIGNAL] = g_signal_new ("handle-scroll-visibility-change", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_LOADING_CHANGE_SIGNAL] = g_signal_new ("loading-change", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_SENSITIVE_CHANGE_SIGNAL] = g_signal_new ("sensitive-change", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	objects_base_object_signals[OBJECTS_BASE_OBJECT_COUNT_UPDATED_SIGNAL] = g_signal_new ("count-updated", OBJECTS_TYPE_BASE_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
objects_base_object_instance_init (ObjectsBaseObject * self,
                                   gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GeeHashMap* _tmp5_;
	gchar* _tmp6_;
	self->priv = objects_base_object_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_id = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_name = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->priv->_keywords = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_icon_name = _tmp3_;
	_tmp4_ = g_strdup ("");
	self->priv->_color = _tmp4_;
	self->priv->_update_timeout_id = (guint) 0;
	_tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, OBJECTS_FILTERS_TYPE_FILTER_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->filters = _tmp5_;
	self->priv->_loading = FALSE;
	self->priv->_sensitive = TRUE;
	_tmp6_ = g_strdup ("");
	self->priv->_view_id = _tmp6_;
	self->_item_count = NULL;
	self->_percentage = NULL;
}

static void
objects_base_object_finalize (GObject * obj)
{
	ObjectsBaseObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, OBJECTS_TYPE_BASE_OBJECT, ObjectsBaseObject);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_keywords);
	_g_free0 (self->priv->_icon_name);
	_g_free0 (self->priv->_color);
	_g_object_unref0 (self->filters);
	_g_free0 (self->priv->_id_string);
	_g_free0 (self->priv->_view_id);
	_g_object_unref0 (self->priv->_source);
	_g_free0 (self->_item_count);
	_g_free0 (self->_percentage);
	G_OBJECT_CLASS (objects_base_object_parent_class)->finalize (obj);
}

static GType
objects_base_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ObjectsBaseObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) objects_base_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ObjectsBaseObject), 0, (GInstanceInitFunc) objects_base_object_instance_init, NULL };
	GType objects_base_object_type_id;
	objects_base_object_type_id = g_type_register_static (G_TYPE_OBJECT, "ObjectsBaseObject", &g_define_type_info, 0);
	ObjectsBaseObject_private_offset = g_type_add_instance_private (objects_base_object_type_id, sizeof (ObjectsBaseObjectPrivate));
	return objects_base_object_type_id;
}

GType
objects_base_object_get_type (void)
{
	static volatile gsize objects_base_object_type_id__once = 0;
	if (g_once_init_enter (&objects_base_object_type_id__once)) {
		GType objects_base_object_type_id;
		objects_base_object_type_id = objects_base_object_get_type_once ();
		g_once_init_leave (&objects_base_object_type_id__once, objects_base_object_type_id);
	}
	return objects_base_object_type_id__once;
}

static void
_vala_objects_base_object_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	ObjectsBaseObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, OBJECTS_TYPE_BASE_OBJECT, ObjectsBaseObject);
	switch (property_id) {
		case OBJECTS_BASE_OBJECT_ID_PROPERTY:
		g_value_set_string (value, objects_base_object_get_id (self));
		break;
		case OBJECTS_BASE_OBJECT_NAME_PROPERTY:
		g_value_set_string (value, objects_base_object_get_name (self));
		break;
		case OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY:
		g_value_set_string (value, objects_base_object_get_keywords (self));
		break;
		case OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY:
		g_value_set_string (value, objects_base_object_get_icon_name (self));
		break;
		case OBJECTS_BASE_OBJECT_COLOR_PROPERTY:
		g_value_set_string (value, objects_base_object_get_color (self));
		break;
		case OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY:
		g_value_set_uint (value, objects_base_object_get_update_timeout_id (self));
		break;
		case OBJECTS_BASE_OBJECT_ID_STRING_PROPERTY:
		g_value_set_string (value, objects_base_object_get_id_string (self));
		break;
		case OBJECTS_BASE_OBJECT_LOADING_PROPERTY:
		g_value_set_boolean (value, objects_base_object_get_loading (self));
		break;
		case OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY:
		g_value_set_boolean (value, objects_base_object_get_sensitive (self));
		break;
		case OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY:
		g_value_set_string (value, objects_base_object_get_view_id (self));
		break;
		case OBJECTS_BASE_OBJECT_TYPE_DELETE_PROPERTY:
		g_value_set_string (value, objects_base_object_get_type_delete (self));
		break;
		case OBJECTS_BASE_OBJECT_TYPE_ADD_PROPERTY:
		g_value_set_string (value, objects_base_object_get_type_add (self));
		break;
		case OBJECTS_BASE_OBJECT_TYPE_UPDATE_PROPERTY:
		g_value_set_string (value, objects_base_object_get_type_update (self));
		break;
		case OBJECTS_BASE_OBJECT_OBJECT_TYPE_PROPERTY:
		g_value_set_enum (value, objects_base_object_get_object_type (self));
		break;
		case OBJECTS_BASE_OBJECT_OBJECT_TYPE_STRING_PROPERTY:
		g_value_set_string (value, objects_base_object_get_object_type_string (self));
		break;
		case OBJECTS_BASE_OBJECT_TABLE_NAME_PROPERTY:
		g_value_set_string (value, objects_base_object_get_table_name (self));
		break;
		case OBJECTS_BASE_OBJECT_COLUMN_ORDER_NAME_PROPERTY:
		g_value_set_string (value, objects_base_object_get_column_order_name (self));
		break;
		case OBJECTS_BASE_OBJECT_SOURCE_PROPERTY:
		g_value_set_object (value, objects_base_object_get_source (self));
		break;
		case OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY:
		g_value_set_int (value, objects_base_object_get_item_count (self));
		break;
		case OBJECTS_BASE_OBJECT_PERCENTAGE_PROPERTY:
		g_value_set_double (value, objects_base_object_get_percentage (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_objects_base_object_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	ObjectsBaseObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, OBJECTS_TYPE_BASE_OBJECT, ObjectsBaseObject);
	switch (property_id) {
		case OBJECTS_BASE_OBJECT_ID_PROPERTY:
		objects_base_object_set_id (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_NAME_PROPERTY:
		objects_base_object_set_name (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_KEYWORDS_PROPERTY:
		objects_base_object_set_keywords (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_ICON_NAME_PROPERTY:
		objects_base_object_set_icon_name (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_COLOR_PROPERTY:
		objects_base_object_set_color (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_UPDATE_TIMEOUT_ID_PROPERTY:
		objects_base_object_set_update_timeout_id (self, g_value_get_uint (value));
		break;
		case OBJECTS_BASE_OBJECT_LOADING_PROPERTY:
		objects_base_object_set_loading (self, g_value_get_boolean (value));
		break;
		case OBJECTS_BASE_OBJECT_SENSITIVE_PROPERTY:
		objects_base_object_set_sensitive (self, g_value_get_boolean (value));
		break;
		case OBJECTS_BASE_OBJECT_VIEW_ID_PROPERTY:
		objects_base_object_set_view_id (self, g_value_get_string (value));
		break;
		case OBJECTS_BASE_OBJECT_ITEM_COUNT_PROPERTY:
		objects_base_object_set_item_count (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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;
}

