[rygel-grilo] Rename notify_unref to notify_destroy



commit 9680505973667c2361cf5def796fca72fac3b1c7
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed May 12 21:43:33 2010 +0200

    Rename notify_unref to notify_destroy
    
    Instead of automatically unreferencing client when a provider is destroyed, it
    is better to leave this action to user, who can choose the most appropriate
    time to perform the unreferencing.
    
    Thus, rename the function to a more suitable one.

 lib/media-server1-client.c   |    5 ++---
 lib/media-server1-observer.c |    2 +-
 lib/media-server1-private.h  |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/lib/media-server1-client.c b/lib/media-server1-client.c
index a852444..9f9252e 100644
--- a/lib/media-server1-client.c
+++ b/lib/media-server1-client.c
@@ -222,14 +222,13 @@ ms1_client_init (MS1Client *client)
 
 /****************** INTERNAL PUBLIC API (NOT TO BE EXPORTED) ******************/
 
-/* Notify destruction of client, and unref it */
+/* Notify destruction of client; client should not use this client any more*/
 void
-ms1_client_notify_unref (MS1Client *client)
+ms1_client_notify_destroy (MS1Client *client)
 {
   g_return_if_fail (MS1_IS_CLIENT (client));
 
   g_signal_emit (client, signals[DESTROY], 0);
-  g_object_unref (client);
 }
 
 /******************** PUBLIC API ********************/
diff --git a/lib/media-server1-observer.c b/lib/media-server1-observer.c
index c93f133..ec9865d 100644
--- a/lib/media-server1-observer.c
+++ b/lib/media-server1-observer.c
@@ -75,7 +75,7 @@ name_owner_changed (DBusGProxy *proxy,
   /* Check if it has been removed */
   if (*new_owner == '\0') {
     clients = g_hash_table_lookup (observer->priv->clients, name);
-    g_list_foreach (clients, (GFunc) ms1_client_notify_unref, NULL);
+    g_list_foreach (clients, (GFunc) ms1_client_notify_destroy, NULL);
     return;
   }
 
diff --git a/lib/media-server1-private.h b/lib/media-server1-private.h
index dab7151..b335c4f 100644
--- a/lib/media-server1-private.h
+++ b/lib/media-server1-private.h
@@ -31,7 +31,7 @@
 
 #define MS1_DBUS_SERVICE_PREFIX_LENGTH 28
 
-void ms1_client_notify_unref (MS1Client *client);
+void ms1_client_notify_destroy (MS1Client *client);
 
 void ms1_observer_add_client (MS1Client *client, const gchar *provider);
 



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