[tracker/rss-enclosures] libtracker-direct: Add initial skeleton
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-direct: Add initial skeleton
- Date: Wed, 24 Nov 2010 01:20:31 +0000 (UTC)
commit 032422355d90ace3c39898cc211eda006041d958
Author: Martyn Russell <martyn lanedo com>
Date: Mon Jul 5 17:03:10 2010 +0100
libtracker-direct: Add initial skeleton
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-direct.vala | 54 +++++++++++++++++++++++++++++
3 files changed, 101 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9cb7ca4..a098bee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1880,6 +1880,7 @@ AC_CONFIG_FILES([
src/libtracker-common/Makefile
src/libtracker-sparql/Makefile
src/libtracker-bus/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..3172ba9
--- /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-direct.vala
+
+libtracker_direct_ TRACKER_API_VERSION@_la_SOURCES = \
+ libtracker-direct.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-$(TRACKER_API_VERSION).vapi \
+ tracker-connection.h
+
+# Vala sources
+vapi_sources = \
+ $(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).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-direct.vala b/src/libtracker-direct/tracker-direct.vala
new file mode 100644
index 0000000..a5a61cb
--- /dev/null
+++ b/src/libtracker-direct/tracker-direct.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]