[tracker/api-cleanup: 6/13] libtracker-miner: move TrackerMinerManager to tracker-control



commit b0b91485127194938e480594eb5ce2d530e8997c
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
    just removed. The tests were already #if 0'ed out anyway...

 .../libtracker-miner/libtracker-miner-sections.txt |   35 ----
 .../libtracker-miner/libtracker-miner.types        |    1 -
 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                 |    6 -
 .../libtracker-miner/tracker-miner-manager-test.c  |  177 --------------------
 12 files changed, 11 insertions(+), 229 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt 
b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index d34ba11..41c7f50 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -97,41 +97,6 @@ tracker_miner_fs_get_type
 </SECTION>
 
 <SECTION>
-<FILE>tracker-miner-manager</FILE>
-<TITLE>TrackerMinerManager</TITLE>
-TRACKER_MINER_MANAGER_ERROR
-TrackerMinerManager
-TrackerMinerManagerClass
-TrackerMinerManagerError
-tracker_miner_manager_error_quark
-tracker_miner_manager_get_available
-tracker_miner_manager_get_description
-tracker_miner_manager_get_display_name
-tracker_miner_manager_get_running
-tracker_miner_manager_get_status
-tracker_miner_manager_ignore_next_update
-tracker_miner_manager_index_file
-tracker_miner_manager_index_file_async
-tracker_miner_manager_index_file_finish
-tracker_miner_manager_is_active
-tracker_miner_manager_is_paused
-tracker_miner_manager_new
-tracker_miner_manager_new_full
-tracker_miner_manager_pause
-tracker_miner_manager_pause_for_process
-tracker_miner_manager_reindex_by_mimetype
-tracker_miner_manager_resume
-<SUBSECTION Standard>
-TRACKER_IS_MINER_MANAGER
-TRACKER_IS_MINER_MANAGER_CLASS
-TRACKER_MINER_MANAGER
-TRACKER_MINER_MANAGER_CLASS
-TRACKER_MINER_MANAGER_GET_CLASS
-TRACKER_TYPE_MINER_MANAGER
-tracker_miner_manager_get_type
-</SECTION>
-
-<SECTION>
 <FILE>tracker-miner-object</FILE>
 <TITLE>TrackerMiner</TITLE>
 TRACKER_MINER_ERROR
diff --git a/docs/reference/libtracker-miner/libtracker-miner.types 
b/docs/reference/libtracker-miner/libtracker-miner.types
index 035a588..0ddac01 100644
--- a/docs/reference/libtracker-miner/libtracker-miner.types
+++ b/docs/reference/libtracker-miner/libtracker-miner.types
@@ -1,5 +1,4 @@
 tracker_decorator_fs_get_type
 tracker_indexing_tree_get_type
-tracker_miner_manager_get_type
 tracker_miner_get_type
 tracker_miner_fs_get_type
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index ffdbb77..b831b22 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
@@ -63,8 +62,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                            
 
@@ -91,7 +88,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..4c755b0 100644
--- a/tests/libtracker-miner/Makefile.am
+++ b/tests/libtracker-miner/Makefile.am
@@ -17,7 +17,6 @@ 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                           \
@@ -63,11 +62,6 @@ 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_LDADD = \
        libtracker-miner-tests.la \
        $(LDADD)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]