summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/client/inspect-channel.c16
-rw-r--r--telepathy-glib/channel-contacts.c2
-rw-r--r--telepathy-glib/channel-group.c12
-rw-r--r--telepathy-glib/channel.c20
-rw-r--r--telepathy-glib/channel.h24
-rw-r--r--telepathy-glib/stream-tube-channel.c3
6 files changed, 54 insertions, 23 deletions
diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c
index a4987b6d3..b4492873b 100644
--- a/examples/client/inspect-channel.c
+++ b/examples/client/inspect-channel.c
@@ -64,18 +64,20 @@ channel_ready_cb (GObject *source,
if (tp_proxy_has_interface_by_id (channel,
TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP))
{
- const TpIntset *members = tp_channel_group_get_members (channel);
- TpIntsetFastIter group_iter;
- TpHandle member;
+ GPtrArray *members = tp_channel_group_dup_members_contacts (channel);
+ guint i;
printf ("Group members:\n");
- tp_intset_fast_iter_init (&group_iter, members);
-
- while (tp_intset_fast_iter_next (&group_iter, &member))
+ for (i = 0; i < members->len; i++)
{
- printf ("\tcontact #%u\n", member);
+ TpContact *member = g_ptr_array_index (members, i);
+
+ printf ("\tcontact #%u %s\n",
+ tp_contact_get_handle (member),
+ tp_contact_get_identifier (member));
}
+ g_ptr_array_unref (members);
}
data->exit_status = 0;
diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
index 7bdebe3a0..6896a463c 100644
--- a/telepathy-glib/channel-contacts.c
+++ b/telepathy-glib/channel-contacts.c
@@ -175,6 +175,7 @@ _tp_channel_contacts_init (TpChannel *self)
self->priv->handle, self->priv->identifier);
}
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (tp_channel_get_initiator_handle (self) != 0 &&
!tp_str_empty (tp_channel_get_initiator_identifier (self)))
{
@@ -183,6 +184,7 @@ _tp_channel_contacts_init (TpChannel *self)
tp_channel_get_initiator_handle (self),
tp_channel_get_initiator_identifier (self));
}
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
void
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index 63af6c7f9..236b72561 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -79,6 +79,7 @@ local_pending_info_free (LocalPendingInfo *info)
*
* Returns: the handle representing the user, or 0
* Since: 0.7.12
+ * Deprecated: New code should use tp_channel_group_get_self_contact() instead.
*/
TpHandle
tp_channel_group_get_self_handle (TpChannel *self)
@@ -122,6 +123,8 @@ tp_channel_group_get_flags (TpChannel *self)
*
* Returns: (transfer none): the members, or %NULL
* Since: 0.7.12
+ * Deprecated: New code should use tp_channel_group_dup_members_contacts()
+ * instead.
*/
const TpIntset *
tp_channel_group_get_members (TpChannel *self)
@@ -146,6 +149,8 @@ tp_channel_group_get_members (TpChannel *self)
*
* Returns: (transfer none): the local-pending members, or %NULL
* Since: 0.7.12
+ * Deprecated: New code should use tp_channel_group_dup_local_pending_contacts()
+ * instead.
*/
const TpIntset *
tp_channel_group_get_local_pending (TpChannel *self)
@@ -170,6 +175,8 @@ tp_channel_group_get_local_pending (TpChannel *self)
*
* Returns: (transfer none): the remote-pending members, or %NULL
* Since: 0.7.12
+ * Deprecated: New code should use
+ * tp_channel_group_dup_remote_pending_contacts() instead.
*/
const TpIntset *
tp_channel_group_get_remote_pending (TpChannel *self)
@@ -203,6 +210,8 @@ tp_channel_group_get_remote_pending (TpChannel *self)
*
* Returns: %TRUE if the contact is in fact local-pending
* Since: 0.7.12
+ * Deprecated: New code should use
+ * tp_channel_group_get_local_pending_contact_info() instead.
*/
gboolean
tp_channel_group_get_local_pending_info (TpChannel *self,
@@ -302,6 +311,7 @@ tp_channel_group_get_local_pending_info (TpChannel *self,
*
* Returns: the global handle that owns the given handle, or 0
* Since: 0.7.12
+ * Deprecated: New code should use tp_channel_group_get_contact_owner() instead.
*/
TpHandle
tp_channel_group_get_handle_owner (TpChannel *self,
@@ -707,8 +717,10 @@ _tp_channel_emit_initial_sets (TpChannel *self)
TpChannelGroupChangeReason reason;
const gchar *message;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
tp_channel_group_get_local_pending_info (self, handle, &actor, &reason,
&message);
+ G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_emit_by_name (self, "group-members-changed", message,
&empty_array, &empty_array, &local_pending, &empty_array, actor,
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 1b6329abd..41f016a54 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -444,6 +444,8 @@ tp_channel_get_property (GObject *object,
{
TpChannel *self = TP_CHANNEL (object);
+ /* We still need to use deprecated getters funcs */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
switch (property_id)
{
case PROP_CONNECTION:
@@ -499,6 +501,7 @@ tp_channel_get_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -1642,6 +1645,7 @@ tp_channel_class_init (TpChannelClass *klass)
* Change notification is via notify::group-self-handle.
*
* Since: 0.7.12
+ * Deprecated: Use #TpChannel:group-self-contact instead.
*/
param_spec = g_param_spec_uint ("group-self-handle", "Group.SelfHandle",
"Undefined if not a group", 0, G_MAXUINT32, 0,
@@ -1718,6 +1722,7 @@ tp_channel_class_init (TpChannelClass *klass)
* finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be 0.
*
* Since: 0.11.15
+ * Deprecated: Use #TpChannel:initiator-contact instead.
*/
param_spec = g_param_spec_uint ("initiator-handle", "TpHandle",
"The handle of the initiator of the channel",
@@ -1738,6 +1743,7 @@ tp_channel_class_init (TpChannelClass *klass)
* the empty string.
*
* Since: 0.11.15
+ * Deprecated: Use #TpChannel:initiator-contact instead.
*/
param_spec = g_param_spec_string ("initiator-identifier",
"Initiator identifier",
@@ -1804,6 +1810,7 @@ tp_channel_class_init (TpChannelClass *klass)
* Emitted when the group members change in a Group channel that is ready.
*
* Since: 0.7.12
+ * Deprecated: Use #TpChannel::group-contacts-changed instead.
*/
signals[SIGNAL_GROUP_MEMBERS_CHANGED] = g_signal_new (
"group-members-changed", G_OBJECT_CLASS_TYPE (klass),
@@ -1836,6 +1843,7 @@ tp_channel_class_init (TpChannelClass *klass)
* applications can connect to this signal and ignore the other.
*
* Since: 0.7.21
+ * Deprecated: Use #TpChannel::group-contacts-changed instead.
*/
signals[SIGNAL_GROUP_MEMBERS_CHANGED_DETAILED] = g_signal_new (
"group-members-changed-detailed", G_OBJECT_CLASS_TYPE (klass),
@@ -2356,6 +2364,7 @@ tp_channel_get_requested (TpChannel *self)
* Returns: the value of #TpChannel:initiator-handle
*
* Since: 0.11.15
+ * Deprecated: New code should use tp_channel_get_initiator_contact() instead.
*/
TpHandle
tp_channel_get_initiator_handle (TpChannel *self)
@@ -2373,6 +2382,7 @@ tp_channel_get_initiator_handle (TpChannel *self)
* Returns: the value of #TpChannel:initiator-identifier
*
* Since: 0.11.15
+ * Deprecated: New code should use tp_channel_get_initiator_contact() instead.
*/
const gchar *
tp_channel_get_initiator_identifier (TpChannel *self)
@@ -2430,7 +2440,6 @@ tp_channel_join_async (TpChannel *self,
{
GSimpleAsyncResult *result;
GArray *array;
- TpHandle self_handle;
g_return_if_fail (TP_IS_CHANNEL (self));
g_return_if_fail (tp_proxy_is_prepared (self, TP_CHANNEL_FEATURE_GROUP));
@@ -2438,9 +2447,8 @@ tp_channel_join_async (TpChannel *self,
result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data, tp_channel_join_async);
- self_handle = tp_channel_group_get_self_handle (self);
array = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_append_val (array, self_handle);
+ g_array_append_val (array, self->priv->group_self_handle);
tp_cli_channel_interface_group_call_add_members (self, -1, array, message,
channel_join_cb, result, g_object_unref, NULL);
@@ -2563,7 +2571,6 @@ group_prepared_cb (GObject *source,
LeaveCtx *ctx = user_data;
TpChannel *self = (TpChannel *) source;
GError *error = NULL;
- TpHandle self_handle;
GArray *handles;
if (!tp_proxy_prepare_finish (source, res, &error))
@@ -2575,15 +2582,14 @@ group_prepared_cb (GObject *source,
goto call_close;
}
- self_handle = tp_channel_group_get_self_handle (self);
- if (self_handle == 0)
+ if (self->priv->group_self_handle == 0)
{
DEBUG ("We are not in the channel, fallback to Close()");
goto call_close;
}
handles = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_append_val (handles, self_handle);
+ g_array_append_val (handles, self->priv->group_self_handle);
tp_cli_channel_interface_group_call_remove_members_with_reason (
self, -1, handles, ctx->message, ctx->reason,
diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h
index aeaa7126c..cf31db69a 100644
--- a/telepathy-glib/channel.h
+++ b/telepathy-glib/channel.h
@@ -106,21 +106,29 @@ const gchar *tp_channel_get_identifier (TpChannel *self);
TpConnection *tp_channel_borrow_connection (TpChannel *self);
GHashTable *tp_channel_borrow_immutable_properties (TpChannel *self);
-TpHandle tp_channel_group_get_self_handle (TpChannel *self);
+TpHandle tp_channel_group_get_self_handle (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_self_contact);
TpChannelGroupFlags tp_channel_group_get_flags (TpChannel *self);
-const TpIntset *tp_channel_group_get_members (TpChannel *self);
-const TpIntset *tp_channel_group_get_local_pending (TpChannel *self);
-const TpIntset *tp_channel_group_get_remote_pending (TpChannel *self);
+const TpIntset *tp_channel_group_get_members (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_members_contacts);
+const TpIntset *tp_channel_group_get_local_pending (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_local_pending_contacts);
+const TpIntset *tp_channel_group_get_remote_pending (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_dup_remote_pending_contacts);
gboolean tp_channel_group_get_local_pending_info (TpChannel *self,
TpHandle local_pending, TpHandle *actor,
- TpChannelGroupChangeReason *reason, const gchar **message);
+ TpChannelGroupChangeReason *reason, const gchar **message)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_local_pending_contact_info);
-TpHandle tp_channel_group_get_handle_owner (TpChannel *self, TpHandle handle);
+TpHandle tp_channel_group_get_handle_owner (TpChannel *self, TpHandle handle)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_group_get_contact_owner);
gboolean tp_channel_get_requested (TpChannel *self);
-TpHandle tp_channel_get_initiator_handle (TpChannel *self);
-const gchar * tp_channel_get_initiator_identifier (TpChannel *self);
+TpHandle tp_channel_get_initiator_handle (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_get_initiator_contact);
+const gchar * tp_channel_get_initiator_identifier (TpChannel *self)
+ _TP_GNUC_DEPRECATED_FOR (tp_channel_get_initiator_contact);
#define TP_CHANNEL_FEATURE_CORE \
tp_channel_get_feature_quark_core ()
diff --git a/telepathy-glib/stream-tube-channel.c b/telepathy-glib/stream-tube-channel.c
index dc52f07e4..600856011 100644
--- a/telepathy-glib/stream-tube-channel.c
+++ b/telepathy-glib/stream-tube-channel.c
@@ -599,8 +599,9 @@ new_local_connection_identified (TpStreamTubeChannel *self,
/* We are accepting a tube so the contact of the connection is the
* initiator of the tube */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
initiator_handle = tp_channel_get_initiator_handle (TP_CHANNEL (self));
-
+ G_GNUC_END_IGNORE_DEPRECATIONS
connection = tp_channel_borrow_connection (TP_CHANNEL (self));
features = tp_simple_client_factory_dup_contact_features (