Data Structures | |
struct | DBusMessageFilter |
Internal struct representing a message filter function. More... | |
struct | DBusPreallocatedSend |
Internals of DBusPreallocatedSend. More... | |
struct | DBusConnection |
Implementation details of DBusConnection. More... | |
Typedefs | |
typedef DBusMessageFilter | DBusMessageFilter |
Internal struct representing a message filter function. | |
typedef dbus_bool_t(* | DBusWatchAddFunction )(DBusWatchList *list, DBusWatch *watch) |
typedef void(* | DBusWatchRemoveFunction )(DBusWatchList *list, DBusWatch *watch) |
typedef void(* | DBusWatchToggleFunction )(DBusWatchList *list, DBusWatch *watch, dbus_bool_t enabled) |
typedef dbus_bool_t(* | DBusTimeoutAddFunction )(DBusTimeoutList *list, DBusTimeout *timeout) |
typedef void(* | DBusTimeoutRemoveFunction )(DBusTimeoutList *list, DBusTimeout *timeout) |
typedef void(* | DBusTimeoutToggleFunction )(DBusTimeoutList *list, DBusTimeout *timeout, dbus_bool_t enabled) |
Functions | |
void | _dbus_connection_lock (DBusConnection *connection) |
Acquires the connection lock. | |
void | _dbus_connection_unlock (DBusConnection *connection) |
Releases the connection lock. | |
void | _dbus_connection_queue_received_message_link (DBusConnection *connection, DBusList *link) |
Adds a message-containing list link to the incoming message queue, taking ownership of the link and the message's current refcount. | |
dbus_bool_t | _dbus_connection_has_messages_to_send_unlocked (DBusConnection *connection) |
Checks whether there are messages in the outgoing message queue. | |
dbus_bool_t | dbus_connection_has_messages_to_send (DBusConnection *connection) |
Checks whether there are messages in the outgoing message queue. | |
DBusMessage * | _dbus_connection_get_message_to_send (DBusConnection *connection) |
Gets the next outgoing message. | |
void | _dbus_connection_message_sent (DBusConnection *connection, DBusMessage *message) |
Notifies the connection that a message has been sent, so the message can be removed from the outgoing queue. | |
dbus_bool_t | _dbus_connection_add_watch (DBusConnection *connection, DBusWatch *watch) |
Adds a watch using the connection's DBusAddWatchFunction if available. | |
void | _dbus_connection_remove_watch (DBusConnection *connection, DBusWatch *watch) |
Removes a watch using the connection's DBusRemoveWatchFunction if available. | |
void | _dbus_connection_toggle_watch (DBusConnection *connection, DBusWatch *watch, dbus_bool_t enabled) |
Toggles a watch and notifies app via connection's DBusWatchToggledFunction if available. | |
dbus_bool_t | _dbus_connection_add_timeout (DBusConnection *connection, DBusTimeout *timeout) |
Adds a timeout using the connection's DBusAddTimeoutFunction if available. | |
void | _dbus_connection_remove_timeout (DBusConnection *connection, DBusTimeout *timeout) |
Removes a timeout using the connection's DBusRemoveTimeoutFunction if available. | |
void | _dbus_connection_toggle_timeout (DBusConnection *connection, DBusTimeout *timeout, dbus_bool_t enabled) |
Toggles a timeout and notifies app via connection's DBusTimeoutToggledFunction if available. | |
void | _dbus_connection_remove_pending_call (DBusConnection *connection, DBusPendingCall *pending) |
Removes a pending call from the connection, such that the pending reply will be ignored. | |
void | _dbus_pending_call_complete_and_unlock (DBusPendingCall *pending, DBusMessage *message) |
Completes a pending call with the given message, or if the message is NULL, by timing out the pending call. | |
void | _dbus_connection_do_iteration_unlocked (DBusConnection *connection, unsigned int flags, int timeout_milliseconds) |
Queues incoming messages and sends outgoing messages for this connection, optionally blocking in the process. | |
DBusConnection * | _dbus_connection_new_for_transport (DBusTransport *transport) |
Creates a new connection for the given transport. | |
DBusConnection * | _dbus_connection_ref_unlocked (DBusConnection *connection) |
Increments the reference count of a DBusConnection. | |
void | _dbus_connection_unref_unlocked (DBusConnection *connection) |
Decrements the reference count of a DBusConnection. | |
dbus_bool_t | _dbus_connection_handle_watch (DBusWatch *watch, unsigned int condition, void *data) |
A callback for use with dbus_watch_new() to create a DBusWatch. |
|
Adds a timeout using the connection's DBusAddTimeoutFunction if available. Otherwise records the timeout to be added when said function is available. Also re-adds the timeout if the DBusAddTimeoutFunction changes. May fail due to lack of memory. The timeout will fire repeatedly until removed.
Definition at line 715 of file dbus-connection.c. References _dbus_timeout_list_add_timeout(), FALSE, and NULL. |
|
Adds a watch using the connection's DBusAddWatchFunction if available. Otherwise records the watch to be added when said function is available. Also re-adds the watch if the DBusAddWatchFunction changes. May fail due to lack of memory.
Definition at line 599 of file dbus-connection.c. References _dbus_watch_list_add_watch(), FALSE, and NULL. |
|
Queues incoming messages and sends outgoing messages for this connection, optionally blocking in the process. Each call to _dbus_connection_do_iteration_unlocked() will call select() or poll() one time and then read or write data if possible. The purpose of this function is to be able to flush outgoing messages or queue up incoming messages without returning control to the application and causing reentrancy weirdness. The flags parameter allows you to specify whether to read incoming messages, write outgoing messages, or both, and whether to block if no immediate action is possible. The timeout_milliseconds parameter does nothing unless the iteration is blocking. If there are no outgoing messages and DBUS_ITERATION_DO_READING wasn't specified, then it's impossible to block, even if you specify DBUS_ITERATION_BLOCK; in that case the function returns immediately. Called with connection lock held.
Definition at line 1030 of file dbus-connection.c. References _dbus_transport_do_iteration(), and DBusConnection::n_outgoing. Referenced by _dbus_connection_block_pending_call(), and dbus_connection_flush(). |
|
Gets the next outgoing message. The message remains in the queue, and the caller does not own a reference to it.
Definition at line 472 of file dbus-connection.c. References _dbus_list_get_last(), and DBusConnection::outgoing_messages. |
|
A callback for use with dbus_watch_new() to create a DBusWatch.
Definition at line 1332 of file dbus-connection.c. References _dbus_transport_handle_watch(), and DBusConnection::transport. |
|
Checks whether there are messages in the outgoing message queue. Called with connection lock held.
Definition at line 438 of file dbus-connection.c. References NULL, and DBusConnection::outgoing_messages. Referenced by dbus_connection_has_messages_to_send(). |
|
Acquires the connection lock.
Definition at line 287 of file dbus-connection.c. Referenced by _dbus_object_tree_dispatch_and_unlock(), and _dbus_transport_get_is_authenticated(). |
|
Notifies the connection that a message has been sent, so the message can be removed from the outgoing queue. Called with the connection lock held.
Definition at line 488 of file dbus-connection.c. References _dbus_assert, _dbus_list_get_last_link(), _dbus_list_prepend_link(), _dbus_list_unlink(), _dbus_message_remove_size_counter(), DBusList::data, dbus_message_get_interface(), dbus_message_get_member(), dbus_message_get_path(), dbus_message_get_signature(), dbus_message_get_type(), dbus_message_unref(), DBusConnection::link_cache, DBusConnection::n_outgoing, NULL, DBusConnection::outgoing_counter, and DBusConnection::outgoing_messages. |
|
|
Adds a message-containing list link to the incoming message queue, taking ownership of the link and the message's current refcount. Cannot fail due to lack of memory.
Definition at line 354 of file dbus-connection.c. References _dbus_assert, _dbus_connection_remove_timeout(), _dbus_hash_table_lookup_int(), _dbus_list_append_link(), _dbus_transport_get_is_authenticated(), DBusList::data, dbus_message_get_interface(), dbus_message_get_member(), dbus_message_get_path(), dbus_message_get_reply_serial(), dbus_message_get_signature(), dbus_message_get_type(), FALSE, DBusConnection::incoming_messages, DBusConnection::n_incoming, NULL, DBusConnection::pending_replies, DBusPendingCall::timeout, DBusPendingCall::timeout_added, and DBusConnection::transport. Referenced by _dbus_transport_queue_messages(). |
|
Increments the reference count of a DBusConnection. Requires that the caller already holds the connection lock.
Definition at line 1253 of file dbus-connection.c. References _dbus_assert, _dbus_atomic_inc(), _dbus_current_generation, DBusConnection::generation, NULL, DBusConnection::refcount, and DBusAtomic::value. Referenced by _dbus_object_tree_unregister_and_unlock(), _dbus_transport_get_is_authenticated(), dbus_connection_dispatch(), dbus_connection_set_timeout_functions(), and dbus_connection_set_watch_functions(). |
|
Removes a pending call from the connection, such that the pending reply will be ignored. May drop the last reference to the pending call.
Definition at line 855 of file dbus-connection.c. Referenced by dbus_pending_call_cancel(). |
|
Removes a timeout using the connection's DBusRemoveTimeoutFunction if available. It's an error to call this function on a timeout that was not previously added.
Definition at line 732 of file dbus-connection.c. References _dbus_timeout_list_remove_timeout(), FALSE, and NULL. Referenced by _dbus_connection_queue_received_message_link(). |
|
Removes a watch using the connection's DBusRemoveWatchFunction if available. It's an error to call this function on a watch that was not previously added.
Definition at line 616 of file dbus-connection.c. References _dbus_watch_list_remove_watch(), FALSE, and NULL. |
|
Toggles a timeout and notifies app via connection's DBusTimeoutToggledFunction if available. It's an error to call this function on a timeout that was not previously added.
Definition at line 751 of file dbus-connection.c. References _dbus_timeout_list_toggle_timeout(), and NULL. |
|
Toggles a watch and notifies app via connection's DBusWatchToggledFunction if available. It's an error to call this function on a watch that was not previously added. Connection lock should be held when calling this.
Definition at line 636 of file dbus-connection.c. References _dbus_assert, _dbus_watch_list_toggle_watch(), and NULL. |
|
Releases the connection lock.
Definition at line 298 of file dbus-connection.c. Referenced by _dbus_object_tree_dispatch_and_unlock(), _dbus_object_tree_list_registered_and_unlock(), _dbus_object_tree_unregister_and_unlock(), and _dbus_transport_get_is_authenticated(). |
|
Decrements the reference count of a DBusConnection. Requires that the caller already holds the connection lock.
Definition at line 1277 of file dbus-connection.c. References _dbus_assert, _dbus_atomic_dec(), NULL, DBusConnection::refcount, and DBusAtomic::value. Referenced by _dbus_transport_get_is_authenticated(). |
|
Completes a pending call with the given message, or if the message is NULL, by timing out the pending call.
Definition at line 871 of file dbus-connection.c. References _dbus_assert, _dbus_list_clear(), _dbus_pending_call_notify(), DBusPendingCall::connection, DBusList::data, dbus_message_get_reply_serial(), dbus_message_get_type(), dbus_message_ref(), dbus_pending_call_ref(), dbus_pending_call_unref(), NULL, DBusPendingCall::reply, DBusPendingCall::reply_serial, and DBusPendingCall::timeout_link. Referenced by _dbus_connection_block_pending_call(), and dbus_connection_dispatch(). |
|
Checks whether there are messages in the outgoing message queue.
Definition at line 451 of file dbus-connection.c. References _dbus_connection_has_messages_to_send_unlocked(), FALSE, and NULL. |