| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-threads.c:
* dbus/dbus-threads.h:
Add condvars. Remove static mutext from API.
Implement static mutexes by initializing them from threads_init.
* glib/dbus-gthread.c:
* qt/dbus-qthread.cpp:
Update with the thread api changes.
* dbus/dbus-list.c:
* dbus/dbus-list.h:
Turn StaticMutex into normal mutex + init function.
Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
_dbus_list_append_link, _dbus_list_prepend_link
* dbus/dbus-sysdeps.c:
* dbus/dbus-sysdeps.h:
New type dbus_atomic_t, and new functions _dbus_atomic_inc,
_dbus_atomic_dec. Only slow fallback implementation at the moment.
* dbus/dbus-protocol.h:
Add DBUS_MESSAGE_LOCAL_DISCONNECT define
* dbus/dbus-message.c:
Make ref/unref atomic.
Fix some docs.
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Make threadsafe.
Change _peek to _borrow,_return & _steal_borrowed.
Change disconnect callback to event.
Make dbus_connection_dispatch_messages reentrant.
* dbus/dbus-transport.c:
Don't ref the connection on calls to the transport
implementation.
* dbus/dbus-message-handler.c:
Make threadsafe.
* glib/dbus-gmain.c:
Don't use peek_message anymore
* test/Makefile.am:
* test/debug-thread.c:
* test/debug-thread.h:
Simple thread implementation that asserts() on deadlocks in
single-threaded code.
* test/bus-test.c:
(main) Call debug_threads_init.
* test/watch.c:
Use disconnect message instead of disconnect callback.
* bus/connection.c:
* bus/connection.h:
Don't call dbus_connection_set_disconnect_function. Instead export
bus_connection_disconnect.
* bus/dispatch.c:
Call bus_connection_disconnect when we get a disconnected message.
|
|
|
|
|
|
|
|
|
|
| |
* bus/driver.c: (bus_driver_handle_hello):
* bus/driver.h:
* bus/services.c: (bus_service_lookup):
Reorder message sending so we get a more sane order.
* test/bus-test.c: (message_handler):
Fix tyop.
|
|
|
|
|
|
| |
* glib/dbus-gmain.c: (timeout_handler), (add_timeout),
(remove_timeout):
Implement support for timeouts in dbus-glib.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-watch.c (dbus_watch_get_flags):
Add note in the docs that ERROR or HANGUP won't be returned
and are assumed always on.
* glib/dbus-gmain.c (add_watch):
Always add IO_ERR | IO_HUP
* dbus/dbus-message.h:
Add semicolon after dbus_message_iter_get_string_array().
Makes qt code build again
|
|
|
|
|
| |
* glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
the file descriptor list, since it can change under us.
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gmain.c: (dbus_connection_prepare),
(dbus_connection_check), (dbus_connection_dispatch), (add_watch),
(remove_watch), (dbus_connection_hookup_with_g_main):
Rewrite the glib handling to use its own GSource instead of a
GIOChannel so we can catch messages put in the queue while waiting
for a reply.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: (dbus_connection_send_message):
Add a new client_serial parameter.
(dbus_connection_send_message_with_reply):
Remove a @todo since we've implemented the blocking function.
(dbus_connection_send_message_with_reply_and_block):
New function that sends a message and waits for a reply and
then returns the reply.
* dbus/dbus-connection.h:
Add new functions.
* dbus/dbus-errors.c: (dbus_result_to_string):
* dbus/dbus-errors.h:
Add new DBUS_RESULT.
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_reply_serial),
(_dbus_message_set_sender), (dbus_message_write_header),
(dbus_message_new_reply), (decode_header_data),
(_dbus_message_loader_return_buffer), (_dbus_message_test):
* dbus/dbus-message.h:
Add new functions that set the reply serial and sender.
Also marshal and demarshal them correctly and add test.
* dbus/dbus-protocol.h:
Add new DBUS_MESSAGE_TYPE_SENDER.
* glib/dbus-glib.h:
* glib/dbus-gmain.c: (watch_callback), (free_callback_data),
(add_watch), (remove_watch), (add_timeout), (remove_timeout),
(dbus_connection_hookup_with_g_main):
* glib/test-dbus-glib.c: (main):
Rewrite to use GIOChannel and remove the GSource crack.
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Update for changed APIs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(_dbus_connection_get_next_client_serial),
(dbus_connection_send_message):
* dbus/dbus-internals.h:
* dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
(dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
(_dbus_marshal_uint32), (_dbus_demarshal_double),
(_dbus_demarshal_int32), (_dbus_demarshal_uint32),
(_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
(_dbus_verbose_bytes), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_set_client_serial),
(dbus_message_write_header), (_dbus_message_lock),
(dbus_message_new), (dbus_message_ref), (dbus_message_unref),
(dbus_message_get_name), (dbus_message_append_int32),
(dbus_message_append_uint32), (dbus_message_append_double),
(dbus_message_append_string), (dbus_message_append_byte_array),
(dbus_message_get_fields_iter), (dbus_message_iter_ref),
(dbus_message_iter_unref), (dbus_message_iter_has_next),
(dbus_message_iter_next), (dbus_message_iter_get_field_type),
(dbus_message_iter_get_string), (dbus_message_iter_get_int32),
(dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
(decode_header_data), (_dbus_message_loader_return_buffer),
(message_iter_test), (_dbus_message_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* dbus/dbus-test.c: (main):
* dbus/dbus-test.h:
* glib/test-dbus-glib.c: (message_handler), (main):
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Make messages sendable and receivable for real.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gthread.c: fix include
* glib/dbus-glib.h: rename DBusMessageHandler for now.
I think glib API needs to change, though, as you don't
want to use DBusMessageFunction, you want to use the
DBusMessageHandler object. Probably
dbus_connection_open_with_g_main_loop()
and dbus_connection_setup_g_main_loop() or something like that
(but think of better names...) that just create a connection
that has watch/timeout functions etc. already set up.
* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply): new function just to
show how the message handler helps us deal with replies.
* dbus/dbus-list.c (_dbus_list_remove_last): new function
* dbus/dbus-string.c (_dbus_string_test): free a string that
wasn't
* dbus/dbus-hash.c: use memory pools for the hash entries
(rebuild_table): be more paranoid about overflow, and
shrink table when we can
(_dbus_hash_test): reduce number of sprintfs and write
valid C89. Add tests for case where we grow and then
shrink the hash table.
* dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
* dbus/dbus-connection.c (dbus_connection_register_handler)
(dbus_connection_unregister_handler): new functions
* dbus/dbus-message.c (dbus_message_get_name): new
* dbus/dbus-list.c: fix docs typo
* dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
an object representing a handler for messages.
|
| |
|
|
|
|
|
|
| |
* glib/dbus-glib.h:
* glib/dbus-gthread.c: (dbus_gthread_init):
Don't use the gdbus prefix for public functions.
|
|
* Makefile.am:
* configure.in:
Add GLib checks and fixup .pc files
* glib/Makefile.am:
* glib/dbus-glib.h:
* glib/dbus-gmain.c: (gdbus_connection_prepare),
(gdbus_connection_check), (gdbus_connection_dispatch),
(gdbus_add_connection_watch), (gdbus_remove_connection_watch),
(dbus_connection_gsource_new):
* glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
(dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
* glib/test-dbus-glib.c: (message_handler), (main):
Add GLib support.
|