Typedefs | |
typedef DBusTransport | DBusTransport |
Opaque object representing a way message stream. | |
Functions | |
dbus_bool_t | _dbus_transport_init_base (DBusTransport *transport, const DBusTransportVTable *vtable, dbus_bool_t server, const DBusString *address) |
Initializes the base class members of DBusTransport. | |
void | _dbus_transport_finalize_base (DBusTransport *transport) |
Finalizes base class members of DBusTransport. | |
DBusTransport * | _dbus_transport_open (const char *address, DBusError *error) |
Opens a new transport for the given address. | |
DBusTransport * | _dbus_transport_ref (DBusTransport *transport) |
Increments the reference count for the transport. | |
void | _dbus_transport_unref (DBusTransport *transport) |
Decrements the reference count for the transport. | |
void | _dbus_transport_disconnect (DBusTransport *transport) |
Closes our end of the connection to a remote application. | |
dbus_bool_t | _dbus_transport_get_is_connected (DBusTransport *transport) |
Returns TRUE if the transport has not been disconnected. | |
dbus_bool_t | _dbus_transport_get_is_authenticated (DBusTransport *transport) |
Returns TRUE if we have been authenticated. | |
const char * | _dbus_transport_get_address (DBusTransport *transport) |
Gets the address of a transport. | |
dbus_bool_t | _dbus_transport_handle_watch (DBusTransport *transport, DBusWatch *watch, unsigned int condition) |
Handles a watch by reading data, writing data, or disconnecting the transport, as appropriate for the given condition. | |
dbus_bool_t | _dbus_transport_set_connection (DBusTransport *transport, DBusConnection *connection) |
Sets the connection using this transport. | |
void | _dbus_transport_messages_pending (DBusTransport *transport, int queue_length) |
Notifies the transport when the outgoing message queue goes from empty to non-empty or vice versa. | |
dbus_bool_t | _dbus_transport_get_unix_fd (DBusTransport *transport, int *fd_p) |
Get the UNIX file descriptor, if any. | |
void | _dbus_transport_do_iteration (DBusTransport *transport, unsigned int flags, int timeout_milliseconds) |
Performs a single poll()/select() on the transport's file descriptors and then reads/writes data as appropriate, queueing incoming messages and sending outgoing messages. | |
DBusDispatchStatus | _dbus_transport_get_dispatch_status (DBusTransport *transport) |
Reports our current dispatch status (whether there's buffered data to be queued as messages, or not, or we need memory). | |
dbus_bool_t | _dbus_transport_queue_messages (DBusTransport *transport) |
Processes data we've read while handling a watch, potentially converting some of it to messages and queueing those messages on the connection. | |
void | _dbus_transport_set_max_message_size (DBusTransport *transport, long size) |
See dbus_connection_set_max_message_size(). | |
long | _dbus_transport_get_max_message_size (DBusTransport *transport) |
See dbus_connection_get_max_message_size(). | |
void | _dbus_transport_set_max_received_size (DBusTransport *transport, long size) |
See dbus_connection_set_max_received_size(). | |
long | _dbus_transport_get_max_received_size (DBusTransport *transport) |
See dbus_connection_get_max_received_size(). | |
dbus_bool_t | _dbus_transport_get_unix_user (DBusTransport *transport, unsigned long *uid) |
See dbus_connection_get_unix_user(). | |
dbus_bool_t | _dbus_transport_get_unix_process_id (DBusTransport *transport, unsigned long *pid) |
See dbus_connection_get_unix_process_id(). | |
void | _dbus_transport_set_unix_user_function (DBusTransport *transport, DBusAllowUnixUserFunction function, void *data, DBusFreeFunction free_data_function, void **old_data, DBusFreeFunction *old_free_data_function) |
See dbus_connection_set_unix_user_function(). | |
dbus_bool_t | _dbus_transport_set_auth_mechanisms (DBusTransport *transport, const char **mechanisms) |
Sets the SASL authentication mechanisms supported by this transport. |
Types and functions related to DBusTransport. A transport is an abstraction that can send and receive data via various kinds of network connections or other IPC mechanisms.
|
Opaque object representing a way message stream. DBusTransport abstracts various kinds of actual transport mechanism, such as different network protocols, or encryption schemes. Definition at line 32 of file dbus-transport.h. |
|
Closes our end of the connection to a remote application. Further attempts to use this transport will fail. Only the first call to _dbus_transport_disconnect() will have an effect.
References _dbus_assert, DBusTransportVTable::disconnect, disconnected, NULL, TRUE, and vtable. Referenced by _dbus_transport_finalize_base(), _dbus_transport_get_is_authenticated(), _dbus_transport_queue_messages(), and dbus_connection_disconnect(). |
|
Performs a single poll()/select() on the transport's file descriptors and then reads/writes data as appropriate, queueing incoming messages and sending outgoing messages. This is the backend for _dbus_connection_do_iteration(). See _dbus_connection_do_iteration() for full details.
References _dbus_assert, _dbus_transport_ref(), _dbus_transport_unref(), disconnected, DBusTransportVTable::do_iteration, NULL, and vtable. Referenced by _dbus_connection_do_iteration(). |
|
Finalizes base class members of DBusTransport. Chained up to from subclass finalizers.
References _dbus_auth_unref(), _dbus_counter_set_notify(), _dbus_counter_unref(), _dbus_message_loader_unref(), _dbus_transport_disconnect(), address, auth, dbus_free(), disconnected, free_unix_user_data, live_messages_size, loader, NULL, and unix_user_data. |
|
Gets the address of a transport. It will be NULL for a server-side transport.
References address. |
|
Reports our current dispatch status (whether there's buffered data to be queued as messages, or not, or we need memory).
References _dbus_auth_do_work(), _dbus_counter_get_value(), _dbus_message_loader_peek_message(), _dbus_message_loader_queue_messages(), _dbus_transport_get_is_authenticated(), auth, live_messages_size, loader, max_live_messages_size, NULL, TRUE, and unused_bytes_recovered. Referenced by _dbus_transport_queue_messages(). |
|
Returns TRUE if we have been authenticated. Will return TRUE even if the transport is disconnected.
References _dbus_auth_do_work(), _dbus_auth_get_identity(), _dbus_credentials_from_current_process(), _dbus_credentials_match(), _dbus_transport_disconnect(), auth, authenticated, connection, dbus_bool_t, disconnected, FALSE, is_server, NULL, receive_credentials_pending, send_credentials_pending, TRUE, DBusCredentials::uid, unix_user_data, and unix_user_function. Referenced by _dbus_connection_message_sent(), _dbus_connection_queue_received_message_link(), _dbus_transport_get_dispatch_status(), dbus_connection_get_is_authenticated(), dbus_connection_get_unix_process_id(), and dbus_connection_get_unix_user(). |
|
Returns TRUE if the transport has not been disconnected. Disconnection can result from _dbus_transport_disconnect() or because the server drops its end of the connection.
References disconnected. |
|
See dbus_connection_get_max_message_size().
References _dbus_message_loader_get_max_message_size(), and loader. Referenced by dbus_connection_get_max_message_size(). |
|
See dbus_connection_get_max_received_size().
References max_live_messages_size. Referenced by dbus_connection_get_max_received_size(). |
|
Get the UNIX file descriptor, if any.
References _dbus_transport_ref(), _dbus_transport_unref(), dbus_bool_t, disconnected, FALSE, DBusTransportVTable::get_unix_fd, NULL, and vtable. Referenced by dbus_connection_get_unix_fd(). |
|
See dbus_connection_get_unix_process_id().
References _dbus_auth_get_identity(), auth, authenticated, FALSE, DBusCredentials::pid, and TRUE. Referenced by dbus_connection_get_unix_process_id(). |
|
See dbus_connection_get_unix_user().
References _dbus_auth_get_identity(), _DBUS_INT_MAX, auth, authenticated, FALSE, TRUE, and DBusCredentials::uid. Referenced by dbus_connection_get_unix_user(). |
|
Handles a watch by reading data, writing data, or disconnecting the transport, as appropriate for the given condition.
References _dbus_assert, _dbus_transport_ref(), _dbus_transport_unref(), _dbus_warn(), _dbus_watch_ref(), _dbus_watch_sanitize_condition(), _dbus_watch_unref(), dbus_bool_t, dbus_watch_get_fd(), disconnected, DBusTransportVTable::handle_watch, NULL, TRUE, and vtable. Referenced by _dbus_connection_handle_watch(). |
|
|
Notifies the transport when the outgoing message queue goes from empty to non-empty or vice versa. Typically causes the transport to add or remove its DBUS_WATCH_WRITABLE watch.
References _dbus_assert, _dbus_transport_ref(), _dbus_transport_unref(), disconnected, messages_need_sending, DBusTransportVTable::messages_pending, NULL, and vtable. Referenced by _dbus_connection_message_sent(). |
|
Opens a new transport for the given address. (This opens a client-side-of-the-connection transport.)
References _dbus_string_free(), _dbus_string_init_const(), _dbus_string_parse_int(), _dbus_transport_new_for_domain_socket(), _dbus_transport_new_for_tcp_socket(), dbus_address_entries_free(), dbus_address_entry_get_method(), dbus_address_entry_get_value(), dbus_bool_t, dbus_error_free(), dbus_error_init(), dbus_move_error(), dbus_parse_address(), dbus_set_error(), FALSE, NULL, and TRUE. Referenced by dbus_connection_open(). |
|
Processes data we've read while handling a watch, potentially converting some of it to messages and queueing those messages on the connection.
References _dbus_assert, _dbus_connection_queue_received_message_link(), _dbus_message_add_size_counter(), _dbus_message_loader_get_is_corrupted(), _dbus_message_loader_pop_message_link(), _dbus_message_loader_putback_message_link(), _dbus_transport_disconnect(), _dbus_transport_get_dispatch_status(), connection, DBusList::data, live_messages_size, loader, and NULL. |
|
Increments the reference count for the transport.
References _dbus_assert, and refcount. Referenced by _dbus_connection_new_for_transport(), _dbus_transport_do_iteration(), _dbus_transport_get_unix_fd(), _dbus_transport_handle_watch(), _dbus_transport_messages_pending(), and _dbus_transport_set_connection(). |
|
Sets the SASL authentication mechanisms supported by this transport.
References _dbus_auth_set_mechanisms(), and auth. |
|
Sets the connection using this transport. Allows the transport to add watches to the connection, queue incoming messages, and pull outgoing messages.
References _dbus_assert, _dbus_transport_ref(), _dbus_transport_unref(), connection, DBusTransportVTable::connection_set, NULL, and vtable. Referenced by _dbus_connection_new_for_transport(). |
|
See dbus_connection_set_max_message_size().
References _dbus_message_loader_set_max_message_size(), and loader. Referenced by dbus_connection_set_max_message_size(). |
|
See dbus_connection_set_max_received_size().
References _dbus_counter_set_notify(), live_messages_size, and max_live_messages_size. Referenced by dbus_connection_set_max_received_size(). |
|
See dbus_connection_set_unix_user_function().
References DBusFreeFunction, free_unix_user_data, unix_user_data, and unix_user_function. Referenced by dbus_connection_set_unix_user_function(). |
|
Decrements the reference count for the transport. Disconnects and finalizes the transport if the reference count reaches zero.
References _dbus_assert, DBusTransportVTable::finalize, NULL, refcount, and vtable. Referenced by _dbus_transport_do_iteration(), _dbus_transport_get_unix_fd(), _dbus_transport_handle_watch(), _dbus_transport_messages_pending(), _dbus_transport_set_connection(), and dbus_connection_open(). |