Bug 48506

Summary: Add tp_capabilities_supports_text_sms()
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium CC: guillaume.desmottes
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard: review+
i915 platform: i915 features:
Attachments: Add tp_capabilities_supports_sms()
Add tp_capabilities_supports_sms()

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 
              fixed?

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.