[Telepathy] Connection manager parameters that are D-Bus properties
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Jan 19 05:05:28 PST 2009
In telepathy-spec 0.17.16 we added the DBus_Property flag which
indicates that a connection manager parameter is also a D-Bus property
on the Connection. This means the Account Manager can respond to changes to
that property in a "live" way, by setting the property on the Connection
at the same time that it changes the stored Account parameter.
The intended usage was that we could replace Gabble's 'nickname' CM parameter
with "org.freedesktop.Connection.Interface.Nicknames.SelfNickname", for
instance; this would mean that nickname changes take effect immediately, and
are also stored in the Account for future connections.
However, .manager files have the syntax of Desktop Entry files, and
their keys do not officially allow dots:
On Fri, 16 Jan 2009 at 15:57:37 -0300, Andre Moreira Magalhaes wrote:
> I checked this and the thing is, I implemented the key validation as
> described in
> http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
> that states:
>
> Only the characters |A-Za-z0-9-| may be used in key names.
>
> Should I change this to also accept "." or change the spurious file?
The other character allowed in interface/member names but not in key
files is the underscore.
We have already defined parameters containing "-", so we can't define an
escape syntax like "-FF in a .manager file means the single character \xFF"
without breaking backwards compatibility.
I see three options:
* Extend the .manager file syntax to allow "." and "_" in key names
This means consumers of .manager files might not be able to use a
generic .desktop file parser. However, GKeyFile already allows ".",
"_" and "@" as extensions, KConfigIniBackend allows anything except
"=" (and interprets backslash escapes!), and we're writing our own KeyFile
class for telepathy-qt4 (to avoid a kdelibs dependency) so we can apply
whatever extensions we want there. So, this is probably the easiest solution.
* Disallow D-Bus properties containing "_" from being CM parameters,
and define the D-Bus property "inter.face.Member" to be written as
"inter-face-Member" when used as a CM parameter (both on D-Bus and in
the .manager file)
This is ugly.
* Define some as-yet unused character, maybe X, to start a hex escape:
the CM parameter "inter.face.Member" would be used as
"inter.face.Member" on D-Bus, but written "interX2efaceX2eMember" in
the .manager file.
This is tremendously ugly (particularly if you have something like
Channel.Type.X11Tunnel, which would become ChannelX2eTypeX2eX5811Tunnel
in .manager files) and requires changes to telepathy-glib as well as
telepathy-qt4.
Thoughts? For the moment I'll ask Andre to extend the telepathy-qt4
KeyFile class to accept the same extensions as GKeyFile.
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20090119/e42571f2/attachment.pgp
More information about the Telepathy
mailing list