From 8d38a2e2c5dc95de992c4d856ec1b0c0948bca3e Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 29 Aug 2003 01:05:00 +0000 Subject: 2003-08-28 Havoc Pennington purge DBusObjectID * dbus/dbus-connection.c: port to no ObjectID, create a DBusObjectTree, rename ObjectTree to ObjectPath in public API * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete everything except UnregisterFunction and MessageFunction * dbus/dbus-marshal.c: port away from DBusObjectID, add DBUS_TYPE_OBJECT_PATH * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], dbus/dbus-objectid.[hc]: remove these, we are moving to path-based object IDs --- dbus/dbus-object-tree.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'dbus/dbus-object-tree.c') diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c index 7f7e6011..31724b7b 100644 --- a/dbus/dbus-object-tree.c +++ b/dbus/dbus-object-tree.c @@ -42,7 +42,7 @@ typedef struct DBusObjectSubtree DBusObjectSubtree; DBusObjectSubtree* _dbus_object_subtree_new (const char **path, - const DBusObjectTreeVTable *vtable, + const DBusObjectPathVTable *vtable, void *user_data); void _dbus_object_subtree_ref (DBusObjectSubtree *subtree); void _dbus_object_subtree_unref (DBusObjectSubtree *subtree); @@ -66,7 +66,7 @@ struct DBusObjectSubtree int refcount; char **path; int n_path_elements; - DBusObjectTreeVTable vtable; + DBusObjectPathVTable vtable; void *user_data; }; @@ -299,7 +299,7 @@ check_overlap (DBusObjectTree *tree, dbus_bool_t _dbus_object_tree_register (DBusObjectTree *tree, const char **path, - const DBusObjectTreeVTable *vtable, + const DBusObjectPathVTable *vtable, void *user_data) { DBusObjectSubtree *subtree; @@ -381,10 +381,27 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree, } } +/** + * Free all the handlers in the tree. Lock on tree's connection + * must not be held. + * + * @todo implement + * + * @param tree the object tree + */ +void +_dbus_object_tree_free_all_unlocked (DBusObjectTree *tree) +{ + + +} + /** * Tries to dispatch a message by directing it to the object tree * node listed in the message header, if any. * + * @todo implement + * * @param tree the global object tree * @param message the message to dispatch * @returns whether message was handled successfully @@ -399,7 +416,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, DBusObjectSubtree* _dbus_object_subtree_new (const char **path, - const DBusObjectTreeVTable *vtable, + const DBusObjectPathVTable *vtable, void *user_data) { DBusObjectSubtree *subtree; @@ -476,7 +493,7 @@ test_subtree_cmp (const char **path1, DBusObjectSubtree *subtree1; DBusObjectSubtree *subtree2; dbus_bool_t retval; - DBusObjectTreeVTable vtable; + DBusObjectPathVTable vtable; _DBUS_ZERO (vtable); -- cgit