telepathy-glib: Rename _tp_contact_connection_invalidated to _disposed

Xavier Claessens xclaesse at kemper.freedesktop.org
Mon Jun 4 03:57:01 PDT 2012


Module: telepathy-glib
Branch: master
Commit: aa7b5e8d093c3224143659302af38eb286c94e5e
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=aa7b5e8d093c3224143659302af38eb286c94e5e

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Fri Jun  1 18:30:48 2012 +0200

Rename _tp_contact_connection_invalidated to _disposed

That function is called from TpConnection::dispose, not when invalidated

https://bugs.freedesktop.org/show_bug.cgi?id=49373

---

 telepathy-glib/connection-internal.h |    4 ----
 telepathy-glib/connection.c          |   11 ++++++-----
 telepathy-glib/contact-internal.h    |    2 ++
 telepathy-glib/contact.c             |    3 +--
 4 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/telepathy-glib/connection-internal.h b/telepathy-glib/connection-internal.h
index a6d6221..311152e 100644
--- a/telepathy-glib/connection-internal.h
+++ b/telepathy-glib/connection-internal.h
@@ -146,10 +146,6 @@ void _tp_connection_remove_contact (TpConnection *self, TpHandle handle,
     TpContact *contact);
 TpContact *_tp_connection_lookup_contact (TpConnection *self, TpHandle handle);
 
-/* Actually implemented in contact.c, but having a contact-internal header
- * just for this would be overkill */
-void _tp_contact_connection_invalidated (TpContact *contact);
-
 void _tp_connection_set_account (TpConnection *self, TpAccount *account);
 
 /* connection-contact-info.c */
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index a3988ee..af80618 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -46,6 +46,7 @@
 #include "telepathy-glib/debug-internal.h"
 #include "telepathy-glib/proxy-internal.h"
 #include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/contact-internal.h"
 #include "telepathy-glib/util-internal.h"
 
 #include "_gen/tp-cli-connection-body.h"
@@ -1541,11 +1542,11 @@ tp_connection_finalize (GObject *object)
 }
 
 static void
-contact_notify_invalidated (gpointer k G_GNUC_UNUSED,
-                            gpointer v,
-                            gpointer d G_GNUC_UNUSED)
+contact_notify_disposed (gpointer k G_GNUC_UNUSED,
+    gpointer v,
+    gpointer d G_GNUC_UNUSED)
 {
-  _tp_contact_connection_invalidated (v);
+  _tp_contact_connection_disposed (v);
 }
 
 
@@ -1572,7 +1573,7 @@ tp_connection_dispose (GObject *object)
 
   if (self->priv->contacts != NULL)
     {
-      g_hash_table_foreach (self->priv->contacts, contact_notify_invalidated,
+      g_hash_table_foreach (self->priv->contacts, contact_notify_disposed,
           NULL);
       tp_clear_pointer (&self->priv->contacts, g_hash_table_unref);
     }
diff --git a/telepathy-glib/contact-internal.h b/telepathy-glib/contact-internal.h
index 5bc1696..8ace28b 100644
--- a/telepathy-glib/contact-internal.h
+++ b/telepathy-glib/contact-internal.h
@@ -45,6 +45,8 @@ void _tp_contact_set_subscription_states (TpContact *self,
 void _tp_contact_set_is_blocked (TpContact *self,
     gboolean is_blocked);
 
+void _tp_contact_connection_disposed (TpContact *contact);
+
 G_END_DECLS
 
 #endif
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index f813b2c..b7d2b73 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -813,7 +813,7 @@ tp_contact_set_contact_groups_finish (TpContact *self,
 }
 
 void
-_tp_contact_connection_invalidated (TpContact *contact)
+_tp_contact_connection_disposed (TpContact *contact)
 {
   /* The connection has gone away, so we no longer have a meaningful handle,
    * and will never have one again. */
@@ -822,7 +822,6 @@ _tp_contact_connection_invalidated (TpContact *contact)
   g_object_notify ((GObject *) contact, "handle");
 }
 
-
 static void
 tp_contact_dispose (GObject *object)
 {



More information about the telepathy-commits mailing list