/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* gdome-xml-attribute.h
 *
 * Copyright (C) 1999 Raph Levien <raph@acm.org>
 * Copyright (C) 2000 Mathieu Lacage <mathieu@gnu.org>
 * Copyright (C) 2001 Paolo Casarini <paolo@casarini.org>
 *
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


/* -------------------------------------------------------------- */
/* ---------------------------  Attr  --------------------------- */
/* -------------------------------------------------------------- */


#ifndef GDOME_ATTRIBUTE_FILE
#define GDOME_ATTRIBUTE_FILE

struct _GdomeAttrVtab {
	GdomeNodeVtab super;
	GdomeDOMString *(*name) (GdomeAttr *self, GdomeException *exc);
	GdomeElement *(*ownerElement) (GdomeAttr *self, GdomeException *exc);
	GdomeBoolean (*specified) (GdomeAttr *self, GdomeException *exc);
	GdomeDOMString *(*value) (GdomeAttr *self, GdomeException *exc);
	void (*set_value) (GdomeAttr *self, GdomeDOMString *value, GdomeException *exc);
};

typedef struct _Gdome_xml_Attr Gdome_xml_Attr;
struct _Gdome_xml_Attr {
	GdomeAttr super;
	const GdomeAttrVtab *vtab;
	int refcnt;
	xmlAttr *n;
	GdomeAccessType accessType;
	Gdome_xml_ListenerList *ll;
};

GdomeNode *          gdome_xml_a_mkref_ns        (xmlNode *node,
																									xmlNs *ns);
void                 gdome_xml_a_unref_ns        (GdomeNode *self,
																									GdomeException *exc);
gpointer             gdome_xml_a_query_interface (GdomeNode *self,
																									const char *interface, 
																									GdomeException *exc);
GdomeBoolean         gdome_xml_a_specified       (GdomeAttr *self, 
																									GdomeException *exc);
GdomeDOMString *     gdome_xml_a_name            (GdomeAttr *self,
																									GdomeException *exc);
GdomeElement *       gdome_xml_a_ownerElement    (GdomeAttr *self,
																									GdomeException *exc);
GdomeDOMString *     gdome_xml_a_value           (GdomeAttr *self,
																									GdomeException *exc);
void                 gdome_xml_a_set_value       (GdomeAttr *self,
																									GdomeDOMString *nodeValue, 
																									GdomeException *exc);
extern const GdomeAttrVtab gdome_xml_a_vtab;


#endif /* GDOME_ATTRIBUTE_FILE */
