[tracker/direct-access] libtracker-sparql: Initial skeleton with cursor interface in vala
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access] libtracker-sparql: Initial skeleton with cursor interface in vala
- Date: Mon, 5 Jul 2010 14:25:27 +0000 (UTC)
commit 559814f73d06f940e7aca661e98149a7a6057e45
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 e8ade3e..8dfc8dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1887,6 +1887,7 @@ AC_CONFIG_FILES([
src/libinotify/Makefile
src/libstemmer/Makefile
src/libtracker-common/Makefile
+ src/libtracker-sparql/Makefile
src/libtracker-data/Makefile
src/libtracker-db/Makefile
src/libtracker-fts/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 6043e11..47b0255 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,6 +17,7 @@ SUBDIRS = \
$(libstemmer_dir) \
$(libinotify_dir) \
libtracker-common \
+ libtracker-sparql \
libtracker-client \
$(libtrackerfts_dir) \
libtracker-db \
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]