diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-05-10 15:10:10 +0200 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-11-16 10:08:45 +0000 |
commit | c452d94fabbdf31c85963c81df3d5d566148f968 (patch) | |
tree | 3f3242949a0f6f3aa14bd56fbedb223d242810b2 | |
parent | b6c32f8840ec4598885108f89d58a5a74ee04af8 (diff) | |
download | telepathy-salut-c452d94fabbdf31c85963c81df3d5d566148f968.tar.gz |
Remove deprecated tp_handle_ref/unref
-rw-r--r-- | src/avahi-olpc-activity-manager.c | 9 | ||||
-rw-r--r-- | src/avahi-olpc-activity.c | 1 | ||||
-rw-r--r-- | src/capability-set.c | 1 | ||||
-rw-r--r-- | src/contact.c | 31 | ||||
-rw-r--r-- | src/muc-manager.c | 2 | ||||
-rw-r--r-- | src/olpc-activity.c | 12 | ||||
-rw-r--r-- | src/self.c | 11 | ||||
-rw-r--r-- | src/tube-dbus.c | 25 | ||||
-rw-r--r-- | src/tube-stream.c | 9 | ||||
-rw-r--r-- | src/tubes-channel.c | 15 |
10 files changed, 1 insertions, 115 deletions
diff --git a/src/avahi-olpc-activity-manager.c b/src/avahi-olpc-activity-manager.c index 94da8718..8d3691bc 100644 --- a/src/avahi-olpc-activity-manager.c +++ b/src/avahi-olpc-activity-manager.c @@ -183,7 +183,6 @@ browser_found (GaServiceBrowser *browser, salut_olpc_activity_manager_contact_joined (mgr, contact, activity); g_object_unref (activity); - tp_handle_unref (room_repo, room); g_free (contact_name); g_free (room_name); g_object_unref (contact); @@ -233,18 +232,13 @@ browser_removed (GaServiceBrowser *browser, DEBUG ("Invalid contact name %s: %s", contact_name, error->message); g_error_free (error); g_free (contact_name); - tp_handle_unref (room_repo, room); return; } g_free (contact_name); activity = salut_olpc_activity_manager_get_activity_by_room (mgr, room); - tp_handle_unref (room_repo, room); if (activity == NULL) - { - tp_handle_unref (contact_repo, contact_handle); - return; - } + return; salut_avahi_olpc_activity_remove_service (SALUT_AVAHI_OLPC_ACTIVITY (activity), interface, protocol, name, type, domain); @@ -255,7 +249,6 @@ browser_removed (GaServiceBrowser *browser, contact = salut_contact_manager_get_contact (contact_manager, contact_handle); - tp_handle_unref (contact_repo, contact_handle); g_object_unref (contact_manager); if (contact == NULL) return; diff --git a/src/avahi-olpc-activity.c b/src/avahi-olpc-activity.c index ea96235d..424da437 100644 --- a/src/avahi-olpc-activity.c +++ b/src/avahi-olpc-activity.c @@ -482,7 +482,6 @@ activity_resolved_cb (GaServiceResolver *resolver, salut_olpc_activity_update (SALUT_OLPC_ACTIVITY (self), room, activity_id, activity_name, activity_type, color, tags, FALSE); - tp_handle_unref (room_repo, room); avahi_free (activity_id); avahi_free (activity_type); avahi_free (activity_name); diff --git a/src/capability-set.c b/src/capability-set.c index bd2a7bb0..5f1fbe60 100644 --- a/src/capability-set.c +++ b/src/capability-set.c @@ -514,7 +514,6 @@ gabble_capability_set_add (GabbleCapabilitySet *caps, handle = tp_handle_ensure (feature_handles, cap, NULL, NULL); tp_handle_set_add (caps->handles, handle); - tp_handle_unref (feature_handles, handle); } gboolean diff --git a/src/contact.c b/src/contact.c index 667246c3..3dab6a2d 100644 --- a/src/contact.c +++ b/src/contact.c @@ -293,15 +293,6 @@ salut_contact_dispose (GObject *object) priv->dispose_has_run = TRUE; #ifdef ENABLE_OLPC - if (self->olpc_cur_act_room != 0 && self->connection != NULL) - { - TpHandleRepoIface *room_repo = tp_base_connection_get_handles - ((TpBaseConnection *) self->connection, TP_HANDLE_TYPE_ROOM); - - tp_handle_unref (room_repo, self->olpc_cur_act_room); - self->olpc_cur_act_room = 0; - } - g_hash_table_foreach (priv->olpc_activities, (GHFunc) disconnect_activity_signal_foreach, self); g_hash_table_unref (priv->olpc_activities); @@ -311,13 +302,6 @@ salut_contact_dispose (GObject *object) /* release any references held by the object here */ - if (self->handle != 0 && self->connection != NULL) - { - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles - ((TpBaseConnection *) self->connection, TP_HANDLE_TYPE_CONTACT); - tp_handle_unref (contact_repo, self->handle); - } - if (self->data_forms != NULL) { g_ptr_array_unref (self->data_forms); @@ -737,18 +721,10 @@ salut_contact_change_current_activity (SalutContact *self, if (self->olpc_cur_act != NULL || self->olpc_cur_act_room != 0) { g_free (self->olpc_cur_act); - if (self->olpc_cur_act_room != 0) - tp_handle_unref (room_repo, self->olpc_cur_act_room); self->olpc_cur_act = NULL; self->olpc_cur_act_room = 0; salut_contact_change (self, SALUT_CONTACT_OLPC_CURRENT_ACTIVITY); } - if (room_handle != 0) - { - /* tp_handle_ensure gave us a ref */ - tp_handle_unref (room_repo, room_handle); - } - } else { @@ -758,17 +734,10 @@ salut_contact_change_current_activity (SalutContact *self, self->olpc_cur_act_room != room_handle) { g_free (self->olpc_cur_act); - if (self->olpc_cur_act_room != 0) - tp_handle_unref (room_repo, self->olpc_cur_act_room); self->olpc_cur_act_room = room_handle; self->olpc_cur_act = g_strdup (current_activity_id); salut_contact_change (self, SALUT_CONTACT_OLPC_CURRENT_ACTIVITY); } - else - { - /* tp_handle_ensure gave us a ref */ - tp_handle_unref (room_repo, room_handle); - } } } diff --git a/src/muc-manager.c b/src/muc-manager.c index 182c1e92..5f3f24d4 100644 --- a/src/muc-manager.c +++ b/src/muc-manager.c @@ -1099,7 +1099,6 @@ invite_stanza_callback (WockyPorter *porter, if (connection == NULL) { - tp_handle_unref (room_repo, room_handle); /* FIXME some kinda error to the user maybe ? Ignore for now */ goto discard; } @@ -1120,7 +1119,6 @@ invite_stanza_callback (WockyPorter *porter, #endif salut_muc_channel_invited (chan, inviter_handle, reason, NULL); - tp_handle_unref (contact_repo, inviter_handle); return TRUE; diff --git a/src/olpc-activity.c b/src/olpc-activity.c index df3f9b58..dd2f48ae 100644 --- a/src/olpc-activity.c +++ b/src/olpc-activity.c @@ -194,12 +194,6 @@ salut_olpc_activity_dispose (GObject *object) priv->dispose_has_run = TRUE; - if (self->room != 0) - { - tp_handle_unref (room_repo, self->room); - self->room = 0; - } - if (priv->muc != NULL) { g_signal_handlers_disconnect_matched (priv->muc, G_SIGNAL_MATCH_DATA, @@ -443,13 +437,7 @@ salut_olpc_activity_update (SalutOlpcActivity *self, if (room != 0 && room != self->room) { - if (self->room != 0) - { - tp_handle_unref (room_repo, self->room); - } - self->room = room; - tp_handle_ref (room_repo, room); } if (id != NULL && tp_strdiff (id, self->id)) @@ -475,12 +475,6 @@ salut_self_dispose (GObject *object) if (priv->olpc_activities != NULL) g_hash_table_unref (priv->olpc_activities); - - if (self->olpc_cur_act_room != 0) - { - tp_handle_unref (priv->room_repo, self->olpc_cur_act_room); - self->olpc_cur_act_room = 0; - } #endif priv->room_repo = NULL; @@ -829,12 +823,7 @@ salut_self_set_olpc_current_activity (SalutSelf *self, g_free (self->olpc_cur_act); self->olpc_cur_act = g_strdup (id); - - if (self->olpc_cur_act_room != 0) - tp_handle_unref (self->priv->room_repo, self->olpc_cur_act_room); self->olpc_cur_act_room = room; - if (room != 0) - tp_handle_ref (self->priv->room_repo, room); if (!SALUT_SELF_GET_CLASS (self)->update_current_activity (self, room_name, &err)) diff --git a/src/tube-dbus.c b/src/tube-dbus.c index 026295f5..cfa504bf 100644 --- a/src/tube-dbus.c +++ b/src/tube-dbus.c @@ -496,17 +496,6 @@ salut_tube_dbus_init (SalutTubeDBus *self) self->priv = priv; } -static void -unref_handle_foreach (gpointer key, - gpointer value, - gpointer user_data) -{ - TpHandle handle = GPOINTER_TO_UINT (key); - TpHandleRepoIface *contact_repo = (TpHandleRepoIface *) user_data; - - tp_handle_unref (contact_repo, handle); -} - static TpTubeChannelState get_tube_state (SalutTubeDBus *self) { @@ -574,8 +563,6 @@ salut_tube_dbus_dispose (GObject *object) { SalutTubeDBus *self = SALUT_TUBE_DBUS (object); SalutTubeDBusPrivate *priv = SALUT_TUBE_DBUS_GET_PRIVATE (self); - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); if (priv->dispose_has_run) return; @@ -624,8 +611,6 @@ salut_tube_dbus_dispose (GObject *object) if (priv->dbus_names) { - g_hash_table_foreach (priv->dbus_names, unref_handle_foreach, - contact_repo); g_hash_table_unref (priv->dbus_names); } @@ -638,8 +623,6 @@ salut_tube_dbus_dispose (GObject *object) if (priv->reassembly_buffer) g_string_free (priv->reassembly_buffer, TRUE); - tp_handle_unref (contact_repo, priv->initiator); - priv->dispose_has_run = TRUE; if (G_OBJECT_CLASS (salut_tube_dbus_parent_class)->dispose) @@ -905,7 +888,6 @@ salut_tube_dbus_constructor (GType type, SalutTubeDBusPrivate *priv; TpDBusDaemon *bus; TpBaseConnection *base_conn; - TpHandleRepoIface *contact_repo; TpHandleRepoIface *handles_repo; TpSocketAccessControl access_control; @@ -921,9 +903,6 @@ salut_tube_dbus_constructor (GType type, /* Ref the initiator handle */ g_assert (priv->conn != NULL); g_assert (priv->initiator != 0); - contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); - tp_handle_ref (contact_repo, priv->initiator); bus = tp_base_connection_get_dbus_daemon (base_conn); tp_dbus_daemon_register_object (bus, priv->object_path, obj); @@ -1606,7 +1585,6 @@ salut_tube_dbus_add_name (SalutTubeDBus *self, g_hash_table_insert (priv->dbus_names, GUINT_TO_POINTER (handle), g_strdup (name)); - tp_handle_ref (contact_repo, handle); /* Fire DBusNamesChanged (new API) */ added = g_hash_table_new (g_direct_hash, g_direct_equal); @@ -1628,8 +1606,6 @@ salut_tube_dbus_remove_name (SalutTubeDBus *self, TpHandle handle) { SalutTubeDBusPrivate *priv = SALUT_TUBE_DBUS_GET_PRIVATE (self); - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); const gchar *name; GHashTable *added; GArray *removed; @@ -1653,7 +1629,6 @@ salut_tube_dbus_remove_name (SalutTubeDBus *self, g_hash_table_unref (added); g_array_unref (removed); - tp_handle_unref (contact_repo, handle); return TRUE; } diff --git a/src/tube-stream.c b/src/tube-stream.c index e538cc16..acb3a8e9 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -1010,8 +1010,6 @@ salut_tube_stream_dispose (GObject *object) { SalutTubeStream *self = SALUT_TUBE_STREAM (object); SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self); - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); if (priv->dispose_has_run) return; @@ -1055,8 +1053,6 @@ salut_tube_stream_dispose (GObject *object) priv->transport_to_id = NULL; } - tp_handle_unref (contact_repo, priv->initiator); - if (priv->local_listener != NULL) { g_object_unref (priv->local_listener); @@ -1362,7 +1358,6 @@ salut_tube_stream_constructor (GType type, { GObject *obj; SalutTubeStreamPrivate *priv; - TpHandleRepoIface *contact_repo; TpDBusDaemon *bus; TpBaseConnection *base_conn; @@ -1374,9 +1369,6 @@ salut_tube_stream_constructor (GType type, /* Ref the initiator handle */ base_conn = TP_BASE_CONNECTION (priv->conn); g_assert (priv->initiator != 0); - contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); - tp_handle_ref (contact_repo, priv->initiator); if (priv->initiator == priv->self_handle) { @@ -2015,7 +2007,6 @@ salut_tube_stream_add_bytestream (SalutTubeIface *tube, fire_new_remote_connection (self, transport, contact); - tp_handle_unref (contact_repo, contact); g_free (peer_id); } else diff --git a/src/tubes-channel.c b/src/tubes-channel.c index 3be20e6f..c847208a 100644 --- a/src/tubes-channel.c +++ b/src/tubes-channel.c @@ -196,7 +196,6 @@ salut_tubes_channel_constructor (GType type, SalutTubesChannelPrivate *priv; TpDBusDaemon *bus; TpBaseConnection *base_conn; - TpHandleRepoIface *handle_repo; obj = G_OBJECT_CLASS (salut_tubes_channel_parent_class)-> constructor (type, n_props, props); @@ -205,10 +204,6 @@ salut_tubes_channel_constructor (GType type, priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (self); base_conn = TP_BASE_CONNECTION (priv->conn); - handle_repo = tp_base_connection_get_handles ( - base_conn, priv->handle_type); - - tp_handle_ref (handle_repo, priv->handle); switch (priv->handle_type) { @@ -693,12 +688,7 @@ salut_tubes_channel_muc_message_received (SalutTubesChannel *self, break; case TP_TUBE_TYPE_STREAM: { - if (initiator_handle != 0) - /* ignore it */ - tp_handle_unref (contact_repo, initiator_handle); - initiator_handle = contact; - tp_handle_ref (contact_repo, initiator_handle); } break; default: @@ -712,7 +702,6 @@ salut_tubes_channel_muc_message_received (SalutTubesChannel *self, g_ptr_array_add (result, tube); /* the tube has reffed its initiator, no need to keep a ref */ - tp_handle_unref (contact_repo, initiator_handle); g_hash_table_unref (parameters); } } @@ -2315,8 +2304,6 @@ salut_tubes_channel_dispose (GObject *object) { SalutTubesChannel *self = SALUT_TUBES_CHANNEL (object); SalutTubesChannelPrivate *priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (self); - TpHandleRepoIface *handle_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, priv->handle_type); if (priv->dispose_has_run) return; @@ -2338,8 +2325,6 @@ salut_tubes_channel_dispose (GObject *object) priv->dispose_has_run = TRUE; - tp_handle_unref (handle_repo, priv->handle); - if (self->muc != NULL) tp_external_group_mixin_finalize (object); |