From 7461c704b9041da2e99decbccc59c2c1e58716d1 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 25 May 2011 17:59:07 +0100 Subject: [PATCH] Define single complete types in the overview of the type system Reviewed-by: Will Thompson Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38252 --- doc/dbus-specification.xml | 69 ++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 3828db7..0559761 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -295,13 +295,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 @@ -385,34 +422,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 -- 2.7.4