Bug 27325 - GetContactAttributes() is specified to be needlessly fascist about interfaces
Summary: GetContactAttributes() is specified to be needlessly fascist about interfaces
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks: 27374
  Show dependency treegraph
 
Reported: 2010-03-26 04:02 UTC by Will Thompson
Modified: 2010-03-30 11:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2010-03-26 04:02:59 UTC
From the definition of GetContactAttributes():

> It is an error to request interfaces that are not supported by this
> Connection (i.e. mentioned in the ContactAttributeInterfaces
> property).
>
> | This makes it possible to distinguish between interfaces for which
> | the Connection has nothing to say (e.g. we don't know the avatar
> | tokens of any of the contacts, so we omitted them all), and interfaces
> | for which this API isn't supported.

This is needlessly pedantic. If we had instead said that the CM must
ignore interfaces which aren't supported on the Contacts interface, then
client code that does care could still check ContactAttributeInterfaces
to distinguish those two cases, and client code that doesn't care
wouldn't have to mess around checking the list of interfaces it passes
to GetContactAttributes().
Comment 2 Simon McVittie 2010-03-29 05:33:15 UTC
I think Rob was in favour of it being this fascist, but I can't remember why...
Comment 3 Robert McQueen 2010-03-29 05:41:18 UTC
(In reply to comment #2)
> I think Rob was in favour of it being this fascist, but I can't remember why...

If so, I was wrong due to lack of any supporting rationale recorded, that any of us can remember, or that we can think of. I apologise, and give free leave to reduce fascism wherever possible in the interests of reducing roundtrips. The reason /may/ have been not being able to tell the difference between supported-but-not-known-for-this-contact versus not-supported. But for simple use cases, you don't care about this.
Comment 4 Simon McVittie 2010-03-29 05:54:48 UTC
review+, in that case. Considering this to have been specmeet-approved since most of the usual specmeet cabal have been involved.

Non-review-blocker:

> +                logger.debug("Ignoring unsupported interface " + interface)

logger.debug("Ignoring unsupported interface %s", interface) is conventional (if called with more than one argument, logger methods interpolate their arguments into the first one as if via %).
Comment 5 Will Thompson 2010-03-30 11:56:53 UTC
Spec and tp-glib bits merged; butterfly bit cloned as bug 27374.


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.