DBusServerDebugPipe
[D-Bus secret internal implementation details]

In-process pipe debug server used in unit tests. More...

Data Structures

struct  DBusServerDebugPipe
 Implementation details of DBusServerDebugPipe. More...

Typedefs

typedef DBusServerDebugPipe DBusServerDebugPipe
 Opaque object representing a debug server implementation.

Functions

DBusServer_dbus_server_debug_pipe_new (const char *server_name, DBusError *error)
 Creates a new debug server using an in-process pipe.
DBusTransport_dbus_transport_debug_pipe_new (const char *server_name, DBusError *error)
 Creates the client-side transport for a debug-pipe connection connected to the given debug-pipe server name.
DBusServerListenResult _dbus_server_listen_debug_pipe (DBusAddressEntry *entry, DBusServer **server_p, DBusError *error)
 Tries to interpret the address entry as a debug pipe entry.
DBusTransportOpenResult _dbus_transport_open_debug_pipe (DBusAddressEntry *entry, DBusTransport **transport_p, DBusError *error)
 Opens a debug pipe transport, used in the test suite.

Detailed Description

In-process pipe debug server used in unit tests.

Types and functions related to DBusServerDebugPipe. This is used for unit testing.


Function Documentation

DBusServer* _dbus_server_debug_pipe_new ( const char *  server_name,
DBusError error 
)

Creates a new debug server using an in-process pipe.

Parameters:
server_name the name of the server.
error address where an error can be returned.
Returns:
a new server, or NULL on failure.

Definition at line 132 of file dbus-server-debug-pipe.c.

References _dbus_address_append_escaped(), _dbus_hash_table_insert_string(), _dbus_hash_table_lookup_string(), _dbus_server_finalize_base(), _dbus_server_init_base(), _dbus_strdup(), _dbus_string_append(), _dbus_string_free(), _dbus_string_init(), _dbus_string_init_const(), base, DBUS_ERROR_ADDRESS_IN_USE, DBUS_ERROR_NO_MEMORY, dbus_free(), dbus_new0, dbus_set_error(), name, and NULL.

Referenced by _dbus_server_listen_debug_pipe().

DBusServerListenResult _dbus_server_listen_debug_pipe ( DBusAddressEntry entry,
DBusServer **  server_p,
DBusError error 
)

Tries to interpret the address entry as a debug pipe entry.

Sets error if the result is not OK.

Parameters:
entry an address entry
server_p location to store a new DBusServer, or NULL on failure.
error location to store rationale for failure on bad address
Returns:
the outcome

Definition at line 338 of file dbus-server-debug-pipe.c.

References _dbus_server_debug_pipe_new(), _dbus_set_bad_address(), dbus_address_entry_get_method(), dbus_address_entry_get_value(), and NULL.

DBusTransport* _dbus_transport_debug_pipe_new ( const char *  server_name,
DBusError error 
)

Creates the client-side transport for a debug-pipe connection connected to the given debug-pipe server name.

Parameters:
server_name name of server to connect to
error address where an error can be returned.
Returns:
NULL on no memory or transport

Definition at line 206 of file dbus-server-debug-pipe.c.

References _dbus_close_socket(), _dbus_connection_close_if_only_one_ref(), _dbus_connection_new_for_transport(), _dbus_fd_set_close_on_exec(), _dbus_full_duplex_pipe(), _dbus_hash_table_lookup_string(), _dbus_string_append(), _dbus_string_free(), _dbus_string_init(), _dbus_transport_new_for_socket(), _dbus_transport_set_auth_mechanisms(), _dbus_transport_unref(), dbus_connection_unref(), DBUS_ERROR_FAILED, DBUS_ERROR_NO_MEMORY, DBUS_ERROR_NO_SERVER, dbus_server_ref(), dbus_server_unref(), dbus_set_error(), FALSE, and NULL.

Referenced by _dbus_transport_open_debug_pipe().

DBusTransportOpenResult _dbus_transport_open_debug_pipe ( DBusAddressEntry entry,
DBusTransport **  transport_p,
DBusError error 
)

Opens a debug pipe transport, used in the test suite.

Parameters:
entry the address entry to try opening as debug-pipe
transport_p return location for the opened transport
error error to be set
Returns:
result of the attempt

Definition at line 388 of file dbus-server-debug-pipe.c.

References _dbus_assert, _dbus_set_bad_address(), _dbus_transport_debug_pipe_new(), dbus_address_entry_get_method(), dbus_address_entry_get_value(), and NULL.


Generated on Wed Aug 29 12:15:05 2007 for D-Bus by  doxygen 1.5.2