File: fo-xml-doc.h

package info (click to toggle)
xmlroff 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 36,456 kB
  • ctags: 25,964
  • sloc: ansic: 178,200; xml: 109,155; sh: 8,973; makefile: 1,331; perl: 30
file content (61 lines) | stat: -rw-r--r-- 1,832 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Fo
 * fo-xml-doc.h: Boxed object type for libxml2 xmlDoc document
 *
 * Copyright (C) 2003 Sun Microsystems
 * Copyright (C) 2007 Menteith Consulting Ltd
 *
 * 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>
#include <libfo/libfo-version.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_FILENAME_PARSE_FAILED,
  FO_XML_DOC_ERROR_MEMORY_PARSE_FAILED,
  FO_XML_DOC_ERROR_NO_FILENAME
} 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);

const LibfoVersionInfo * fo_xml_doc_version_info (void);

FoXmlDoc * fo_xml_doc_new_from_filename (const gchar    *filename,
					 FoLibfoContext *libfo_context,
					 GError        **error);
FoXmlDoc * fo_xml_doc_new_from_memory   (const gchar    *buffer,
					 gint            size,
					 const gchar    *URL,
					 const gchar    *encoding,
					 FoLibfoContext *libfo_context,
					 GError        **error);
FoXmlDoc * fo_xml_doc_new_from_string   (const gchar    *curr,
					 const gchar    *URL,
					 const gchar    *encoding,
					 FoLibfoContext *libfo_context,
					 GError        **error);
FoXmlDoc * fo_xml_doc_ref               (FoXmlDoc       *fo_xml_doc);
void       fo_xml_doc_unref             (FoXmlDoc       *fo_xml_doc);

gchar*     fo_xml_doc_get_base          (FoXmlDoc       *fo_xml_doc);
void       fo_xml_doc_set_base          (FoXmlDoc       *fo_xml_doc,
					 const gchar    *URL);
G_END_DECLS

#endif /* !__FO_XML_DOC_H__ */