summaryrefslogtreecommitdiffstats
path: root/bus
Commit message (Collapse)AuthorAgeFilesLines
* 2003-02-02 Anders Carlsson <set EMAIL_ADDRESS environment variable>Anders Carlsson2003-02-021-1/+1
| | | | | | | | * bus/driver.c: (bus_driver_handle_service_exists): Simplify the code a bit. * dbus/dbus-bus.c: (dbus_bus_service_exists): Fix a silly.
* 2003-02-02 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-021-3/+10
| | | | | * bus/Makefile.am: Add libdbus-daemon.la and link to it.
* 2003-02-01 James Willcox <jwillcox@gnome.org>James Willcox2003-02-021-0/+3
| | | | | * bus/driver.c: (bus_driver_handle_own_service): Actually include the service reply code in the message.
* 2003-02-02 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-021-5/+4
| | | | | * bus/driver.c: (bus_driver_handle_service_exists): Don't unref the incoming message.
* 2003-02-01 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-011-22/+2
| | | | | | | | | | | | | | | | | | * bus/driver.c: (create_unique_client_name), (bus_driver_handle_hello): Don't take a name, just use a numeric id to identify each client. * dbus/Makefile.am: * dbus/dbus-bus.c: (dbus_bus_register_client), (dbus_bus_acquire_service), (dbus_bus_service_exists): * dbus/dbus-bus.h: Add new convenience functions for communicating with the bus. * dbus/dbus-message.h: * dbus/dbus-protocol.h: Fix a typo.
* 2003-01-31 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-011-4/+4
| | | | | | | | | | | | | | | * doc/dbus-specification.sgml: work on the specification * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check the protocol version of the message. * dbus/dbus-protocol.h: drop special _REPLY names, the spec no longer specifies that. (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 1/2/3/4) * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing "break" for DBUS_TYPE_NIL, remove @todo
* 2003-01-27 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-275-52/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/dispatch.c: (bus_dispatch_message_handler): Dispatch messages sent to services. * bus/driver.c: (bus_driver_send_service_deleted), (bus_driver_send_service_created), (bus_driver_send_service_lost), (bus_driver_send_service_acquired): Add helper functions for sending service related messages. (bus_driver_send_welcome_message): Send HELLO_REPLY instead of WELCOME. (bus_driver_handle_list_services): Send LIST_SERVICES_REPLY instead of SERVICES. (bus_driver_handle_own_service), (bus_driver_handle_service_exists): New message handlers. (bus_driver_handle_message): Invoke new message handlers. (bus_driver_remove_connection): Don't remove any services here since that's done automatically by bus_service_remove_owner now. * bus/driver.h: New function signatures. * bus/services.c: (bus_service_add_owner): Send ServiceAcquired message if we're the only primary owner. (bus_service_remove_owner): Send ServiceAcquired/ServiceLost messages. (bus_service_set_prohibit_replacement), (bus_service_get_prohibit_replacement): Functions for setting prohibit replacement. (bus_service_has_owner): New function that checks if a connection is in the owner queue of a certain service. * bus/services.h: Add new function signatures. * dbus/dbus-list.c: (_dbus_list_test): Add tests for _dbus_list_remove_last and traversing the list backwards. * dbus/dbus-list.h: Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't go any further, so return NULL then. * dbus/dbus-protocol.h: Add new messages, service flags and service replies.
* 2003-01-26 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit tests pass, but otherwise untested. If it breaks, the tests should have been better. ;-) * bus/driver.c (bus_driver_handle_hello): return if we disconnect the connection. * dbus/dbus-message.c: redo everything so we maintain message->header as the only copy of the various fields. This avoids the possibility of out-of-memory in some cases, for example dbus_message_lock() can't run out of memory anymore, and avoids extra copying. Figured I may as well go ahead and do this since it was busted for dbus_message_lock to not return failure on OOM, and dbus_message_write_header was totally unchecked for OOM. Also fixed some random other bugs. * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify that strings are nul-terminated. Also, end_pos can be equal to string length just not greater than, I think. (_dbus_marshal_set_int32): new function (_dbus_marshal_set_uint32): new function (_dbus_marshal_set_string): new function * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix a warning, init timeout_list to NULL (dbus_connection_send_message): don't use uninitialized variable "serial" * dbus/dbus-string.c (_dbus_string_replace_len): new function
* 2003-01-26 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-261-2/+9
| | | | | | * bus/driver.c: (bus_driver_handle_hello), (bus_driver_send_welcome_message): Plug leaks
* 2003-01-25 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-256-168/+261
| | | | | | | | | | | | | | | | | | | * bus/Makefile.am: * bus/connection.c: (connection_disconnect_handler), (connection_watch_callback), (bus_connection_setup): * bus/dispatch.c: (send_one_message), (bus_dispatch_broadcast_message), (bus_dispatch_message_handler), (bus_dispatch_add_connection), (bus_dispatch_remove_connection): * bus/dispatch.h: * bus/driver.c: (bus_driver_send_service_deleted), (bus_driver_send_service_created), (bus_driver_handle_hello), (bus_driver_send_welcome_message), (bus_driver_handle_list_services), (bus_driver_remove_connection), (bus_driver_handle_message): * bus/driver.h: Refactor code, put the message dispatching in its own file. Use _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client is disconnected.
* 2003-01-24 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-251-4/+7
| | | | | | | | * dbus/dbus-list.c (alloc_link): put a thread lock on the global list_pool * bus/driver.c (bus_driver_handle_list_services): fix a leak on OOM
* 2003-01-25 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-245-11/+148
| | | | | | | | | | | | | | | | | | | | | | | | * bus/connection.c: (bus_connection_foreach): * bus/connection.h: Add new bus_connection_foreach function. * bus/driver.c: (send_one_message), (bus_driver_broadcast_message): Add function that broadcasts a message to all clients. (bus_driver_send_service_created), (bus_driver_handle_hello), (bus_driver_send_welcome_message), (bus_driver_handle_list_services), (bus_driver_message_handler): Implement functions that take care of listing services, and notifying clients when new services are created. * bus/services.c: (bus_services_list): * bus/services.h: Add new function that returns an array of strings with the currently registered services. * glib/dbus-glib.h: * glib/dbus-gmain.c: Update copyright year.
* 2003-01-22 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-222-2/+4
| | | | | | | * dbus/dbus-connection.c (dbus_connection_send_message_with_reply_and_block): add some @todo * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
* 2003-01-21 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-221-15/+49
| | | | | | | | | | (patch untested because can't compile) * bus/driver.c (create_unique_client_name): make this function never recycle client names. Also, caller should initialize the DBusString. * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
* 2003-01-21 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-218-6/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/Makefile.am: Add driver.[ch] * bus/connection.c: (connection_disconnect_handler): Remove the connection from the bus driver's list. (connection_watch_callback): Dispatch messages. (free_connection_data): Free connection name. (bus_connection_setup): Add connection to the bus driver's list. (bus_connection_remove_owned_service): (bus_connection_set_name), (bus_connection_get_name): Add functions for setting and getting the connection's name. * bus/connection.h: Add function headers. * bus/driver.c: (create_unique_client_name), (bus_driver_handle_hello_message), (bus_driver_send_welcome_message), (bus_driver_message_handler), (bus_driver_add_connection), (bus_driver_remove_connection): * bus/driver.h: * bus/main.c: * bus/services.c: (bus_service_free): * bus/services.h: New file that handles communication and registreation with the bus itself.
* 2003-01-18 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-181-12/+7
| | | | | | | | * dbus/dbus-connection.c (dbus_connection_unref): disconnect the connection if it hasn't been already. * dbus/dbus-connection.h: kill off the idea of an ErrorFunction, replace with DisconnectFunction.
* 2003-01-14 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-142-3/+5
| | | | | | | | | | | | | | | | * bus/connection.c: (connection_error_handler), (bus_connection_setup): * bus/main.c: (main): Make sure that the DBusConnectionData struct is NULLed out to prevent a segfault. * dbus/dbus-errors.c: (dbus_result_to_string): * dbus/dbus-errors.h: * dbus/dbus-message.c: (dbus_message_get_fields), (dbus_message_get_fields_valist), (_dbus_message_test): * dbus/dbus-message.h: Make dbus_message_get_fields return a result code so we can track invalid fields as well as oom.
* 2003-01-05 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-067-70/+448
| | | | | | | | | | | | | | | | | | * bus/connection.c: implement routines for handling connections, first thing is keeping a list of owned services on each connection and setting up watches etc. * bus/services.c: implement a mapping from service names to lists of connections * dbus/dbus-hash.c: add DBUS_HASH_POINTER * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions to use static mutexes for global data * dbus/dbus-connection.c (dbus_connection_set_data): add new collection of functions to set/get application-specific data on the DBusConnection.
* 2003-01-04 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-044-2/+434
| | | | | | | | | | * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function (_dbus_poll): new function * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro copied from GLib * bus/loop.c: initial code for the daemon main loop
* 2002-11-24 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/echo-client.c, test/echo-server.c: cheesy test clients. * configure.in (AC_CHECK_FUNCS): check for writev * dbus/dbus-message.c (_dbus_message_get_network_data): new function * dbus/dbus-list.c (_dbus_list_foreach): new function * dbus/dbus-internals.c (_dbus_verbose): new function * dbus/dbus-server.c, dbus/dbus-server.h: public object representing a server that listens for connections. * dbus/.cvsignore: create * dbus/dbus-errors.h, dbus/dbus-errors.c: public API for reporting errors * dbus/dbus-connection.h, dbus/dbus-connection.c: public object representing a connection that sends/receives messages. (Same object used for both client and server.) * dbus/dbus-transport.h, dbus/dbus-transport.c: Basic abstraction for different kinds of stream that we might read/write messages from.
* 2002-11-22 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-222-0/+23
* Makefile.am (SUBDIRS): rename subdir "server" to "bus" because any app can be a server, and any app can be a client, the bus is a special kind of server.