1 2003-02-16 Alexander Larsson <alexl@redhat.com>
3 * dbus/dbus-connection.c:
4 Implement sent_message_with_reply. (with_reply_and block is still
6 Made dispatch_message not lose message if OOM.
9 Add NoReply error (for reply timeouts).
11 2003-02-16 Alexander Larsson <alexl@redhat.com>
13 * dbus/dbus-hash.c (_dbus_hash_table_unref):
14 Actually free keys and values when destroying hashtable.
16 2003-02-16 Anders Carlsson <andersca@codefactory.se>
18 * dbus/dbus-auth.c: (client_try_next_mechanism):
21 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
22 Return TRUE if there's no thread implementation around.
24 * glib/dbus-gmain.c: (free_source),
25 (dbus_connection_hookup_with_g_main):
26 Make sure to remove the GSource when the connection is finalized.
28 2003-02-16 Anders Carlsson <andersca@codefactory.se>
30 * bus/dispatch.c: (bus_dispatch_message_handler):
32 Return an error if someone tries to send a message to a service
35 2003-02-16 Anders Carlsson <andersca@codefactory.se>
37 * bus/activation.c: (load_directory), (bus_activation_init),
38 (bus_activation_activate_service):
41 (bus_driver_handle_activate_service), (bus_driver_handle_message):
42 More work on the activation handling.
45 Add some error messages
47 * dbus/dbus-message.c: (dbus_message_new_error_reply):
48 * dbus/dbus-message.h:
49 New function that creates an error message.
51 * dbus/dbus-protocol.h:
52 Add ACTIVATE_SERVER message.
54 * dbus/dbus-server-unix.c: (unix_handle_watch),
55 (_dbus_server_new_for_domain_socket):
56 Call _dbus_fd_set_close_on_exec.
58 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
59 (_dbus_spawn_async), (_dbus_disable_sigpipe),
60 (_dbus_fd_set_close_on_exec):
61 * dbus/dbus-sysdeps.h:
62 Add _dbus_fd_set_close_on exec function. Also add function that checks
63 that all open fds are set to close-on-exec and warns otherwise.
65 * dbus/dbus-transport-unix.c:
66 (_dbus_transport_new_for_domain_socket):
67 Call _dbus_fd_set_close_on_exec.
69 2003-02-16 Havoc Pennington <hp@pobox.com>
71 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
72 allow people to avoid setting SIGPIPE to SIG_IGN
73 (_dbus_connection_new_for_transport): disable SIGPIPE unless
74 we've been asked not to
76 2003-02-15 Anders Carlsson <andersca@codefactory.se>
78 * dbus/dbus-list.c: (_dbus_list_append_link),
79 (_dbus_list_prepend_link):
80 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
84 2003-02-15 Anders Carlsson <andersca@codefactory.se>
87 * bus/activation.c: (bus_activation_entry_free),
88 (add_desktop_file_entry), (load_directory), (bus_activation_init):
91 Add simple activation support, doesn't work yet though.
93 2003-02-15 Zack Rusin <zack@kde.org>
95 * qt/dbus-qthread.cpp: small casting fix
97 2003-02-15 Anders Carlsson <andersca@codefactory.se>
99 * dbus/dbus-errors.c: (dbus_set_error):
100 * dbus/dbus-errors.h:
101 Add a few errors and make dbus_set_error void.
103 * dbus/dbus-sysdeps.c:
104 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
105 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
106 * dbus/dbus-sysdeps.h:
107 Add _dbus_spawn_async.
109 * test/spawn-test.c: (main):
110 Test for _dbus_spawn_async.
112 2003-02-15 Anders Carlsson <andersca@codefactory.se>
114 * dbus/dbus-internals.h:
115 Fix build without tests.
117 * dbus/dbus-list.c: (alloc_link):
118 Fix a segfault when a malloc fails.
120 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
121 (dbus_malloc0), (dbus_realloc):
122 Add support for malloc debugging.
124 2003-02-15 Alexander Larsson <alexl@redhat.com>
126 * dbus/dbus-threads.c:
127 * dbus/dbus-threads.h:
128 Add condvars. Remove static mutext from API.
129 Implement static mutexes by initializing them from threads_init.
131 * glib/dbus-gthread.c:
132 * qt/dbus-qthread.cpp:
133 Update with the thread api changes.
138 Turn StaticMutex into normal mutex + init function.
139 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
140 _dbus_list_append_link, _dbus_list_prepend_link
143 * dbus/dbus-sysdeps.c:
144 * dbus/dbus-sysdeps.h:
145 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
146 _dbus_atomic_dec. Only slow fallback implementation at the moment.
148 * dbus/dbus-protocol.h:
149 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
151 * dbus/dbus-message.c:
152 Make ref/unref atomic.
155 * dbus/dbus-connection-internal.h:
156 * dbus/dbus-connection.c:
157 * dbus/dbus-connection.h:
159 Change _peek to _borrow,_return & _steal_borrowed.
160 Change disconnect callback to event.
161 Make dbus_connection_dispatch_messages reentrant.
163 * dbus/dbus-transport.c:
164 Don't ref the connection on calls to the transport
167 * dbus/dbus-message-handler.c:
171 Don't use peek_message anymore
174 * test/debug-thread.c:
175 * test/debug-thread.h:
176 Simple thread implementation that asserts() on deadlocks in
177 single-threaded code.
180 (main) Call debug_threads_init.
183 Use disconnect message instead of disconnect callback.
187 Don't call dbus_connection_set_disconnect_function. Instead export
188 bus_connection_disconnect.
191 Call bus_connection_disconnect when we get a disconnected message.
193 2003-02-15 Havoc Pennington <hp@pobox.com>
195 * dbus/dbus-message.c (dbus_message_new): fool around with the
198 2003-02-14 Havoc Pennington <hp@pobox.com>
200 * dbus/dbus-mempool.c: fail if the debug functions so indicate
202 * dbus/dbus-memory.c: fail if the debug functions indicate we
205 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
206 (_dbus_decrement_fail_alloc_counter): debug functions to
207 simulate memory allocation failures
209 2003-02-14 Havoc Pennington <hp@pobox.com>
211 * dbus/dbus-errors.h (struct DBusError): add a word of padding
214 2003-02-13 Anders Carlsson <andersca@codefactory.se>
216 * bus/driver.c: (bus_driver_handle_hello):
218 * bus/services.c: (bus_service_lookup):
219 Reorder message sending so we get a more sane order.
221 * test/bus-test.c: (message_handler):
224 2003-02-13 Anders Carlsson <andersca@codefactory.se>
226 * bus/driver.c: (bus_driver_send_service_deleted),
227 (bus_driver_send_service_created), (bus_driver_send_service_lost),
228 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
229 (bus_driver_send_welcome_message),
230 (bus_driver_handle_list_services),
231 (bus_driver_handle_acquire_service),
232 (bus_driver_handle_service_exists):
233 * dbus/dbus-bus.c: (dbus_bus_register_client),
234 (dbus_bus_acquire_service), (dbus_bus_service_exists):
235 * dbus/dbus-errors.c: (dbus_result_to_string):
236 * dbus/dbus-errors.h:
237 * dbus/dbus-message.c: (dbus_message_append_args),
238 (dbus_message_append_args_valist), (dbus_message_get_args),
239 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
240 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
241 (dbus_message_iter_get_byte_array),
242 (dbus_message_iter_get_string_array), (message_iter_test),
243 (check_message_handling), (_dbus_message_test):
244 * dbus/dbus-message.h:
245 * test/bus-test.c: (main):
246 Change fields to arguments in messages, so that they won't be
247 confused with header fields.
249 * glib/test-dbus-glib.c: (main):
250 Remove append_fields from hello message.
252 2003-02-13 Anders Carlsson <andersca@codefactory.se>
254 * dbus/dbus-errors.c:
255 * dbus/dbus-message.c:
256 * dbus/dbus-string.c:
259 2003-02-13 Anders Carlsson <andersca@codefactory.se>
261 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
263 Implement support for timeouts in dbus-glib.
265 2003-02-13 Anders Carlsson <andersca@codefactory.se>
267 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
268 * dbus/dbus-message.c: (process_test_subdir):
269 * test/break-loader.c: (find_breaks_based_on):
270 Plug some memory leaks.
272 2003-02-13 Richard Hult <rhult@codefactory.se>
274 * bus/main.c: Fix build.
276 * dbus/dbus-errors.h:
277 * dbus/dbus-errors.c: Fix copyright for Anders.
279 2003-02-13 Anders Carlsson <andersca@codefactory.se>
284 * bus/connection.c: (bus_connection_foreach):
287 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
288 (unescape_string), (new_section), (parse_section_start),
289 (parse_key_value), (report_error), (bus_desktop_file_load),
290 (bus_desktop_file_get_string):
291 * bus/desktop-file.h:
292 Use DBusError for error reporting.
294 * bus/dispatch.c: (send_one_message),
295 (bus_dispatch_message_handler):
296 * bus/driver.c: (bus_driver_send_service_deleted),
297 (bus_driver_send_service_created), (bus_driver_send_service_lost),
298 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
299 (bus_driver_send_welcome_message),
300 (bus_driver_handle_list_services),
301 (bus_driver_handle_acquire_service),
302 (bus_driver_handle_service_exists):
303 * bus/loop.c: (bus_loop_run):
305 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
307 * bus/utils.c: (bus_wait_for_memory):
309 New files with general utility functions.
311 * dbus/dbus-internals.h:
312 Remove _DBUS_HANDLE_OOM.
314 2003-02-13 Anders Carlsson <andersca@codefactory.se>
316 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
317 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
318 * dbus/dbus-errors.h:
319 Add DBusError structure.
321 2003-02-13 Anders Carlsson <andersca@codefactory.se>
323 * test/data/valid-messages/standard-acquire-service.message:
324 * test/data/valid-messages/standard-hello.message:
325 * test/data/valid-messages/standard-list-services.message:
326 * test/data/valid-messages/standard-service-exists.message:
327 Add some standard messages.
329 2003-02-13 Anders Carlsson <andersca@codefactory.se>
331 * bus/driver.c: (bus_driver_send_welcome_message),
332 (bus_driver_handle_list_services),
333 (bus_driver_handle_acquire_service),
334 (bus_driver_handle_service_exists), (bus_driver_handle_message):
335 Update for API changes in libdbus.
337 * dbus/dbus-message.c: (dbus_message_new_reply):
338 * dbus/dbus-message.h:
339 Remove the name argument. The spec states that replies shouldn't
342 2003-02-13 Anders Carlsson <andersca@codefactory.se>
344 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
345 (report_error), (bus_desktop_file_load), (lookup_section),
346 (lookup_line), (bus_desktop_file_get_raw),
347 (bus_desktop_file_get_string):
348 * bus/desktop-file.h:
349 Some fixes, and new functions for getting a key value from a section.
351 2003-02-13 Havoc Pennington <hp@pobox.com>
353 * test/data/auth/fail-after-n-attempts.auth-script: new test
355 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
358 2003-02-13 Havoc Pennington <hp@pobox.com>
360 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
361 dbus_credentials_match were backward
363 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
364 NO_CREDENTIALS and ROOT_CREDENTIALS
366 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
367 into here. Never process more commands after we've reached an
368 end state; store further data as unused bytes.
370 * test/data/auth/*: add more auth tests
372 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
373 command to match exact string and EXPECT_UNUSED to match unused
376 * test/Makefile.am (dist-hook): fix to dist all the test stuff
378 2003-02-12 Havoc Pennington <hp@pobox.com>
380 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
381 \r off of popped lines
383 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
386 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
389 2003-02-12 Havoc Pennington <hp@pobox.com>
391 * dbus/Makefile.am: remove break-loader from the build, since it
394 * configure.in: add --enable-gcov to turn on coverage profiling
395 flags and disable optimization
397 2003-02-10 Havoc Pennington <hp@pobox.com>
399 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
400 initial cut at test framework for DBusAuth from laptop.
401 Doesn't quite work yet but it compiles and I need to get
402 it off the 266mhz laptop. ;-)
404 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
405 fix a memleak in error case
407 2003-02-12 Anders Carlsson <andersca@codefactory.se>
410 * bus/desktop-file.c:
411 * bus/desktop-file.h:
412 Add a desktop file parser.
414 2003-02-11 Zack Rusin <zack@kde.org>
416 * qt/message.[h|cpp]: sample implementation
417 of the KDE wrapper for DBusMessage
419 2003-02-09 Zack Rusin <zack@kde.org>
421 * test/bus-test.c: make_it_compile
422 * doc/dbus-specification.sgml: minimal semantic fix
424 2003-02-06 Anders Carlsson <andersca@codefactory.se>
430 2003-02-06 Anders Carlsson <andersca@codefactory.se>
433 * dbus/dbus-break-loader.c:
435 * test/break-loader.c:
436 Move dbus-break-loader to test/ and rename it to break-loader.
438 2003-02-02 Havoc Pennington <hp@pobox.com>
440 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
441 for code to manage cookies in your home directory
443 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
445 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
446 to authenticate, then disconnect the client.
448 2003-02-03 Alexander Larsson <alexl@redhat.com>
450 * dbus/dbus-message.c (dbus_message_append_fields):
453 2003-02-02 Anders Carlsson <andersca@codefactory.se>
455 * doc/dbus-specification.sgml:
456 Update address format section.
458 2003-02-02 Anders Carlsson <andersca@codefactory.se>
461 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
462 (message_handler), (new_connection_callback), (loop_quit),
466 2003-02-02 Anders Carlsson <andersca@codefactory.se>
468 * bus/driver.c: (bus_driver_handle_service_exists):
469 Simplify the code a bit.
471 * dbus/dbus-bus.c: (dbus_bus_service_exists):
474 2003-02-02 Anders Carlsson <andersca@codefactory.se>
477 Add libdbus-daemon.la and link to it.
479 2003-02-01 James Willcox <jwillcox@gnome.org>
481 * bus/driver.c: (bus_driver_handle_own_service):
482 Actually include the service reply code in the message.
484 2003-02-02 Anders Carlsson <andersca@codefactory.se>
486 * bus/driver.c: (bus_driver_handle_service_exists):
487 Don't unref the incoming message.
489 2003-02-02 Anders Carlsson <andersca@codefactory.se>
491 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
493 2003-02-02 Anders Carlsson <andersca@codefactory.se>
495 * dbus/dbus-server.c: (dbus_server_listen):
496 * dbus/dbus-transport.c: (_dbus_transport_open):
497 ifdef out the calls to the debug transport and server.
499 2003-02-02 Alexander Larsson <alexl@redhat.com>
501 * dbus/dbus-watch.c (dbus_watch_get_flags):
502 Add note in the docs that ERROR or HANGUP won't be returned
503 and are assumed always on.
505 * glib/dbus-gmain.c (add_watch):
506 Always add IO_ERR | IO_HUP
508 * dbus/dbus-message.h:
509 Add semicolon after dbus_message_iter_get_string_array().
510 Makes qt code build again
512 2003-02-01 Anders Carlsson <andersca@codefactory.se>
514 * bus/driver.c: (create_unique_client_name),
515 (bus_driver_handle_hello):
516 Don't take a name, just use a numeric id to identify
520 * dbus/dbus-bus.c: (dbus_bus_register_client),
521 (dbus_bus_acquire_service), (dbus_bus_service_exists):
523 Add new convenience functions for communicating with the bus.
525 * dbus/dbus-message.h:
527 * dbus/dbus-protocol.h:
530 2003-02-01 Alexander Larsson <alexl@redhat.com>
532 * dbus/dbus-message.c (dbus_message_append_fields):
533 Add some more doc comments.
535 2003-02-01 Havoc Pennington <hp@pobox.com>
537 * dbus/dbus-break-loader.c (randomly_modify_length): change
538 a 4-byte value in the message as if it were a length
540 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
541 execute bit on saved files
543 2003-02-01 Havoc Pennington <hp@pobox.com>
545 * dbus/dbus-break-loader.c (main): new program to find messages
546 that break the loader.
548 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
549 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
551 * dbus/dbus-string.c (_dbus_string_set_byte): new
553 2003-01-31 Havoc Pennington <hp@pobox.com>
555 * dbus/dbus-message.c: refactor the test code to be more general,
556 in preparation for writing a "randomly permute test cases to
557 try to break the loader" program.
559 2003-01-31 Havoc Pennington <hp@pobox.com>
561 * doc/dbus-specification.sgml: work on the specification
563 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
564 the protocol version of the message.
566 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
567 no longer specifies that.
568 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
571 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
572 "break" for DBUS_TYPE_NIL, remove @todo
574 2003-01-31 Havoc Pennington <hp@pobox.com>
576 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
577 just set_is_error/get_is_error as this is a commonly-used
578 function, and write docs.
580 2003-01-31 Anders Carlsson <andersca@codefactory.se>
582 * dbus/dbus-address.c: (dbus_address_entry_free):
583 Free key and value lists.
585 * dbus/dbus-internals.c: (_dbus_type_to_string):
586 Add the types we didn't have.
588 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
589 (_dbus_marshal_validate_arg):
592 * dbus/dbus-message.c: (dbus_message_set_sender):
593 Remove todo about being able to set sender to NULL.
595 (dbus_message_set_is_error_reply),
596 (dbus_message_get_is_error_reply):
597 * dbus/dbus-message.h:
600 * dbus/dbus-protocol.h:
601 Add error reply flag.
603 * test/data/valid-messages/opposite-endian.message:
604 Add NIL type to test.
606 2003-01-31 Havoc Pennington <hp@pobox.com>
608 * doc/dbus-specification.sgml: fully specify the header. Add
609 flags and major protocol version, and change header/body len to
612 * dbus/dbus-message-builder.c (append_saved_length): append length
615 * dbus/dbus-message.c (dbus_message_create_header): change header
616 length and body length to unsigned. Add the new fields from the
618 (_dbus_message_loader_return_buffer): unsigned header/body len
620 2003-01-30 Havoc Pennington <hp@pobox.com>
622 * dbus/dbus-auth.c: rework to use only REJECTED, no
625 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
626 use REJECTED, suggested by Mark McLoughlin
628 2003-01-30 Havoc Pennington <hp@pobox.com>
630 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
631 a better way to report errors here. e.g. "unix address lacks
632 path" or something. also "no such file" when the path doesn't
635 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
637 (dbus_parse_address): add @todo about documenting address format,
638 and allowing , and ; to be escaped
640 2003-01-30 Anders Carlsson <andersca@codefactory.se>
643 Add dbus-address.[ch]
645 * dbus/dbus-address.c: (dbus_address_entry_free),
646 (dbus_address_entries_free), (create_entry),
647 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
648 (dbus_parse_address), (_dbus_address_test):
649 * dbus/dbus-address.h:
650 New files for dealing with address parsing.
652 * dbus/dbus-connection.c:
653 Document timeout functions.
655 * dbus/dbus-message.c:
656 Document dbus_message_new_from_message.
658 * dbus/dbus-server-debug.c:
661 * dbus/dbus-server.c: (dbus_server_listen):
662 Parse address and use correct server implementation.
664 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
665 * dbus/dbus-string.h:
666 New function with test.
668 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
672 * dbus/dbus-transport-debug.c:
675 * dbus/dbus-transport.c: (_dbus_transport_open):
676 Parse address and use correct transport implementation.
678 2003-01-30 Havoc Pennington <hp@pobox.com>
680 * dbus/dbus-message.c: use message->byte_order instead of
681 DBUS_COMPILER_BYTE_ORDER throughout.
682 (dbus_message_create_header): pad header to align the
683 start of the body of the message to 8-byte boundary
685 * dbus/dbus-marshal.h: make all the demarshalers take const
686 DBusString arguments.
688 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
689 validate message args here, so we don't have to do slow validation
690 later, and so we catch bad messages as they are incoming. Also add
691 better checks on header_len and body_len. Also fill in
694 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
695 implemented properly)
696 (_dbus_string_validate_nul): new function to check all-nul
698 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
699 get_arg_end_pos and remove all validation
700 (_dbus_marshal_validate_arg): actually do validation here.
702 2003-01-29 Havoc Pennington <hp@pobox.com>
704 * dbus/dbus-message.c (check_message_handling): fix assertion
705 failure on set_client_serial
707 2003-01-28 Havoc Pennington <hp@pobox.com>
709 * dbus/dbus-server-debug.c: Add doc section comments
711 * dbus/dbus-transport-debug.c: add doc section comments
713 2003-01-28 Havoc Pennington <hp@redhat.com>
715 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
716 the reverse order from how I had it
717 (_dbus_string_base64_encode): reverse encoding order. I was
718 basically byteswapping everything during encoding.
720 2003-01-28 Anders Carlsson <andersca@codefactory.se>
722 * dbus/dbus-connection-internal.h:
723 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
724 (_dbus_connection_remove_timeout):
725 Add functions for adding and removing timeouts.
727 * dbus/dbus-message.c: (dbus_message_new_from_message):
728 Add new function that takes a message and creates an exact
729 copy of it, but with the refcount set to 1.
730 (check_message_handling):
733 * dbus/dbus-server-protected.h:
734 * dbus/dbus-server.c: (_dbus_server_init_base),
735 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
736 (dbus_server_set_timeout_functions):
737 (_dbus_server_remove_timeout):
738 New functions so that a server can add and remove timeouts.
740 (dbus_server_listen):
741 Add commented out call to dbus_server_debug_new.
743 * dbus/dbus-timeout.c: (_dbus_timeout_new):
744 Actually set the handler, doh.
746 * dbus/dbus-transport.c: (_dbus_transport_open):
747 Add commented out call to dbus_transport_debug_client_new.
750 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
752 2003-01-28 Havoc Pennington <hp@pobox.com>
754 * dbus/dbus-message.c (check_message_handling): function to check
755 on the loaded message, iterates over it etc.
757 2003-01-28 Havoc Pennington <hp@pobox.com>
759 * test/Makefile.am (dist-hook): fix make distdir
761 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
763 2003-01-27 Havoc Pennington <hp@pobox.com>
765 * dbus/dbus-mempool.c (time_for_size): replace printf with
768 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
769 empty lines; fix the SAVE_LENGTH stuff to be
770 START_LENGTH/END_LENGTH so it actually works; couple other
773 * test/Makefile.am (dist-hook): add dist-hook for .message files
775 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
776 can be constant or locked.
777 (_dbus_string_free): allow freeing a const string as
780 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
782 * dbus/dbus-test-main.c (main): take an argument which is the
783 directory containing test data
785 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
786 argument to this and load all the messages in test/data/
787 checking that they can be loaded or not loaded as appropriate.
789 2003-01-27 Anders Carlsson <andersca@codefactory.se>
791 * bus/dispatch.c: (bus_dispatch_message_handler):
792 Dispatch messages sent to services.
794 * bus/driver.c: (bus_driver_send_service_deleted),
795 (bus_driver_send_service_created), (bus_driver_send_service_lost),
796 (bus_driver_send_service_acquired):
797 Add helper functions for sending service related messages.
799 (bus_driver_send_welcome_message):
800 Send HELLO_REPLY instead of WELCOME.
802 (bus_driver_handle_list_services):
803 Send LIST_SERVICES_REPLY instead of SERVICES.
805 (bus_driver_handle_own_service),
806 (bus_driver_handle_service_exists):
807 New message handlers.
809 (bus_driver_handle_message):
810 Invoke new message handlers.
812 (bus_driver_remove_connection):
813 Don't remove any services here since that's done automatically
814 by bus_service_remove_owner now.
817 New function signatures.
819 * bus/services.c: (bus_service_add_owner):
820 Send ServiceAcquired message if we're the only primary owner.
822 (bus_service_remove_owner):
823 Send ServiceAcquired/ServiceLost messages.
825 (bus_service_set_prohibit_replacement),
826 (bus_service_get_prohibit_replacement):
827 Functions for setting prohibit replacement.
829 (bus_service_has_owner):
830 New function that checks if a connection is in the owner queue of
834 Add new function signatures.
836 * dbus/dbus-list.c: (_dbus_list_test):
837 Add tests for _dbus_list_remove_last and traversing the list backwards.
840 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
841 go any further, so return NULL then.
843 * dbus/dbus-protocol.h:
844 Add new messages, service flags and service replies.
846 2003-01-26 Havoc Pennington <hp@pobox.com>
848 * dbus/dbus-message-builder.c: implement, completely untested.
850 * test/data/*: add data to be used in testing.
851 ".message" files are our simple loadable text format.
852 ".message-raw" will be binary dumps of messages.
854 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
856 2003-01-26 Havoc Pennington <hp@pobox.com>
858 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
860 * dbus/dbus-errors.c (dbus_result_to_string): add
863 * dbus/dbus-message-builder.c: new file, will contain code to load
864 up messages from files. Not implemented yet.
866 2003-01-26 Havoc Pennington <hp@pobox.com>
868 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
869 the sender by setting to NULL
871 2003-01-26 Havoc Pennington <hp@pobox.com>
873 The unit tests pass, but otherwise untested. If it breaks, the
874 tests should have been better. ;-)
876 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
879 * dbus/dbus-message.c: redo everything so we maintain
880 message->header as the only copy of the various fields.
881 This avoids the possibility of out-of-memory in some cases,
882 for example dbus_message_lock() can't run out of memory anymore,
883 and avoids extra copying. Figured I may as well go ahead and do
884 this since it was busted for dbus_message_lock to not return
885 failure on OOM, and dbus_message_write_header was totally
886 unchecked for OOM. Also fixed some random other bugs.
888 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
889 that strings are nul-terminated. Also, end_pos can be equal
890 to string length just not greater than, I think.
891 (_dbus_marshal_set_int32): new function
892 (_dbus_marshal_set_uint32): new function
893 (_dbus_marshal_set_string): new function
895 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
896 a warning, init timeout_list to NULL
897 (dbus_connection_send_message): don't use uninitialized variable
900 * dbus/dbus-string.c (_dbus_string_replace_len): new function
902 2003-01-26 Anders Carlsson <andersca@codefactory.se>
904 * bus/driver.c: (bus_driver_handle_hello),
905 (bus_driver_send_welcome_message):
908 2003-01-26 Anders Carlsson <andersca@codefactory.se>
910 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
911 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
912 (dbus_connection_unref):
913 * dbus/dbus-marshal.c: (_dbus_marshal_test):
914 * dbus/dbus-message.c: (dbus_message_unref),
917 (dbus_message_get_fields):
918 Remove debugging printout.
920 (_dbus_message_loader_return_buffer):
921 Don't store the header string.
923 (_dbus_message_test):
926 2003-01-26 Richard Hult <rhult@codefactory.se>
928 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
929 the file descriptor list, since it can change under us.
931 2003-01-25 Anders Carlsson <andersca@codefactory.se>
933 * glib/dbus-gmain.c: (dbus_connection_prepare),
934 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
935 (remove_watch), (dbus_connection_hookup_with_g_main):
936 Rewrite the glib handling to use its own GSource instead of a
937 GIOChannel so we can catch messages put in the queue while waiting
940 2003-01-25 Anders Carlsson <andersca@codefactory.se>
943 * bus/connection.c: (connection_disconnect_handler),
944 (connection_watch_callback), (bus_connection_setup):
945 * bus/dispatch.c: (send_one_message),
946 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
947 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
949 * bus/driver.c: (bus_driver_send_service_deleted),
950 (bus_driver_send_service_created), (bus_driver_handle_hello),
951 (bus_driver_send_welcome_message),
952 (bus_driver_handle_list_services), (bus_driver_remove_connection),
953 (bus_driver_handle_message):
955 Refactor code, put the message dispatching in its own file. Use
956 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
959 2003-01-25 Anders Carlsson <andersca@codefactory.se>
961 * dbus/dbus-internals.h:
962 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
964 * dbus/dbus-message.c: (dbus_message_get_sender):
965 * dbus/dbus-message.h:
966 Implement dbus_message_get_sender.
968 * dbus/dbus-protocol.h:
969 Add message and service defines.
971 2003-01-25 Anders Carlsson <andersca@codefactory.se>
973 * dbus/dbus-connection.c: (dbus_connection_send_message):
974 * dbus/dbus-message-internal.h:
975 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
976 (dbus_message_write_header):
977 Remove _dbus_messag_unlock and don't set the client serial on a
978 message if one already exists.
980 2003-01-24 Havoc Pennington <hp@pobox.com>
982 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
985 * bus/driver.c (bus_driver_handle_list_services): fix a leak
988 2003-01-25 Anders Carlsson <andersca@codefactory.se>
990 * dbus/dbus-list.c: (alloc_link), (free_link):
991 Use a memory pool for the links.
993 2003-01-25 Anders Carlsson <andersca@codefactory.se>
995 * bus/connection.c: (bus_connection_foreach):
997 Add new bus_connection_foreach function.
999 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1000 Add function that broadcasts a message to all clients.
1002 (bus_driver_send_service_created), (bus_driver_handle_hello),
1003 (bus_driver_send_welcome_message),
1004 (bus_driver_handle_list_services), (bus_driver_message_handler):
1005 Implement functions that take care of listing services, and notifying
1006 clients when new services are created.
1008 * bus/services.c: (bus_services_list):
1010 Add new function that returns an array of strings with the currently
1011 registered services.
1014 * glib/dbus-gmain.c:
1015 Update copyright year.
1017 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1019 * dbus/dbus-connection.c: (dbus_connection_send_message):
1020 Unlock the message in case it was sent earlier.
1022 (dbus_connection_send_message_with_reply_and_block):
1023 Remove the reply message from the list.
1025 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1026 Set array_len and new_pos correctly.
1028 (_dbus_marshal_test):
1029 Remove debug output.
1031 * dbus/dbus-message-internal.h:
1032 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1033 New function that returns the reply serial.
1035 (_dbus_message_unlock):
1036 New function that unlocks a message and resets its header.
1038 (dbus_message_append_string_array),
1039 (dbus_message_get_fields_valist),
1040 (dbus_message_iter_get_field_type),
1041 (dbus_message_iter_get_string_array),
1042 (dbus_message_get_fields),
1043 (dbus_message_append_fields_valist):
1044 Handle string arrays.
1046 (dbus_message_set_sender):
1047 Make this function public since the bus daemon needs it.
1049 (decode_header_data):
1050 Set the reply serial to -1 initially.
1052 * dbus/dbus-message.h:
1053 Add dbus_message_set_sender.
1055 2003-01-24 Havoc Pennington <hp@pobox.com>
1057 * doc/dbus-specification.sgml: add some stuff
1059 2003-01-22 Havoc Pennington <hp@pobox.com>
1061 * doc/dbus-specification.sgml: Start to document the protocol.
1063 2003-01-22 Havoc Pennington <hp@pobox.com>
1065 * dbus/dbus-connection.c
1066 (dbus_connection_send_message_with_reply_and_block): add some @todo
1068 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1070 2003-01-21 Havoc Pennington <hp@pobox.com>
1072 (patch untested because can't compile)
1074 * bus/driver.c (create_unique_client_name): make this function
1075 never recycle client names. Also, caller should initialize
1078 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1080 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1082 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1083 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1084 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1085 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1086 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1087 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1088 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1089 * dbus/dbus-marshal.h:
1090 * dbus/dbus-protocol.h:
1091 Add support for marshalling and demarshalling integer, double
1094 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1099 * bus/connection.c: (connection_disconnect_handler):
1100 Remove the connection from the bus driver's list.
1102 (connection_watch_callback): Dispatch messages.
1104 (free_connection_data): Free connection name.
1106 (bus_connection_setup): Add connection to the bus driver's list.
1107 (bus_connection_remove_owned_service):
1108 (bus_connection_set_name), (bus_connection_get_name):
1109 Add functions for setting and getting the connection's name.
1112 Add function headers.
1114 * bus/driver.c: (create_unique_client_name),
1115 (bus_driver_handle_hello_message),
1116 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1117 (bus_driver_add_connection), (bus_driver_remove_connection):
1120 * bus/services.c: (bus_service_free):
1122 New file that handles communication and registreation with the bus
1125 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1127 * dbus/dbus-connection.c: (dbus_connection_send_message):
1128 Add a new client_serial parameter.
1130 (dbus_connection_send_message_with_reply):
1131 Remove a @todo since we've implemented the blocking function.
1133 (dbus_connection_send_message_with_reply_and_block):
1134 New function that sends a message and waits for a reply and
1135 then returns the reply.
1137 * dbus/dbus-connection.h:
1140 * dbus/dbus-errors.c: (dbus_result_to_string):
1141 * dbus/dbus-errors.h:
1142 Add new DBUS_RESULT.
1144 * dbus/dbus-message-internal.h:
1145 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1146 (_dbus_message_set_sender), (dbus_message_write_header),
1147 (dbus_message_new_reply), (decode_header_data),
1148 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1149 * dbus/dbus-message.h:
1150 Add new functions that set the reply serial and sender.
1151 Also marshal and demarshal them correctly and add test.
1153 * dbus/dbus-protocol.h:
1154 Add new DBUS_MESSAGE_TYPE_SENDER.
1157 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1158 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1159 (dbus_connection_hookup_with_g_main):
1160 * glib/test-dbus-glib.c: (main):
1161 Rewrite to use GIOChannel and remove the GSource crack.
1163 * test/echo-client.c: (main):
1164 * test/watch.c: (check_messages):
1165 Update for changed APIs
1167 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1169 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1171 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1172 Create a DBusTimeoutList.
1173 (dbus_connection_set_timeout_functions): Add new function to
1174 set timeout callbacks
1176 * dbus/dbus-connection.h: Add public DBusTimeout API.
1178 * dbus/dbus-message.c: (dbus_message_get_service):
1179 * dbus/dbus-message.h: New function.
1181 * dbus/dbus-server.c: Fix small doc typo.
1183 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1185 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1187 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1188 of the string, just as long as specified.
1190 2003-01-19 Havoc Pennington <hp@pobox.com>
1192 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1195 * dbus/dbus-server.c (dbus_server_set_max_connections)
1196 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1197 keep track of current number of connections, and add API for
1198 setting a max (but haven't implemented enforcing the max yet)
1200 2003-01-18 Havoc Pennington <hp@pobox.com>
1202 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1203 reading/writing if read_watch != NULL or write_watch != NULL.
1205 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1206 the message loader code to actually load message->header and
1207 message->body into the newly-created message.
1209 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1212 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1213 (dbus_connection_get_max_message_size)
1214 (dbus_connection_set_max_live_messages_size)
1215 (dbus_connection_get_max_live_messages_size): implement some
1216 resource limitation functions
1218 * dbus/dbus-resources.c: new file implementing some of the
1219 resource limits stuff
1221 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1222 missing docs, add @todo to handle OOM etc.
1224 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1227 2003-01-18 Havoc Pennington <hp@pobox.com>
1229 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1230 connection if it hasn't been already.
1232 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1233 replace with DisconnectFunction.
1235 2003-01-18 Havoc Pennington <hp@pobox.com>
1237 Building --disable-verbose-mode --disable-asserts --disable-tests
1238 cuts the library from 112K to 45K or so
1240 * configure.in: check for varargs macro support,
1241 add --enable-verbose-mode, --enable-asserts.
1243 * dbus/dbus-internals.h (_dbus_assert): support
1245 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1247 2003-01-18 Havoc Pennington <hp@pobox.com>
1249 * dbus/dbus-test.c: include config.h so that tests actually run
1251 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1252 so the failure mode when that assumption fails will be plenty
1255 2003-01-18 Havoc Pennington <hp@pobox.com>
1257 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1259 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1262 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1263 since we don't want to use those in make check
1265 2003-01-15 Havoc Pennington <hp@redhat.com>
1271 2003-01-15 Havoc Pennington <hp@redhat.com>
1273 * test/Makefile.am: fix so that test source code ends up in the
1274 distribution on make distcheck
1276 2003-01-15 Havoc Pennington <hp@redhat.com>
1282 2003-01-15 Havoc Pennington <hp@redhat.com>
1284 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1285 fix build when --disable-tests
1287 * Makefile.am (EXTRA_DIST): put HACKING in here
1289 * HACKING: document procedure for making a tarball release.
1291 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1293 * bus/connection.c: (connection_error_handler),
1294 (bus_connection_setup):
1295 * bus/main.c: (main):
1296 Make sure that the DBusConnectionData struct is NULLed
1297 out to prevent a segfault.
1299 * dbus/dbus-errors.c: (dbus_result_to_string):
1300 * dbus/dbus-errors.h:
1301 * dbus/dbus-message.c: (dbus_message_get_fields),
1302 (dbus_message_get_fields_valist), (_dbus_message_test):
1303 * dbus/dbus-message.h:
1304 Make dbus_message_get_fields return a result code so we can
1305 track invalid fields as well as oom.
1307 2003-01-11 Havoc Pennington <hp@pobox.com>
1309 * configure.in: change --enable-test/--enable-ansi action-if-given
1310 to enable_foo=$enableval instead of enable_foo=yes
1312 2003-01-08 Havoc Pennington <hp@pobox.com>
1314 * dbus/dbus-string.c (_dbus_string_align_length): new function
1316 * dbus/dbus-test-main.c: move main() for test app here
1318 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1319 symbol to run tests, because dbus-test isn't in the main
1322 Code review nitpicks.
1324 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1325 for people with narrow emacs ;-). Assert client_serial was filled
1326 in. Assert message->name != NULL.
1327 (dbus_message_append_fields): have "first_field_type" arg separate
1328 from va list, needed for C++ binding that also uses varargs IIRC
1329 and helps with type safety
1330 (dbus_message_new): add @todo about using DBusString to store
1331 service/name internally
1332 (dbus_message_new): don't leak ->service and ->name on OOM later
1334 (dbus_message_unref): free the service name
1335 (dbus_message_get_fields): same change to varargs
1336 i.e. first_field_type
1337 (_dbus_message_loader_return_buffer): assert that the message data
1338 is aligned (if not it's a bug in our code). Put in verbose griping
1339 about why we set corrupted = TRUE.
1340 (decode_header_data): add FIXME that char* is evil. Was going to
1341 add FIXME about evil locale-specific string.h strncmp, but just
1342 switched to wacky string-as-uint32 optimization. Move check for
1343 "no room for field name" above get_const_data_len() to avoid
1344 assertion failure in get_const_data_len if we have trailing 2
1345 bytes or the like. Check for service and name fields being
1346 provided twice. Don't leak service/name on error. Require field
1347 names to be aligned to 4 bytes.
1349 * dbus/dbus-marshal.c: move byte swap stuff to header
1350 (_dbus_pack_int32): uscore-prefix
1351 (_dbus_unpack_int32): uscore-prefix
1352 (_dbus_unpack_uint32): export
1353 (_dbus_demarshal_string): add @todo complaining about use of
1355 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1356 handling allowing corrupt data to go unchecked
1358 2003-01-08 Havoc Pennington <hp@redhat.com>
1360 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1361 to the select() as needed for authentication. (should be using
1362 _dbus_poll() not select, but for another day)
1364 * dbus/dbus.h: include dbus/dbus-protocol.h
1366 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1368 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1371 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1373 * dbus/dbus-internals.c: (_dbus_type_to_string):
1374 New function that returns a string describing a type.
1376 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1377 * dbus/dbus-marshal.h:
1378 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1379 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1380 (dbus_message_iter_get_byte_array):
1381 * dbus/dbus-message.h:
1382 Add new convenience functions for appending and getting message fields.
1383 Also add demarshalling routines for byte arrays.
1385 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1387 * dbus/dbus-connection-internal.h:
1388 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1389 (_dbus_connection_get_next_client_serial),
1390 (dbus_connection_send_message):
1391 * dbus/dbus-internals.h:
1392 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1393 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1394 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1395 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1396 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1397 (_dbus_verbose_bytes), (_dbus_marshal_test):
1398 * dbus/dbus-marshal.h:
1399 * dbus/dbus-message-internal.h:
1400 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1401 (dbus_message_write_header), (_dbus_message_lock),
1402 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1403 (dbus_message_get_name), (dbus_message_append_int32),
1404 (dbus_message_append_uint32), (dbus_message_append_double),
1405 (dbus_message_append_string), (dbus_message_append_byte_array),
1406 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1407 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1408 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1409 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1410 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1411 (decode_header_data), (_dbus_message_loader_return_buffer),
1412 (message_iter_test), (_dbus_message_test):
1413 * dbus/dbus-message.h:
1414 * dbus/dbus-protocol.h:
1415 * dbus/dbus-test.c: (main):
1417 * glib/test-dbus-glib.c: (message_handler), (main):
1418 * test/echo-client.c: (main):
1419 * test/watch.c: (check_messages):
1420 Make messages sendable and receivable for real.
1422 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1424 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1425 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1426 * dbus/dbus-message.c: (dbus_message_append_int32),
1427 (dbus_message_append_uint32), (dbus_message_append_double),
1428 (dbus_message_append_string), (dbus_message_append_byte_array):
1429 Handle OOM restoration.
1431 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1433 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1434 (_dbus_demarshal_string), (_dbus_marshal_test):
1435 * dbus/dbus-marshal.h:
1436 * dbus/dbus-message.c: (dbus_message_get_name),
1437 Document these functions.
1439 (dbus_message_append_int32), (dbus_message_append_uint32),
1440 (dbus_message_append_double), (dbus_message_append_string),
1441 (dbus_message_append_byte_array):
1442 * dbus/dbus-message.h:
1443 Add functions for adding message fields of different types.
1445 * dbus/dbus-protocol.h:
1446 Add the different types.
1448 2003-01-05 Havoc Pennington <hp@pobox.com>
1450 * bus/connection.c: implement routines for handling connections,
1451 first thing is keeping a list of owned services on each connection
1452 and setting up watches etc.
1454 * bus/services.c: implement a mapping from service names to lists
1457 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1459 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1460 to use static mutexes for global data
1462 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1463 collection of functions to set/get application-specific data
1464 on the DBusConnection.
1466 2003-01-04 Havoc Pennington <hp@pobox.com>
1468 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1469 (_dbus_poll): new function
1471 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1474 * bus/loop.c: initial code for the daemon main loop
1476 2003-01-04 Havoc Pennington <hp@pobox.com>
1478 * test/watch.c (error_handler): make it safe if the error handler
1479 is called multiple times (if we s/error handler/disconnect
1480 handler/ we should just guarantee it's called only once)
1482 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1483 error handler on disconnect (it's quite possible we should
1484 just change the error handler to a "disconnect handler," I'm
1485 not sure we have any other meaningful errors)
1487 * configure.in: check for getpwnam_r
1489 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1490 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1491 mechanism as in SASL spec, using socket credentials
1493 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1494 (_dbus_send_credentials_unix_socket): new function
1496 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1498 (_dbus_write): only check errno if <0 returned
1499 (_dbus_write_two): ditto
1501 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1503 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1504 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1505 (_dbus_marshal_test):
1506 * dbus/dbus-marshal.h:
1507 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1508 to _dbus_marshal_utf8_string. Also fix some tests.
1510 2002-12-28 Harri Porten <porten@kde.org>
1512 * configure.in: added check for C++ compiler and a very cheesy
1513 check for the Qt integration
1515 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1517 * qt/Makefile.am: added
1519 * qt/.cvsignore: added
1521 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1522 latter, added #ifdef QT_THREAD_SUPPORT guard.
1524 * dbus/Makefile.am: added missing headers for make dist
1526 2002-12-28 Kristian Rietveld <kris@gtk.org>
1528 * dbus/Makefile.am: fixup export-symbols-regex.
1530 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1532 * acinclude.m4: Add this file and put the
1533 PKG_CHECK_MODULE macro in it.
1535 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1537 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1538 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1539 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1540 (_dbus_marshal_test):
1541 Make the demarshalling routines align the pos argument.
1542 Add string marshalling tests and fix the obvious bugs
1545 2002-12-26 Havoc Pennington <hp@pobox.com>
1547 * dbus/dbus-auth.c: fixes fixes fixes
1549 * dbus/dbus-transport-unix.c: wire up support for
1550 encoding/decoding data on the wire
1552 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1553 (_dbus_auth_decode_data): append to target string
1554 instead of nuking it.
1556 2002-12-26 Havoc Pennington <hp@pobox.com>
1558 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1559 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1562 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1563 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1564 now). Main point is because I wanted unpack_uint32 to implement
1566 (_dbus_verbose_bytes): new function
1568 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1570 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1571 mechanism to handle a corrupt message stream
1572 (_dbus_message_loader_new): fix preallocation to only prealloc,
1575 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1576 (_dbus_string_test): enhance tests for copy/move and fix the
1579 * dbus/dbus-transport-unix.c: Hold references in more places to
1580 avoid reentrancy problems
1582 * dbus/dbus-transport.c: ditto
1584 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1585 leak reference count in no-message case
1587 * test/watch.c (do_mainloop): handle adding/removing watches
1588 during iteration over the watches. Also, ref the connection/server
1589 stored on a watch, so we don't try to mangle a destroyed one.
1591 * dbus/dbus-transport-unix.c (do_authentication): perform
1594 * dbus/dbus-auth.c (get_state): add a state
1595 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1596 (_dbus_auth_get_unused_bytes): append the unused bytes
1597 to the passed in string, rather than prepend
1599 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1600 the auth conversation DBusAuth
1602 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1603 (_dbus_transport_new_for_domain_socket): when creating a
1604 transport, pass in whether it's a client-side or server-side
1605 transport so we know which DBusAuth to create
1607 2002-12-03 Havoc Pennington <hp@pobox.com>
1609 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1610 _after_ finalizing the derived members
1611 (unix_connection_set): unref watch if we fail to add it
1613 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1614 transport first, so that the connection owned by the
1615 transport will be valid as the transport finalizes.
1617 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1618 if necessary, and remove watches from the connection.
1620 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1622 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1624 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1625 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1626 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1627 (_dbus_marshal_test):
1628 * dbus/dbus-marshal.h:
1629 Add string marshal functions and have the demarshal functions
1630 return the new position.
1632 2002-12-25 Havoc Pennington <hp@pobox.com>
1634 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1635 it is a simple protocol that just maps directly to SASL.
1637 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1638 initial implementation, not actually used yet.
1640 * dbus/dbus-string.c (_dbus_string_find): new function
1641 (_dbus_string_equal): new function
1642 (_dbus_string_base64_encode): new function
1643 (_dbus_string_base64_decode): new function
1645 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1648 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1649 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1650 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1651 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1652 * dbus/dbus-marshal.h:
1653 * dbus/dbus-protocol.h:
1654 * dbus/dbus-test.c: (main):
1656 Add un-optimized marshalling/demarshalling routines.
1658 2002-12-25 Harri Porten <porten@kde.org>
1660 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1662 2002-12-24 Zack Rusin <zack@kde.org>
1664 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1665 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1668 2002-12-24 Havoc Pennington <hp@pobox.com>
1670 * glib/dbus-gthread.c: fix include
1672 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1673 I think glib API needs to change, though, as you don't
1674 want to use DBusMessageFunction, you want to use the
1675 DBusMessageHandler object. Probably
1676 dbus_connection_open_with_g_main_loop()
1677 and dbus_connection_setup_g_main_loop() or something like that
1678 (but think of better names...) that just create a connection
1679 that has watch/timeout functions etc. already set up.
1681 * dbus/dbus-connection.c
1682 (dbus_connection_send_message_with_reply): new function just to
1683 show how the message handler helps us deal with replies.
1685 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1687 * dbus/dbus-string.c (_dbus_string_test): free a string that
1690 * dbus/dbus-hash.c: use memory pools for the hash entries
1691 (rebuild_table): be more paranoid about overflow, and
1692 shrink table when we can
1693 (_dbus_hash_test): reduce number of sprintfs and write
1694 valid C89. Add tests for case where we grow and then
1695 shrink the hash table.
1697 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1699 * dbus/dbus-connection.c (dbus_connection_register_handler)
1700 (dbus_connection_unregister_handler): new functions
1702 * dbus/dbus-message.c (dbus_message_get_name): new
1704 * dbus/dbus-list.c: fix docs typo
1706 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1707 an object representing a handler for messages.
1709 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1712 * glib/dbus-gthread.c: (dbus_gthread_init):
1713 Don't use the gdbus prefix for public functions.
1715 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1719 Add GLib checks and fixup .pc files
1723 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1724 (gdbus_connection_check), (gdbus_connection_dispatch),
1725 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1726 (dbus_connection_gsource_new):
1727 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1728 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1729 * glib/test-dbus-glib.c: (message_handler), (main):
1732 2002-12-15 Harri Porten <porten@kde.org>
1734 * autogen.sh: check for libtoolize before attempting to use it
1736 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1739 * .cvsignore: ignore more stamp files
1741 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1743 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1744 without make install.
1746 2002-12-15 Havoc Pennington <hp@pobox.com>
1748 * dbus/dbus-threads.c: add thread stubs that a higher library
1749 layer can fill in. e.g. the GLib wrapper might fill them in with
1750 GThread stuff. We still need to use this thread API to
1751 thread-safe-ize the library.
1753 2002-12-12 Havoc Pennington <hp@pobox.com>
1755 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1756 below new interfaces and include fewer system headers.
1758 * dbus/dbus-sysdeps.c (_dbus_read): new function
1759 (_dbus_write): new function
1760 (_dbus_write_two): new function
1761 (_dbus_connect_unix_socket): new function
1762 (_dbus_listen_unix_socket): new function
1764 * dbus/dbus-message-internal.h: change interfaces to use
1767 2002-12-11 Havoc Pennington <hp@pobox.com>
1769 * dbus/dbus-types.h: add dbus_unichar
1771 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1773 * dbus/dbus-connection.c (dbus_connection_send_message): return
1776 * dbus/dbus-transport.c: include dbus-watch.h
1778 * dbus/dbus-connection.c: include dbus-message-internal.h
1780 * HACKING: add file with coding guidelines stuff.
1782 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1783 handling here, for security purposes (as in vsftpd). Not actually
1784 using this class yet.
1786 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1787 system/libc usage here, as in vsftpd, for ease of auditing (and
1788 should also simplify portability). Haven't actually moved all the
1789 system/libc usage into here yet.
1791 2002-11-25 Havoc Pennington <hp@pobox.com>
1793 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1794 always print the first verbose message.
1796 2002-11-24 Havoc Pennington <hp@pobox.com>
1798 * test/echo-client.c, test/echo-server.c: cheesy test
1801 * configure.in (AC_CHECK_FUNCS): check for writev
1803 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1806 * dbus/dbus-list.c (_dbus_list_foreach): new function
1808 * dbus/dbus-internals.c (_dbus_verbose): new function
1810 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1811 representing a server that listens for connections.
1813 * dbus/.cvsignore: create
1815 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1816 public API for reporting errors
1818 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1819 public object representing a connection that
1820 sends/receives messages. (Same object used for
1821 both client and server.)
1823 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1824 Basic abstraction for different kinds of stream
1825 that we might read/write messages from.
1827 2002-11-23 Havoc Pennington <hp@pobox.com>
1829 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1832 * dbus/dbus-test.c (main): add list test, and include
1833 dbus-test.h as intended
1835 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1836 (_dbus_hash_table_remove_int): return value indicates
1837 whether the entry existed to remove
1839 * dbus/dbus-list.c: add linked list utility class,
1842 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1845 2002-11-23 Havoc Pennington <hp@pobox.com>
1847 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1848 DBUS_END_DECLS to nothing, that should fix this once and for all
1850 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1852 * dbus/dbus-message.c, dbus/dbus-hash.c:
1853 add some missing @brief
1855 2002-11-23 Havoc Pennington <hp@pobox.com>
1857 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1858 to avoid confusing Doxygen
1860 * dbus/dbus-hash.c: @} not }@
1862 * dbus/dbus-message.c (struct DBusMessage): split out
1865 2002-11-23 Havoc Pennington <hp@pobox.com>
1867 * configure.in: pile on more warning flags if using gcc
1869 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1870 to document static functions
1872 * configure.in: add summary to end of configure so it
1873 looks nice and attractive
1875 * dbus/dbus-hash.c: finish implementation and write unit
1878 * configure.in: add --enable-tests to enable unit tests
1880 * dbus/dbus-test.c: test program to run unit tests
1881 for all files in dbus/*, initially runs a test for
1884 * dbus/dbus-internals.h: file to hold some internal utility stuff
1886 2002-11-22 Havoc Pennington <hp@redhat.com>
1888 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1889 "ported" away from Tcl
1891 * dbus/dbus-types.h: header for types such as dbus_bool_t
1893 2002-11-22 Havoc Pennington <hp@redhat.com>
1895 * dbus/dbus.h: fixups for doc warnings
1897 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1899 (QUIET): make it quiet so we can see warnings
1901 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1903 2002-11-22 Havoc Pennington <hp@redhat.com>
1905 * Makefile.am: include "Doxyfile" target in all-local
1907 * configure.in: generate the Doxyfile
1909 * Doxyfile.in: move Doxyfile here, so we can use
1910 configure to generate a Doxyfile with the right
1913 2002-11-22 Havoc Pennington <hp@redhat.com>
1915 * dbus/dbus-message.c: move inline docs into .c file
1917 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1918 so all docs are under doc/
1919 (MAN_EXTENSION): generate man pages. Use extension
1920 ".3dbus" which matches ".3qt" on my system,
1921 I guess this is OK, I don't know really.
1922 (FILE_PATTERNS): look for .c files not .h, makes sense
1925 2002-11-22 Havoc Pennington <hp@pobox.com>
1927 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1928 because any app can be a server, and any app can be a client,
1929 the bus is a special kind of server.
1931 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1933 * Doxyfile : adding. Still needs Makefile rules to be generated
1934 automatically (just run "doxygen" in the toplevel dir for now to
1937 * dbus/dbus-message.h : Adding sample docs (javadoc since
1938 resembles gtk-doc a little more)
1940 * dbus/dbus.h : Adding sample docs
1942 2002-11-21 Havoc Pennington <hp@redhat.com>
1944 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1945 so we can allow ourselves to include files directly,
1946 instead of having to use dbus.h
1948 * dbus/dbus.h: fill in
1950 * dbus/dbus-message.h: sketch out a sample header file.
1951 Include griping if you include it directly instead of
1954 * dbus/dbus-macros.h: new file with macros for extern "C",
1955 TRUE/FALSE, NULL, etc.
1957 * doc/file-boilerplate.c: put include guards in here
1959 2002-11-21 Havoc Pennington <hp@redhat.com>
1961 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1963 * COPYING: include the GPL as well, and license code
1964 under both AFL and GPL.
1966 2002-11-21 Havoc Pennington <hp@redhat.com>
1968 * acconfig.h: get rid of this
1970 * autogen.sh (run_configure): add --no-configure option
1972 * configure.in: remove AC_ARG_PROGRAM to make
1973 autoconf complain less. add AC_PREREQ.
1974 add AC_DEFINE third arg.
1976 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1979 Fix references so we can distcheck.
1981 2002-11-21 Havoc Pennington <hp@redhat.com>
1983 * Initial module creation