/* Fo
 * fo-xml-doc.h: Boxed object type for libxml2 xmlDoc document
 *
 * Copyright (C) 2003 Sun Microsystems
 *
 * $Id: fo-xml-doc.h,v 1.3 2003/05/16 10:47:46 tonygraham Exp $
 *
 * See Copying for the status of this software.
 */

#ifndef __FO_XML_DOC_H__
#define __FO_XML_DOC_H__

#include <libfo/fo-utils.h>
#include <libfo/fo-libfo-context.h>

G_BEGIN_DECLS

#define FO_XML_DOC_ERROR fo_xml_doc_error_quark ()
GQuark fo_xml_doc_error_quark (void);

typedef enum
{
  FO_XML_DOC_ERROR_FAILED,
  FO_XML_DOC_ERROR_PARSE_FAILED,
  FO_XML_DOC_ERROR_NO_FILENAME,
  FO_XML_DOC_ERROR_NO_SGML_CATALOG_FILES
} FoXmlDocError;

typedef struct _FoXmlDoc FoXmlDoc;

#define FO_TYPE_XML_DOC             (fo_xml_doc_get_type ())
#define FO_IS_XML_DOC(object)       (G_TYPE_CHECK_INSTANCE_TYPE ((object), FO_TYPE_XML_DOC))

GType      fo_xml_doc_get_type (void);
FoXmlDoc * fo_xml_doc_new      (void);
FoXmlDoc * fo_xml_doc_ref      (FoXmlDoc  *fo_xml_doc);
void       fo_xml_doc_unref    (FoXmlDoc  *fo_xml_doc);
gboolean   fo_xml_doc_parse    (FoXmlDoc       *fo_xml_doc,
				FoLibfoContext *libfo_context,
				GError        **error);
const gchar * fo_xml_doc_get_filename (FoXmlDoc    *fo_xml_doc);
void          fo_xml_doc_set_filename (FoXmlDoc    *fo_xml_doc,
				       const gchar *filename);
G_END_DECLS

#endif /* !__FO_XML_DOC_H__ */
