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. --- test/data/valid-messages/recursive-types.message | 65 ++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/data/valid-messages/recursive-types.message (limited to 'test/data/valid-messages/recursive-types.message') diff --git a/test/data/valid-messages/recursive-types.message b/test/data/valid-messages/recursive-types.message new file mode 100644 index 00000000..b7608041 --- /dev/null +++ b/test/data/valid-messages/recursive-types.message @@ -0,0 +1,65 @@ +## Message with recursive types + +## VALID_HEADER includes a LENGTH Header and LENGTH Body +VALID_HEADER + +FIELD_NAME name +TYPE STRING +STRING 'org.freedesktop.Foo' + +END_LENGTH Header +START_LENGTH Body + +TYPE ARRAY +TYPE ARRAY +LENGTH Array1 +START_LENGTH Array1 + + +TYPE UINT32 +UINT32_ARRAY { 1, 2, 3, 4, 5} + + +TYPE STRING +STRING_ARRAY { 'a', 'string', 'array'} + + +TYPE DICT +LENGTH Array2 +START_LENGTH Array2 + +LENGTH Dict1 +START_LENGTH Dict1 +STRING 'uint32' +TYPE UINT32 +UINT32 1234 +STRING uint32' +TYPE INT32 +INT32 1234 +END_LENGTH Dict1 + +LENGTH Dict2 +START_LENGTH Dict2 + +STRING 'dict' +TYPE DICT +LENGTH Dict3 +START_LENGTH Dict3 +STRING 'double-array' +TYPE ARRAY +TYPE DOUBLE +DOUBLE_ARRAY {1.0, 2.0, 3.0} +STRING 'boolean' +TYPE BOOLEAN +BOOLEAN false +END_LENGTH Dict3 + +END_LENGTH Dict2 + +END_LENGTH Array2 + + +END_LENGTH Array1 + + +END_LENGTH Body -- cgit