Bug 27618

Summary: add TP_CONNECTION_FEATURE_CAPABILITIES
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Guillaume Desmottes <guillaume.desmottes>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/cassidy/telepathy-glib;a=shortlog;h=refs/heads/conn-caps-27618
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on: 27511    
Bug Blocks: 21332    

Description Guillaume Desmottes 2010-04-13 06:18:17 UTC
From bug #27511

"""
* You should be able to ask the Connection for its RequestableChannelClasses,
as a Capabilities object (this is a feature in the sense of Bug #21097, IMO -
perhaps TP_CONNECTION_FEATURE_CAPABILITIES)
"""
Comment 1 Guillaume Desmottes 2010-04-13 08:06:16 UTC
http://git.collabora.co.uk/?p=user/cassidy/telepathy-glib;a=shortlog;h=refs/heads/conn-caps-27618

This is based on my capabilities branch so bug #27511 should be reviewed first.
Comment 2 Simon McVittie 2010-04-13 08:24:07 UTC
> +  PROP_CAPABILIES,

That's not how you spell capabilities.

> +   * The %TP_CAPABILITIES object representing the capabilities of this

The #TpCapabilities object ...

> +   * To wait for a valid capabilities, call tp_proxy_prepare_async() with

To wait for valid capability information, ...

> +  self->priv->capabilities = _tp_capabilities_new (g_value_get_boxed (value),

You need to check that the GValue contains the right boxed type first. If it doesn't, consider the connection to have no capabilities, or make the capabilities feature fail, or something.
Comment 3 Guillaume Desmottes 2010-04-14 02:26:21 UTC
(In reply to comment #2)
> > +  PROP_CAPABILIES,
> 
> That's not how you spell capabilities.

Oops; fixed.

> > +   * The %TP_CAPABILITIES object representing the capabilities of this
> 
> The #TpCapabilities object ...

done.

> > +   * To wait for a valid capabilities, call tp_proxy_prepare_async() with
> 
> To wait for valid capability information, ...

fixed.

> > +  self->priv->capabilities = _tp_capabilities_new (g_value_get_boxed (value),
> 
> You need to check that the GValue contains the right boxed type first. If it
> doesn't, consider the connection to have no capabilities, or make the
> capabilities feature fail, or something.

Done.
Comment 4 Simon McVittie 2010-04-14 04:45:34 UTC
Looks good to me.
Comment 5 Guillaume Desmottes 2010-04-14 05:56:48 UTC
Merged. Will be in 0.11.3

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.