dbus/dbus dbus-glib.h, 1.4, 1.5 dbus-marshal-validate.c, 1.12,
1.13 dbus-object-tree.c, 1.10, 1.11 dbus-protocol.h, 1.38, 1.39
Havoc Pennington
hp at freedesktop.org
Sat Jan 29 21:18:46 PST 2005
Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv13826/dbus
Modified Files:
dbus-glib.h dbus-marshal-validate.c dbus-object-tree.c
dbus-protocol.h
Log Message:
2005-01-30 Havoc Pennington <hp at redhat.com>
dbus-viewer introspected and displayed the bus driver
* dbus/dbus-object-tree.c
(object_tree_test_iteration): add tests for a handler registered on "/"
* dbus/dbus-object-tree.c
(_dbus_decompose_path): fix to handle path "/" properly
(run_decompose_tests): add tests for path decomposition
* glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
properly
* glib/dbus-gobject.c (handle_introspect): fix quotes
* test/glib/run-test.sh: support launching the bus, then running
dbus-viewer
* test/glib/test-service-glib.c (main): put in a trivial gobject
subclass and register it on the connection
* bus/driver.c (bus_driver_handle_introspect): implement
introspection of the bus driver service
* dbus/dbus-protocol.h: add #defines for the XML namespace,
identifiers, doctype decl
* bus/driver.c (bus_driver_handle_get_service_owner): handle
attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
returning the service unchanged.
(bus_driver_handle_message): remove old check for reply_serial in
method calls, now the message type deals with that
(bus_driver_handle_message): handle NULL interface
* glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
* glib/dbus-gloader-expat.c (description_load_from_string): allow
-1 for len
* tools/dbus-viewer.c: add support for introspecting a service on
a bus
* glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
(dbus_g_pending_call_unref): add
Index: dbus-glib.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-glib.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dbus-glib.h 18 Jan 2005 20:42:15 -0000 1.4
+++ dbus-glib.h 30 Jan 2005 05:18:44 -0000 1.5
@@ -145,7 +145,10 @@
const char *method,
int first_arg_type,
...);
+const char* dbus_g_proxy_get_bus_name (DBusGProxy *proxy);
+DBusGPendingCall* dbus_g_pending_call_ref (DBusGPendingCall *call);
+void dbus_g_pending_call_unref (DBusGPendingCall *call);
#undef DBUS_INSIDE_DBUS_GLIB_H
Index: dbus-marshal-validate.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-marshal-validate.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dbus-marshal-validate.c 28 Jan 2005 05:30:53 -0000 1.12
+++ dbus-marshal-validate.c 30 Jan 2005 05:18:44 -0000 1.13
@@ -573,7 +573,7 @@
_dbus_assert (start >= 0);
_dbus_assert (len >= 0);
_dbus_assert (start <= _dbus_string_get_length (str));
-
+
if (len > _dbus_string_get_length (str) - start)
return FALSE;
Index: dbus-object-tree.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-object-tree.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dbus-object-tree.c 15 Jan 2005 07:15:38 -0000 1.10
+++ dbus-object-tree.c 30 Jan 2005 05:18:44 -0000 1.11
@@ -630,6 +630,9 @@
if (!_dbus_object_tree_list_registered_unlocked (tree, path, &children))
goto out;
+ if (!_dbus_string_append (&xml, DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE))
+ goto out;
+
if (!_dbus_string_append (&xml, "<node>\n"))
goto out;
@@ -945,6 +948,7 @@
/**
* Decompose an object path. A path of just "/" is
* represented as an empty vector of strings.
+ * The path need not be nul terminated.
*
* @param data the path data
* @param len the length of the path string
@@ -962,19 +966,22 @@
int i, j, comp;
_dbus_assert (data != NULL);
-
+
#if VERBOSE_DECOMPOSE
_dbus_verbose ("Decomposing path \"%s\"\n",
data);
#endif
n_components = 0;
- i = 0;
- while (i < len)
+ if (len > 1) /* if path is not just "/" */
{
- if (data[i] == '/')
- n_components += 1;
- ++i;
+ i = 0;
+ while (i < len)
+ {
+ if (data[i] == '/')
+ n_components += 1;
+ ++i;
+ }
}
retval = dbus_new0 (char*, n_components + 1);
@@ -983,9 +990,14 @@
return FALSE;
comp = 0;
- i = 0;
- while (i < len)
+ if (n_components == 0)
+ i = 1;
+ else
+ i = 0;
+ while (comp < n_components)
{
+ _dbus_assert (i < len);
+
if (data[i] == '/')
++i;
j = i;
@@ -1037,22 +1049,31 @@
flatten_path (const char **path)
{
DBusString str;
- int i;
char *s;
if (!_dbus_string_init (&str))
return NULL;
- i = 0;
- while (path[i])
+ if (path[0] == NULL)
{
if (!_dbus_string_append_byte (&str, '/'))
goto nomem;
-
- if (!_dbus_string_append (&str, path[i]))
- goto nomem;
-
- ++i;
+ }
+ else
+ {
+ int i;
+
+ i = 0;
+ while (path[i])
+ {
+ if (!_dbus_string_append_byte (&str, '/'))
+ goto nomem;
+
+ if (!_dbus_string_append (&str, path[i]))
+ goto nomem;
+
+ ++i;
+ }
}
if (!_dbus_string_steal_data (&str, &s))
@@ -1191,7 +1212,7 @@
{
DBusObjectPathVTable vtable = { test_unregister_function,
test_message_function, NULL };
-
+
tree_test_data[i].message_handled = FALSE;
tree_test_data[i].handler_unregistered = FALSE;
tree_test_data[i].handler_fallback = fallback;
@@ -1278,17 +1299,82 @@
}
static size_t
-string_array_length (char **array)
+string_array_length (const char **array)
{
size_t i;
for (i = 0; array[i]; i++) ;
return i;
}
+typedef struct
+{
+ const char *path;
+ const char *result[20];
+} DecomposePathTest;
+
+static DecomposePathTest decompose_tests[] = {
+ { "/foo", { "foo", NULL } },
+ { "/foo/bar", { "foo", "bar", NULL } },
+ { "/", { NULL } },
+ { "/a/b", { "a", "b", NULL } },
+ { "/a/b/c", { "a", "b", "c", NULL } },
+ { "/a/b/c/d", { "a", "b", "c", "d", NULL } },
+ { "/foo/bar/q", { "foo", "bar", "q", NULL } },
+ { "/foo/bar/this/is/longer", { "foo", "bar", "this", "is", "longer", NULL } }
+};
+
+static dbus_bool_t
+run_decompose_tests (void)
+{
+ int i;
+
+ i = 0;
+ while (i < _DBUS_N_ELEMENTS (decompose_tests))
+ {
+ char **result;
+ int result_len;
+ int expected_len;
+
+ if (!_dbus_decompose_path (decompose_tests[i].path,
+ strlen (decompose_tests[i].path),
+ &result, &result_len))
+ return FALSE;
+
+ expected_len = string_array_length (decompose_tests[i].result);
+
+ if (result_len != (int) string_array_length ((const char**)result) ||
+ expected_len != result_len ||
+ path_contains (decompose_tests[i].result,
+ (const char**) result) != STR_EQUAL)
+ {
+ int real_len = string_array_length ((const char**)result);
+ _dbus_warn ("Expected decompose of %s to have len %d, returned %d, appears to have %d\n",
+ decompose_tests[i].path, expected_len, result_len,
+ real_len);
+ _dbus_warn ("Decompose resulted in elements: { ");
+ i = 0;
+ while (i < real_len)
+ {
+ _dbus_warn ("\"%s\"%s", result[i],
+ (i + 1) == real_len ? "" : ", ");
+ ++i;
+ }
+ _dbus_warn ("}\n");
+ _dbus_assert_not_reached ("path decompose failed\n");
+ }
+
+ dbus_free_string_array (result);
+
+ ++i;
+ }
+
+ return TRUE;
+}
static dbus_bool_t
object_tree_test_iteration (void *data)
{
+ const char *path0[] = { NULL };
const char *path1[] = { "foo", NULL };
const char *path2[] = { "foo", "bar", NULL };
const char *path3[] = { "foo", "bar", "baz", NULL };
@@ -1298,19 +1384,46 @@
const char *path7[] = { "blah", "boof", "this", "is", "really", "long", NULL };
const char *path8[] = { "childless", NULL };
DBusObjectTree *tree;
- TreeTestData tree_test_data[8];
+ TreeTestData tree_test_data[9];
int i;
dbus_bool_t exact_match;
+ if (!run_decompose_tests ())
+ return FALSE;
+
tree = NULL;
tree = _dbus_object_tree_new (NULL);
if (tree == NULL)
goto out;
- if (!do_register (tree, path1, TRUE, 0, tree_test_data))
+ if (!do_register (tree, path0, TRUE, 0, tree_test_data))
+ goto out;
+
+ _dbus_assert (find_subtree (tree, path0, NULL));
+ _dbus_assert (!find_subtree (tree, path1, NULL));
+ _dbus_assert (!find_subtree (tree, path2, NULL));
+ _dbus_assert (!find_subtree (tree, path3, NULL));
+ _dbus_assert (!find_subtree (tree, path4, NULL));
+ _dbus_assert (!find_subtree (tree, path5, NULL));
+ _dbus_assert (!find_subtree (tree, path6, NULL));
+ _dbus_assert (!find_subtree (tree, path7, NULL));
+ _dbus_assert (!find_subtree (tree, path8, NULL));
+
+ _dbus_assert (find_handler (tree, path0, &exact_match) && exact_match);
+ _dbus_assert (find_handler (tree, path1, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path2, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path3, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path4, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path5, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path6, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path7, &exact_match) == tree->root && !exact_match);
+ _dbus_assert (find_handler (tree, path8, &exact_match) == tree->root && !exact_match);
+
+ if (!do_register (tree, path1, TRUE, 1, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1320,6 +1433,7 @@
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
+ _dbus_assert (find_handler (tree, path0, &exact_match) && exact_match);
_dbus_assert (find_handler (tree, path1, &exact_match) && exact_match);
_dbus_assert (find_handler (tree, path2, &exact_match) && !exact_match);
_dbus_assert (find_handler (tree, path3, &exact_match) && !exact_match);
@@ -1329,7 +1443,7 @@
_dbus_assert (find_handler (tree, path7, &exact_match) == tree->root && !exact_match);
_dbus_assert (find_handler (tree, path8, &exact_match) == tree->root && !exact_match);
- if (!do_register (tree, path2, TRUE, 1, tree_test_data))
+ if (!do_register (tree, path2, TRUE, 2, tree_test_data))
goto out;
_dbus_assert (find_subtree (tree, path1, NULL));
@@ -1341,9 +1455,10 @@
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
- if (!do_register (tree, path3, TRUE, 2, tree_test_data))
+ if (!do_register (tree, path3, TRUE, 3, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1353,9 +1468,10 @@
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
- if (!do_register (tree, path4, TRUE, 3, tree_test_data))
+ if (!do_register (tree, path4, TRUE, 4, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1365,9 +1481,10 @@
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
- if (!do_register (tree, path5, TRUE, 4, tree_test_data))
+ if (!do_register (tree, path5, TRUE, 5, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1376,7 +1493,8 @@
_dbus_assert (!find_subtree (tree, path6, NULL));
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
-
+
+ _dbus_assert (find_handler (tree, path0, &exact_match) == tree->root && exact_match);
_dbus_assert (find_handler (tree, path1, &exact_match) != tree->root && exact_match);
_dbus_assert (find_handler (tree, path2, &exact_match) != tree->root && exact_match);
_dbus_assert (find_handler (tree, path3, &exact_match) != tree->root && exact_match);
@@ -1386,9 +1504,10 @@
_dbus_assert (find_handler (tree, path7, &exact_match) != tree->root && !exact_match);
_dbus_assert (find_handler (tree, path8, &exact_match) == tree->root && !exact_match);
- if (!do_register (tree, path6, TRUE, 5, tree_test_data))
+ if (!do_register (tree, path6, TRUE, 6, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1398,9 +1517,10 @@
_dbus_assert (!find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
- if (!do_register (tree, path7, TRUE, 6, tree_test_data))
+ if (!do_register (tree, path7, TRUE, 7, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1410,9 +1530,10 @@
_dbus_assert (find_subtree (tree, path7, NULL));
_dbus_assert (!find_subtree (tree, path8, NULL));
- if (!do_register (tree, path8, TRUE, 7, tree_test_data))
+ if (!do_register (tree, path8, TRUE, 8, tree_test_data))
goto out;
+ _dbus_assert (find_subtree (tree, path0, NULL));
_dbus_assert (find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1421,7 +1542,8 @@
_dbus_assert (find_subtree (tree, path6, NULL));
_dbus_assert (find_subtree (tree, path7, NULL));
_dbus_assert (find_subtree (tree, path8, NULL));
-
+
+ _dbus_assert (find_handler (tree, path0, &exact_match) == tree->root && exact_match);
_dbus_assert (find_handler (tree, path1, &exact_match) != tree->root && exact_match);
_dbus_assert (find_handler (tree, path2, &exact_match) != tree->root && exact_match);
_dbus_assert (find_handler (tree, path3, &exact_match) != tree->root && exact_match);
@@ -1441,7 +1563,7 @@
_dbus_object_tree_list_registered_unlocked (tree, path1, &child_entries);
if (child_entries != NULL)
{
- nb = string_array_length (child_entries);
+ nb = string_array_length ((const char**)child_entries);
_dbus_assert (nb == 1);
dbus_free_string_array (child_entries);
}
@@ -1449,7 +1571,7 @@
_dbus_object_tree_list_registered_unlocked (tree, path2, &child_entries);
if (child_entries != NULL)
{
- nb = string_array_length (child_entries);
+ nb = string_array_length ((const char**)child_entries);
_dbus_assert (nb == 2);
dbus_free_string_array (child_entries);
}
@@ -1457,7 +1579,7 @@
_dbus_object_tree_list_registered_unlocked (tree, path8, &child_entries);
if (child_entries != NULL)
{
- nb = string_array_length (child_entries);
+ nb = string_array_length ((const char**)child_entries);
_dbus_assert (nb == 0);
dbus_free_string_array (child_entries);
}
@@ -1465,7 +1587,7 @@
_dbus_object_tree_list_registered_unlocked (tree, root, &child_entries);
if (child_entries != NULL)
{
- nb = string_array_length (child_entries);
+ nb = string_array_length ((const char**)child_entries);
_dbus_assert (nb == 3);
dbus_free_string_array (child_entries);
}
@@ -1487,25 +1609,40 @@
if (tree == NULL)
goto out;
- if (!do_register (tree, path1, TRUE, 0, tree_test_data))
+ if (!do_register (tree, path0, TRUE, 0, tree_test_data))
goto out;
- if (!do_register (tree, path2, TRUE, 1, tree_test_data))
+ if (!do_register (tree, path1, TRUE, 1, tree_test_data))
goto out;
- if (!do_register (tree, path3, TRUE, 2, tree_test_data))
+ if (!do_register (tree, path2, TRUE, 2, tree_test_data))
goto out;
- if (!do_register (tree, path4, TRUE, 3, tree_test_data))
+ if (!do_register (tree, path3, TRUE, 3, tree_test_data))
goto out;
- if (!do_register (tree, path5, TRUE, 4, tree_test_data))
+ if (!do_register (tree, path4, TRUE, 4, tree_test_data))
goto out;
- if (!do_register (tree, path6, TRUE, 5, tree_test_data))
+ if (!do_register (tree, path5, TRUE, 5, tree_test_data))
goto out;
- if (!do_register (tree, path7, TRUE, 6, tree_test_data))
+ if (!do_register (tree, path6, TRUE, 6, tree_test_data))
goto out;
- if (!do_register (tree, path8, TRUE, 7, tree_test_data))
+ if (!do_register (tree, path7, TRUE, 7, tree_test_data))
goto out;
+ if (!do_register (tree, path8, TRUE, 8, tree_test_data))
+ goto out;
+
+ _dbus_object_tree_unregister_and_unlock (tree, path0);
+
+ _dbus_assert (!find_subtree (tree, path0, NULL));
+ _dbus_assert (find_subtree (tree, path1, NULL));
+ _dbus_assert (find_subtree (tree, path2, NULL));
+ _dbus_assert (find_subtree (tree, path3, NULL));
+ _dbus_assert (find_subtree (tree, path4, NULL));
+ _dbus_assert (find_subtree (tree, path5, NULL));
+ _dbus_assert (find_subtree (tree, path6, NULL));
+ _dbus_assert (find_subtree (tree, path7, NULL));
+ _dbus_assert (find_subtree (tree, path8, NULL));
_dbus_object_tree_unregister_and_unlock (tree, path1);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1517,6 +1654,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path2);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (find_subtree (tree, path3, NULL));
@@ -1528,6 +1666,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path3);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1539,6 +1678,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path4);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1550,6 +1690,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path5);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1561,6 +1702,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path6);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1572,6 +1714,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path7);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1583,6 +1726,7 @@
_dbus_object_tree_unregister_and_unlock (tree, path8);
+ _dbus_assert (!find_subtree (tree, path0, NULL));
_dbus_assert (!find_subtree (tree, path1, NULL));
_dbus_assert (!find_subtree (tree, path2, NULL));
_dbus_assert (!find_subtree (tree, path3, NULL));
@@ -1601,43 +1745,47 @@
}
/* Register it all again, and test dispatch */
-
- if (!do_register (tree, path1, FALSE, 0, tree_test_data))
+
+ if (!do_register (tree, path0, TRUE, 0, tree_test_data))
goto out;
- if (!do_register (tree, path2, TRUE, 1, tree_test_data))
+ if (!do_register (tree, path1, FALSE, 1, tree_test_data))
goto out;
- if (!do_register (tree, path3, TRUE, 2, tree_test_data))
+ if (!do_register (tree, path2, TRUE, 2, tree_test_data))
goto out;
- if (!do_register (tree, path4, TRUE, 3, tree_test_data))
+ if (!do_register (tree, path3, TRUE, 3, tree_test_data))
goto out;
- if (!do_register (tree, path5, TRUE, 4, tree_test_data))
+ if (!do_register (tree, path4, TRUE, 4, tree_test_data))
goto out;
- if (!do_register (tree, path6, FALSE, 5, tree_test_data))
+ if (!do_register (tree, path5, TRUE, 5, tree_test_data))
goto out;
- if (!do_register (tree, path7, TRUE, 6, tree_test_data))
+ if (!do_register (tree, path6, FALSE, 6, tree_test_data))
goto out;
- if (!do_register (tree, path8, TRUE, 7, tree_test_data))
+ if (!do_register (tree, path7, TRUE, 7, tree_test_data))
+ goto out;
+ if (!do_register (tree, path8, TRUE, 8, tree_test_data))
goto out;
#if 0
spew_tree (tree);
#endif
-
- if (!do_test_dispatch (tree, path1, 0, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+
+ if (!do_test_dispatch (tree, path0, 0, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path2, 1, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path1, 1, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path3, 2, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path2, 2, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path4, 3, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path3, 3, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path5, 4, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path4, 4, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path6, 5, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path5, 5, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path7, 6, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path6, 6, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
- if (!do_test_dispatch (tree, path8, 7, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ if (!do_test_dispatch (tree, path7, 7, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
+ goto out;
+ if (!do_test_dispatch (tree, path8, 8, tree_test_data, _DBUS_N_ELEMENTS (tree_test_data)))
goto out;
out:
Index: dbus-protocol.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-protocol.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- dbus-protocol.h 29 Jan 2005 19:52:19 -0000 1.38
+++ dbus-protocol.h 30 Jan 2005 05:18:44 -0000 1.39
@@ -272,6 +272,12 @@
#define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed"
#define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
+#define DBUS_INTROSPECT_1_0_XML_NAMESPACE "http://www.freedesktop.org/standards/dbus"
+#define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+#define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
+#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<!DOCTYPE node PUBLIC \""DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER"\"\n\""DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER"\">\n"
+
+
#ifdef __cplusplus
}
#endif
More information about the dbus-commit
mailing list