index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
A hierarchy of objects with container-contained relationship
[
group__DBusInternals.html
D-BUS internal implementation details
]
structDBusObjectTree.html
DBusObjectTree
is used by
structDBusConnection.html
DBusConnection
to track the object tree.
#_details
More...
Data Structures
struct
structDBusObjectTree.html
DBusObjectTree
Internals of DBusObjectTree.
structDBusObjectTree.html#_details
More...
struct
structDBusObjectSubtree.html
DBusObjectSubtree
Struct representing a single registered subtree handler, or node that's a parent of a registered subtree handler.
structDBusObjectSubtree.html#_details
More...
Defines
#define
group__DBusObjectTree.html#ga26
VERBOSE_FIND
0
Set to 1 to get a bunch of debug spew about finding the subtree nodes.
#define
group__DBusObjectTree.html#ga27
VERBOSE_DECOMPOSE
0
Set to 1 to get a bunch of spew about disassembling the path string.
Typedefs
typedef
structDBusObjectSubtree.html
DBusObjectSubtree
group__DBusObjectTree.html#ga0
DBusObjectSubtree
Subnode of the object hierarchy.
Functions
structDBusObjectTree.html
DBusObjectTree
*
group__DBusObjectTree.html#ga4
_dbus_object_tree_new
(
structDBusConnection.html
DBusConnection
*connection)
Creates a new object tree, representing a mapping from paths to handler vtables.
#ga4
structDBusObjectTree.html
DBusObjectTree
*
group__DBusObjectTree.html#ga5
_dbus_object_tree_ref
(
structDBusObjectTree.html
DBusObjectTree
*tree)
Increment the reference count.
#ga5
void
group__DBusObjectTree.html#ga6
_dbus_object_tree_unref
(
structDBusObjectTree.html
DBusObjectTree
*tree)
Decrement the reference count.
#ga6
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusObjectTree.html#ga15
_dbus_object_tree_register
(
structDBusObjectTree.html
DBusObjectTree
*tree,
group__DBusTypes.html#ga2
dbus_bool_t
fallback, const char **path, const
structDBusObjectPathVTable.html
DBusObjectPathVTable
*vtable, void *user_data)
Registers a new subtree in the global object tree.
#ga15
void
group__DBusObjectTree.html#ga16
_dbus_object_tree_unregister_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*tree, const char **path)
Unregisters an object subtree that was registered with the same path.
#ga16
void
group__DBusObjectTree.html#ga18
_dbus_object_tree_free_all_unlocked
(
structDBusObjectTree.html
DBusObjectTree
*tree)
Free all the handlers in the tree.
#ga18
DBusHandlerResult
group__DBusObjectTree.html#ga21
_dbus_object_tree_dispatch_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*tree,
structDBusMessage.html
DBusMessage
*message)
Tries to dispatch a message by directing it to handler for the object path listed in the message header, if any.
#ga21
void *
group__DBusObjectTree.html#ga22
_dbus_object_tree_get_user_data_unlocked
(
structDBusObjectTree.html
DBusObjectTree
*tree, const char **path)
Looks up the data passed to
group__DBusObjectTree.html#ga15
_dbus_object_tree_register()
for a handler at the given path.
#ga22
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusObjectTree.html#ga24
_dbus_object_tree_list_registered_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*tree, const char **parent_path, char ***child_entries)
Lists the registered fallback handlers and object path handlers at the given parent_path.
#ga24
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusObjectTree.html#ga25
_dbus_decompose_path
(const char *data, int len, char ***path, int *path_len)
Decompose an object path.
#ga25
Detailed Description
structDBusObjectTree.html
DBusObjectTree
is used by
structDBusConnection.html
DBusConnection
to track the object tree.
Types and functions related to
structDBusObjectTree.html
DBusObjectTree
. These are all library-internal.
Function Documentation
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_decompose_path
(
const char *
data
,
int
len
,
char ***
path
,
int *
path_len
)
Decompose an object path.
A path of just "/" is represented as an empty vector of strings. The path need not be nul terminated.
Parameters:
data
the path data
len
the length of the path string
path
address to store new object path
path_len
length of stored path
Definition at line
dbus-object-tree_8c-source.html#l01081
1081
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-internals_8c-source.html#l00331
_dbus_memdup()
,
dbus-memory_8c-source.html#l00650
dbus_free_string_array()
,
dbus-memory_8h-source.html#l00042
dbus_new0
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-connection_8c-source.html#l04377
dbus_connection_get_object_path_data()
,
dbus-connection_8c-source.html#l04414
dbus_connection_list_registered()
,
dbus-connection_8c-source.html#l04305
dbus_connection_register_fallback()
,
dbus-connection_8c-source.html#l04262
dbus_connection_register_object_path()
,
dbus-connection_8c-source.html#l04345
dbus_connection_unregister_object_path()
, and
dbus-message_8c-source.html#l02482
dbus_message_get_path_decomposed()
.
DBusHandlerResult _dbus_object_tree_dispatch_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*
tree
,
structDBusMessage.html
DBusMessage
*
message
)
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.
todo.html#_todo000057
Todo:
thread problems
Parameters:
tree
the global object tree
message
the message to dispatch
Returns:
whether message was handled successfully
Definition at line
dbus-object-tree_8c-source.html#l00749
749
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-connection_8c-source.html#l00291
_dbus_connection_lock()
,
dbus-connection_8c-source.html#l00302
_dbus_connection_unlock()
,
dbus-list_8c-source.html#l00249
_dbus_list_append()
,
dbus-list_8c-source.html#l00581
_dbus_list_get_first_link()
,
dbus-list_8c-source.html#l00767
_dbus_list_get_length()
,
dbus-list_8h-source.html#l00094
_dbus_list_get_next_link
,
dbus-list_8c-source.html#l00541
_dbus_list_remove_link()
,
dbus-object-tree_8c-source.html#l00058
connection
,
dbus-list_8h-source.html#l00039
DBusList::data
,
dbus-memory_8c-source.html#l00650
dbus_free_string_array()
,
dbus-message_8c-source.html#l02482
dbus_message_get_path_decomposed()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-object-tree_8c-source.html#l00078
DBusObjectSubtree::invoke_as_fallback
,
dbus-object-tree_8c-source.html#l00073
DBusObjectSubtree::message_function
,
group__DBusMacros.html#ga4
NULL
,
dbus-object-tree_8c-source.html#l00071
DBusObjectSubtree::parent
, and
dbus-object-tree_8c-source.html#l00074
DBusObjectSubtree::user_data
.
Referenced by
dbus-connection_8c-source.html#l03435
dbus_connection_dispatch()
.
void _dbus_object_tree_free_all_unlocked
(
structDBusObjectTree.html
DBusObjectTree
*
tree
)
Free all the handlers in the tree.
Lock on tree's connection must not be held.
Parameters:
tree
the object tree
Definition at line
dbus-object-tree_8c-source.html#l00565
565
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-object-tree_8c-source.html#l00058
connection
,
group__DBusMacros.html#ga4
NULL
, and
dbus-object-tree_8c-source.html#l00060
root
.
Referenced by
dbus-object-tree_8c-source.html#l00141
_dbus_object_tree_unref()
.
void* _dbus_object_tree_get_user_data_unlocked
(
structDBusObjectTree.html
DBusObjectTree
*
tree
,
const char **
path
)
Looks up the data passed to
group__DBusObjectTree.html#ga15
_dbus_object_tree_register()
for a handler at the given path.
Parameters:
tree
the global object tree
path
NULL-terminated array of path elements giving path to subtree
Returns:
the object's user_data or
group__DBusMacros.html#ga4
NULL
if none found
Definition at line
dbus-object-tree_8c-source.html#l00917
917
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
group__DBusMacros.html#ga4
NULL
, and
dbus-object-tree_8c-source.html#l00074
DBusObjectSubtree::user_data
.
Referenced by
dbus-connection_8c-source.html#l04377
dbus_connection_get_object_path_data()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_object_tree_list_registered_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*
tree
,
const char **
parent_path
,
char ***
child_entries
)
Lists the registered fallback handlers and object path handlers at the given parent_path.
The returned array should be freed with
group__DBusMemory.html#ga4
dbus_free_string_array()
.
Parameters:
tree
the object tree
parent_path
the path to list the child handlers of
child_entries
returns
group__DBusMacros.html#ga4
NULL
-terminated array of children
Returns:
group__DBusMacros.html#ga3
FALSE
if no memory to allocate the child entries
Definition at line
dbus-object-tree_8c-source.html#l01045
1045
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-connection_8c-source.html#l00302
_dbus_connection_unlock()
, and
dbus-object-tree_8c-source.html#l00058
connection
.
Referenced by
dbus-connection_8c-source.html#l04414
dbus_connection_list_registered()
.
structDBusObjectTree.html
DBusObjectTree
* _dbus_object_tree_new
(
structDBusConnection.html
DBusConnection
*
connection
)
Creates a new object tree, representing a mapping from paths to handler vtables.
Parameters:
connection
the connection this tree belongs to
Returns:
the new tree or
group__DBusMacros.html#ga4
NULL
if no memory
Definition at line
dbus-object-tree_8c-source.html#l00090
90
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-object-tree_8c-source.html#l00058
connection
,
dbus-memory_8c-source.html#l00612
dbus_free()
,
dbus-memory_8h-source.html#l00042
dbus_new0
,
dbus-object-tree_8c-source.html#l00078
DBusObjectSubtree::invoke_as_fallback
,
group__DBusMacros.html#ga4
NULL
,
dbus-object-tree_8c-source.html#l00057
refcount
,
dbus-object-tree_8c-source.html#l00060
root
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-connection_8c-source.html#l01070
_dbus_connection_new_for_transport()
.
structDBusObjectTree.html
DBusObjectTree
* _dbus_object_tree_ref
(
structDBusObjectTree.html
DBusObjectTree
*
tree
)
Increment the reference count.
Parameters:
tree
the object tree
Returns:
the object tree
Definition at line
dbus-object-tree_8c-source.html#l00127
127
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
, and
dbus-object-tree_8c-source.html#l00057
refcount
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_object_tree_register
(
structDBusObjectTree.html
DBusObjectTree
*
tree
,
group__DBusTypes.html#ga2
dbus_bool_t
fallback
,
const char **
path
,
const
structDBusObjectPathVTable.html
DBusObjectPathVTable
*
vtable
,
void *
user_data
)
Registers a new subtree in the global object tree.
Parameters:
tree
the global object tree
fallback
group__DBusMacros.html#ga2
TRUE
to handle messages to children of this path
path
NULL-terminated array of path elements giving path to subtree
vtable
the vtable used to traverse this subtree
user_data
user data to pass to methods in the vtable
Returns:
group__DBusMacros.html#ga3
FALSE
if not enough memory
Definition at line
dbus-object-tree_8c-source.html#l00403
403
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-object-tree_8c-source.html#l00078
DBusObjectSubtree::invoke_as_fallback
,
dbus-connection_8h-source.html#l00228
DBusObjectPathVTable::message_function
,
dbus-object-tree_8c-source.html#l00073
DBusObjectSubtree::message_function
,
group__DBusMacros.html#ga4
NULL
,
group__DBusMacros.html#ga2
TRUE
,
dbus-object-tree_8c-source.html#l00072
DBusObjectSubtree::unregister_function
,
dbus-connection_8h-source.html#l00227
DBusObjectPathVTable::unregister_function
, and
dbus-object-tree_8c-source.html#l00074
DBusObjectSubtree::user_data
.
Referenced by
dbus-connection_8c-source.html#l04305
dbus_connection_register_fallback()
, and
dbus-connection_8c-source.html#l04262
dbus_connection_register_object_path()
.
void _dbus_object_tree_unref
(
structDBusObjectTree.html
DBusObjectTree
*
tree
)
Decrement the reference count.
Parameters:
tree
the object tree
Definition at line
dbus-object-tree_8c-source.html#l00141
141
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-object-tree_8c-source.html#l00565
_dbus_object_tree_free_all_unlocked()
,
dbus-memory_8c-source.html#l00612
dbus_free()
, and
dbus-object-tree_8c-source.html#l00057
refcount
.
Referenced by
dbus-connection_8c-source.html#l01070
_dbus_connection_new_for_transport()
.
void _dbus_object_tree_unregister_and_unlock
(
structDBusObjectTree.html
DBusObjectTree
*
tree
,
const char **
path
)
Unregisters an object subtree that was registered with the same path.
Parameters:
tree
the global object tree
path
path to the subtree (same as the one passed to
group__DBusObjectTree.html#ga15
_dbus_object_tree_register()
)
Definition at line
dbus-object-tree_8c-source.html#l00446
446
of file
dbus-object-tree_8c-source.html
dbus-object-tree.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-connection_8c-source.html#l01258
_dbus_connection_ref_unlocked()
,
dbus-connection_8c-source.html#l00302
_dbus_connection_unlock()
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-object-tree_8c-source.html#l00058
connection
,
dbus-connection_8c-source.html#l01884
dbus_connection_unref()
,
dbus-object-tree_8c-source.html#l00073
DBusObjectSubtree::message_function
,
dbus-object-tree_8c-source.html#l00076
DBusObjectSubtree::n_subtrees
,
group__DBusMacros.html#ga4
NULL
,
dbus-object-tree_8c-source.html#l00071
DBusObjectSubtree::parent
,
dbus-object-tree_8c-source.html#l00075
DBusObjectSubtree::subtrees
,
dbus-object-tree_8c-source.html#l00072
DBusObjectSubtree::unregister_function
, and
dbus-object-tree_8c-source.html#l00074
DBusObjectSubtree::user_data
.
Referenced by
dbus-connection_8c-source.html#l04345
dbus_connection_unregister_object_path()
.
Generated on Tue Sep 13 00:15:28 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
