D-Bus 1.14.10
|
Implementation details of DBusServer. More...
Data Structures | |
struct | DBusServer |
Internals of DBusServer object. More... | |
Typedefs | |
typedef dbus_bool_t(* | DBusWatchAddFunction) (DBusWatchList *list, DBusWatch *watch) |
Function to be called in protected_change_watch() with refcount held. More... | |
typedef void(* | DBusWatchRemoveFunction) (DBusWatchList *list, DBusWatch *watch) |
Function to be called in protected_change_watch() with refcount held. More... | |
typedef void(* | DBusWatchToggleFunction) (DBusWatchList *list, DBusWatch *watch, dbus_bool_t enabled) |
Function to be called in protected_change_watch() with refcount held. More... | |
typedef dbus_bool_t(* | DBusTimeoutAddFunction) (DBusTimeoutList *list, DBusTimeout *timeout) |
Function to be called in protected_change_timeout() with refcount held. More... | |
typedef void(* | DBusTimeoutRemoveFunction) (DBusTimeoutList *list, DBusTimeout *timeout) |
Function to be called in protected_change_timeout() with refcount held. More... | |
typedef void(* | DBusTimeoutToggleFunction) (DBusTimeoutList *list, DBusTimeout *timeout, dbus_bool_t enabled) |
Function to be called in protected_change_timeout() with refcount held. More... | |
Functions | |
void | _dbus_server_trace_ref (DBusServer *server, int old_refcount, int new_refcount, const char *why) |
dbus_bool_t | _dbus_server_init_base (DBusServer *server, const DBusServerVTable *vtable, const DBusString *address, DBusError *error) |
Initializes the members of the DBusServer base class. More... | |
void | _dbus_server_finalize_base (DBusServer *server) |
Finalizes the members of the DBusServer base class. More... | |
dbus_bool_t | _dbus_server_add_watch (DBusServer *server, DBusWatch *watch) |
Adds a watch for this server, chaining out to application-provided watch handlers. More... | |
void | _dbus_server_remove_watch (DBusServer *server, DBusWatch *watch) |
Removes a watch previously added with _dbus_server_remove_watch(). More... | |
void | _dbus_server_toggle_all_watches (DBusServer *server, dbus_bool_t enabled) |
Toggles all watch and notifies app via server's DBusWatchToggledFunction if available. More... | |
dbus_bool_t | _dbus_server_add_timeout (DBusServer *server, DBusTimeout *timeout) |
Adds a timeout for this server, chaining out to application-provided timeout handlers. More... | |
void | _dbus_server_remove_timeout (DBusServer *server, DBusTimeout *timeout) |
Removes a timeout previously added with _dbus_server_add_timeout(). More... | |
void | _dbus_server_toggle_timeout (DBusServer *server, DBusTimeout *timeout, dbus_bool_t enabled) |
Toggles a timeout and notifies app via server's DBusTimeoutToggledFunction if available. More... | |
void | _dbus_server_ref_unlocked (DBusServer *server) |
Like dbus_server_ref() but does not acquire the lock (must already be held) More... | |
void | _dbus_server_unref_unlocked (DBusServer *server) |
Like dbus_server_unref() but does not acquire the lock (must already be held) More... | |
Implementation details of DBusServer.
typedef dbus_bool_t(* DBusTimeoutAddFunction) (DBusTimeoutList *list, DBusTimeout *timeout) |
Function to be called in protected_change_timeout() with refcount held.
Definition at line 337 of file dbus-server.c.
typedef void(* DBusTimeoutRemoveFunction) (DBusTimeoutList *list, DBusTimeout *timeout) |
Function to be called in protected_change_timeout() with refcount held.
Definition at line 340 of file dbus-server.c.
typedef void(* DBusTimeoutToggleFunction) (DBusTimeoutList *list, DBusTimeout *timeout, dbus_bool_t enabled) |
Function to be called in protected_change_timeout() with refcount held.
Definition at line 343 of file dbus-server.c.
typedef dbus_bool_t(* DBusWatchAddFunction) (DBusWatchList *list, DBusWatch *watch) |
Function to be called in protected_change_watch() with refcount held.
Definition at line 230 of file dbus-server.c.
typedef void(* DBusWatchRemoveFunction) (DBusWatchList *list, DBusWatch *watch) |
Function to be called in protected_change_watch() with refcount held.
Definition at line 233 of file dbus-server.c.
typedef void(* DBusWatchToggleFunction) (DBusWatchList *list, DBusWatch *watch, dbus_bool_t enabled) |
Function to be called in protected_change_watch() with refcount held.
Definition at line 236 of file dbus-server.c.
dbus_bool_t _dbus_server_add_timeout | ( | DBusServer * | server, |
DBusTimeout * | timeout | ||
) |
Adds a timeout for this server, chaining out to application-provided timeout handlers.
The timeout should be repeatedly handled with dbus_timeout_handle() at its given interval until it is removed.
server | the server. |
timeout | the timeout to add. |
Definition at line 405 of file dbus-server.c.
dbus_bool_t _dbus_server_add_watch | ( | DBusServer * | server, |
DBusWatch * | watch | ||
) |
Adds a watch for this server, chaining out to application-provided watch handlers.
server | the server. |
watch | the watch to add. |
Definition at line 296 of file dbus-server.c.
void _dbus_server_finalize_base | ( | DBusServer * | server | ) |
Finalizes the members of the DBusServer base class.
Chained up to by subclass finalizers.
server | the server. |
Definition at line 201 of file dbus-server.c.
References _dbus_assert, _dbus_data_slot_list_free(), _dbus_rmutex_free_at_location(), _dbus_string_free(), _dbus_timeout_list_free(), _dbus_watch_list_free(), DBusServer::address, DBusServer::auth_mechanisms, dbus_free(), dbus_free_string_array(), dbus_server_set_new_connection_function(), DBusServer::disconnected, DBusServer::guid_hex, DBusServer::have_server_lock, DBusServer::mutex, NULL, DBusServer::slot_list, DBusServer::timeouts, and DBusServer::watches.
dbus_bool_t _dbus_server_init_base | ( | DBusServer * | server, |
const DBusServerVTable * | vtable, | ||
const DBusString * | address, | ||
DBusError * | error | ||
) |
Initializes the members of the DBusServer base class.
Chained up to by subclass constructors.
server | the server. |
vtable | the vtable for the subclass. |
address | the server's address |
error | location to store reason for failure |
Definition at line 112 of file dbus-server.c.
References _dbus_assert, _dbus_atomic_inc(), _dbus_generate_uuid(), _dbus_string_init(), _dbus_uuid_encode(), DBusServer::address, FALSE, DBusServer::guid, DBusServer::guid_hex, NULL, DBusServer::published_address, DBusServer::refcount, DBusServer::timeouts, DBusServer::vtable, and DBusServer::watches.
void _dbus_server_ref_unlocked | ( | DBusServer * | server | ) |
Like dbus_server_ref() but does not acquire the lock (must already be held)
server | the server. |
Definition at line 456 of file dbus-server.c.
References _dbus_assert, _dbus_atomic_inc(), NULL, and DBusServer::refcount.
void _dbus_server_remove_timeout | ( | DBusServer * | server, |
DBusTimeout * | timeout | ||
) |
Removes a timeout previously added with _dbus_server_add_timeout().
server | the server. |
timeout | the timeout to remove. |
Definition at line 420 of file dbus-server.c.
void _dbus_server_remove_watch | ( | DBusServer * | server, |
DBusWatch * | watch | ||
) |
Removes a watch previously added with _dbus_server_remove_watch().
server | the server. |
watch | the watch to remove. |
Definition at line 312 of file dbus-server.c.
void _dbus_server_toggle_all_watches | ( | DBusServer * | server, |
dbus_bool_t | enabled | ||
) |
Toggles all watch and notifies app via server's DBusWatchToggledFunction if available.
server | the server. |
enabled | whether to enable or disable |
Definition at line 330 of file dbus-server.c.
References _dbus_watch_list_toggle_all_watches(), and DBusServer::watches.
void _dbus_server_toggle_timeout | ( | DBusServer * | server, |
DBusTimeout * | timeout, | ||
dbus_bool_t | enabled | ||
) |
Toggles a timeout and notifies app via server's DBusTimeoutToggledFunction if available.
It's an error to call this function on a timeout that was not previously added.
server | the server. |
timeout | the timeout to toggle. |
enabled | whether to enable or disable |
Definition at line 439 of file dbus-server.c.
void _dbus_server_trace_ref | ( | DBusServer * | server, |
int | old_refcount, | ||
int | new_refcount, | ||
const char * | why | ||
) |
Definition at line 58 of file dbus-server.c.
void _dbus_server_unref_unlocked | ( | DBusServer * | server | ) |
Like dbus_server_unref() but does not acquire the lock (must already be held)
server | the server. |
Definition at line 475 of file dbus-server.c.
References _dbus_assert, _dbus_atomic_dec(), NULL, and DBusServer::refcount.