[Telepathy] Automatic restart of the connection

Alberto Mardegan mardy at users.sourceforge.net
Tue Feb 10 04:16:07 PST 2009


Simon made this note about a patch I sent him for review:

====================
On Tue, 10 Feb 2009 at 09:45:48 +0200, Alberto Mardegan wrote:
 > > If the parameter can be updated on the fly, do it; otherwise, restart the
 > > connection.

Restarting the connection here directly contradicts telepathy-spec, in
which I wrote:

 > > If [DBus_Property], the change will be applied to the corresponding D-Bus
 > > Property on the active Connection if there is one;
 > > changes to other parameters will not take effect until the next time the
 > > account is disconnected and reconnected.
 > > |Migration tools that twiddle the settings of all accounts shouldn't
 > > |cause an automatic disconnect and reconnect, probably. I could be
 > > |persuaded otherwise, though. Or we could add a Reconnect() method.

I don't think having UpdateParameters cause immediate reconnection
is necessarily appropriate - if a UI wants that behaviour, it can go
offline/online itself, and if it doesn't, it can refrain from doing so.
We could add a Reconnect() method that would disconnect then go back to the
previous state, if that would help?

     Simon
====================

The reason why I changed my mind (I also initially thought that the client 
should reconnect the account if it wants to) is that the client might not have a 
TpConnectionManager instance and therefore might not have access to the protocol 
parameters description. So, it couldn't know whether a parameter is a 
dbus_property (in which case it has nothing to do) or if it's not (in which case 
it must restart the connection).

Another possibility would be to have UpdateParameters return a boolean to 
indicate whether the change immediately took effect or if the connection needs 
to be restarted (but this would imply some API breaks).

Ciao,
   Alberto

-- 
http://www.mardy.it <-- Geek in un lingua international!


More information about the telepathy mailing list