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

[CCode (cprefix = "Tracker", gir_namespace = "Tracker", gir_version = "3.0", lower_case_cprefix = "tracker_")]
namespace Tracker {
	namespace Prefix {
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_DC")]
		public const string DC;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_MFO")]
		public const string MFO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NAO")]
		public const string NAO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NCO")]
		public const string NCO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NFO")]
		public const string NFO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NIE")]
		public const string NIE;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NMM")]
		public const string NMM;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_NRL")]
		public const string NRL;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_OSINFO")]
		public const string OSINFO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_RDF")]
		public const string RDF;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_RDFS")]
		public const string RDFS;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_SLO")]
		public const string SLO;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_TRACKER")]
		public const string TRACKER;
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_PREFIX_XSD")]
		public const string XSD;
	}
	namespace Sparql {
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", type_id = "tracker_sparql_connection_get_type ()")]
		[GIR (name = "SparqlConnection")]
		public abstract class Connection : GLib.Object {
			[CCode (has_construct_function = false)]
			protected Connection ();
			public static Tracker.Sparql.Connection bus_new (string service_name, string? object_path, GLib.DBusConnection? dbus_connection = null) throws GLib.Error;
			[Version (since = "3.1")]
			public static async Tracker.Sparql.Connection 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 Tracker.Batch create_batch ();
			public Tracker.Notifier? create_notifier ();
			[Version (since = "3.4")]
			public async bool deserialize_async (Tracker.DeserializeFlags flags, Tracker.RdfFormat format, string default_graph, GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public unowned Tracker.NamespaceManager get_namespace_manager ();
			[Version (since = "3.3")]
			public Tracker.Sparql.Statement 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, Tracker.Sparql.Connection service_connection);
			public static Tracker.Sparql.Connection @new (Tracker.Sparql.ConnectionFlags flags, GLib.File? store, GLib.File? ontology, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public static async Tracker.Sparql.Connection new_async (Tracker.Sparql.ConnectionFlags flags, GLib.File? store, GLib.File? ontology, GLib.Cancellable? cancellable = null) throws GLib.Error;
			[Version (since = "3.11")]
			public static Tracker.Sparql.Connection new_from_rdf (Tracker.Sparql.ConnectionFlags flags, GLib.File? store, Tracker.DeserializeFlags deserialize_flags, Tracker.RdfFormat rdf_format, GLib.InputStream rdf_stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
			[Version (since = "3.11")]
			public static async Tracker.Sparql.Connection new_from_rdf_async (Tracker.Sparql.ConnectionFlags flags, GLib.File? store, Tracker.DeserializeFlags deserialize_flags, Tracker.RdfFormat rdf_format, GLib.InputStream rdf_stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public Tracker.Sparql.Cursor query (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public async Tracker.Sparql.Cursor query_async (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public Tracker.Sparql.Statement query_statement (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
			public static Tracker.Sparql.Connection remote_new (string uri_base);
			[Version (since = "3.3")]
			public async GLib.InputStream serialize_async (Tracker.SerializeFlags flags, Tracker.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, Tracker.Resource resource, GLib.Cancellable? cancellable = null) throws GLib.Error;
			[Version (since = "3.1")]
			public async bool update_resource_async (string? graph, Tracker.Resource resource, GLib.Cancellable? cancellable = null) throws GLib.Error;
			[Version (since = "3.5")]
			public Tracker.Sparql.Statement update_statement (string sparql, GLib.Cancellable? cancellable = null) throws GLib.Error;
		}
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", type_id = "tracker_sparql_cursor_get_type ()")]
		[GIR (name = "SparqlCursor")]
		public abstract class Cursor : GLib.Object {
			[CCode (has_construct_function = false)]
			protected Cursor ();
			public void close ();
			public bool get_boolean (int column);
			public unowned Tracker.Sparql.Connection 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 Tracker.Sparql.ValueType 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 Tracker.Sparql.Connection connection { get; construct; }
			public int n_columns { get; }
		}
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", type_id = "tracker_sparql_statement_get_type ()")]
		[GIR (name = "SparqlStatement")]
		public abstract class Statement : GLib.Object {
			[CCode (has_construct_function = false)]
			protected Statement ();
			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 Tracker.Sparql.Cursor execute (GLib.Cancellable? cancellable = null) throws GLib.Error;
			public async Tracker.Sparql.Cursor execute_async (GLib.Cancellable? cancellable = null) throws GLib.Error;
			public unowned Tracker.Sparql.Connection get_connection ();
			public unowned string get_sparql ();
			[Version (since = "3.3")]
			public async GLib.InputStream serialize_async (Tracker.SerializeFlags flags, Tracker.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 Tracker.Sparql.Connection connection { get; construct; }
			public string sparql { get; construct; }
		}
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_SPARQL_CONNECTION_FLAGS_", type_id = "tracker_sparql_connection_flags_get_type ()")]
		[Flags]
		[GIR (name = "SparqlConnectionFlags")]
		public enum ConnectionFlags {
			NONE,
			READONLY,
			FTS_ENABLE_STEMMER,
			FTS_ENABLE_UNACCENT,
			FTS_ENABLE_STOP_WORDS,
			FTS_IGNORE_NUMBERS,
			ANONYMOUS_BNODES,
			[Version (since = "3.11")]
			DISABLE_SYNTAX_EXTENSIONS,
			[Version (since = "3.11")]
			SPARQL_STRICT
		}
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_SPARQL_VALUE_TYPE_", has_type_id = false)]
		[GIR (name = "SparqlValueType")]
		public enum ValueType {
			UNBOUND,
			URI,
			STRING,
			INTEGER,
			DOUBLE,
			DATETIME,
			BLANK_NODE,
			BOOLEAN
		}
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_SPARQL_ERROR_", type_id = "tracker_sparql_error_get_type ()")]
		[GIR (name = "SparqlError")]
		public errordomain Error {
			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 = "libtracker-sparql/tracker-sparql.h")]
		public static string escape_string (string literal);
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
		public static string escape_uri (string uri);
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
		public static string escape_uri_printf (string format, ...);
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
		public static string escape_uri_vprintf (string format, va_list args);
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
		public static GLib.File get_ontology_nepomuk ();
		[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
		public static string get_uuid_urn ();
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.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 (Tracker.DeserializeFlags flags, Tracker.RdfFormat format, string default_graph, GLib.InputStream stream);
		public void add_resource (string? graph, Tracker.Resource resource);
		public void add_sparql (string sparql);
		[Version (since = "3.5")]
		public void add_statementv (Tracker.Sparql.Statement 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 Tracker.Sparql.Connection get_connection ();
		public Tracker.Sparql.Connection connection { get; construct; }
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.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 Tracker.Sparql.Connection 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 Tracker.Sparql.Connection sparql_connection { get; construct; }
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", type_id = "tracker_endpoint_dbus_get_type ()")]
	public class EndpointDBus : Tracker.Endpoint, GLib.Initable {
		[CCode (has_construct_function = false)]
		public EndpointDBus (Tracker.Sparql.Connection 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 = "libtracker-sparql/tracker-sparql.h", type_id = "tracker_endpoint_http_get_type ()")]
	[Version (since = "3.1")]
	public class EndpointHttp : Tracker.Endpoint, GLib.Initable {
		[CCode (has_construct_function = false)]
		public EndpointHttp (Tracker.Sparql.Connection 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 = "libtracker-sparql/tracker-sparql.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 Tracker.NamespaceManager get_default ();
		public bool has_prefix (string prefix);
		public unowned string? lookup_prefix (string prefix);
		public string print_turtle ();
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.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 Tracker.Sparql.Connection connection { owned get; construct; }
		public signal void events (string service, string graph, GLib.GenericArray<Tracker.NotifierEvent> events);
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "tracker_notifier_event_get_type ()")]
	[Compact]
	public class NotifierEvent {
		public Tracker.NotifierEventType get_event_type ();
		public int64 get_id ();
		public unowned string get_urn ();
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.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, Tracker.Resource resource);
		public void add_string (string property_uri, string value);
		public void add_take_relation (string property_uri, owned Tracker.Resource resource);
		public void add_uri (string property_uri, string value);
		public static Tracker.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 Tracker.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 (Tracker.NamespaceManager? namespaces);
		[Version (since = "3.4")]
		public string print_rdf (Tracker.NamespaceManager namespaces, Tracker.RdfFormat format, string? graph);
		public string print_sparql_update (Tracker.NamespaceManager? namespaces, string? graph_id);
		[Version (deprecated = true, deprecated_since = "3.4")]
		public string print_turtle (Tracker.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, Tracker.Resource resource);
		public void set_string (string property_uri, string value);
		public void set_take_relation (string property_uri, owned Tracker.Resource resource);
		public void set_uri (string property_uri, string value);
		public string identifier { get; set; }
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_DESERIALIZE_FLAGS_", type_id = "tracker_deserialize_flags_get_type ()")]
	public enum DeserializeFlags {
		NONE
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_NOTIFIER_EVENT_", type_id = "tracker_notifier_event_type_get_type ()")]
	public enum NotifierEventType {
		CREATE,
		DELETE,
		UPDATE
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_RDF_FORMAT_", type_id = "tracker_rdf_format_get_type ()")]
	public enum RdfFormat {
		TURTLE,
		TRIG,
		JSON_LD,
		LAST
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cprefix = "TRACKER_SERIALIZE_FLAGS_", type_id = "tracker_serialize_flags_get_type ()")]
	public enum SerializeFlags {
		NONE
	}
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_MAJOR_VERSION")]
	public const int MAJOR_VERSION;
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_MICRO_VERSION")]
	public const int MICRO_VERSION;
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h", cname = "TRACKER_MINOR_VERSION")]
	public const int MINOR_VERSION;
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
	public static unowned string check_version (uint required_major, uint required_minor, uint required_micro);
	[CCode (cheader_filename = "libtracker-sparql/tracker-sparql.h")]
	[Version (replacement = "SparqlError.quark")]
	public static GLib.Quark sparql_error_quark ();
}
