1 2003-02-26 Alexander Larsson <alexl@redhat.com>
4 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
6 * dbus/dbus-connection.c:
7 * dbus/dbus-connection.h:
8 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
9 Add dbus_connection_set_wakeup_main_function and use it when queueing
10 incoming and outgoing messages.
13 * dbus/dbus-dataslot.c:
14 Threadsafe usage of DBusDataSlotAllocator
16 * dbus/dbus-message.c: (dbus_message_get_args_iter):
19 * dbus/dbus-server-unix.c:
23 Implement the new wakeup functions for glib.
26 * glib/test-thread-client.c:
27 * glib/test-thread-server.c:
29 Initial cut at some thread test code. Not really done yet.
31 2003-02-26 Havoc Pennington <hp@pobox.com>
33 * dbus/dbus-connection.c
34 (dbus_connection_send_message_with_reply_and_block): fix crash
35 where we ref'd the outgoing message instead of the returned reply
37 * dbus/dbus-transport-unix.c (do_authentication): check read watch
38 at the end of this function, so if we didn't need to read for
39 authentication, we reinstall it for receiving messages
41 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
42 a NULL sender for peer-to-peer case
44 * dbus/dbus-transport-unix.c (check_read_watch): handle
45 !authenticated case correctly
47 * glib/dbus-gmain.c: add support for DBusServer
49 * dbus/dbus-server.c: add data slot support
51 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
52 return values and handle errors
54 * dbus/dbus-dataslot.c: factor out the data slot stuff from
57 * Doxyfile.in (INPUT): add glib subdir
59 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
60 setup_with_g_main instead of hookup_with_g_main; write docs
62 2003-02-24 Anders Carlsson <andersca@codefactory.se>
64 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
65 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
66 * dbus/dbus-message.c: (dbus_message_append_boolean),
67 (dbus_message_append_boolean_array),
68 (dbus_message_get_args_valist), (_dbus_message_test):
69 * dbus/dbus-message.h:
70 * doc/dbus-specification.sgml:
71 Various fixes as pointed out by Havoc.
73 * test/data/invalid-messages/bad-boolean-array.message:
74 * test/data/invalid-messages/bad-boolean.message:
75 Add invalid boolean value test cases.
77 2003-02-24 Anders Carlsson <andersca@codefactory.se>
79 * dbus/dbus-internals.c: (_dbus_type_to_string):
80 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
81 (_dbus_marshal_validate_arg):
82 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
83 * dbus/dbus-message.c: (dbus_message_append_args_valist),
84 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
85 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
86 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
87 (dbus_message_iter_get_double),
88 (dbus_message_iter_get_boolean_array), (message_iter_test):
89 * dbus/dbus-message.h:
90 * dbus/dbus-protocol.h:
91 * doc/dbus-specification.sgml:
92 * test/data/valid-messages/lots-of-arguments.message:
93 Add support for boolean and boolean array types.
95 2003-02-23 Havoc Pennington <hp@pobox.com>
97 * dbus/dbus-keyring.c: finish most of this implementation and
100 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
101 these barf if the error isn't cleared to NULL
103 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
104 (_dbus_create_directory): new function
106 * dbus/dbus-errors.c (dbus_set_error): fix warning
108 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
109 (_dbus_string_hex_decode): new function
110 (test_hex_roundtrip): test code
112 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
114 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
116 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
117 the save-to-temp/rename trick to atomically write the new file
118 (_dbus_string_parse_uint): new function
120 2003-02-22 Havoc Pennington <hp@pobox.com>
122 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
124 2003-02-22 Havoc Pennington <hp@pobox.com>
126 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
127 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
129 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
131 * dbus/test/data/sha-1: add US government test suite for SHA-1
133 2003-02-21 Anders Carlsson <andersca@codefactory.se>
135 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
136 Make string arrays NULL-terminated.
138 * dbus/dbus-memory.c: (dbus_free_string_array):
139 * dbus/dbus-memory.h:
140 New function for freeing NULL-terminated string arrays.
142 * dbus/dbus-message-builder.c: (append_quoted_string),
143 (_dbus_message_data_load):
144 Add support for array types.
146 * dbus/dbus-message.c: (check_message_handling):
147 Add more types as test cases.
149 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
150 (_dbus_string_parse_double):
151 Add the start offset to the end offset.
153 * test/data/valid-messages/lots-of-arguments.message:
154 New test message with lots of arguments.
156 2003-02-21 Anders Carlsson <andersca@codefactory.se>
158 * dbus/dbus-message.c: (dbus_message_append_nil),
159 (dbus_message_append_int32), (dbus_message_append_uint32),
160 (dbus_message_append_double), (dbus_message_append_string),
161 (dbus_message_append_int32_array),
162 (dbus_message_append_uint32_array),
163 (dbus_message_append_double_array),
164 (dbus_message_append_byte_array),
165 (dbus_message_append_string_array):
166 Fix all out-of-memory handling in these functions.
168 2003-02-21 Anders Carlsson <andersca@codefactory.se>
170 * dbus/dbus-message.c: (dbus_message_append_nil):
173 2003-02-21 Anders Carlsson <andersca@codefactory.se>
175 * dbus/dbus-message.c: (dbus_message_append_args_valist),
176 (dbus_message_append_nil), (dbus_message_append_int32_array),
177 (dbus_message_append_uint32_array),
178 (dbus_message_append_double_array),
179 (dbus_message_append_byte_array),
180 (dbus_message_append_string_array), (dbus_message_get_args_valist),
181 (dbus_message_iter_get_int32_array),
182 (dbus_message_iter_get_uint32_array),
183 (dbus_message_iter_get_double_array),
184 (dbus_message_iter_get_byte_array),
185 (dbus_message_iter_get_string_array):
187 * dbus/dbus-message.h:
188 Add functions for appending and getting arrays.
190 2003-02-21 Anders Carlsson <andersca@codefactory.se>
192 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
193 element size at least 8 bytes, fixes mempool tests on
196 2003-02-20 Alexander Larsson <alexl@redhat.com>
198 * dbus/dbus-transport-unix.c (unix_do_iteration):
199 Unlock the connection mutex during a blocking select call.
200 Add todo about how we need a way to wake up the select.
202 * dbus/dbus-connection-internal.h:
203 * dbus/dbus-connection.c:
204 Add _dbus_connection_lock and _dbus_connection_unlock.
206 2003-02-19 Havoc Pennington <hp@pobox.com>
208 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
209 Doxyfile.in, not Doxyfile
211 * dbus/dbus-keyring.c: do some hacking on this
213 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
215 * dbus/dbus-errors.c (dbus_set_error_const): do not call
217 (dbus_set_error): remove dbus_error_init, check for message ==
218 NULL *before* we sprintf into it, and add @todo about including
219 system headers in this file
221 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
223 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
225 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
226 get various bits of user information based on either username
228 (_dbus_homedir_from_username): new function
230 2003-02-19 Anders Carlsson <andersca@codefactory.se>
233 Add check for nonposix getpwnam_r
235 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
236 Align the pool element size to a sizeof (void *) boundary.
238 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
239 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
240 General Solaris fixes.
242 * test/data/valid-messages/simplest-manual.message:
243 Explicitly state that we want little-endian packing.
245 2003-02-19 Mikael Hallendal <micke@codefactory.se>
247 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
249 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
250 Added to create a transport connecting using a tcp/ip socket.
252 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
253 to a tcp socket at given host and port.
254 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
257 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
259 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
260 Added to create a server listening on a TCP/IP socket.
262 2003-02-19 Havoc Pennington <hp@pobox.com>
264 Throughout: mop up all the Doxygen warnings and undocumented
267 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
270 * dbus/dbus-threads.c: move global mutex initializers to
271 dbus-internals.h, multiple prototypes was confusing doxygen
272 besides being kind of ugly
274 * Doxyfile (PREDEFINED): have Doxygen define
275 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
276 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
277 (do not abuse the feature! it's for stuff like the autogenerated
278 macros in dbus-md5.c, not just for things you don't feel like
281 2003-02-18 Havoc Pennington <hp@pobox.com>
283 * dbus/dbus-string.c (_dbus_string_zero): new function
285 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
286 wrap it in some dbus-friendly API
288 * dbus/dbus-types.h: add 16-bit types
290 2003-02-18 Joe Shaw <joe@assbarn.com>
292 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
293 credentials from our currently running process.
294 (get_word): Fix a buglet where we were copying the entire length
295 instead of relative to our position.
297 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
298 keys on the stack... it's 640k of data.
300 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
301 read the credentials byte off the socket, even if we don't have
303 (_dbus_poll): Implement poll() using select() for systems which
306 * glib/test-dbus-glib.c (main): Print out an error if no
307 parameters are given.
309 * test/data/auth/fallback.auth-script: Added. Tests that a client
310 can fallback to a secondary auth mechanism if the first fails.
312 2003-02-18 Havoc Pennington <hp@pobox.com>
316 2003-02-17 Havoc Pennington <hp@pobox.com>
318 * doc/dbus-specification.sgml: lots of cosmetic
319 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
320 env variable to DBUS_BUS_ADDRESS, s/client/application/,
321 s/server/bus/ (except in authentication section). Add a section
322 "Message Bus Message Routing"
324 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
330 2003-02-17 Anders Carlsson <andersca@codefactory.se>
332 * doc/dbus-specification.sgml:
333 Specification updates.
335 2003-02-17 Anders Carlsson <andersca@codefactory.se>
337 * bus/activation.c: (bus_activation_init), (child_setup),
338 (bus_activation_activate_service):
340 * bus/main.c: (main):
341 Set DBUS_ADDRESS environment variable.
343 * dbus/dbus-errors.c: (dbus_set_error):
344 Don't use va_copy since that's a C99 feature.
346 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
348 * dbus/dbus-sysdeps.h:
349 Add child_setup_func to _dbus_spawn_async.
351 * doc/dbus-specification.sgml:
352 Update specification.
354 * test/spawn-test.c: (setup_func), (main):
357 2003-02-17 Alexander Larsson <alexl@redhat.com>
359 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
362 2003-02-17 Anders Carlsson <andersca@codefactory.se>
366 * doc/dbus-test-plan.sgml:
367 Add test plan document.
372 2003-02-17 Anders Carlsson <andersca@codefactory.se>
374 * dbus/dbus-message.c: (decode_header_data),
375 (_dbus_message_loader_return_buffer):
376 Set the header padding amount when loading a message.
378 2003-02-16 Anders Carlsson <andersca@codefactory.se>
380 * bus/dispatch.c: (send_one_message):
381 Only send broadcast messages to registered connections.
383 * dbus/dbus-message.c: (dbus_message_name_is):
384 * dbus/dbus-message.h:
385 New convenience function.
387 * dbus/dbus-transport-debug.c: (do_reading):
388 Only dispatch one message per run.
391 * test/bus-test.c: (new_connection_callback), (die),
392 (test_hello_client1_handler), (test_hello_client2_handler),
393 (test_hello_replies), (main):
395 * test/bus-test-loop.[ch]:
398 2003-02-16 Havoc Pennington <hp@pobox.com>
400 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
403 2003-02-16 Alexander Larsson <alexl@redhat.com>
405 * dbus/dbus-connection.c:
406 Implement sent_message_with_reply. (with_reply_and block is still
408 Made dispatch_message not lose message if OOM.
410 * dbus/dbus-errors.h:
411 Add NoReply error (for reply timeouts).
413 2003-02-16 Alexander Larsson <alexl@redhat.com>
415 * dbus/dbus-hash.c (_dbus_hash_table_unref):
416 Actually free keys and values when destroying hashtable.
418 2003-02-16 Anders Carlsson <andersca@codefactory.se>
420 * dbus/dbus-auth.c: (client_try_next_mechanism):
423 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
424 Return TRUE if there's no thread implementation around.
426 * glib/dbus-gmain.c: (free_source),
427 (dbus_connection_hookup_with_g_main):
428 Make sure to remove the GSource when the connection is finalized.
430 2003-02-16 Anders Carlsson <andersca@codefactory.se>
432 * bus/dispatch.c: (bus_dispatch_message_handler):
433 * dbus/dbus-errors.h:
434 Return an error if someone tries to send a message to a service
437 2003-02-16 Anders Carlsson <andersca@codefactory.se>
439 * bus/activation.c: (load_directory), (bus_activation_init),
440 (bus_activation_activate_service):
443 (bus_driver_handle_activate_service), (bus_driver_handle_message):
444 More work on the activation handling.
446 * dbus/dbus-errors.h:
447 Add some error messages
449 * dbus/dbus-message.c: (dbus_message_new_error_reply):
450 * dbus/dbus-message.h:
451 New function that creates an error message.
453 * dbus/dbus-protocol.h:
454 Add ACTIVATE_SERVER message.
456 * dbus/dbus-server-unix.c: (unix_handle_watch),
457 (_dbus_server_new_for_domain_socket):
458 Call _dbus_fd_set_close_on_exec.
460 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
461 (_dbus_spawn_async), (_dbus_disable_sigpipe),
462 (_dbus_fd_set_close_on_exec):
463 * dbus/dbus-sysdeps.h:
464 Add _dbus_fd_set_close_on exec function. Also add function that checks
465 that all open fds are set to close-on-exec and warns otherwise.
467 * dbus/dbus-transport-unix.c:
468 (_dbus_transport_new_for_domain_socket):
469 Call _dbus_fd_set_close_on_exec.
471 2003-02-16 Havoc Pennington <hp@pobox.com>
473 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
474 allow people to avoid setting SIGPIPE to SIG_IGN
475 (_dbus_connection_new_for_transport): disable SIGPIPE unless
476 we've been asked not to
478 2003-02-15 Anders Carlsson <andersca@codefactory.se>
480 * dbus/dbus-list.c: (_dbus_list_append_link),
481 (_dbus_list_prepend_link):
482 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
486 2003-02-15 Anders Carlsson <andersca@codefactory.se>
489 * bus/activation.c: (bus_activation_entry_free),
490 (add_desktop_file_entry), (load_directory), (bus_activation_init):
492 * bus/main.c: (main):
493 Add simple activation support, doesn't work yet though.
495 2003-02-15 Zack Rusin <zack@kde.org>
497 * qt/dbus-qthread.cpp: small casting fix
499 2003-02-15 Anders Carlsson <andersca@codefactory.se>
501 * dbus/dbus-errors.c: (dbus_set_error):
502 * dbus/dbus-errors.h:
503 Add a few errors and make dbus_set_error void.
505 * dbus/dbus-sysdeps.c:
506 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
507 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
508 * dbus/dbus-sysdeps.h:
509 Add _dbus_spawn_async.
511 * test/spawn-test.c: (main):
512 Test for _dbus_spawn_async.
514 2003-02-15 Anders Carlsson <andersca@codefactory.se>
516 * dbus/dbus-internals.h:
517 Fix build without tests.
519 * dbus/dbus-list.c: (alloc_link):
520 Fix a segfault when a malloc fails.
522 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
523 (dbus_malloc0), (dbus_realloc):
524 Add support for malloc debugging.
526 2003-02-15 Alexander Larsson <alexl@redhat.com>
528 * dbus/dbus-threads.c:
529 * dbus/dbus-threads.h:
530 Add condvars. Remove static mutext from API.
531 Implement static mutexes by initializing them from threads_init.
533 * glib/dbus-gthread.c:
534 * qt/dbus-qthread.cpp:
535 Update with the thread api changes.
540 Turn StaticMutex into normal mutex + init function.
541 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
542 _dbus_list_append_link, _dbus_list_prepend_link
545 * dbus/dbus-sysdeps.c:
546 * dbus/dbus-sysdeps.h:
547 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
548 _dbus_atomic_dec. Only slow fallback implementation at the moment.
550 * dbus/dbus-protocol.h:
551 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
553 * dbus/dbus-message.c:
554 Make ref/unref atomic.
557 * dbus/dbus-connection-internal.h:
558 * dbus/dbus-connection.c:
559 * dbus/dbus-connection.h:
561 Change _peek to _borrow,_return & _steal_borrowed.
562 Change disconnect callback to event.
563 Make dbus_connection_dispatch_messages reentrant.
565 * dbus/dbus-transport.c:
566 Don't ref the connection on calls to the transport
569 * dbus/dbus-message-handler.c:
573 Don't use peek_message anymore
576 * test/debug-thread.c:
577 * test/debug-thread.h:
578 Simple thread implementation that asserts() on deadlocks in
579 single-threaded code.
582 (main) Call debug_threads_init.
585 Use disconnect message instead of disconnect callback.
589 Don't call dbus_connection_set_disconnect_function. Instead export
590 bus_connection_disconnect.
593 Call bus_connection_disconnect when we get a disconnected message.
595 2003-02-15 Havoc Pennington <hp@pobox.com>
597 * dbus/dbus-message.c (dbus_message_new): fool around with the
600 2003-02-14 Havoc Pennington <hp@pobox.com>
602 * dbus/dbus-mempool.c: fail if the debug functions so indicate
604 * dbus/dbus-memory.c: fail if the debug functions indicate we
607 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
608 (_dbus_decrement_fail_alloc_counter): debug functions to
609 simulate memory allocation failures
611 2003-02-14 Havoc Pennington <hp@pobox.com>
613 * dbus/dbus-errors.h (struct DBusError): add a word of padding
616 2003-02-13 Anders Carlsson <andersca@codefactory.se>
618 * bus/driver.c: (bus_driver_handle_hello):
620 * bus/services.c: (bus_service_lookup):
621 Reorder message sending so we get a more sane order.
623 * test/bus-test.c: (message_handler):
626 2003-02-13 Anders Carlsson <andersca@codefactory.se>
628 * bus/driver.c: (bus_driver_send_service_deleted),
629 (bus_driver_send_service_created), (bus_driver_send_service_lost),
630 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
631 (bus_driver_send_welcome_message),
632 (bus_driver_handle_list_services),
633 (bus_driver_handle_acquire_service),
634 (bus_driver_handle_service_exists):
635 * dbus/dbus-bus.c: (dbus_bus_register_client),
636 (dbus_bus_acquire_service), (dbus_bus_service_exists):
637 * dbus/dbus-errors.c: (dbus_result_to_string):
638 * dbus/dbus-errors.h:
639 * dbus/dbus-message.c: (dbus_message_append_args),
640 (dbus_message_append_args_valist), (dbus_message_get_args),
641 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
642 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
643 (dbus_message_iter_get_byte_array),
644 (dbus_message_iter_get_string_array), (message_iter_test),
645 (check_message_handling), (_dbus_message_test):
646 * dbus/dbus-message.h:
647 * test/bus-test.c: (main):
648 Change fields to arguments in messages, so that they won't be
649 confused with header fields.
651 * glib/test-dbus-glib.c: (main):
652 Remove append_fields from hello message.
654 2003-02-13 Anders Carlsson <andersca@codefactory.se>
656 * dbus/dbus-errors.c:
657 * dbus/dbus-message.c:
658 * dbus/dbus-string.c:
661 2003-02-13 Anders Carlsson <andersca@codefactory.se>
663 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
665 Implement support for timeouts in dbus-glib.
667 2003-02-13 Anders Carlsson <andersca@codefactory.se>
669 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
670 * dbus/dbus-message.c: (process_test_subdir):
671 * test/break-loader.c: (find_breaks_based_on):
672 Plug some memory leaks.
674 2003-02-13 Richard Hult <rhult@codefactory.se>
676 * bus/main.c: Fix build.
678 * dbus/dbus-errors.h:
679 * dbus/dbus-errors.c: Fix copyright for Anders.
681 2003-02-13 Anders Carlsson <andersca@codefactory.se>
686 * bus/connection.c: (bus_connection_foreach):
689 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
690 (unescape_string), (new_section), (parse_section_start),
691 (parse_key_value), (report_error), (bus_desktop_file_load),
692 (bus_desktop_file_get_string):
693 * bus/desktop-file.h:
694 Use DBusError for error reporting.
696 * bus/dispatch.c: (send_one_message),
697 (bus_dispatch_message_handler):
698 * bus/driver.c: (bus_driver_send_service_deleted),
699 (bus_driver_send_service_created), (bus_driver_send_service_lost),
700 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
701 (bus_driver_send_welcome_message),
702 (bus_driver_handle_list_services),
703 (bus_driver_handle_acquire_service),
704 (bus_driver_handle_service_exists):
705 * bus/loop.c: (bus_loop_run):
707 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
709 * bus/utils.c: (bus_wait_for_memory):
711 New files with general utility functions.
713 * dbus/dbus-internals.h:
714 Remove _DBUS_HANDLE_OOM.
716 2003-02-13 Anders Carlsson <andersca@codefactory.se>
718 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
719 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
720 * dbus/dbus-errors.h:
721 Add DBusError structure.
723 2003-02-13 Anders Carlsson <andersca@codefactory.se>
725 * test/data/valid-messages/standard-acquire-service.message:
726 * test/data/valid-messages/standard-hello.message:
727 * test/data/valid-messages/standard-list-services.message:
728 * test/data/valid-messages/standard-service-exists.message:
729 Add some standard messages.
731 2003-02-13 Anders Carlsson <andersca@codefactory.se>
733 * bus/driver.c: (bus_driver_send_welcome_message),
734 (bus_driver_handle_list_services),
735 (bus_driver_handle_acquire_service),
736 (bus_driver_handle_service_exists), (bus_driver_handle_message):
737 Update for API changes in libdbus.
739 * dbus/dbus-message.c: (dbus_message_new_reply):
740 * dbus/dbus-message.h:
741 Remove the name argument. The spec states that replies shouldn't
744 2003-02-13 Anders Carlsson <andersca@codefactory.se>
746 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
747 (report_error), (bus_desktop_file_load), (lookup_section),
748 (lookup_line), (bus_desktop_file_get_raw),
749 (bus_desktop_file_get_string):
750 * bus/desktop-file.h:
751 Some fixes, and new functions for getting a key value from a section.
753 2003-02-13 Havoc Pennington <hp@pobox.com>
755 * test/data/auth/fail-after-n-attempts.auth-script: new test
757 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
760 2003-02-13 Havoc Pennington <hp@pobox.com>
762 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
763 dbus_credentials_match were backward
765 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
766 NO_CREDENTIALS and ROOT_CREDENTIALS
768 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
769 into here. Never process more commands after we've reached an
770 end state; store further data as unused bytes.
772 * test/data/auth/*: add more auth tests
774 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
775 command to match exact string and EXPECT_UNUSED to match unused
778 * test/Makefile.am (dist-hook): fix to dist all the test stuff
780 2003-02-12 Havoc Pennington <hp@pobox.com>
782 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
783 \r off of popped lines
785 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
788 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
791 2003-02-12 Havoc Pennington <hp@pobox.com>
793 * dbus/Makefile.am: remove break-loader from the build, since it
796 * configure.in: add --enable-gcov to turn on coverage profiling
797 flags and disable optimization
799 2003-02-10 Havoc Pennington <hp@pobox.com>
801 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
802 initial cut at test framework for DBusAuth from laptop.
803 Doesn't quite work yet but it compiles and I need to get
804 it off the 266mhz laptop. ;-)
806 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
807 fix a memleak in error case
809 2003-02-12 Anders Carlsson <andersca@codefactory.se>
812 * bus/desktop-file.c:
813 * bus/desktop-file.h:
814 Add a desktop file parser.
816 2003-02-11 Zack Rusin <zack@kde.org>
818 * qt/message.[h|cpp]: sample implementation
819 of the KDE wrapper for DBusMessage
821 2003-02-09 Zack Rusin <zack@kde.org>
823 * test/bus-test.c: make_it_compile
824 * doc/dbus-specification.sgml: minimal semantic fix
826 2003-02-06 Anders Carlsson <andersca@codefactory.se>
832 2003-02-06 Anders Carlsson <andersca@codefactory.se>
835 * dbus/dbus-break-loader.c:
837 * test/break-loader.c:
838 Move dbus-break-loader to test/ and rename it to break-loader.
840 2003-02-02 Havoc Pennington <hp@pobox.com>
842 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
843 for code to manage cookies in your home directory
845 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
847 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
848 to authenticate, then disconnect the client.
850 2003-02-03 Alexander Larsson <alexl@redhat.com>
852 * dbus/dbus-message.c (dbus_message_append_fields):
855 2003-02-02 Anders Carlsson <andersca@codefactory.se>
857 * doc/dbus-specification.sgml:
858 Update address format section.
860 2003-02-02 Anders Carlsson <andersca@codefactory.se>
863 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
864 (message_handler), (new_connection_callback), (loop_quit),
868 2003-02-02 Anders Carlsson <andersca@codefactory.se>
870 * bus/driver.c: (bus_driver_handle_service_exists):
871 Simplify the code a bit.
873 * dbus/dbus-bus.c: (dbus_bus_service_exists):
876 2003-02-02 Anders Carlsson <andersca@codefactory.se>
879 Add libdbus-daemon.la and link to it.
881 2003-02-01 James Willcox <jwillcox@gnome.org>
883 * bus/driver.c: (bus_driver_handle_own_service):
884 Actually include the service reply code in the message.
886 2003-02-02 Anders Carlsson <andersca@codefactory.se>
888 * bus/driver.c: (bus_driver_handle_service_exists):
889 Don't unref the incoming message.
891 2003-02-02 Anders Carlsson <andersca@codefactory.se>
893 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
895 2003-02-02 Anders Carlsson <andersca@codefactory.se>
897 * dbus/dbus-server.c: (dbus_server_listen):
898 * dbus/dbus-transport.c: (_dbus_transport_open):
899 ifdef out the calls to the debug transport and server.
901 2003-02-02 Alexander Larsson <alexl@redhat.com>
903 * dbus/dbus-watch.c (dbus_watch_get_flags):
904 Add note in the docs that ERROR or HANGUP won't be returned
905 and are assumed always on.
907 * glib/dbus-gmain.c (add_watch):
908 Always add IO_ERR | IO_HUP
910 * dbus/dbus-message.h:
911 Add semicolon after dbus_message_iter_get_string_array().
912 Makes qt code build again
914 2003-02-01 Anders Carlsson <andersca@codefactory.se>
916 * bus/driver.c: (create_unique_client_name),
917 (bus_driver_handle_hello):
918 Don't take a name, just use a numeric id to identify
922 * dbus/dbus-bus.c: (dbus_bus_register_client),
923 (dbus_bus_acquire_service), (dbus_bus_service_exists):
925 Add new convenience functions for communicating with the bus.
927 * dbus/dbus-message.h:
929 * dbus/dbus-protocol.h:
932 2003-02-01 Alexander Larsson <alexl@redhat.com>
934 * dbus/dbus-message.c (dbus_message_append_fields):
935 Add some more doc comments.
937 2003-02-01 Havoc Pennington <hp@pobox.com>
939 * dbus/dbus-break-loader.c (randomly_modify_length): change
940 a 4-byte value in the message as if it were a length
942 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
943 execute bit on saved files
945 2003-02-01 Havoc Pennington <hp@pobox.com>
947 * dbus/dbus-break-loader.c (main): new program to find messages
948 that break the loader.
950 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
951 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
953 * dbus/dbus-string.c (_dbus_string_set_byte): new
955 2003-01-31 Havoc Pennington <hp@pobox.com>
957 * dbus/dbus-message.c: refactor the test code to be more general,
958 in preparation for writing a "randomly permute test cases to
959 try to break the loader" program.
961 2003-01-31 Havoc Pennington <hp@pobox.com>
963 * doc/dbus-specification.sgml: work on the specification
965 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
966 the protocol version of the message.
968 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
969 no longer specifies that.
970 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
973 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
974 "break" for DBUS_TYPE_NIL, remove @todo
976 2003-01-31 Havoc Pennington <hp@pobox.com>
978 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
979 just set_is_error/get_is_error as this is a commonly-used
980 function, and write docs.
982 2003-01-31 Anders Carlsson <andersca@codefactory.se>
984 * dbus/dbus-address.c: (dbus_address_entry_free):
985 Free key and value lists.
987 * dbus/dbus-internals.c: (_dbus_type_to_string):
988 Add the types we didn't have.
990 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
991 (_dbus_marshal_validate_arg):
994 * dbus/dbus-message.c: (dbus_message_set_sender):
995 Remove todo about being able to set sender to NULL.
997 (dbus_message_set_is_error_reply),
998 (dbus_message_get_is_error_reply):
999 * dbus/dbus-message.h:
1002 * dbus/dbus-protocol.h:
1003 Add error reply flag.
1005 * test/data/valid-messages/opposite-endian.message:
1006 Add NIL type to test.
1008 2003-01-31 Havoc Pennington <hp@pobox.com>
1010 * doc/dbus-specification.sgml: fully specify the header. Add
1011 flags and major protocol version, and change header/body len to
1014 * dbus/dbus-message-builder.c (append_saved_length): append length
1017 * dbus/dbus-message.c (dbus_message_create_header): change header
1018 length and body length to unsigned. Add the new fields from the
1020 (_dbus_message_loader_return_buffer): unsigned header/body len
1022 2003-01-30 Havoc Pennington <hp@pobox.com>
1024 * dbus/dbus-auth.c: rework to use only REJECTED, no
1027 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1028 use REJECTED, suggested by Mark McLoughlin
1030 2003-01-30 Havoc Pennington <hp@pobox.com>
1032 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1033 a better way to report errors here. e.g. "unix address lacks
1034 path" or something. also "no such file" when the path doesn't
1037 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1039 (dbus_parse_address): add @todo about documenting address format,
1040 and allowing , and ; to be escaped
1042 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1045 Add dbus-address.[ch]
1047 * dbus/dbus-address.c: (dbus_address_entry_free),
1048 (dbus_address_entries_free), (create_entry),
1049 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1050 (dbus_parse_address), (_dbus_address_test):
1051 * dbus/dbus-address.h:
1052 New files for dealing with address parsing.
1054 * dbus/dbus-connection.c:
1055 Document timeout functions.
1057 * dbus/dbus-message.c:
1058 Document dbus_message_new_from_message.
1060 * dbus/dbus-server-debug.c:
1063 * dbus/dbus-server.c: (dbus_server_listen):
1064 Parse address and use correct server implementation.
1066 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1067 * dbus/dbus-string.h:
1068 New function with test.
1070 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1074 * dbus/dbus-transport-debug.c:
1077 * dbus/dbus-transport.c: (_dbus_transport_open):
1078 Parse address and use correct transport implementation.
1080 2003-01-30 Havoc Pennington <hp@pobox.com>
1082 * dbus/dbus-message.c: use message->byte_order instead of
1083 DBUS_COMPILER_BYTE_ORDER throughout.
1084 (dbus_message_create_header): pad header to align the
1085 start of the body of the message to 8-byte boundary
1087 * dbus/dbus-marshal.h: make all the demarshalers take const
1088 DBusString arguments.
1090 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1091 validate message args here, so we don't have to do slow validation
1092 later, and so we catch bad messages as they are incoming. Also add
1093 better checks on header_len and body_len. Also fill in
1096 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1097 implemented properly)
1098 (_dbus_string_validate_nul): new function to check all-nul
1100 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1101 get_arg_end_pos and remove all validation
1102 (_dbus_marshal_validate_arg): actually do validation here.
1104 2003-01-29 Havoc Pennington <hp@pobox.com>
1106 * dbus/dbus-message.c (check_message_handling): fix assertion
1107 failure on set_client_serial
1109 2003-01-28 Havoc Pennington <hp@pobox.com>
1111 * dbus/dbus-server-debug.c: Add doc section comments
1113 * dbus/dbus-transport-debug.c: add doc section comments
1115 2003-01-28 Havoc Pennington <hp@redhat.com>
1117 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1118 the reverse order from how I had it
1119 (_dbus_string_base64_encode): reverse encoding order. I was
1120 basically byteswapping everything during encoding.
1122 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1124 * dbus/dbus-connection-internal.h:
1125 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1126 (_dbus_connection_remove_timeout):
1127 Add functions for adding and removing timeouts.
1129 * dbus/dbus-message.c: (dbus_message_new_from_message):
1130 Add new function that takes a message and creates an exact
1131 copy of it, but with the refcount set to 1.
1132 (check_message_handling):
1135 * dbus/dbus-server-protected.h:
1136 * dbus/dbus-server.c: (_dbus_server_init_base),
1137 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1138 (dbus_server_set_timeout_functions):
1139 (_dbus_server_remove_timeout):
1140 New functions so that a server can add and remove timeouts.
1142 (dbus_server_listen):
1143 Add commented out call to dbus_server_debug_new.
1145 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1146 Actually set the handler, doh.
1148 * dbus/dbus-transport.c: (_dbus_transport_open):
1149 Add commented out call to dbus_transport_debug_client_new.
1152 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1154 2003-01-28 Havoc Pennington <hp@pobox.com>
1156 * dbus/dbus-message.c (check_message_handling): function to check
1157 on the loaded message, iterates over it etc.
1159 2003-01-28 Havoc Pennington <hp@pobox.com>
1161 * test/Makefile.am (dist-hook): fix make distdir
1163 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1165 2003-01-27 Havoc Pennington <hp@pobox.com>
1167 * dbus/dbus-mempool.c (time_for_size): replace printf with
1170 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1171 empty lines; fix the SAVE_LENGTH stuff to be
1172 START_LENGTH/END_LENGTH so it actually works; couple other
1175 * test/Makefile.am (dist-hook): add dist-hook for .message files
1177 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1178 can be constant or locked.
1179 (_dbus_string_free): allow freeing a const string as
1182 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1184 * dbus/dbus-test-main.c (main): take an argument which is the
1185 directory containing test data
1187 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1188 argument to this and load all the messages in test/data/
1189 checking that they can be loaded or not loaded as appropriate.
1191 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1193 * bus/dispatch.c: (bus_dispatch_message_handler):
1194 Dispatch messages sent to services.
1196 * bus/driver.c: (bus_driver_send_service_deleted),
1197 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1198 (bus_driver_send_service_acquired):
1199 Add helper functions for sending service related messages.
1201 (bus_driver_send_welcome_message):
1202 Send HELLO_REPLY instead of WELCOME.
1204 (bus_driver_handle_list_services):
1205 Send LIST_SERVICES_REPLY instead of SERVICES.
1207 (bus_driver_handle_own_service),
1208 (bus_driver_handle_service_exists):
1209 New message handlers.
1211 (bus_driver_handle_message):
1212 Invoke new message handlers.
1214 (bus_driver_remove_connection):
1215 Don't remove any services here since that's done automatically
1216 by bus_service_remove_owner now.
1219 New function signatures.
1221 * bus/services.c: (bus_service_add_owner):
1222 Send ServiceAcquired message if we're the only primary owner.
1224 (bus_service_remove_owner):
1225 Send ServiceAcquired/ServiceLost messages.
1227 (bus_service_set_prohibit_replacement),
1228 (bus_service_get_prohibit_replacement):
1229 Functions for setting prohibit replacement.
1231 (bus_service_has_owner):
1232 New function that checks if a connection is in the owner queue of
1236 Add new function signatures.
1238 * dbus/dbus-list.c: (_dbus_list_test):
1239 Add tests for _dbus_list_remove_last and traversing the list backwards.
1242 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1243 go any further, so return NULL then.
1245 * dbus/dbus-protocol.h:
1246 Add new messages, service flags and service replies.
1248 2003-01-26 Havoc Pennington <hp@pobox.com>
1250 * dbus/dbus-message-builder.c: implement, completely untested.
1252 * test/data/*: add data to be used in testing.
1253 ".message" files are our simple loadable text format.
1254 ".message-raw" will be binary dumps of messages.
1256 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1258 2003-01-26 Havoc Pennington <hp@pobox.com>
1260 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1262 * dbus/dbus-errors.c (dbus_result_to_string): add
1265 * dbus/dbus-message-builder.c: new file, will contain code to load
1266 up messages from files. Not implemented yet.
1268 2003-01-26 Havoc Pennington <hp@pobox.com>
1270 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1271 the sender by setting to NULL
1273 2003-01-26 Havoc Pennington <hp@pobox.com>
1275 The unit tests pass, but otherwise untested. If it breaks, the
1276 tests should have been better. ;-)
1278 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1281 * dbus/dbus-message.c: redo everything so we maintain
1282 message->header as the only copy of the various fields.
1283 This avoids the possibility of out-of-memory in some cases,
1284 for example dbus_message_lock() can't run out of memory anymore,
1285 and avoids extra copying. Figured I may as well go ahead and do
1286 this since it was busted for dbus_message_lock to not return
1287 failure on OOM, and dbus_message_write_header was totally
1288 unchecked for OOM. Also fixed some random other bugs.
1290 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1291 that strings are nul-terminated. Also, end_pos can be equal
1292 to string length just not greater than, I think.
1293 (_dbus_marshal_set_int32): new function
1294 (_dbus_marshal_set_uint32): new function
1295 (_dbus_marshal_set_string): new function
1297 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1298 a warning, init timeout_list to NULL
1299 (dbus_connection_send_message): don't use uninitialized variable
1302 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1304 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1306 * bus/driver.c: (bus_driver_handle_hello),
1307 (bus_driver_send_welcome_message):
1310 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1312 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1313 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1314 (dbus_connection_unref):
1315 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1316 * dbus/dbus-message.c: (dbus_message_unref),
1319 (dbus_message_get_fields):
1320 Remove debugging printout.
1322 (_dbus_message_loader_return_buffer):
1323 Don't store the header string.
1325 (_dbus_message_test):
1328 2003-01-26 Richard Hult <rhult@codefactory.se>
1330 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1331 the file descriptor list, since it can change under us.
1333 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1335 * glib/dbus-gmain.c: (dbus_connection_prepare),
1336 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1337 (remove_watch), (dbus_connection_hookup_with_g_main):
1338 Rewrite the glib handling to use its own GSource instead of a
1339 GIOChannel so we can catch messages put in the queue while waiting
1342 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1345 * bus/connection.c: (connection_disconnect_handler),
1346 (connection_watch_callback), (bus_connection_setup):
1347 * bus/dispatch.c: (send_one_message),
1348 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1349 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1351 * bus/driver.c: (bus_driver_send_service_deleted),
1352 (bus_driver_send_service_created), (bus_driver_handle_hello),
1353 (bus_driver_send_welcome_message),
1354 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1355 (bus_driver_handle_message):
1357 Refactor code, put the message dispatching in its own file. Use
1358 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1361 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1363 * dbus/dbus-internals.h:
1364 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1366 * dbus/dbus-message.c: (dbus_message_get_sender):
1367 * dbus/dbus-message.h:
1368 Implement dbus_message_get_sender.
1370 * dbus/dbus-protocol.h:
1371 Add message and service defines.
1373 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1375 * dbus/dbus-connection.c: (dbus_connection_send_message):
1376 * dbus/dbus-message-internal.h:
1377 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1378 (dbus_message_write_header):
1379 Remove _dbus_messag_unlock and don't set the client serial on a
1380 message if one already exists.
1382 2003-01-24 Havoc Pennington <hp@pobox.com>
1384 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1387 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1390 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1392 * dbus/dbus-list.c: (alloc_link), (free_link):
1393 Use a memory pool for the links.
1395 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1397 * bus/connection.c: (bus_connection_foreach):
1399 Add new bus_connection_foreach function.
1401 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1402 Add function that broadcasts a message to all clients.
1404 (bus_driver_send_service_created), (bus_driver_handle_hello),
1405 (bus_driver_send_welcome_message),
1406 (bus_driver_handle_list_services), (bus_driver_message_handler):
1407 Implement functions that take care of listing services, and notifying
1408 clients when new services are created.
1410 * bus/services.c: (bus_services_list):
1412 Add new function that returns an array of strings with the currently
1413 registered services.
1416 * glib/dbus-gmain.c:
1417 Update copyright year.
1419 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1421 * dbus/dbus-connection.c: (dbus_connection_send_message):
1422 Unlock the message in case it was sent earlier.
1424 (dbus_connection_send_message_with_reply_and_block):
1425 Remove the reply message from the list.
1427 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1428 Set array_len and new_pos correctly.
1430 (_dbus_marshal_test):
1431 Remove debug output.
1433 * dbus/dbus-message-internal.h:
1434 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1435 New function that returns the reply serial.
1437 (_dbus_message_unlock):
1438 New function that unlocks a message and resets its header.
1440 (dbus_message_append_string_array),
1441 (dbus_message_get_fields_valist),
1442 (dbus_message_iter_get_field_type),
1443 (dbus_message_iter_get_string_array),
1444 (dbus_message_get_fields),
1445 (dbus_message_append_fields_valist):
1446 Handle string arrays.
1448 (dbus_message_set_sender):
1449 Make this function public since the bus daemon needs it.
1451 (decode_header_data):
1452 Set the reply serial to -1 initially.
1454 * dbus/dbus-message.h:
1455 Add dbus_message_set_sender.
1457 2003-01-24 Havoc Pennington <hp@pobox.com>
1459 * doc/dbus-specification.sgml: add some stuff
1461 2003-01-22 Havoc Pennington <hp@pobox.com>
1463 * doc/dbus-specification.sgml: Start to document the protocol.
1465 2003-01-22 Havoc Pennington <hp@pobox.com>
1467 * dbus/dbus-connection.c
1468 (dbus_connection_send_message_with_reply_and_block): add some @todo
1470 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1472 2003-01-21 Havoc Pennington <hp@pobox.com>
1474 (patch untested because can't compile)
1476 * bus/driver.c (create_unique_client_name): make this function
1477 never recycle client names. Also, caller should initialize
1480 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1482 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1484 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1485 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1486 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1487 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1488 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1489 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1490 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1491 * dbus/dbus-marshal.h:
1492 * dbus/dbus-protocol.h:
1493 Add support for marshalling and demarshalling integer, double
1496 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1501 * bus/connection.c: (connection_disconnect_handler):
1502 Remove the connection from the bus driver's list.
1504 (connection_watch_callback): Dispatch messages.
1506 (free_connection_data): Free connection name.
1508 (bus_connection_setup): Add connection to the bus driver's list.
1509 (bus_connection_remove_owned_service):
1510 (bus_connection_set_name), (bus_connection_get_name):
1511 Add functions for setting and getting the connection's name.
1514 Add function headers.
1516 * bus/driver.c: (create_unique_client_name),
1517 (bus_driver_handle_hello_message),
1518 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1519 (bus_driver_add_connection), (bus_driver_remove_connection):
1522 * bus/services.c: (bus_service_free):
1524 New file that handles communication and registreation with the bus
1527 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1529 * dbus/dbus-connection.c: (dbus_connection_send_message):
1530 Add a new client_serial parameter.
1532 (dbus_connection_send_message_with_reply):
1533 Remove a @todo since we've implemented the blocking function.
1535 (dbus_connection_send_message_with_reply_and_block):
1536 New function that sends a message and waits for a reply and
1537 then returns the reply.
1539 * dbus/dbus-connection.h:
1542 * dbus/dbus-errors.c: (dbus_result_to_string):
1543 * dbus/dbus-errors.h:
1544 Add new DBUS_RESULT.
1546 * dbus/dbus-message-internal.h:
1547 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1548 (_dbus_message_set_sender), (dbus_message_write_header),
1549 (dbus_message_new_reply), (decode_header_data),
1550 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1551 * dbus/dbus-message.h:
1552 Add new functions that set the reply serial and sender.
1553 Also marshal and demarshal them correctly and add test.
1555 * dbus/dbus-protocol.h:
1556 Add new DBUS_MESSAGE_TYPE_SENDER.
1559 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1560 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1561 (dbus_connection_hookup_with_g_main):
1562 * glib/test-dbus-glib.c: (main):
1563 Rewrite to use GIOChannel and remove the GSource crack.
1565 * test/echo-client.c: (main):
1566 * test/watch.c: (check_messages):
1567 Update for changed APIs
1569 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1571 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1573 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1574 Create a DBusTimeoutList.
1575 (dbus_connection_set_timeout_functions): Add new function to
1576 set timeout callbacks
1578 * dbus/dbus-connection.h: Add public DBusTimeout API.
1580 * dbus/dbus-message.c: (dbus_message_get_service):
1581 * dbus/dbus-message.h: New function.
1583 * dbus/dbus-server.c: Fix small doc typo.
1585 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1587 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1589 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1590 of the string, just as long as specified.
1592 2003-01-19 Havoc Pennington <hp@pobox.com>
1594 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1597 * dbus/dbus-server.c (dbus_server_set_max_connections)
1598 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1599 keep track of current number of connections, and add API for
1600 setting a max (but haven't implemented enforcing the max yet)
1602 2003-01-18 Havoc Pennington <hp@pobox.com>
1604 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1605 reading/writing if read_watch != NULL or write_watch != NULL.
1607 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1608 the message loader code to actually load message->header and
1609 message->body into the newly-created message.
1611 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1614 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1615 (dbus_connection_get_max_message_size)
1616 (dbus_connection_set_max_live_messages_size)
1617 (dbus_connection_get_max_live_messages_size): implement some
1618 resource limitation functions
1620 * dbus/dbus-resources.c: new file implementing some of the
1621 resource limits stuff
1623 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1624 missing docs, add @todo to handle OOM etc.
1626 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1629 2003-01-18 Havoc Pennington <hp@pobox.com>
1631 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1632 connection if it hasn't been already.
1634 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1635 replace with DisconnectFunction.
1637 2003-01-18 Havoc Pennington <hp@pobox.com>
1639 Building --disable-verbose-mode --disable-asserts --disable-tests
1640 cuts the library from 112K to 45K or so
1642 * configure.in: check for varargs macro support,
1643 add --enable-verbose-mode, --enable-asserts.
1645 * dbus/dbus-internals.h (_dbus_assert): support
1647 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1649 2003-01-18 Havoc Pennington <hp@pobox.com>
1651 * dbus/dbus-test.c: include config.h so that tests actually run
1653 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1654 so the failure mode when that assumption fails will be plenty
1657 2003-01-18 Havoc Pennington <hp@pobox.com>
1659 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1661 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1664 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1665 since we don't want to use those in make check
1667 2003-01-15 Havoc Pennington <hp@redhat.com>
1673 2003-01-15 Havoc Pennington <hp@redhat.com>
1675 * test/Makefile.am: fix so that test source code ends up in the
1676 distribution on make distcheck
1678 2003-01-15 Havoc Pennington <hp@redhat.com>
1684 2003-01-15 Havoc Pennington <hp@redhat.com>
1686 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1687 fix build when --disable-tests
1689 * Makefile.am (EXTRA_DIST): put HACKING in here
1691 * HACKING: document procedure for making a tarball release.
1693 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1695 * bus/connection.c: (connection_error_handler),
1696 (bus_connection_setup):
1697 * bus/main.c: (main):
1698 Make sure that the DBusConnectionData struct is NULLed
1699 out to prevent a segfault.
1701 * dbus/dbus-errors.c: (dbus_result_to_string):
1702 * dbus/dbus-errors.h:
1703 * dbus/dbus-message.c: (dbus_message_get_fields),
1704 (dbus_message_get_fields_valist), (_dbus_message_test):
1705 * dbus/dbus-message.h:
1706 Make dbus_message_get_fields return a result code so we can
1707 track invalid fields as well as oom.
1709 2003-01-11 Havoc Pennington <hp@pobox.com>
1711 * configure.in: change --enable-test/--enable-ansi action-if-given
1712 to enable_foo=$enableval instead of enable_foo=yes
1714 2003-01-08 Havoc Pennington <hp@pobox.com>
1716 * dbus/dbus-string.c (_dbus_string_align_length): new function
1718 * dbus/dbus-test-main.c: move main() for test app here
1720 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1721 symbol to run tests, because dbus-test isn't in the main
1724 Code review nitpicks.
1726 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1727 for people with narrow emacs ;-). Assert client_serial was filled
1728 in. Assert message->name != NULL.
1729 (dbus_message_append_fields): have "first_field_type" arg separate
1730 from va list, needed for C++ binding that also uses varargs IIRC
1731 and helps with type safety
1732 (dbus_message_new): add @todo about using DBusString to store
1733 service/name internally
1734 (dbus_message_new): don't leak ->service and ->name on OOM later
1736 (dbus_message_unref): free the service name
1737 (dbus_message_get_fields): same change to varargs
1738 i.e. first_field_type
1739 (_dbus_message_loader_return_buffer): assert that the message data
1740 is aligned (if not it's a bug in our code). Put in verbose griping
1741 about why we set corrupted = TRUE.
1742 (decode_header_data): add FIXME that char* is evil. Was going to
1743 add FIXME about evil locale-specific string.h strncmp, but just
1744 switched to wacky string-as-uint32 optimization. Move check for
1745 "no room for field name" above get_const_data_len() to avoid
1746 assertion failure in get_const_data_len if we have trailing 2
1747 bytes or the like. Check for service and name fields being
1748 provided twice. Don't leak service/name on error. Require field
1749 names to be aligned to 4 bytes.
1751 * dbus/dbus-marshal.c: move byte swap stuff to header
1752 (_dbus_pack_int32): uscore-prefix
1753 (_dbus_unpack_int32): uscore-prefix
1754 (_dbus_unpack_uint32): export
1755 (_dbus_demarshal_string): add @todo complaining about use of
1757 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1758 handling allowing corrupt data to go unchecked
1760 2003-01-08 Havoc Pennington <hp@redhat.com>
1762 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1763 to the select() as needed for authentication. (should be using
1764 _dbus_poll() not select, but for another day)
1766 * dbus/dbus.h: include dbus/dbus-protocol.h
1768 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1770 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1773 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1775 * dbus/dbus-internals.c: (_dbus_type_to_string):
1776 New function that returns a string describing a type.
1778 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1779 * dbus/dbus-marshal.h:
1780 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1781 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1782 (dbus_message_iter_get_byte_array):
1783 * dbus/dbus-message.h:
1784 Add new convenience functions for appending and getting message fields.
1785 Also add demarshalling routines for byte arrays.
1787 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1789 * dbus/dbus-connection-internal.h:
1790 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1791 (_dbus_connection_get_next_client_serial),
1792 (dbus_connection_send_message):
1793 * dbus/dbus-internals.h:
1794 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1795 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1796 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1797 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1798 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1799 (_dbus_verbose_bytes), (_dbus_marshal_test):
1800 * dbus/dbus-marshal.h:
1801 * dbus/dbus-message-internal.h:
1802 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1803 (dbus_message_write_header), (_dbus_message_lock),
1804 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1805 (dbus_message_get_name), (dbus_message_append_int32),
1806 (dbus_message_append_uint32), (dbus_message_append_double),
1807 (dbus_message_append_string), (dbus_message_append_byte_array),
1808 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1809 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1810 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1811 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1812 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1813 (decode_header_data), (_dbus_message_loader_return_buffer),
1814 (message_iter_test), (_dbus_message_test):
1815 * dbus/dbus-message.h:
1816 * dbus/dbus-protocol.h:
1817 * dbus/dbus-test.c: (main):
1819 * glib/test-dbus-glib.c: (message_handler), (main):
1820 * test/echo-client.c: (main):
1821 * test/watch.c: (check_messages):
1822 Make messages sendable and receivable for real.
1824 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1826 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1827 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1828 * dbus/dbus-message.c: (dbus_message_append_int32),
1829 (dbus_message_append_uint32), (dbus_message_append_double),
1830 (dbus_message_append_string), (dbus_message_append_byte_array):
1831 Handle OOM restoration.
1833 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1835 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1836 (_dbus_demarshal_string), (_dbus_marshal_test):
1837 * dbus/dbus-marshal.h:
1838 * dbus/dbus-message.c: (dbus_message_get_name),
1839 Document these functions.
1841 (dbus_message_append_int32), (dbus_message_append_uint32),
1842 (dbus_message_append_double), (dbus_message_append_string),
1843 (dbus_message_append_byte_array):
1844 * dbus/dbus-message.h:
1845 Add functions for adding message fields of different types.
1847 * dbus/dbus-protocol.h:
1848 Add the different types.
1850 2003-01-05 Havoc Pennington <hp@pobox.com>
1852 * bus/connection.c: implement routines for handling connections,
1853 first thing is keeping a list of owned services on each connection
1854 and setting up watches etc.
1856 * bus/services.c: implement a mapping from service names to lists
1859 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1861 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1862 to use static mutexes for global data
1864 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1865 collection of functions to set/get application-specific data
1866 on the DBusConnection.
1868 2003-01-04 Havoc Pennington <hp@pobox.com>
1870 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1871 (_dbus_poll): new function
1873 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1876 * bus/loop.c: initial code for the daemon main loop
1878 2003-01-04 Havoc Pennington <hp@pobox.com>
1880 * test/watch.c (error_handler): make it safe if the error handler
1881 is called multiple times (if we s/error handler/disconnect
1882 handler/ we should just guarantee it's called only once)
1884 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1885 error handler on disconnect (it's quite possible we should
1886 just change the error handler to a "disconnect handler," I'm
1887 not sure we have any other meaningful errors)
1889 * configure.in: check for getpwnam_r
1891 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1892 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1893 mechanism as in SASL spec, using socket credentials
1895 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1896 (_dbus_send_credentials_unix_socket): new function
1898 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1900 (_dbus_write): only check errno if <0 returned
1901 (_dbus_write_two): ditto
1903 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1905 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1906 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1907 (_dbus_marshal_test):
1908 * dbus/dbus-marshal.h:
1909 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1910 to _dbus_marshal_utf8_string. Also fix some tests.
1912 2002-12-28 Harri Porten <porten@kde.org>
1914 * configure.in: added check for C++ compiler and a very cheesy
1915 check for the Qt integration
1917 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1919 * qt/Makefile.am: added
1921 * qt/.cvsignore: added
1923 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1924 latter, added #ifdef QT_THREAD_SUPPORT guard.
1926 * dbus/Makefile.am: added missing headers for make dist
1928 2002-12-28 Kristian Rietveld <kris@gtk.org>
1930 * dbus/Makefile.am: fixup export-symbols-regex.
1932 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1934 * acinclude.m4: Add this file and put the
1935 PKG_CHECK_MODULE macro in it.
1937 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1939 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1940 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1941 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1942 (_dbus_marshal_test):
1943 Make the demarshalling routines align the pos argument.
1944 Add string marshalling tests and fix the obvious bugs
1947 2002-12-26 Havoc Pennington <hp@pobox.com>
1949 * dbus/dbus-auth.c: fixes fixes fixes
1951 * dbus/dbus-transport-unix.c: wire up support for
1952 encoding/decoding data on the wire
1954 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1955 (_dbus_auth_decode_data): append to target string
1956 instead of nuking it.
1958 2002-12-26 Havoc Pennington <hp@pobox.com>
1960 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1961 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1964 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1965 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1966 now). Main point is because I wanted unpack_uint32 to implement
1968 (_dbus_verbose_bytes): new function
1970 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1972 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1973 mechanism to handle a corrupt message stream
1974 (_dbus_message_loader_new): fix preallocation to only prealloc,
1977 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1978 (_dbus_string_test): enhance tests for copy/move and fix the
1981 * dbus/dbus-transport-unix.c: Hold references in more places to
1982 avoid reentrancy problems
1984 * dbus/dbus-transport.c: ditto
1986 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1987 leak reference count in no-message case
1989 * test/watch.c (do_mainloop): handle adding/removing watches
1990 during iteration over the watches. Also, ref the connection/server
1991 stored on a watch, so we don't try to mangle a destroyed one.
1993 * dbus/dbus-transport-unix.c (do_authentication): perform
1996 * dbus/dbus-auth.c (get_state): add a state
1997 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1998 (_dbus_auth_get_unused_bytes): append the unused bytes
1999 to the passed in string, rather than prepend
2001 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2002 the auth conversation DBusAuth
2004 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2005 (_dbus_transport_new_for_domain_socket): when creating a
2006 transport, pass in whether it's a client-side or server-side
2007 transport so we know which DBusAuth to create
2009 2002-12-03 Havoc Pennington <hp@pobox.com>
2011 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2012 _after_ finalizing the derived members
2013 (unix_connection_set): unref watch if we fail to add it
2015 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2016 transport first, so that the connection owned by the
2017 transport will be valid as the transport finalizes.
2019 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2020 if necessary, and remove watches from the connection.
2022 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2024 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2026 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2027 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2028 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2029 (_dbus_marshal_test):
2030 * dbus/dbus-marshal.h:
2031 Add string marshal functions and have the demarshal functions
2032 return the new position.
2034 2002-12-25 Havoc Pennington <hp@pobox.com>
2036 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2037 it is a simple protocol that just maps directly to SASL.
2039 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2040 initial implementation, not actually used yet.
2042 * dbus/dbus-string.c (_dbus_string_find): new function
2043 (_dbus_string_equal): new function
2044 (_dbus_string_base64_encode): new function
2045 (_dbus_string_base64_decode): new function
2047 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2050 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2051 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2052 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2053 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2054 * dbus/dbus-marshal.h:
2055 * dbus/dbus-protocol.h:
2056 * dbus/dbus-test.c: (main):
2058 Add un-optimized marshalling/demarshalling routines.
2060 2002-12-25 Harri Porten <porten@kde.org>
2062 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2064 2002-12-24 Zack Rusin <zack@kde.org>
2066 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2067 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2070 2002-12-24 Havoc Pennington <hp@pobox.com>
2072 * glib/dbus-gthread.c: fix include
2074 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2075 I think glib API needs to change, though, as you don't
2076 want to use DBusMessageFunction, you want to use the
2077 DBusMessageHandler object. Probably
2078 dbus_connection_open_with_g_main_loop()
2079 and dbus_connection_setup_g_main_loop() or something like that
2080 (but think of better names...) that just create a connection
2081 that has watch/timeout functions etc. already set up.
2083 * dbus/dbus-connection.c
2084 (dbus_connection_send_message_with_reply): new function just to
2085 show how the message handler helps us deal with replies.
2087 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2089 * dbus/dbus-string.c (_dbus_string_test): free a string that
2092 * dbus/dbus-hash.c: use memory pools for the hash entries
2093 (rebuild_table): be more paranoid about overflow, and
2094 shrink table when we can
2095 (_dbus_hash_test): reduce number of sprintfs and write
2096 valid C89. Add tests for case where we grow and then
2097 shrink the hash table.
2099 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2101 * dbus/dbus-connection.c (dbus_connection_register_handler)
2102 (dbus_connection_unregister_handler): new functions
2104 * dbus/dbus-message.c (dbus_message_get_name): new
2106 * dbus/dbus-list.c: fix docs typo
2108 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2109 an object representing a handler for messages.
2111 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2114 * glib/dbus-gthread.c: (dbus_gthread_init):
2115 Don't use the gdbus prefix for public functions.
2117 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2121 Add GLib checks and fixup .pc files
2125 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2126 (gdbus_connection_check), (gdbus_connection_dispatch),
2127 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2128 (dbus_connection_gsource_new):
2129 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2130 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2131 * glib/test-dbus-glib.c: (message_handler), (main):
2134 2002-12-15 Harri Porten <porten@kde.org>
2136 * autogen.sh: check for libtoolize before attempting to use it
2138 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2141 * .cvsignore: ignore more stamp files
2143 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2145 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2146 without make install.
2148 2002-12-15 Havoc Pennington <hp@pobox.com>
2150 * dbus/dbus-threads.c: add thread stubs that a higher library
2151 layer can fill in. e.g. the GLib wrapper might fill them in with
2152 GThread stuff. We still need to use this thread API to
2153 thread-safe-ize the library.
2155 2002-12-12 Havoc Pennington <hp@pobox.com>
2157 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2158 below new interfaces and include fewer system headers.
2160 * dbus/dbus-sysdeps.c (_dbus_read): new function
2161 (_dbus_write): new function
2162 (_dbus_write_two): new function
2163 (_dbus_connect_unix_socket): new function
2164 (_dbus_listen_unix_socket): new function
2166 * dbus/dbus-message-internal.h: change interfaces to use
2169 2002-12-11 Havoc Pennington <hp@pobox.com>
2171 * dbus/dbus-types.h: add dbus_unichar
2173 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2175 * dbus/dbus-connection.c (dbus_connection_send_message): return
2178 * dbus/dbus-transport.c: include dbus-watch.h
2180 * dbus/dbus-connection.c: include dbus-message-internal.h
2182 * HACKING: add file with coding guidelines stuff.
2184 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2185 handling here, for security purposes (as in vsftpd). Not actually
2186 using this class yet.
2188 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2189 system/libc usage here, as in vsftpd, for ease of auditing (and
2190 should also simplify portability). Haven't actually moved all the
2191 system/libc usage into here yet.
2193 2002-11-25 Havoc Pennington <hp@pobox.com>
2195 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2196 always print the first verbose message.
2198 2002-11-24 Havoc Pennington <hp@pobox.com>
2200 * test/echo-client.c, test/echo-server.c: cheesy test
2203 * configure.in (AC_CHECK_FUNCS): check for writev
2205 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2208 * dbus/dbus-list.c (_dbus_list_foreach): new function
2210 * dbus/dbus-internals.c (_dbus_verbose): new function
2212 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2213 representing a server that listens for connections.
2215 * dbus/.cvsignore: create
2217 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2218 public API for reporting errors
2220 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2221 public object representing a connection that
2222 sends/receives messages. (Same object used for
2223 both client and server.)
2225 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2226 Basic abstraction for different kinds of stream
2227 that we might read/write messages from.
2229 2002-11-23 Havoc Pennington <hp@pobox.com>
2231 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2234 * dbus/dbus-test.c (main): add list test, and include
2235 dbus-test.h as intended
2237 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2238 (_dbus_hash_table_remove_int): return value indicates
2239 whether the entry existed to remove
2241 * dbus/dbus-list.c: add linked list utility class,
2244 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2247 2002-11-23 Havoc Pennington <hp@pobox.com>
2249 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2250 DBUS_END_DECLS to nothing, that should fix this once and for all
2252 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2254 * dbus/dbus-message.c, dbus/dbus-hash.c:
2255 add some missing @brief
2257 2002-11-23 Havoc Pennington <hp@pobox.com>
2259 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2260 to avoid confusing Doxygen
2262 * dbus/dbus-hash.c: @} not }@
2264 * dbus/dbus-message.c (struct DBusMessage): split out
2267 2002-11-23 Havoc Pennington <hp@pobox.com>
2269 * configure.in: pile on more warning flags if using gcc
2271 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2272 to document static functions
2274 * configure.in: add summary to end of configure so it
2275 looks nice and attractive
2277 * dbus/dbus-hash.c: finish implementation and write unit
2280 * configure.in: add --enable-tests to enable unit tests
2282 * dbus/dbus-test.c: test program to run unit tests
2283 for all files in dbus/*, initially runs a test for
2286 * dbus/dbus-internals.h: file to hold some internal utility stuff
2288 2002-11-22 Havoc Pennington <hp@redhat.com>
2290 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2291 "ported" away from Tcl
2293 * dbus/dbus-types.h: header for types such as dbus_bool_t
2295 2002-11-22 Havoc Pennington <hp@redhat.com>
2297 * dbus/dbus.h: fixups for doc warnings
2299 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2301 (QUIET): make it quiet so we can see warnings
2303 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2305 2002-11-22 Havoc Pennington <hp@redhat.com>
2307 * Makefile.am: include "Doxyfile" target in all-local
2309 * configure.in: generate the Doxyfile
2311 * Doxyfile.in: move Doxyfile here, so we can use
2312 configure to generate a Doxyfile with the right
2315 2002-11-22 Havoc Pennington <hp@redhat.com>
2317 * dbus/dbus-message.c: move inline docs into .c file
2319 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2320 so all docs are under doc/
2321 (MAN_EXTENSION): generate man pages. Use extension
2322 ".3dbus" which matches ".3qt" on my system,
2323 I guess this is OK, I don't know really.
2324 (FILE_PATTERNS): look for .c files not .h, makes sense
2327 2002-11-22 Havoc Pennington <hp@pobox.com>
2329 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2330 because any app can be a server, and any app can be a client,
2331 the bus is a special kind of server.
2333 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2335 * Doxyfile : adding. Still needs Makefile rules to be generated
2336 automatically (just run "doxygen" in the toplevel dir for now to
2339 * dbus/dbus-message.h : Adding sample docs (javadoc since
2340 resembles gtk-doc a little more)
2342 * dbus/dbus.h : Adding sample docs
2344 2002-11-21 Havoc Pennington <hp@redhat.com>
2346 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2347 so we can allow ourselves to include files directly,
2348 instead of having to use dbus.h
2350 * dbus/dbus.h: fill in
2352 * dbus/dbus-message.h: sketch out a sample header file.
2353 Include griping if you include it directly instead of
2356 * dbus/dbus-macros.h: new file with macros for extern "C",
2357 TRUE/FALSE, NULL, etc.
2359 * doc/file-boilerplate.c: put include guards in here
2361 2002-11-21 Havoc Pennington <hp@redhat.com>
2363 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2365 * COPYING: include the GPL as well, and license code
2366 under both AFL and GPL.
2368 2002-11-21 Havoc Pennington <hp@redhat.com>
2370 * acconfig.h: get rid of this
2372 * autogen.sh (run_configure): add --no-configure option
2374 * configure.in: remove AC_ARG_PROGRAM to make
2375 autoconf complain less. add AC_PREREQ.
2376 add AC_DEFINE third arg.
2378 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2381 Fix references so we can distcheck.
2383 2002-11-21 Havoc Pennington <hp@redhat.com>
2385 * Initial module creation