From 1909039b191f0ac1c1fa2aeb9b9053b921471f1b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 17 May 2011 17:10:36 +0100 Subject: [PATCH 8/9] Describe best practices for property names, and recommend against dash-separated-words Related to whose conclusion seemed to be that anything is allowed, but CamelCase is considerably more interoperable. --- doc/dbus-specification.xml | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 86e2b9b..88360af 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -3067,6 +3067,22 @@ + It is conventional to give D-Bus properties names consisting of + capitalized words without punctuation ("CamelCase"), like + member names. + For instance, the GObject property + connection-status or the Qt property + connectionStatus could be represented on D-Bus + as ConnectionStatus. + + + Strictly speaking, D-Bus property names are not required to follow + the same naming restrictions as member names, but D-Bus property + names that would not be valid member names (in particular, + GObject-style dash-separated property names) can cause interoperability + problems and should be avoided. + + The available properties and whether they are writable can be determined by calling org.freedesktop.DBus.Introspectable.Introspect, see . -- 1.7.5.1