GNOME Bugzilla – Bug 626179
Re-implement capabilities support
Last modified: 2010-11-04 17:08:10 UTC
We need to come up with a better capabilities interface and re-implement it in libfolks so that the capabilities code can be ripped out of Empathy.
Bug #626162 has a FIXME which depends on this.
Here are the capabilities which were allowed: • AUDIO • VIDEO = 1 << 1, • FILE_TRANSFER • STREAM_TUBE I think the best solution is to probably add them as methods on the appropriate interface(s). For example, AUDIO and VIDEO would become: bool IMable.can_do_audio_calls () bool IMable.can_do_video_calls () I think there might be a case for exposing FILE_TRANSFER and STREAM_TUBE as methods on interfaces of their own (e.g. FileTransferable and Tubeable interfaces), but they could quite easily be methods on IMable for the time being.
(Mass changing milestones; please search for this phrase to delete the bug spam.)
Implementation detail: we'll need to expand the ContactFeature arrays where they show up in tpf-persona-store.vala to include the CAPABILITIES flag.
this simple one liner did the trick for me. I can now do something like this: capabilities = tp_contact_get_capabilities (contact_from_folks); if (tp_capabilities_supports_stream_tubes (capabilities, ...) ) foo here is the one liner branch: http://git.collabora.co.uk/?p=user/kaserf/folks.git;a=shortlog;h=refs/heads/support-tp-capabilities
(In reply to comment #5) > this simple one liner did the trick for me. I can now do something like this: > > capabilities = tp_contact_get_capabilities (contact_from_folks); > if (tp_capabilities_supports_stream_tubes (capabilities, ...) ) > foo > > > here is the one liner branch: > http://git.collabora.co.uk/?p=user/kaserf/folks.git;a=shortlog;h=refs/heads/support-tp-capabilities This is included in the 0.3.0 release now (though I haven't finished the actual capabilities interface yet, so it isn't).
In terms of roadmap, I've merged PersonaStore capabilities, but will be punting Persona/Individual capabilities for the time being. Persona/Individual capabilities were shaping up to just be limited abstractions of TpContact (in which case it's probably best for the application to just access the TpContacts of the Tpf.Personas).
(In reply to comment #7) > In terms of roadmap, I've merged PersonaStore capabilities, but will be punting > Persona/Individual capabilities for the time being. > > Persona/Individual capabilities were shaping up to just be limited abstractions > of TpContact (in which case it's probably best for the application to just > access the TpContacts of the Tpf.Personas). True, but I don't like the idea of adding a dependency on folks-telepathy to $future_desktop_wide_contacts_application just so that it can display webcam icons for each contact. That's a bridge we can cross when we come to it. :-)
(In reply to comment #8) > (In reply to comment #7) > > In terms of roadmap, I've merged PersonaStore capabilities, but will be punting > > Persona/Individual capabilities for the time being. > > > > Persona/Individual capabilities were shaping up to just be limited abstractions > > of TpContact (in which case it's probably best for the application to just > > access the TpContacts of the Tpf.Personas). > > True, but I don't like the idea of adding a dependency on folks-telepathy to > $future_desktop_wide_contacts_application just so that it can display webcam > icons for each contact. That's a bridge we can cross when we come to it. :-) Assuming the webcam icons open an audio or video channel (through Telepathy), I don't see this as being a real problem. I couldn't come up with great reasons why you'd want to display a capability without providing an action for it.
Since I've cloned the Persona/Individual part of this as bgo#634006, I'm closing this one.