From c5020ac870c5990a36c3576453cc23431213e8bf Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 8 Apr 2003 15:52:51 +0000 Subject: 2003-04-08 Alexander Larsson Implemented recursive types, named types and new-style iters * bus/driver.c: * glib/test-thread-client.c: (thread_func): * glib/test-thread-server.c: (handle_test_message): * test/test-service.c: (handle_echo): Update to new api * dbus/Makefile.am: * dbus/dbus-dict.c: * dbus/dbus-dict.h: * dbus/dbus.h Remove DBusDict * dbus/dbus-internals.c: (_dbus_type_to_string): Update for new types. * dbus/dbus-marshal.[ch]: Implement recursive types and the new marshalling format. Remove hardcoded dict marshalling. Marshal named types. * dbus/dbus-message-builder.c: Add BYTE_ARRAY. Remove references to old types * dbus/dbus-message.[ch]: New non-refcounted iter API that supports recursive iters. Use iters for appending, including support for recursive iters. Add byte and named type support. Update everything to new marshalling formats. Add tests for new API. * dbus/dbus-protocol.h: Remove old array types. Add types: BYTE, ARRAY, DICT, NAMED * dbus/dbus-string.c: * dbus/dbus-sysdeps.c: Make parse_double locale safe. * dbus/dbus-test-main.c: Call setlocale. * dbus/dbus-test.c: Kill dict test * doc/dbus-specification.sgml: Update spec * test/data/incomplete-messages/missing-body.message: * test/data/invalid-messages/bad-boolean.message: * test/data/invalid-messages/bad-boolean-array.message: * test/data/invalid-messages/boolean-array-length-too-long.message-raw: * test/data/invalid-messages/boolean-has-no-value.message-raw: * test/data/invalid-messages/too-short-dict.message: * test/data/valid-messages/dict-simple.message: * test/data/valid-messages/dict.message: * test/data/valid-messages/emptiness.message: * test/data/valid-messages/lots-of-arguments.message: * test/data/valid-messages/no-padding.message: * test/data/valid-messages/recursive-types.message: Add missing NAME fields Fix up dicts & arrays * test/data/invalid-messages/dict-with-nil-value.message: Removed, this is not invalid anymore. * test/data/valid-messages/recursive-types.message: Add new test for deeply recursive types. --- doc/dbus-specification.sgml | 89 ++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 50 deletions(-) (limited to 'doc') diff --git a/doc/dbus-specification.sgml b/doc/dbus-specification.sgml index 3bd49ac4..200ef430 100644 --- a/doc/dbus-specification.sgml +++ b/doc/dbus-specification.sgml @@ -305,49 +305,41 @@ 1 Marks an "unset" or "nonexistent" argument - BOOLEAN + BYTE 2 + 8-bit unsigned integer. + + BOOLEAN + 3 Boolean value, 0 is FALSE and 1 is TRUE. Everything else is invalid. INT32 - 3 + 4 32-bit signed integer UINT32 - 4 + 5 32-bit unsigned integer DOUBLE - 5 + 6 IEEE 754 double STRING - 6 - UTF-8 string (must be valid UTF-8) - - BOOLEAN_ARRAY - 7 - Array of BOOLEAN - - INT32_ARRAY - 6 - Array of INT32 - - UINT32_ARRAY 7 - Array of UINT32 - - DOUBLE_ARRAY - 8 - Array of DOUBLE + UTF-8 string (must be valid UTF-8). Must be zero terminated. - BYTE_ARRAY + NAMED + 8 + A named byte array, used for custom types + + ARRAY 9 - Array of bytes + Array - STRING_ARRAY + DICT 10 - Array of STRING + A dictionary of key/value pairs @@ -371,6 +363,12 @@ NIL No data is encoded; the type code is followed immediately by the type code of the next argument. + + BYTE + a byte. + + BOOLEAN + a byte, with valid values 0 and 1. INT32 32-bit signed integer in the message's byte order, aligned to 4-byte boundary. @@ -388,35 +386,26 @@ byte. - INT32_ARRAY - UINT32 giving the number of values in the array, - followed by the given number of INT32 values. - - - UINT32_ARRAY - UINT32 giving the number of values in the array, - followed by the given number of UINT32 values. - - - DOUBLE_ARRAY - UINT32 giving the number of values in the array, - followed by the given number of DOUBLE values aligned - to 8-byte boundary. - - - BYTE_ARRAY - UINT32 giving the number of values in the array, - followed by the given number of one-byte values. + NAMED + A string (encoded as the STRING type above) giving the + name of the type followed by an UINT32 aligned to 4-byte boundary + indicating the data length in bytes, followed by the data. - STRING_ARRAY - UINT32 giving the number of values in the array, - followed by the given number of STRING values. + ARRAY + a byte giving the element type of the array followed + by an UINT32 (aligned to 4 bytes) giving the length of the + array data in bytes. This is then followed by a number of + entires with the same type, encoded like that type normally + would be encoded alone. - DICT - STRING_ARRAY with the keys, followed by the given - number of values encoded as type code as a byte followed by the encoded value. + DICT + UINT32 giving the length of the dictionary data in bytes. + This is followed by a number of keyname/value pairs, where the + keyname is encoded as a STRING above, and the value is encoded + as a byte with typecode and how that type normally would be encoded + alone. -- cgit