[Telepathy] RFC: tighten definition of CM name and protocol name

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Nov 20 02:57:14 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At the moment the spec and our libraries make no particular assertion about the
contents of the "identifier for the connection manager" seen in
/org/freedesktop/Telepathy/ConnectionManager/<identifier> and
/org/freedesktop/Telepathy/Connection/<identifier>/<protocol>/<account>
(and the corresponding bus names), or the protocol name seen in the
second of those object paths and in the ConnectionManager API (although some
well-known protocol names are suggested).

Typical values for the identifier and protocol are things like
("gabble", "xmpp"), ("idle", "irc") and ("salut", "local-xmpp").

I propose that we tighten the definition of these strings so they must contain
only letters, digits and the ASCII hyphen/minus sign (which must be replaced
with an underscore by the libraries when used in an object path or bus
name).

Alternatively, we could restrict to letters, digits and underscores,
with "-" replaced by "_" by the libraries for backwards-compatibility.
This would require us to rename "local-xmpp" to "local_xmpp", though.

At the moment telepathy-glib escapes these strings using
tp_escape_as_identifier (basically URI-escaping with _ instead of % and
a smaller allowed set), so local-xmpp shows up in the object paths and
bus names as local_2dxmpp, which looks a bit stupid, and means we can't
meaningfully search for connections that come from a particular CM or
protocol.

    Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFHQr2KWSc8zVUw7HYRAh1LAKDFfE0DXHT3JZ7nl/SSvHFSAsIInwCgmgj+
+aUU5zFlwKvodYxDlsO0nKo=
=8qXF
-----END PGP SIGNATURE-----


More information about the Telepathy mailing list