Debian Codegraph @

libgdome/xpath/gdome-xpath-xpresult.h

raw
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
2 /* gdome-xpath-xpresult.h
3 *
4 * CopyRight (C) 2002 T.J. Mather <[email protected]>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #ifndef GDOME_XPRESULT_FILE
22 #define GDOME_XPRESULT_FILE
23
24 #include <libxml/xpath.h>
25
26 struct _GdomeXPathResultVtab {
27 void (*ref) (GdomeXPathResult *self, GdomeException *exc);
28 void (*unref) (GdomeXPathResult *self, GdomeException *exc);
29 unsigned short (*resultType) (GdomeXPathResult *self, GdomeException *exc);
30 GdomeBoolean (*booleanValue) (GdomeXPathResult *self, GdomeException *exc);
31 double (*numberValue) (GdomeXPathResult *self, GdomeException *exc);
32 GdomeDOMString * (*stringValue) (GdomeXPathResult *self, GdomeException *exc);
33 GdomeNode * (*singleNodeValue) (GdomeXPathResult *self, GdomeException *exc);
34 GdomeNode *(*iterateNext) (GdomeXPathResult *self, GdomeException *exc);
35 };
36
37 typedef struct _Gdome_xpath_XPathResult Gdome_xpath_XPathResult;
38
39 struct _Gdome_xpath_XPathResult {
40 const GdomeXPathResultVtab *vtab;
41 int refcnt;
42 xmlXPathObjectPtr res;
43 GdomeNode *gnode;
44 int pos;
45 };
46
47 void gdome_xpath_xpresult_ref (GdomeXPathResult *self, GdomeException *exc);
48 void gdome_xpath_xpresult_unref (GdomeXPathResult *self, GdomeException *exc);
49 GdomeXPathResult * gdome_xpath_xpresult_mkref (GdomeNode *gnode,
50 xmlXPathObjectPtr res);
51 unsigned short gdome_xpath_xpresult_resultType (GdomeXPathResult *self,
52 GdomeException *exc);
53 GdomeBoolean gdome_xpath_xpresult_booleanValue (GdomeXPathResult *self,
54 GdomeException *exc);
55 double gdome_xpath_xpresult_numberValue (GdomeXPathResult *self,
56 GdomeException *exc);
57 GdomeDOMString * gdome_xpath_xpresult_stringValue (GdomeXPathResult *self,
58 GdomeException *exc);
59 GdomeNode * gdome_xpath_xpresult_singleNodeValue (GdomeXPathResult *self,
60 GdomeException *exc);
61 GdomeNode * gdome_xpath_xpresult_iterateNext (GdomeXPathResult *self,
62 GdomeException *exc);
63
64 extern const GdomeXPathResultVtab gdome_xpath_xpresult_vtab;
65
66 #endif /* GDOME_XPRESULT_FILE */