Bug 29778 - Port everything to TpBaseChannel and bin GabbleBaseChannel
Summary: Port everything to TpBaseChannel and bin GabbleBaseChannel
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Will Thompson
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard: review+
Keywords: patch
Depends on: 29795
Blocks: 29796
  Show dependency treegraph
 
Reported: 2010-08-24 07:34 UTC by Will Thompson
Modified: 2010-08-25 06:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2010-08-24 07:34:17 UTC
Hello.

Now bug 29375 is fixed and we have TpBaseChannel merged, we should bin GabbleBaseChannel (the former's precursor) and use TpBaseChannel throughout.
Comment 1 Will Thompson 2010-08-24 07:35:46 UTC
Mmm mmm, that's some GOOD branchin'.

I have no idea if the TLS channel still works. There are no tests for it.
Comment 2 Cosimo Cecchi 2010-08-24 07:48:22 UTC
(In reply to comment #1)

> I have no idea if the TLS channel still works. There are no tests for it.

Just tested with Empathy and it still seems to work fine.
Comment 3 Will Thompson 2010-08-25 03:20:33 UTC
The (new) top patch, “Use tp_base_channel_close() for search and tls channels”, depends on the branch on bug 29795.
Comment 4 Simon McVittie 2010-08-25 04:22:26 UTC
In the search channel:
> +  base_class->close = tp_base_channel_destroyed;

Do you mean tp_base_channel_close? (Not that it necessarily matters, since this channel doesn't respawn.)

Similarly, do you mean for gabble_server_tls_channel_close to call tp_base_channel_close?
Comment 5 Will Thompson 2010-08-25 05:14:38 UTC
(In reply to comment #4)
> In the search channel:
> > +  base_class->close = tp_base_channel_destroyed;
> 
> Do you mean tp_base_channel_close? (Not that it necessarily matters, since this
> channel doesn't respawn.)
> 
> Similarly, do you mean for gabble_server_tls_channel_close to call
> tp_base_channel_close?

No. tp_base_channel_close() calls the ->close() vfunc. The implementation of ->close(), as documented, has to ultimately call one of _destroyed() or _respawned(). Since SearchChannel's implementation of ->close() would just call _destroyed() immediately, I thought I'd just implement the former *as* the latter.
Comment 6 Will Thompson 2010-08-25 06:31:37 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > In the search channel:
> > > +  base_class->close = tp_base_channel_destroyed;
> > 
> > Do you mean tp_base_channel_close? (Not that it necessarily matters, since this
> > channel doesn't respawn.)
> > 
> > Similarly, do you mean for gabble_server_tls_channel_close to call
> > tp_base_channel_close?
> 
> No. tp_base_channel_close() calls the ->close() vfunc. The implementation of
> ->close(), as documented, has to ultimately call one of _destroyed() or
> _respawned(). Since SearchChannel's implementation of ->close() would just call
> _destroyed() immediately, I thought I'd just implement the former *as* the
> latter.

Here is a telepathy-glib patch which improves the documentation of this stuff, including giving this usage as an example: http://git.collabora.co.uk/?p=user/wjt/telepathy-glib.git;a=commitdiff;h=6bb9300ee4b961c77d0cbc78a07ae89a65d39343
Comment 7 Will Thompson 2010-08-25 06:39:06 UTC
14:30             smcv | wjt: ++ and also ++ for the gabble branch


commit b207801208f98c53e8e8a585fe19ffcbadc5f749
Merge: 1a476db 2e1a638
Author: Will Thompson <will.thompson@collabora.co.uk>
Date:   Wed Aug 25 14:38:04 2010 +0100

    Merge branch 'port-to-tp-base-channel'
    
    Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=29778>

 src/Makefile.am               |    2 -
 src/base-channel.c            |  472 -----------------------------------------
 src/base-channel.h            |   86 --------
 src/im-channel.c              |  183 ++++++----------
 src/im-channel.h              |    7 +-
 src/im-factory.c              |    3 +-
 src/muc-channel.c             |  358 ++++++++++++++-----------------
 src/muc-channel.h             |    6 +-
 src/roomlist-channel.c        |  152 ++++---------
 src/roomlist-channel.h        |    7 +-
 src/search-channel.c          |  165 +++++----------
 src/search-channel.h          |    8 +-
 src/search-manager.c          |    8 +-
 src/server-tls-channel.c      |  132 ++++--------
 src/server-tls-channel.h      |    9 +-
 src/server-tls-manager.c      |   10 +-
 tests/twisted/text/respawn.py |    8 +-
 17 files changed, 405 insertions(+), 1211 deletions(-)


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.