[tracker] libtracker-client: Generate tracker-client-$version.vapi not static 0.7.vapi



commit 6d47302b6bee64b8e5b8962424cd39e4cc55126b
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Mar 29 18:31:44 2010 +0100

    libtracker-client: Generate tracker-client-$version.vapi not static 0.7.vapi

 src/libtracker-client/Makefile.am         |   13 ++-
 src/libtracker-client/tracker-client.vapi |  124 +++++++++++++++++++++++++++++
 2 files changed, 132 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-client/Makefile.am b/src/libtracker-client/Makefile.am
index db6a663..b66c249 100644
--- a/src/libtracker-client/Makefile.am
+++ b/src/libtracker-client/Makefile.am
@@ -48,6 +48,8 @@ dbus_sources = 						\
 %-glue.h: $(top_srcdir)/data/dbus/%.xml
 	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
 
+vapidir = $(datadir)/vala/vapi
+
 vapi_sources =						\
 	$(top_srcdir)/src/vapi/posix.vapi		\
 	$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
@@ -56,17 +58,18 @@ libtracker-client.vala.stamp: $(libtracker_client_ TRACKER_API_VERSION@_la_VALAS
 	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-sparql-builder.h $^
 	$(AM_V_GEN)touch $@
 
-vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = 					\
+	tracker-client-$(TRACKER_API_VERSION).vapi
 
-dist_vapi_DATA = 			\
-	tracker-client-0.7.vapi \
-	$(NULL)
+tracker-client-$(TRACKER_API_VERSION).vapi: tracker-client.vapi
+	cp $< $@
 
 BUILT_SOURCES = 					\
 	$(dbus_sources)					\
 	libtracker-client.vala.stamp
 
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES)				\
+	tracker-client-$(TRACKER_API_VERSION).vapi
 
 MAINTAINERCLEANFILES =					\
 	libtracker-client.vala.stamp			\
diff --git a/src/libtracker-client/tracker-client.vapi b/src/libtracker-client/tracker-client.vapi
new file mode 100644
index 0000000..b9ecf7a
--- /dev/null
+++ b/src/libtracker-client/tracker-client.vapi
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2010, Adrien Bustany <abustany gnome org>
+ *
+ * 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.
+ */
+
+[CCode (cprefix = "Tracker", lower_case_cprefix = "tracker_")]
+namespace Tracker {
+	[Compact]
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public class Client {
+		[CCode (has_construct_function = false)]
+		public Client (Tracker.ClientFlags flags, int timeout);
+
+		[CCode (cname = "tracker_cancel_call")]
+		public bool cancel_call (uint call_id);
+		[CCode (cname = "tracker_cancel_last_call")]
+		public bool cancel_last_call ();
+		[CCode (cname = "tracker_resources_batch_commit")]
+		public void batch_commit () throws GLib.Error;
+		[CCode (cname = "tracker_resources_batch_commit_async")]
+		public void batch_commit_async (Tracker.ReplyVoid callback);
+		[CCode (cname = "tracker_resources_batch_sparql_update")]
+		public void batch_sparql_update (string query) throws GLib.Error;
+		[CCode (cname = "tracker_resources_batch_sparql_update_async")]
+		public void batch_sparql_update_async (string query, Tracker.ReplyVoid callback);
+		[CCode (cname = "tracker_resources_load")]
+		public void load (string uri) throws GLib.Error;
+		[CCode (cname = "tracker_resources_load_async")]
+		public void load_async (string uri, Tracker.ReplyVoid callback);
+		[CCode (cname = "tracker_resources_sparql_query")]
+		public GLib.PtrArray sparql_query (string query) throws GLib.Error;
+		[CCode (cname = "tracker_resources_sparql_query_async")]
+		public void sparql_query_async (string query, Tracker.ReplyGPtrArray callback);
+		[CCode (cname = "tracker_resources_sparql_update")]
+		public void sparql_update (string query) throws GLib.Error;
+		[CCode (cname = "tracker_resources_sparql_update_async")]
+		public void sparql_update_async (string query, Tracker.ReplyVoid callback);
+		[CCode (cname = "tracker_resources_sparql_update_blank")]
+		public GLib.PtrArray sparql_update_blank (string query) throws GLib.Error;
+		[CCode (cname = "tracker_resources_sparql_update_blank_async")]
+		public void sparql_update_blank_async (string query, Tracker.ReplyGPtrArray callback);
+		[CCode (cname = "tracker_statistics_get")]
+		public GLib.PtrArray statistics_get () throws GLib.Error;
+		[CCode (cname = "tracker_statistics_get_async")]
+		public void statistics_get_async (Tracker.ReplyGPtrArray callback);
+	}
+	[Compact]
+	[CCode (free_function = "g_object_unref", cheader_filename = "libtracker-client/tracker-sparql-builder.h")]
+	public class SparqlBuilder {
+		[CCode (has_construct_function = false)]
+		public SparqlBuilder ();
+		public void append (string raw);
+		public static unowned Tracker.SparqlBuilder @construct (GLib.Type object_type);
+		public static unowned Tracker.SparqlBuilder construct_embedded_insert (GLib.Type object_type);
+		public static unowned Tracker.SparqlBuilder construct_update (GLib.Type object_type);
+		public void delete_close ();
+		public void delete_open (string graph);
+		public void drop_graph (string iri);
+		[CCode (has_construct_function = false)]
+		public SparqlBuilder.embedded_insert ();
+		public int get_length ();
+		public unowned string get_result ();
+		public void insert_close ();
+		public void insert_open (string graph);
+		public void object (string s);
+		public void object_blank_close ();
+		public void object_blank_open ();
+		public void object_boolean (bool literal);
+		public void object_date (ulong literal);
+		public void object_double (double literal);
+		public void object_int64 (int64 literal);
+		public void object_iri (string iri);
+		public void object_string (string literal);
+		public void object_unvalidated (string value);
+		public void object_variable (string var_name);
+		public void predicate (string s);
+		public void predicate_iri (string iri);
+		public void prepend (string raw);
+		public void subject (string s);
+		public void subject_iri (string iri);
+		public void subject_variable (string var_name);
+		[CCode (has_construct_function = false)]
+		public SparqlBuilder.update ();
+		public void where_close ();
+		public void where_open ();
+	}
+	[CCode (cprefix = "TRACKER_CLIENT_ENABLE_", has_type_id = false, cheader_filename = "libtracker-client/tracker-client.h")]
+	public enum ClientFlags {
+		WARNINGS
+	}
+
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h", instance_pos = -2)]
+	public delegate void ReplyArray (string result, GLib.Error error);
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h", instance_pos = -2)]
+	public delegate void ReplyGPtrArray (GLib.PtrArray result, GLib.Error error);
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h", instance_pos = -2)]
+	public delegate void ReplyVoid (GLib.Error error);
+
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public const string DBUS_INTERFACE_RESOURCES;
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public const string DBUS_INTERFACE_STATISTICS;
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public const string DBUS_OBJECT;
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public const string DBUS_SERVICE;
+
+	[CCode (cheader_filename = "libtracker-client/tracker-client.h")]
+	public static string sparql_escape (string str);
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]