/* libxml-NamedNodeMap.c generated by valac 0.28.1, the Vala compiler
 * generated from libxml-NamedNodeMap.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* Node.vala
 *
 * Copyright (C) 2011-2013  Richard Schwarting <aquarichy@gmail.com>
 * Copyright (C) 2011,2014-2015  Daniel Espinosa <esodan@gmail.com>
 *
 * 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.

 * This library 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
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Richard Schwarting <aquarichy@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define GXML_TYPE_NAMED_NODE_MAP (gxml_named_node_map_get_type ())
#define GXML_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMED_NODE_MAP, GXmlNamedNodeMap))
#define GXML_IS_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMED_NODE_MAP))
#define GXML_NAMED_NODE_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NAMED_NODE_MAP, GXmlNamedNodeMapIface))

typedef struct _GXmlNamedNodeMap GXmlNamedNodeMap;
typedef struct _GXmlNamedNodeMapIface GXmlNamedNodeMapIface;

struct _GXmlNamedNodeMapIface {
	GTypeInterface parent_iface;
	gpointer (*get_named_item) (GXmlNamedNodeMap* self, const gchar* name);
	gpointer (*set_named_item) (GXmlNamedNodeMap* self, gconstpointer item);
	gpointer (*remove_named_item) (GXmlNamedNodeMap* self, const gchar* name);
	gpointer (*item) (GXmlNamedNodeMap* self, gulong index);
	gulong (*get_length) (GXmlNamedNodeMap* self);
};



GType gxml_named_node_map_get_type (void) G_GNUC_CONST;
gpointer gxml_named_node_map_get_named_item (GXmlNamedNodeMap* self, const gchar* name);
gpointer gxml_named_node_map_set_named_item (GXmlNamedNodeMap* self, gconstpointer item);
gpointer gxml_named_node_map_remove_named_item (GXmlNamedNodeMap* self, const gchar* name);
gpointer gxml_named_node_map_item (GXmlNamedNodeMap* self, gulong index);
gulong gxml_named_node_map_get_length (GXmlNamedNodeMap* self);


gpointer gxml_named_node_map_get_named_item (GXmlNamedNodeMap* self, const gchar* name) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_NAMED_NODE_MAP_GET_INTERFACE (self)->get_named_item (self, name);
}


gpointer gxml_named_node_map_set_named_item (GXmlNamedNodeMap* self, gconstpointer item) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_NAMED_NODE_MAP_GET_INTERFACE (self)->set_named_item (self, item);
}


gpointer gxml_named_node_map_remove_named_item (GXmlNamedNodeMap* self, const gchar* name) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_NAMED_NODE_MAP_GET_INTERFACE (self)->remove_named_item (self, name);
}


gpointer gxml_named_node_map_item (GXmlNamedNodeMap* self, gulong index) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_NAMED_NODE_MAP_GET_INTERFACE (self)->item (self, index);
}


gulong gxml_named_node_map_get_length (GXmlNamedNodeMap* self) {
	g_return_val_if_fail (self != NULL, 0UL);
	return GXML_NAMED_NODE_MAP_GET_INTERFACE (self)->get_length (self);
}


static void gxml_named_node_map_base_init (GXmlNamedNodeMapIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_object_interface_install_property (iface, g_param_spec_ulong ("length", "length", "length", 0, G_MAXULONG, 0UL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	}
}


/**
 * DOM API. A collection of elements with a named objects.
 */
GType gxml_named_node_map_get_type (void) {
	static volatile gsize gxml_named_node_map_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_named_node_map_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlNamedNodeMapIface), (GBaseInitFunc) gxml_named_node_map_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gxml_named_node_map_type_id;
		gxml_named_node_map_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlNamedNodeMap", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gxml_named_node_map_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&gxml_named_node_map_type_id__volatile, gxml_named_node_map_type_id);
	}
	return gxml_named_node_map_type_id__volatile;
}



