"id" account param and property
Xavier Claessens <[email protected]> Sat, 06 Jan 2007 17:13:30 +0100
| Newsgroups | gmane.comp.gnome.gossip.devel |
|---|---|
| Message-ID | <1168100010.5329.24.camel@zdra-desktop> |
Hi all, It seems gossip is a bit confused. There is 2 different "id" for an account, a static property and a dynamic parameter. We shouldn't mix them up, here is what is the meaning of each: 1) The "id" property is static, we can assume it's not NULL and different for all account of a given protocol. We can have a jabber account with [email protected] and an MSN account with the same ID, but not 2 accounts with the same ID for the same protocol. So the pair protocol+account_id_property is unique. The "id" property should be set by the backend *after* the account is connected ! For link-local accounts we get an id after the account is connected using telepathy branch (am I wrong here ?). So this shouldn't be used for connecting the account, the backend should take the "id" parameter to connect. In most cases (jabber, msn) the backend will set account's id property to the same value than the account parameter once the account is connected. 2) The "id" account parameter is dynamic, we can't assume it's not NULL, we can't even assume it exists (link local doesn't have an account ID). It's used by many protocols to connect the account, but not always. Telepathy spec says this parameter should be named "account" and not "id" as gossip does atm, I think we should change that to be less confusing. In both cases we can't assume "id" is structured like "user@server/resource". I know the distinction is useless for the jabber backend, the "id" property and parameter will always be the same, but that's important when using telepathy backend with link-local protocols. So I think the jabber backend should also follow those rules to not be confusing. I'll try to fix places where gossip uses the wrong "id". Xavier Claessens. _______________________________________________ Gossip-dev mailing list [email protected] http://lists.imendio.com/mailman/listinfo/gossip-dev
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBFn8qq6dEBUn2qPAMRAjfGAJ9aKM8EE8EPcAN8RUWANA8OSy+9sQCaArOg xoku1s5Mv5CDGQL6vblFAcw= =J8yH -----END PGP SIGNATURE-----