[tracker/libtracker-sparql: 1/55] libtracker-sparql: Initial skeleton with cursor interface in vala



commit 91c20d0c42964f543896230ab7d9795b2894e3f7
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Jul 5 15:25:09 2010 +0100

    libtracker-sparql: Initial skeleton with cursor interface in vala

 configure.ac                              |    1 +
 src/Makefile.am                           |    1 +
 src/libtracker-sparql/Makefile.am         |   44 +++++++++++++++++++++++++++++
 src/libtracker-sparql/tracker-cursor.vala |   29 +++++++++++++++++++
 4 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 26e03d9..681ccfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1864,6 +1864,7 @@ AC_CONFIG_FILES([
 	po/Makefile.in
 	src/libstemmer/Makefile
 	src/libtracker-common/Makefile
+	src/libtracker-sparql/Makefile
 	src/libtracker-data/Makefile
 	src/libtracker-fts/Makefile
 	src/libtracker-extract/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index ac155fe..d4152de 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,6 +12,7 @@ endif
 SUBDIRS = 					\
 	$(libstemmer_dir)			\
 	libtracker-common 			\
+	libtracker-sparql 			\
 	libtracker-client			\
 	$(libtrackerfts_dir)			\
 	libtracker-data				\
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
new file mode 100644
index 0000000..090a353
--- /dev/null
+++ b/src/libtracker-sparql/Makefile.am
@@ -0,0 +1,44 @@
+include $(top_srcdir)/Makefile.decl
+
+lib_LTLIBRARIES = libtracker-sparql- TRACKER_API_VERSION@.la
+
+libtracker_sparqlincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-sparql
+
+libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES = \
+	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_ TRACKER_API_VERSION@_la_LDFLAGS = 	\
+	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 
+
+#	-export-symbols-regex '^tracker_.*'
+
+libtracker_sparqlinclude_HEADERS = 			\
+	tracker-cursor.h
+
+# Vala sources
+vapi_sources =						\
+	$(top_srcdir)/src/vapi/posix.vapi		\
+	$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
+
+libtracker-sparql.vala.stamp: $(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES) $(vapi_sources)
+	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-cursor.h $^
+	$(AM_V_GEN)touch $@
+
+BUILT_SOURCES = 					\
+	libtracker-sparql.vala.stamp
+
+CLEANFILES = 						\
+	$(BUILT_SOURCES)
+
+MAINTAINERCLEANFILES =					\
+	$(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c) \
+	libtracker-sparql.vala.stamp			\
+	tracker-cursor.h
+
+EXTRA_DIST = 						\
+	$(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES) \
+	libtracker-sparql.vala.stamp
diff --git a/src/libtracker-sparql/tracker-cursor.vala b/src/libtracker-sparql/tracker-cursor.vala
new file mode 100644
index 0000000..f628581
--- /dev/null
+++ b/src/libtracker-sparql/tracker-cursor.vala
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2010, Nokia <ivan frade nokia com>
+ *
+ * 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.
+ */
+
+public interface Tracker.Cursor {
+	public abstract bool new_for_query (string query);
+	public abstract bool rewind ();
+	public abstract int n_columns { get; }
+	public abstract bool get_value (uint column, out Value value);
+	public abstract bool get_string (uint column, out string value);
+	public abstract bool get_double (uint column, out double value);
+	public abstract bool iter_next () throws GLib.Error;
+}
+



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