Invalid properties names
David Zeuthen
david at fubar.dk
Sun Sep 6 13:59:51 PDT 2009
On Sun, 2009-09-06 at 22:14 +0200, Davide Bettio wrote:
> Hi,
>
> > Out of interest, where in the spec did you see anything about property
> > names ?
> "Interface, signal, method, and property names are "WindowsStyleCaps", note
> that the first letter is capitalized, unlike Java."
> I think that we should respect this convention.
As I've already said: sure.
> http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
> Member names:
> "Must only contain the ASCII characters "[A-Z][a-z][0-9]_" and may not begin
> with a digit."
> I think that properties are members, so it should apply to properties too.
No, properties are not members. They are also nowhere mentioned in the
core D-Bus protocol. Instead, properties in D-Bus are implemented via
the org.freedesktop.DBus.Properties API, e.g. it's a higher-level
construct.
> > I didn't find that. It does forbid dashes in interface names,
> > signal names and method names, but property names are just strings as
> > far as the protocol is concerned.
>
> So "\nèòàò+---èù\n\n\aùù§§§\n\n\n))(" is a valid property name, right?
As long as it's valid UTF-8, yes, then it's valid. It's a pretty poor
name for a property though. Then again, in languages like Java you can
pretty much use any unicode character in your identifiers (with a couple
of caveats for the first character)....
David
More information about the devkit-devel
mailing list