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

/*
 Copyright (C) 2013 Christian Dywan <christian@twotoats.de>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 See the file COPYING for the full license text.
*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <sqlite3.h>


#define MIDORI_TYPE_HISTORY_ITEM (midori_history_item_get_type ())
#define MIDORI_HISTORY_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItem))
#define MIDORI_HISTORY_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItemClass))
#define MIDORI_IS_HISTORY_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_HISTORY_ITEM))
#define MIDORI_IS_HISTORY_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_HISTORY_ITEM))
#define MIDORI_HISTORY_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItemClass))

typedef struct _MidoriHistoryItem MidoriHistoryItem;
typedef struct _MidoriHistoryItemClass MidoriHistoryItemClass;
typedef struct _MidoriHistoryItemPrivate MidoriHistoryItemPrivate;

#define MIDORI_TYPE_HISTORY_WEBSITE (midori_history_website_get_type ())
#define MIDORI_HISTORY_WEBSITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsite))
#define MIDORI_HISTORY_WEBSITE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsiteClass))
#define MIDORI_IS_HISTORY_WEBSITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_HISTORY_WEBSITE))
#define MIDORI_IS_HISTORY_WEBSITE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_HISTORY_WEBSITE))
#define MIDORI_HISTORY_WEBSITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsiteClass))

typedef struct _MidoriHistoryWebsite MidoriHistoryWebsite;
typedef struct _MidoriHistoryWebsiteClass MidoriHistoryWebsiteClass;
typedef struct _MidoriHistoryWebsitePrivate MidoriHistoryWebsitePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#define MIDORI_TYPE_HISTORY_SEARCH (midori_history_search_get_type ())
#define MIDORI_HISTORY_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearch))
#define MIDORI_HISTORY_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearchClass))
#define MIDORI_IS_HISTORY_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_HISTORY_SEARCH))
#define MIDORI_IS_HISTORY_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_HISTORY_SEARCH))
#define MIDORI_HISTORY_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearchClass))

typedef struct _MidoriHistorySearch MidoriHistorySearch;
typedef struct _MidoriHistorySearchClass MidoriHistorySearchClass;
typedef struct _MidoriHistorySearchPrivate MidoriHistorySearchPrivate;

#define MIDORI_TYPE_DATABASE (midori_database_get_type ())
#define MIDORI_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_DATABASE, MidoriDatabase))
#define MIDORI_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_DATABASE, MidoriDatabaseClass))
#define MIDORI_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_DATABASE))
#define MIDORI_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_DATABASE))
#define MIDORI_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_DATABASE, MidoriDatabaseClass))

typedef struct _MidoriDatabase MidoriDatabase;
typedef struct _MidoriDatabaseClass MidoriDatabaseClass;
typedef struct _MidoriDatabasePrivate MidoriDatabasePrivate;

#define MIDORI_TYPE_HISTORY_DATABASE (midori_history_database_get_type ())
#define MIDORI_HISTORY_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_HISTORY_DATABASE, MidoriHistoryDatabase))
#define MIDORI_HISTORY_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_HISTORY_DATABASE, MidoriHistoryDatabaseClass))
#define MIDORI_IS_HISTORY_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_HISTORY_DATABASE))
#define MIDORI_IS_HISTORY_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_HISTORY_DATABASE))
#define MIDORI_HISTORY_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_HISTORY_DATABASE, MidoriHistoryDatabaseClass))

typedef struct _MidoriHistoryDatabase MidoriHistoryDatabase;
typedef struct _MidoriHistoryDatabaseClass MidoriHistoryDatabaseClass;
typedef struct _MidoriHistoryDatabasePrivate MidoriHistoryDatabasePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define MIDORI_TYPE_BOOKMARKS_DATABASE (midori_bookmarks_database_get_type ())
#define MIDORI_BOOKMARKS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_BOOKMARKS_DATABASE, MidoriBookmarksDatabase))
#define MIDORI_BOOKMARKS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_BOOKMARKS_DATABASE, MidoriBookmarksDatabaseClass))
#define MIDORI_IS_BOOKMARKS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_BOOKMARKS_DATABASE))
#define MIDORI_IS_BOOKMARKS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_BOOKMARKS_DATABASE))
#define MIDORI_BOOKMARKS_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_BOOKMARKS_DATABASE, MidoriBookmarksDatabaseClass))

typedef struct _MidoriBookmarksDatabase MidoriBookmarksDatabase;
typedef struct _MidoriBookmarksDatabaseClass MidoriBookmarksDatabaseClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define MIDORI_TYPE_DATABASE_STATEMENT (midori_database_statement_get_type ())
#define MIDORI_DATABASE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_DATABASE_STATEMENT, MidoriDatabaseStatement))
#define MIDORI_DATABASE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_DATABASE_STATEMENT, MidoriDatabaseStatementClass))
#define MIDORI_IS_DATABASE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_DATABASE_STATEMENT))
#define MIDORI_IS_DATABASE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_DATABASE_STATEMENT))
#define MIDORI_DATABASE_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_DATABASE_STATEMENT, MidoriDatabaseStatementClass))

typedef struct _MidoriDatabaseStatement MidoriDatabaseStatement;
typedef struct _MidoriDatabaseStatementClass MidoriDatabaseStatementClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _MidoriHistoryDatabaseQueryData MidoriHistoryDatabaseQueryData;
typedef struct _MidoriHistoryDatabaseListByCountWithBookmarksData MidoriHistoryDatabaseListByCountWithBookmarksData;

struct _MidoriHistoryItem {
	GObject parent_instance;
	MidoriHistoryItemPrivate * priv;
};

struct _MidoriHistoryItemClass {
	GObjectClass parent_class;
};

struct _MidoriHistoryWebsite {
	MidoriHistoryItem parent_instance;
	MidoriHistoryWebsitePrivate * priv;
};

struct _MidoriHistoryWebsiteClass {
	MidoriHistoryItemClass parent_class;
};

struct _MidoriHistoryWebsitePrivate {
	gchar* _uri;
};

struct _MidoriHistorySearch {
	MidoriHistoryItem parent_instance;
	MidoriHistorySearchPrivate * priv;
};

struct _MidoriHistorySearchClass {
	MidoriHistoryItemClass parent_class;
};

struct _MidoriHistorySearchPrivate {
	gchar* _uri;
	gchar* _keywords;
};

struct _MidoriHistoryItemPrivate {
	gchar* _title;
	gint64 _date;
};

typedef enum  {
	MIDORI_DATABASE_ERROR_OPEN,
	MIDORI_DATABASE_ERROR_NAMING,
	MIDORI_DATABASE_ERROR_FILENAME,
	MIDORI_DATABASE_ERROR_EXECUTE,
	MIDORI_DATABASE_ERROR_COMPILE,
	MIDORI_DATABASE_ERROR_TYPE
} MidoriDatabaseError;
#define MIDORI_DATABASE_ERROR midori_database_error_quark ()
struct _MidoriDatabase {
	GObject parent_instance;
	MidoriDatabasePrivate * priv;
	gboolean trace;
	sqlite3* _db;
};

struct _MidoriDatabaseClass {
	GObjectClass parent_class;
	gboolean (*init) (MidoriDatabase* self, GCancellable* cancellable, GError** error);
};

struct _MidoriHistoryDatabase {
	MidoriDatabase parent_instance;
	MidoriHistoryDatabasePrivate * priv;
};

struct _MidoriHistoryDatabaseClass {
	MidoriDatabaseClass parent_class;
};

struct _MidoriHistoryDatabaseQueryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MidoriHistoryDatabase* self;
	gchar* sqlcmd;
	gchar* filter;
	gint64 day;
	gint64 max_items;
	GCancellable* cancellable;
	GList* result;
	sqlite3* _tmp0_;
	sqlite3* _tmp1_;
	MidoriDatabaseStatement* statement;
	gchar* real_filter;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	MidoriDatabaseStatement* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gint64 _tmp12_;
	MidoriDatabaseStatement* _tmp13_;
	MidoriDatabaseStatement* _tmp14_;
	GError* _error_;
	const gchar* _tmp15_;
	GError* _tmp16_;
	const gchar* _tmp17_;
	GList* items;
	gboolean _tmp18_;
	MidoriDatabaseStatement* _tmp19_;
	gboolean _tmp20_;
	gint64 type;
	MidoriDatabaseStatement* _tmp21_;
	gint64 _tmp22_;
	gint64 date;
	MidoriDatabaseStatement* _tmp23_;
	gint64 _tmp24_;
	gint64 _tmp25_;
	gchar* uri;
	MidoriDatabaseStatement* _tmp26_;
	gchar* _tmp27_;
	gchar* title;
	MidoriDatabaseStatement* _tmp28_;
	gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gint64 _tmp32_;
	MidoriHistoryWebsite* _tmp33_;
	gchar* _vala1_uri;
	MidoriDatabaseStatement* _tmp34_;
	gchar* _tmp35_;
	gchar* _vala1_title;
	MidoriDatabaseStatement* _tmp36_;
	gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gint64 _tmp40_;
	MidoriHistorySearch* _tmp41_;
	guint src;
	guint _tmp42_;
	guint _tmp43_;
	GCancellable* _tmp44_;
	gboolean _tmp45_;
	GError* _vala1__error_;
	const gchar* _tmp46_;
	GError* _tmp47_;
	const gchar* _tmp48_;
	GCancellable* _tmp49_;
	gboolean _tmp50_;
	GError * _inner_error_;
};

struct _MidoriHistoryDatabaseListByCountWithBookmarksData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MidoriHistoryDatabase* self;
	gchar* filter;
	gint max_items;
	GCancellable* cancellable;
	GList* result;
	const gchar* sqlcmd;
	const gchar* _tmp0_;
	gint _tmp1_;
	GCancellable* _tmp2_;
	GList* _tmp3_;
};


static gpointer midori_history_website_parent_class = NULL;
static gpointer midori_history_search_parent_class = NULL;
static gpointer midori_history_item_parent_class = NULL;
static gpointer midori_history_database_parent_class = NULL;

GType midori_history_item_get_type (void) G_GNUC_CONST;
GType midori_history_website_get_type (void) G_GNUC_CONST;
#define MIDORI_HISTORY_WEBSITE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsitePrivate))
enum  {
	MIDORI_HISTORY_WEBSITE_DUMMY_PROPERTY,
	MIDORI_HISTORY_WEBSITE_URI
};
MidoriHistoryWebsite* midori_history_website_new (const gchar* uri, const gchar* title, gint64 date);
MidoriHistoryWebsite* midori_history_website_construct (GType object_type, const gchar* uri, const gchar* title, gint64 date);
const gchar* midori_history_website_get_uri (MidoriHistoryWebsite* self);
void midori_history_website_set_uri (MidoriHistoryWebsite* self, const gchar* value);
static void midori_history_website_finalize (GObject* obj);
static void _vala_midori_history_website_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_midori_history_website_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType midori_history_search_get_type (void) G_GNUC_CONST;
#define MIDORI_HISTORY_SEARCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearchPrivate))
enum  {
	MIDORI_HISTORY_SEARCH_DUMMY_PROPERTY,
	MIDORI_HISTORY_SEARCH_URI,
	MIDORI_HISTORY_SEARCH_KEYWORDS
};
MidoriHistorySearch* midori_history_search_new (const gchar* uri, const gchar* keywords, gint64 date);
MidoriHistorySearch* midori_history_search_construct (GType object_type, const gchar* uri, const gchar* keywords, gint64 date);
const gchar* midori_history_search_get_uri (MidoriHistorySearch* self);
void midori_history_search_set_uri (MidoriHistorySearch* self, const gchar* value);
const gchar* midori_history_search_get_keywords (MidoriHistorySearch* self);
void midori_history_search_set_keywords (MidoriHistorySearch* self, const gchar* value);
static void midori_history_search_finalize (GObject* obj);
static void _vala_midori_history_search_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_midori_history_search_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define MIDORI_HISTORY_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItemPrivate))
enum  {
	MIDORI_HISTORY_ITEM_DUMMY_PROPERTY,
	MIDORI_HISTORY_ITEM_TITLE,
	MIDORI_HISTORY_ITEM_DATE
};
MidoriHistoryItem* midori_history_item_new (void);
MidoriHistoryItem* midori_history_item_construct (GType object_type);
const gchar* midori_history_item_get_title (MidoriHistoryItem* self);
void midori_history_item_set_title (MidoriHistoryItem* self, const gchar* value);
gint64 midori_history_item_get_date (MidoriHistoryItem* self);
void midori_history_item_set_date (MidoriHistoryItem* self, gint64 value);
static void midori_history_item_finalize (GObject* obj);
static void _vala_midori_history_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_midori_history_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType midori_database_get_type (void) G_GNUC_CONST;
GQuark midori_database_error_quark (void);
GType midori_history_database_get_type (void) G_GNUC_CONST;
enum  {
	MIDORI_HISTORY_DATABASE_DUMMY_PROPERTY
};
MidoriHistoryDatabase* midori_history_database_new (GObject* app, GError** error);
MidoriHistoryDatabase* midori_history_database_construct (GType object_type, GObject* app, GError** error);
gboolean midori_database_init (MidoriDatabase* self, GCancellable* cancellable, GError** error);
GType midori_bookmarks_database_get_type (void) G_GNUC_CONST;
MidoriBookmarksDatabase* midori_bookmarks_database_new (GError** error);
MidoriBookmarksDatabase* midori_bookmarks_database_construct (GType object_type, GError** error);
gboolean midori_database_attach (MidoriDatabase* self, const gchar* path, const gchar* alias, GError** error);
const gchar* midori_database_get_path (MidoriDatabase* self);
gboolean midori_database_exec (MidoriDatabase* self, const gchar* query, GError** error);
gboolean midori_database_exec_script (MidoriDatabase* self, const gchar* filename, GError** error);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void midori_history_database_query_data_free (gpointer _data);
void midori_history_database_query (MidoriHistoryDatabase* self, const gchar* sqlcmd, const gchar* filter, gint64 day, gint64 max_items, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* midori_history_database_query_finish (MidoriHistoryDatabase* self, GAsyncResult* _res_);
static gboolean midori_history_database_query_co (MidoriHistoryDatabaseQueryData* _data_);
sqlite3* midori_database_get_db (MidoriDatabase* self);
GType midori_database_statement_get_type (void) G_GNUC_CONST;
MidoriDatabaseStatement* midori_database_prepare (MidoriDatabase* self, const gchar* query, GError** error, ...);
gboolean midori_database_statement_step (MidoriDatabaseStatement* self, GError** error);
gint64 midori_database_statement_get_int64 (MidoriDatabaseStatement* self, const gchar* name, GError** error);
gchar* midori_database_statement_get_string (MidoriDatabaseStatement* self, const gchar* name, GError** error);
static gboolean _midori_history_database_query_co_gsource_func (gpointer self);
static void midori_history_database_list_by_count_with_bookmarks_data_free (gpointer _data);
void midori_history_database_list_by_count_with_bookmarks (MidoriHistoryDatabase* self, const gchar* filter, gint max_items, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* midori_history_database_list_by_count_with_bookmarks_finish (MidoriHistoryDatabase* self, GAsyncResult* _res_);
static gboolean midori_history_database_list_by_count_with_bookmarks_co (MidoriHistoryDatabaseListByCountWithBookmarksData* _data_);
static void midori_history_database_list_by_count_with_bookmarks_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean midori_history_database_insert (MidoriHistoryDatabase* self, const gchar* uri, const gchar* title, gint64 date, gint64 day, GError** error);
gboolean midori_database_statement_exec (MidoriDatabaseStatement* self, GError** error);
gboolean midori_history_database_clear (MidoriHistoryDatabase* self, gint64 maximum_age, GError** error);


MidoriHistoryWebsite* midori_history_website_construct (GType object_type, const gchar* uri, const gchar* title, gint64 date) {
	MidoriHistoryWebsite * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = uri;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = title;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = date;
#line 16 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = (MidoriHistoryWebsite*) g_object_new (object_type, "uri", _tmp0_, "title", _tmp1_, "date", _tmp2_, NULL);
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return self;
#line 380 "midori-historydatabase.c"
}


MidoriHistoryWebsite* midori_history_website_new (const gchar* uri, const gchar* title, gint64 date) {
#line 15 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return midori_history_website_construct (MIDORI_TYPE_HISTORY_WEBSITE, uri, title, date);
#line 387 "midori-historydatabase.c"
}


const gchar* midori_history_website_get_uri (MidoriHistoryWebsite* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = self->priv->_uri;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp0_;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 402 "midori-historydatabase.c"
}


void midori_history_website_set_uri (MidoriHistoryWebsite* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_if_fail (self != NULL);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = value;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_uri);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv->_uri = _tmp1_;
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_notify ((GObject *) self, "uri");
#line 421 "midori-historydatabase.c"
}


static void midori_history_website_class_init (MidoriHistoryWebsiteClass * klass) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_website_parent_class = g_type_class_peek_parent (klass);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_type_class_add_private (klass, sizeof (MidoriHistoryWebsitePrivate));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_midori_history_website_get_property;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_midori_history_website_set_property;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_history_website_finalize;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), MIDORI_HISTORY_WEBSITE_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 438 "midori-historydatabase.c"
}


static void midori_history_website_instance_init (MidoriHistoryWebsite * self) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv = MIDORI_HISTORY_WEBSITE_GET_PRIVATE (self);
#line 445 "midori-historydatabase.c"
}


static void midori_history_website_finalize (GObject* obj) {
	MidoriHistoryWebsite * self;
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsite);
#line 14 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_uri);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (midori_history_website_parent_class)->finalize (obj);
#line 457 "midori-historydatabase.c"
}


GType midori_history_website_get_type (void) {
	static volatile gsize midori_history_website_type_id__volatile = 0;
	if (g_once_init_enter (&midori_history_website_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHistoryWebsiteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_history_website_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHistoryWebsite), 0, (GInstanceInitFunc) midori_history_website_instance_init, NULL };
		GType midori_history_website_type_id;
		midori_history_website_type_id = g_type_register_static (MIDORI_TYPE_HISTORY_ITEM, "MidoriHistoryWebsite", &g_define_type_info, 0);
		g_once_init_leave (&midori_history_website_type_id__volatile, midori_history_website_type_id);
	}
	return midori_history_website_type_id__volatile;
}


static void _vala_midori_history_website_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	MidoriHistoryWebsite * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsite);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_WEBSITE_URI:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_value_set_string (value, midori_history_website_get_uri (self));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 484 "midori-historydatabase.c"
		default:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 490 "midori-historydatabase.c"
	}
}


static void _vala_midori_history_website_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	MidoriHistoryWebsite * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_WEBSITE, MidoriHistoryWebsite);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_WEBSITE_URI:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_history_website_set_uri (self, g_value_get_string (value));
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 506 "midori-historydatabase.c"
		default:
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 512 "midori-historydatabase.c"
	}
}


MidoriHistorySearch* midori_history_search_construct (GType object_type, const gchar* uri, const gchar* keywords, gint64 date) {
	MidoriHistorySearch * self = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gint64 _tmp6_ = 0LL;
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (keywords != NULL, NULL);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = uri;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = keywords;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = _ ("Search for %s");
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = keywords;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp4_ = g_strdup_printf (_tmp2_, _tmp3_);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp5_ = _tmp4_;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp6_ = date;
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = (MidoriHistorySearch*) g_object_new (object_type, "uri", _tmp0_, "keywords", _tmp1_, "title", _tmp5_, "date", _tmp6_, NULL);
#line 26 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_tmp5_);
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return self;
#line 550 "midori-historydatabase.c"
}


MidoriHistorySearch* midori_history_search_new (const gchar* uri, const gchar* keywords, gint64 date) {
#line 25 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return midori_history_search_construct (MIDORI_TYPE_HISTORY_SEARCH, uri, keywords, date);
#line 557 "midori-historydatabase.c"
}


const gchar* midori_history_search_get_uri (MidoriHistorySearch* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = self->priv->_uri;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp0_;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 572 "midori-historydatabase.c"
}


void midori_history_search_set_uri (MidoriHistorySearch* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_if_fail (self != NULL);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = value;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_uri);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv->_uri = _tmp1_;
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_notify ((GObject *) self, "uri");
#line 591 "midori-historydatabase.c"
}


const gchar* midori_history_search_get_keywords (MidoriHistorySearch* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = self->priv->_keywords;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp0_;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 606 "midori-historydatabase.c"
}


void midori_history_search_set_keywords (MidoriHistorySearch* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_if_fail (self != NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = value;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_keywords);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv->_keywords = _tmp1_;
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_notify ((GObject *) self, "keywords");
#line 625 "midori-historydatabase.c"
}


static void midori_history_search_class_init (MidoriHistorySearchClass * klass) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_search_parent_class = g_type_class_peek_parent (klass);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_type_class_add_private (klass, sizeof (MidoriHistorySearchPrivate));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_midori_history_search_get_property;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_midori_history_search_set_property;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_history_search_finalize;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), MIDORI_HISTORY_SEARCH_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), MIDORI_HISTORY_SEARCH_KEYWORDS, g_param_spec_string ("keywords", "keywords", "keywords", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 644 "midori-historydatabase.c"
}


static void midori_history_search_instance_init (MidoriHistorySearch * self) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv = MIDORI_HISTORY_SEARCH_GET_PRIVATE (self);
#line 651 "midori-historydatabase.c"
}


static void midori_history_search_finalize (GObject* obj) {
	MidoriHistorySearch * self;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearch);
#line 23 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_uri);
#line 24 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_keywords);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (midori_history_search_parent_class)->finalize (obj);
#line 665 "midori-historydatabase.c"
}


GType midori_history_search_get_type (void) {
	static volatile gsize midori_history_search_type_id__volatile = 0;
	if (g_once_init_enter (&midori_history_search_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHistorySearchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_history_search_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHistorySearch), 0, (GInstanceInitFunc) midori_history_search_instance_init, NULL };
		GType midori_history_search_type_id;
		midori_history_search_type_id = g_type_register_static (MIDORI_TYPE_HISTORY_ITEM, "MidoriHistorySearch", &g_define_type_info, 0);
		g_once_init_leave (&midori_history_search_type_id__volatile, midori_history_search_type_id);
	}
	return midori_history_search_type_id__volatile;
}


static void _vala_midori_history_search_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	MidoriHistorySearch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearch);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_SEARCH_URI:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_value_set_string (value, midori_history_search_get_uri (self));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_SEARCH_KEYWORDS:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_value_set_string (value, midori_history_search_get_keywords (self));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 698 "midori-historydatabase.c"
		default:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 704 "midori-historydatabase.c"
	}
}


static void _vala_midori_history_search_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	MidoriHistorySearch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_SEARCH, MidoriHistorySearch);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_SEARCH_URI:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_history_search_set_uri (self, g_value_get_string (value));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_SEARCH_KEYWORDS:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_history_search_set_keywords (self, g_value_get_string (value));
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 726 "midori-historydatabase.c"
		default:
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 732 "midori-historydatabase.c"
	}
}


MidoriHistoryItem* midori_history_item_construct (GType object_type) {
	MidoriHistoryItem * self = NULL;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = (MidoriHistoryItem*) g_object_new (object_type, NULL);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return self;
#line 743 "midori-historydatabase.c"
}


MidoriHistoryItem* midori_history_item_new (void) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return midori_history_item_construct (MIDORI_TYPE_HISTORY_ITEM);
#line 750 "midori-historydatabase.c"
}


const gchar* midori_history_item_get_title (MidoriHistoryItem* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = self->priv->_title;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp0_;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 765 "midori-historydatabase.c"
}


void midori_history_item_set_title (MidoriHistoryItem* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_if_fail (self != NULL);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = value;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_title);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv->_title = _tmp1_;
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_notify ((GObject *) self, "title");
#line 784 "midori-historydatabase.c"
}


gint64 midori_history_item_get_date (MidoriHistoryItem* self) {
	gint64 result;
	gint64 _tmp0_ = 0LL;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, 0LL);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = self->priv->_date;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp0_;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 799 "midori-historydatabase.c"
}


void midori_history_item_set_date (MidoriHistoryItem* self, gint64 value) {
	gint64 _tmp0_ = 0LL;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_if_fail (self != NULL);
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = value;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv->_date = _tmp0_;
#line 35 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_notify ((GObject *) self, "date");
#line 813 "midori-historydatabase.c"
}


static void midori_history_item_class_init (MidoriHistoryItemClass * klass) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_item_parent_class = g_type_class_peek_parent (klass);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_type_class_add_private (klass, sizeof (MidoriHistoryItemPrivate));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_midori_history_item_get_property;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_midori_history_item_set_property;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (klass)->finalize = midori_history_item_finalize;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), MIDORI_HISTORY_ITEM_TITLE, g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), MIDORI_HISTORY_ITEM_DATE, g_param_spec_int64 ("date", "date", "date", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 832 "midori-historydatabase.c"
}


static void midori_history_item_instance_init (MidoriHistoryItem * self) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self->priv = MIDORI_HISTORY_ITEM_GET_PRIVATE (self);
#line 839 "midori-historydatabase.c"
}


static void midori_history_item_finalize (GObject* obj) {
	MidoriHistoryItem * self;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItem);
#line 34 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (self->priv->_title);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	G_OBJECT_CLASS (midori_history_item_parent_class)->finalize (obj);
#line 851 "midori-historydatabase.c"
}


GType midori_history_item_get_type (void) {
	static volatile gsize midori_history_item_type_id__volatile = 0;
	if (g_once_init_enter (&midori_history_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHistoryItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_history_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHistoryItem), 0, (GInstanceInitFunc) midori_history_item_instance_init, NULL };
		GType midori_history_item_type_id;
		midori_history_item_type_id = g_type_register_static (G_TYPE_OBJECT, "MidoriHistoryItem", &g_define_type_info, 0);
		g_once_init_leave (&midori_history_item_type_id__volatile, midori_history_item_type_id);
	}
	return midori_history_item_type_id__volatile;
}


static void _vala_midori_history_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	MidoriHistoryItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItem);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_ITEM_TITLE:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_value_set_string (value, midori_history_item_get_title (self));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_ITEM_DATE:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_value_set_int64 (value, midori_history_item_get_date (self));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 884 "midori-historydatabase.c"
		default:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 890 "midori-historydatabase.c"
	}
}


static void _vala_midori_history_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	MidoriHistoryItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, MIDORI_TYPE_HISTORY_ITEM, MidoriHistoryItem);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (property_id) {
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_ITEM_TITLE:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_history_item_set_title (self, g_value_get_string (value));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case MIDORI_HISTORY_ITEM_DATE:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_history_item_set_date (self, g_value_get_int64 (value));
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 912 "midori-historydatabase.c"
		default:
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 33 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		break;
#line 918 "midori-historydatabase.c"
	}
}


MidoriHistoryDatabase* midori_history_database_construct (GType object_type, GObject* app, GError** error) {
	MidoriHistoryDatabase * self = NULL;
	MidoriBookmarksDatabase* bookmarks_database = NULL;
	MidoriBookmarksDatabase* _tmp0_ = NULL;
	MidoriBookmarksDatabase* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 40 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	self = (MidoriHistoryDatabase*) g_object_new (object_type, "path", "history.db", NULL);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_database_init ((MidoriDatabase*) self, NULL, &_inner_error_);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (self);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 945 "midori-historydatabase.c"
		} else {
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 41 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 953 "midori-historydatabase.c"
		}
	}
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = midori_bookmarks_database_new (&_inner_error_);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	bookmarks_database = _tmp0_;
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (self);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 970 "midori-historydatabase.c"
		} else {
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 42 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 978 "midori-historydatabase.c"
		}
	}
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = bookmarks_database;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = midori_database_get_path ((MidoriDatabase*) _tmp1_);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = _tmp2_;
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_database_attach ((MidoriDatabase*) self, _tmp3_, "bookmarks", &_inner_error_);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (bookmarks_database);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (self);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 1001 "midori-historydatabase.c"
		} else {
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (bookmarks_database);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 43 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 1011 "midori-historydatabase.c"
		}
	}
	{
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_database_exec ((MidoriDatabase*) self, "SELECT day FROM history LIMIT 1", &_inner_error_);
#line 46 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1019 "midori-historydatabase.c"
			goto __catch21_g_error;
		}
	}
	goto __finally21;
	__catch21_g_error:
	{
		GError* _error_ = NULL;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_error_ = _inner_error_;
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_inner_error_ = NULL;
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		midori_database_exec_script ((MidoriDatabase*) self, "Day", &_inner_error_);
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 48 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_error_free0 (_error_);
#line 1037 "midori-historydatabase.c"
			goto __finally21;
		}
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_error_free0 (_error_);
#line 1042 "midori-historydatabase.c"
	}
	__finally21:
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (bookmarks_database);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (self);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 1057 "midori-historydatabase.c"
		} else {
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (bookmarks_database);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 45 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return NULL;
#line 1067 "midori-historydatabase.c"
		}
	}
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (bookmarks_database);
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return self;
#line 1074 "midori-historydatabase.c"
}


MidoriHistoryDatabase* midori_history_database_new (GObject* app, GError** error) {
#line 39 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return midori_history_database_construct (MIDORI_TYPE_HISTORY_DATABASE, app, error);
#line 1081 "midori-historydatabase.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1088 "midori-historydatabase.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_list_free (self);
#line 1097 "midori-historydatabase.c"
}


static void midori_history_database_query_data_free (gpointer _data) {
	MidoriHistoryDatabaseQueryData* _data_;
	_data_ = _data;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->sqlcmd);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->filter);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->cancellable);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->self);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_slice_free (MidoriHistoryDatabaseQueryData, _data_);
#line 1116 "midori-historydatabase.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return self ? g_object_ref (self) : NULL;
#line 1123 "midori-historydatabase.c"
}


void midori_history_database_query (MidoriHistoryDatabase* self, const gchar* sqlcmd, const gchar* filter, gint64 day, gint64 max_items, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriHistoryDatabaseQueryData* _data_;
	MidoriHistoryDatabase* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gint64 _tmp5_ = 0LL;
	gint64 _tmp6_ = 0LL;
	GCancellable* _tmp7_ = NULL;
	GCancellable* _tmp8_ = NULL;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_ = g_slice_new0 (MidoriHistoryDatabaseQueryData);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_history_database_query);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_history_database_query_data_free);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->self = _tmp0_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = sqlcmd;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->sqlcmd);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->sqlcmd = _tmp2_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = filter;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->filter);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->filter = _tmp4_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp5_ = day;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->day = _tmp5_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp6_ = max_items;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->max_items = _tmp6_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp7_ = cancellable;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->cancellable);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->cancellable = _tmp8_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_database_query_co (_data_);
#line 1182 "midori-historydatabase.c"
}


GList* midori_history_database_query_finish (MidoriHistoryDatabase* self, GAsyncResult* _res_) {
	GList* result;
	MidoriHistoryDatabaseQueryData* _data_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _data_->result;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->result = NULL;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 1197 "midori-historydatabase.c"
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1282 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1210 "midori-historydatabase.c"
	{
		GRegex* regex = NULL;
		const gchar* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		GRegex* _tmp3_ = NULL;
		GRegex* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		GRegex* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp0_ = old;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_free0 (_tmp2_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		regex = _tmp4_;
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1241 "midori-historydatabase.c"
				goto __catch23_g_regex_error;
			}
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1284 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			return NULL;
#line 1250 "midori-historydatabase.c"
		}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp6_ = regex;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp7_ = replacement;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) (-1), 0, _tmp7_, 0, &_inner_error_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = _tmp8_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1266 "midori-historydatabase.c"
				goto __catch23_g_regex_error;
			}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
			return NULL;
#line 1277 "midori-historydatabase.c"
		}
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp9_ = _tmp5_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_tmp5_ = NULL;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		result = _tmp9_;
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_free0 (_tmp5_);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1285 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return result;
#line 1291 "midori-historydatabase.c"
	}
	goto __finally23;
	__catch23_g_regex_error:
	{
		GError* e = NULL;
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1287 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 1305 "midori-historydatabase.c"
	}
	__finally23:
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1283 "/usr/share/vala-0.26/vapi/glib-2.0.vapi"
		return NULL;
#line 1316 "midori-historydatabase.c"
	}
}


static gboolean _midori_history_database_query_co_gsource_func (gpointer self) {
	gboolean result;
	result = midori_history_database_query_co (self);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 1326 "midori-historydatabase.c"
}


static gboolean midori_history_database_query_co (MidoriHistoryDatabaseQueryData* _data_) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (_data_->_state_) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case 0:
#line 1335 "midori-historydatabase.c"
		goto _state_0;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case 1:
#line 1339 "midori-historydatabase.c"
		goto _state_1;
		default:
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_assert_not_reached ();
#line 1344 "midori-historydatabase.c"
	}
	_state_0:
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp0_ = NULL;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp0_ = midori_database_get_db ((MidoriDatabase*) _data_->self);
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp1_ = NULL;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 53 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (_data_->_tmp1_ != NULL, NULL);
#line 1357 "midori-historydatabase.c"
	{
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp2_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp2_ = _data_->filter;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp3_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp3_ = string_replace (_data_->_tmp2_, " ", "%");
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp4_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp4_ = _data_->_tmp3_;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp5_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp5_ = g_strconcat ("%", _data_->_tmp4_, NULL);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp6_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp7_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp7_ = g_strconcat (_data_->_tmp6_, "%", NULL);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp8_ = NULL;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_free0 (_data_->_tmp6_);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_free0 (_data_->_tmp4_);
#line 58 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->real_filter = _data_->_tmp8_;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp10_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp10_ = _data_->sqlcmd;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp11_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp11_ = _data_->real_filter;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp12_ = 0LL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp12_ = _data_->max_items;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp13_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp13_ = midori_database_prepare ((MidoriDatabase*) _data_->self, _data_->_tmp10_, &_data_->_inner_error_, ":filter", G_TYPE_STRING, _data_->_tmp11_, ":limit", G_TYPE_INT64, _data_->_tmp12_, NULL);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp9_ = _data_->_tmp13_;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_free0 (_data_->real_filter);
#line 1415 "midori-historydatabase.c"
			goto __catch22_g_error;
		}
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp14_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp14_ = _data_->_tmp9_;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp9_ = NULL;
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->statement);
#line 59 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->statement = _data_->_tmp14_;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->_tmp9_);
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_free0 (_data_->real_filter);
#line 1432 "midori-historydatabase.c"
	}
	goto __finally22;
	__catch22_g_error:
	{
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_inner_error_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp15_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp15_ = _ ("Failed to select from history: %s");
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp16_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp16_ = _data_->_error_;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp17_ = NULL;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp17_ = _data_->_tmp16_->message;
#line 63 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_critical (_data_->_tmp15_, _data_->_tmp17_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->result = NULL;
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_error_free0 (_data_->_error_);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->statement);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_data_->_state_ == 0) {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1465 "midori-historydatabase.c"
		} else {
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1469 "midori-historydatabase.c"
		}
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_object_unref (_data_->_async_result);
#line 64 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		return FALSE;
#line 1475 "midori-historydatabase.c"
	}
	__finally22:
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->statement);
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_clear_error (&_data_->_inner_error_);
#line 57 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		return FALSE;
#line 1488 "midori-historydatabase.c"
	}
#line 67 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->items = NULL;
#line 1492 "midori-historydatabase.c"
	{
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		while (TRUE) {
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp19_ = NULL;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp19_ = _data_->statement;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp20_ = FALSE;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp20_ = midori_database_statement_step (_data_->_tmp19_, &_data_->_inner_error_);
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp18_ = _data_->_tmp20_;
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1508 "midori-historydatabase.c"
				goto __catch24_g_error;
			}
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			if (!_data_->_tmp18_) {
#line 69 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				break;
#line 1515 "midori-historydatabase.c"
			}
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp21_ = NULL;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp21_ = _data_->statement;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp22_ = 0LL;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp22_ = midori_database_statement_get_int64 (_data_->_tmp21_, "type", &_data_->_inner_error_);
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->type = _data_->_tmp22_;
#line 70 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1529 "midori-historydatabase.c"
				goto __catch24_g_error;
			}
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp23_ = NULL;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp23_ = _data_->statement;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp24_ = 0LL;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp24_ = midori_database_statement_get_int64 (_data_->_tmp23_, "date", &_data_->_inner_error_);
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->date = _data_->_tmp24_;
#line 71 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1544 "midori-historydatabase.c"
				goto __catch24_g_error;
			}
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp25_ = 0LL;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp25_ = _data_->type;
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			switch (_data_->_tmp25_) {
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				case 1:
#line 1555 "midori-historydatabase.c"
				{
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp26_ = NULL;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp26_ = _data_->statement;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp27_ = NULL;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp27_ = midori_database_statement_get_string (_data_->_tmp26_, "uri", &_data_->_inner_error_);
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->uri = _data_->_tmp27_;
#line 74 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1569 "midori-historydatabase.c"
						goto __catch24_g_error;
					}
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp28_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp28_ = _data_->statement;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp29_ = NULL;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp29_ = midori_database_statement_get_string (_data_->_tmp28_, "title", &_data_->_inner_error_);
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->title = _data_->_tmp29_;
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 75 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
						_g_free0 (_data_->uri);
#line 1586 "midori-historydatabase.c"
						goto __catch24_g_error;
					}
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp30_ = NULL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp30_ = _data_->uri;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp31_ = NULL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp31_ = _data_->title;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp32_ = 0LL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp32_ = _data_->date;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp33_ = NULL;
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp33_ = midori_history_website_new (_data_->_tmp30_, _data_->_tmp31_, _data_->_tmp32_);
#line 76 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->items = g_list_append (_data_->items, (MidoriHistoryItem*) _data_->_tmp33_);
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_g_free0 (_data_->title);
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_g_free0 (_data_->uri);
#line 77 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					break;
#line 1613 "midori-historydatabase.c"
				}
#line 72 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				case 2:
#line 1617 "midori-historydatabase.c"
				{
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp34_ = NULL;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp34_ = _data_->statement;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp35_ = NULL;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp35_ = midori_database_statement_get_string (_data_->_tmp34_, "uri", &_data_->_inner_error_);
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_vala1_uri = _data_->_tmp35_;
#line 79 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1631 "midori-historydatabase.c"
						goto __catch24_g_error;
					}
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp36_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp36_ = _data_->statement;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp37_ = NULL;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp37_ = midori_database_statement_get_string (_data_->_tmp36_, "title", &_data_->_inner_error_);
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_vala1_title = _data_->_tmp37_;
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 80 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
						_g_free0 (_data_->_vala1_uri);
#line 1648 "midori-historydatabase.c"
						goto __catch24_g_error;
					}
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp38_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp38_ = _data_->_vala1_uri;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp39_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp39_ = _data_->_vala1_title;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp40_ = 0LL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp40_ = _data_->date;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp41_ = NULL;
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->_tmp41_ = midori_history_search_new (_data_->_tmp38_, _data_->_tmp39_, _data_->_tmp40_);
#line 81 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_data_->items = g_list_append (_data_->items, (MidoriHistoryItem*) _data_->_tmp41_);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_g_free0 (_data_->_vala1_title);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					_g_free0 (_data_->_vala1_uri);
#line 82 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					break;
#line 1675 "midori-historydatabase.c"
				}
				default:
				{
#line 84 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					g_warn_if_reached ();
#line 85 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					break;
#line 1683 "midori-historydatabase.c"
				}
			}
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp42_ = 0U;
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp42_ = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _midori_history_database_query_co_gsource_func, _data_, NULL);
#line 88 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->src = _data_->_tmp42_;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_state_ = 1;
#line 89 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 1696 "midori-historydatabase.c"
			_state_1:
			;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp43_ = 0U;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp43_ = _data_->src;
#line 90 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_source_remove (_data_->_tmp43_);
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp44_ = NULL;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp44_ = _data_->cancellable;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp45_ = FALSE;
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_data_->_tmp45_ = g_cancellable_is_cancelled (_data_->_tmp44_);
#line 92 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			if (_data_->_tmp45_) {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				_data_->result = NULL;
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				__g_list_free__g_object_unref0_0 (_data_->items);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				_g_object_unref0 (_data_->statement);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				if (_data_->_state_ == 0) {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1725 "midori-historydatabase.c"
				} else {
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
					g_simple_async_result_complete (_data_->_async_result);
#line 1729 "midori-historydatabase.c"
				}
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				g_object_unref (_data_->_async_result);
#line 93 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
				return FALSE;
#line 1735 "midori-historydatabase.c"
			}
		}
	}
	goto __finally24;
	__catch24_g_error:
	{
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_vala1__error_ = _data_->_inner_error_;
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_inner_error_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp46_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp46_ = _ ("Failed to select from history: %s");
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp47_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp47_ = _data_->_vala1__error_;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp48_ = NULL;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->_tmp48_ = _data_->_tmp47_->message;
#line 96 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_critical (_data_->_tmp46_, _data_->_tmp48_);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_error_free0 (_data_->_vala1__error_);
#line 1762 "midori-historydatabase.c"
	}
	__finally24:
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		__g_list_free__g_object_unref0_0 (_data_->items);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->statement);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_clear_error (&_data_->_inner_error_);
#line 68 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		return FALSE;
#line 1777 "midori-historydatabase.c"
	}
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp49_ = NULL;
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp49_ = _data_->cancellable;
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp50_ = FALSE;
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp50_ = g_cancellable_is_cancelled (_data_->_tmp49_);
#line 99 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (_data_->_tmp50_) {
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_data_->result = NULL;
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		__g_list_free__g_object_unref0_0 (_data_->items);
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		_g_object_unref0 (_data_->statement);
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_data_->_state_ == 0) {
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1799 "midori-historydatabase.c"
		} else {
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1803 "midori-historydatabase.c"
		}
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_object_unref (_data_->_async_result);
#line 100 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		return FALSE;
#line 1809 "midori-historydatabase.c"
	}
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->result = _data_->items;
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->statement);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (_data_->_state_ == 0) {
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1819 "midori-historydatabase.c"
	} else {
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1823 "midori-historydatabase.c"
	}
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_unref (_data_->_async_result);
#line 101 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return FALSE;
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	__g_list_free__g_object_unref0_0 (_data_->items);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->statement);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (_data_->_state_ == 0) {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1837 "midori-historydatabase.c"
	} else {
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1841 "midori-historydatabase.c"
	}
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_unref (_data_->_async_result);
#line 52 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return FALSE;
#line 1847 "midori-historydatabase.c"
}


static void midori_history_database_list_by_count_with_bookmarks_data_free (gpointer _data) {
	MidoriHistoryDatabaseListByCountWithBookmarksData* _data_;
	_data_ = _data;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->filter);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->cancellable);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->self);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_slice_free (MidoriHistoryDatabaseListByCountWithBookmarksData, _data_);
#line 1864 "midori-historydatabase.c"
}


void midori_history_database_list_by_count_with_bookmarks (MidoriHistoryDatabase* self, const gchar* filter, gint max_items, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MidoriHistoryDatabaseListByCountWithBookmarksData* _data_;
	MidoriHistoryDatabase* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GCancellable* _tmp4_ = NULL;
	GCancellable* _tmp5_ = NULL;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_ = g_slice_new0 (MidoriHistoryDatabaseListByCountWithBookmarksData);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, midori_history_database_list_by_count_with_bookmarks);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, midori_history_database_list_by_count_with_bookmarks_data_free);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->self = _tmp0_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = filter;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_free0 (_data_->filter);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->filter = _tmp2_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = max_items;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->max_items = _tmp3_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp4_ = cancellable;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (_data_->cancellable);
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->cancellable = _tmp5_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_database_list_by_count_with_bookmarks_co (_data_);
#line 1908 "midori-historydatabase.c"
}


GList* midori_history_database_list_by_count_with_bookmarks_finish (MidoriHistoryDatabase* self, GAsyncResult* _res_) {
	GList* result;
	MidoriHistoryDatabaseListByCountWithBookmarksData* _data_;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _data_->result;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->result = NULL;
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 1923 "midori-historydatabase.c"
}


static void midori_history_database_list_by_count_with_bookmarks_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MidoriHistoryDatabaseListByCountWithBookmarksData* _data_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_ = _user_data_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_source_object_ = source_object;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_res_ = _res_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_database_list_by_count_with_bookmarks_co (_data_);
#line 1937 "midori-historydatabase.c"
}


static gboolean midori_history_database_list_by_count_with_bookmarks_co (MidoriHistoryDatabaseListByCountWithBookmarksData* _data_) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	switch (_data_->_state_) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case 0:
#line 1946 "midori-historydatabase.c"
		goto _state_0;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		case 1:
#line 1950 "midori-historydatabase.c"
		goto _state_1;
		default:
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_assert_not_reached ();
#line 1955 "midori-historydatabase.c"
	}
	_state_0:
#line 105 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->sqlcmd = "\n" \
"                SELECT type, date, uri, title FROM (\n" \
"                SELECT 1 AS type, date, uri, title, count() AS ct FROM" \
" history\n" \
"                WHERE uri LIKE :filter OR title LIKE :filter GROUP BY " \
"uri\n" \
"                UNION ALL\n" \
"                SELECT 2 AS type, day AS date, replace(uri, '%s', keyw" \
"ords) AS uri,\n" \
"                       keywords AS title, count() AS ct FROM search\n" \
"                WHERE uri LIKE :filter OR title LIKE :filter GROUP BY " \
"uri\n" \
"                UNION ALL\n" \
"                SELECT 1 AS type, last_visit AS date, uri, title, 50 A" \
"S ct FROM bookmarks\n" \
"                WHERE title LIKE :filter OR uri LIKE :filter AND uri !" \
"='' AND uri NOT LIKE 'javascript:%'\n" \
"                ) GROUP BY uri ORDER BY ct DESC LIMIT :limit\n" \
"                ";
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp0_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp0_ = _data_->filter;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp1_ = 0;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp1_ = _data_->max_items;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp2_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp2_ = _data_->cancellable;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_state_ = 1;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_database_query (_data_->self, _data_->sqlcmd, _data_->_tmp0_, (gint64) 0, (gint64) _data_->_tmp1_, _data_->_tmp2_, midori_history_database_list_by_count_with_bookmarks_ready, _data_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return FALSE;
#line 1978 "midori-historydatabase.c"
	_state_1:
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp3_ = NULL;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->_tmp3_ = midori_history_database_query_finish (_data_->self, _data_->_res_);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_data_->result = _data_->_tmp3_;
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (_data_->_state_ == 0) {
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1990 "midori-historydatabase.c"
	} else {
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1994 "midori-historydatabase.c"
	}
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_unref (_data_->_async_result);
#line 118 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return FALSE;
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (_data_->_state_ == 0) {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2004 "midori-historydatabase.c"
	} else {
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2008 "midori-historydatabase.c"
	}
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_object_unref (_data_->_async_result);
#line 104 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return FALSE;
#line 2014 "midori-historydatabase.c"
}


gboolean midori_history_database_insert (MidoriHistoryDatabase* self, const gchar* uri, const gchar* title, gint64 date, gint64 day, GError** error) {
	gboolean result = FALSE;
	const gchar* sqlcmd = NULL;
	MidoriDatabaseStatement* statement = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gint64 _tmp3_ = 0LL;
	gint64 _tmp4_ = 0LL;
	MidoriDatabaseStatement* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	MidoriDatabaseStatement* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	GError * _inner_error_ = NULL;
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 121 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (title != NULL, FALSE);
#line 122 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	sqlcmd = "INSERT INTO history (uri, title, date, day) VALUES (:uri, :title, :dat" \
"e, :day)";
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = sqlcmd;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = uri;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = title;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = date;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp4_ = day;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp5_ = midori_database_prepare ((MidoriDatabase*) self, _tmp0_, &_inner_error_, ":uri", G_TYPE_STRING, _tmp1_, ":title", G_TYPE_STRING, _tmp2_, ":date", G_TYPE_INT64, _tmp3_, ":day", G_TYPE_INT64, _tmp4_, NULL);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	statement = _tmp5_;
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2062 "midori-historydatabase.c"
		} else {
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 123 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2070 "midori-historydatabase.c"
		}
	}
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp7_ = statement;
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp8_ = midori_database_statement_exec (_tmp7_, &_inner_error_);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp6_ = _tmp8_;
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (statement);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2089 "midori-historydatabase.c"
		} else {
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (statement);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2099 "midori-historydatabase.c"
		}
	}
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp6_;
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (statement);
#line 128 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 2108 "midori-historydatabase.c"
}


gboolean midori_history_database_clear (MidoriHistoryDatabase* self, gint64 maximum_age, GError** error) {
	gboolean result = FALSE;
	const gchar* sqlcmd = NULL;
	MidoriDatabaseStatement* statement = NULL;
	const gchar* _tmp0_ = NULL;
	gint64 _tmp1_ = 0LL;
	MidoriDatabaseStatement* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	MidoriDatabaseStatement* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GError * _inner_error_ = NULL;
#line 131 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 132 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	sqlcmd = "\n" \
"                DELETE FROM history WHERE\n" \
"                (julianday(date('now')) - julianday(date(date,'unixepo" \
"ch')))\n" \
"                >= :maximum_age;\n" \
"                DELETE FROM search WHERE\n" \
"                (julianday(date('now')) - julianday(date(date,'unixepo" \
"ch')))\n" \
"                >= :maximum_age;\n" \
"                ";
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp0_ = sqlcmd;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp1_ = maximum_age;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp2_ = midori_database_prepare ((MidoriDatabase*) self, _tmp0_, &_inner_error_, ":maximum_age", G_TYPE_INT64, _tmp1_, NULL);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	statement = _tmp2_;
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2143 "midori-historydatabase.c"
		} else {
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 140 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2151 "midori-historydatabase.c"
		}
	}
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp4_ = statement;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp5_ = midori_database_statement_exec (_tmp4_, &_inner_error_);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_tmp3_ = _tmp5_;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
		if (_inner_error_->domain == MIDORI_DATABASE_ERROR) {
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (statement);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2170 "midori-historydatabase.c"
		} else {
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			_g_object_unref0 (statement);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			g_clear_error (&_inner_error_);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
			return FALSE;
#line 2180 "midori-historydatabase.c"
		}
	}
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	result = _tmp3_;
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	_g_object_unref0 (statement);
#line 142 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	return result;
#line 2189 "midori-historydatabase.c"
}


static void midori_history_database_class_init (MidoriHistoryDatabaseClass * klass) {
#line 38 "/usr/src/ports/midori/midori-0.5.10-1.i686/src/midori/midori-historydatabase.vala"
	midori_history_database_parent_class = g_type_class_peek_parent (klass);
#line 2196 "midori-historydatabase.c"
}


static void midori_history_database_instance_init (MidoriHistoryDatabase * self) {
}


GType midori_history_database_get_type (void) {
	static volatile gsize midori_history_database_type_id__volatile = 0;
	if (g_once_init_enter (&midori_history_database_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MidoriHistoryDatabaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) midori_history_database_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MidoriHistoryDatabase), 0, (GInstanceInitFunc) midori_history_database_instance_init, NULL };
		GType midori_history_database_type_id;
		midori_history_database_type_id = g_type_register_static (MIDORI_TYPE_DATABASE, "MidoriHistoryDatabase", &g_define_type_info, 0);
		g_once_init_leave (&midori_history_database_type_id__volatile, midori_history_database_type_id);
	}
	return midori_history_database_type_id__volatile;
}



