Bug 48506 - Add tp_capabilities_supports_text_sms()
Summary: Add tp_capabilities_supports_text_sms()
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
Whiteboard: review+
Keywords: patch
Depends on:
Reported: 2012-04-10 07:23 UTC by Guillaume Desmottes
Modified: 2012-04-16 06:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Add tp_capabilities_supports_sms() (6.86 KB, patch)
2012-04-10 08:01 UTC, Guillaume Desmottes
Details | Splinter Review
Add tp_capabilities_supports_sms() (8.70 KB, patch)
2012-04-16 05:53 UTC, Guillaume Desmottes
Details | Splinter Review

Description Guillaume Desmottes 2012-04-10 07:23:45 UTC
I managed to replace all the code manually inspecting contact channel classes by tp_capabilities_ calls. The last remaining bit is to check if SMS are supported.
Comment 1 Guillaume Desmottes 2012-04-10 08:01:21 UTC
Created attachment 59735 [details] [review]
Add tp_capabilities_supports_sms()
Comment 2 Xavier Claessens 2012-04-16 05:12:55 UTC
It should verify that fixed does not contain any other keys. But others functions does not do that neither anyway.
Comment 3 Simon McVittie 2012-04-16 05:16:23 UTC
13:11 < smcv> cassidy: as usual for these functions, this one will wrongly say 
              "yes" if there are other fixed properties
13:13 < smcv> cassidy: it should be: is there a class with type = text, htype = 
              contact, either SMS allowed or fixed to true, and nothing else 

In addition to what Xavier said, this would fail on Fixed = { type = Text, htype = Contact }, Allowed = [ SMS ] - which I think is what makes most sense as a way to represent boolean options like this, unless/until those options have non-trivial interactions with each other.
Comment 4 Guillaume Desmottes 2012-04-16 05:53:01 UTC
Created attachment 60061 [details] [review]
Add tp_capabilities_supports_sms()
Comment 5 Simon McVittie 2012-04-16 06:14:29 UTC
(In reply to comment #4)
> Add tp_capabilities_supports_sms()

Yes, this looks right. r+
Comment 6 Guillaume Desmottes 2012-04-16 06:17:41 UTC
Merged to master for 0.19.0.

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.