[Bug 48210] New: Could TpBaseChannel be more flexible?

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 2 21:12:42 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=48210

             Bug #: 48210
           Summary: Could TpBaseChannel be more flexible?
    Classification: Unclassified
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: jonny.lamb at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


I'm fixing up GabbleMucChannel to only appear on the bus when it's requested
(either locally or remotely), so requesting a MUC tube doesn't mean a MUC Text
channel appears and needs handling.

GabbleMucChannel is a TpBaseChannel subclass. To support this "disappearing and
reappearing" feature, some more functions will need to be added to
TpBaseChannel:

> void tp_base_channel_unregister (TpBaseChannel *chan);

This removes the channel from the bus. It does not emit Close and does not set
TpExportableChannel:channel-destroyed.

> void tp_base_channel_reset (TpBaseChannel *chan, TpHandle initiator,
>     gboolean requested);

This sets TpBaseChannel:requested and TpBaseChannel:initiator-{id,handle}.

So when the MUC channel is closed, but should remain open behind the scenes:

> tp_svc_channel_emit_closed (chan);
> tp_base_channel_unregister ((TpBaseChannel *) chan);

and when we want the channel to reappear:

> tp_base_channel_reset ((TpBaseChannel *) chan, initiator_handle, requested);
> tp_base_channel_register ((TpBaseChannel *) chan);
> /* notify the channel manager so it can _emit_new_channel */

However, this makes TpBaseChannel pretty easy to abuse and get wrong, like
removing the channel from the bus without emitting close or just changing
initiator/requested values randomly. As a result, I will accept a resolution of
WONTFIX and forcing me to make GabbleMucChannel stop using TpBaseChannel.

What do you think?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list