/* tinysparql-3.0.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "Tracker", gir_namespace = "Tsparql", gir_version = "3.0", lower_case_cprefix = "tracker_")]
namespace Tsparql {
	namespace Prefix {
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_DC")]
		public const string DC;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_MFO")]
		public const string MFO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NAO")]
		public const string NAO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NCO")]
		public const string NCO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NFO")]
		public const string NFO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NIE")]
		public const string NIE;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NMM")]
		public const string NMM;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_NRL")]
		public const string NRL;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_OSINFO")]
		public const string OSINFO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_RDF")]
		public const string RDF;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_RDFS")]
		public const string RDFS;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_SLO")]
		public const string SLO;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_TRACKER")]
		public const string TRACKER;
		[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_PREFIX_XSD")]
		public const string XSD;
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_batch_get_type ()")]
	[Version (since = "3.1")]
	public abstract class Batch : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Batch ();
		[Version (since = "3.6")]
		public void add_rdf (Tsparql.DeserializeFlags flags, Tsparql.RdfFormat format, string default_graph, GLib.InputStream stream);
		public void add_resource (string? graph, Tsparql.Resource resource);
		public void add_sparql (string sparql);
		[Version (since = "3.5")]
		public void add_statementv (Tsparql.SparqlStatement stmt, [CCode (array_length_cname = "n_values", array_length_pos = 1.5, array_length_type = "guint")] string[] variable_names, [CCode (array_length_cname = "n_values", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] values);
		public bool execute (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async bool execute_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public unowned Tsparql.SparqlConnection get_connection ();
		public Tsparql.SparqlConnection connection { get; construct; }
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_endpoint_get_type ()")]
	public abstract class Endpoint : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Endpoint ();
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "3.7")]
		public string[] get_allowed_graphs ();
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "3.7")]
		public string[] get_allowed_services ();
		[Version (since = "3.7")]
		public bool get_readonly ();
		public unowned Tsparql.SparqlConnection get_sparql_connection ();
		[Version (since = "3.7")]
		public void set_allowed_graphs (string graphs);
		[Version (since = "3.7")]
		public void set_allowed_services (string services);
		[Version (since = "3.7")]
		public void set_readonly (bool readonly);
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "3.7")]
		public string[] allowed_graphs { owned get; set; }
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "3.7")]
		public string[] allowed_services { owned get; set; }
		[Version (since = "3.7")]
		public bool readonly { get; set; }
		public Tsparql.SparqlConnection sparql_connection { get; construct; }
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_endpoint_dbus_get_type ()")]
	public class EndpointDBus : Tsparql.Endpoint, GLib.Initable {
		[CCode (has_construct_function = false)]
		public EndpointDBus (Tsparql.SparqlConnection sparql_connection, GLib.DBusConnection dbus_connection, string? object_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoAccessorMethod]
		public GLib.DBusConnection dbus_connection { owned get; construct; }
		[NoAccessorMethod]
		public string object_path { owned get; construct; }
		public signal bool block_call (string object);
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_endpoint_http_get_type ()")]
	[Version (since = "3.1")]
	public class EndpointHttp : Tsparql.Endpoint, GLib.Initable {
		[CCode (has_construct_function = false)]
		public EndpointHttp (Tsparql.SparqlConnection sparql_connection, uint port, GLib.TlsCertificate? certificate, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoAccessorMethod]
		public GLib.TlsCertificate http_certificate { owned get; construct; }
		[NoAccessorMethod]
		public uint http_port { get; construct; }
		public signal bool block_remote_address (GLib.SocketAddress address);
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_namespace_manager_get_type ()")]
	public class NamespaceManager : GLib.Object {
		[CCode (has_construct_function = false)]
		public NamespaceManager ();
		public void add_prefix (string prefix, string ns);
		[Version (since = "3.3")]
		public string compress_uri (string uri);
		public string expand_uri (string compact_uri);
		public void @foreach (GLib.HFunc func);
		[Version (deprecated = true, deprecated_since = "3.3")]
		public static unowned Tsparql.NamespaceManager get_default ();
		public bool has_prefix (string prefix);
		public unowned string? lookup_prefix (string prefix);
		public string print_turtle ();
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_notifier_get_type ()")]
	public class Notifier : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Notifier ();
		public uint signal_subscribe (GLib.DBusConnection connection, string? service, string? object_path, string? graph);
		public void signal_unsubscribe (uint handler_id);
		[NoAccessorMethod]
		public Tsparql.SparqlConnection connection { owned get; construct; }
		public signal void events (string service, string graph, GLib.GenericArray<Tsparql.NotifierEvent> events);
	}
	[CCode (cheader_filename = "tinysparql.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "tracker_notifier_event_get_type ()")]
	[Compact]
	public class NotifierEvent {
		public Tsparql.NotifierEventType get_event_type ();
		public int64 get_id ();
		public unowned string get_urn ();
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_resource_get_type ()")]
	public class Resource : GLib.Object {
		[CCode (has_construct_function = false)]
		public Resource (string? identifier);
		public void add_boolean (string property_uri, bool value);
		[Version (since = "3.2")]
		public void add_datetime (string property_uri, GLib.DateTime value);
		public void add_double (string property_uri, double value);
		public void add_gvalue (string property_uri, GLib.Value value);
		public void add_int (string property_uri, int value);
		public void add_int64 (string property_uri, int64 value);
		public void add_relation (string property_uri, Tsparql.Resource resource);
		public void add_string (string property_uri, string value);
		public void add_take_relation (string property_uri, owned Tsparql.Resource resource);
		public void add_uri (string property_uri, string value);
		public static Tsparql.Resource? deserialize (GLib.Variant variant);
		public bool get_first_boolean (string property_uri);
		[Version (since = "3.2")]
		public unowned GLib.DateTime? get_first_datetime (string property_uri);
		public double get_first_double (string property_uri);
		public int get_first_int (string property_uri);
		public int64 get_first_int64 (string property_uri);
		public unowned Tsparql.Resource? get_first_relation (string property_uri);
		public unowned string? get_first_string (string property_uri);
		public unowned string? get_first_uri (string property_uri);
		public unowned string? get_identifier ();
		public GLib.List<weak string> get_properties ();
		[Version (since = "3.1")]
		public bool get_property_overwrite (string property_uri);
		public GLib.List<weak GLib.Value?>? get_values (string property_uri);
		public int identifier_compare_func (string identifier);
		[Version (deprecated = true, deprecated_since = "3.5")]
		public string print_jsonld (Tsparql.NamespaceManager? namespaces);
		[Version (since = "3.4")]
		public string print_rdf (Tsparql.NamespaceManager namespaces, Tsparql.RdfFormat format, string? graph);
		public string print_sparql_update (Tsparql.NamespaceManager? namespaces, string? graph_id);
		[Version (deprecated = true, deprecated_since = "3.4")]
		public string print_turtle (Tsparql.NamespaceManager? namespaces);
		public unowned GLib.Variant? serialize ();
		public void set_boolean (string property_uri, bool value);
		[Version (since = "3.2")]
		public void set_datetime (string property_uri, GLib.DateTime value);
		public void set_double (string property_uri, double value);
		public void set_gvalue (string property_uri, GLib.Value value);
		public void set_identifier (string? identifier);
		public void set_int (string property_uri, int value);
		public void set_int64 (string property_uri, int64 value);
		public void set_relation (string property_uri, Tsparql.Resource resource);
		public void set_string (string property_uri, string value);
		public void set_take_relation (string property_uri, owned Tsparql.Resource resource);
		public void set_uri (string property_uri, string value);
		public string identifier { get; set; }
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_sparql_connection_get_type ()")]
	public abstract class SparqlConnection : GLib.Object {
		[CCode (has_construct_function = false)]
		protected SparqlConnection ();
		public static Tsparql.SparqlConnection bus_new (string service_name, string? object_path, GLib.DBusConnection? dbus_connection = null) throws GLib.Error;
		[Version (since = "3.1")]
		public static async Tsparql.SparqlConnection bus_new_async (string service_name, string? object_path, GLib.DBusConnection? dbus_connection = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void close ();
		public async bool close_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public Tsparql.Batch create_batch ();
		public Tsparql.Notifier? create_notifier ();
		[Version (since = "3.4")]
		public async bool deserialize_async (Tsparql.DeserializeFlags flags, Tsparql.RdfFormat format, string default_graph, GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public unowned Tsparql.NamespaceManager get_namespace_manager ();
		[Version (since = "3.3")]
		public Tsparql.SparqlStatement load_statement_from_gresource (string resource_path, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.3")]
		public void map_connection (string handle_name, Tsparql.SparqlConnection service_connection);
		public static Tsparql.SparqlConnection @new (Tsparql.SparqlConnectionFlags flags, GLib.File? store, GLib.File? ontology, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public static async Tsparql.SparqlConnection new_async (Tsparql.SparqlConnectionFlags flags, GLib.File? store, GLib.File? ontology, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public Tsparql.SparqlCursor query (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async Tsparql.SparqlCursor query_async (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public Tsparql.SparqlStatement query_statement (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public static Tsparql.SparqlConnection remote_new (string uri_base);
		[Version (since = "3.3")]
		public async GLib.InputStream serialize_async (Tsparql.SerializeFlags flags, Tsparql.RdfFormat format, string query, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void update (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async bool update_array_async (string sparql, int sparql_length, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async void update_async (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (deprecated = true, deprecated_since = "3.5")]
		public GLib.Variant update_blank (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (deprecated = true, deprecated_since = "3.5")]
		public async GLib.Variant update_blank_async (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.1")]
		public bool update_resource (string? graph, Tsparql.Resource resource, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.1")]
		public async bool update_resource_async (string? graph, Tsparql.Resource resource, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.5")]
		public Tsparql.SparqlStatement update_statement (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_sparql_cursor_get_type ()")]
	public abstract class SparqlCursor : GLib.Object {
		[CCode (has_construct_function = false)]
		protected SparqlCursor ();
		public void close ();
		public bool get_boolean (int column);
		public unowned Tsparql.SparqlConnection get_connection ();
		[Version (since = "3.2")]
		public GLib.DateTime? get_datetime (int column);
		public double get_double (int column);
		public int64 get_integer (int column);
		[Version (since = "3.7")]
		public unowned string? get_langstring (int column, out string langtag, out long length);
		public int get_n_columns ();
		public unowned string? get_string (int column, out long length = null);
		public Tsparql.SparqlValueType get_value_type (int column);
		public unowned string? get_variable_name (int column);
		public bool is_bound (int column);
		public bool next (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async bool next_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (deprecated = true, deprecated_since = "3.5")]
		public void rewind ();
		public Tsparql.SparqlConnection connection { get; construct; }
		public int n_columns { get; }
	}
	[CCode (cheader_filename = "tinysparql.h", type_id = "tracker_sparql_statement_get_type ()")]
	public abstract class SparqlStatement : GLib.Object {
		[CCode (has_construct_function = false)]
		protected SparqlStatement ();
		public void bind_boolean (string name, bool value);
		[Version (since = "3.2")]
		public void bind_datetime (string name, GLib.DateTime value);
		public void bind_double (string name, double value);
		public void bind_int (string name, int64 value);
		[Version (since = "3.7")]
		public void bind_langstring (string name, string value, string langtag);
		public void bind_string (string name, string value);
		public void clear_bindings ();
		public Tsparql.SparqlCursor execute (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async Tsparql.SparqlCursor execute_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public unowned Tsparql.SparqlConnection get_connection ();
		public unowned string get_sparql ();
		[Version (since = "3.3")]
		public async GLib.InputStream serialize_async (Tsparql.SerializeFlags flags, Tsparql.RdfFormat format, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.5")]
		public bool update (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.5")]
		public async bool update_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public Tsparql.SparqlConnection connection { get; construct; }
		public string sparql { get; construct; }
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_DESERIALIZE_FLAGS_", type_id = "tracker_deserialize_flags_get_type ()")]
	public enum DeserializeFlags {
		NONE
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_NOTIFIER_EVENT_", type_id = "tracker_notifier_event_type_get_type ()")]
	public enum NotifierEventType {
		CREATE,
		DELETE,
		UPDATE
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_RDF_FORMAT_", type_id = "tracker_rdf_format_get_type ()")]
	public enum RdfFormat {
		TURTLE,
		TRIG,
		JSON_LD,
		LAST
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_SERIALIZE_FLAGS_", type_id = "tracker_serialize_flags_get_type ()")]
	public enum SerializeFlags {
		NONE
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_SPARQL_CONNECTION_FLAGS_", type_id = "tracker_sparql_connection_flags_get_type ()")]
	[Flags]
	public enum SparqlConnectionFlags {
		NONE,
		READONLY,
		FTS_ENABLE_STEMMER,
		FTS_ENABLE_UNACCENT,
		FTS_ENABLE_STOP_WORDS,
		FTS_IGNORE_NUMBERS,
		ANONYMOUS_BNODES
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_SPARQL_VALUE_TYPE_", has_type_id = false)]
	public enum SparqlValueType {
		UNBOUND,
		URI,
		STRING,
		INTEGER,
		DOUBLE,
		DATETIME,
		BLANK_NODE,
		BOOLEAN
	}
	[CCode (cheader_filename = "tinysparql.h", cprefix = "TRACKER_SPARQL_ERROR_", type_id = "tracker_sparql_error_get_type ()")]
	public errordomain SparqlError {
		CONSTRAINT,
		INTERNAL,
		NO_SPACE,
		ONTOLOGY_NOT_FOUND,
		OPEN_ERROR,
		PARSE,
		QUERY_FAILED,
		TYPE,
		UNKNOWN_CLASS,
		UNKNOWN_GRAPH,
		UNKNOWN_PROPERTY,
		UNSUPPORTED,
		MISSING_LAST_MODIFIED_HEADER,
		INCOMPLETE_PROPERTY_DEFINITION,
		CORRUPT,
		LAST;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_MAJOR_VERSION")]
	public const int MAJOR_VERSION;
	[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_MICRO_VERSION")]
	public const int MICRO_VERSION;
	[CCode (cheader_filename = "tinysparql.h", cname = "TRACKER_MINOR_VERSION")]
	public const int MINOR_VERSION;
	[CCode (cheader_filename = "tinysparql.h")]
	public static unowned string check_version (uint required_major, uint required_minor, uint required_micro);
	[CCode (cheader_filename = "tinysparql.h")]
	[Version (replacement = "SparqlError.quark")]
	public static GLib.Quark sparql_error_quark ();
	[CCode (cheader_filename = "tinysparql.h")]
	public static string sparql_escape_string (string literal);
	[CCode (cheader_filename = "tinysparql.h")]
	public static string sparql_escape_uri (string uri);
	[CCode (cheader_filename = "tinysparql.h")]
	public static string sparql_escape_uri_printf (string format, ...);
	[CCode (cheader_filename = "tinysparql.h")]
	public static string sparql_escape_uri_vprintf (string format, va_list args);
	[CCode (cheader_filename = "tinysparql.h")]
	public static GLib.File sparql_get_ontology_nepomuk ();
	[CCode (cheader_filename = "tinysparql.h")]
	public static string sparql_get_uuid_urn ();
}
