Data Structures | |
struct | DBusObjectTree |
Internals of DBusObjectTree. More... | |
struct | DBusObjectSubtree |
Struct representing a single registered subtree handler, or node that's a parent of a registered subtree handler. More... | |
Defines | |
#define | VERBOSE_FIND 0 |
Set to 1 to get a bunch of debug spew about finding the subtree nodes. | |
Typedefs | |
typedef DBusObjectSubtree | DBusObjectSubtree |
Subnode of the object hierarchy. | |
Functions | |
DBusObjectTree * | _dbus_object_tree_new (DBusConnection *connection) |
Creates a new object tree, representing a mapping from paths to handler vtables. | |
DBusObjectTree * | _dbus_object_tree_ref (DBusObjectTree *tree) |
Increment the reference count. | |
void | _dbus_object_tree_unref (DBusObjectTree *tree) |
Decrement the reference count. | |
dbus_bool_t | _dbus_object_tree_register (DBusObjectTree *tree, dbus_bool_t fallback, const char **path, const DBusObjectPathVTable *vtable, void *user_data) |
Registers a new subtree in the global object tree. | |
void | _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree, const char **path) |
Unregisters an object subtree that was registered with the same path. | |
void | _dbus_object_tree_free_all_unlocked (DBusObjectTree *tree) |
Free all the handlers in the tree. | |
DBusHandlerResult | _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, DBusMessage *message) |
Tries to dispatch a message by directing it to handler for the object path listed in the message header, if any. | |
dbus_bool_t | _dbus_object_tree_list_registered_and_unlock (DBusObjectTree *tree, const char **parent_path, char ***child_entries) |
Lists the registered fallback handlers and object path handlers at the given parent_path. |
Types and functions related to DBusObjectTree. These are all library-internal.
|
Tries to dispatch a message by directing it to handler for the object path listed in the message header, if any. Messages are dispatched first to the registered handler that matches the largest number of path elements; that is, message to /foo/bar/baz would go to the handler for /foo/bar before the one for /foo.
References _dbus_connection_lock(), _dbus_connection_unlock(), _dbus_list_append(), _dbus_list_get_first_link(), _dbus_list_get_length(), _dbus_list_get_next_link, _dbus_list_remove_link(), connection, DBusList::data, dbus_bool_t, dbus_free_string_array(), dbus_message_get_path_decomposed(), DBusObjectSubtree, FALSE, DBusObjectSubtree::invoke_as_fallback, DBusObjectSubtree::message_function, NULL, DBusObjectSubtree::parent, and DBusObjectSubtree::user_data. Referenced by dbus_connection_dispatch(). |
|
Free all the handlers in the tree. Lock on tree's connection must not be held.
References connection, NULL, and root. Referenced by _dbus_object_tree_unref(). |
|
Lists the registered fallback handlers and object path handlers at the given parent_path. The returned array should be freed with dbus_free_string_array().
References _dbus_connection_unlock(), connection, and dbus_bool_t. Referenced by dbus_connection_list_registered(). |
|
Creates a new object tree, representing a mapping from paths to handler vtables.
References connection, dbus_free(), dbus_new0, DBusObjectSubtree::invoke_as_fallback, NULL, refcount, root, and TRUE. Referenced by _dbus_connection_new_for_transport(). |
|
Increment the reference count.
References _dbus_assert, and refcount. |
|
Registers a new subtree in the global object tree.
References _dbus_assert, _dbus_warn(), dbus_bool_t, DBusObjectSubtree, FALSE, DBusObjectSubtree::invoke_as_fallback, DBusObjectPathVTable::message_function, DBusObjectSubtree::message_function, NULL, TRUE, DBusObjectSubtree::unregister_function, DBusObjectPathVTable::unregister_function, and DBusObjectSubtree::user_data. Referenced by dbus_connection_register_fallback(), and dbus_connection_register_object_path(). |
|
Decrement the reference count.
References _dbus_assert, _dbus_object_tree_free_all_unlocked(), dbus_free(), and refcount. Referenced by _dbus_connection_new_for_transport(). |
|
Unregisters an object subtree that was registered with the same path.
References _dbus_assert, _dbus_connection_ref_unlocked(), _dbus_connection_unlock(), _dbus_warn(), connection, dbus_connection_unref(), DBusObjectSubtree, NULL, DBusObjectSubtree::parent, and DBusObjectSubtree::subtrees. Referenced by dbus_connection_unregister_object_path(). |