[tracker/libtracker-sparql: 2/44] libtracker-sparql: Initial skeleton with cursor interface in vala
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-sparql: 2/44] libtracker-sparql: Initial skeleton with cursor interface in vala
- Date: Tue, 10 Aug 2010 12:52:36 +0000 (UTC)
commit 2300b472dcee913d8db8057885291b7194ddf31c
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 | 45 +++++++++++++++++++++++++++++
src/libtracker-sparql/tracker-cursor.vala | 32 ++++++++++++++++++++
4 files changed, 79 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..409c90d
--- /dev/null
+++ b/src/libtracker-sparql/Makefile.am
@@ -0,0 +1,45 @@
+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-sparql.h
+
+# Vala bindings
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = \
+ tracker-sparql-$(TRACKER_API_VERSION).vapi
+
+# Vala sources
+libtracker-sparql.vala.stamp: $(libtracker_sparql_ TRACKER_API_VERSION@_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 $@
+
+BUILT_SOURCES = \
+ libtracker-sparql.vala.stamp
+
+CLEANFILES = \
+ $(BUILT_SOURCES)
+
+MAINTAINERCLEANFILES = \
+ $(libtracker_sparql_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c) \
+ libtracker-sparql.vala.stamp \
+ tracker-sparql.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..9f0d1f8
--- /dev/null
+++ b/src/libtracker-sparql/tracker-cursor.vala
@@ -0,0 +1,32 @@
+/*
+ * 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.Sparql.Cursor {
+ public abstract int n_columns { get; }
+ public abstract bool get_value (uint column, out GLib.Value value);
+ public abstract bool get_string (uint column, out string value);
+ public abstract bool get_double (uint column, out double value);
+ 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 ();
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]