Data Structures | |
struct | DBusTimeout |
Internals of DBusTimeout. More... | |
struct | DBusTimeoutList |
DBusTimeoutList implementation details. More... | |
Typedefs | |
typedef DBusTimeoutList | DBusTimeoutList |
Opaque data type representing a list of timeouts and a set of DBusAddTimeoutFunction/DBusRemoveTimeoutFunction. | |
Functions | |
DBusTimeout * | _dbus_timeout_new (int interval, DBusTimeoutHandler handler, void *data, DBusFreeFunction free_data_function) |
Creates a new DBusTimeout, enabled by default. | |
DBusTimeout * | _dbus_timeout_ref (DBusTimeout *timeout) |
Increments the reference count of a DBusTimeout object. | |
void | _dbus_timeout_unref (DBusTimeout *timeout) |
Decrements the reference count of a DBusTimeout object and finalizes the object if the count reaches zero. | |
void | _dbus_timeout_set_interval (DBusTimeout *timeout, int interval) |
Changes the timeout interval. | |
void | _dbus_timeout_set_enabled (DBusTimeout *timeout, dbus_bool_t enabled) |
Changes the timeout's enabled-ness. | |
DBusTimeoutList * | _dbus_timeout_list_new (void) |
Creates a new timeout list. | |
void | _dbus_timeout_list_free (DBusTimeoutList *timeout_list) |
Frees a DBusTimeoutList. | |
dbus_bool_t | _dbus_timeout_list_set_functions (DBusTimeoutList *timeout_list, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function) |
Sets the timeout functions. | |
dbus_bool_t | _dbus_timeout_list_add_timeout (DBusTimeoutList *timeout_list, DBusTimeout *timeout) |
Adds a new timeout to the timeout list, invoking the application DBusAddTimeoutFunction if appropriate. | |
void | _dbus_timeout_list_remove_timeout (DBusTimeoutList *timeout_list, DBusTimeout *timeout) |
Removes a timeout from the timeout list, invoking the application's DBusRemoveTimeoutFunction if appropriate. | |
void | _dbus_timeout_list_toggle_timeout (DBusTimeoutList *timeout_list, DBusTimeout *timeout, dbus_bool_t enabled) |
Sets a timeout to the given enabled state, invoking the application's DBusTimeoutToggledFunction if appropriate. |
|
Opaque data type representing a list of timeouts and a set of DBusAddTimeoutFunction/DBusRemoveTimeoutFunction. Automatically handles removing/re-adding timeouts when the DBusAddTimeoutFunction is updated or changed. Holds a reference count to each timeout. Definition at line 31 of file dbus-timeout.h. |
|
Adds a new timeout to the timeout list, invoking the application DBusAddTimeoutFunction if appropriate.
Definition at line 309 of file dbus-timeout.c. References _dbus_list_append(), _dbus_list_remove_last(), _dbus_timeout_ref(), _dbus_timeout_unref(), DBusTimeoutList::add_timeout_function, FALSE, NULL, DBusTimeoutList::timeout_data, DBusTimeoutList::timeouts, and TRUE. Referenced by _dbus_connection_add_timeout(), and _dbus_server_add_timeout(). |
|
Frees a DBusTimeoutList.
Definition at line 210 of file dbus-timeout.c. References _dbus_list_clear(), _dbus_list_foreach(), _dbus_timeout_list_set_functions(), _dbus_timeout_unref(), dbus_free(), DBusForeachFunction, NULL, and DBusTimeoutList::timeouts. Referenced by _dbus_connection_new_for_transport(), _dbus_server_finalize_base(), and _dbus_server_init_base(). |
|
Creates a new timeout list. Returns NULL if insufficient memory exists.
Definition at line 193 of file dbus-timeout.c. References dbus_new0, and NULL. Referenced by _dbus_connection_new_for_transport(), and _dbus_server_init_base(). |
|
Removes a timeout from the timeout list, invoking the application's DBusRemoveTimeoutFunction if appropriate.
Definition at line 339 of file dbus-timeout.c. References _dbus_assert_not_reached, _dbus_list_remove(), _dbus_timeout_unref(), NULL, DBusTimeoutList::remove_timeout_function, DBusTimeoutList::timeout_data, and DBusTimeoutList::timeouts. Referenced by _dbus_connection_remove_timeout(), and _dbus_server_remove_timeout(). |
|
Sets the timeout functions. This function is the "backend" for dbus_connection_set_timeout_functions().
Definition at line 238 of file dbus-timeout.c. References _dbus_list_foreach(), _dbus_list_get_first_link(), _dbus_list_get_next_link, DBusTimeoutList::add_timeout_function, DBusList::data, DBusForeachFunction, DBusFreeFunction, FALSE, NULL, DBusTimeoutList::remove_timeout_function, DBusTimeoutList::timeout_data, DBusTimeoutList::timeout_free_data_function, DBusTimeoutList::timeout_toggled_function, DBusTimeoutList::timeouts, and TRUE. Referenced by _dbus_timeout_list_free(), dbus_connection_set_timeout_functions(), and dbus_server_set_timeout_functions(). |
|
Sets a timeout to the given enabled state, invoking the application's DBusTimeoutToggledFunction if appropriate.
Definition at line 361 of file dbus-timeout.c. References dbus_bool_t, DBusTimeout::enabled, NULL, DBusTimeoutList::timeout_data, and DBusTimeoutList::timeout_toggled_function. Referenced by _dbus_connection_toggle_timeout(), and _dbus_server_toggle_timeout(). |
|
Creates a new DBusTimeout, enabled by default.
Definition at line 62 of file dbus-timeout.c. References dbus_new0, DBusFreeFunction, DBusTimeout::enabled, DBusTimeout::free_handler_data_function, DBusTimeout::handler, DBusTimeout::handler_data, DBusTimeout::interval, NULL, DBusTimeout::refcount, and TRUE. Referenced by _dbus_pending_call_new(). |
|
Increments the reference count of a DBusTimeout object.
Definition at line 92 of file dbus-timeout.c. References DBusTimeout::refcount. Referenced by _dbus_timeout_list_add_timeout(). |
|
Changes the timeout's enabled-ness. Note that you should use _dbus_connection_toggle_timeout() etc. instead, if the timeout is passed out to an application main loop. i.e. you can't use this function in the D-BUS library, it's only used in the message bus daemon implementation.
Definition at line 152 of file dbus-timeout.c. References dbus_bool_t, DBusTimeout::enabled, and FALSE. |
|
Changes the timeout interval. Note that you have to disable and re-enable the timeout using the timeout toggle function (_dbus_connection_toggle_timeout() etc.) to notify the application of this change.
Definition at line 133 of file dbus-timeout.c. References _dbus_assert, and DBusTimeout::interval. |
|
Decrements the reference count of a DBusTimeout object and finalizes the object if the count reaches zero.
Definition at line 106 of file dbus-timeout.c. References _dbus_assert, dbus_free(), dbus_timeout_set_data(), DBusTimeout::free_handler_data_function, DBusTimeout::handler_data, NULL, and DBusTimeout::refcount. Referenced by _dbus_timeout_list_add_timeout(), _dbus_timeout_list_free(), _dbus_timeout_list_remove_timeout(), and dbus_pending_call_unref(). |