summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-10 15:23:29 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-10 15:29:09 +0200
commit3915dbc1d2d343cbeed93e1453daba94860a875a (patch)
tree3a2dec89890a42dc07fee5b4b11af9c1d1edb459
parentc0d9beb94395120401bf632cf3277d37a63b0b99 (diff)
downloadtelepathy-haze-3915dbc1d2d343cbeed93e1453daba94860a875a.tar.gz
Remove deprecated tp_handle_ref/unref
-rw-r--r--src/connection-aliasing.c1
-rw-r--r--src/connection-avatars.c1
-rw-r--r--src/connection-presence.c1
-rw-r--r--src/contact-list.c12
-rw-r--r--src/im-channel-factory.c9
-rw-r--r--src/im-channel.c19
-rw-r--r--src/media-channel.c22
7 files changed, 0 insertions, 65 deletions
diff --git a/src/connection-aliasing.c b/src/connection-aliasing.c
index 2c75d65..8400e59 100644
--- a/src/connection-aliasing.c
+++ b/src/connection-aliasing.c
@@ -355,7 +355,6 @@ blist_node_aliased_cb (PurpleBlistNode *node,
aliases);
g_ptr_array_free (aliases, TRUE);
- tp_handle_unref (contact_handles, handle);
}
void
diff --git a/src/connection-avatars.c b/src/connection-avatars.c
index 163f39c..1042938 100644
--- a/src/connection-avatars.c
+++ b/src/connection-avatars.c
@@ -547,7 +547,6 @@ buddy_icon_changed_cb (PurpleBuddy *buddy,
tp_svc_connection_interface_avatars_emit_avatar_updated (conn, contact,
token);
- tp_handle_unref (contact_repo, contact);
g_free (token);
}
diff --git a/src/connection-presence.c b/src/connection-presence.c
index f09de62..74ba730 100644
--- a/src/connection-presence.c
+++ b/src/connection-presence.c
@@ -242,7 +242,6 @@ update_status (PurpleBuddy *buddy,
tp_presence_mixin_emit_one_presence_update (G_OBJECT (conn), handle,
tp_status);
- tp_handle_unref (handle_repo, handle);
}
static void
diff --git a/src/contact-list.c b/src/contact-list.c
index fbbc1f9..d162e8c 100644
--- a/src/contact-list.c
+++ b/src/contact-list.c
@@ -195,7 +195,6 @@ haze_contact_list_dup_contacts (TpBaseContactList *cl)
if (G_LIKELY (handle != 0))
{
tp_handle_set_add (handles, handle);
- tp_handle_unref (contact_repo, handle);
}
}
@@ -311,8 +310,6 @@ buddy_added_cb (PurpleBuddy *buddy, gpointer unused)
group_name = purple_group_get_name (purple_buddy_get_group (buddy));
tp_base_contact_list_one_contact_groups_changed (
(TpBaseContactList *) contact_list, handle, &group_name, 1, NULL, 0);
-
- tp_handle_unref (contact_repo, handle);
}
static void
@@ -362,8 +359,6 @@ buddy_removed_cb (PurpleBuddy *buddy, gpointer unused)
tp_base_contact_list_one_contact_removed (
(TpBaseContactList *) contact_list, handle);
}
-
- tp_handle_unref (contact_repo, handle);
}
@@ -385,18 +380,11 @@ static void
remove_pending_publish_request (HazeContactList *self,
TpHandle handle)
{
- HazeConnection *conn = self->priv->conn;
- TpBaseConnection *base_conn = TP_BASE_CONNECTION (conn);
- TpHandleRepoIface *handle_repo =
- tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT);
-
gpointer h = GUINT_TO_POINTER (handle);
gboolean removed;
removed = g_hash_table_remove (self->priv->pending_publish_requests, h);
g_assert (removed);
-
- tp_handle_unref (handle_repo, handle);
}
void
diff --git a/src/im-channel-factory.c b/src/im-channel-factory.c
index fee7990..3fb9824 100644
--- a/src/im-channel-factory.c
+++ b/src/im-channel-factory.c
@@ -457,14 +457,6 @@ haze_create_conversation (PurpleConversation *conv)
static void
haze_destroy_conversation (PurpleConversation *conv)
{
- PurpleAccount *account = purple_conversation_get_account (conv);
-
- HazeImChannelFactory *im_factory =
- ACCOUNT_GET_HAZE_CONNECTION (account)->im_factory;
- TpBaseConnection *base_conn = TP_BASE_CONNECTION (im_factory->priv->conn);
- TpHandleRepoIface *contact_repo =
- tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT);
-
HazeConversationUiData *ui_data;
DEBUG ("(PurpleConversation *)%p destroyed", conv);
@@ -476,7 +468,6 @@ haze_destroy_conversation (PurpleConversation *conv)
ui_data = PURPLE_CONV_GET_HAZE_UI_DATA (conv);
- tp_handle_unref (contact_repo, ui_data->contact_handle);
if (ui_data->resend_typing_timeout_id)
g_source_remove (ui_data->resend_typing_timeout_id);
diff --git a/src/im-channel.c b/src/im-channel.c
index 68efacb..d374491 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -98,15 +98,10 @@ haze_im_channel_close (TpSvcChannel *iface,
{
if (priv->initiator != priv->handle)
{
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
-
g_assert (priv->initiator != 0);
g_assert (priv->handle != 0);
- tp_handle_unref (contact_repo, priv->initiator);
priv->initiator = priv->handle;
- tp_handle_ref (contact_repo, priv->initiator);
}
tp_message_mixin_set_rescued ((GObject *) self);
@@ -569,7 +564,6 @@ haze_im_channel_constructor (GType type, guint n_props,
GObject *obj;
HazeIMChannel *chan;
HazeIMChannelPrivate *priv;
- TpHandleRepoIface *contact_handles;
TpBaseConnection *conn;
TpDBusDaemon *bus;
@@ -579,11 +573,7 @@ haze_im_channel_constructor (GType type, guint n_props,
priv = chan->priv;
conn = (TpBaseConnection *) (priv->conn);
- contact_handles = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (contact_handles, priv->handle);
g_assert (priv->initiator != 0);
- tp_handle_ref (contact_handles, priv->initiator);
tp_message_mixin_init (obj, G_STRUCT_OFFSET (HazeIMChannel, messages),
conn);
@@ -604,20 +594,11 @@ haze_im_channel_dispose (GObject *obj)
{
HazeIMChannel *chan = HAZE_IM_CHANNEL (obj);
HazeIMChannelPrivate *priv = chan->priv;
- TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
if (priv->dispose_has_run)
return;
priv->dispose_has_run = TRUE;
- if (priv->handle != 0)
- tp_handle_unref (contact_handles, priv->handle);
-
- if (priv->initiator != 0)
- tp_handle_unref (contact_handles, priv->initiator);
-
if (!priv->closed)
{
purple_conversation_destroy (priv->conv);
diff --git a/src/media-channel.c b/src/media-channel.c
index c81974e..54c2a41 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -609,7 +609,6 @@ haze_media_channel_constructor (GType type, guint n_props,
/* automatically add creator to channel, but also ref them again (because
* priv->creator is the InitiatorHandle) */
g_assert (priv->creator != 0);
- tp_handle_ref (contact_handles, priv->creator);
set = tp_intset_new_containing (priv->creator);
tp_group_mixin_change_members (obj, "", set, NULL, NULL, NULL, 0,
@@ -787,15 +786,6 @@ haze_media_channel_set_property (GObject *object,
break;
case PROP_INITIAL_PEER:
priv->initial_peer = g_value_get_uint (value);
-
- if (priv->initial_peer != 0)
- {
- TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *repo = tp_base_connection_get_handles (base_conn,
- TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (repo, priv->initial_peer);
- }
-
break;
case PROP_MEDIA:
g_assert (priv->media == NULL);
@@ -967,9 +957,6 @@ haze_media_channel_dispose (GObject *object)
{
HazeMediaChannel *self = HAZE_MEDIA_CHANNEL (object);
HazeMediaChannelPrivate *priv = self->priv;
- TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (
- conn, TP_HANDLE_TYPE_CONTACT);
if (priv->dispose_has_run)
return;
@@ -983,15 +970,6 @@ haze_media_channel_dispose (GObject *object)
g_assert (priv->closed);
- tp_handle_unref (contact_handles, priv->creator);
- priv->creator = 0;
-
- if (priv->initial_peer != 0)
- {
- tp_handle_unref (contact_handles, priv->initial_peer);
- priv->initial_peer = 0;
- }
-
if (priv->media != NULL)
g_object_unref (priv->media);
priv->media = NULL;