/* gitg-ext-message.c generated by valac 0.32.1, the Vala compiler
 * generated from gitg-ext-message.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2012 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define GITG_EXT_TYPE_MESSAGE (gitg_ext_message_get_type ())
#define GITG_EXT_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_MESSAGE, GitgExtMessage))
#define GITG_EXT_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_EXT_TYPE_MESSAGE, GitgExtMessageClass))
#define GITG_EXT_IS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_MESSAGE))
#define GITG_EXT_IS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_EXT_TYPE_MESSAGE))
#define GITG_EXT_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_EXT_TYPE_MESSAGE, GitgExtMessageClass))

typedef struct _GitgExtMessage GitgExtMessage;
typedef struct _GitgExtMessageClass GitgExtMessageClass;
typedef struct _GitgExtMessagePrivate GitgExtMessagePrivate;

#define GITG_EXT_TYPE_MESSAGE_ID (gitg_ext_message_id_get_type ())
#define GITG_EXT_MESSAGE_ID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_EXT_TYPE_MESSAGE_ID, GitgExtMessageId))
#define GITG_EXT_MESSAGE_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_EXT_TYPE_MESSAGE_ID, GitgExtMessageIdClass))
#define GITG_EXT_IS_MESSAGE_ID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_EXT_TYPE_MESSAGE_ID))
#define GITG_EXT_IS_MESSAGE_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_EXT_TYPE_MESSAGE_ID))
#define GITG_EXT_MESSAGE_ID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_EXT_TYPE_MESSAGE_ID, GitgExtMessageIdClass))

typedef struct _GitgExtMessageId GitgExtMessageId;
typedef struct _GitgExtMessageIdClass GitgExtMessageIdClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL)))
#define _g_param_spec_unref0(var) ((var == NULL) ? NULL : (var = (g_param_spec_unref (var), NULL)))

struct _GitgExtMessage {
	GObject parent_instance;
	GitgExtMessagePrivate * priv;
};

struct _GitgExtMessageClass {
	GObjectClass parent_class;
};

struct _GitgExtMessagePrivate {
	GitgExtMessageId* d_id;
};


static gpointer gitg_ext_message_parent_class = NULL;

GType gitg_ext_message_get_type (void) G_GNUC_CONST;
GType gitg_ext_message_id_get_type (void) G_GNUC_CONST;
#define GITG_EXT_MESSAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_EXT_TYPE_MESSAGE, GitgExtMessagePrivate))
enum  {
	GITG_EXT_MESSAGE_DUMMY_PROPERTY,
	GITG_EXT_MESSAGE_ID
};
gboolean gitg_ext_message_has (GitgExtMessage* self, const gchar* propname);
gboolean gitg_ext_message_type_has (GType type, const gchar* propname);
gboolean gitg_ext_message_type_check (GType type, const gchar* propname, GType value_type);
GitgExtMessage* gitg_ext_message_construct (GType object_type);
GitgExtMessageId* gitg_ext_message_get_id (GitgExtMessage* self);
void gitg_ext_message_set_id (GitgExtMessage* self, GitgExtMessageId* value);
GitgExtMessageId* gitg_ext_message_id_copy (GitgExtMessageId* self);
static void gitg_ext_message_finalize (GObject* obj);
static void _vala_gitg_ext_message_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gitg_ext_message_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


gboolean gitg_ext_message_has (GitgExtMessage* self, const gchar* propname) {
	gboolean result = FALSE;
	GObjectClass* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GParamSpec* _tmp2_ = NULL;
#line 39 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 39 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_val_if_fail (propname != NULL, FALSE);
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp0_ = G_OBJECT_GET_CLASS ((GObject*) self);
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp1_ = propname;
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp2_ = g_object_class_find_property (_tmp0_, _tmp1_);
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	result = _tmp2_ != NULL;
#line 41 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return result;
#line 108 "gitg-ext-message.c"
}


gboolean gitg_ext_message_type_has (GType type, const gchar* propname) {
	gboolean result = FALSE;
	GType _tmp0_ = 0UL;
	GTypeClass* _tmp1_ = NULL;
	GObjectClass* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GParamSpec* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 44 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_val_if_fail (propname != NULL, FALSE);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp0_ = type;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp1_ = g_type_class_ref (_tmp0_);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp2_ = (GObjectClass*) _tmp1_;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp3_ = propname;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp4_ = g_object_class_find_property (_tmp2_, _tmp3_);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp5_ = _tmp4_ != NULL;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_g_type_class_unref0 (_tmp2_);
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	result = _tmp5_;
#line 46 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return result;
#line 140 "gitg-ext-message.c"
}


static gpointer _g_param_spec_ref0 (gpointer self) {
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return self ? g_param_spec_ref (self) : NULL;
#line 147 "gitg-ext-message.c"
}


gboolean gitg_ext_message_type_check (GType type, const gchar* propname, GType value_type) {
	gboolean result = FALSE;
	GParamSpec* spec = NULL;
	GType _tmp0_ = 0UL;
	GTypeClass* _tmp1_ = NULL;
	GObjectClass* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GParamSpec* _tmp4_ = NULL;
	GParamSpec* _tmp5_ = NULL;
	GParamSpec* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	GParamSpec* _tmp8_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_val_if_fail (propname != NULL, FALSE);
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp0_ = type;
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp1_ = g_type_class_ref (_tmp0_);
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp2_ = (GObjectClass*) _tmp1_;
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp3_ = propname;
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp4_ = g_object_class_find_property (_tmp2_, _tmp3_);
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp5_ = _g_param_spec_ref0 (_tmp4_);
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp6_ = _tmp5_;
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_g_type_class_unref0 (_tmp2_);
#line 51 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	spec = _tmp6_;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp8_ = spec;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	if (_tmp8_ != NULL) {
#line 187 "gitg-ext-message.c"
		GParamSpec* _tmp9_ = NULL;
		GType _tmp10_ = 0UL;
		GType _tmp11_ = 0UL;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		_tmp9_ = spec;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		_tmp10_ = _tmp9_->value_type;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		_tmp11_ = value_type;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		_tmp7_ = _tmp10_ == _tmp11_;
#line 199 "gitg-ext-message.c"
	} else {
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		_tmp7_ = FALSE;
#line 203 "gitg-ext-message.c"
	}
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	result = _tmp7_;
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_g_param_spec_unref0 (spec);
#line 53 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return result;
#line 211 "gitg-ext-message.c"
}


GitgExtMessage* gitg_ext_message_construct (GType object_type) {
	GitgExtMessage * self = NULL;
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	self = (GitgExtMessage*) g_object_new (object_type, NULL);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return self;
#line 221 "gitg-ext-message.c"
}


GitgExtMessageId* gitg_ext_message_get_id (GitgExtMessage* self) {
	GitgExtMessageId* result;
	GitgExtMessageId* _tmp0_ = NULL;
#line 33 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp0_ = self->priv->d_id;
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	result = _tmp0_;
#line 35 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	return result;
#line 236 "gitg-ext-message.c"
}


void gitg_ext_message_set_id (GitgExtMessage* self, GitgExtMessageId* value) {
	GitgExtMessageId* _tmp0_ = NULL;
	GitgExtMessageId* _tmp1_ = NULL;
#line 29 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_return_if_fail (self != NULL);
#line 31 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp0_ = value;
#line 31 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_tmp1_ = gitg_ext_message_id_copy (_tmp0_);
#line 31 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_g_object_unref0 (self->priv->d_id);
#line 31 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	self->priv->d_id = _tmp1_;
#line 29 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_object_notify ((GObject *) self, "id");
#line 255 "gitg-ext-message.c"
}


static void gitg_ext_message_class_init (GitgExtMessageClass * klass) {
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	gitg_ext_message_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_type_class_add_private (klass, sizeof (GitgExtMessagePrivate));
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_ext_message_get_property;
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_ext_message_set_property;
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_ext_message_finalize;
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_EXT_MESSAGE_ID, g_param_spec_object ("id", "id", "id", GITG_EXT_TYPE_MESSAGE_ID, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 272 "gitg-ext-message.c"
}


static void gitg_ext_message_instance_init (GitgExtMessage * self) {
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	self->priv = GITG_EXT_MESSAGE_GET_PRIVATE (self);
#line 279 "gitg-ext-message.c"
}


static void gitg_ext_message_finalize (GObject* obj) {
	GitgExtMessage * self;
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_EXT_TYPE_MESSAGE, GitgExtMessage);
#line 25 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	_g_object_unref0 (self->priv->d_id);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	G_OBJECT_CLASS (gitg_ext_message_parent_class)->finalize (obj);
#line 291 "gitg-ext-message.c"
}


GType gitg_ext_message_get_type (void) {
	static volatile gsize gitg_ext_message_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_ext_message_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgExtMessageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_ext_message_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgExtMessage), 0, (GInstanceInitFunc) gitg_ext_message_instance_init, NULL };
		GType gitg_ext_message_type_id;
		gitg_ext_message_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgExtMessage", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&gitg_ext_message_type_id__volatile, gitg_ext_message_type_id);
	}
	return gitg_ext_message_type_id__volatile;
}


static void _vala_gitg_ext_message_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgExtMessage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_EXT_TYPE_MESSAGE, GitgExtMessage);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	switch (property_id) {
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		case GITG_EXT_MESSAGE_ID:
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		g_value_set_object (value, gitg_ext_message_get_id (self));
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		break;
#line 318 "gitg-ext-message.c"
		default:
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		break;
#line 324 "gitg-ext-message.c"
	}
}


static void _vala_gitg_ext_message_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgExtMessage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_EXT_TYPE_MESSAGE, GitgExtMessage);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
	switch (property_id) {
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		case GITG_EXT_MESSAGE_ID:
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		gitg_ext_message_set_id (self, g_value_get_object (value));
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		break;
#line 340 "gitg-ext-message.c"
		default:
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "/home/jesse/dev/gitg/libgitg-ext/gitg-ext-message.vala"
		break;
#line 346 "gitg-ext-message.c"
	}
}



