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

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

#include <glib.h>
#include <glib-object.h>
#include "seahorse-common.h"
#include <gio/gio.h>






void seahorse_lockable_lock (SeahorseLockable* self, GTlsInteraction* interaction, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 22 "/data/src/seahorse/common/lockable.vala"
	SEAHORSE_LOCKABLE_GET_INTERFACE (self)->lock (self, interaction, cancellable, _callback_, _user_data_);
#line 37 "lockable.c"
}


gboolean seahorse_lockable_lock_finish (SeahorseLockable* self, GAsyncResult* _res_, GError** error) {
#line 22 "/data/src/seahorse/common/lockable.vala"
	return SEAHORSE_LOCKABLE_GET_INTERFACE (self)->lock_finish (self, _res_, error);
#line 44 "lockable.c"
}


void seahorse_lockable_unlock (SeahorseLockable* self, GTlsInteraction* interaction, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 22 "/data/src/seahorse/common/lockable.vala"
	SEAHORSE_LOCKABLE_GET_INTERFACE (self)->unlock (self, interaction, cancellable, _callback_, _user_data_);
#line 51 "lockable.c"
}


gboolean seahorse_lockable_unlock_finish (SeahorseLockable* self, GAsyncResult* _res_, GError** error) {
#line 22 "/data/src/seahorse/common/lockable.vala"
	return SEAHORSE_LOCKABLE_GET_INTERFACE (self)->unlock_finish (self, _res_, error);
#line 58 "lockable.c"
}


gboolean seahorse_lockable_can_lock (GObject* object) {
	gboolean result = FALSE;
	GObject* _tmp0_ = NULL;
#line 32 "/data/src/seahorse/common/lockable.vala"
	g_return_val_if_fail (object != NULL, FALSE);
#line 33 "/data/src/seahorse/common/lockable.vala"
	_tmp0_ = object;
#line 33 "/data/src/seahorse/common/lockable.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, SEAHORSE_TYPE_LOCKABLE)) {
#line 71 "lockable.c"
		GObject* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
#line 34 "/data/src/seahorse/common/lockable.vala"
		_tmp1_ = object;
#line 34 "/data/src/seahorse/common/lockable.vala"
		_tmp2_ = seahorse_lockable_get_lockable (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SEAHORSE_TYPE_LOCKABLE, SeahorseLockable));
#line 34 "/data/src/seahorse/common/lockable.vala"
		_tmp3_ = _tmp2_;
#line 34 "/data/src/seahorse/common/lockable.vala"
		result = _tmp3_;
#line 34 "/data/src/seahorse/common/lockable.vala"
		return result;
#line 85 "lockable.c"
	}
#line 35 "/data/src/seahorse/common/lockable.vala"
	result = FALSE;
#line 35 "/data/src/seahorse/common/lockable.vala"
	return result;
#line 91 "lockable.c"
}


gboolean seahorse_lockable_can_unlock (GObject* object) {
	gboolean result = FALSE;
	GObject* _tmp0_ = NULL;
#line 38 "/data/src/seahorse/common/lockable.vala"
	g_return_val_if_fail (object != NULL, FALSE);
#line 39 "/data/src/seahorse/common/lockable.vala"
	_tmp0_ = object;
#line 39 "/data/src/seahorse/common/lockable.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, SEAHORSE_TYPE_LOCKABLE)) {
#line 104 "lockable.c"
		GObject* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
#line 40 "/data/src/seahorse/common/lockable.vala"
		_tmp1_ = object;
#line 40 "/data/src/seahorse/common/lockable.vala"
		_tmp2_ = seahorse_lockable_get_unlockable (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SEAHORSE_TYPE_LOCKABLE, SeahorseLockable));
#line 40 "/data/src/seahorse/common/lockable.vala"
		_tmp3_ = _tmp2_;
#line 40 "/data/src/seahorse/common/lockable.vala"
		result = _tmp3_;
#line 40 "/data/src/seahorse/common/lockable.vala"
		return result;
#line 118 "lockable.c"
	}
#line 41 "/data/src/seahorse/common/lockable.vala"
	result = FALSE;
#line 41 "/data/src/seahorse/common/lockable.vala"
	return result;
#line 124 "lockable.c"
}


gboolean seahorse_lockable_get_lockable (SeahorseLockable* self) {
#line 23 "/data/src/seahorse/common/lockable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 23 "/data/src/seahorse/common/lockable.vala"
	return SEAHORSE_LOCKABLE_GET_INTERFACE (self)->get_lockable (self);
#line 133 "lockable.c"
}


gboolean seahorse_lockable_get_unlockable (SeahorseLockable* self) {
#line 24 "/data/src/seahorse/common/lockable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 24 "/data/src/seahorse/common/lockable.vala"
	return SEAHORSE_LOCKABLE_GET_INTERFACE (self)->get_unlockable (self);
#line 142 "lockable.c"
}


static void seahorse_lockable_base_init (SeahorseLockableIface * iface) {
#line 22 "/data/src/seahorse/common/lockable.vala"
	static gboolean initialized = FALSE;
#line 22 "/data/src/seahorse/common/lockable.vala"
	if (!initialized) {
#line 22 "/data/src/seahorse/common/lockable.vala"
		initialized = TRUE;
#line 22 "/data/src/seahorse/common/lockable.vala"
		g_object_interface_install_property (iface, g_param_spec_boolean ("lockable", "lockable", "lockable", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 22 "/data/src/seahorse/common/lockable.vala"
		g_object_interface_install_property (iface, g_param_spec_boolean ("unlockable", "unlockable", "unlockable", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 157 "lockable.c"
	}
}


GType seahorse_lockable_get_type (void) {
	static volatile gsize seahorse_lockable_type_id__volatile = 0;
	if (g_once_init_enter (&seahorse_lockable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SeahorseLockableIface), (GBaseInitFunc) seahorse_lockable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType seahorse_lockable_type_id;
		seahorse_lockable_type_id = g_type_register_static (G_TYPE_INTERFACE, "SeahorseLockable", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (seahorse_lockable_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&seahorse_lockable_type_id__volatile, seahorse_lockable_type_id);
	}
	return seahorse_lockable_type_id__volatile;
}



