From d4ecacb28ebd71d836179d9bc86c61202c2613c6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 25 May 2011 17:59:07 +0100 Subject: [PATCH 3/8] Define single complete types in the overview of the type system --- doc/dbus-specification.xml | 69 +++++++++++++++++++++++++------------------- 1 files changed, 39 insertions(+), 30 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 65a6686..be25a13 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -279,13 +279,50 @@ The D-Bus protocol does not include type tags in the marshaled data; a block of marshaled values must have a known type - signature. The type signature is made up of type - codes. A type code is an ASCII character representing the + signature. The type signature is made up of zero or more + single complete + types, each made up of one or more + type codes. + + + + A type code is an ASCII character representing the type of a value. Because ASCII characters are used, the type signature will always form a valid ASCII string. A simple string compare determines whether two type signatures are equivalent. + + A single complete type is a sequence of type codes that fully describes + one type: either a basic type, or a single fully-described container type. + A single complete type is a basic type code, a variant type code, + an array with its element type, or a struct with its fields (all of which + are defined below). So the following signatures are not single complete + types: + + "aa" + + + "(ii" + + + "ii)" + + And the following signatures contain multiple complete types: + + "ii" + + + "aiai" + + + "(ii)(ii)" + + Note however that a single complete type may contain + multiple other single complete types, by containing a struct or dict + entry. + + Basic types @@ -369,34 +406,6 @@ - The phrase single complete type deserves some - definition. A single complete type is a basic type code, a variant type code, - an array with its element type, or a struct with its fields. - So the following signatures are not single complete types: - - "aa" - - - "(ii" - - - "ii)" - - And the following signatures contain multiple complete types: - - "ii" - - - "aiai" - - - "(ii)(ii)" - - Note however that a single complete type may contain - multiple other single complete types. - - - VARIANT has ASCII character 'v' as its type code. A marshaled value of type VARIANT will have the signature of a single complete type as part of the value. This signature will be followed by a -- 1.7.5.4