GNOME Bugzilla – Bug 599164
Should use ContactCapability to get FT caps
Last modified: 2010-01-14 13:56:51 UTC
Empathy should use the new ContactCapability API to check if contacts are able to receive files.
This is blocked by Salut not implementing the ContactCapability stable API: https://bugs.freedesktop.org/show_bug.cgi?id=24653
Created attachment 151340 [details] [review] http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/ft-caps-599164 libempathy/empathy-tp-contact-factory.c | 129 ++++++++++++++++++++++++++++--- 1 files changed, 119 insertions(+), 10 deletions(-)
Review of attachment 151340 [details] [review]: The code itself looks fine, but I think you should try to factor out the parsing of the ContactCapabilities hash table together with the parsing of the RequestableChannelClasses in get_requestable_channel_classes_cb() (the tp-spec actively encourages this). Also, in the same callback, it's probably useless to cycle through the classes if the connection supports ContactCapabilities (the cycle seems to be used only to set priv->can_request_ft and priv->can_request_st which are unused if ContactCapabilities are supported).
(In reply to comment #3) > Review of attachment 151340 [details] [review]: > > The code itself looks fine, but I think you should try to factor out the > parsing of the ContactCapabilities hash table together with the parsing of the > RequestableChannelClasses in get_requestable_channel_classes_cb() (the tp-spec > actively encourages this). Good point! Done. > Also, in the same callback, it's probably useless to cycle through the classes > if the connection supports ContactCapabilities (the cycle seems to be used only > to set priv->can_request_ft and priv->can_request_st which are unused if > ContactCapabilities are supported). Indeed. Actually we don't need to request the channel classes at all. I've done these changes in my branch fixing bug #599163 as well which is a super set of the branch you reviewed. This saves me lot of conflicts. http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/av-caps-599163
The branch looks good to me.
Awesome; thanks a lot. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.