diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2010-06-02 11:58:20 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2010-06-03 15:02:18 +0200 |
commit | 96b08b289d07f15236fbce7d87773cc4722701c9 (patch) | |
tree | 6817436042f3a28d01c6976d2d40fec4bafdf043 /telepathy-glib/connection-contact-info.c | |
parent | 0533ded37271bfb0c91108804835405adc210d55 (diff) | |
download | telepathy-glib-96b08b289d07f15236fbce7d87773cc4722701c9.tar.gz |
Copy the GList container but not its elements
tp_contact_get_contact_info() and tp_connection_get_contact_info_supported_fields()
Diffstat (limited to 'telepathy-glib/connection-contact-info.c')
-rw-r--r-- | telepathy-glib/connection-contact-info.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c index 9b6a0d5da..09363d8f6 100644 --- a/telepathy-glib/connection-contact-info.c +++ b/telepathy-glib/connection-contact-info.c @@ -529,14 +529,19 @@ tp_connection_get_contact_info_flags (TpConnection *self) * tp_connection_get_contact_info_supported_fields: * @self: a connection * - * Returns a list of supported contact info fields for this connection + * Returns a newly allocated #GList of supported contact info fields for this + * connection. The list must be freed with g_list_free() after used. + * + * Note that the #TpContactInfoFieldSpec<!-- -->s in the returned #GList are not + * dupped before returning from this function. One could copy every item in the + * list using tp_contact_info_field_spec_copy(). * * To wait for valid supported fields, call tp_proxy_prepare_async() with the * feature %TP_CONNECTION_FEATURE_CONTACT_INFO. * * This property cannot change after @self goes to the Connected state. * - * Returns: (element-type TelepathyGLib.ContactInfoFieldSpec) (transfer none): + * Returns: (element-type TelepathyGLib.ContactInfoFieldSpec) (transfer container): * a #GList of #TpContactInfoFieldSpec struct, or %NULL if the feature is not * yet prepared or the connection doesn't have the necessary properties. * Since: 0.11.UNRELEASED @@ -546,7 +551,7 @@ tp_connection_get_contact_info_supported_fields (TpConnection *self) { g_return_val_if_fail (TP_IS_CONNECTION (self), NULL); - return self->priv->contact_info_supported_fields; + return g_list_copy (self->priv->contact_info_supported_fields); } static void |