Re: [Telepathy] Telepathy/Empathy improvements for Gnome Shell

On Thu, 11 Nov 2010 at 22:15:30 +0000, Will Thompson wrote:
> • Document that one handler can call HandleChannels() on another to
> transfer the channel, and add helper API to TpBaseClient to make it
> easy and do the Client.Handler.HandledChannels bookkeeping;

The reason we haven't done this is that it needs extra API on
Mission Control too - otherwise, if handler A exits or crashes, MC will
close the channel from its crash-recovery code, not knowing that handler B
has taken over.

I realise this isn't necessarily a concern for the case where handler A is the
Shell, since if that exits or crashes, your session is probably already over...
but I'd rather not document the usage that Will suggests if only the shell can
safely use it, and it seems as though it might also be reasonable for the Shell
to respawn after crashes, if it's able to recover reasonably well.

(Windows Explorer respawns after crashes. Mission Control doesn't automatically
respawn until something interacts with it, but Empathy and other "major"
Telepathy apps can use tp_account_manager_enable_restart() to act as a
watchdog for it, and when it does respawn, MC automatically recovers its

It wouldn't be rocket science to add the required API; I'd personally do it as
something like

    ChannelDispatcher.GiveBack(o: Account, ao: Channels,
        x: User_Action_Time, s: Next_Handler, a{sv}: Hints) -> nothing

and have MC call HandleChannels on the new handler(s) itself, then return
success or error from GiveBack.

As an alternative, it could be a signal on Handler telling MC what we've done,
but that doesn't detect the "your MC is too old for this to work" case, and
requires the Handler to do slightly more work.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]