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

/*
 Copyright (C) 2014 Christian Dywan <christian@twotoasts.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 "toolbar-editor.h"
#include <stdlib.h>
#include <string.h>

enum  {
	ADBLOCK_OPTIONS_0_PROPERTY,
	ADBLOCK_OPTIONS_NUM_PROPERTIES
};
static GParamSpec* adblock_options_properties[ADBLOCK_OPTIONS_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

struct _AdblockOptionsPrivate {
	GHashTable* optslist;
};


static gpointer adblock_options_parent_class = NULL;

#define ADBLOCK_OPTIONS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ADBLOCK_TYPE_OPTIONS, AdblockOptionsPrivate))
static void _g_free0_ (gpointer var);
static void adblock_options_finalize (GObject * obj);


AdblockOptions* adblock_options_construct (GType object_type) {
	AdblockOptions * self = NULL;
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	self = (AdblockOptions*) g_object_new (object_type, NULL);
#line 17 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	adblock_options_clear (self);
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	return self;
#line 49 "options.c"
}


AdblockOptions* adblock_options_new (void) {
#line 16 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	return adblock_options_construct (ADBLOCK_TYPE_OPTIONS);
#line 56 "options.c"
}


void adblock_options_insert (AdblockOptions* self, const gchar* sig, const gchar* opts) {
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_return_if_fail (self != NULL);
#line 20 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_return_if_fail (sig != NULL);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp0_ = self->priv->optslist;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp1_ = sig;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp3_ = opts;
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 21 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_hash_table_insert (_tmp0_, _tmp2_, _tmp4_);
#line 82 "options.c"
}


gchar* adblock_options_lookup (AdblockOptions* self, const gchar* sig) {
	gchar* result = NULL;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_;
	gchar* _tmp3_;
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 24 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_return_val_if_fail (sig != NULL, NULL);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp0_ = self->priv->optslist;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp1_ = sig;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp3_ = g_strdup ((const gchar*) _tmp2_);
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	result = _tmp3_;
#line 25 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	return result;
#line 108 "options.c"
}


static void _g_free0_ (gpointer var) {
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	var = (g_free (var), NULL);
#line 115 "options.c"
}


void adblock_options_clear (AdblockOptions* self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
#line 28 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_return_if_fail (self != NULL);
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp0_ = g_str_hash;
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp1_ = g_str_equal;
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_g_hash_table_unref0 (self->priv->optslist);
#line 29 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	self->priv->optslist = _tmp2_;
#line 135 "options.c"
}


static void adblock_options_class_init (AdblockOptionsClass * klass) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	adblock_options_parent_class = g_type_class_peek_parent (klass);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	g_type_class_add_private (klass, sizeof (AdblockOptionsPrivate));
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	G_OBJECT_CLASS (klass)->finalize = adblock_options_finalize;
#line 146 "options.c"
}


static void adblock_options_instance_init (AdblockOptions * self) {
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	self->priv = ADBLOCK_OPTIONS_GET_PRIVATE (self);
#line 153 "options.c"
}


static void adblock_options_finalize (GObject * obj) {
	AdblockOptions * self;
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ADBLOCK_TYPE_OPTIONS, AdblockOptions);
#line 14 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	_g_hash_table_unref0 (self->priv->optslist);
#line 13 "/usr/src/ports/midori/midori-0.5.11-2.x86_64/src/midori-0.5.11/extensions/adblock/options.vala"
	G_OBJECT_CLASS (adblock_options_parent_class)->finalize (obj);
#line 165 "options.c"
}


GType adblock_options_get_type (void) {
	static volatile gsize adblock_options_type_id__volatile = 0;
	if (g_once_init_enter (&adblock_options_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdblockOptionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adblock_options_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdblockOptions), 0, (GInstanceInitFunc) adblock_options_instance_init, NULL };
		GType adblock_options_type_id;
		adblock_options_type_id = g_type_register_static (G_TYPE_OBJECT, "AdblockOptions", &g_define_type_info, 0);
		g_once_init_leave (&adblock_options_type_id__volatile, adblock_options_type_id);
	}
	return adblock_options_type_id__volatile;
}



