[tracker] tracker-store: Fixed headers



commit 74e0fc0499161d1b590732d1459c017a7072895b
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Nov 2 13:42:40 2009 +0000

    tracker-store: Fixed headers
    
    This mostly about fixing #define and #include statements which were
    incorrect or unnecessary.

 src/tracker-store/tracker-backup.h         |   33 +++++++-------
 src/tracker-store/tracker-config.h         |    2 +-
 src/tracker-store/tracker-dbus.h           |    8 +--
 src/tracker-store/tracker-events.h         |   21 ++++-----
 src/tracker-store/tracker-push-registrar.h |    7 +--
 src/tracker-store/tracker-push.c           |    2 +
 src/tracker-store/tracker-push.h           |   15 +-----
 src/tracker-store/tracker-resource-class.h |    6 +-
 src/tracker-store/tracker-resources.h      |   67 +++++++++++++--------------
 src/tracker-store/tracker-statistics.h     |   14 +++---
 src/tracker-store/tracker-store.h          |   20 ++++----
 11 files changed, 90 insertions(+), 105 deletions(-)
---
diff --git a/src/tracker-store/tracker-backup.h b/src/tracker-store/tracker-backup.h
index 54b248a..7459f50 100644
--- a/src/tracker-store/tracker-backup.h
+++ b/src/tracker-store/tracker-backup.h
@@ -19,8 +19,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_BACKUP_H__
-#define __TRACKERD_BACKUP_H__
+#ifndef __TRACKER_STORE_BACKUP_H__
+#define __TRACKER_STORE_BACKUP_H__
 
 #include <glib-object.h>
 
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
 #define TRACKER_IS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_BACKUP))
 #define TRACKER_BACKUP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_BACKUP, TrackerBackupClass))
 
-typedef struct TrackerBackup	  TrackerBackup;
+typedef struct TrackerBackup TrackerBackup;
 typedef struct TrackerBackupClass TrackerBackupClass;
 
 struct TrackerBackup {
@@ -48,21 +48,20 @@ struct TrackerBackupClass {
 	GObjectClass parent;
 };
 
-GType	       tracker_backup_get_type		   (void) G_GNUC_CONST;
+GType	       tracker_backup_get_type (void) G_GNUC_CONST;
 
-TrackerBackup *tracker_backup_new		   (void);
-
-void           tracker_backup_save                 (TrackerBackup         *object,
-						    const gchar           *destination_uri,
-						    const gchar           *journal_uri,
-						    DBusGMethodInvocation *context,
-						    GError **error);
-void           tracker_backup_restore              (TrackerBackup         *object,
-						    const gchar           *backup_uri,
-						    const gchar           *journal_uri,
-						    DBusGMethodInvocation *context,
-						    GError **error);
+TrackerBackup *tracker_backup_new      (void);
+void           tracker_backup_save     (TrackerBackup          *object,
+					const gchar            *destination_uri,
+					const gchar            *journal_uri,
+					DBusGMethodInvocation  *context,
+					GError                **error);
+void           tracker_backup_restore  (TrackerBackup          *object,
+					const gchar            *backup_uri,
+					const gchar            *journal_uri,
+					DBusGMethodInvocation  *context,
+					GError                **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_BACKUP_H__ */
+#endif /* __TRACKER_STORE_BACKUP_H__ */
diff --git a/src/tracker-store/tracker-config.h b/src/tracker-store/tracker-config.h
index 7ba8dcf..2e3f8a4 100644
--- a/src/tracker-store/tracker-config.h
+++ b/src/tracker-store/tracker-config.h
@@ -34,7 +34,7 @@ G_BEGIN_DECLS
 #define TRACKER_IS_CONFIG_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), TRACKER_TYPE_CONFIG))
 #define TRACKER_CONFIG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_CONFIG, TrackerConfigClass))
 
-typedef struct TrackerConfig	  TrackerConfig;
+typedef struct TrackerConfig TrackerConfig;
 typedef struct TrackerConfigClass TrackerConfigClass;
 
 struct TrackerConfig {
diff --git a/src/tracker-store/tracker-dbus.h b/src/tracker-store/tracker-dbus.h
index fa6b123..bb63558 100644
--- a/src/tracker-store/tracker-dbus.h
+++ b/src/tracker-store/tracker-dbus.h
@@ -19,8 +19,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_H__
-#define __TRACKERD_DBUS_H__
+#ifndef __TRACKER_STORE_DBUS_H__
+#define __TRACKER_STORE_DBUS_H__
 
 #include <glib.h>
 
@@ -28,8 +28,6 @@
 
 G_BEGIN_DECLS
 
-#define TRACKER_INDEXER_PAUSE_TIME_FOR_REQUESTS 5 /* seconds */
-
 gboolean    tracker_dbus_init                    (void);
 void        tracker_dbus_shutdown                (void);
 gboolean    tracker_dbus_register_objects        (void);
@@ -40,4 +38,4 @@ DBusGProxy *tracker_dbus_indexer_get_proxy       (void);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_H__ */
+#endif /* __TRACKER_STORE_DBUS_H__ */
diff --git a/src/tracker-store/tracker-events.h b/src/tracker-store/tracker-events.h
index d078357..459cf8d 100644
--- a/src/tracker-store/tracker-events.h
+++ b/src/tracker-store/tracker-events.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * Copyright (C) 2008, Nokia
+ * Copyright (C) 2009, Nokia
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public
@@ -21,8 +21,8 @@
  *  Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKER_INDEXER_EVENTS_H__
-#define __TRACKER_INDEXER_EVENTS_H__
+#ifndef __TRACKER_STORE_EVENTS_H__
+#define __TRACKER_STORE_EVENTS_H__
 
 #include <libtracker-common/tracker-dbus.h>
 
@@ -30,17 +30,16 @@ G_BEGIN_DECLS
 
 typedef GStrv (*TrackerNotifyClassGetter) (void);
 
-void       tracker_events_init        (TrackerNotifyClassGetter callback);
+void       tracker_events_init        (TrackerNotifyClassGetter  callback);
 void       tracker_events_shutdown    (void);
-void       tracker_events_insert      (const gchar           *uri,
-				       const gchar           *predicate,
-				       const gchar           *object,
-				       GPtrArray             *rdf_types,
-				       TrackerDBusEventsType  type);
+void       tracker_events_insert      (const gchar              *uri,
+				       const gchar              *predicate,
+				       const gchar              *object,
+				       GPtrArray                *rdf_types,
+				       TrackerDBusEventsType     type);
 GPtrArray *tracker_events_get_pending (void);
 void       tracker_events_reset       (void);
 
-
 G_END_DECLS
 
-#endif /* __TRACKER_INDEXER_PUSH_H__ */
+#endif /* __TRACKER_STORE_EVENTS_H__ */
diff --git a/src/tracker-store/tracker-push-registrar.h b/src/tracker-store/tracker-push-registrar.h
index afe1d23..1260328 100644
--- a/src/tracker-store/tracker-push-registrar.h
+++ b/src/tracker-store/tracker-push-registrar.h
@@ -21,11 +21,10 @@
  *  Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKER_PUSH_REGISTRAR_H__
-#define __TRACKER_PUSH_REGISTRAR_H__
+#ifndef __TRACKER_STORE_PUSH_REGISTRAR_H__
+#define __TRACKER_STORE_PUSH_REGISTRAR_H__
 
 #include <glib-object.h>
-#include <gmodule.h>
 #include <dbus/dbus-glib-bindings.h>
 
 G_BEGIN_DECLS
@@ -80,4 +79,4 @@ void                    tracker_push_module_shutdown         (TrackerPushRegistr
 
 G_END_DECLS
 
-#endif /* __TRACKER_PUSH_REGISTRAR_H__ */
+#endif /* __TRACKER_STORE_PUSH_REGISTRAR_H__ */
diff --git a/src/tracker-store/tracker-push.c b/src/tracker-store/tracker-push.c
index fe84f6a..e23c952 100644
--- a/src/tracker-store/tracker-push.c
+++ b/src/tracker-store/tracker-push.c
@@ -26,6 +26,8 @@
 #include <string.h>
 #include <time.h>
 
+#include <gmodule.h>
+
 #include <dbus/dbus-glib-lowlevel.h>
 
 #include <libtracker-common/tracker-utils.h>
diff --git a/src/tracker-store/tracker-push.h b/src/tracker-store/tracker-push.h
index 6d607ea..4807b63 100644
--- a/src/tracker-store/tracker-push.h
+++ b/src/tracker-store/tracker-push.h
@@ -21,17 +21,8 @@
  *  Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKERD_PUSH_H__
-#define __TRACKERD_PUSH_H__
-
-#if !defined (TRACKER_ENABLE_INTERNALS) && !defined (TRACKER_COMPILATION)
-#error "TRACKER_ENABLE_INTERNALS not defined, this must be defined to use tracker's internal functions"
-#endif
-
-#include <glib.h>
-#include <gmodule.h>
-#include <glib-object.h>
-#include <dbus/dbus-glib-bindings.h>
+#ifndef __TRACKER_STORE_PUSH_H__
+#define __TRACKER_STORE_PUSH_H__
 
 G_BEGIN_DECLS
 
@@ -40,4 +31,4 @@ void tracker_push_shutdown (void);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_PUSH_H__ */
+#endif /* __TRACKER_STORE_PUSH_H__ */
diff --git a/src/tracker-store/tracker-resource-class.h b/src/tracker-store/tracker-resource-class.h
index f39c140..248a16f 100644
--- a/src/tracker-store/tracker-resource-class.h
+++ b/src/tracker-store/tracker-resource-class.h
@@ -21,8 +21,8 @@
  *  Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKERD_RESOURCES_CLASS_H__
-#define __TRACKERD_RESOURCES_CLASS_H__
+#ifndef __TRACKER_STORE_RESOURCES_CLASS_H__
+#define __TRACKER_STORE_RESOURCES_CLASS_H__
 
 #include <glib-object.h>
 #include <libtracker-common/tracker-dbus.h>
@@ -64,4 +64,4 @@ void                   tracker_resource_class_emit_events   (TrackerResourceClas
 
 G_END_DECLS
 
-#endif /* __TRACKERD_RESOURCES_CLASS_H__ */
+#endif /* __TRACKER_STORE_RESOURCES_CLASS_H__ */
diff --git a/src/tracker-store/tracker-resources.h b/src/tracker-store/tracker-resources.h
index af71117..aa135d7 100644
--- a/src/tracker-store/tracker-resources.h
+++ b/src/tracker-store/tracker-resources.h
@@ -19,8 +19,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_RESOURCES_H__
-#define __TRACKERD_RESOURCES_H__
+#ifndef __TRACKER_STORE_RESOURCES_H__
+#define __TRACKER_STORE_RESOURCES_H__
 
 #include <glib-object.h>
 
@@ -34,10 +34,10 @@ G_BEGIN_DECLS
 #define TRACKER_RESOURCES(object)	 (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_RESOURCES, TrackerResources))
 #define TRACKER_RESOURCES_CLASS(klass)	 (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
 #define TRACKER_IS_RESOURCES(object)	 (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_RESOURCES))
-#define TRACKER_IS_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESOURCES))
-#define TRACKER_RESOURCES_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
+#define TRACKER_IS_RESOURCES_CLASS(klass)(G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESOURCES))
+#define TRACKER_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
 
-typedef struct TrackerResources	    TrackerResources;
+typedef struct TrackerResources	TrackerResources;
 typedef struct TrackerResourcesClass TrackerResourcesClass;
 
 struct TrackerResources {
@@ -48,37 +48,34 @@ struct TrackerResourcesClass {
 	GObjectClass parent;
 };
 
-GType		 tracker_resources_get_type		 (void);
-TrackerResources *tracker_resources_new			 (void);
-
-void		 tracker_resources_prepare	 (TrackerResources       *object,
-						  GSList                 *event_sources);
-
-void		 tracker_resources_unreg_batches (TrackerResources       *object,
-						  const gchar            *old_owner);
+GType             tracker_resources_get_type            (void);
+TrackerResources *tracker_resources_new                 (void);
+void              tracker_resources_prepare             (TrackerResources       *object,
+							 GSList                 *event_sources);
+void              tracker_resources_unreg_batches       (TrackerResources       *object,
+							 const gchar            *old_owner);
 
 /* DBus methods */
-void		 tracker_resources_load			 (TrackerResources	 *object,
-							  const gchar		 *uri,
-							  DBusGMethodInvocation  *context,
-							  GError		**error);
-void		 tracker_resources_sparql_query		 (TrackerResources       *object,
-							  const gchar		 *query,
-							  DBusGMethodInvocation  *context,
-							  GError		**error);
-void		 tracker_resources_sparql_update	 (TrackerResources       *object,
-							  const gchar		 *update,
-							  DBusGMethodInvocation  *context,
-							  GError		**error);
-void		 tracker_resources_batch_sparql_update	 (TrackerResources       *object,
-							  const gchar		 *update,
-							  DBusGMethodInvocation  *context,
-							  GError		**error);
-void		 tracker_resources_batch_commit		 (TrackerResources       *object,
-							  DBusGMethodInvocation  *context,
-							  GError		**error);
-
-
+void              tracker_resources_load                (TrackerResources       *object,
+							 const gchar            *uri,
+							 DBusGMethodInvocation  *context,
+							 GError                **error);
+void              tracker_resources_sparql_query        (TrackerResources       *object,
+							 const gchar            *query,
+							 DBusGMethodInvocation  *context,
+							 GError                **error);
+void              tracker_resources_sparql_update       (TrackerResources       *object,
+							 const gchar            *update,
+							 DBusGMethodInvocation  *context,
+							 GError                **error);
+void              tracker_resources_batch_sparql_update (TrackerResources       *object,
+							 const gchar            *update,
+							 DBusGMethodInvocation  *context,
+							 GError                **error);
+void              tracker_resources_batch_commit        (TrackerResources       *object,
+							 DBusGMethodInvocation  *context,
+							 GError                **error);
+ 
 G_END_DECLS
 
-#endif /* __TRACKERD_RESOURCES_H__ */
+#endif /* __TRACKER_STORE_RESOURCES_H__ */
diff --git a/src/tracker-store/tracker-statistics.h b/src/tracker-store/tracker-statistics.h
index 0b5d3d2..a3c651a 100644
--- a/src/tracker-store/tracker-statistics.h
+++ b/src/tracker-store/tracker-statistics.h
@@ -19,14 +19,14 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_STATISTICS_H__
-#define __TRACKERD_DBUS_STATISTICS_H__
+#ifndef __TRACKER_STORE_STATISTICS_H__
+#define __TRACKER_STORE_STATISTICS_H__
 
 #include <glib-object.h>
 
-#define TRACKER_STATISTICS_SERVICE     "org.freedesktop.Tracker1"
-#define TRACKER_STATISTICS_PATH	       "/org/freedesktop/Tracker1/Statistics"
-#define TRACKER_STATISTICS_INTERFACE   "org.freedesktop.Tracker1.Statistics"
+#define TRACKER_STATISTICS_SERVICE         "org.freedesktop.Tracker1"
+#define TRACKER_STATISTICS_PATH	           "/org/freedesktop/Tracker1/Statistics"
+#define TRACKER_STATISTICS_INTERFACE       "org.freedesktop.Tracker1.Statistics"
 
 G_BEGIN_DECLS
 
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
 #define TRACKER_IS_STATISTICS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATISTICS))
 #define TRACKER_STATISTICS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATISTICS, TrackerStatisticsClass))
 
-typedef struct TrackerStatistics	  TrackerStatistics;
+typedef struct TrackerStatistics TrackerStatistics;
 typedef struct TrackerStatisticsClass TrackerStatisticsClass;
 
 struct TrackerStatistics {
@@ -57,4 +57,4 @@ void               tracker_statistics_signal   (void);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_STATISTICS_H__ */
+#endif /* __TRACKER_STORE_STATISTICS_H__ */
diff --git a/src/tracker-store/tracker-store.h b/src/tracker-store/tracker-store.h
index 877b879..3ed3e3d 100644
--- a/src/tracker-store/tracker-store.h
+++ b/src/tracker-store/tracker-store.h
@@ -20,8 +20,8 @@
  * Author: Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKER_STORE_H__
-#define __TRACKER_STORE_H__
+#ifndef __TRACKER_STORE_STORE_H__
+#define __TRACKER_STORE_STORE_H__
 
 #include <stdio.h>
 
@@ -30,15 +30,15 @@
 
 G_BEGIN_DECLS
 
-typedef void (* TrackerStoreSparqlUpdateCallback)  (GError          *error,
-                                                    gpointer         user_data);
-typedef void (* TrackerStoreCommitCallback)        (gpointer         user_data);
-typedef void (* TrackerStoreTurtleCallback)        (GError          *error,
-                                                    gpointer         user_data);
+typedef void (* TrackerStoreSparqlUpdateCallback) (GError          *error,
+						   gpointer         user_data);
+typedef void (* TrackerStoreCommitCallback)       (gpointer         user_data);
+typedef void (* TrackerStoreTurtleCallback)       (GError          *error,
+						   gpointer         user_data);
 
 void         tracker_store_init                   (gboolean load_journal);
 void         tracker_store_shutdown               (void);
-void         tracker_store_queue_commit           (TrackerStoreCommitCallback       callback,
+void         tracker_store_queue_commit           (TrackerStoreCommitCallback callback,
                                                    const gchar   *client_id,
                                                    gpointer       user_data,
                                                    GDestroyNotify destroy);
@@ -67,8 +67,8 @@ guint        tracker_store_get_queue_size         (void);
 
 void         tracker_store_play_journal           (void);
 void         tracker_store_flush_journal          (void);
-void         tracker_store_unreg_batches          (const gchar *client_id);
+void         tracker_store_unreg_batches          (const gchar   *client_id);
 
 G_END_DECLS
 
-#endif /* __TRACKER_STORE_H__ */
+#endif /* __TRACKER_STORE_STORE_H__ */



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