[tracker/libtracker-bus: 1/51] libtracker-bus: Add D-Bus implementation
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-bus: 1/51] libtracker-bus: Add D-Bus implementation
- Date: Wed, 11 Aug 2010 15:33:49 +0000 (UTC)
commit 6e7d220d83d18bb690ef8f85a97e3860266ca64e
Author: Martyn Russell <martyn lanedo com>
Date: Wed Jul 14 11:11:05 2010 +0100
libtracker-bus: Add D-Bus implementation
configure.ac | 1 +
src/Makefile.am | 1 +
src/libtracker-bus/Makefile.am | 64 +++++++++++++++++++++++++++++++++++
src/libtracker-bus/tracker-bus.vala | 47 +++++++++++++++++++++++++
4 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 72c60ff..9765a3a 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-bus/Makefile
src/libtracker-data/Makefile
src/libtracker-fts/Makefile
src/libtracker-extract/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index d4152de..4cdc9d6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,7 @@ SUBDIRS = \
libtracker-sparql \
libtracker-client \
$(libtrackerfts_dir) \
+ libtracker-bus \
libtracker-data \
libtracker-extract \
libtracker-miner \
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
new file mode 100644
index 0000000..e9c2f4e
--- /dev/null
+++ b/src/libtracker-bus/Makefile.am
@@ -0,0 +1,64 @@
+include $(top_srcdir)/Makefile.decl
+
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"Tracker\" \
+ -DTRACKER_COMPILATION \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/libtracker-sparql \
+ -I$(top_builddir)/src \
+ $(WARN_CFLAGS) \
+ $(GLIB2_CFLAGS) \
+ $(GCOV_CFLAGS)
+
+lib_LTLIBRARIES = libtracker-bus- TRACKER_API_VERSION@.la
+
+libtracker_busincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-bus
+
+libtracker_bus_la_VALASOURCES = \
+ tracker-bus.vala
+
+libtracker_bus_ TRACKER_API_VERSION@_la_SOURCES = \
+ libtracker-bus.vala.stamp \
+ $(libtracker_bus_la_VALASOURCES:.vala=.c)
+
+libtracker_bus_ TRACKER_API_VERSION@_la_LDFLAGS = \
+ -shared -fPIC -module -avoid-version
+
+# -export-symbols-regex '^tracker_.*'
+
+libtracker_businclude_HEADERS = \
+ $(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
+ tracker-bus.h
+
+# Vala sources
+vapi_sources = \
+ $(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
+ $(top_srcdir)/src/libtracker-common/libtracker-common.vapi
+
+# Vala bindings
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = \
+ tracker-bus-$(TRACKER_API_VERSION).vapi
+
+libtracker-bus.vala.stamp: $(libtracker_bus_la_VALASOURCES) $(vapi_sources)
+ $(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-bus.h --vapi tracker-bus-$(TRACKER_API_VERSION).vapi $^
+ $(AM_V_GEN)touch $@
+
+libtracker_bus_ TRACKER_API_VERSION@_la_LIBADD = \
+ $(GLIB2_LIBS) \
+ $(DBUS_LIBS)
+
+BUILT_SOURCES = \
+ libtracker-bus.vala.stamp
+
+CLEANFILES = \
+ $(BUILT_SOURCES)
+
+MAINTAINERCLEANFILES = \
+ $(libtracker_bus_la_VALASOURCES:.vala=.c) \
+ libtracker-bus.vala.stamp \
+ tracker-bus.h
+
+EXTRA_DIST = \
+ $(libtracker_bus_la_VALASOURCES) \
+ libtracker-bus.vala.stamp
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
new file mode 100644
index 0000000..91c60f2
--- /dev/null
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -0,0 +1,47 @@
+/*
+ * 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.Bus.Connection : Tracker.Sparql.Connection {
+ static bool initialized;
+
+ public Connection ()
+ requires (!initialized) {
+ initialized = true;
+
+ // FIXME: Implement DBus stuff
+ }
+
+ ~Connection () {
+ // Clean up connection
+ initialized = false;
+ }
+
+ public override Sparql.Cursor? query (string sparql, Cancellable? cancellable) throws GLib.Error {
+ return null;
+ }
+
+ public async override Sparql.Cursor? query_async (string sparql, Cancellable? cancellable = null) throws GLib.Error {
+ return null;
+ }
+}
+
+public Tracker.Sparql.Connection module_init () {
+ Tracker.Sparql.Connection plugin = new Tracker.Bus.Connection ();
+ return plugin;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]