| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: fix docs to properly describe the
disconnected message
(_dbus_connection_notify_disconnected): remove this function;
we can't synchronously add the disconnected message, we have to
do it after we've queued any remaining real messages
(_dbus_connection_get_dispatch_status_unlocked): queue the
disconnect message only if the transport has finished queueing all
its real messages and is disconnected.
(dbus_connection_disconnect): update the dispatch status here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-pending-call.c: add the get/set object data
boilerplate as for DBusConnection, etc. Use generic object data
for the notify callback.
* glib/dbus-gparser.c (parse_node): parse child nodes
* tools/dbus-viewer.c: more hacking on the dbus-viewer
* glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
contain functions shared between the convenience lib and the
installed lib
* glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
-export-symbols-regex to the GLib library
* dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
fix the locking in here, and add a default handler for
Introspect() that just returns sub-nodes.
2003-09-14 Havoc Pennington <hp@pobox.com>
* glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
rather than gfoo consistent
* glib/dbus-gproxy.h: delete for now, move contents to
dbus-glib.h, because the include files don't work right since we
aren't in the dbus/ subdir.
* glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
(dbus_gproxy_end_call): finish
(dbus_gproxy_begin_call): finish
* glib/dbus-gmain.c (dbus_set_g_error): new
* glib/dbus-gobject.c (handle_introspect): include information
about child nodes in the introspection
* dbus/dbus-connection.c (dbus_connection_list_registered): new
function to help in implementation of introspection
* dbus/dbus-object-tree.c
(_dbus_object_tree_list_registered_and_unlock): new function
2003-09-12 Havoc Pennington <hp@pobox.com>
* glib/dbus-gidl.h: add common base class for all the foo_info
types
* tools/dbus-viewer.c: add GTK-based introspection UI thingy
similar to kdcop
* test/Makefile.am: try test srcdir -ef . in addition to test
srcdir = ., one of them should work (yeah lame)
* glib/Makefile.am: build the "idl" parser stuff as a convenience
library
* glib/dbus-gparser.h: make description_load routines return
NodeInfo* not Parser*
* Makefile.am (SUBDIRS): build test dir after all library dirs
* configure.in: add GTK+ detection
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: purge DBusMessageHandler
* dbus/dbus-message-handler.c: remove DBusMessageHandler, just
use callbacks everywhere
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
purge DBusObjectID
* dbus/dbus-connection.c: port to no ObjectID, create a
DBusObjectTree, rename ObjectTree to ObjectPath in public API
* dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
everything except UnregisterFunction and MessageFunction
* dbus/dbus-marshal.c: port away from DBusObjectID,
add DBUS_TYPE_OBJECT_PATH
* dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
dbus/dbus-objectid.[hc]: remove these, we are moving to
path-based object IDs
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-pending-call.c (dbus_pending_call_block): implement
* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): factor out internals;
change to convert any error replies to DBusError instead of
returning them as a message
|
|
|
|
|
| |
* dbus/dbus-connection.c,
dbus/dbus-pending-call.c: Finish the pending call stuff
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-object-registry.c: implement signal connection
and dispatch
* dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
* dbus/dbus-internals.c (_dbus_memdup): new function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
a message type enum to distinguish kinds of message
(DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
that need not be replied to
2003-08-01 Havoc Pennington <hp@pobox.com>
* dbus/dbus-marshal.c: adapt to DBusObjectID changes
(unpack_8_octets): fix no-64-bit-int bug
* dbus/dbus-object-registry.c (validate_id): validate the
connection ID bits, not just the instance ID.
* dbus/dbus-connection.c (_dbus_connection_init_id): initialize
the connection-global 33 bits of the object ID
* dbus/dbus-object-registry.c (info_from_entry): fill in
object ID in the new way
* dbus/dbus-objectid.h: rather than high/low bits, specifically
define server/client/instance bits.
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-object.h: sketch out an API for registering objects
with a connection, that allows us to use as little as 24 bytes
per object and lets application code represent an object in
any conceivable way.
* dbus/dbus-object-registry.c: implement the hard bits of the
DBusConnection aspect of object API. Not yet wired up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gmain.c: adapt to watch changes
* bus/bus.c, bus/activation.c, etc.: adjust to watch changes
* dbus/dbus-server.h: remove dbus_server_handle_watch
* dbus/dbus-connection.h: remove dbus_connection_handle_watch
* dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
like DBusTimeout, so we don't need dbus_connection_handle_watch
etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
list of size counters
(_dbus_message_loader_putback_message_link): put back a popped link
* dbus/dbus-connection.c
(dbus_connection_set_max_live_messages_size): rename
max_received_size
(dbus_connection_get_outgoing_size): get size of outgoing
queue
(_dbus_connection_set_connection_counter): remove this cruft
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c
(_dbus_connection_queue_received_message_link): new function that
can't fail due to OOM
* dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
new function pops a message together with a list link
containing it.
* dbus/dbus-transport-unix.c (queue_messages): use new link-based
message queuing functions to avoid needing to alloc memory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it pass the Hello handling test including all OOM codepaths.
Now to do other messages...
* bus/services.c (bus_service_remove_owner): fix crash when
removing owner from an empty list of owners
(bus_registry_ensure): don't leave service in the list of
a connection's owned services if we fail to put the service
in the hash table.
* bus/connection.c (bus_connection_preallocate_oom_error): set
error flag on the OOM error.
* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
handle _dbus_transport_set_connection failure
* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
to create watches up front and simply enable/disable them as
needed.
(unix_connection_set): this can now fail on OOM
* dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
of enabling/disabling a watch or timeout.
* bus/loop.c (bus_loop_iterate): don't touch disabled
watches/timeouts
* glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-transport-unix.c (unix_do_iteration):
Unlock the connection mutex during a blocking select call.
Add todo about how we need a way to wake up the select.
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
Add _dbus_connection_lock and _dbus_connection_unlock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_add_timeout),
(_dbus_connection_remove_timeout):
Add functions for adding and removing timeouts.
* dbus/dbus-message.c: (dbus_message_new_from_message):
Add new function that takes a message and creates an exact
copy of it, but with the refcount set to 1.
(check_message_handling):
Fix build error.
* dbus/dbus-server-protected.h:
* dbus/dbus-server.c: (_dbus_server_init_base),
(_dbus_server_finalize_base), (_dbus_server_add_timeout),
(dbus_server_set_timeout_functions):
(_dbus_server_remove_timeout):
New functions so that a server can add and remove timeouts.
(dbus_server_listen):
Add commented out call to dbus_server_debug_new.
* dbus/dbus-timeout.c: (_dbus_timeout_new):
Actually set the handler, doh.
* dbus/dbus-transport.c: (_dbus_transport_open):
Add commented out call to dbus_transport_debug_client_new.
* dbus/Makefile.am:
Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
new function
* dbus/dbus-server.c (dbus_server_set_max_connections)
(dbus_server_get_max_connections, dbus_server_get_n_connections):
keep track of current number of connections, and add API for
setting a max (but haven't implemented enforcing the max yet)
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
* 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.
|