From 9eb8980559d59dbc43106be0b812d92b885b9f5d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 9 Feb 2015 18:15:46 +0000 Subject: [PATCH 2/2] fixup! doc: Add a guide to designing D-Bus APIs --- Notes: Various minor typo fixes. doc/dbus-api-design.duck | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/dbus-api-design.duck b/doc/dbus-api-design.duck index 9430d4e..be3ea9f 100644 --- a/doc/dbus-api-design.duck +++ b/doc/dbus-api-design.duck @@ -61,7 +61,7 @@ specification), and is supported by tools such as $cmd(gdbus-codegen). Interface files for public API should be installed to $code($var($$(datadir$))/dbus-1/interfaces) so that other services can load -them. Private APIs should not be installed There should be one file installed +them. Private APIs should not be installed. There should be one file installed per D-Bus interface, named after the interface, containing a single top-level $code() element with a single $code() beneath it. For example, interface $code(com.example.MyService1.Manager) would be described by file @@ -228,13 +228,15 @@ Transmitting values as integers means string parsing and matching can be avoided, the messages are more compact, and typos can be more easily avoided by developers (if, for example, C enums are used in the implementation). -Transmissing values as strings means additional values can be defined by third -parties without fear of conflicting over integer values. +Transmitting values as strings means additional values can be defined by third +parties without fear of conflicting over integer values; for instance by using +the same reverse-domain-name namespacing as D-Bus interfaces. In both cases, the interface documentation should describe the meaning of each value. It should state whether the type can be extended in future and, if so, how the service and client should handle unrecognized values — typically by -considering them equal to a ‘unknown’ or ‘failure’ value. +considering them equal to an ‘unknown’ or ‘failure’ value. Conventionally, zero +is used as the ‘unknown’ value. [example] For example, instead of: -- 1.9.3