[tracker] libtracker-miner: Add single tracker-miner.h header.



commit 5991650793276f2a57a575a047e30877452e0908
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 22 14:13:19 2010 +0100

    libtracker-miner: Add single tracker-miner.h header.
    
    This should be the only include point from now on to libtracker-miner.
    All code including individual libtracker-miner headers in Tracker has
    been updated to #include <libtracker-miner/tracker-miner.h>.

 examples/libtracker-miner/tracker-miner-test.h    |    2 +-
 src/libtracker-miner/Makefile.am                  |    2 +
 src/libtracker-miner/tracker-crawler.h            |    4 ++
 src/libtracker-miner/tracker-miner-dbus.h         |    5 +++
 src/libtracker-miner/tracker-miner-fs.h           |    4 ++
 src/libtracker-miner/tracker-miner-manager.h      |    4 ++
 src/libtracker-miner/tracker-miner-object.h       |   10 ++++--
 src/libtracker-miner/tracker-miner-web.h          |    4 ++
 src/libtracker-miner/tracker-miner.h              |   37 +++++++++++++++++++++
 src/libtracker-miner/tracker-password-provider.h  |    4 ++
 src/libtracker-miner/tracker-storage.h            |    4 ++
 src/libtracker-miner/tracker-thumbnailer.h        |    4 ++
 src/plugins/evolution/tracker-evolution-plugin.h  |    2 +-
 src/tracker-control/tracker-control.c             |    5 +--
 src/tracker-extract/tracker-albumart.c            |    2 +-
 src/tracker-miner-fs/tracker-main.c               |    2 +-
 src/tracker-miner-fs/tracker-miner-applications.h |    2 +-
 src/tracker-miner-fs/tracker-miner-files.c        |    1 -
 src/tracker-miner-fs/tracker-miner-files.h        |    2 +-
 src/tracker-status-icon/tracker-status-icon.c     |    2 +-
 src/tracker-utils/tracker-status.c                |    2 +-
 src/tracker-writeback/tracker-writeback.h         |    2 +-
 tests/libtracker-miner/Makefile.am                |    1 +
 23 files changed, 90 insertions(+), 17 deletions(-)
---
diff --git a/examples/libtracker-miner/tracker-miner-test.h b/examples/libtracker-miner/tracker-miner-test.h
index ea02890..4dabdfe 100644
--- a/examples/libtracker-miner/tracker-miner-test.h
+++ b/examples/libtracker-miner/tracker-miner-test.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include <libtracker-miner/tracker-miner-fs.h>
+#include <libtracker-miner/tracker-miner.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 009091d..b8a098b 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -2,6 +2,7 @@ include $(top_srcdir)/Makefile.decl
 
 INCLUDES =						\
 	-DSHAREDIR=\""$(datadir)"\"			\
+	-DTRACKER_MINER_COMPILATION			\
 	-DDBUS_SERVICES_DIR=\""$(DBUS_SERVICES_DIR)"\"	\
 	-DG_LOG_DOMAIN=\"Tracker\"			\
 	-DTRACKER_COMPILATION				\
@@ -52,6 +53,7 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = 	\
 
 libtracker_minerinclude_HEADERS = 			\
 	tracker-crawler.h				\
+	tracker-miner.h					\
 	tracker-miner-object.h 				\
 	tracker-miner-dbus.h 				\
 	tracker-miner-fs.h				\
diff --git a/src/libtracker-miner/tracker-crawler.h b/src/libtracker-miner/tracker-crawler.h
index 5b674a7..6b4b138 100644
--- a/src/libtracker-miner/tracker-crawler.h
+++ b/src/libtracker-miner/tracker-crawler.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_CRAWLER_H__
 #define __LIBTRACKER_MINER_CRAWLER_H__
 
diff --git a/src/libtracker-miner/tracker-miner-dbus.h b/src/libtracker-miner/tracker-miner-dbus.h
index dfc69bc..404fd48 100644
--- a/src/libtracker-miner/tracker-miner-dbus.h
+++ b/src/libtracker-miner/tracker-miner-dbus.h
@@ -17,10 +17,15 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_MINER_DBUS_H__
 #define __LIBTRACKER_MINER_MINER_DBUS_H__
 
 #include <glib-object.h>
+#include <dbus/dbus-glib-bindings.h>
 
 #include "tracker-miner-object.h"
 
diff --git a/src/libtracker-miner/tracker-miner-fs.h b/src/libtracker-miner/tracker-miner-fs.h
index 33204e0..e4e169b 100644
--- a/src/libtracker-miner/tracker-miner-fs.h
+++ b/src/libtracker-miner/tracker-miner-fs.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_MINER_FS_H__
 #define __LIBTRACKER_MINER_MINER_FS_H__
 
diff --git a/src/libtracker-miner/tracker-miner-manager.h b/src/libtracker-miner/tracker-miner-manager.h
index efc3bc8..9f53074 100644
--- a/src/libtracker-miner/tracker-miner-manager.h
+++ b/src/libtracker-miner/tracker-miner-manager.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_MANAGER_H__
 #define __LIBTRACKER_MINER_MANAGER_H__
 
diff --git a/src/libtracker-miner/tracker-miner-object.h b/src/libtracker-miner/tracker-miner-object.h
index ea3faf7..6410dc0 100644
--- a/src/libtracker-miner/tracker-miner-object.h
+++ b/src/libtracker-miner/tracker-miner-object.h
@@ -17,8 +17,12 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __LIBTRACKER_MINER_MINER_H__
-#define __LIBTRACKER_MINER_MINER_H__
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
+#ifndef __LIBTRACKER_MINER_OBJECT_H__
+#define __LIBTRACKER_MINER_OBJECT_H__
 
 #include <glib-object.h>
 #include <gio/gio.h>
@@ -131,4 +135,4 @@ void             tracker_miner_commit_finish               (TrackerMiner
 
 G_END_DECLS
 
-#endif /* __LIBTRACKER_MINER_MINER_H__ */
+#endif /* __LIBTRACKER_MINER_OBJECT_H__ */
diff --git a/src/libtracker-miner/tracker-miner-web.h b/src/libtracker-miner/tracker-miner-web.h
index 952f382..0516036 100644
--- a/src/libtracker-miner/tracker-miner-web.h
+++ b/src/libtracker-miner/tracker-miner-web.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_WEB_H__
 #define __LIBTRACKER_MINER_WEB_H__
 
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
new file mode 100644
index 0000000..07f6aec
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009, Nokia (urho konttori 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.
+ */
+
+#ifndef __TRACKER_MINER_H__
+#define __TRACKER_MINER_H__
+
+#define __TRACKER_MINER_H_INSIDE__
+
+#include <libtracker-miner/tracker-crawler.h>
+#include <libtracker-miner/tracker-storage.h>
+#include <libtracker-miner/tracker-thumbnailer.h>
+#include <libtracker-miner/tracker-password-provider.h>
+#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-dbus.h>
+#include <libtracker-miner/tracker-miner-manager.h>
+
+#undef __TRACKER_MINER_H_INSIDE__
+
+#endif /* __TRACKER_MINER_H__ */
diff --git a/src/libtracker-miner/tracker-password-provider.h b/src/libtracker-miner/tracker-password-provider.h
index 92530b0..a36f797 100644
--- a/src/libtracker-miner/tracker-password-provider.h
+++ b/src/libtracker-miner/tracker-password-provider.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_PASSWORD_PROVIDER_H__
 #define __LIBTRACKER_MINER_PASSWORD_PROVIDER_H__
 
diff --git a/src/libtracker-miner/tracker-storage.h b/src/libtracker-miner/tracker-storage.h
index dc2a92e..83ea64b 100644
--- a/src/libtracker-miner/tracker-storage.h
+++ b/src/libtracker-miner/tracker-storage.h
@@ -17,6 +17,10 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_STORAGE_H__
 #define __LIBTRACKER_MINER_STORAGE_H__
 
diff --git a/src/libtracker-miner/tracker-thumbnailer.h b/src/libtracker-miner/tracker-thumbnailer.h
index 1d1ffe0..86132ca 100644
--- a/src/libtracker-miner/tracker-thumbnailer.h
+++ b/src/libtracker-miner/tracker-thumbnailer.h
@@ -19,6 +19,10 @@
  * Author: Philip Van Hoof <philip codeminded be>
  */
 
+#if !defined (__TRACKER_MINER_H_INSIDE__) && !defined (TRACKER_MINER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
 #ifndef __LIBTRACKER_MINER_THUMBNAILER_H__
 #define __LIBTRACKER_MINER_THUMBNAILER_H__
 
diff --git a/src/plugins/evolution/tracker-evolution-plugin.h b/src/plugins/evolution/tracker-evolution-plugin.h
index 344f96c..b1958de 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.h
+++ b/src/plugins/evolution/tracker-evolution-plugin.h
@@ -26,7 +26,7 @@
 #include <dbus/dbus-glib-bindings.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
-#include <libtracker-miner/tracker-miner-object.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #define TRACKER_TYPE_EVOLUTION_PLUGIN          (tracker_evolution_plugin_get_type())
 #define TRACKER_EVOLUTION_PLUGIN(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), TRACKER_TYPE_EVOLUTION_PLUGIN, TrackerEvolutionPlugin))
diff --git a/src/tracker-control/tracker-control.c b/src/tracker-control/tracker-control.c
index 3a5a072..91445d1 100644
--- a/src/tracker-control/tracker-control.c
+++ b/src/tracker-control/tracker-control.c
@@ -33,11 +33,8 @@
 #include <glib/gstdio.h>
 
 #include <libtracker-common/tracker-common.h>
-
 #include <libtracker-db/tracker-db.h>
-
-#include <libtracker-miner/tracker-miner-manager.h>
-#include <libtracker-miner/tracker-crawler.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include "tracker-miner-files-reindex-client.h"
 
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index 5cce241..1c62365 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -33,7 +33,7 @@
 
 #include <dbus/dbus-glib-bindings.h>
 
-#include <libtracker-miner/tracker-storage.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include "tracker-albumart.h"
 #include "tracker-dbus.h"
diff --git a/src/tracker-miner-fs/tracker-main.c b/src/tracker-miner-fs/tracker-main.c
index b11c32e..01cb7f7 100644
--- a/src/tracker-miner-fs/tracker-main.c
+++ b/src/tracker-miner-fs/tracker-main.c
@@ -40,7 +40,7 @@
 #include <libtracker-common/tracker-ontologies.h>
 #include <libtracker-common/tracker-file-utils.h>
 
-#include <libtracker-miner/tracker-thumbnailer.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include <libtracker-db/tracker-db-manager.h>
 #include <libtracker-db/tracker-db-dbus.h>
diff --git a/src/tracker-miner-fs/tracker-miner-applications.h b/src/tracker-miner-fs/tracker-miner-applications.h
index 757b8ab..f0eec6e 100644
--- a/src/tracker-miner-fs/tracker-miner-applications.h
+++ b/src/tracker-miner-fs/tracker-miner-applications.h
@@ -20,7 +20,7 @@
 #ifndef __TRACKER_MINER_FS_APPLICATIONS_H__
 #define __TRACKER_MINER_FS_APPLICATIONS_H__
 
-#include <libtracker-miner/tracker-miner-fs.h>
+#include <libtracker-miner/tracker-miner.h>
 
 G_BEGIN_DECLS
 
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 715c479..668260f 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -33,7 +33,6 @@
 #include <libtracker-common/tracker-power.h>
 #include <libtracker-common/tracker-type-utils.h>
 #include <libtracker-common/tracker-utils.h>
-#include <libtracker-miner/tracker-storage.h>
 
 #include "tracker-miner-files.h"
 #include "tracker-config.h"
diff --git a/src/tracker-miner-fs/tracker-miner-files.h b/src/tracker-miner-fs/tracker-miner-files.h
index 32d370a..782ff2f 100644
--- a/src/tracker-miner-fs/tracker-miner-files.h
+++ b/src/tracker-miner-fs/tracker-miner-files.h
@@ -20,7 +20,7 @@
 #ifndef __TRACKER_MINER_FS_FILES_H__
 #define __TRACKER_MINER_FS_FILES_H__
 
-#include <libtracker-miner/tracker-miner-fs.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include "tracker-config.h"
 
diff --git a/src/tracker-status-icon/tracker-status-icon.c b/src/tracker-status-icon/tracker-status-icon.c
index 70c6c51..e7fd50e 100644
--- a/src/tracker-status-icon/tracker-status-icon.c
+++ b/src/tracker-status-icon/tracker-status-icon.c
@@ -24,7 +24,7 @@
 
 #include <glib/gi18n.h>
 
-#include <libtracker-miner/tracker-miner-manager.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include "tracker-status-icon.h"
 #include "tracker-icon-config.h"
diff --git a/src/tracker-utils/tracker-status.c b/src/tracker-utils/tracker-status.c
index 4a4f8f3..ea12796 100644
--- a/src/tracker-utils/tracker-status.c
+++ b/src/tracker-utils/tracker-status.c
@@ -30,7 +30,7 @@
 
 #include <libtracker-client/tracker.h>
 #include <libtracker-common/tracker-type-utils.h>
-#include <libtracker-miner/tracker-miner-manager.h>
+#include <libtracker-miner/tracker-miner.h>
 
 #include "tracker-miner-client.h"
 
diff --git a/src/tracker-writeback/tracker-writeback.h b/src/tracker-writeback/tracker-writeback.h
index 49e3c42..27be0d1 100644
--- a/src/tracker-writeback/tracker-writeback.h
+++ b/src/tracker-writeback/tracker-writeback.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include <libtracker-miner/tracker-miner-manager.h>
+#include <libtracker-miner/tracker-miner.h>
 #include <libtracker-client/tracker.h>
 
 G_BEGIN_DECLS
diff --git a/tests/libtracker-miner/Makefile.am b/tests/libtracker-miner/Makefile.am
index 3649e62..f99f5f2 100644
--- a/tests/libtracker-miner/Makefile.am
+++ b/tests/libtracker-miner/Makefile.am
@@ -21,6 +21,7 @@ commonlibs = 									\
 
 INCLUDES = 									\
 	-DTEST									\
+	-DTRACKER_MINER_COMPILATION						\
 	-DG_LOG_DOMAIN=\"Tracker\"						\
 	-DPKGLIBDIR=\""$(libdir)/tracker-$(TRACKER_API_VERSION)"\"		\
 	-DLIBEXEC_PATH=\""$(libexecdir)"\"					\



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