[tracker/libtracker-miner] Function name clean up



commit 064f06c16acdb5e0092c08cec0541e2f494bb8d4
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Aug 25 17:44:06 2009 +0100

    Function name clean up

 src/libtracker-miner/tracker-miner-process.c |   46 +++++----
 src/tracker-miner-fs/tracker-miner-files.c   |  143 +++++++++++++-------------
 2 files changed, 94 insertions(+), 95 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-process.c b/src/libtracker-miner/tracker-miner-process.c
index f14af2a..d51adb1 100644
--- a/src/libtracker-miner/tracker-miner-process.c
+++ b/src/libtracker-miner/tracker-miner-process.c
@@ -103,6 +103,9 @@ static void           miner_started                (TrackerMiner        *miner);
 static DirectoryData *directory_data_new           (const gchar         *path,
 						    gboolean             recurse);
 static void           directory_data_free          (DirectoryData       *dd);
+static ItemMovedData *item_moved_data_new          (GFile               *file,
+						    GFile               *source_file);
+static void           item_moved_data_free         (ItemMovedData       *data);
 static void           monitor_item_created_cb      (TrackerMonitor      *monitor,
 						    GFile               *file,
 						    gboolean             is_directory,
@@ -134,7 +137,6 @@ static void           crawler_finished_cb          (TrackerCrawler      *crawler
 						    guint                files_found,
 						    guint                files_ignored,
 						    gpointer             user_data);
-
 static void           process_directories_start    (TrackerMinerProcess *process);
 static void           process_directories_stop     (TrackerMinerProcess *process);
 
@@ -263,27 +265,6 @@ tracker_miner_process_init (TrackerMinerProcess *object)
 			  object);
 }
 
-static ItemMovedData *
-item_moved_data_new (GFile *file,
-		     GFile *source_file)
-{
-	ItemMovedData *data;
-
-	data = g_slice_new (ItemMovedData);
-	data->file = g_object_ref (file);
-	data->source_file = g_object_ref (source_file);
-
-	return data;
-}
-
-static void
-item_moved_data_free (ItemMovedData *data)
-{
-	g_object_unref (data->file);
-	g_object_unref (data->source_file);
-	g_slice_free (ItemMovedData, data);
-}
-
 static void
 process_finalize (GObject *object)
 {
@@ -416,6 +397,27 @@ directory_data_free (DirectoryData *dd)
 	g_slice_free (DirectoryData, dd);
 }
 
+static ItemMovedData *
+item_moved_data_new (GFile *file,
+		     GFile *source_file)
+{
+	ItemMovedData *data;
+
+	data = g_slice_new (ItemMovedData);
+	data->file = g_object_ref (file);
+	data->source_file = g_object_ref (source_file);
+
+	return data;
+}
+
+static void
+item_moved_data_free (ItemMovedData *data)
+{
+	g_object_unref (data->file);
+	g_object_unref (data->source_file);
+	g_slice_free (ItemMovedData, data);
+}
+
 static void
 item_add_or_update (TrackerMinerProcess  *miner,
 		    GFile                *file)
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index bdafb0f..5e8d28e 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -42,46 +42,43 @@ enum {
         PROP_CONFIG
 };
 
-static void tracker_miner_files_finalize     (GObject      *object);
-static void tracker_miner_files_get_property (GObject      *object,
-                                              guint         param_id,
-                                              GValue       *value,
-                                              GParamSpec   *pspec);
-static void tracker_miner_files_set_property (GObject      *object,
-                                              guint         param_id,
-                                              const GValue *value,
-                                              GParamSpec   *pspec);
-static void tracker_miner_files_constructed  (GObject      *object);
-
-static gboolean tracker_miner_files_check_file      (TrackerMinerProcess  *miner,
-                                                     GFile                *file);
-static gboolean tracker_miner_files_check_directory (TrackerMinerProcess  *miner,
-                                                     GFile                *file);
-static gboolean tracker_miner_files_process_file    (TrackerMinerProcess  *miner,
-                                                     GFile                *file,
-                                                     TrackerSparqlBuilder *sparql);
-static gboolean tracker_miner_files_monitor_directory (TrackerMinerProcess  *miner,
-                                                       GFile                *file);
-
+static void     miner_files_set_property      (GObject              *object,
+					       guint                 param_id,
+					       const GValue         *value,
+					       GParamSpec           *pspec);
+static void     miner_files_get_property      (GObject              *object,
+					       guint                 param_id,
+					       GValue               *value,
+					       GParamSpec           *pspec);
+static void     miner_files_finalize          (GObject              *object);
+static void     miner_files_constructed       (GObject              *object);
+static gboolean miner_files_check_file        (TrackerMinerProcess  *miner,
+					       GFile                *file);
+static gboolean miner_files_check_directory   (TrackerMinerProcess  *miner,
+					       GFile                *file);
+static gboolean miner_files_process_file      (TrackerMinerProcess  *miner,
+					       GFile                *file,
+					       TrackerSparqlBuilder *sparql);
+static gboolean miner_files_monitor_directory (TrackerMinerProcess  *miner,
+					       GFile                *file);
 
 G_DEFINE_TYPE (TrackerMinerFiles, tracker_miner_files, TRACKER_TYPE_MINER_PROCESS)
 
-
 static void
 tracker_miner_files_class_init (TrackerMinerFilesClass *klass)
 {
         GObjectClass *object_class = G_OBJECT_CLASS (klass);
         TrackerMinerProcessClass *miner_process_class = TRACKER_MINER_PROCESS_CLASS (klass);
 
-        object_class->finalize = tracker_miner_files_finalize;
-        object_class->get_property = tracker_miner_files_get_property;
-        object_class->set_property = tracker_miner_files_set_property;
-        object_class->constructed = tracker_miner_files_constructed;
+        object_class->finalize = miner_files_finalize;
+        object_class->get_property = miner_files_get_property;
+        object_class->set_property = miner_files_set_property;
+        object_class->constructed = miner_files_constructed;
 
-        miner_process_class->check_file = tracker_miner_files_check_file;
-	miner_process_class->check_directory = tracker_miner_files_check_directory;
-	miner_process_class->monitor_directory = tracker_miner_files_monitor_directory;
-        miner_process_class->process_file = tracker_miner_files_process_file;
+        miner_process_class->check_file = miner_files_check_file;
+	miner_process_class->check_directory = miner_files_check_directory;
+	miner_process_class->monitor_directory = miner_files_monitor_directory;
+        miner_process_class->process_file = miner_files_process_file;
 
        	g_object_class_install_property (object_class,
 					 PROP_CONFIG,
@@ -175,31 +172,30 @@ tracker_miner_files_init (TrackerMinerFiles *miner)
 }
 
 static void
-tracker_miner_files_finalize (GObject *object)
+miner_files_set_property (GObject      *object,
+			  guint         prop_id,
+			  const GValue *value,
+			  GParamSpec   *pspec)
 {
         TrackerMinerFilesPrivate *priv;
 
         priv = TRACKER_MINER_FILES_GET_PRIVATE (object);
 
-        g_object_unref (priv->config);
-
-#ifdef HAVE_HAL
-        g_object_unref (priv->storage);
-#endif
-
-	g_signal_handlers_disconnect_by_func (priv->volume_monitor,
-					      mount_pre_unmount_cb,
-					      object);
-	g_object_unref (priv->volume_monitor);
-
-        G_OBJECT_CLASS (tracker_miner_files_parent_class)->finalize (object);
+        switch (prop_id) {
+        case PROP_CONFIG:
+                priv->config = g_value_dup_object (value);
+                break;
+        default:
+                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+        }
 }
 
 static void
-tracker_miner_files_get_property (GObject      *object,
-                                  guint         prop_id,
-                                  GValue       *value,
-                                  GParamSpec   *pspec)
+miner_files_get_property (GObject    *object,
+			  guint       prop_id,
+			  GValue     *value,
+			  GParamSpec *pspec)
 {
         TrackerMinerFilesPrivate *priv;
 
@@ -216,27 +212,28 @@ tracker_miner_files_get_property (GObject      *object,
 }
 
 static void
-tracker_miner_files_set_property (GObject      *object,
-                                  guint         prop_id,
-                                  const GValue *value,
-                                  GParamSpec   *pspec)
+miner_files_finalize (GObject *object)
 {
         TrackerMinerFilesPrivate *priv;
 
         priv = TRACKER_MINER_FILES_GET_PRIVATE (object);
 
-        switch (prop_id) {
-        case PROP_CONFIG:
-                priv->config = g_value_dup_object (value);
-                break;
-        default:
-                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-        }
+        g_object_unref (priv->config);
+
+#ifdef HAVE_HAL
+        g_object_unref (priv->storage);
+#endif
+
+	g_signal_handlers_disconnect_by_func (priv->volume_monitor,
+					      mount_pre_unmount_cb,
+					      object);
+	g_object_unref (priv->volume_monitor);
+
+        G_OBJECT_CLASS (tracker_miner_files_parent_class)->finalize (object);
 }
 
 static void
-tracker_miner_files_constructed (GObject *object)
+miner_files_constructed (GObject *object)
 {
         TrackerMinerFilesPrivate *priv;
         TrackerMinerProcess *miner;
@@ -273,8 +270,8 @@ tracker_miner_files_constructed (GObject *object)
 }
 
 static gboolean
-tracker_miner_files_check_file (TrackerMinerProcess *miner,
-                                GFile               *file)
+miner_files_check_file (TrackerMinerProcess *miner,
+			GFile               *file)
 {
 	GFileInfo *file_info;
 	gchar *path;
@@ -318,8 +315,8 @@ done:
 }
 
 static gboolean
-tracker_miner_files_check_directory (TrackerMinerProcess  *miner,
-                                     GFile                *file)
+miner_files_check_directory (TrackerMinerProcess *miner,
+			     GFile               *file)
 {
 	GFileInfo *file_info;
 	gchar *path;
@@ -376,8 +373,8 @@ done:
 }
 
 static gboolean
-tracker_miner_files_monitor_directory (TrackerMinerProcess  *miner,
-                                       GFile                *file)
+miner_files_monitor_directory (TrackerMinerProcess *miner,
+			       GFile               *file)
 {
         TrackerMinerFilesPrivate *priv;
 	GFileInfo *file_info;
@@ -441,9 +438,9 @@ done:
 }
 
 static void
-item_add_to_datasource (TrackerMinerFiles    *miner,
-                        GFile                *file,
-                        TrackerSparqlBuilder *sparql)
+miner_files_add_to_datasource (TrackerMinerFiles    *miner,
+			       GFile                *file,
+			       TrackerSparqlBuilder *sparql)
 {
         TrackerMinerFilesPrivate *priv;
 	const gchar *removable_device_udi;
@@ -481,9 +478,9 @@ item_add_to_datasource (TrackerMinerFiles    *miner,
 }
 
 static gboolean
-tracker_miner_files_process_file (TrackerMinerProcess  *miner,
-                                  GFile                *file,
-                                  TrackerSparqlBuilder *sparql)
+miner_files_process_file (TrackerMinerProcess  *miner,
+			  GFile                *file,
+			  TrackerSparqlBuilder *sparql)
 {
 	gchar *uri, *mime_type;
 	GFileInfo *file_info;
@@ -550,7 +547,7 @@ tracker_miner_files_process_file (TrackerMinerProcess  *miner,
         tracker_sparql_builder_predicate (sparql, "nfo:fileLastAccessed");
 	tracker_sparql_builder_object_date (sparql, (time_t *) &time_);
 
-        item_add_to_datasource (TRACKER_MINER_FILES (miner), file, sparql);
+        miner_files_add_to_datasource (TRACKER_MINER_FILES (miner), file, sparql);
 
         /* FIXME: Missing embedded data and text */
 



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