Bug 49213 - [next] Drop TpHandle APIs from TpChannel
Summary: [next] Drop TpHandle APIs from TpChannel
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tp-glib-1.0
  Show dependency treegraph
 
Reported: 2012-04-27 04:20 UTC by Xavier Claessens
Modified: 2012-05-14 04:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Bump GLib required version to 2.32 (1.11 KB, patch)
2012-04-27 05:17 UTC, Xavier Claessens
Details | Splinter Review
TpChannel: Deprecate all TpHandle APIs that have TpContact variant (12.36 KB, patch)
2012-04-27 05:17 UTC, Xavier Claessens
Details | Splinter Review

Description Xavier Claessens 2012-04-27 04:20:56 UTC
All contact TpHandle APIs now have an equivalent that gives a (prepared) TpContact.

In master we could already mark them as deprecated
Comment 1 Xavier Claessens 2012-04-27 04:24:39 UTC
Maybe API name could be rearanged, like removing the _contact suffix if we only keep TpContact variants
Comment 2 Simon McVittie 2012-04-27 04:33:32 UTC
(In reply to comment #0)
> In master we could already mark them as deprecated

Sure.

(In reply to comment #1)
> Maybe API name could be rearanged, like removing the _contact suffix if we only
> keep TpContact variants

Yes, in next.

If we do want to keep some handle-based APIs - like get_thing (TpHandle) -> Thing - we could rename those out of the way, to get_thing_by_handle or something. General design principle: when compatibility allows it (or when breaking compat already), the thing you want to use most of the time gets the shorter name and the obscure thing gets the longer name.
Comment 3 Xavier Claessens 2012-04-27 04:51:16 UTC
I think that all TpHandle of type TP_HANDLE_TYPE_CONTACT must disappear totally from the API and replaced by TpContact.

On TpChannel the only remaining TpHandle should be the channel's handle since it could be something else than a contact.
Comment 4 Xavier Claessens 2012-04-27 05:17:34 UTC
Created attachment 60661 [details] [review]
Bump GLib required version to 2.32
Comment 5 Xavier Claessens 2012-04-27 05:17:37 UTC
Created attachment 60662 [details] [review]
TpChannel: Deprecate all TpHandle APIs that have TpContact variant
Comment 6 Simon McVittie 2012-04-27 05:40:18 UTC
Comment on attachment 60661 [details] [review]
Bump GLib required version to 2.32

Review of attachment 60661 [details] [review]:
-----------------------------------------------------------------

::: configure.ac
@@ +204,2 @@
>  
> +AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_32], [Ignore post 2.32 deprecations])

Don't we want to ignore the deprecation of GValueArray for now?
Comment 7 Simon McVittie 2012-04-27 05:43:08 UTC
Comment on attachment 60662 [details] [review]
TpChannel: Deprecate all TpHandle APIs that have TpContact variant

Review of attachment 60662 [details] [review]:
-----------------------------------------------------------------

Looks fine.

::: examples/client/inspect-channel.c
@@ +73,4 @@
>          {
> +          TpContact *member = g_ptr_array_index (members, i);
> +
> +          printf ("\tcontact #%u\n", tp_contact_get_handle (member));

It'd be nice to printf the identifier too, now that it's trivial.
Comment 8 Xavier Claessens 2012-04-27 06:09:25 UTC
fixed and merged patches to master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.