[tracker] libtracker-miner: Renamed tracker_miner_dbus_terminate to _shutdown()



commit 4f4184e71f60e0c3ca2b23bcc2c0eafc6c3c323d
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Mar 11 16:29:42 2010 +0000

    libtracker-miner: Renamed tracker_miner_dbus_terminate to _shutdown()
    
    For consistency with other init/shutdown APIs

 .../libtracker-miner/libtracker-miner-sections.txt |    2 +-
 src/libtracker-miner/tracker-dbus.c                |   11 ++++++++++-
 src/libtracker-miner/tracker-dbus.h                |   13 ++++++-------
 src/libtracker-miner/tracker-miner.c               |    2 +-
 4 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index e8e70fb..22c45ed 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -92,7 +92,7 @@ TRACKER_MINER_DBUS_INTERFACE
 TRACKER_MINER_DBUS_NAME_PREFIX
 TRACKER_MINER_DBUS_PATH_PREFIX
 tracker_miner_dbus_init
-tracker_miner_dbus_terminate
+tracker_miner_dbus_shutdown
 TrackerMinerDBusNameFunc
 tracker_miner_dbus_add_name_watch
 tracker_miner_dbus_get_name
diff --git a/src/libtracker-miner/tracker-dbus.c b/src/libtracker-miner/tracker-dbus.c
index c8affc6..984ee23 100644
--- a/src/libtracker-miner/tracker-dbus.c
+++ b/src/libtracker-miner/tracker-dbus.c
@@ -221,6 +221,9 @@ tracker_miner_dbus_init (TrackerMiner          *miner,
 	DBusData *data;
         gchar *name;
 
+	g_return_if_fail (TRACKER_IS_MINER (miner));
+	g_return_if_fail (info != NULL);
+
 	if (G_UNLIKELY (dbus_data == 0)) {
 		dbus_data = g_quark_from_static_string ("tracker-miner-dbus-data");
 	}
@@ -256,8 +259,10 @@ tracker_miner_dbus_init (TrackerMiner          *miner,
 }
 
 void
-tracker_miner_dbus_terminate (TrackerMiner *miner)
+tracker_miner_dbus_shutdown (TrackerMiner *miner)
 {
+	g_return_if_fail (TRACKER_IS_MINER (miner));
+
 	if (G_UNLIKELY (dbus_data == 0)) {
 		return;
 	}
@@ -272,6 +277,10 @@ tracker_miner_dbus_add_name_watch (TrackerMiner             *miner,
 {
         DBusData *data;
 
+	g_return_if_fail (TRACKER_IS_MINER (miner));
+	g_return_if_fail (name != NULL);
+	g_return_if_fail (func != NULL);
+
 	data = g_object_get_qdata (G_OBJECT (miner), dbus_data);
 
         if (!data) {
diff --git a/src/libtracker-miner/tracker-dbus.h b/src/libtracker-miner/tracker-dbus.h
index 680268e..0189eae 100644
--- a/src/libtracker-miner/tracker-dbus.h
+++ b/src/libtracker-miner/tracker-dbus.h
@@ -28,12 +28,11 @@ typedef void (* TrackerMinerDBusNameFunc) (TrackerMiner *miner,
                                            const gchar  *name,
                                            gboolean      available);
 
-void  tracker_miner_dbus_init      (TrackerMiner          *miner,
-                                    const DBusGObjectInfo *info);
-void  tracker_miner_dbus_terminate (TrackerMiner          *miner);
-
-void  tracker_miner_dbus_add_name_watch (TrackerMiner             *miner,
-                                         const gchar              *name,
-                                         TrackerMinerDBusNameFunc  func);
+void tracker_miner_dbus_init           (TrackerMiner             *miner,
+                                        const DBusGObjectInfo    *info);
+void tracker_miner_dbus_shutdown       (TrackerMiner             *miner);
+void tracker_miner_dbus_add_name_watch (TrackerMiner             *miner,
+                                        const gchar              *name,
+                                        TrackerMinerDBusNameFunc  func);
 
 #endif /* __TRACKER_MINER_DBUS_HELPER_H__ */
diff --git a/src/libtracker-miner/tracker-miner.c b/src/libtracker-miner/tracker-miner.c
index 2739527..d4833c0 100644
--- a/src/libtracker-miner/tracker-miner.c
+++ b/src/libtracker-miner/tracker-miner.c
@@ -418,7 +418,7 @@ miner_finalize (GObject *object)
 	g_hash_table_unref (miner->private->pauses);
 	g_ptr_array_free (miner->private->async_calls, TRUE);
 
-	tracker_miner_dbus_terminate (miner);
+	tracker_miner_dbus_shutdown (miner);
 
 	G_OBJECT_CLASS (tracker_miner_parent_class)->finalize (object);
 }



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