Don't warn about unused internal methods which are meant to be visible on DBus
[vala-gnome.git] / vapi / rasqal.vapi
blobc1a9f585bca41b1fec4cdf1e2a8f08c86b94d711
1 /* rasqal.vapi
2  *
3  * Copyright (C) 2008  Nokia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  * Author:
20  *      Jürg Billeter <j@bitron.ch>
21  */
23 [CCode (cheader_filename = "rasqal.h")]
24 namespace Rasqal {
25         public void init ();
26         public void finish ();
28         [Compact]
29         [CCode (cname = "rasqal_graph_pattern")]
30         public class GraphPattern {
31                 [CCode (has_type_id = false)]
32                 public enum Operator {
33                         BASIC,
34                         OPTIONAL,
35                         UNION,
36                         GROUP,
37                         GRAPH
38                 }
40                 public Operator get_operator ();
41                 public unowned Triple get_triple (int idx);
42                 public void print (GLib.FileStream fh);
43         }
45         [CCode (cprefix = "RASQAL_EXPR_", has_type_id = false)]
46         public enum Op {
47                 AND,
48                 OR,
49                 LITERAL,
50                 ORDER_COND_ASC,
51                 ORDER_COND_DESC,
52                 GROUP_COND_ASC,
53                 GROUP_COND_DESC,
54                 COUNT,
55                 VARSTAR
56         }
58         [Compact]
59         [CCode (cname = "rasqal_expression", free_function = "rasqal_free_expression")]
60         public class Expression {
61                 public Op op;
62                 public Expression? arg1;
63                 public Expression? arg2;
64                 public Expression? arg3;
65                 public Literal? literal;
66         }
68         [Compact]
69         [CCode (cname = "rasqal_literal", free_function = "rasqal_free_literal")]
70         public class Literal {
71                 [CCode (cprefix = "RASQAL_LITERAL_", has_type_id = false)]
72                 public enum Type {
73                         BLANK,
74                         URI,
75                         STRING,
76                         BOOLEAN,
77                         INTEGER,
78                         DOUBLE,
79                         FLOAT,
80                         DECIMAL,
81                         DATETIME,
82                         PATTERN,
83                         QNAME,
84                         VARIABLE
85                 }
87                 public Type type;
89                 public unowned string? as_string ();
90                 public unowned Variable? as_variable ();
91         }
93         [Compact]
94         [CCode (cname = "rasqal_query", free_function = "rasqal_free_query")]
95         public class Query {
96                 [CCode (cname = "rasqal_new_query")]
97                 public Query (string? name, string? uri);
98                 public bool get_distinct ();
99                 public int get_limit ();
100                 public int get_offset ();
101                 public unowned Expression? get_group_condition (int idx);
102                 public unowned Expression? get_order_condition (int idx);
103                 public unowned GraphPattern get_query_graph_pattern ();
104                 public unowned Variable? get_variable (int idx);
105                 public int prepare (string? query_string, Raptor.Uri? base_uri);
106         }
108         [Compact]
109         [CCode (cname = "rasqal_triple", free_function = "rasqal_free_triple")]
110         public class Triple {
111                 public Literal subject;
112                 public Literal predicate;
113                 public Literal object;
114                 public Literal origin;
116                 public void print (GLib.FileStream fh);
117         }
119         [Compact]
120         [CCode (cname = "rasqal_variable", free_function = "rasqal_free_variable")]
121         public class Variable {
122                 public weak string? name;
123                 public Expression? expression;
124         }