[tracker] libtracker-miner: Various code code consistency fixes
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Various code code consistency fixes
- Date: Wed, 24 Mar 2010 15:03:18 +0000 (UTC)
commit 6738d3b9d83f3e892622331eed98dda276eaff7a
Author: Martyn Russell <martyn lanedo com>
Date: Wed Mar 24 14:59:52 2010 +0000
libtracker-miner: Various code code consistency fixes
src/libtracker-miner/Makefile.am | 1 -
src/libtracker-miner/tracker-crawler.h | 51 ++++++-------
src/libtracker-miner/tracker-dbus.h | 4 +
src/libtracker-miner/tracker-miner-dbus.h | 8 +-
src/libtracker-miner/tracker-miner-fs.h | 8 +-
src/libtracker-miner/tracker-miner-manager.h | 87 ++++++++++-----------
src/libtracker-miner/tracker-miner-object.h | 36 +++++-----
src/libtracker-miner/tracker-miner-web-dbus.h | 4 +
src/libtracker-miner/tracker-miner-web.h | 8 +-
src/libtracker-miner/tracker-miner.h | 10 +-
src/libtracker-miner/tracker-monitor.h | 4 +
src/libtracker-miner/tracker-password-provider.h | 8 +-
src/libtracker-miner/tracker-storage.h | 24 +++---
src/libtracker-miner/tracker-thumbnailer.h | 8 +-
src/libtracker-miner/tracker-utils.h | 4 +
15 files changed, 137 insertions(+), 128 deletions(-)
---
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index c02e006..ecc5596 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -2,7 +2,6 @@ include $(top_srcdir)/Makefile.decl
INCLUDES = \
-DSHAREDIR=\""$(datadir)"\" \
- -DTRACKER_MINER_COMPILATION \
-DDBUS_SERVICES_DIR=\""$(DBUS_SERVICES_DIR)"\" \
-DG_LOG_DOMAIN=\"Tracker\" \
-DTRACKER_COMPILATION \
diff --git a/src/libtracker-miner/tracker-crawler.h b/src/libtracker-miner/tracker-crawler.h
index 6b4b138..1ccd6c7 100644
--- a/src/libtracker-miner/tracker-crawler.h
+++ b/src/libtracker-miner/tracker-crawler.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
@@ -51,33 +51,32 @@ struct TrackerCrawler {
struct TrackerCrawlerClass {
GObjectClass parent;
- gboolean (* check_directory) (TrackerCrawler *crawler,
- GFile *file);
- gboolean (* check_file) (TrackerCrawler *crawler,
- GFile *file);
+ gboolean (* check_directory) (TrackerCrawler *crawler,
+ GFile *file);
+ gboolean (* check_file) (TrackerCrawler *crawler,
+ GFile *file);
gboolean (* check_directory_contents) (TrackerCrawler *crawler,
GFile *file,
GList *contents);
- void (* directory_crawled) (TrackerCrawler *crawler,
- GFile *directory,
- GNode *tree,
- guint directories_found,
- guint directories_ignored,
- guint files_found,
- guint files_ignored);
- void (* finished) (TrackerCrawler *crawler,
- gboolean interrupted);
+ void (* directory_crawled) (TrackerCrawler *crawler,
+ GFile *directory,
+ GNode *tree,
+ guint directories_found,
+ guint directories_ignored,
+ guint files_found,
+ guint files_ignored);
+ void (* finished) (TrackerCrawler *crawler,
+ gboolean interrupted);
};
-GType tracker_crawler_get_type (void);
-TrackerCrawler *tracker_crawler_new (void);
-gboolean tracker_crawler_start (TrackerCrawler *crawler,
- GFile *file,
- gboolean recurse);
-void tracker_crawler_stop (TrackerCrawler *crawler);
-void tracker_crawler_pause (TrackerCrawler *crawler);
-void tracker_crawler_resume (TrackerCrawler *crawler);
-
+GType tracker_crawler_get_type (void);
+TrackerCrawler *tracker_crawler_new (void);
+gboolean tracker_crawler_start (TrackerCrawler *crawler,
+ GFile *file,
+ gboolean recurse);
+void tracker_crawler_stop (TrackerCrawler *crawler);
+void tracker_crawler_pause (TrackerCrawler *crawler);
+void tracker_crawler_resume (TrackerCrawler *crawler);
void tracker_crawler_set_throttle (TrackerCrawler *crawler,
gdouble throttle);
diff --git a/src/libtracker-miner/tracker-dbus.h b/src/libtracker-miner/tracker-dbus.h
index 8624182..cb88390 100644
--- a/src/libtracker-miner/tracker-dbus.h
+++ b/src/libtracker-miner/tracker-dbus.h
@@ -20,6 +20,10 @@
#ifndef __LIBTRACKER_MINER_DBUS_H__
#define __LIBTRACKER_MINER_DBUS_H__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <libtracker-common/tracker-dbus.h>
#include "tracker-miner-object.h"
diff --git a/src/libtracker-miner/tracker-miner-dbus.h b/src/libtracker-miner/tracker-miner-dbus.h
index 404fd48..c56f4fb 100644
--- a/src/libtracker-miner/tracker-miner-dbus.h
+++ b/src/libtracker-miner/tracker-miner-dbus.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <dbus/dbus-glib-bindings.h>
diff --git a/src/libtracker-miner/tracker-miner-fs.h b/src/libtracker-miner/tracker-miner-fs.h
index e4e169b..f708889 100644
--- a/src/libtracker-miner/tracker-miner-fs.h
+++ b/src/libtracker-miner/tracker-miner-fs.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
diff --git a/src/libtracker-miner/tracker-miner-manager.h b/src/libtracker-miner/tracker-miner-manager.h
index 9f53074..b2c5f87 100644
--- a/src/libtracker-miner/tracker-miner-manager.h
+++ b/src/libtracker-miner/tracker-miner-manager.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
G_BEGIN_DECLS
@@ -55,54 +55,49 @@ struct TrackerMinerManager {
struct TrackerMinerManagerClass {
GObjectClass parent_class;
- void (* miner_progress) (TrackerMinerManager *manager,
- const gchar *miner_name,
- const gchar *status,
- gdouble progress);
- void (* miner_paused) (TrackerMinerManager *manager,
- const gchar *miner_name);
- void (* miner_resumed) (TrackerMinerManager *manager,
- const gchar *miner_name);
+ void (* miner_progress) (TrackerMinerManager *manager,
+ const gchar *miner_name,
+ const gchar *status,
+ gdouble progress);
+ void (* miner_paused) (TrackerMinerManager *manager,
+ const gchar *miner_name);
+ void (* miner_resumed) (TrackerMinerManager *manager,
+ const gchar *miner_name);
void (* miner_activated) (TrackerMinerManager *manager,
const gchar *miner_name);
void (* miner_deactivated) (TrackerMinerManager *manager,
const gchar *miner_name);
};
-GType tracker_miner_manager_get_type (void) G_GNUC_CONST;
-
-TrackerMinerManager * tracker_miner_manager_new (void);
-
-GSList *tracker_miner_manager_get_running (TrackerMinerManager *manager);
-GSList *tracker_miner_manager_get_available (TrackerMinerManager *manager);
-
-gboolean tracker_miner_manager_pause (TrackerMinerManager *manager,
- const gchar *miner,
- const gchar *reason,
- guint32 *cookie);
-gboolean tracker_miner_manager_resume (TrackerMinerManager *manager,
- const gchar *miner,
- guint32 cookie);
-
-gboolean tracker_miner_manager_is_active (TrackerMinerManager *manager,
- const gchar *miner);
-
-gboolean tracker_miner_manager_is_paused (TrackerMinerManager *manager,
- const gchar *miner,
- GStrv *applications,
- GStrv *reasons);
-
-gboolean tracker_miner_manager_get_status (TrackerMinerManager *manager,
- const gchar *miner,
- gchar **status,
- gdouble *progress);
-gboolean tracker_miner_manager_ignore_next_update (TrackerMinerManager *manager,
- const gchar *miner,
- const gchar **urls);
-const gchar * tracker_miner_manager_get_display_name (TrackerMinerManager *manager,
- const gchar *miner);
-const gchar * tracker_miner_manager_get_description (TrackerMinerManager *manager,
- const gchar *miner);
+GType tracker_miner_manager_get_type (void) G_GNUC_CONST;
+
+TrackerMinerManager *tracker_miner_manager_new (void);
+GSList * tracker_miner_manager_get_running (TrackerMinerManager *manager);
+GSList * tracker_miner_manager_get_available (TrackerMinerManager *manager);
+gboolean tracker_miner_manager_pause (TrackerMinerManager *manager,
+ const gchar *miner,
+ const gchar *reason,
+ guint32 *cookie);
+gboolean tracker_miner_manager_resume (TrackerMinerManager *manager,
+ const gchar *miner,
+ guint32 cookie);
+gboolean tracker_miner_manager_is_active (TrackerMinerManager *manager,
+ const gchar *miner);
+gboolean tracker_miner_manager_is_paused (TrackerMinerManager *manager,
+ const gchar *miner,
+ GStrv *applications,
+ GStrv *reasons);
+gboolean tracker_miner_manager_get_status (TrackerMinerManager *manager,
+ const gchar *miner,
+ gchar **status,
+ gdouble *progress);
+gboolean tracker_miner_manager_ignore_next_update (TrackerMinerManager *manager,
+ const gchar *miner,
+ const gchar **urls);
+const gchar * tracker_miner_manager_get_display_name (TrackerMinerManager *manager,
+ const gchar *miner);
+const gchar * tracker_miner_manager_get_description (TrackerMinerManager *manager,
+ const gchar *miner);
G_END_DECLS
diff --git a/src/libtracker-miner/tracker-miner-object.h b/src/libtracker-miner/tracker-miner-object.h
index 6410dc0..3792742 100644
--- a/src/libtracker-miner/tracker-miner-object.h
+++ b/src/libtracker-miner/tracker-miner-object.h
@@ -17,13 +17,13 @@
* 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_OBJECT_H__
#define __LIBTRACKER_MINER_OBJECT_H__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
#include <libtracker-client/tracker-client.h>
@@ -37,8 +37,8 @@ G_BEGIN_DECLS
#define TRACKER_IS_MINER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TRACKER_TYPE_MINER))
#define TRACKER_MINER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_MINER, TrackerMinerClass))
-#define TRACKER_MINER_ERROR_DOMAIN "TrackerMiner"
-#define TRACKER_MINER_ERROR tracker_miner_error_quark()
+#define TRACKER_MINER_ERROR_DOMAIN "TrackerMiner"
+#define TRACKER_MINER_ERROR tracker_miner_error_quark()
typedef struct TrackerMiner TrackerMiner;
typedef struct TrackerMinerPrivate TrackerMinerPrivate;
@@ -70,21 +70,21 @@ typedef struct {
GObjectClass parent_class;
/* signals */
- void (* started) (TrackerMiner *miner);
- void (* stopped) (TrackerMiner *miner);
+ void (* started) (TrackerMiner *miner);
+ void (* stopped) (TrackerMiner *miner);
+
+ void (* paused) (TrackerMiner *miner);
+ void (* resumed) (TrackerMiner *miner);
- void (* paused) (TrackerMiner *miner);
- void (* resumed) (TrackerMiner *miner);
+ void (* progress) (TrackerMiner *miner,
+ const gchar *status,
+ gdouble progress);
- void (* progress) (TrackerMiner *miner,
- const gchar *status,
- gdouble progress);
+ void (* error) (TrackerMiner *miner,
+ GError *error);
- void (* error) (TrackerMiner *miner,
- GError *error);
- void (* ignore_next_update)
- (TrackerMiner *miner,
- const GStrv urls);
+ void (* ignore_next_update) (TrackerMiner *miner,
+ const GStrv urls);
} TrackerMinerClass;
GType tracker_miner_get_type (void) G_GNUC_CONST;
diff --git a/src/libtracker-miner/tracker-miner-web-dbus.h b/src/libtracker-miner/tracker-miner-web-dbus.h
index b801e63..8f3ccde 100644
--- a/src/libtracker-miner/tracker-miner-web-dbus.h
+++ b/src/libtracker-miner/tracker-miner-web-dbus.h
@@ -20,6 +20,10 @@
#ifndef __LIBTRACKER_MINER_WEB_DBUS_H__
#define __LIBTRACKER_MINER_WEB_DBUS_H__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include "tracker-miner-dbus.h"
diff --git a/src/libtracker-miner/tracker-miner-web.h b/src/libtracker-miner/tracker-miner-web.h
index 0516036..0bfcd39 100644
--- a/src/libtracker-miner/tracker-miner-web.h
+++ b/src/libtracker-miner/tracker-miner-web.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <libtracker-miner/tracker-miner-object.h>
#define TRACKER_TYPE_MINER_WEB (tracker_miner_web_get_type())
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
index 07f6aec..380cfed 100644
--- a/src/libtracker-miner/tracker-miner.h
+++ b/src/libtracker-miner/tracker-miner.h
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __TRACKER_MINER_H__
-#define __TRACKER_MINER_H__
+#ifndef __LIBTRACKER_MINER_H__
+#define __LIBTRACKER_MINER_H__
-#define __TRACKER_MINER_H_INSIDE__
+#define __LIBTRACKER_MINER_H_INSIDE__
#include <libtracker-miner/tracker-crawler.h>
#include <libtracker-miner/tracker-storage.h>
@@ -32,6 +32,6 @@
#include <libtracker-miner/tracker-miner-dbus.h>
#include <libtracker-miner/tracker-miner-manager.h>
-#undef __TRACKER_MINER_H_INSIDE__
+#undef __LIBTRACKER_MINER_H_INSIDE__
-#endif /* __TRACKER_MINER_H__ */
+#endif /* __LIBTRACKER_MINER_H__ */
diff --git a/src/libtracker-miner/tracker-monitor.h b/src/libtracker-miner/tracker-monitor.h
index f8e8d54..6f91c84 100644
--- a/src/libtracker-miner/tracker-monitor.h
+++ b/src/libtracker-miner/tracker-monitor.h
@@ -20,6 +20,10 @@
#ifndef __LIBTRACKER_MINER_MONITOR_H__
#define __LIBTRACKER_MINER_MONITOR_H__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
diff --git a/src/libtracker-miner/tracker-password-provider.h b/src/libtracker-miner/tracker-password-provider.h
index a36f797..e79efb6 100644
--- a/src/libtracker-miner/tracker-password-provider.h
+++ b/src/libtracker-miner/tracker-password-provider.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
G_BEGIN_DECLS
diff --git a/src/libtracker-miner/tracker-storage.h b/src/libtracker-miner/tracker-storage.h
index 83ea64b..0df074b 100644
--- a/src/libtracker-miner/tracker-storage.h
+++ b/src/libtracker-miner/tracker-storage.h
@@ -17,13 +17,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <gio/gio.h>
@@ -55,15 +55,15 @@ typedef enum {
GType tracker_storage_get_type (void) G_GNUC_CONST;
TrackerStorage *tracker_storage_new (void);
GSList * tracker_storage_get_device_roots (TrackerStorage *storage,
- TrackerStorageType type,
- gboolean exact_match);
+ TrackerStorageType type,
+ gboolean exact_match);
GSList * tracker_storage_get_device_uuids (TrackerStorage *storage,
- TrackerStorageType type,
- gboolean exact_match);
-const gchar * tracker_storage_get_mount_point_for_uuid (TrackerStorage *storage,
- const gchar *uuid);
-const gchar* tracker_storage_get_uuid_for_file (TrackerStorage *storage,
- GFile *file);
+ TrackerStorageType type,
+ gboolean exact_match);
+const gchar * tracker_storage_get_mount_point_for_uuid (TrackerStorage *storage,
+ const gchar *uuid);
+const gchar* tracker_storage_get_uuid_for_file (TrackerStorage *storage,
+ GFile *file);
G_END_DECLS
diff --git a/src/libtracker-miner/tracker-thumbnailer.h b/src/libtracker-miner/tracker-thumbnailer.h
index 86132ca..368aad0 100644
--- a/src/libtracker-miner/tracker-thumbnailer.h
+++ b/src/libtracker-miner/tracker-thumbnailer.h
@@ -19,13 +19,13 @@
* 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__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
G_BEGIN_DECLS
gboolean tracker_thumbnailer_init (void);
diff --git a/src/libtracker-miner/tracker-utils.h b/src/libtracker-miner/tracker-utils.h
index 1bd8fb7..4d71097 100644
--- a/src/libtracker-miner/tracker-utils.h
+++ b/src/libtracker-miner/tracker-utils.h
@@ -20,6 +20,10 @@
#ifndef __LIBTRACKER_MINER_UTILS_H__
#define __LIBTRACKER_MINER_UTILS_H__
+#if !defined (__LIBTRACKER_MINER_H_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "Only <libtracker-miner/tracker-miner.h> can be included directly."
+#endif
+
#include <glib-object.h>
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]