3 * Copyright (C) 2008 Nokia
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
20 * Jürg Billeter <j@bitron.ch>
23 [CCode (cheader_filename = "raptor.h")]
25 public enum IdentifierType {
35 [CCode (cname = "raptor_parser", free_function = "raptor_free_parser")]
37 [CCode (cname = "raptor_new_parser")]
38 public Parser (string name);
39 [CCode (cname = "raptor_set_statement_handler")]
40 public void set_statement_handler ([CCode (delegate_target_pos = 0.9)] StatementHandler handler);
41 [CCode (cname = "raptor_parse_file")]
42 public void parse_file (Uri? uri, Uri? base_uri);
43 [CCode (cname = "raptor_start_parse")]
44 public void start_parse (Uri uri);
48 [CCode (cname = "raptor_statement")]
49 public class Statement {
51 public void* predicate;
53 public IdentifierType object_type;
56 [CCode (cname = "raptor_statement_handler", instance_pos = 0)]
57 public delegate void StatementHandler (Statement statement);
60 [CCode (cname = "raptor_uri", free_function = "raptor_free_uri")]
62 [CCode (cname = "raptor_new_uri")]
63 public Uri (string uri_string);
64 public static string filename_to_uri_string (string filename);
65 public weak string as_string ();