[tracker/api-cleanup: 6/6] libtracker-miner: move TrackerMinerManager to tracker-control
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/api-cleanup: 6/6] libtracker-miner: move TrackerMinerManager to tracker-control
- Date: Mon, 27 Jan 2014 18:49:45 +0000 (UTC)
commit 8bf45328730eeb6cb20c345a622b2a89b18bab14
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 26 01:02:32 2014 +0100
libtracker-miner: move TrackerMinerManager to tracker-control
Controlling the state of every miner is something that should be
very rarely interesting to the public, if ever. So move the manager
object to tracker-control itself, which is the only user within
tracker.
If anything else (session managers or whatnot) wants to control the
state of miners, will have to copy this code around, or reimplement
it (which is just about poking a bunch of DBus interfaces)
There was a corresponding test in the tests/ folder that has been
fully disabled. The tests were already #if 0'ed out anyway...
src/libtracker-miner/Makefile.am | 4 ----
src/libtracker-miner/tracker-miner.h | 1 -
src/tracker-control/Makefile.am | 3 +++
src/tracker-control/tracker-control-general.c | 2 +-
src/tracker-control/tracker-control-miners.c | 4 +++-
src/tracker-control/tracker-control-status.c | 4 +++-
.../tracker-miner-manager.c | 3 +--
.../tracker-miner-manager.h | 0
tests/libtracker-miner/Makefile.am | 10 +++++-----
9 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index e083f4f..1b11c44 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -22,7 +22,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
-DSHAREDIR=\""$(datadir)"\" \
- -DTRACKER_MINERS_DIR=\""$(datadir)/tracker/miners"\" \
$(LIBTRACKER_MINER_CFLAGS)
lib_LTLIBRARIES = libtracker-miner- TRACKER_API_VERSION@.la
@@ -62,8 +61,6 @@ miner_sources = \
tracker-miner-object.h \
tracker-miner-fs.c \
tracker-miner-fs.h \
- tracker-miner-manager.c \
- tracker-miner-manager.h \
tracker-miner-web.c \
tracker-miner-web.h
@@ -90,7 +87,6 @@ libtracker_minerinclude_HEADERS = \
tracker-miner-enum-types.h \
tracker-miner-object.h \
tracker-miner-fs.h \
- tracker-miner-manager.h \
tracker-miner-web.h \
tracker-network-provider.h \
tracker-password-provider.h
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
index 1f7e9de..208a3db 100644
--- a/src/libtracker-miner/tracker-miner.h
+++ b/src/libtracker-miner/tracker-miner.h
@@ -29,7 +29,6 @@
#include <libtracker-miner/tracker-miner-object.h>
#include <libtracker-miner/tracker-miner-fs.h>
#include <libtracker-miner/tracker-miner-web.h>
-#include <libtracker-miner/tracker-miner-manager.h>
#include <libtracker-miner/tracker-miner-enums.h>
#include <libtracker-miner/tracker-miner-enum-types.h>
#include <libtracker-miner/tracker-indexing-tree.h>
diff --git a/src/tracker-control/Makefile.am b/src/tracker-control/Makefile.am
index 6bcb0f2..f18a91c 100644
--- a/src/tracker-control/Makefile.am
+++ b/src/tracker-control/Makefile.am
@@ -3,6 +3,7 @@ include $(top_srcdir)/Makefile.decl
AM_CPPFLAGS = \
$(BUILD_CFLAGS) \
-DLOCALEDIR=\""$(localedir)"\" \
+ -DTRACKER_MINERS_DIR=\""$(datadir)/tracker/miners"\" \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
$(TRACKER_CONTROL_CFLAGS)
@@ -10,6 +11,8 @@ AM_CPPFLAGS = \
bin_PROGRAMS = tracker-control
tracker_control_SOURCES = \
+ tracker-miner-manager.c \
+ tracker-miner-manager.h \
tracker-control.h \
tracker-control-general.c \
tracker-control-miners.c \
diff --git a/src/tracker-control/tracker-control-general.c b/src/tracker-control/tracker-control-general.c
index aca0290..bed9a1d 100644
--- a/src/tracker-control/tracker-control-general.c
+++ b/src/tracker-control/tracker-control-general.c
@@ -31,8 +31,8 @@
#include <libtracker-common/tracker-common.h>
#include <libtracker-common/tracker-crawler.h>
#include <libtracker-data/tracker-data.h>
-#include <libtracker-miner/tracker-miner.h>
+#include "tracker-miner-manager.h"
#include "tracker-control.h"
#define OPTION_TERM_ALL "all"
diff --git a/src/tracker-control/tracker-control-miners.c b/src/tracker-control/tracker-control-miners.c
index 176152d..c933022 100644
--- a/src/tracker-control/tracker-control-miners.c
+++ b/src/tracker-control/tracker-control-miners.c
@@ -19,11 +19,13 @@
#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
#include <glib/gi18n.h>
#include <libtracker-common/tracker-common.h>
-#include <libtracker-miner/tracker-miner.h>
+#include "tracker-miner-manager.h"
#include "tracker-control.h"
/* Note:
diff --git a/src/tracker-control/tracker-control-status.c b/src/tracker-control/tracker-control-status.c
index 9e11cd8..817c462 100644
--- a/src/tracker-control/tracker-control-status.c
+++ b/src/tracker-control/tracker-control-status.c
@@ -19,11 +19,13 @@
#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
#include <glib/gi18n.h>
#include <libtracker-common/tracker-common.h>
-#include <libtracker-miner/tracker-miner.h>
+#include "tracker-miner-manager.h"
#include "tracker-control.h"
static GDBusConnection *connection = NULL;
diff --git a/src/libtracker-miner/tracker-miner-manager.c b/src/tracker-control/tracker-miner-manager.c
similarity index 99%
rename from src/libtracker-miner/tracker-miner-manager.c
rename to src/tracker-control/tracker-miner-manager.c
index 3585d42..6681974 100644
--- a/src/libtracker-miner/tracker-miner-manager.c
+++ b/src/tracker-control/tracker-miner-manager.c
@@ -24,10 +24,9 @@
#include <libtracker-common/tracker-dbus.h>
#include <libtracker-common/tracker-type-utils.h>
#include <libtracker-common/tracker-crawler.h>
+#include <libtracker-miner/tracker-miner-dbus.h>
-#include "tracker-miner-object.h"
#include "tracker-miner-manager.h"
-#include "tracker-miner-dbus.h"
/**
* SECTION:tracker-miner-manager
diff --git a/src/libtracker-miner/tracker-miner-manager.h b/src/tracker-control/tracker-miner-manager.h
similarity index 100%
rename from src/libtracker-miner/tracker-miner-manager.h
rename to src/tracker-control/tracker-miner-manager.h
diff --git a/tests/libtracker-miner/Makefile.am b/tests/libtracker-miner/Makefile.am
index 507b769..347f77c 100644
--- a/tests/libtracker-miner/Makefile.am
+++ b/tests/libtracker-miner/Makefile.am
@@ -17,13 +17,13 @@ noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += \
tracker-file-notifier-test \
tracker-file-system-test \
- tracker-miner-manager-test \
tracker-password-provider-test \
tracker-thumbnailer-test \
tracker-monitor-test \
tracker-priority-queue-test \
tracker-task-pool-test \
tracker-indexing-tree-test
+# tracker-miner-manager-test
AM_CPPFLAGS = \
$(BUILD_VALACFLAGS) \
@@ -63,10 +63,10 @@ libtracker_miner_tests_la_LIBADD = \
$(top_builddir)/src/libtracker-sparql-backend/libtracker-sparql- TRACKER_API_VERSION@.la \
$(BUILD_LIBS)
-tracker_miner_manager_test_SOURCES = \
- tracker-miner-manager-test.c \
- miners-mock.c \
- empty-gobject.c
+#tracker_miner_manager_test_SOURCES = \
+# tracker-miner-manager-test.c \
+# miners-mock.c \
+# empty-gobject.c
tracker_miner_manager_test_LDADD = \
libtracker-miner-tests.la \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]