From: Simon McVittie Date: Wed, 25 May 2011 16:59:07 +0000 (+0100) Subject: Define single complete types in the overview of the type system X-Git-Tag: dbus-1.7.0~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7461c704b9041da2e99decbccc59c2c1e58716d1;p=thirdparty%2Fdbus.git 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 --- diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 3828db7fb..055976198 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 @@ -384,34 +421,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