1 2003-02-23 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-keyring.c: finish most of this implementation and
6 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7 these barf if the error isn't cleared to NULL
9 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10 (_dbus_create_directory): new function
12 * dbus/dbus-errors.c (dbus_set_error): fix warning
14 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
15 (_dbus_string_hex_decode): new function
16 (test_hex_roundtrip): test code
18 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
20 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
22 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
23 the save-to-temp/rename trick to atomically write the new file
24 (_dbus_string_parse_uint): new function
26 2003-02-22 Havoc Pennington <hp@pobox.com>
28 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
30 2003-02-22 Havoc Pennington <hp@pobox.com>
32 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
33 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
35 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
37 * dbus/test/data/sha-1: add US government test suite for SHA-1
39 2003-02-21 Anders Carlsson <andersca@codefactory.se>
41 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
42 Make string arrays NULL-terminated.
44 * dbus/dbus-memory.c: (dbus_free_string_array):
46 New function for freeing NULL-terminated string arrays.
48 * dbus/dbus-message-builder.c: (append_quoted_string),
49 (_dbus_message_data_load):
50 Add support for array types.
52 * dbus/dbus-message.c: (check_message_handling):
53 Add more types as test cases.
55 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
56 (_dbus_string_parse_double):
57 Add the start offset to the end offset.
59 * test/data/valid-messages/lots-of-arguments.message:
60 New test message with lots of arguments.
62 2003-02-21 Anders Carlsson <andersca@codefactory.se>
64 * dbus/dbus-message.c: (dbus_message_append_nil),
65 (dbus_message_append_int32), (dbus_message_append_uint32),
66 (dbus_message_append_double), (dbus_message_append_string),
67 (dbus_message_append_int32_array),
68 (dbus_message_append_uint32_array),
69 (dbus_message_append_double_array),
70 (dbus_message_append_byte_array),
71 (dbus_message_append_string_array):
72 Fix all out-of-memory handling in these functions.
74 2003-02-21 Anders Carlsson <andersca@codefactory.se>
76 * dbus/dbus-message.c: (dbus_message_append_nil):
79 2003-02-21 Anders Carlsson <andersca@codefactory.se>
81 * dbus/dbus-message.c: (dbus_message_append_args_valist),
82 (dbus_message_append_nil), (dbus_message_append_int32_array),
83 (dbus_message_append_uint32_array),
84 (dbus_message_append_double_array),
85 (dbus_message_append_byte_array),
86 (dbus_message_append_string_array), (dbus_message_get_args_valist),
87 (dbus_message_iter_get_int32_array),
88 (dbus_message_iter_get_uint32_array),
89 (dbus_message_iter_get_double_array),
90 (dbus_message_iter_get_byte_array),
91 (dbus_message_iter_get_string_array):
93 * dbus/dbus-message.h:
94 Add functions for appending and getting arrays.
96 2003-02-21 Anders Carlsson <andersca@codefactory.se>
98 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
99 element size at least 8 bytes, fixes mempool tests on
102 2003-02-20 Alexander Larsson <alexl@redhat.com>
104 * dbus/dbus-transport-unix.c (unix_do_iteration):
105 Unlock the connection mutex during a blocking select call.
106 Add todo about how we need a way to wake up the select.
108 * dbus/dbus-connection-internal.h:
109 * dbus/dbus-connection.c:
110 Add _dbus_connection_lock and _dbus_connection_unlock.
112 2003-02-19 Havoc Pennington <hp@pobox.com>
114 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
115 Doxyfile.in, not Doxyfile
117 * dbus/dbus-keyring.c: do some hacking on this
119 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
121 * dbus/dbus-errors.c (dbus_set_error_const): do not call
123 (dbus_set_error): remove dbus_error_init, check for message ==
124 NULL *before* we sprintf into it, and add @todo about including
125 system headers in this file
127 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
129 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
131 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
132 get various bits of user information based on either username
134 (_dbus_homedir_from_username): new function
136 2003-02-19 Anders Carlsson <andersca@codefactory.se>
139 Add check for nonposix getpwnam_r
141 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
142 Align the pool element size to a sizeof (void *) boundary.
144 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
145 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
146 General Solaris fixes.
148 * test/data/valid-messages/simplest-manual.message:
149 Explicitly state that we want little-endian packing.
151 2003-02-19 Mikael Hallendal <micke@codefactory.se>
153 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
155 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
156 Added to create a transport connecting using a tcp/ip socket.
158 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
159 to a tcp socket at given host and port.
160 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
163 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
165 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
166 Added to create a server listening on a TCP/IP socket.
168 2003-02-19 Havoc Pennington <hp@pobox.com>
170 Throughout: mop up all the Doxygen warnings and undocumented
173 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
176 * dbus/dbus-threads.c: move global mutex initializers to
177 dbus-internals.h, multiple prototypes was confusing doxygen
178 besides being kind of ugly
180 * Doxyfile (PREDEFINED): have Doxygen define
181 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
182 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
183 (do not abuse the feature! it's for stuff like the autogenerated
184 macros in dbus-md5.c, not just for things you don't feel like
187 2003-02-18 Havoc Pennington <hp@pobox.com>
189 * dbus/dbus-string.c (_dbus_string_zero): new function
191 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
192 wrap it in some dbus-friendly API
194 * dbus/dbus-types.h: add 16-bit types
196 2003-02-18 Joe Shaw <joe@assbarn.com>
198 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
199 credentials from our currently running process.
200 (get_word): Fix a buglet where we were copying the entire length
201 instead of relative to our position.
203 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
204 keys on the stack... it's 640k of data.
206 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
207 read the credentials byte off the socket, even if we don't have
209 (_dbus_poll): Implement poll() using select() for systems which
212 * glib/test-dbus-glib.c (main): Print out an error if no
213 parameters are given.
215 * test/data/auth/fallback.auth-script: Added. Tests that a client
216 can fallback to a secondary auth mechanism if the first fails.
218 2003-02-18 Havoc Pennington <hp@pobox.com>
222 2003-02-17 Havoc Pennington <hp@pobox.com>
224 * doc/dbus-specification.sgml: lots of cosmetic
225 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
226 env variable to DBUS_BUS_ADDRESS, s/client/application/,
227 s/server/bus/ (except in authentication section). Add a section
228 "Message Bus Message Routing"
230 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
236 2003-02-17 Anders Carlsson <andersca@codefactory.se>
238 * doc/dbus-specification.sgml:
239 Specification updates.
241 2003-02-17 Anders Carlsson <andersca@codefactory.se>
243 * bus/activation.c: (bus_activation_init), (child_setup),
244 (bus_activation_activate_service):
246 * bus/main.c: (main):
247 Set DBUS_ADDRESS environment variable.
249 * dbus/dbus-errors.c: (dbus_set_error):
250 Don't use va_copy since that's a C99 feature.
252 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
254 * dbus/dbus-sysdeps.h:
255 Add child_setup_func to _dbus_spawn_async.
257 * doc/dbus-specification.sgml:
258 Update specification.
260 * test/spawn-test.c: (setup_func), (main):
263 2003-02-17 Alexander Larsson <alexl@redhat.com>
265 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
268 2003-02-17 Anders Carlsson <andersca@codefactory.se>
272 * doc/dbus-test-plan.sgml:
273 Add test plan document.
278 2003-02-17 Anders Carlsson <andersca@codefactory.se>
280 * dbus/dbus-message.c: (decode_header_data),
281 (_dbus_message_loader_return_buffer):
282 Set the header padding amount when loading a message.
284 2003-02-16 Anders Carlsson <andersca@codefactory.se>
286 * bus/dispatch.c: (send_one_message):
287 Only send broadcast messages to registered connections.
289 * dbus/dbus-message.c: (dbus_message_name_is):
290 * dbus/dbus-message.h:
291 New convenience function.
293 * dbus/dbus-transport-debug.c: (do_reading):
294 Only dispatch one message per run.
297 * test/bus-test.c: (new_connection_callback), (die),
298 (test_hello_client1_handler), (test_hello_client2_handler),
299 (test_hello_replies), (main):
301 * test/bus-test-loop.[ch]:
304 2003-02-16 Havoc Pennington <hp@pobox.com>
306 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
309 2003-02-16 Alexander Larsson <alexl@redhat.com>
311 * dbus/dbus-connection.c:
312 Implement sent_message_with_reply. (with_reply_and block is still
314 Made dispatch_message not lose message if OOM.
316 * dbus/dbus-errors.h:
317 Add NoReply error (for reply timeouts).
319 2003-02-16 Alexander Larsson <alexl@redhat.com>
321 * dbus/dbus-hash.c (_dbus_hash_table_unref):
322 Actually free keys and values when destroying hashtable.
324 2003-02-16 Anders Carlsson <andersca@codefactory.se>
326 * dbus/dbus-auth.c: (client_try_next_mechanism):
329 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
330 Return TRUE if there's no thread implementation around.
332 * glib/dbus-gmain.c: (free_source),
333 (dbus_connection_hookup_with_g_main):
334 Make sure to remove the GSource when the connection is finalized.
336 2003-02-16 Anders Carlsson <andersca@codefactory.se>
338 * bus/dispatch.c: (bus_dispatch_message_handler):
339 * dbus/dbus-errors.h:
340 Return an error if someone tries to send a message to a service
343 2003-02-16 Anders Carlsson <andersca@codefactory.se>
345 * bus/activation.c: (load_directory), (bus_activation_init),
346 (bus_activation_activate_service):
349 (bus_driver_handle_activate_service), (bus_driver_handle_message):
350 More work on the activation handling.
352 * dbus/dbus-errors.h:
353 Add some error messages
355 * dbus/dbus-message.c: (dbus_message_new_error_reply):
356 * dbus/dbus-message.h:
357 New function that creates an error message.
359 * dbus/dbus-protocol.h:
360 Add ACTIVATE_SERVER message.
362 * dbus/dbus-server-unix.c: (unix_handle_watch),
363 (_dbus_server_new_for_domain_socket):
364 Call _dbus_fd_set_close_on_exec.
366 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
367 (_dbus_spawn_async), (_dbus_disable_sigpipe),
368 (_dbus_fd_set_close_on_exec):
369 * dbus/dbus-sysdeps.h:
370 Add _dbus_fd_set_close_on exec function. Also add function that checks
371 that all open fds are set to close-on-exec and warns otherwise.
373 * dbus/dbus-transport-unix.c:
374 (_dbus_transport_new_for_domain_socket):
375 Call _dbus_fd_set_close_on_exec.
377 2003-02-16 Havoc Pennington <hp@pobox.com>
379 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
380 allow people to avoid setting SIGPIPE to SIG_IGN
381 (_dbus_connection_new_for_transport): disable SIGPIPE unless
382 we've been asked not to
384 2003-02-15 Anders Carlsson <andersca@codefactory.se>
386 * dbus/dbus-list.c: (_dbus_list_append_link),
387 (_dbus_list_prepend_link):
388 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
392 2003-02-15 Anders Carlsson <andersca@codefactory.se>
395 * bus/activation.c: (bus_activation_entry_free),
396 (add_desktop_file_entry), (load_directory), (bus_activation_init):
398 * bus/main.c: (main):
399 Add simple activation support, doesn't work yet though.
401 2003-02-15 Zack Rusin <zack@kde.org>
403 * qt/dbus-qthread.cpp: small casting fix
405 2003-02-15 Anders Carlsson <andersca@codefactory.se>
407 * dbus/dbus-errors.c: (dbus_set_error):
408 * dbus/dbus-errors.h:
409 Add a few errors and make dbus_set_error void.
411 * dbus/dbus-sysdeps.c:
412 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
413 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
414 * dbus/dbus-sysdeps.h:
415 Add _dbus_spawn_async.
417 * test/spawn-test.c: (main):
418 Test for _dbus_spawn_async.
420 2003-02-15 Anders Carlsson <andersca@codefactory.se>
422 * dbus/dbus-internals.h:
423 Fix build without tests.
425 * dbus/dbus-list.c: (alloc_link):
426 Fix a segfault when a malloc fails.
428 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
429 (dbus_malloc0), (dbus_realloc):
430 Add support for malloc debugging.
432 2003-02-15 Alexander Larsson <alexl@redhat.com>
434 * dbus/dbus-threads.c:
435 * dbus/dbus-threads.h:
436 Add condvars. Remove static mutext from API.
437 Implement static mutexes by initializing them from threads_init.
439 * glib/dbus-gthread.c:
440 * qt/dbus-qthread.cpp:
441 Update with the thread api changes.
446 Turn StaticMutex into normal mutex + init function.
447 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
448 _dbus_list_append_link, _dbus_list_prepend_link
451 * dbus/dbus-sysdeps.c:
452 * dbus/dbus-sysdeps.h:
453 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
454 _dbus_atomic_dec. Only slow fallback implementation at the moment.
456 * dbus/dbus-protocol.h:
457 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
459 * dbus/dbus-message.c:
460 Make ref/unref atomic.
463 * dbus/dbus-connection-internal.h:
464 * dbus/dbus-connection.c:
465 * dbus/dbus-connection.h:
467 Change _peek to _borrow,_return & _steal_borrowed.
468 Change disconnect callback to event.
469 Make dbus_connection_dispatch_messages reentrant.
471 * dbus/dbus-transport.c:
472 Don't ref the connection on calls to the transport
475 * dbus/dbus-message-handler.c:
479 Don't use peek_message anymore
482 * test/debug-thread.c:
483 * test/debug-thread.h:
484 Simple thread implementation that asserts() on deadlocks in
485 single-threaded code.
488 (main) Call debug_threads_init.
491 Use disconnect message instead of disconnect callback.
495 Don't call dbus_connection_set_disconnect_function. Instead export
496 bus_connection_disconnect.
499 Call bus_connection_disconnect when we get a disconnected message.
501 2003-02-15 Havoc Pennington <hp@pobox.com>
503 * dbus/dbus-message.c (dbus_message_new): fool around with the
506 2003-02-14 Havoc Pennington <hp@pobox.com>
508 * dbus/dbus-mempool.c: fail if the debug functions so indicate
510 * dbus/dbus-memory.c: fail if the debug functions indicate we
513 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
514 (_dbus_decrement_fail_alloc_counter): debug functions to
515 simulate memory allocation failures
517 2003-02-14 Havoc Pennington <hp@pobox.com>
519 * dbus/dbus-errors.h (struct DBusError): add a word of padding
522 2003-02-13 Anders Carlsson <andersca@codefactory.se>
524 * bus/driver.c: (bus_driver_handle_hello):
526 * bus/services.c: (bus_service_lookup):
527 Reorder message sending so we get a more sane order.
529 * test/bus-test.c: (message_handler):
532 2003-02-13 Anders Carlsson <andersca@codefactory.se>
534 * bus/driver.c: (bus_driver_send_service_deleted),
535 (bus_driver_send_service_created), (bus_driver_send_service_lost),
536 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
537 (bus_driver_send_welcome_message),
538 (bus_driver_handle_list_services),
539 (bus_driver_handle_acquire_service),
540 (bus_driver_handle_service_exists):
541 * dbus/dbus-bus.c: (dbus_bus_register_client),
542 (dbus_bus_acquire_service), (dbus_bus_service_exists):
543 * dbus/dbus-errors.c: (dbus_result_to_string):
544 * dbus/dbus-errors.h:
545 * dbus/dbus-message.c: (dbus_message_append_args),
546 (dbus_message_append_args_valist), (dbus_message_get_args),
547 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
548 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
549 (dbus_message_iter_get_byte_array),
550 (dbus_message_iter_get_string_array), (message_iter_test),
551 (check_message_handling), (_dbus_message_test):
552 * dbus/dbus-message.h:
553 * test/bus-test.c: (main):
554 Change fields to arguments in messages, so that they won't be
555 confused with header fields.
557 * glib/test-dbus-glib.c: (main):
558 Remove append_fields from hello message.
560 2003-02-13 Anders Carlsson <andersca@codefactory.se>
562 * dbus/dbus-errors.c:
563 * dbus/dbus-message.c:
564 * dbus/dbus-string.c:
567 2003-02-13 Anders Carlsson <andersca@codefactory.se>
569 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
571 Implement support for timeouts in dbus-glib.
573 2003-02-13 Anders Carlsson <andersca@codefactory.se>
575 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
576 * dbus/dbus-message.c: (process_test_subdir):
577 * test/break-loader.c: (find_breaks_based_on):
578 Plug some memory leaks.
580 2003-02-13 Richard Hult <rhult@codefactory.se>
582 * bus/main.c: Fix build.
584 * dbus/dbus-errors.h:
585 * dbus/dbus-errors.c: Fix copyright for Anders.
587 2003-02-13 Anders Carlsson <andersca@codefactory.se>
592 * bus/connection.c: (bus_connection_foreach):
595 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
596 (unescape_string), (new_section), (parse_section_start),
597 (parse_key_value), (report_error), (bus_desktop_file_load),
598 (bus_desktop_file_get_string):
599 * bus/desktop-file.h:
600 Use DBusError for error reporting.
602 * bus/dispatch.c: (send_one_message),
603 (bus_dispatch_message_handler):
604 * bus/driver.c: (bus_driver_send_service_deleted),
605 (bus_driver_send_service_created), (bus_driver_send_service_lost),
606 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
607 (bus_driver_send_welcome_message),
608 (bus_driver_handle_list_services),
609 (bus_driver_handle_acquire_service),
610 (bus_driver_handle_service_exists):
611 * bus/loop.c: (bus_loop_run):
613 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
615 * bus/utils.c: (bus_wait_for_memory):
617 New files with general utility functions.
619 * dbus/dbus-internals.h:
620 Remove _DBUS_HANDLE_OOM.
622 2003-02-13 Anders Carlsson <andersca@codefactory.se>
624 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
625 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
626 * dbus/dbus-errors.h:
627 Add DBusError structure.
629 2003-02-13 Anders Carlsson <andersca@codefactory.se>
631 * test/data/valid-messages/standard-acquire-service.message:
632 * test/data/valid-messages/standard-hello.message:
633 * test/data/valid-messages/standard-list-services.message:
634 * test/data/valid-messages/standard-service-exists.message:
635 Add some standard messages.
637 2003-02-13 Anders Carlsson <andersca@codefactory.se>
639 * bus/driver.c: (bus_driver_send_welcome_message),
640 (bus_driver_handle_list_services),
641 (bus_driver_handle_acquire_service),
642 (bus_driver_handle_service_exists), (bus_driver_handle_message):
643 Update for API changes in libdbus.
645 * dbus/dbus-message.c: (dbus_message_new_reply):
646 * dbus/dbus-message.h:
647 Remove the name argument. The spec states that replies shouldn't
650 2003-02-13 Anders Carlsson <andersca@codefactory.se>
652 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
653 (report_error), (bus_desktop_file_load), (lookup_section),
654 (lookup_line), (bus_desktop_file_get_raw),
655 (bus_desktop_file_get_string):
656 * bus/desktop-file.h:
657 Some fixes, and new functions for getting a key value from a section.
659 2003-02-13 Havoc Pennington <hp@pobox.com>
661 * test/data/auth/fail-after-n-attempts.auth-script: new test
663 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
666 2003-02-13 Havoc Pennington <hp@pobox.com>
668 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
669 dbus_credentials_match were backward
671 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
672 NO_CREDENTIALS and ROOT_CREDENTIALS
674 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
675 into here. Never process more commands after we've reached an
676 end state; store further data as unused bytes.
678 * test/data/auth/*: add more auth tests
680 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
681 command to match exact string and EXPECT_UNUSED to match unused
684 * test/Makefile.am (dist-hook): fix to dist all the test stuff
686 2003-02-12 Havoc Pennington <hp@pobox.com>
688 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
689 \r off of popped lines
691 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
694 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
697 2003-02-12 Havoc Pennington <hp@pobox.com>
699 * dbus/Makefile.am: remove break-loader from the build, since it
702 * configure.in: add --enable-gcov to turn on coverage profiling
703 flags and disable optimization
705 2003-02-10 Havoc Pennington <hp@pobox.com>
707 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
708 initial cut at test framework for DBusAuth from laptop.
709 Doesn't quite work yet but it compiles and I need to get
710 it off the 266mhz laptop. ;-)
712 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
713 fix a memleak in error case
715 2003-02-12 Anders Carlsson <andersca@codefactory.se>
718 * bus/desktop-file.c:
719 * bus/desktop-file.h:
720 Add a desktop file parser.
722 2003-02-11 Zack Rusin <zack@kde.org>
724 * qt/message.[h|cpp]: sample implementation
725 of the KDE wrapper for DBusMessage
727 2003-02-09 Zack Rusin <zack@kde.org>
729 * test/bus-test.c: make_it_compile
730 * doc/dbus-specification.sgml: minimal semantic fix
732 2003-02-06 Anders Carlsson <andersca@codefactory.se>
738 2003-02-06 Anders Carlsson <andersca@codefactory.se>
741 * dbus/dbus-break-loader.c:
743 * test/break-loader.c:
744 Move dbus-break-loader to test/ and rename it to break-loader.
746 2003-02-02 Havoc Pennington <hp@pobox.com>
748 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
749 for code to manage cookies in your home directory
751 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
753 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
754 to authenticate, then disconnect the client.
756 2003-02-03 Alexander Larsson <alexl@redhat.com>
758 * dbus/dbus-message.c (dbus_message_append_fields):
761 2003-02-02 Anders Carlsson <andersca@codefactory.se>
763 * doc/dbus-specification.sgml:
764 Update address format section.
766 2003-02-02 Anders Carlsson <andersca@codefactory.se>
769 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
770 (message_handler), (new_connection_callback), (loop_quit),
774 2003-02-02 Anders Carlsson <andersca@codefactory.se>
776 * bus/driver.c: (bus_driver_handle_service_exists):
777 Simplify the code a bit.
779 * dbus/dbus-bus.c: (dbus_bus_service_exists):
782 2003-02-02 Anders Carlsson <andersca@codefactory.se>
785 Add libdbus-daemon.la and link to it.
787 2003-02-01 James Willcox <jwillcox@gnome.org>
789 * bus/driver.c: (bus_driver_handle_own_service):
790 Actually include the service reply code in the message.
792 2003-02-02 Anders Carlsson <andersca@codefactory.se>
794 * bus/driver.c: (bus_driver_handle_service_exists):
795 Don't unref the incoming message.
797 2003-02-02 Anders Carlsson <andersca@codefactory.se>
799 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
801 2003-02-02 Anders Carlsson <andersca@codefactory.se>
803 * dbus/dbus-server.c: (dbus_server_listen):
804 * dbus/dbus-transport.c: (_dbus_transport_open):
805 ifdef out the calls to the debug transport and server.
807 2003-02-02 Alexander Larsson <alexl@redhat.com>
809 * dbus/dbus-watch.c (dbus_watch_get_flags):
810 Add note in the docs that ERROR or HANGUP won't be returned
811 and are assumed always on.
813 * glib/dbus-gmain.c (add_watch):
814 Always add IO_ERR | IO_HUP
816 * dbus/dbus-message.h:
817 Add semicolon after dbus_message_iter_get_string_array().
818 Makes qt code build again
820 2003-02-01 Anders Carlsson <andersca@codefactory.se>
822 * bus/driver.c: (create_unique_client_name),
823 (bus_driver_handle_hello):
824 Don't take a name, just use a numeric id to identify
828 * dbus/dbus-bus.c: (dbus_bus_register_client),
829 (dbus_bus_acquire_service), (dbus_bus_service_exists):
831 Add new convenience functions for communicating with the bus.
833 * dbus/dbus-message.h:
835 * dbus/dbus-protocol.h:
838 2003-02-01 Alexander Larsson <alexl@redhat.com>
840 * dbus/dbus-message.c (dbus_message_append_fields):
841 Add some more doc comments.
843 2003-02-01 Havoc Pennington <hp@pobox.com>
845 * dbus/dbus-break-loader.c (randomly_modify_length): change
846 a 4-byte value in the message as if it were a length
848 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
849 execute bit on saved files
851 2003-02-01 Havoc Pennington <hp@pobox.com>
853 * dbus/dbus-break-loader.c (main): new program to find messages
854 that break the loader.
856 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
857 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
859 * dbus/dbus-string.c (_dbus_string_set_byte): new
861 2003-01-31 Havoc Pennington <hp@pobox.com>
863 * dbus/dbus-message.c: refactor the test code to be more general,
864 in preparation for writing a "randomly permute test cases to
865 try to break the loader" program.
867 2003-01-31 Havoc Pennington <hp@pobox.com>
869 * doc/dbus-specification.sgml: work on the specification
871 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
872 the protocol version of the message.
874 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
875 no longer specifies that.
876 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
879 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
880 "break" for DBUS_TYPE_NIL, remove @todo
882 2003-01-31 Havoc Pennington <hp@pobox.com>
884 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
885 just set_is_error/get_is_error as this is a commonly-used
886 function, and write docs.
888 2003-01-31 Anders Carlsson <andersca@codefactory.se>
890 * dbus/dbus-address.c: (dbus_address_entry_free):
891 Free key and value lists.
893 * dbus/dbus-internals.c: (_dbus_type_to_string):
894 Add the types we didn't have.
896 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
897 (_dbus_marshal_validate_arg):
900 * dbus/dbus-message.c: (dbus_message_set_sender):
901 Remove todo about being able to set sender to NULL.
903 (dbus_message_set_is_error_reply),
904 (dbus_message_get_is_error_reply):
905 * dbus/dbus-message.h:
908 * dbus/dbus-protocol.h:
909 Add error reply flag.
911 * test/data/valid-messages/opposite-endian.message:
912 Add NIL type to test.
914 2003-01-31 Havoc Pennington <hp@pobox.com>
916 * doc/dbus-specification.sgml: fully specify the header. Add
917 flags and major protocol version, and change header/body len to
920 * dbus/dbus-message-builder.c (append_saved_length): append length
923 * dbus/dbus-message.c (dbus_message_create_header): change header
924 length and body length to unsigned. Add the new fields from the
926 (_dbus_message_loader_return_buffer): unsigned header/body len
928 2003-01-30 Havoc Pennington <hp@pobox.com>
930 * dbus/dbus-auth.c: rework to use only REJECTED, no
933 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
934 use REJECTED, suggested by Mark McLoughlin
936 2003-01-30 Havoc Pennington <hp@pobox.com>
938 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
939 a better way to report errors here. e.g. "unix address lacks
940 path" or something. also "no such file" when the path doesn't
943 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
945 (dbus_parse_address): add @todo about documenting address format,
946 and allowing , and ; to be escaped
948 2003-01-30 Anders Carlsson <andersca@codefactory.se>
951 Add dbus-address.[ch]
953 * dbus/dbus-address.c: (dbus_address_entry_free),
954 (dbus_address_entries_free), (create_entry),
955 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
956 (dbus_parse_address), (_dbus_address_test):
957 * dbus/dbus-address.h:
958 New files for dealing with address parsing.
960 * dbus/dbus-connection.c:
961 Document timeout functions.
963 * dbus/dbus-message.c:
964 Document dbus_message_new_from_message.
966 * dbus/dbus-server-debug.c:
969 * dbus/dbus-server.c: (dbus_server_listen):
970 Parse address and use correct server implementation.
972 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
973 * dbus/dbus-string.h:
974 New function with test.
976 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
980 * dbus/dbus-transport-debug.c:
983 * dbus/dbus-transport.c: (_dbus_transport_open):
984 Parse address and use correct transport implementation.
986 2003-01-30 Havoc Pennington <hp@pobox.com>
988 * dbus/dbus-message.c: use message->byte_order instead of
989 DBUS_COMPILER_BYTE_ORDER throughout.
990 (dbus_message_create_header): pad header to align the
991 start of the body of the message to 8-byte boundary
993 * dbus/dbus-marshal.h: make all the demarshalers take const
994 DBusString arguments.
996 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
997 validate message args here, so we don't have to do slow validation
998 later, and so we catch bad messages as they are incoming. Also add
999 better checks on header_len and body_len. Also fill in
1002 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1003 implemented properly)
1004 (_dbus_string_validate_nul): new function to check all-nul
1006 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1007 get_arg_end_pos and remove all validation
1008 (_dbus_marshal_validate_arg): actually do validation here.
1010 2003-01-29 Havoc Pennington <hp@pobox.com>
1012 * dbus/dbus-message.c (check_message_handling): fix assertion
1013 failure on set_client_serial
1015 2003-01-28 Havoc Pennington <hp@pobox.com>
1017 * dbus/dbus-server-debug.c: Add doc section comments
1019 * dbus/dbus-transport-debug.c: add doc section comments
1021 2003-01-28 Havoc Pennington <hp@redhat.com>
1023 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1024 the reverse order from how I had it
1025 (_dbus_string_base64_encode): reverse encoding order. I was
1026 basically byteswapping everything during encoding.
1028 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1030 * dbus/dbus-connection-internal.h:
1031 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1032 (_dbus_connection_remove_timeout):
1033 Add functions for adding and removing timeouts.
1035 * dbus/dbus-message.c: (dbus_message_new_from_message):
1036 Add new function that takes a message and creates an exact
1037 copy of it, but with the refcount set to 1.
1038 (check_message_handling):
1041 * dbus/dbus-server-protected.h:
1042 * dbus/dbus-server.c: (_dbus_server_init_base),
1043 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1044 (dbus_server_set_timeout_functions):
1045 (_dbus_server_remove_timeout):
1046 New functions so that a server can add and remove timeouts.
1048 (dbus_server_listen):
1049 Add commented out call to dbus_server_debug_new.
1051 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1052 Actually set the handler, doh.
1054 * dbus/dbus-transport.c: (_dbus_transport_open):
1055 Add commented out call to dbus_transport_debug_client_new.
1058 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1060 2003-01-28 Havoc Pennington <hp@pobox.com>
1062 * dbus/dbus-message.c (check_message_handling): function to check
1063 on the loaded message, iterates over it etc.
1065 2003-01-28 Havoc Pennington <hp@pobox.com>
1067 * test/Makefile.am (dist-hook): fix make distdir
1069 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1071 2003-01-27 Havoc Pennington <hp@pobox.com>
1073 * dbus/dbus-mempool.c (time_for_size): replace printf with
1076 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1077 empty lines; fix the SAVE_LENGTH stuff to be
1078 START_LENGTH/END_LENGTH so it actually works; couple other
1081 * test/Makefile.am (dist-hook): add dist-hook for .message files
1083 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1084 can be constant or locked.
1085 (_dbus_string_free): allow freeing a const string as
1088 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1090 * dbus/dbus-test-main.c (main): take an argument which is the
1091 directory containing test data
1093 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1094 argument to this and load all the messages in test/data/
1095 checking that they can be loaded or not loaded as appropriate.
1097 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1099 * bus/dispatch.c: (bus_dispatch_message_handler):
1100 Dispatch messages sent to services.
1102 * bus/driver.c: (bus_driver_send_service_deleted),
1103 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1104 (bus_driver_send_service_acquired):
1105 Add helper functions for sending service related messages.
1107 (bus_driver_send_welcome_message):
1108 Send HELLO_REPLY instead of WELCOME.
1110 (bus_driver_handle_list_services):
1111 Send LIST_SERVICES_REPLY instead of SERVICES.
1113 (bus_driver_handle_own_service),
1114 (bus_driver_handle_service_exists):
1115 New message handlers.
1117 (bus_driver_handle_message):
1118 Invoke new message handlers.
1120 (bus_driver_remove_connection):
1121 Don't remove any services here since that's done automatically
1122 by bus_service_remove_owner now.
1125 New function signatures.
1127 * bus/services.c: (bus_service_add_owner):
1128 Send ServiceAcquired message if we're the only primary owner.
1130 (bus_service_remove_owner):
1131 Send ServiceAcquired/ServiceLost messages.
1133 (bus_service_set_prohibit_replacement),
1134 (bus_service_get_prohibit_replacement):
1135 Functions for setting prohibit replacement.
1137 (bus_service_has_owner):
1138 New function that checks if a connection is in the owner queue of
1142 Add new function signatures.
1144 * dbus/dbus-list.c: (_dbus_list_test):
1145 Add tests for _dbus_list_remove_last and traversing the list backwards.
1148 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1149 go any further, so return NULL then.
1151 * dbus/dbus-protocol.h:
1152 Add new messages, service flags and service replies.
1154 2003-01-26 Havoc Pennington <hp@pobox.com>
1156 * dbus/dbus-message-builder.c: implement, completely untested.
1158 * test/data/*: add data to be used in testing.
1159 ".message" files are our simple loadable text format.
1160 ".message-raw" will be binary dumps of messages.
1162 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1164 2003-01-26 Havoc Pennington <hp@pobox.com>
1166 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1168 * dbus/dbus-errors.c (dbus_result_to_string): add
1171 * dbus/dbus-message-builder.c: new file, will contain code to load
1172 up messages from files. Not implemented yet.
1174 2003-01-26 Havoc Pennington <hp@pobox.com>
1176 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1177 the sender by setting to NULL
1179 2003-01-26 Havoc Pennington <hp@pobox.com>
1181 The unit tests pass, but otherwise untested. If it breaks, the
1182 tests should have been better. ;-)
1184 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1187 * dbus/dbus-message.c: redo everything so we maintain
1188 message->header as the only copy of the various fields.
1189 This avoids the possibility of out-of-memory in some cases,
1190 for example dbus_message_lock() can't run out of memory anymore,
1191 and avoids extra copying. Figured I may as well go ahead and do
1192 this since it was busted for dbus_message_lock to not return
1193 failure on OOM, and dbus_message_write_header was totally
1194 unchecked for OOM. Also fixed some random other bugs.
1196 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1197 that strings are nul-terminated. Also, end_pos can be equal
1198 to string length just not greater than, I think.
1199 (_dbus_marshal_set_int32): new function
1200 (_dbus_marshal_set_uint32): new function
1201 (_dbus_marshal_set_string): new function
1203 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1204 a warning, init timeout_list to NULL
1205 (dbus_connection_send_message): don't use uninitialized variable
1208 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1210 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1212 * bus/driver.c: (bus_driver_handle_hello),
1213 (bus_driver_send_welcome_message):
1216 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1218 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1219 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1220 (dbus_connection_unref):
1221 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1222 * dbus/dbus-message.c: (dbus_message_unref),
1225 (dbus_message_get_fields):
1226 Remove debugging printout.
1228 (_dbus_message_loader_return_buffer):
1229 Don't store the header string.
1231 (_dbus_message_test):
1234 2003-01-26 Richard Hult <rhult@codefactory.se>
1236 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1237 the file descriptor list, since it can change under us.
1239 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1241 * glib/dbus-gmain.c: (dbus_connection_prepare),
1242 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1243 (remove_watch), (dbus_connection_hookup_with_g_main):
1244 Rewrite the glib handling to use its own GSource instead of a
1245 GIOChannel so we can catch messages put in the queue while waiting
1248 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1251 * bus/connection.c: (connection_disconnect_handler),
1252 (connection_watch_callback), (bus_connection_setup):
1253 * bus/dispatch.c: (send_one_message),
1254 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1255 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1257 * bus/driver.c: (bus_driver_send_service_deleted),
1258 (bus_driver_send_service_created), (bus_driver_handle_hello),
1259 (bus_driver_send_welcome_message),
1260 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1261 (bus_driver_handle_message):
1263 Refactor code, put the message dispatching in its own file. Use
1264 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1267 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1269 * dbus/dbus-internals.h:
1270 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1272 * dbus/dbus-message.c: (dbus_message_get_sender):
1273 * dbus/dbus-message.h:
1274 Implement dbus_message_get_sender.
1276 * dbus/dbus-protocol.h:
1277 Add message and service defines.
1279 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1281 * dbus/dbus-connection.c: (dbus_connection_send_message):
1282 * dbus/dbus-message-internal.h:
1283 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1284 (dbus_message_write_header):
1285 Remove _dbus_messag_unlock and don't set the client serial on a
1286 message if one already exists.
1288 2003-01-24 Havoc Pennington <hp@pobox.com>
1290 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1293 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1296 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1298 * dbus/dbus-list.c: (alloc_link), (free_link):
1299 Use a memory pool for the links.
1301 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1303 * bus/connection.c: (bus_connection_foreach):
1305 Add new bus_connection_foreach function.
1307 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1308 Add function that broadcasts a message to all clients.
1310 (bus_driver_send_service_created), (bus_driver_handle_hello),
1311 (bus_driver_send_welcome_message),
1312 (bus_driver_handle_list_services), (bus_driver_message_handler):
1313 Implement functions that take care of listing services, and notifying
1314 clients when new services are created.
1316 * bus/services.c: (bus_services_list):
1318 Add new function that returns an array of strings with the currently
1319 registered services.
1322 * glib/dbus-gmain.c:
1323 Update copyright year.
1325 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1327 * dbus/dbus-connection.c: (dbus_connection_send_message):
1328 Unlock the message in case it was sent earlier.
1330 (dbus_connection_send_message_with_reply_and_block):
1331 Remove the reply message from the list.
1333 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1334 Set array_len and new_pos correctly.
1336 (_dbus_marshal_test):
1337 Remove debug output.
1339 * dbus/dbus-message-internal.h:
1340 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1341 New function that returns the reply serial.
1343 (_dbus_message_unlock):
1344 New function that unlocks a message and resets its header.
1346 (dbus_message_append_string_array),
1347 (dbus_message_get_fields_valist),
1348 (dbus_message_iter_get_field_type),
1349 (dbus_message_iter_get_string_array),
1350 (dbus_message_get_fields),
1351 (dbus_message_append_fields_valist):
1352 Handle string arrays.
1354 (dbus_message_set_sender):
1355 Make this function public since the bus daemon needs it.
1357 (decode_header_data):
1358 Set the reply serial to -1 initially.
1360 * dbus/dbus-message.h:
1361 Add dbus_message_set_sender.
1363 2003-01-24 Havoc Pennington <hp@pobox.com>
1365 * doc/dbus-specification.sgml: add some stuff
1367 2003-01-22 Havoc Pennington <hp@pobox.com>
1369 * doc/dbus-specification.sgml: Start to document the protocol.
1371 2003-01-22 Havoc Pennington <hp@pobox.com>
1373 * dbus/dbus-connection.c
1374 (dbus_connection_send_message_with_reply_and_block): add some @todo
1376 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1378 2003-01-21 Havoc Pennington <hp@pobox.com>
1380 (patch untested because can't compile)
1382 * bus/driver.c (create_unique_client_name): make this function
1383 never recycle client names. Also, caller should initialize
1386 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1388 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1390 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1391 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1392 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1393 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1394 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1395 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1396 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1397 * dbus/dbus-marshal.h:
1398 * dbus/dbus-protocol.h:
1399 Add support for marshalling and demarshalling integer, double
1402 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1407 * bus/connection.c: (connection_disconnect_handler):
1408 Remove the connection from the bus driver's list.
1410 (connection_watch_callback): Dispatch messages.
1412 (free_connection_data): Free connection name.
1414 (bus_connection_setup): Add connection to the bus driver's list.
1415 (bus_connection_remove_owned_service):
1416 (bus_connection_set_name), (bus_connection_get_name):
1417 Add functions for setting and getting the connection's name.
1420 Add function headers.
1422 * bus/driver.c: (create_unique_client_name),
1423 (bus_driver_handle_hello_message),
1424 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1425 (bus_driver_add_connection), (bus_driver_remove_connection):
1428 * bus/services.c: (bus_service_free):
1430 New file that handles communication and registreation with the bus
1433 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1435 * dbus/dbus-connection.c: (dbus_connection_send_message):
1436 Add a new client_serial parameter.
1438 (dbus_connection_send_message_with_reply):
1439 Remove a @todo since we've implemented the blocking function.
1441 (dbus_connection_send_message_with_reply_and_block):
1442 New function that sends a message and waits for a reply and
1443 then returns the reply.
1445 * dbus/dbus-connection.h:
1448 * dbus/dbus-errors.c: (dbus_result_to_string):
1449 * dbus/dbus-errors.h:
1450 Add new DBUS_RESULT.
1452 * dbus/dbus-message-internal.h:
1453 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1454 (_dbus_message_set_sender), (dbus_message_write_header),
1455 (dbus_message_new_reply), (decode_header_data),
1456 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1457 * dbus/dbus-message.h:
1458 Add new functions that set the reply serial and sender.
1459 Also marshal and demarshal them correctly and add test.
1461 * dbus/dbus-protocol.h:
1462 Add new DBUS_MESSAGE_TYPE_SENDER.
1465 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1466 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1467 (dbus_connection_hookup_with_g_main):
1468 * glib/test-dbus-glib.c: (main):
1469 Rewrite to use GIOChannel and remove the GSource crack.
1471 * test/echo-client.c: (main):
1472 * test/watch.c: (check_messages):
1473 Update for changed APIs
1475 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1477 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1479 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1480 Create a DBusTimeoutList.
1481 (dbus_connection_set_timeout_functions): Add new function to
1482 set timeout callbacks
1484 * dbus/dbus-connection.h: Add public DBusTimeout API.
1486 * dbus/dbus-message.c: (dbus_message_get_service):
1487 * dbus/dbus-message.h: New function.
1489 * dbus/dbus-server.c: Fix small doc typo.
1491 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1493 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1495 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1496 of the string, just as long as specified.
1498 2003-01-19 Havoc Pennington <hp@pobox.com>
1500 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1503 * dbus/dbus-server.c (dbus_server_set_max_connections)
1504 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1505 keep track of current number of connections, and add API for
1506 setting a max (but haven't implemented enforcing the max yet)
1508 2003-01-18 Havoc Pennington <hp@pobox.com>
1510 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1511 reading/writing if read_watch != NULL or write_watch != NULL.
1513 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1514 the message loader code to actually load message->header and
1515 message->body into the newly-created message.
1517 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1520 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1521 (dbus_connection_get_max_message_size)
1522 (dbus_connection_set_max_live_messages_size)
1523 (dbus_connection_get_max_live_messages_size): implement some
1524 resource limitation functions
1526 * dbus/dbus-resources.c: new file implementing some of the
1527 resource limits stuff
1529 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1530 missing docs, add @todo to handle OOM etc.
1532 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1535 2003-01-18 Havoc Pennington <hp@pobox.com>
1537 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1538 connection if it hasn't been already.
1540 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1541 replace with DisconnectFunction.
1543 2003-01-18 Havoc Pennington <hp@pobox.com>
1545 Building --disable-verbose-mode --disable-asserts --disable-tests
1546 cuts the library from 112K to 45K or so
1548 * configure.in: check for varargs macro support,
1549 add --enable-verbose-mode, --enable-asserts.
1551 * dbus/dbus-internals.h (_dbus_assert): support
1553 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1555 2003-01-18 Havoc Pennington <hp@pobox.com>
1557 * dbus/dbus-test.c: include config.h so that tests actually run
1559 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1560 so the failure mode when that assumption fails will be plenty
1563 2003-01-18 Havoc Pennington <hp@pobox.com>
1565 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1567 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1570 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1571 since we don't want to use those in make check
1573 2003-01-15 Havoc Pennington <hp@redhat.com>
1579 2003-01-15 Havoc Pennington <hp@redhat.com>
1581 * test/Makefile.am: fix so that test source code ends up in the
1582 distribution on make distcheck
1584 2003-01-15 Havoc Pennington <hp@redhat.com>
1590 2003-01-15 Havoc Pennington <hp@redhat.com>
1592 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1593 fix build when --disable-tests
1595 * Makefile.am (EXTRA_DIST): put HACKING in here
1597 * HACKING: document procedure for making a tarball release.
1599 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1601 * bus/connection.c: (connection_error_handler),
1602 (bus_connection_setup):
1603 * bus/main.c: (main):
1604 Make sure that the DBusConnectionData struct is NULLed
1605 out to prevent a segfault.
1607 * dbus/dbus-errors.c: (dbus_result_to_string):
1608 * dbus/dbus-errors.h:
1609 * dbus/dbus-message.c: (dbus_message_get_fields),
1610 (dbus_message_get_fields_valist), (_dbus_message_test):
1611 * dbus/dbus-message.h:
1612 Make dbus_message_get_fields return a result code so we can
1613 track invalid fields as well as oom.
1615 2003-01-11 Havoc Pennington <hp@pobox.com>
1617 * configure.in: change --enable-test/--enable-ansi action-if-given
1618 to enable_foo=$enableval instead of enable_foo=yes
1620 2003-01-08 Havoc Pennington <hp@pobox.com>
1622 * dbus/dbus-string.c (_dbus_string_align_length): new function
1624 * dbus/dbus-test-main.c: move main() for test app here
1626 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1627 symbol to run tests, because dbus-test isn't in the main
1630 Code review nitpicks.
1632 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1633 for people with narrow emacs ;-). Assert client_serial was filled
1634 in. Assert message->name != NULL.
1635 (dbus_message_append_fields): have "first_field_type" arg separate
1636 from va list, needed for C++ binding that also uses varargs IIRC
1637 and helps with type safety
1638 (dbus_message_new): add @todo about using DBusString to store
1639 service/name internally
1640 (dbus_message_new): don't leak ->service and ->name on OOM later
1642 (dbus_message_unref): free the service name
1643 (dbus_message_get_fields): same change to varargs
1644 i.e. first_field_type
1645 (_dbus_message_loader_return_buffer): assert that the message data
1646 is aligned (if not it's a bug in our code). Put in verbose griping
1647 about why we set corrupted = TRUE.
1648 (decode_header_data): add FIXME that char* is evil. Was going to
1649 add FIXME about evil locale-specific string.h strncmp, but just
1650 switched to wacky string-as-uint32 optimization. Move check for
1651 "no room for field name" above get_const_data_len() to avoid
1652 assertion failure in get_const_data_len if we have trailing 2
1653 bytes or the like. Check for service and name fields being
1654 provided twice. Don't leak service/name on error. Require field
1655 names to be aligned to 4 bytes.
1657 * dbus/dbus-marshal.c: move byte swap stuff to header
1658 (_dbus_pack_int32): uscore-prefix
1659 (_dbus_unpack_int32): uscore-prefix
1660 (_dbus_unpack_uint32): export
1661 (_dbus_demarshal_string): add @todo complaining about use of
1663 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1664 handling allowing corrupt data to go unchecked
1666 2003-01-08 Havoc Pennington <hp@redhat.com>
1668 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1669 to the select() as needed for authentication. (should be using
1670 _dbus_poll() not select, but for another day)
1672 * dbus/dbus.h: include dbus/dbus-protocol.h
1674 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1676 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1679 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1681 * dbus/dbus-internals.c: (_dbus_type_to_string):
1682 New function that returns a string describing a type.
1684 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1685 * dbus/dbus-marshal.h:
1686 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1687 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1688 (dbus_message_iter_get_byte_array):
1689 * dbus/dbus-message.h:
1690 Add new convenience functions for appending and getting message fields.
1691 Also add demarshalling routines for byte arrays.
1693 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1695 * dbus/dbus-connection-internal.h:
1696 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1697 (_dbus_connection_get_next_client_serial),
1698 (dbus_connection_send_message):
1699 * dbus/dbus-internals.h:
1700 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1701 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1702 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1703 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1704 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1705 (_dbus_verbose_bytes), (_dbus_marshal_test):
1706 * dbus/dbus-marshal.h:
1707 * dbus/dbus-message-internal.h:
1708 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1709 (dbus_message_write_header), (_dbus_message_lock),
1710 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1711 (dbus_message_get_name), (dbus_message_append_int32),
1712 (dbus_message_append_uint32), (dbus_message_append_double),
1713 (dbus_message_append_string), (dbus_message_append_byte_array),
1714 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1715 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1716 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1717 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1718 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1719 (decode_header_data), (_dbus_message_loader_return_buffer),
1720 (message_iter_test), (_dbus_message_test):
1721 * dbus/dbus-message.h:
1722 * dbus/dbus-protocol.h:
1723 * dbus/dbus-test.c: (main):
1725 * glib/test-dbus-glib.c: (message_handler), (main):
1726 * test/echo-client.c: (main):
1727 * test/watch.c: (check_messages):
1728 Make messages sendable and receivable for real.
1730 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1732 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1733 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1734 * dbus/dbus-message.c: (dbus_message_append_int32),
1735 (dbus_message_append_uint32), (dbus_message_append_double),
1736 (dbus_message_append_string), (dbus_message_append_byte_array):
1737 Handle OOM restoration.
1739 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1741 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1742 (_dbus_demarshal_string), (_dbus_marshal_test):
1743 * dbus/dbus-marshal.h:
1744 * dbus/dbus-message.c: (dbus_message_get_name),
1745 Document these functions.
1747 (dbus_message_append_int32), (dbus_message_append_uint32),
1748 (dbus_message_append_double), (dbus_message_append_string),
1749 (dbus_message_append_byte_array):
1750 * dbus/dbus-message.h:
1751 Add functions for adding message fields of different types.
1753 * dbus/dbus-protocol.h:
1754 Add the different types.
1756 2003-01-05 Havoc Pennington <hp@pobox.com>
1758 * bus/connection.c: implement routines for handling connections,
1759 first thing is keeping a list of owned services on each connection
1760 and setting up watches etc.
1762 * bus/services.c: implement a mapping from service names to lists
1765 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1767 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1768 to use static mutexes for global data
1770 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1771 collection of functions to set/get application-specific data
1772 on the DBusConnection.
1774 2003-01-04 Havoc Pennington <hp@pobox.com>
1776 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1777 (_dbus_poll): new function
1779 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1782 * bus/loop.c: initial code for the daemon main loop
1784 2003-01-04 Havoc Pennington <hp@pobox.com>
1786 * test/watch.c (error_handler): make it safe if the error handler
1787 is called multiple times (if we s/error handler/disconnect
1788 handler/ we should just guarantee it's called only once)
1790 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1791 error handler on disconnect (it's quite possible we should
1792 just change the error handler to a "disconnect handler," I'm
1793 not sure we have any other meaningful errors)
1795 * configure.in: check for getpwnam_r
1797 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1798 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1799 mechanism as in SASL spec, using socket credentials
1801 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1802 (_dbus_send_credentials_unix_socket): new function
1804 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1806 (_dbus_write): only check errno if <0 returned
1807 (_dbus_write_two): ditto
1809 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1811 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1812 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1813 (_dbus_marshal_test):
1814 * dbus/dbus-marshal.h:
1815 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1816 to _dbus_marshal_utf8_string. Also fix some tests.
1818 2002-12-28 Harri Porten <porten@kde.org>
1820 * configure.in: added check for C++ compiler and a very cheesy
1821 check for the Qt integration
1823 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1825 * qt/Makefile.am: added
1827 * qt/.cvsignore: added
1829 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1830 latter, added #ifdef QT_THREAD_SUPPORT guard.
1832 * dbus/Makefile.am: added missing headers for make dist
1834 2002-12-28 Kristian Rietveld <kris@gtk.org>
1836 * dbus/Makefile.am: fixup export-symbols-regex.
1838 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1840 * acinclude.m4: Add this file and put the
1841 PKG_CHECK_MODULE macro in it.
1843 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1845 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1846 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1847 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1848 (_dbus_marshal_test):
1849 Make the demarshalling routines align the pos argument.
1850 Add string marshalling tests and fix the obvious bugs
1853 2002-12-26 Havoc Pennington <hp@pobox.com>
1855 * dbus/dbus-auth.c: fixes fixes fixes
1857 * dbus/dbus-transport-unix.c: wire up support for
1858 encoding/decoding data on the wire
1860 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1861 (_dbus_auth_decode_data): append to target string
1862 instead of nuking it.
1864 2002-12-26 Havoc Pennington <hp@pobox.com>
1866 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1867 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1870 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1871 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1872 now). Main point is because I wanted unpack_uint32 to implement
1874 (_dbus_verbose_bytes): new function
1876 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1878 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1879 mechanism to handle a corrupt message stream
1880 (_dbus_message_loader_new): fix preallocation to only prealloc,
1883 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1884 (_dbus_string_test): enhance tests for copy/move and fix the
1887 * dbus/dbus-transport-unix.c: Hold references in more places to
1888 avoid reentrancy problems
1890 * dbus/dbus-transport.c: ditto
1892 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1893 leak reference count in no-message case
1895 * test/watch.c (do_mainloop): handle adding/removing watches
1896 during iteration over the watches. Also, ref the connection/server
1897 stored on a watch, so we don't try to mangle a destroyed one.
1899 * dbus/dbus-transport-unix.c (do_authentication): perform
1902 * dbus/dbus-auth.c (get_state): add a state
1903 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1904 (_dbus_auth_get_unused_bytes): append the unused bytes
1905 to the passed in string, rather than prepend
1907 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1908 the auth conversation DBusAuth
1910 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1911 (_dbus_transport_new_for_domain_socket): when creating a
1912 transport, pass in whether it's a client-side or server-side
1913 transport so we know which DBusAuth to create
1915 2002-12-03 Havoc Pennington <hp@pobox.com>
1917 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1918 _after_ finalizing the derived members
1919 (unix_connection_set): unref watch if we fail to add it
1921 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1922 transport first, so that the connection owned by the
1923 transport will be valid as the transport finalizes.
1925 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1926 if necessary, and remove watches from the connection.
1928 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1930 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1932 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1933 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1934 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1935 (_dbus_marshal_test):
1936 * dbus/dbus-marshal.h:
1937 Add string marshal functions and have the demarshal functions
1938 return the new position.
1940 2002-12-25 Havoc Pennington <hp@pobox.com>
1942 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1943 it is a simple protocol that just maps directly to SASL.
1945 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1946 initial implementation, not actually used yet.
1948 * dbus/dbus-string.c (_dbus_string_find): new function
1949 (_dbus_string_equal): new function
1950 (_dbus_string_base64_encode): new function
1951 (_dbus_string_base64_decode): new function
1953 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1956 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1957 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1958 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1959 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1960 * dbus/dbus-marshal.h:
1961 * dbus/dbus-protocol.h:
1962 * dbus/dbus-test.c: (main):
1964 Add un-optimized marshalling/demarshalling routines.
1966 2002-12-25 Harri Porten <porten@kde.org>
1968 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1970 2002-12-24 Zack Rusin <zack@kde.org>
1972 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1973 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1976 2002-12-24 Havoc Pennington <hp@pobox.com>
1978 * glib/dbus-gthread.c: fix include
1980 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1981 I think glib API needs to change, though, as you don't
1982 want to use DBusMessageFunction, you want to use the
1983 DBusMessageHandler object. Probably
1984 dbus_connection_open_with_g_main_loop()
1985 and dbus_connection_setup_g_main_loop() or something like that
1986 (but think of better names...) that just create a connection
1987 that has watch/timeout functions etc. already set up.
1989 * dbus/dbus-connection.c
1990 (dbus_connection_send_message_with_reply): new function just to
1991 show how the message handler helps us deal with replies.
1993 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1995 * dbus/dbus-string.c (_dbus_string_test): free a string that
1998 * dbus/dbus-hash.c: use memory pools for the hash entries
1999 (rebuild_table): be more paranoid about overflow, and
2000 shrink table when we can
2001 (_dbus_hash_test): reduce number of sprintfs and write
2002 valid C89. Add tests for case where we grow and then
2003 shrink the hash table.
2005 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2007 * dbus/dbus-connection.c (dbus_connection_register_handler)
2008 (dbus_connection_unregister_handler): new functions
2010 * dbus/dbus-message.c (dbus_message_get_name): new
2012 * dbus/dbus-list.c: fix docs typo
2014 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2015 an object representing a handler for messages.
2017 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2020 * glib/dbus-gthread.c: (dbus_gthread_init):
2021 Don't use the gdbus prefix for public functions.
2023 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2027 Add GLib checks and fixup .pc files
2031 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2032 (gdbus_connection_check), (gdbus_connection_dispatch),
2033 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2034 (dbus_connection_gsource_new):
2035 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2036 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2037 * glib/test-dbus-glib.c: (message_handler), (main):
2040 2002-12-15 Harri Porten <porten@kde.org>
2042 * autogen.sh: check for libtoolize before attempting to use it
2044 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2047 * .cvsignore: ignore more stamp files
2049 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2051 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2052 without make install.
2054 2002-12-15 Havoc Pennington <hp@pobox.com>
2056 * dbus/dbus-threads.c: add thread stubs that a higher library
2057 layer can fill in. e.g. the GLib wrapper might fill them in with
2058 GThread stuff. We still need to use this thread API to
2059 thread-safe-ize the library.
2061 2002-12-12 Havoc Pennington <hp@pobox.com>
2063 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2064 below new interfaces and include fewer system headers.
2066 * dbus/dbus-sysdeps.c (_dbus_read): new function
2067 (_dbus_write): new function
2068 (_dbus_write_two): new function
2069 (_dbus_connect_unix_socket): new function
2070 (_dbus_listen_unix_socket): new function
2072 * dbus/dbus-message-internal.h: change interfaces to use
2075 2002-12-11 Havoc Pennington <hp@pobox.com>
2077 * dbus/dbus-types.h: add dbus_unichar
2079 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2081 * dbus/dbus-connection.c (dbus_connection_send_message): return
2084 * dbus/dbus-transport.c: include dbus-watch.h
2086 * dbus/dbus-connection.c: include dbus-message-internal.h
2088 * HACKING: add file with coding guidelines stuff.
2090 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2091 handling here, for security purposes (as in vsftpd). Not actually
2092 using this class yet.
2094 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2095 system/libc usage here, as in vsftpd, for ease of auditing (and
2096 should also simplify portability). Haven't actually moved all the
2097 system/libc usage into here yet.
2099 2002-11-25 Havoc Pennington <hp@pobox.com>
2101 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2102 always print the first verbose message.
2104 2002-11-24 Havoc Pennington <hp@pobox.com>
2106 * test/echo-client.c, test/echo-server.c: cheesy test
2109 * configure.in (AC_CHECK_FUNCS): check for writev
2111 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2114 * dbus/dbus-list.c (_dbus_list_foreach): new function
2116 * dbus/dbus-internals.c (_dbus_verbose): new function
2118 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2119 representing a server that listens for connections.
2121 * dbus/.cvsignore: create
2123 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2124 public API for reporting errors
2126 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2127 public object representing a connection that
2128 sends/receives messages. (Same object used for
2129 both client and server.)
2131 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2132 Basic abstraction for different kinds of stream
2133 that we might read/write messages from.
2135 2002-11-23 Havoc Pennington <hp@pobox.com>
2137 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2140 * dbus/dbus-test.c (main): add list test, and include
2141 dbus-test.h as intended
2143 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2144 (_dbus_hash_table_remove_int): return value indicates
2145 whether the entry existed to remove
2147 * dbus/dbus-list.c: add linked list utility class,
2150 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2153 2002-11-23 Havoc Pennington <hp@pobox.com>
2155 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2156 DBUS_END_DECLS to nothing, that should fix this once and for all
2158 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2160 * dbus/dbus-message.c, dbus/dbus-hash.c:
2161 add some missing @brief
2163 2002-11-23 Havoc Pennington <hp@pobox.com>
2165 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2166 to avoid confusing Doxygen
2168 * dbus/dbus-hash.c: @} not }@
2170 * dbus/dbus-message.c (struct DBusMessage): split out
2173 2002-11-23 Havoc Pennington <hp@pobox.com>
2175 * configure.in: pile on more warning flags if using gcc
2177 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2178 to document static functions
2180 * configure.in: add summary to end of configure so it
2181 looks nice and attractive
2183 * dbus/dbus-hash.c: finish implementation and write unit
2186 * configure.in: add --enable-tests to enable unit tests
2188 * dbus/dbus-test.c: test program to run unit tests
2189 for all files in dbus/*, initially runs a test for
2192 * dbus/dbus-internals.h: file to hold some internal utility stuff
2194 2002-11-22 Havoc Pennington <hp@redhat.com>
2196 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2197 "ported" away from Tcl
2199 * dbus/dbus-types.h: header for types such as dbus_bool_t
2201 2002-11-22 Havoc Pennington <hp@redhat.com>
2203 * dbus/dbus.h: fixups for doc warnings
2205 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2207 (QUIET): make it quiet so we can see warnings
2209 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2211 2002-11-22 Havoc Pennington <hp@redhat.com>
2213 * Makefile.am: include "Doxyfile" target in all-local
2215 * configure.in: generate the Doxyfile
2217 * Doxyfile.in: move Doxyfile here, so we can use
2218 configure to generate a Doxyfile with the right
2221 2002-11-22 Havoc Pennington <hp@redhat.com>
2223 * dbus/dbus-message.c: move inline docs into .c file
2225 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2226 so all docs are under doc/
2227 (MAN_EXTENSION): generate man pages. Use extension
2228 ".3dbus" which matches ".3qt" on my system,
2229 I guess this is OK, I don't know really.
2230 (FILE_PATTERNS): look for .c files not .h, makes sense
2233 2002-11-22 Havoc Pennington <hp@pobox.com>
2235 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2236 because any app can be a server, and any app can be a client,
2237 the bus is a special kind of server.
2239 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2241 * Doxyfile : adding. Still needs Makefile rules to be generated
2242 automatically (just run "doxygen" in the toplevel dir for now to
2245 * dbus/dbus-message.h : Adding sample docs (javadoc since
2246 resembles gtk-doc a little more)
2248 * dbus/dbus.h : Adding sample docs
2250 2002-11-21 Havoc Pennington <hp@redhat.com>
2252 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2253 so we can allow ourselves to include files directly,
2254 instead of having to use dbus.h
2256 * dbus/dbus.h: fill in
2258 * dbus/dbus-message.h: sketch out a sample header file.
2259 Include griping if you include it directly instead of
2262 * dbus/dbus-macros.h: new file with macros for extern "C",
2263 TRUE/FALSE, NULL, etc.
2265 * doc/file-boilerplate.c: put include guards in here
2267 2002-11-21 Havoc Pennington <hp@redhat.com>
2269 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2271 * COPYING: include the GPL as well, and license code
2272 under both AFL and GPL.
2274 2002-11-21 Havoc Pennington <hp@redhat.com>
2276 * acconfig.h: get rid of this
2278 * autogen.sh (run_configure): add --no-configure option
2280 * configure.in: remove AC_ARG_PROGRAM to make
2281 autoconf complain less. add AC_PREREQ.
2282 add AC_DEFINE third arg.
2284 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2287 Fix references so we can distcheck.
2289 2002-11-21 Havoc Pennington <hp@redhat.com>
2291 * Initial module creation