vala r2130 - in trunk: . vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2130 - in trunk: . vapi
- Date: Tue, 9 Dec 2008 17:37:51 +0000 (UTC)
Author: juergbi
Date: Tue Dec 9 17:37:51 2008
New Revision: 2130
URL: http://svn.gnome.org/viewvc/vala?rev=2130&view=rev
Log:
2008-12-09 JÃrg Billeter <j bitron ch>
* vapi/Makefile.am:
* vapi/raptor.vapi:
* vapi/rasqal.vapi:
Add partial raptor and rasqal bindings
Added:
trunk/vapi/raptor.vapi
trunk/vapi/rasqal.vapi
Modified:
trunk/ChangeLog
trunk/vapi/Makefile.am
Modified: trunk/vapi/Makefile.am
==============================================================================
--- trunk/vapi/Makefile.am (original)
+++ trunk/vapi/Makefile.am Tue Dec 9 17:37:51 2008
@@ -113,6 +113,8 @@
pangocairo.vapi \
poppler-glib.deps \
poppler-glib.vapi \
+ raptor.vapi \
+ rasqal.vapi \
sdl.vapi \
sdl-gfx.vapi \
sdl-image.vapi \
Added: trunk/vapi/raptor.vapi
==============================================================================
--- (empty file)
+++ trunk/vapi/raptor.vapi Tue Dec 9 17:37:51 2008
@@ -0,0 +1,68 @@
+/* raptor.vapi
+ *
+ * Copyright (C) 2008 Nokia
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * JÃrg Billeter <j bitron ch>
+ */
+
+[CCode (cheader_filename = "raptor.h")]
+namespace Raptor {
+ public enum IdentifierType {
+ RESOURCE,
+ ANONYMOUS,
+ PREDICATE,
+ ORDINAL,
+ LITERAL,
+ XML_LITERAL
+ }
+
+ [Compact]
+ [CCode (cname = "raptor_parser", free_function = "raptor_free_parser")]
+ public class Parser {
+ [CCode (cname = "raptor_new_parser")]
+ public Parser (string name);
+ [CCode (cname = "raptor_set_statement_handler")]
+ public void set_statement_handler ([CCode (delegate_target_pos = 0.9)] StatementHandler handler);
+ [CCode (cname = "raptor_parse_file")]
+ public void parse_file (Uri? uri, Uri? base_uri);
+ [CCode (cname = "raptor_start_parse")]
+ public void start_parse (Uri uri);
+ }
+
+ [Compact]
+ [CCode (cname = "raptor_statement")]
+ public class Statement {
+ public void* subject;
+ public void* predicate;
+ public void* object;
+ public IdentifierType object_type;
+ }
+
+ [CCode (cname = "raptor_statement_handler", instance_pos = 0)]
+ public delegate void StatementHandler (Statement statement);
+
+ [Compact]
+ [CCode (cname = "raptor_uri", free_function = "raptor_free_uri")]
+ public class Uri {
+ [CCode (cname = "raptor_new_uri")]
+ public Uri (string uri_string);
+ public static string filename_to_uri_string (string filename);
+ public weak string as_string ();
+ }
+}
+
Added: trunk/vapi/rasqal.vapi
==============================================================================
--- (empty file)
+++ trunk/vapi/rasqal.vapi Tue Dec 9 17:37:51 2008
@@ -0,0 +1,117 @@
+/* rasqal.vapi
+ *
+ * Copyright (C) 2008 Nokia
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * JÃrg Billeter <j bitron ch>
+ */
+
+[CCode (cheader_filename = "rasqal.h")]
+namespace Rasqal {
+ public void init ();
+ public void finish ();
+
+ [Compact]
+ [CCode (cname = "rasqal_graph_pattern")]
+ public class GraphPattern {
+ public enum Operator {
+ BASIC,
+ OPTIONAL,
+ UNION,
+ GROUP,
+ GRAPH
+ }
+
+ public Operator get_operator ();
+ public weak Triple get_triple (int idx);
+ public void print (GLib.FileStream fh);
+ }
+
+ [CCode (cprefix = "RASQAL_EXPR_")]
+ public enum Op {
+ AND,
+ OR,
+ LITERAL,
+ ORDER_COND_ASC,
+ ORDER_COND_DESC
+ }
+
+ [Compact]
+ [CCode (cname = "rasqal_expression", free_function = "rasqal_free_expression")]
+ public class Expression {
+ public Op op;
+ public Expression? arg1;
+ public Expression? arg2;
+ public Expression? arg3;
+ public Literal? literal;
+ }
+
+ [Compact]
+ [CCode (cname = "rasqal_literal", free_function = "rasqal_free_literal")]
+ public class Literal {
+ [CCode (cprefix = "RASQAL_LITERAL_")]
+ public enum Type {
+ BLANK,
+ URI,
+ STRING,
+ BOOLEAN,
+ INTEGER,
+ DOUBLE,
+ FLOAT,
+ DECIMAL,
+ DATETIME,
+ PATTERN,
+ QNAME,
+ VARIABLE
+ }
+
+ public Type type;
+
+ public weak string? as_string ();
+ public weak Variable? as_variable ();
+ }
+
+ [Compact]
+ [CCode (cname = "rasqal_query", free_function = "rasqal_free_query")]
+ public class Query {
+ [CCode (cname = "rasqal_new_query")]
+ public Query (string? name, string? uri);
+ public bool get_distinct ();
+ public weak Expression? get_order_condition (int idx);
+ public weak GraphPattern get_query_graph_pattern ();
+ public weak Variable? get_variable (int idx);
+ public int prepare (string? query_string, Raptor.Uri? base_uri);
+ }
+
+ [Compact]
+ [CCode (cname = "rasqal_triple", free_function = "rasqal_free_triple")]
+ public class Triple {
+ public Literal subject;
+ public Literal predicate;
+ public Literal object;
+ public Literal origin;
+
+ public void print (GLib.FileStream fh);
+ }
+
+ [Compact]
+ [CCode (cname = "rasqal_variable", free_function = "rasqal_free_variable")]
+ public class Variable {
+ public weak string? name;
+ }
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]