Bug 19683 - Refactor Capabilities/ContactCapabilities to make sense
Summary: Refactor Capabilities/ContactCapabilities to make sense
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords:
Depends on:
Blocks: 22934 23492
  Show dependency treegraph
 
Reported: 2009-01-22 04:03 UTC by Guillaume Desmottes
Modified: 2009-09-08 05:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2009-01-22 04:03:41 UTC
Lot of components access, modify, create and destroy the GabblePresence->per_channel_manager_caps hash table which is not very OO friendly.

We should refactor code to add accessors and do that properly.
Comment 1 Simon McVittie 2009-08-24 13:29:20 UTC
Will and I have refactored Capabilities extensively. Review would be appreciated.
Comment 2 Alban Crequy 2009-09-04 11:30:13 UTC
(In reply to comment #1)
> Will and I have refactored Capabilities extensively. Review would be
> appreciated.

I have only a few comments after such a big branch :-)


src/ft-channel.c
+      /* FIXME: should we check for SI, bytestreams and/or IBB too? */
--> Reply to the question or open a bug for that.

src/capabilities.c
gsize feature_handles_refcount = 0;
--> What isn't it static?

src/presence.c
  if (priv->cap_set == NULL)
    { 
      tmp = gabble_capability_set_dump (priv->cap_set, "  ");
--> do you mean '!=' instead of '==' ?  (2 occurences of this pattern in this file)

Comment 3 Simon McVittie 2009-09-07 08:08:03 UTC
(In reply to comment #2)
> src/ft-channel.c
> +      /* FIXME: should we check for SI, bytestreams and/or IBB too? */
> --> Reply to the question or open a bug for that.

I'll open a bug, unless Guillaume can insta-answer it...

> src/capabilities.c
> gsize feature_handles_refcount = 0;
> --> What isn't it static?

A very good question. It should be.

> src/presence.c
>   if (priv->cap_set == NULL)
>     { 
>       tmp = gabble_capability_set_dump (priv->cap_set, "  ");
> --> do you mean '!=' instead of '==' ?  (2 occurences of this pattern in this
> file)

Yes, you're right.
Comment 4 Simon McVittie 2009-09-07 08:24:58 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > src/ft-channel.c
> > +      /* FIXME: should we check for SI, bytestreams and/or IBB too? */
> > --> Reply to the question or open a bug for that.
> 
> I'll open a bug, unless Guillaume can insta-answer it...

Bug #23777.

> > src/capabilities.c
> > gsize feature_handles_refcount = 0;
> > --> What isn't it static?
> A very good question. It should be.

Fixed in the branch; make check is re-running now.

(en_FR check: "Why" should have been "What" in your review comment :-)

> > src/presence.c
> [...]
> Yes, you're right.

Fixed in the branch; make check is re-running now.
Comment 5 Alban Crequy 2009-09-07 10:52:00 UTC
The branch is ok for me
Comment 6 Simon McVittie 2009-09-08 05:30:02 UTC
Merged to git master, will be in 0.9.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.