From 5ebb5748c2a7587c734eeed9c66f2a1fc0635d09 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Thu, 30 Jan 2003 20:49:11 +0000 Subject: 2003-01-30 Anders Carlsson * dbus/Makefile.am: Add dbus-address.[ch] * dbus/dbus-address.c: (dbus_address_entry_free), (dbus_address_entries_free), (create_entry), (dbus_address_entry_get_method), (dbus_address_entry_get_value), (dbus_parse_address), (_dbus_address_test): * dbus/dbus-address.h: New files for dealing with address parsing. * dbus/dbus-connection.c: Document timeout functions. * dbus/dbus-message.c: Document dbus_message_new_from_message. * dbus/dbus-server-debug.c: Document. * dbus/dbus-server.c: (dbus_server_listen): Parse address and use correct server implementation. * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test): * dbus/dbus-string.h: New function with test. * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests): * dbus/dbus-test.h: Add address tests. * dbus/dbus-transport-debug.c: Document. * dbus/dbus-transport.c: (_dbus_transport_open): Parse address and use correct transport implementation. --- dbus/dbus-transport-debug.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'dbus/dbus-transport-debug.c') diff --git a/dbus/dbus-transport-debug.c b/dbus/dbus-transport-debug.c index 7a2250a2..f829fc29 100644 --- a/dbus/dbus-transport-debug.c +++ b/dbus/dbus-transport-debug.c @@ -41,18 +41,28 @@ * @{ */ +/** + * Default timeout interval when reading or writing. + */ #define DEFAULT_INTERVAL 10 +/** + * Opaque object representing a debug transport. + * + */ typedef struct DBusTransportDebug DBusTransportDebug; +/** + * Implementation details of DBusTransportDebug. All members are private. + */ struct DBusTransportDebug { DBusTransport base; /**< Parent instance */ - DBusTimeout *write_timeout; - DBusTimeout *read_timeout; + DBusTimeout *write_timeout; /**< Timeout for reading. */ + DBusTimeout *read_timeout; /**< Timeout for writing. */ - DBusTransport *other_end; + DBusTransport *other_end; /**< The transport that this transport is connected to. */ }; static void @@ -142,7 +152,7 @@ do_writing (DBusTransport *transport) _dbus_connection_queue_received_message (((DBusTransportDebug *)transport)->other_end->connection, copy); - + dbus_message_unref (copy); } check_read_timeout (((DBusTransportDebug *)transport)->other_end); @@ -240,6 +250,13 @@ static DBusTransportVTable debug_vtable = { debug_live_messages_changed }; +/** + * Creates a new debug server transport. + * + * @param client the client transport that the server transport + * should use. + * @returns a new debug transport + */ DBusTransport* _dbus_transport_debug_server_new (DBusTransport *client) { @@ -267,6 +284,14 @@ _dbus_transport_debug_server_new (DBusTransport *client) return (DBusTransport *)debug_transport; } +/** + * Creates a new debug client transport. + * + * @param server_name name of the server transport that + * the client should try to connect to. + * @param result address where a result code can be returned. + * @returns a new transport, or #NULL on failure. + */ DBusTransport* _dbus_transport_debug_client_new (const char *server_name, DBusResultCode *result) -- cgit