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

/*-
 * Copyright (c) 2017-2018 elementary LLC. (https://elementary.io)
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 */

#include "codecore.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.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  {
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_0_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY,
	SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NUM_PROPERTIES
};
static GParamSpec* scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_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)))

struct _ScratchServicesCtagsSymbolIterPrivate {
	gchar* _name;
	gchar* _parent;
	gint _line;
	GIcon* _icon;
};

static gint ScratchServicesCtagsSymbolIter_private_offset;
static gpointer scratch_services_ctags_symbol_iter_parent_class = NULL;

static ScratchServicesSymbolType* _scratch_services_symbol_type_dup (ScratchServicesSymbolType* self);
static void scratch_services_ctags_symbol_iter_finalize (GObject * obj);
static GType scratch_services_ctags_symbol_iter_get_type_once (void);
static void _vala_scratch_services_ctags_symbol_iter_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _vala_scratch_services_ctags_symbol_iter_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec);

static inline gpointer
scratch_services_ctags_symbol_iter_get_instance_private (ScratchServicesCtagsSymbolIter* self)
{
	return G_STRUCT_MEMBER_P (self, ScratchServicesCtagsSymbolIter_private_offset);
}

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

static gpointer
__scratch_services_symbol_type_dup0 (gpointer self)
{
	return self ? _scratch_services_symbol_type_dup (self) : NULL;
}

ScratchServicesCtagsSymbolIter*
scratch_services_ctags_symbol_iter_construct (GType object_type,
                                              const gchar* name,
                                              const gchar* parent,
                                              gint line,
                                              GIcon* icon,
                                              ScratchServicesSymbolType* s_type)
{
	ScratchServicesCtagsSymbolIter * self = NULL;
	ScratchServicesSymbolType* _tmp0_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	self = (ScratchServicesCtagsSymbolIter*) g_object_new (object_type, "name", name, "parent", parent, "line", line, "icon", icon, NULL);
	_tmp0_ = __scratch_services_symbol_type_dup0 (s_type);
	_g_free0 (self->symbol_type);
	self->symbol_type = _tmp0_;
	return self;
}

ScratchServicesCtagsSymbolIter*
scratch_services_ctags_symbol_iter_new (const gchar* name,
                                        const gchar* parent,
                                        gint line,
                                        GIcon* icon,
                                        ScratchServicesSymbolType* s_type)
{
	return scratch_services_ctags_symbol_iter_construct (SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_ITER, name, parent, line, icon, s_type);
}

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

void
scratch_services_ctags_symbol_iter_set_name (ScratchServicesCtagsSymbolIter* self,
                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_services_ctags_symbol_iter_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, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY]);
	}
}

const gchar*
scratch_services_ctags_symbol_iter_get_parent (ScratchServicesCtagsSymbolIter* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parent;
	result = _tmp0_;
	return result;
}

void
scratch_services_ctags_symbol_iter_set_parent (ScratchServicesCtagsSymbolIter* self,
                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_services_ctags_symbol_iter_get_parent (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_parent);
		self->priv->_parent = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY]);
	}
}

gint
scratch_services_ctags_symbol_iter_get_line (ScratchServicesCtagsSymbolIter* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_line;
	return result;
}

void
scratch_services_ctags_symbol_iter_set_line (ScratchServicesCtagsSymbolIter* self,
                                             gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_services_ctags_symbol_iter_get_line (self);
	if (old_value != value) {
		self->priv->_line = value;
		g_object_notify_by_pspec ((GObject *) self, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY]);
	}
}

GIcon*
scratch_services_ctags_symbol_iter_get_icon (ScratchServicesCtagsSymbolIter* self)
{
	GIcon* result;
	GIcon* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

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

void
scratch_services_ctags_symbol_iter_set_icon (ScratchServicesCtagsSymbolIter* self,
                                             GIcon* value)
{
	GIcon* old_value;
	g_return_if_fail (self != NULL);
	old_value = scratch_services_ctags_symbol_iter_get_icon (self);
	if (old_value != value) {
		GIcon* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY]);
	}
}

static void
scratch_services_ctags_symbol_iter_class_init (ScratchServicesCtagsSymbolIterClass * klass,
                                               gpointer klass_data)
{
	scratch_services_ctags_symbol_iter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ScratchServicesCtagsSymbolIter_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_scratch_services_ctags_symbol_iter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_scratch_services_ctags_symbol_iter_set_property;
	G_OBJECT_CLASS (klass)->finalize = scratch_services_ctags_symbol_iter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY] = g_param_spec_string ("parent", "parent", "parent", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY] = g_param_spec_int ("line", "line", "line", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY, scratch_services_ctags_symbol_iter_properties[SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY] = g_param_spec_object ("icon", "icon", "icon", g_icon_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static void
scratch_services_ctags_symbol_iter_instance_init (ScratchServicesCtagsSymbolIter * self,
                                                  gpointer klass)
{
	self->priv = scratch_services_ctags_symbol_iter_get_instance_private (self);
}

static void
scratch_services_ctags_symbol_iter_finalize (GObject * obj)
{
	ScratchServicesCtagsSymbolIter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_ITER, ScratchServicesCtagsSymbolIter);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_parent);
	_g_object_unref0 (self->priv->_icon);
	_g_free0 (self->symbol_type);
	G_OBJECT_CLASS (scratch_services_ctags_symbol_iter_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
scratch_services_ctags_symbol_iter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScratchServicesCtagsSymbolIterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scratch_services_ctags_symbol_iter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScratchServicesCtagsSymbolIter), 0, (GInstanceInitFunc) scratch_services_ctags_symbol_iter_instance_init, NULL };
	GType scratch_services_ctags_symbol_iter_type_id;
	scratch_services_ctags_symbol_iter_type_id = g_type_register_static (G_TYPE_OBJECT, "ScratchServicesCtagsSymbolIter", &g_define_type_info, G_TYPE_FLAG_NONE);
	ScratchServicesCtagsSymbolIter_private_offset = g_type_add_instance_private (scratch_services_ctags_symbol_iter_type_id, sizeof (ScratchServicesCtagsSymbolIterPrivate));
	return scratch_services_ctags_symbol_iter_type_id;
}

GType
scratch_services_ctags_symbol_iter_get_type (void)
{
	static gsize scratch_services_ctags_symbol_iter_type_id__once = 0;
	if (g_once_init_enter (&scratch_services_ctags_symbol_iter_type_id__once)) {
		GType scratch_services_ctags_symbol_iter_type_id;
		scratch_services_ctags_symbol_iter_type_id = scratch_services_ctags_symbol_iter_get_type_once ();
		g_once_init_leave (&scratch_services_ctags_symbol_iter_type_id__once, scratch_services_ctags_symbol_iter_type_id);
	}
	return scratch_services_ctags_symbol_iter_type_id__once;
}

static void
_vala_scratch_services_ctags_symbol_iter_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	ScratchServicesCtagsSymbolIter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_ITER, ScratchServicesCtagsSymbolIter);
	switch (property_id) {
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY:
		g_value_set_string (value, scratch_services_ctags_symbol_iter_get_name (self));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY:
		g_value_set_string (value, scratch_services_ctags_symbol_iter_get_parent (self));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY:
		g_value_set_int (value, scratch_services_ctags_symbol_iter_get_line (self));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY:
		g_value_set_object (value, scratch_services_ctags_symbol_iter_get_icon (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_scratch_services_ctags_symbol_iter_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec)
{
	ScratchServicesCtagsSymbolIter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SCRATCH_SERVICES_TYPE_CTAGS_SYMBOL_ITER, ScratchServicesCtagsSymbolIter);
	switch (property_id) {
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_NAME_PROPERTY:
		scratch_services_ctags_symbol_iter_set_name (self, g_value_get_string (value));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_PARENT_PROPERTY:
		scratch_services_ctags_symbol_iter_set_parent (self, g_value_get_string (value));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_LINE_PROPERTY:
		scratch_services_ctags_symbol_iter_set_line (self, g_value_get_int (value));
		break;
		case SCRATCH_SERVICES_CTAGS_SYMBOL_ITER_ICON_PROPERTY:
		scratch_services_ctags_symbol_iter_set_icon (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

