After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626179 - Re-implement capabilities support
Re-implement capabilities support
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: Future
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 634006
 
 
Reported: 2010-08-06 10:10 UTC by Philip Withnall
Modified: 2010-11-04 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Withnall 2010-08-06 10:10:42 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.
Comment 1 Philip Withnall 2010-08-06 10:11:08 UTC
Bug #626162 has a FIXME which depends on this.
Comment 2 Philip Withnall 2010-09-06 13:12:57 UTC
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.
Comment 3 Philip Withnall 2010-09-13 13:52:16 UTC
(Mass changing milestones; please search for this phrase to delete the bug spam.)
Comment 4 Travis Reitter 2010-09-30 15:58:02 UTC
Implementation detail: we'll need to expand the ContactFeature arrays where they show up in tpf-persona-store.vala to include the CAPABILITIES flag.
Comment 5 Felix Kaser 2010-09-30 16:35:31 UTC
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
Comment 6 Travis Reitter 2010-10-01 19:37:01 UTC
(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).
Comment 7 Travis Reitter 2010-10-19 15:21:08 UTC
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).
Comment 8 Philip Withnall 2010-10-20 18:42:39 UTC
(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. :-)
Comment 9 Travis Reitter 2010-11-04 17:07:33 UTC
(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.
Comment 10 Travis Reitter 2010-11-04 17:08:10 UTC
Since I've cloned the Persona/Individual part of this as bgo#634006, I'm closing this one.