[Gossip-dev] Re: [Telepathy] GossipProtocol problems

Martyn Russell martyn at imendio.com
Mon Oct 16 11:36:16 CEST 2006


Mikael Hallendal wrote:
> Xavier Claessens wrote:
> 
> Hi,
> 
>> Le dimanche 15 octobre 2006 à 02:07 +0100, Simon McVittie a écrit :
>>> On Sat, 14 Oct 2006 at 22:20:43 +0200, Xavier Claessens wrote:
>>>> 3) _register_[account,cancel]: doesn't have an equivalent in telepathy.
>>>> As I understand teleapthy, accounts have a "register" parameter, is it's
>>>> set to TRUE we connecting this account, telepathy will automatically
>>>> register the account.
>>> Yes. However, you can't rely on this working, even for XMPP (Google
>>> Talk only accepts registrations over the web, I believe) and other
>>> protocols might not be able to do in-band registrations at all.
> 
> Isn't there a way to ask the server before trying whether it's
> supported? If not, I guess we could at least make it so that protocols
> we know for sure don't support it doesn't show us that option in the UI
> and for others (XMPP) we try and if that doesn't work we show an error.

Yes. You can request a list of capabilities from the server using disco 
requests and it should tell you if they support the jabber:iq:register 
namespace (I think it is) and if so, you can register.

I would be surprised if Gabble supports capability discovery yet.

>>>> 4) _is_valid_username, _get_example_username, _get_default_server and
>>>> _get_default_port: doesn't seems to have an equivalent in telepathy...
>>>> maybe it should be added to the specification ?
>>> The default for anything that has a sensible default can be found in
>>> ConnectionManager.GetParameters(). Sample values are mentioned in your
>>> previous mail to the Telepathy list and the replies to it, but I'll repeat
>>> for the benefit of other Gossip people: we don't have that functionality,
>>> but perhaps we should.
>>>
>>> Validating parameters as best we can before actually attempting
>>> registration would perhaps be a nice thing to add too. (I assume you're
>>> looking for "live" validation as the user types in parameters?)
>> Yeah would be nice to add a method which gets in argument a dictionary
>> with all parameters/values and checks if values are correct, then return
>> a dictionary with incorrect parameters/default-value (or
>> corrected-value ?)
> 
> As for some of the validation, I don't see a huge problem of having it
> in Gossip. Gossip will know what backends it supports anyway and having
> implementing some of these (preferably not default server/port) would be
> okay to do within the Gossip code.

We definitely need translated parameter naming so it is user friendly 
(i.e. instead of "old-ssl").

We also would need default/example parameters for usernames/ports, etc. 
I think having no value is less informative and it doesn't harm to have 
it. We also make use of the example username in the username field 
(where it would apply on a per protocol basis of course) and select it 
so that users have a clue as to the format of the username.

Most importantly we would need a method to validate parameters in real time.

All of this probably fits into the spec that Telepathy is going to be 
designing for the mission control application.

-- 
Regards,
Martyn


More information about the Gossip-dev mailing list