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

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

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

#define RESOURCES_ICON_LAST_IMPORT "document-open-recent-symbolic"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ())
#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry))
#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY))
#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface))

typedef struct _SidebarEntry SidebarEntry;
typedef struct _SidebarEntryIface SidebarEntryIface;

#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ())
#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree))
#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass))
#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE))
#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE))
#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass))

typedef struct _SidebarTree SidebarTree;
typedef struct _SidebarTreeClass SidebarTreeClass;

#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ())
#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry))
#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY))
#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface))

typedef struct _SidebarSelectableEntry SidebarSelectableEntry;
typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface;

#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ())
#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative))
#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE))
#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface))

typedef struct _SidebarPageRepresentative SidebarPageRepresentative;
typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface;

#define TYPE_PAGE (page_get_type ())
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))

typedef struct _Page Page;
typedef struct _PageClass PageClass;

#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ())
#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable))
#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE))
#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface))

typedef struct _SidebarContextable SidebarContextable;
typedef struct _SidebarContextableIface SidebarContextableIface;

#define SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ())
#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))

typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry;
typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass;
typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate;

#define LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY (library_hideable_page_entry_get_type ())
#define LIBRARY_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntry))
#define LIBRARY_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass))
#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY))
#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY))
#define LIBRARY_HIDEABLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass))

typedef struct _LibraryHideablePageEntry LibraryHideablePageEntry;
typedef struct _LibraryHideablePageEntryClass LibraryHideablePageEntryClass;
typedef struct _LibraryHideablePageEntryPrivate LibraryHideablePageEntryPrivate;

#define IMPORT_ROLL_TYPE_SIDEBAR_ENTRY (import_roll_sidebar_entry_get_type ())
#define IMPORT_ROLL_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry))
#define IMPORT_ROLL_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntryClass))
#define IMPORT_ROLL_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY))
#define IMPORT_ROLL_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY))
#define IMPORT_ROLL_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntryClass))

typedef struct _ImportRollSidebarEntry ImportRollSidebarEntry;
typedef struct _ImportRollSidebarEntryClass ImportRollSidebarEntryClass;
typedef struct _ImportRollSidebarEntryPrivate ImportRollSidebarEntryPrivate;

#define TYPE_IMPORT_ID (import_id_get_type ())
typedef struct _ImportID ImportID;
enum  {
	IMPORT_ROLL_SIDEBAR_ENTRY_0_PROPERTY,
	IMPORT_ROLL_SIDEBAR_ENTRY_NUM_PROPERTIES
};
static GParamSpec* import_roll_sidebar_entry_properties[IMPORT_ROLL_SIDEBAR_ENTRY_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ())
#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage))
#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))
#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE))
#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE))
#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))

typedef struct _CheckerboardPage CheckerboardPage;
typedef struct _CheckerboardPageClass CheckerboardPageClass;

#define TYPE_MEDIA_PAGE (media_page_get_type ())
#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage))
#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass))
#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE))
#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE))
#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass))

typedef struct _MediaPage MediaPage;
typedef struct _MediaPageClass MediaPageClass;

#define TYPE_COLLECTION_PAGE (collection_page_get_type ())
#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage))
#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass))
#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE))
#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE))
#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass))

typedef struct _CollectionPage CollectionPage;
typedef struct _CollectionPageClass CollectionPageClass;

#define TYPE_LAST_IMPORT_PAGE (last_import_page_get_type ())
#define LAST_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAST_IMPORT_PAGE, LastImportPage))
#define LAST_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAST_IMPORT_PAGE, LastImportPageClass))
#define IS_LAST_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAST_IMPORT_PAGE))
#define IS_LAST_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAST_IMPORT_PAGE))
#define LAST_IMPORT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAST_IMPORT_PAGE, LastImportPageClass))

typedef struct _LastImportPage LastImportPage;
typedef struct _LastImportPageClass LastImportPageClass;

struct _SidebarEntryIface {
	GTypeInterface parent_iface;
	gchar* (*get_sidebar_name) (SidebarEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarEntry* self);
	gchar* (*get_sidebar_icon) (SidebarEntry* self);
	gchar* (*to_string) (SidebarEntry* self);
	void (*grafted) (SidebarEntry* self, SidebarTree* tree);
	void (*pruned) (SidebarEntry* self, SidebarTree* tree);
};

struct _SidebarSelectableEntryIface {
	GTypeInterface parent_iface;
};

struct _SidebarPageRepresentativeIface {
	GTypeInterface parent_iface;
	gboolean (*has_page) (SidebarPageRepresentative* self);
	Page* (*get_page) (SidebarPageRepresentative* self);
};

struct _SidebarContextableIface {
	GTypeInterface parent_iface;
	GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event);
};

struct _SidebarSimplePageEntry {
	GObject parent_instance;
	SidebarSimplePageEntryPrivate * priv;
};

struct _SidebarSimplePageEntryClass {
	GObjectClass parent_class;
	gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self);
	gchar* (*to_string) (SidebarSimplePageEntry* self);
	Page* (*create_page) (SidebarSimplePageEntry* self);
};

struct _LibraryHideablePageEntry {
	SidebarSimplePageEntry parent_instance;
	LibraryHideablePageEntryPrivate * priv;
};

struct _LibraryHideablePageEntryClass {
	SidebarSimplePageEntryClass parent_class;
};

struct _ImportRollSidebarEntry {
	LibraryHideablePageEntry parent_instance;
	ImportRollSidebarEntryPrivate * priv;
};

struct _ImportRollSidebarEntryClass {
	LibraryHideablePageEntryClass parent_class;
};

struct _ImportID {
	gint64 id;
};

struct _ImportRollSidebarEntryPrivate {
	ImportID id;
	gchar* name;
};

static gint ImportRollSidebarEntry_private_offset;
static gpointer import_roll_sidebar_entry_parent_class = NULL;

VALA_EXTERN GType sidebar_tree_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarTree, g_object_unref)
VALA_EXTERN GType sidebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarEntry, g_object_unref)
VALA_EXTERN GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Page, g_object_unref)
VALA_EXTERN GType sidebar_page_representative_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType sidebar_contextable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarContextable, g_object_unref)
VALA_EXTERN GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SidebarSimplePageEntry, g_object_unref)
VALA_EXTERN GType library_hideable_page_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LibraryHideablePageEntry, g_object_unref)
VALA_EXTERN GType import_roll_sidebar_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImportRollSidebarEntry, g_object_unref)
VALA_EXTERN GType import_id_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ImportID* import_id_dup (const ImportID* self);
VALA_EXTERN void import_id_free (ImportID* self);
VALA_EXTERN gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self);
VALA_EXTERN gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self);
VALA_EXTERN Page* sidebar_simple_page_entry_create_page (SidebarSimplePageEntry* self);
VALA_EXTERN ImportRollSidebarEntry* import_roll_sidebar_entry_new (ImportID* id);
VALA_EXTERN ImportRollSidebarEntry* import_roll_sidebar_entry_construct (GType object_type,
                                                             ImportID* id);
VALA_EXTERN LibraryHideablePageEntry* library_hideable_page_entry_construct (GType object_type);
VALA_EXTERN void import_roll_sidebar_entry_get_id (ImportRollSidebarEntry* self,
                                       ImportID* result);
static gchar* import_roll_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static gchar* import_roll_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* import_roll_sidebar_entry_real_create_page (SidebarSimplePageEntry* base);
VALA_EXTERN LastImportPage* last_import_page_new_for_id (ImportID* id);
VALA_EXTERN LastImportPage* last_import_page_construct_for_id (GType object_type,
                                                   ImportID* id);
VALA_EXTERN GType checkerboard_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CheckerboardPage, g_object_unref)
VALA_EXTERN GType media_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MediaPage, g_object_unref)
VALA_EXTERN GType collection_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionPage, g_object_unref)
VALA_EXTERN GType last_import_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LastImportPage, g_object_unref)
static void import_roll_sidebar_entry_finalize (GObject * obj);
static GType import_roll_sidebar_entry_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
import_roll_sidebar_entry_get_instance_private (ImportRollSidebarEntry* self)
{
	return G_STRUCT_MEMBER_P (self, ImportRollSidebarEntry_private_offset);
}

ImportRollSidebarEntry*
import_roll_sidebar_entry_construct (GType object_type,
                                     ImportID* id)
{
	ImportRollSidebarEntry * self = NULL;
	ImportID _tmp0_;
	ImportID _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gchar* _tmp4_;
	g_return_val_if_fail (id != NULL, NULL);
	self = (ImportRollSidebarEntry*) library_hideable_page_entry_construct (object_type);
	_tmp0_ = *id;
	self->priv->id = _tmp0_;
	_tmp1_ = *id;
	_tmp2_ = g_date_time_new_from_unix_local (_tmp1_.id);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_date_time_format (_tmp3_, "%c");
	_g_free0 (self->priv->name);
	self->priv->name = _tmp4_;
	_g_date_time_unref0 (_tmp3_);
	return self;
}

ImportRollSidebarEntry*
import_roll_sidebar_entry_new (ImportID* id)
{
	return import_roll_sidebar_entry_construct (IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, id);
}

void
import_roll_sidebar_entry_get_id (ImportRollSidebarEntry* self,
                                  ImportID* result)
{
	ImportID _tmp0_;
	g_return_if_fail (IMPORT_ROLL_IS_SIDEBAR_ENTRY (self));
	_tmp0_ = self->priv->id;
	*result = _tmp0_;
	return;
}

static gchar*
import_roll_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base)
{
	ImportRollSidebarEntry * self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static gchar*
import_roll_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base)
{
	ImportRollSidebarEntry * self;
	gchar* _tmp0_;
	gchar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry);
	_tmp0_ = g_strdup (RESOURCES_ICON_LAST_IMPORT);
	result = _tmp0_;
	return result;
}

static Page*
import_roll_sidebar_entry_real_create_page (SidebarSimplePageEntry* base)
{
	ImportRollSidebarEntry * self;
	ImportID _tmp0_;
	LastImportPage* _tmp1_;
	Page* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry);
	_tmp0_ = self->priv->id;
	_tmp1_ = last_import_page_new_for_id (&_tmp0_);
	g_object_ref_sink (_tmp1_);
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
	return result;
}

static void
import_roll_sidebar_entry_class_init (ImportRollSidebarEntryClass * klass,
                                      gpointer klass_data)
{
	import_roll_sidebar_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ImportRollSidebarEntry_private_offset);
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry*)) import_roll_sidebar_entry_real_get_sidebar_name;
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry*)) import_roll_sidebar_entry_real_get_sidebar_icon;
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry*)) import_roll_sidebar_entry_real_create_page;
	G_OBJECT_CLASS (klass)->finalize = import_roll_sidebar_entry_finalize;
}

static void
import_roll_sidebar_entry_instance_init (ImportRollSidebarEntry * self,
                                         gpointer klass)
{
	self->priv = import_roll_sidebar_entry_get_instance_private (self);
}

static void
import_roll_sidebar_entry_finalize (GObject * obj)
{
	ImportRollSidebarEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, IMPORT_ROLL_TYPE_SIDEBAR_ENTRY, ImportRollSidebarEntry);
	_g_free0 (self->priv->name);
	G_OBJECT_CLASS (import_roll_sidebar_entry_parent_class)->finalize (obj);
}

static GType
import_roll_sidebar_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ImportRollSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_roll_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportRollSidebarEntry), 0, (GInstanceInitFunc) import_roll_sidebar_entry_instance_init, NULL };
	GType import_roll_sidebar_entry_type_id;
	import_roll_sidebar_entry_type_id = g_type_register_static (LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, "ImportRollSidebarEntry", &g_define_type_info, 0);
	ImportRollSidebarEntry_private_offset = g_type_add_instance_private (import_roll_sidebar_entry_type_id, sizeof (ImportRollSidebarEntryPrivate));
	return import_roll_sidebar_entry_type_id;
}

GType
import_roll_sidebar_entry_get_type (void)
{
	static volatile gsize import_roll_sidebar_entry_type_id__once = 0;
	if (g_once_init_enter (&import_roll_sidebar_entry_type_id__once)) {
		GType import_roll_sidebar_entry_type_id;
		import_roll_sidebar_entry_type_id = import_roll_sidebar_entry_get_type_once ();
		g_once_init_leave (&import_roll_sidebar_entry_type_id__once, import_roll_sidebar_entry_type_id);
	}
	return import_roll_sidebar_entry_type_id__once;
}

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

