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

/*  This file is part of corebird, a Gtk+ linux Twitter client.
 *  Copyright (C) 2013 Timm Bäder
 *
 *  corebird 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.
 *
 *  corebird 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 corebird.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>


#define TYPE_START_CONVERSATION_ENTRY (start_conversation_entry_get_type ())
#define START_CONVERSATION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_START_CONVERSATION_ENTRY, StartConversationEntry))
#define START_CONVERSATION_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_START_CONVERSATION_ENTRY, StartConversationEntryClass))
#define IS_START_CONVERSATION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_START_CONVERSATION_ENTRY))
#define IS_START_CONVERSATION_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_START_CONVERSATION_ENTRY))
#define START_CONVERSATION_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_START_CONVERSATION_ENTRY, StartConversationEntryClass))

typedef struct _StartConversationEntry StartConversationEntry;
typedef struct _StartConversationEntryClass StartConversationEntryClass;

#define TYPE_DM_THREAD_ENTRY (dm_thread_entry_get_type ())
#define DM_THREAD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DM_THREAD_ENTRY, DMThreadEntry))
#define DM_THREAD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DM_THREAD_ENTRY, DMThreadEntryClass))
#define IS_DM_THREAD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DM_THREAD_ENTRY))
#define IS_DM_THREAD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DM_THREAD_ENTRY))
#define DM_THREAD_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DM_THREAD_ENTRY, DMThreadEntryClass))

typedef struct _DMThreadEntry DMThreadEntry;
typedef struct _DMThreadEntryClass DMThreadEntryClass;
typedef struct _DMThreadEntryPrivate DMThreadEntryPrivate;

#define TYPE_AVATAR_WIDGET (avatar_widget_get_type ())
#define AVATAR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AVATAR_WIDGET, AvatarWidget))
#define AVATAR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AVATAR_WIDGET, AvatarWidgetClass))
#define IS_AVATAR_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AVATAR_WIDGET))
#define IS_AVATAR_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AVATAR_WIDGET))
#define AVATAR_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AVATAR_WIDGET, AvatarWidgetClass))

typedef struct _AvatarWidget AvatarWidget;
typedef struct _AvatarWidgetClass AvatarWidgetClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _DMThreadEntry {
	GtkListBoxRow parent_instance;
	DMThreadEntryPrivate * priv;
	gint unread_count;
	gchar* notification_id;
};

struct _DMThreadEntryClass {
	GtkListBoxRowClass parent_class;
};

struct _DMThreadEntryPrivate {
	GtkLabel* name_label;
	GtkLabel* screen_name_label;
	GtkLabel* last_message_label;
	AvatarWidget* avatar_image;
	GtkLabel* unread_count_label;
	gint64 _user_id;
	gint64 _last_message_id;
};


static gpointer dm_thread_entry_parent_class = NULL;

gint dm_thread_entry_sort_func (GtkListBoxRow* r1, GtkListBoxRow* r2);
GType start_conversation_entry_get_type (void) G_GNUC_CONST;
GType dm_thread_entry_get_type (void) G_GNUC_CONST;
gint64 dm_thread_entry_get_last_message_id (DMThreadEntry* self);
GType avatar_widget_get_type (void) G_GNUC_CONST;
#define DM_THREAD_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DM_THREAD_ENTRY, DMThreadEntryPrivate))
enum  {
	DM_THREAD_ENTRY_DUMMY_PROPERTY,
	DM_THREAD_ENTRY_USER_ID,
	DM_THREAD_ENTRY_NAME,
	DM_THREAD_ENTRY_SCREEN_NAME,
	DM_THREAD_ENTRY_LAST_MESSAGE,
	DM_THREAD_ENTRY_LAST_MESSAGE_ID,
	DM_THREAD_ENTRY_AVATAR
};
gboolean dm_thread_entry_equal_func (DMThreadEntry* a, DMThreadEntry* b);
gint64 dm_thread_entry_get_user_id (DMThreadEntry* self);
DMThreadEntry* dm_thread_entry_new (gint64 user_id);
DMThreadEntry* dm_thread_entry_construct (GType object_type, gint64 user_id);
static void dm_thread_entry_set_user_id (DMThreadEntry* self, gint64 value);
void dm_thread_entry_update_unread_count (DMThreadEntry* self);
const gchar* dm_thread_entry_get_name (DMThreadEntry* self);
void dm_thread_entry_set_name (DMThreadEntry* self, const gchar* value);
const gchar* dm_thread_entry_get_screen_name (DMThreadEntry* self);
void dm_thread_entry_set_screen_name (DMThreadEntry* self, const gchar* value);
const gchar* dm_thread_entry_get_last_message (DMThreadEntry* self);
void dm_thread_entry_set_last_message (DMThreadEntry* self, const gchar* value);
void dm_thread_entry_set_last_message_id (DMThreadEntry* self, gint64 value);
GdkPixbuf* dm_thread_entry_get_avatar (DMThreadEntry* self);
void dm_thread_entry_set_avatar (DMThreadEntry* self, GdkPixbuf* value);
static void dm_thread_entry_finalize (GObject* obj);
static void _vala_dm_thread_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dm_thread_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


gint dm_thread_entry_sort_func (GtkListBoxRow* r1, GtkListBoxRow* r2) {
	gint result = 0;
	GtkListBoxRow* _tmp0_ = NULL;
	GtkListBoxRow* _tmp2_ = NULL;
	GtkListBoxRow* _tmp3_ = NULL;
	gint64 _tmp4_ = 0LL;
	gint64 _tmp5_ = 0LL;
	GtkListBoxRow* _tmp6_ = NULL;
	gint64 _tmp7_ = 0LL;
	gint64 _tmp8_ = 0LL;
	g_return_val_if_fail (GTK_IS_LIST_BOX_ROW (r1), 0);
	g_return_val_if_fail (GTK_IS_LIST_BOX_ROW (r2), 0);
	_tmp0_ = r1;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_START_CONVERSATION_ENTRY)) {
		result = -1;
		return result;
	} else {
		GtkListBoxRow* _tmp1_ = NULL;
		_tmp1_ = r2;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_START_CONVERSATION_ENTRY)) {
			result = 1;
			return result;
		}
	}
	_tmp2_ = r1;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_DM_THREAD_ENTRY)) {
		result = 1;
		return result;
	}
	_tmp3_ = r1;
	_tmp4_ = dm_thread_entry_get_last_message_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DM_THREAD_ENTRY, DMThreadEntry));
	_tmp5_ = _tmp4_;
	_tmp6_ = r2;
	_tmp7_ = dm_thread_entry_get_last_message_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DM_THREAD_ENTRY, DMThreadEntry));
	_tmp8_ = _tmp7_;
	if (_tmp5_ > _tmp8_) {
		result = -1;
		return result;
	}
	result = 1;
	return result;
}


gboolean dm_thread_entry_equal_func (DMThreadEntry* a, DMThreadEntry* b) {
	gboolean result = FALSE;
	DMThreadEntry* _tmp0_ = NULL;
	gint64 _tmp1_ = 0LL;
	DMThreadEntry* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (a), FALSE);
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (b), FALSE);
	_tmp0_ = a;
	_tmp1_ = _tmp0_->priv->_user_id;
	_tmp2_ = b;
	_tmp3_ = _tmp2_->priv->_user_id;
	result = _tmp1_ == _tmp3_;
	return result;
}


DMThreadEntry* dm_thread_entry_construct (GType object_type, gint64 user_id) {
	DMThreadEntry * self = NULL;
	gint64 _tmp0_ = 0LL;
	self = (DMThreadEntry*) g_object_new (object_type, NULL);
	_tmp0_ = user_id;
	dm_thread_entry_set_user_id (self, _tmp0_);
	dm_thread_entry_update_unread_count (self);
	return self;
}


DMThreadEntry* dm_thread_entry_new (gint64 user_id) {
	return dm_thread_entry_construct (TYPE_DM_THREAD_ENTRY, user_id);
}


void dm_thread_entry_update_unread_count (DMThreadEntry* self) {
	gint _tmp0_ = 0;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = self->unread_count;
	if (_tmp0_ == 0) {
		GtkLabel* _tmp1_ = NULL;
		_tmp1_ = self->priv->unread_count_label;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
	} else {
		GtkLabel* _tmp2_ = NULL;
		GtkLabel* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		const gchar* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		_tmp2_ = self->priv->unread_count_label;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		_tmp3_ = self->priv->unread_count_label;
		_tmp4_ = self->unread_count;
		_tmp5_ = ngettext ("(%d unread)", "(%d unread)", (gulong) _tmp4_);
		_tmp6_ = self->unread_count;
		_tmp7_ = g_strdup_printf (_tmp5_, _tmp6_);
		_tmp8_ = _tmp7_;
		gtk_label_set_label (_tmp3_, _tmp8_);
		_g_free0 (_tmp8_);
	}
}


gint64 dm_thread_entry_get_user_id (DMThreadEntry* self) {
	gint64 result;
	gint64 _tmp0_ = 0LL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), 0LL);
	_tmp0_ = self->priv->_user_id;
	result = _tmp0_;
	return result;
}


static void dm_thread_entry_set_user_id (DMThreadEntry* self, gint64 value) {
	gint64 _tmp0_ = 0LL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = value;
	self->priv->_user_id = _tmp0_;
	g_object_notify ((GObject *) self, "user-id");
}


const gchar* dm_thread_entry_get_name (DMThreadEntry* self) {
	const gchar* result;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), NULL);
	_tmp0_ = self->priv->name_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


void dm_thread_entry_set_name (DMThreadEntry* self, const gchar* value) {
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = self->priv->name_label;
	_tmp1_ = value;
	gtk_label_set_label (_tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "name");
}


const gchar* dm_thread_entry_get_screen_name (DMThreadEntry* self) {
	const gchar* result;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), NULL);
	_tmp0_ = self->priv->screen_name_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


void dm_thread_entry_set_screen_name (DMThreadEntry* self, const gchar* value) {
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = self->priv->screen_name_label;
	_tmp1_ = value;
	_tmp2_ = g_strconcat ("@", _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp0_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_notify ((GObject *) self, "screen-name");
}


const gchar* dm_thread_entry_get_last_message (DMThreadEntry* self) {
	const gchar* result;
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), NULL);
	_tmp0_ = self->priv->last_message_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


void dm_thread_entry_set_last_message (DMThreadEntry* self, const gchar* value) {
	GtkLabel* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = self->priv->last_message_label;
	_tmp1_ = value;
	gtk_label_set_label (_tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "last-message");
}


gint64 dm_thread_entry_get_last_message_id (DMThreadEntry* self) {
	gint64 result;
	gint64 _tmp0_ = 0LL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), 0LL);
	_tmp0_ = self->priv->_last_message_id;
	result = _tmp0_;
	return result;
}


void dm_thread_entry_set_last_message_id (DMThreadEntry* self, gint64 value) {
	gint64 _tmp0_ = 0LL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = value;
	self->priv->_last_message_id = _tmp0_;
	g_object_notify ((GObject *) self, "last-message-id");
}


GdkPixbuf* dm_thread_entry_get_avatar (DMThreadEntry* self) {
	GdkPixbuf* result;
	AvatarWidget* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	GdkPixbuf* _tmp2_ = NULL;
	g_return_val_if_fail (IS_DM_THREAD_ENTRY (self), NULL);
	_tmp0_ = self->priv->avatar_image;
	g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_image_get_type (), GtkImage), "pixbuf", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


void dm_thread_entry_set_avatar (DMThreadEntry* self, GdkPixbuf* value) {
	AvatarWidget* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	g_return_if_fail (IS_DM_THREAD_ENTRY (self));
	_tmp0_ = self->priv->avatar_image;
	_tmp1_ = value;
	g_object_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_image_get_type (), GtkImage), "pixbuf", _tmp1_, NULL);
	g_object_notify ((GObject *) self, "avatar");
}


static void dm_thread_entry_class_init (DMThreadEntryClass * klass) {
	gint DMThreadEntry_private_offset;
	dm_thread_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DMThreadEntryPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_dm_thread_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dm_thread_entry_set_property;
	G_OBJECT_CLASS (klass)->finalize = dm_thread_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_USER_ID, g_param_spec_int64 ("user-id", "user-id", "user-id", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_SCREEN_NAME, g_param_spec_string ("screen-name", "screen-name", "screen-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_LAST_MESSAGE, g_param_spec_string ("last-message", "last-message", "last-message", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_LAST_MESSAGE_ID, g_param_spec_int64 ("last-message-id", "last-message-id", "last-message-id", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DM_THREAD_ENTRY_AVATAR, g_param_spec_object ("avatar", "avatar", "avatar", GDK_TYPE_PIXBUF, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	DMThreadEntry_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/baedert/corebird/ui/dm-thread-entry.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_label", FALSE, DMThreadEntry_private_offset + G_STRUCT_OFFSET (DMThreadEntryPrivate, name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "screen_name_label", FALSE, DMThreadEntry_private_offset + G_STRUCT_OFFSET (DMThreadEntryPrivate, screen_name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "last_message_label", FALSE, DMThreadEntry_private_offset + G_STRUCT_OFFSET (DMThreadEntryPrivate, last_message_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "avatar_image", FALSE, DMThreadEntry_private_offset + G_STRUCT_OFFSET (DMThreadEntryPrivate, avatar_image));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "unread_count_label", FALSE, DMThreadEntry_private_offset + G_STRUCT_OFFSET (DMThreadEntryPrivate, unread_count_label));
}


static void dm_thread_entry_instance_init (DMThreadEntry * self) {
	self->priv = DM_THREAD_ENTRY_GET_PRIVATE (self);
	self->unread_count = 0;
	self->notification_id = NULL;
	g_type_ensure (TYPE_AVATAR_WIDGET);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void dm_thread_entry_finalize (GObject* obj) {
	DMThreadEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DM_THREAD_ENTRY, DMThreadEntry);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->screen_name_label);
	_g_object_unref0 (self->priv->last_message_label);
	_g_object_unref0 (self->priv->avatar_image);
	_g_object_unref0 (self->priv->unread_count_label);
	_g_free0 (self->notification_id);
	G_OBJECT_CLASS (dm_thread_entry_parent_class)->finalize (obj);
}


GType dm_thread_entry_get_type (void) {
	static volatile gsize dm_thread_entry_type_id__volatile = 0;
	if (g_once_init_enter (&dm_thread_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DMThreadEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dm_thread_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DMThreadEntry), 0, (GInstanceInitFunc) dm_thread_entry_instance_init, NULL };
		GType dm_thread_entry_type_id;
		dm_thread_entry_type_id = g_type_register_static (gtk_list_box_row_get_type (), "DMThreadEntry", &g_define_type_info, 0);
		g_once_init_leave (&dm_thread_entry_type_id__volatile, dm_thread_entry_type_id);
	}
	return dm_thread_entry_type_id__volatile;
}


static void _vala_dm_thread_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DMThreadEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DM_THREAD_ENTRY, DMThreadEntry);
	switch (property_id) {
		case DM_THREAD_ENTRY_USER_ID:
		g_value_set_int64 (value, dm_thread_entry_get_user_id (self));
		break;
		case DM_THREAD_ENTRY_NAME:
		g_value_set_string (value, dm_thread_entry_get_name (self));
		break;
		case DM_THREAD_ENTRY_SCREEN_NAME:
		g_value_set_string (value, dm_thread_entry_get_screen_name (self));
		break;
		case DM_THREAD_ENTRY_LAST_MESSAGE:
		g_value_set_string (value, dm_thread_entry_get_last_message (self));
		break;
		case DM_THREAD_ENTRY_LAST_MESSAGE_ID:
		g_value_set_int64 (value, dm_thread_entry_get_last_message_id (self));
		break;
		case DM_THREAD_ENTRY_AVATAR:
		g_value_take_object (value, dm_thread_entry_get_avatar (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_dm_thread_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DMThreadEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DM_THREAD_ENTRY, DMThreadEntry);
	switch (property_id) {
		case DM_THREAD_ENTRY_USER_ID:
		dm_thread_entry_set_user_id (self, g_value_get_int64 (value));
		break;
		case DM_THREAD_ENTRY_NAME:
		dm_thread_entry_set_name (self, g_value_get_string (value));
		break;
		case DM_THREAD_ENTRY_SCREEN_NAME:
		dm_thread_entry_set_screen_name (self, g_value_get_string (value));
		break;
		case DM_THREAD_ENTRY_LAST_MESSAGE:
		dm_thread_entry_set_last_message (self, g_value_get_string (value));
		break;
		case DM_THREAD_ENTRY_LAST_MESSAGE_ID:
		dm_thread_entry_set_last_message_id (self, g_value_get_int64 (value));
		break;
		case DM_THREAD_ENTRY_AVATAR:
		dm_thread_entry_set_avatar (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



