[tracker/direct-access: 16/122] libtracker-direct: Added initial skeleton here
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 16/122] libtracker-direct: Added initial skeleton here
- Date: Fri, 6 Aug 2010 10:15:26 +0000 (UTC)
commit ef0fa3b990b564a5708e77aba91cb36f1c0827eb
Author: Martyn Russell <martyn lanedo com>
Date: Mon Jul 5 17:03:10 2010 +0100
libtracker-direct: Added initial skeleton here
Tracker.Direct.Connection uses interface Tracker.Sparql.Cursor and
will implement it for direct connections using the libtracker-data API
configure.ac | 1 +
src/libtracker-direct/Makefile.am | 46 +++++++++++++++++++++
src/libtracker-direct/tracker-connection.vala | 54 +++++++++++++++++++++++++
3 files changed, 101 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 72c60ff..9b80704 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1868,6 +1868,7 @@ AC_CONFIG_FILES([
src/libstemmer/Makefile
src/libtracker-common/Makefile
src/libtracker-sparql/Makefile
+ src/libtracker-direct/Makefile
src/libtracker-data/Makefile
src/libtracker-fts/Makefile
src/libtracker-extract/Makefile
diff --git a/src/libtracker-direct/Makefile.am b/src/libtracker-direct/Makefile.am
new file mode 100644
index 0000000..39f250f
--- /dev/null
+++ b/src/libtracker-direct/Makefile.am
@@ -0,0 +1,46 @@
+include $(top_srcdir)/Makefile.decl
+
+lib_LTLIBRARIES = libtracker-direct- TRACKER_API_VERSION@.la
+
+libtracker_directincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-direct
+
+libtracker_direct_ TRACKER_API_VERSION@_la_VALASOURCES = \
+ tracker-connection.vala
+
+libtracker_direct_ TRACKER_API_VERSION@_la_SOURCES = \
+ libtracker-connection.vala.stamp \
+ $(libtracker_direct_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c)
+
+libtracker_direct_ TRACKER_API_VERSION@_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+# -export-symbols-regex '^tracker_.*'
+
+libtracker_directinclude_HEADERS = \
+ $(top_srcdir)/src/libtracker-sparql/tracker-sparql.vapi \
+ tracker-connection.h
+
+# Vala sources
+vapi_sources = \
+ $(top_srcdir)/src/libtracker-sparql/tracker-sparql.vapi \
+ $(top_srcdir)/src/vapi/posix.vapi \
+ $(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
+
+libtracker-direct.vala.stamp: $(libtracker_direct_ TRACKER_API_VERSION@_la_VALASOURCES) $(vapi_sources)
+ $(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-connection.h $^
+ $(AM_V_GEN)touch $@
+
+BUILT_SOURCES = \
+ libtracker-direct.vala.stamp
+
+CLEANFILES = \
+ $(BUILT_SOURCES)
+
+MAINTAINERCLEANFILES = \
+ $(libtracker_direct_ TRACKER_API_VERSION@_la_VALASOURCES:.vala=.c) \
+ libtracker-direct.vala.stamp \
+ tracker-connection.h
+
+EXTRA_DIST = \
+ $(libtracker_direct_ TRACKER_API_VERSION@_la_VALASOURCES) \
+ libtracker-direct.vala.stamp
diff --git a/src/libtracker-direct/tracker-connection.vala b/src/libtracker-direct/tracker-connection.vala
new file mode 100644
index 0000000..a5a61cb
--- /dev/null
+++ b/src/libtracker-direct/tracker-connection.vala
@@ -0,0 +1,54 @@
+/*
+ * 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 class Tracker.Direct.Connection : GLib.Object, Tracker.Sparql.Cursor {
+ private int _n_columns = 0;
+
+ Connection () {
+
+ }
+
+ ~Connection () {
+ // Clean up connection
+ }
+
+ public int n_columns {
+ get { return _n_columns; }
+ }
+
+ public bool get_value (uint column, out GLib.Value value) {
+ return false;
+ }
+
+ public bool get_string (uint column, out string value) {
+ return false;
+ }
+
+ public bool get_double (uint column, out double value) {
+ return false;
+ }
+
+ public bool iter_next () {
+ return false;
+ }
+
+ public bool rewind () {
+ return false;
+ }
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]