/* backend.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from backend.vala, do not modify */

/*
 * Seahorse
 *
 * 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 "seahorse-common.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

static GType seahorse_backend_get_type_once (void);

SeahorsePlace*
seahorse_backend_lookup_place (SeahorseBackend* self,
                               const gchar* uri)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->lookup_place) {
		return _iface_->lookup_place (self, uri);
	}
	return NULL;
}

void
seahorse_backend_register (SeahorseBackend* self)
{
	seahorse_registry_register_object ((GObject*) self, "backend");
}

GList*
seahorse_backend_get_registered (void)
{
	GList* _tmp0_;
	GList* result;
	_tmp0_ = seahorse_registry_object_instances ("backend");
	result = (GList*) _tmp0_;
	return result;
}

const gchar*
seahorse_backend_get_name (SeahorseBackend* self)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

const gchar*
seahorse_backend_get_label (SeahorseBackend* self)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_label) {
		return _iface_->get_label (self);
	}
	return NULL;
}

const gchar*
seahorse_backend_get_description (SeahorseBackend* self)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_description) {
		return _iface_->get_description (self);
	}
	return NULL;
}

SeahorseActionGroup*
seahorse_backend_get_actions (SeahorseBackend* self)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_actions) {
		return _iface_->get_actions (self);
	}
	return NULL;
}

gboolean
seahorse_backend_get_loaded (SeahorseBackend* self)
{
	SeahorseBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SEAHORSE_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_loaded) {
		return _iface_->get_loaded (self);
	}
	return FALSE;
}

static void
seahorse_backend_default_init (SeahorseBackendIface * iface,
                               gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("actions", "actions", "actions", SEAHORSE_TYPE_ACTION_GROUP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("loaded", "loaded", "loaded", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

 G_GNUC_NO_INLINE static GType
seahorse_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeahorseBackendIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seahorse_backend_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType seahorse_backend_type_id;
	seahorse_backend_type_id = g_type_register_static (G_TYPE_INTERFACE, "SeahorseBackend", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (seahorse_backend_type_id, gcr_collection_get_type ());
	return seahorse_backend_type_id;
}

GType
seahorse_backend_get_type (void)
{
	static volatile gsize seahorse_backend_type_id__once = 0;
	if (g_once_init_enter (&seahorse_backend_type_id__once)) {
		GType seahorse_backend_type_id;
		seahorse_backend_type_id = seahorse_backend_get_type_once ();
		g_once_init_leave (&seahorse_backend_type_id__once, seahorse_backend_type_id);
	}
	return seahorse_backend_type_id__once;
}

