Data Structures | |
struct | DBusPendingCall |
Implementation details of DBusPendingCall - all fields are private. More... | |
Defines | |
#define | CONNECTION_LOCK(connection) _dbus_connection_lock(connection) |
shorter and more visible way to write _dbus_connection_lock() | |
#define | CONNECTION_UNLOCK(connection) _dbus_connection_unlock(connection) |
shorter and more visible way to write _dbus_connection_unlock() | |
Functions | |
DBusPendingCall * | _dbus_pending_call_new_unlocked (DBusConnection *connection, int timeout_milliseconds, DBusTimeoutHandler timeout_handler) |
Creates a new pending reply object. | |
void | _dbus_pending_call_set_reply_unlocked (DBusPendingCall *pending, DBusMessage *message) |
Sets the reply of a pending call with the given message, or if the message is NULL, by timing out the pending call. | |
void | _dbus_pending_call_complete (DBusPendingCall *pending) |
Calls notifier function for the pending call and sets the call to completed. | |
void | _dbus_pending_call_queue_timeout_error_unlocked (DBusPendingCall *pending, DBusConnection *connection) |
If the pending call hasn't been timed out, add its timeout error reply to the connection's incoming message queue. | |
dbus_bool_t | _dbus_pending_call_is_timeout_added_unlocked (DBusPendingCall *pending) |
Checks to see if a timeout has been added. | |
void | _dbus_pending_call_set_timeout_added_unlocked (DBusPendingCall *pending, dbus_bool_t is_added) |
Sets wether the timeout has been added. | |
DBusTimeout * | _dbus_pending_call_get_timeout_unlocked (DBusPendingCall *pending) |
Retrives the timeout. | |
dbus_uint32_t | _dbus_pending_call_get_reply_serial_unlocked (DBusPendingCall *pending) |
Gets the reply's serial number. | |
void | _dbus_pending_call_set_reply_serial_unlocked (DBusPendingCall *pending, dbus_uint32_t serial) |
Sets the reply's serial number. | |
DBusConnection * | _dbus_pending_call_get_connection_and_lock (DBusPendingCall *pending) |
Gets the connection associated with this pending call. | |
DBusConnection * | _dbus_pending_call_get_connection_unlocked (DBusPendingCall *pending) |
Gets the connection associated with this pending call. | |
dbus_bool_t | _dbus_pending_call_set_timeout_error_unlocked (DBusPendingCall *pending, DBusMessage *message, dbus_uint32_t serial) |
Sets the reply message associated with the pending call to a timeout error. | |
DBusPendingCall * | _dbus_pending_call_ref_unlocked (DBusPendingCall *pending) |
Increments the reference count on a pending call, while the lock on its connection is already held. | |
void | _dbus_pending_call_unref_and_unlock (DBusPendingCall *pending) |
Decrements the reference count on a pending call, freeing it if the count reaches 0. | |
dbus_bool_t | _dbus_pending_call_get_completed_unlocked (DBusPendingCall *pending) |
Checks whether the pending call has received a reply yet, or not. | |
dbus_bool_t | _dbus_pending_call_set_data_unlocked (DBusPendingCall *pending, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func) |
Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the data when the data is set again, or when the pending call is finalized. |
The guts of DBusPendingCall and its methods.
|
Calls notifier function for the pending call and sets the call to completed.
Definition at line 186 of file dbus-pending-call.c. References _dbus_assert, DBusPendingCall::completed, dbus_pending_call_get_data(), DBusPendingCall::function, and TRUE. |
|
Checks whether the pending call has received a reply yet, or not. Assumes connection lock is held.
Definition at line 455 of file dbus-pending-call.c. References DBusPendingCall::completed. Referenced by _dbus_connection_block_pending_call(). |
|
Gets the connection associated with this pending call.
Definition at line 305 of file dbus-pending-call.c. References _dbus_assert, DBusPendingCall::connection, CONNECTION_LOCK, and NULL. Referenced by _dbus_connection_block_pending_call(). |
|
Gets the connection associated with this pending call.
Definition at line 320 of file dbus-pending-call.c. References _dbus_assert, DBusPendingCall::connection, and NULL. |
|
Gets the reply's serial number.
Definition at line 275 of file dbus-pending-call.c. References _dbus_assert, NULL, and DBusPendingCall::reply_serial. Referenced by _dbus_connection_block_pending_call(). |
|
Retrives the timeout.
Definition at line 261 of file dbus-pending-call.c. References _dbus_assert, NULL, and DBusPendingCall::timeout. Referenced by _dbus_connection_block_pending_call(), and _dbus_connection_queue_received_message_link(). |
|
Checks to see if a timeout has been added.
Definition at line 230 of file dbus-pending-call.c. References _dbus_assert, NULL, and DBusPendingCall::timeout_added. Referenced by _dbus_connection_queue_received_message_link(). |
|
Creates a new pending reply object.
Definition at line 91 of file dbus-pending-call.c. References _dbus_assert, _dbus_connection_ref_unlocked(), _dbus_data_slot_list_init(), _dbus_timeout_new(), DBusPendingCall::connection, dbus_free(), dbus_new0, dbus_pending_call_allocate_data_slot(), dbus_pending_call_free_data_slot(), NULL, DBusPendingCall::refcount, DBusPendingCall::slot_list, DBusPendingCall::timeout, and DBusAtomic::value. Referenced by dbus_connection_send_with_reply(). |
|
If the pending call hasn't been timed out, add its timeout error reply to the connection's incoming message queue.
Definition at line 210 of file dbus-pending-call.c. References _dbus_assert, _dbus_connection_queue_synthesized_message_link(), DBusPendingCall::connection, NULL, and DBusPendingCall::timeout_link. |
|
Increments the reference count on a pending call, while the lock on its connection is already held.
Definition at line 374 of file dbus-pending-call.c. References DBusPendingCall::refcount, and DBusAtomic::value. |
|
Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the data when the data is set again, or when the pending call is finalized. The slot number must have been allocated with dbus_pending_call_allocate_data_slot().
Definition at line 477 of file dbus-pending-call.c. References _dbus_data_slot_list_set(), DBusPendingCall::connection, CONNECTION_LOCK, CONNECTION_UNLOCK, and DBusPendingCall::slot_list. Referenced by dbus_pending_call_set_data(), and dbus_pending_call_set_notify(). |
|
Sets the reply's serial number.
Definition at line 289 of file dbus-pending-call.c. References _dbus_assert, NULL, and DBusPendingCall::reply_serial. Referenced by _dbus_pending_call_set_timeout_error_unlocked(). |
|
Sets the reply of a pending call with the given message, or if the message is NULL, by timing out the pending call.
Definition at line 154 of file dbus-pending-call.c. References _dbus_assert, _dbus_list_clear(), DBusList::data, dbus_message_get_reply_serial(), dbus_message_get_type(), dbus_message_ref(), DBUS_MESSAGE_TYPE_ERROR, DBUS_MESSAGE_TYPE_METHOD_RETURN, NULL, DBusPendingCall::reply, DBusPendingCall::reply_serial, and DBusPendingCall::timeout_link. |
|
Sets wether the timeout has been added.
Definition at line 245 of file dbus-pending-call.c. References _dbus_assert, NULL, and DBusPendingCall::timeout_added. Referenced by _dbus_connection_queue_received_message_link(). |
|
Sets the reply message associated with the pending call to a timeout error.
Definition at line 336 of file dbus-pending-call.c. References _dbus_list_alloc_link(), _dbus_pending_call_set_reply_serial_unlocked(), DBUS_ERROR_NO_REPLY, dbus_message_new_error(), dbus_message_unref(), FALSE, NULL, DBusPendingCall::timeout_link, and TRUE. Referenced by dbus_connection_send_with_reply(). |
|
Decrements the reference count on a pending call, freeing it if the count reaches 0. Assumes connection lock is already held.
Definition at line 433 of file dbus-pending-call.c. References _dbus_assert, DBusPendingCall::connection, CONNECTION_UNLOCK, DBusPendingCall::refcount, and DBusAtomic::value. |