[tracker/api-cleanup: 4/13] libtracker-miner: Move TrackerCrawler/Storage to libtracker-common
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/api-cleanup: 4/13] libtracker-miner: Move TrackerCrawler/Storage to libtracker-common
- Date: Thu, 13 Feb 2014 12:53:01 +0000 (UTC)
commit 3e2e4935b0362f849b135df4a4d8a0be9f39a2c7
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jan 25 23:56:04 2014 +0100
libtracker-miner: Move TrackerCrawler/Storage to libtracker-common
These objects are used in multiple places, not necessarily related to
miners. Furthermore, these objects are a bit out of place with the
rest of the miner API as they aren't directly related to that task,
and are already extensively wrapped in the places where they must, so
they just happen to be convenient internal objects that we expose.
Then, move these to libtracker-common, so they're available across
Tracker, but only within it.
All broken #includes resulting from this relocation have been fixed,
and the tracker-crawler test moved with the libtracker-common ones.
.../libtracker-miner/libtracker-miner-docs.sgml | 1 -
.../libtracker-miner/libtracker-miner-sections.txt | 24 --------------------
src/libtracker-common/Makefile.am | 6 +++++
.../tracker-accumulators.c} | 2 +-
.../tracker-accumulators.h} | 0
.../tracker-crawler.c | 2 +-
.../tracker-crawler.h | 0
.../tracker-storage.c | 2 +-
.../tracker-storage.h | 0
src/libtracker-miner/Makefile.am | 15 +----------
src/libtracker-miner/tracker-decorator-fs.c | 2 +-
src/libtracker-miner/tracker-file-notifier.c | 2 +-
src/libtracker-miner/tracker-miner-fs.c | 3 +-
src/libtracker-miner/tracker-miner-manager.c | 2 +-
src/libtracker-miner/tracker-miner.h | 2 -
src/miners/fs/tracker-miner-files.c | 1 +
src/tracker-control/tracker-control-general.c | 1 +
src/tracker-writeback/tracker-writeback.c | 1 +
tests/libtracker-common/Makefile.am | 4 +++
.../tracker-crawler-test.c | 2 +-
tests/libtracker-miner/Makefile.am | 4 ---
21 files changed, 23 insertions(+), 53 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
b/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
index c8088e9..6a6d2e7 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
+++ b/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
@@ -56,7 +56,6 @@
<chapter>
<title>Utilities</title>
<xi:include href="xml/tracker-miner-enums.xml"/>
- <xi:include href="xml/tracker-storage.xml"/>
</chapter>
</part>
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index 44f47f9..d34ba11 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -229,30 +229,6 @@ tracker_password_provider_get_type
</SECTION>
<SECTION>
-<FILE>tracker-storage</FILE>
-<TITLE>TrackerStorage</TITLE>
-TrackerStorage
-TrackerStorageClass
-TrackerStorageType
-tracker_storage_get_device_roots
-tracker_storage_get_device_uuids
-tracker_storage_get_mount_point_for_uuid
-tracker_storage_get_type_for_uuid
-tracker_storage_get_uuid_for_file
-tracker_storage_new
-<SUBSECTION Standard>
-TRACKER_IS_STORAGE
-TRACKER_IS_STORAGE_CLASS
-TRACKER_STORAGE
-TRACKER_STORAGE_CLASS
-TRACKER_STORAGE_GET_CLASS
-TRACKER_STORAGE_TYPE_IS_OPTICAL
-TRACKER_STORAGE_TYPE_IS_REMOVABLE
-TRACKER_TYPE_STORAGE
-tracker_storage_get_type
-</SECTION>
-
-<SECTION>
<FILE>tracker-decorator</FILE>
<TITLE>TrackerDecorator</TITLE>
TrackerDecorator
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index 69b9ce1..45f29e4 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -18,7 +18,9 @@ endif
libtracker_common_la_SOURCES = \
$(BUILT_SOURCES) \
$(os_sources) \
+ tracker-accumulators.c \
tracker-config-file.c \
+ tracker-crawler.c \
tracker-date-time.c \
tracker-dbus.c \
tracker-file-utils.c \
@@ -26,12 +28,15 @@ libtracker_common_la_SOURCES = \
tracker-keyfile-object.c \
tracker-log.c \
tracker-sched.c \
+ tracker-storage.c \
tracker-type-utils.c \
tracker-utils.c \
tracker-crc32.c \
tracker-locale.c
noinst_HEADERS = \
+ tracker-accumulators.h \
+ tracker-crawler.h \
tracker-dbus.h \
tracker-enums.h \
tracker-ioprio.h \
@@ -44,6 +49,7 @@ noinst_HEADERS = \
tracker-keyfile-object.h \
tracker-ontologies.h \
tracker-sched.h \
+ tracker-storage.h \
tracker-type-utils.h \
tracker-utils.h \
tracker-crc32.h \
diff --git a/src/libtracker-miner/tracker-utils.c b/src/libtracker-common/tracker-accumulators.c
similarity index 97%
rename from src/libtracker-miner/tracker-utils.c
rename to src/libtracker-common/tracker-accumulators.c
index aec67b5..72efd50 100644
--- a/src/libtracker-miner/tracker-utils.c
+++ b/src/libtracker-common/tracker-accumulators.c
@@ -19,7 +19,7 @@
#include "config.h"
-#include "tracker-utils.h"
+#include "tracker-accumulators.h"
gboolean
tracker_accumulator_check_file (GSignalInvocationHint *hint,
diff --git a/src/libtracker-miner/tracker-utils.h b/src/libtracker-common/tracker-accumulators.h
similarity index 100%
rename from src/libtracker-miner/tracker-utils.h
rename to src/libtracker-common/tracker-accumulators.h
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-common/tracker-crawler.c
similarity index 99%
rename from src/libtracker-miner/tracker-crawler.c
rename to src/libtracker-common/tracker-crawler.c
index b73eebe..f5b1577 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-common/tracker-crawler.c
@@ -20,7 +20,7 @@
#include "config.h"
#include "tracker-crawler.h"
-#include "tracker-utils.h"
+#include "tracker-accumulators.h"
#define TRACKER_CRAWLER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_CRAWLER,
TrackerCrawlerPrivate))
diff --git a/src/libtracker-miner/tracker-crawler.h b/src/libtracker-common/tracker-crawler.h
similarity index 100%
rename from src/libtracker-miner/tracker-crawler.h
rename to src/libtracker-common/tracker-crawler.h
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-common/tracker-storage.c
similarity index 99%
rename from src/libtracker-miner/tracker-storage.c
rename to src/libtracker-common/tracker-storage.c
index 557d002..39e142e 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-common/tracker-storage.c
@@ -27,7 +27,7 @@
#include <libtracker-common/tracker-log.h>
#include "tracker-storage.h"
-#include "tracker-utils.h"
+#include "tracker-accumulators.h"
/**
* SECTION:tracker-storage
diff --git a/src/libtracker-miner/tracker-storage.h b/src/libtracker-common/tracker-storage.h
similarity index 100%
rename from src/libtracker-miner/tracker-storage.h
rename to src/libtracker-common/tracker-storage.h
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 9307510..ffdbb77 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -32,12 +32,6 @@ noinst_LTLIBRARIES = libtracker-miner-private.la
libtracker_minerdir = $(libdir)/tracker-$(TRACKER_API_VERSION)
libtracker_minerincludedir=$(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-miner/
-crawler_sources = \
- tracker-crawler.c \
- tracker-crawler.h \
- tracker-utils.c \
- tracker-utils.h
-
private_sources = \
tracker-file-notifier.h \
tracker-file-notifier.c \
@@ -51,8 +45,6 @@ private_sources = \
tracker-task-pool.c \
tracker-sparql-buffer.h \
tracker-sparql-buffer.c \
- tracker-storage.c \
- tracker-storage.h \
tracker-thumbnailer.c \
tracker-thumbnailer.h
@@ -83,7 +75,6 @@ libtracker_miner_private_la_SOURCES = \
libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = \
$(network_provider_sources) \
$(password_provider_sources) \
- $(crawler_sources) \
$(miner_sources) \
tracker-indexing-tree.c \
tracker-indexing-tree.h \
@@ -91,7 +82,6 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = \
tracker-password-provider.c
libtracker_minerinclude_HEADERS = \
- tracker-crawler.h \
tracker-decorator.h \
tracker-decorator-fs.h \
tracker-indexing-tree.h \
@@ -104,8 +94,7 @@ libtracker_minerinclude_HEADERS = \
tracker-miner-manager.h \
tracker-miner-web.h \
tracker-network-provider.h \
- tracker-password-provider.h \
- tracker-storage.h
+ tracker-password-provider.h
libtracker_miner_ TRACKER_API_VERSION@_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
@@ -113,7 +102,7 @@ if !ENABLE_GCOV
# Using enable_gcov instead of have_unit_test because when doing a release
# we disable gcov but NOT the unit tests
libtracker_miner_ TRACKER_API_VERSION@_la_LDFLAGS += \
- -export-symbols-regex
'^tracker_(miner|crawler|storage|password_provider|network_provider|indexing_tree|file_system|file_notifier|directory_flags|filter_type|filter_policy|decorator)_.*'
+ -export-symbols-regex
'^tracker_(miner|password_provider|network_provider|indexing_tree|file_system|file_notifier|directory_flags|filter_type|filter_policy|decorator)_.*'
endif
libtracker_miner_ TRACKER_API_VERSION@_la_LIBADD = \
diff --git a/src/libtracker-miner/tracker-decorator-fs.c b/src/libtracker-miner/tracker-decorator-fs.c
index 8812aaa..95c3e5a 100644
--- a/src/libtracker-miner/tracker-decorator-fs.c
+++ b/src/libtracker-miner/tracker-decorator-fs.c
@@ -21,7 +21,7 @@
#include <glib.h>
#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-miner/tracker-storage.h>
+#include <libtracker-common/tracker-storage.h>
#include "tracker-decorator-fs.h"
#include "tracker-decorator-internal.h"
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 9ef01aa..2cb3961 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -21,12 +21,12 @@
#include <libtracker-common/tracker-log.h>
#include <libtracker-common/tracker-date-time.h>
+#include <libtracker-common/tracker-crawler.h>
#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-miner-common.h"
#include "tracker-file-notifier.h"
#include "tracker-file-system.h"
-#include "tracker-crawler.h"
#include "tracker-monitor.h"
static GQuark quark_property_crawled = 0;
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 7c7ef69..9d19ea4 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -24,12 +24,11 @@
#include <libtracker-common/tracker-file-utils.h>
#include <libtracker-common/tracker-log.h>
#include <libtracker-common/tracker-utils.h>
+#include <libtracker-common/tracker-crawler.h>
-#include "tracker-crawler.h"
#include "tracker-miner-fs.h"
#include "tracker-media-art.h"
#include "tracker-monitor.h"
-#include "tracker-utils.h"
#include "tracker-thumbnailer.h"
#include "tracker-priority-queue.h"
#include "tracker-task-pool.h"
diff --git a/src/libtracker-miner/tracker-miner-manager.c b/src/libtracker-miner/tracker-miner-manager.c
index ce1b79c..3585d42 100644
--- a/src/libtracker-miner/tracker-miner-manager.c
+++ b/src/libtracker-miner/tracker-miner-manager.c
@@ -23,8 +23,8 @@
#include <libtracker-common/tracker-dbus.h>
#include <libtracker-common/tracker-type-utils.h>
+#include <libtracker-common/tracker-crawler.h>
-#include "tracker-crawler.h"
#include "tracker-miner-object.h"
#include "tracker-miner-manager.h"
#include "tracker-miner-dbus.h"
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
index d237529..1f7e9de 100644
--- a/src/libtracker-miner/tracker-miner.h
+++ b/src/libtracker-miner/tracker-miner.h
@@ -22,10 +22,8 @@
#define __LIBTRACKER_MINER_H_INSIDE__
-#include <libtracker-miner/tracker-crawler.h>
#include <libtracker-miner/tracker-decorator.h>
#include <libtracker-miner/tracker-decorator-fs.h>
-#include <libtracker-miner/tracker-storage.h>
#include <libtracker-miner/tracker-network-provider.h>
#include <libtracker-miner/tracker-password-provider.h>
#include <libtracker-miner/tracker-miner-object.h>
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index ea31eaf..21ddc3d 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -39,6 +39,7 @@
#include <libtracker-common/tracker-type-utils.h>
#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-file-utils.h>
+#include <libtracker-common/tracker-storage.h>
#include <libtracker-data/tracker-db-manager.h>
diff --git a/src/tracker-control/tracker-control-general.c b/src/tracker-control/tracker-control-general.c
index a808bfd..aca0290 100644
--- a/src/tracker-control/tracker-control-general.c
+++ b/src/tracker-control/tracker-control-general.c
@@ -29,6 +29,7 @@
#endif
#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-crawler.h>
#include <libtracker-data/tracker-data.h>
#include <libtracker-miner/tracker-miner.h>
diff --git a/src/tracker-writeback/tracker-writeback.c b/src/tracker-writeback/tracker-writeback.c
index 7435b0f..1b0b06d 100644
--- a/src/tracker-writeback/tracker-writeback.c
+++ b/src/tracker-writeback/tracker-writeback.c
@@ -21,6 +21,7 @@
#include "tracker-writeback-module.h"
#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-storage.h>
#include <libtracker-miner/tracker-miner.h>
#include <libtracker-sparql/tracker-sparql.h>
diff --git a/tests/libtracker-common/Makefile.am b/tests/libtracker-common/Makefile.am
index 4c80160..9d1125e 100644
--- a/tests/libtracker-common/Makefile.am
+++ b/tests/libtracker-common/Makefile.am
@@ -3,6 +3,7 @@ include $(top_srcdir)/Makefile.decl
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += \
+ tracker-crawler-test \
tracker-type-utils \
tracker-dbus \
tracker-file-utils \
@@ -14,6 +15,7 @@ TEST_PROGS += \
AM_CPPFLAGS = \
-DTOP_SRCDIR=\"$(abs_top_srcdir)\" \
-DTOP_BUILDDIR=\"$(abs_top_builddir)\" \
+ -DTEST_DATA_DIR=\""$(abs_top_srcdir)/tests/libtracker-miner/data"\" \
$(BUILD_CFLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/tests/common \
@@ -25,6 +27,8 @@ LDADD = \
$(BUILD_LIBS) \
$(LIBTRACKER_COMMON_LIBS)
+tracker_crawler_test_SOURCES = tracker-crawler-test.c
+
tracker_dbus_SOURCES = \
tracker-dbus-test.c
diff --git a/tests/libtracker-miner/tracker-crawler-test.c b/tests/libtracker-common/tracker-crawler-test.c
similarity index 99%
rename from tests/libtracker-miner/tracker-crawler-test.c
rename to tests/libtracker-common/tracker-crawler-test.c
index e00801a..0fe00c6 100644
--- a/tests/libtracker-miner/tracker-crawler-test.c
+++ b/tests/libtracker-common/tracker-crawler-test.c
@@ -21,7 +21,7 @@
#include <locale.h>
-#include <libtracker-miner/tracker-miner.h>
+#include <libtracker-common/tracker-crawler.h>
typedef struct CrawlerTest CrawlerTest;
diff --git a/tests/libtracker-miner/Makefile.am b/tests/libtracker-miner/Makefile.am
index e2c447f..507b769 100644
--- a/tests/libtracker-miner/Makefile.am
+++ b/tests/libtracker-miner/Makefile.am
@@ -15,7 +15,6 @@ noinst_LTLIBRARIES = libtracker-miner-tests.la
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += \
- tracker-crawler-test \
tracker-file-notifier-test \
tracker-file-system-test \
tracker-miner-manager-test \
@@ -64,9 +63,6 @@ libtracker_miner_tests_la_LIBADD = \
$(top_builddir)/src/libtracker-sparql-backend/libtracker-sparql- TRACKER_API_VERSION@.la \
$(BUILD_LIBS)
-tracker_crawler_test_SOURCES = \
- tracker-crawler-test.c
-
tracker_miner_manager_test_SOURCES = \
tracker-miner-manager-test.c \
miners-mock.c \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]