[tracker/libtracker-sparql: 8/55] libtracker-data: Let TrackerDBCursor subclass TrackerSparqlCursor



commit af1db4e4a7fcd080200f21ba75e8648203aa34a5
Author: Jürg Billeter <j bitron ch>
Date:   Tue Jul 6 11:53:32 2010 +0200

    libtracker-data: Let TrackerDBCursor subclass TrackerSparqlCursor

 src/libtracker-sparql/Makefile.am         |   19 ++++++++++++++-----
 src/libtracker-sparql/tracker-cursor.vala |    4 ++--
 2 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index 56f73d2..153be2f 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -1,16 +1,25 @@
 include $(top_srcdir)/Makefile.decl
 
+INCLUDES =								\
+	-DG_LOG_DOMAIN=\"Tracker\"					\
+	-DTRACKER_COMPILATION						\
+	-I$(top_srcdir)/src						\
+	-I$(top_builddir)/src						\
+	$(WARN_CFLAGS)							\
+	$(GLIB2_CFLAGS)							\
+	$(GCOV_CFLAGS)
+
 lib_LTLIBRARIES = libtracker-sparql- TRACKER_API_VERSION@.la
 
 libtracker_sparqlincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-sparql
 
-libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES = \
+libtracker_sparql_la_VALASOURCES = \
 	tracker-connection.vala				\
 	tracker-cursor.vala
 
 libtracker_sparql_ TRACKER_API_VERSION@_la_SOURCES = 	\
 	libtracker-sparql.vala.stamp			\
-	$(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c)
+	$(libtracker_sparql_la_VALASOURCES:.vala=.c)
 
 libtracker_sparql_ TRACKER_API_VERSION@_la_LDFLAGS = 	\
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 
@@ -26,7 +35,7 @@ vapi_DATA =                     			\
 	tracker-sparql-$(TRACKER_API_VERSION).vapi
 
 # Vala sources
-libtracker-sparql.vala.stamp: $(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES)
+libtracker-sparql.vala.stamp: $(libtracker_sparql_la_VALASOURCES)
 	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-sparql.h --vapi tracker-sparql-$(TRACKER_API_VERSION).vapi $^
 	$(AM_V_GEN)touch $@
 
@@ -37,10 +46,10 @@ CLEANFILES = 						\
 	$(BUILT_SOURCES)
 
 MAINTAINERCLEANFILES =					\
-	$(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c) \
+	$(libtracker_sparql_la_VALASOURCES:.vala=.c) \
 	libtracker-sparql.vala.stamp			\
 	tracker-sparql.h
 
 EXTRA_DIST = 						\
-	$(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES) \
+	$(libtracker_sparql_la_VALASOURCES) \
 	libtracker-sparql.vala.stamp
diff --git a/src/libtracker-sparql/tracker-cursor.vala b/src/libtracker-sparql/tracker-cursor.vala
index 0728cfe..c30861a 100644
--- a/src/libtracker-sparql/tracker-cursor.vala
+++ b/src/libtracker-sparql/tracker-cursor.vala
@@ -19,12 +19,12 @@
 
 public abstract class Tracker.Sparql.Cursor : Object {
 	public abstract int n_columns { get; }
-	public abstract unowned string get_string (int column);
+	public abstract unowned string get_string (int column, out int length = null);
 	public virtual bool interrupt () throws GLib.Error {
 		warning ("Interrupt interface called when not implemented");
 		return false;
 	}
 
 	public abstract bool iter_next () throws GLib.Error;
-	public abstract bool rewind ();
+	public abstract void rewind ();
 }



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