1 2003-02-16 Alexander Larsson <alexl@redhat.com>
3 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4 Actually free keys and values when destroying hashtable.
6 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8 * dbus/dbus-auth.c: (client_try_next_mechanism):
11 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
12 Return TRUE if there's no thread implementation around.
14 * glib/dbus-gmain.c: (free_source),
15 (dbus_connection_hookup_with_g_main):
16 Make sure to remove the GSource when the connection is finalized.
18 2003-02-16 Anders Carlsson <andersca@codefactory.se>
20 * bus/dispatch.c: (bus_dispatch_message_handler):
22 Return an error if someone tries to send a message to a service
25 2003-02-16 Anders Carlsson <andersca@codefactory.se>
27 * bus/activation.c: (load_directory), (bus_activation_init),
28 (bus_activation_activate_service):
31 (bus_driver_handle_activate_service), (bus_driver_handle_message):
32 More work on the activation handling.
35 Add some error messages
37 * dbus/dbus-message.c: (dbus_message_new_error_reply):
38 * dbus/dbus-message.h:
39 New function that creates an error message.
41 * dbus/dbus-protocol.h:
42 Add ACTIVATE_SERVER message.
44 * dbus/dbus-server-unix.c: (unix_handle_watch),
45 (_dbus_server_new_for_domain_socket):
46 Call _dbus_fd_set_close_on_exec.
48 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
49 (_dbus_spawn_async), (_dbus_disable_sigpipe),
50 (_dbus_fd_set_close_on_exec):
51 * dbus/dbus-sysdeps.h:
52 Add _dbus_fd_set_close_on exec function. Also add function that checks
53 that all open fds are set to close-on-exec and warns otherwise.
55 * dbus/dbus-transport-unix.c:
56 (_dbus_transport_new_for_domain_socket):
57 Call _dbus_fd_set_close_on_exec.
59 2003-02-16 Havoc Pennington <hp@pobox.com>
61 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
62 allow people to avoid setting SIGPIPE to SIG_IGN
63 (_dbus_connection_new_for_transport): disable SIGPIPE unless
64 we've been asked not to
66 2003-02-15 Anders Carlsson <andersca@codefactory.se>
68 * dbus/dbus-list.c: (_dbus_list_append_link),
69 (_dbus_list_prepend_link):
70 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
74 2003-02-15 Anders Carlsson <andersca@codefactory.se>
77 * bus/activation.c: (bus_activation_entry_free),
78 (add_desktop_file_entry), (load_directory), (bus_activation_init):
81 Add simple activation support, doesn't work yet though.
83 2003-02-15 Zack Rusin <zack@kde.org>
85 * qt/dbus-qthread.cpp: small casting fix
87 2003-02-15 Anders Carlsson <andersca@codefactory.se>
89 * dbus/dbus-errors.c: (dbus_set_error):
91 Add a few errors and make dbus_set_error void.
93 * dbus/dbus-sysdeps.c:
94 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
95 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
96 * dbus/dbus-sysdeps.h:
97 Add _dbus_spawn_async.
99 * test/spawn-test.c: (main):
100 Test for _dbus_spawn_async.
102 2003-02-15 Anders Carlsson <andersca@codefactory.se>
104 * dbus/dbus-internals.h:
105 Fix build without tests.
107 * dbus/dbus-list.c: (alloc_link):
108 Fix a segfault when a malloc fails.
110 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
111 (dbus_malloc0), (dbus_realloc):
112 Add support for malloc debugging.
114 2003-02-15 Alexander Larsson <alexl@redhat.com>
116 * dbus/dbus-threads.c:
117 * dbus/dbus-threads.h:
118 Add condvars. Remove static mutext from API.
119 Implement static mutexes by initializing them from threads_init.
121 * glib/dbus-gthread.c:
122 * qt/dbus-qthread.cpp:
123 Update with the thread api changes.
128 Turn StaticMutex into normal mutex + init function.
129 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
130 _dbus_list_append_link, _dbus_list_prepend_link
133 * dbus/dbus-sysdeps.c:
134 * dbus/dbus-sysdeps.h:
135 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
136 _dbus_atomic_dec. Only slow fallback implementation at the moment.
138 * dbus/dbus-protocol.h:
139 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
141 * dbus/dbus-message.c:
142 Make ref/unref atomic.
145 * dbus/dbus-connection-internal.h:
146 * dbus/dbus-connection.c:
147 * dbus/dbus-connection.h:
149 Change _peek to _borrow,_return & _steal_borrowed.
150 Change disconnect callback to event.
151 Make dbus_connection_dispatch_messages reentrant.
153 * dbus/dbus-transport.c:
154 Don't ref the connection on calls to the transport
157 * dbus/dbus-message-handler.c:
161 Don't use peek_message anymore
164 * test/debug-thread.c:
165 * test/debug-thread.h:
166 Simple thread implementation that asserts() on deadlocks in
167 single-threaded code.
170 (main) Call debug_threads_init.
173 Use disconnect message instead of disconnect callback.
177 Don't call dbus_connection_set_disconnect_function. Instead export
178 bus_connection_disconnect.
181 Call bus_connection_disconnect when we get a disconnected message.
183 2003-02-15 Havoc Pennington <hp@pobox.com>
185 * dbus/dbus-message.c (dbus_message_new): fool around with the
188 2003-02-14 Havoc Pennington <hp@pobox.com>
190 * dbus/dbus-mempool.c: fail if the debug functions so indicate
192 * dbus/dbus-memory.c: fail if the debug functions indicate we
195 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
196 (_dbus_decrement_fail_alloc_counter): debug functions to
197 simulate memory allocation failures
199 2003-02-14 Havoc Pennington <hp@pobox.com>
201 * dbus/dbus-errors.h (struct DBusError): add a word of padding
204 2003-02-13 Anders Carlsson <andersca@codefactory.se>
206 * bus/driver.c: (bus_driver_handle_hello):
208 * bus/services.c: (bus_service_lookup):
209 Reorder message sending so we get a more sane order.
211 * test/bus-test.c: (message_handler):
214 2003-02-13 Anders Carlsson <andersca@codefactory.se>
216 * bus/driver.c: (bus_driver_send_service_deleted),
217 (bus_driver_send_service_created), (bus_driver_send_service_lost),
218 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
219 (bus_driver_send_welcome_message),
220 (bus_driver_handle_list_services),
221 (bus_driver_handle_acquire_service),
222 (bus_driver_handle_service_exists):
223 * dbus/dbus-bus.c: (dbus_bus_register_client),
224 (dbus_bus_acquire_service), (dbus_bus_service_exists):
225 * dbus/dbus-errors.c: (dbus_result_to_string):
226 * dbus/dbus-errors.h:
227 * dbus/dbus-message.c: (dbus_message_append_args),
228 (dbus_message_append_args_valist), (dbus_message_get_args),
229 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
230 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
231 (dbus_message_iter_get_byte_array),
232 (dbus_message_iter_get_string_array), (message_iter_test),
233 (check_message_handling), (_dbus_message_test):
234 * dbus/dbus-message.h:
235 * test/bus-test.c: (main):
236 Change fields to arguments in messages, so that they won't be
237 confused with header fields.
239 * glib/test-dbus-glib.c: (main):
240 Remove append_fields from hello message.
242 2003-02-13 Anders Carlsson <andersca@codefactory.se>
244 * dbus/dbus-errors.c:
245 * dbus/dbus-message.c:
246 * dbus/dbus-string.c:
249 2003-02-13 Anders Carlsson <andersca@codefactory.se>
251 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
253 Implement support for timeouts in dbus-glib.
255 2003-02-13 Anders Carlsson <andersca@codefactory.se>
257 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
258 * dbus/dbus-message.c: (process_test_subdir):
259 * test/break-loader.c: (find_breaks_based_on):
260 Plug some memory leaks.
262 2003-02-13 Richard Hult <rhult@codefactory.se>
264 * bus/main.c: Fix build.
266 * dbus/dbus-errors.h:
267 * dbus/dbus-errors.c: Fix copyright for Anders.
269 2003-02-13 Anders Carlsson <andersca@codefactory.se>
274 * bus/connection.c: (bus_connection_foreach):
277 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
278 (unescape_string), (new_section), (parse_section_start),
279 (parse_key_value), (report_error), (bus_desktop_file_load),
280 (bus_desktop_file_get_string):
281 * bus/desktop-file.h:
282 Use DBusError for error reporting.
284 * bus/dispatch.c: (send_one_message),
285 (bus_dispatch_message_handler):
286 * bus/driver.c: (bus_driver_send_service_deleted),
287 (bus_driver_send_service_created), (bus_driver_send_service_lost),
288 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
289 (bus_driver_send_welcome_message),
290 (bus_driver_handle_list_services),
291 (bus_driver_handle_acquire_service),
292 (bus_driver_handle_service_exists):
293 * bus/loop.c: (bus_loop_run):
295 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
297 * bus/utils.c: (bus_wait_for_memory):
299 New files with general utility functions.
301 * dbus/dbus-internals.h:
302 Remove _DBUS_HANDLE_OOM.
304 2003-02-13 Anders Carlsson <andersca@codefactory.se>
306 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
307 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
308 * dbus/dbus-errors.h:
309 Add DBusError structure.
311 2003-02-13 Anders Carlsson <andersca@codefactory.se>
313 * test/data/valid-messages/standard-acquire-service.message:
314 * test/data/valid-messages/standard-hello.message:
315 * test/data/valid-messages/standard-list-services.message:
316 * test/data/valid-messages/standard-service-exists.message:
317 Add some standard messages.
319 2003-02-13 Anders Carlsson <andersca@codefactory.se>
321 * bus/driver.c: (bus_driver_send_welcome_message),
322 (bus_driver_handle_list_services),
323 (bus_driver_handle_acquire_service),
324 (bus_driver_handle_service_exists), (bus_driver_handle_message):
325 Update for API changes in libdbus.
327 * dbus/dbus-message.c: (dbus_message_new_reply):
328 * dbus/dbus-message.h:
329 Remove the name argument. The spec states that replies shouldn't
332 2003-02-13 Anders Carlsson <andersca@codefactory.se>
334 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
335 (report_error), (bus_desktop_file_load), (lookup_section),
336 (lookup_line), (bus_desktop_file_get_raw),
337 (bus_desktop_file_get_string):
338 * bus/desktop-file.h:
339 Some fixes, and new functions for getting a key value from a section.
341 2003-02-13 Havoc Pennington <hp@pobox.com>
343 * test/data/auth/fail-after-n-attempts.auth-script: new test
345 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
348 2003-02-13 Havoc Pennington <hp@pobox.com>
350 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
351 dbus_credentials_match were backward
353 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
354 NO_CREDENTIALS and ROOT_CREDENTIALS
356 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
357 into here. Never process more commands after we've reached an
358 end state; store further data as unused bytes.
360 * test/data/auth/*: add more auth tests
362 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
363 command to match exact string and EXPECT_UNUSED to match unused
366 * test/Makefile.am (dist-hook): fix to dist all the test stuff
368 2003-02-12 Havoc Pennington <hp@pobox.com>
370 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
371 \r off of popped lines
373 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
376 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
379 2003-02-12 Havoc Pennington <hp@pobox.com>
381 * dbus/Makefile.am: remove break-loader from the build, since it
384 * configure.in: add --enable-gcov to turn on coverage profiling
385 flags and disable optimization
387 2003-02-10 Havoc Pennington <hp@pobox.com>
389 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
390 initial cut at test framework for DBusAuth from laptop.
391 Doesn't quite work yet but it compiles and I need to get
392 it off the 266mhz laptop. ;-)
394 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
395 fix a memleak in error case
397 2003-02-12 Anders Carlsson <andersca@codefactory.se>
400 * bus/desktop-file.c:
401 * bus/desktop-file.h:
402 Add a desktop file parser.
404 2003-02-11 Zack Rusin <zack@kde.org>
406 * qt/message.[h|cpp]: sample implementation
407 of the KDE wrapper for DBusMessage
409 2003-02-09 Zack Rusin <zack@kde.org>
411 * test/bus-test.c: make_it_compile
412 * doc/dbus-specification.sgml: minimal semantic fix
414 2003-02-06 Anders Carlsson <andersca@codefactory.se>
420 2003-02-06 Anders Carlsson <andersca@codefactory.se>
423 * dbus/dbus-break-loader.c:
425 * test/break-loader.c:
426 Move dbus-break-loader to test/ and rename it to break-loader.
428 2003-02-02 Havoc Pennington <hp@pobox.com>
430 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
431 for code to manage cookies in your home directory
433 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
435 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
436 to authenticate, then disconnect the client.
438 2003-02-03 Alexander Larsson <alexl@redhat.com>
440 * dbus/dbus-message.c (dbus_message_append_fields):
443 2003-02-02 Anders Carlsson <andersca@codefactory.se>
445 * doc/dbus-specification.sgml:
446 Update address format section.
448 2003-02-02 Anders Carlsson <andersca@codefactory.se>
451 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
452 (message_handler), (new_connection_callback), (loop_quit),
456 2003-02-02 Anders Carlsson <andersca@codefactory.se>
458 * bus/driver.c: (bus_driver_handle_service_exists):
459 Simplify the code a bit.
461 * dbus/dbus-bus.c: (dbus_bus_service_exists):
464 2003-02-02 Anders Carlsson <andersca@codefactory.se>
467 Add libdbus-daemon.la and link to it.
469 2003-02-01 James Willcox <jwillcox@gnome.org>
471 * bus/driver.c: (bus_driver_handle_own_service):
472 Actually include the service reply code in the message.
474 2003-02-02 Anders Carlsson <andersca@codefactory.se>
476 * bus/driver.c: (bus_driver_handle_service_exists):
477 Don't unref the incoming message.
479 2003-02-02 Anders Carlsson <andersca@codefactory.se>
481 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
483 2003-02-02 Anders Carlsson <andersca@codefactory.se>
485 * dbus/dbus-server.c: (dbus_server_listen):
486 * dbus/dbus-transport.c: (_dbus_transport_open):
487 ifdef out the calls to the debug transport and server.
489 2003-02-02 Alexander Larsson <alexl@redhat.com>
491 * dbus/dbus-watch.c (dbus_watch_get_flags):
492 Add note in the docs that ERROR or HANGUP won't be returned
493 and are assumed always on.
495 * glib/dbus-gmain.c (add_watch):
496 Always add IO_ERR | IO_HUP
498 * dbus/dbus-message.h:
499 Add semicolon after dbus_message_iter_get_string_array().
500 Makes qt code build again
502 2003-02-01 Anders Carlsson <andersca@codefactory.se>
504 * bus/driver.c: (create_unique_client_name),
505 (bus_driver_handle_hello):
506 Don't take a name, just use a numeric id to identify
510 * dbus/dbus-bus.c: (dbus_bus_register_client),
511 (dbus_bus_acquire_service), (dbus_bus_service_exists):
513 Add new convenience functions for communicating with the bus.
515 * dbus/dbus-message.h:
517 * dbus/dbus-protocol.h:
520 2003-02-01 Alexander Larsson <alexl@redhat.com>
522 * dbus/dbus-message.c (dbus_message_append_fields):
523 Add some more doc comments.
525 2003-02-01 Havoc Pennington <hp@pobox.com>
527 * dbus/dbus-break-loader.c (randomly_modify_length): change
528 a 4-byte value in the message as if it were a length
530 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
531 execute bit on saved files
533 2003-02-01 Havoc Pennington <hp@pobox.com>
535 * dbus/dbus-break-loader.c (main): new program to find messages
536 that break the loader.
538 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
539 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
541 * dbus/dbus-string.c (_dbus_string_set_byte): new
543 2003-01-31 Havoc Pennington <hp@pobox.com>
545 * dbus/dbus-message.c: refactor the test code to be more general,
546 in preparation for writing a "randomly permute test cases to
547 try to break the loader" program.
549 2003-01-31 Havoc Pennington <hp@pobox.com>
551 * doc/dbus-specification.sgml: work on the specification
553 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
554 the protocol version of the message.
556 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
557 no longer specifies that.
558 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
561 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
562 "break" for DBUS_TYPE_NIL, remove @todo
564 2003-01-31 Havoc Pennington <hp@pobox.com>
566 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
567 just set_is_error/get_is_error as this is a commonly-used
568 function, and write docs.
570 2003-01-31 Anders Carlsson <andersca@codefactory.se>
572 * dbus/dbus-address.c: (dbus_address_entry_free):
573 Free key and value lists.
575 * dbus/dbus-internals.c: (_dbus_type_to_string):
576 Add the types we didn't have.
578 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
579 (_dbus_marshal_validate_arg):
582 * dbus/dbus-message.c: (dbus_message_set_sender):
583 Remove todo about being able to set sender to NULL.
585 (dbus_message_set_is_error_reply),
586 (dbus_message_get_is_error_reply):
587 * dbus/dbus-message.h:
590 * dbus/dbus-protocol.h:
591 Add error reply flag.
593 * test/data/valid-messages/opposite-endian.message:
594 Add NIL type to test.
596 2003-01-31 Havoc Pennington <hp@pobox.com>
598 * doc/dbus-specification.sgml: fully specify the header. Add
599 flags and major protocol version, and change header/body len to
602 * dbus/dbus-message-builder.c (append_saved_length): append length
605 * dbus/dbus-message.c (dbus_message_create_header): change header
606 length and body length to unsigned. Add the new fields from the
608 (_dbus_message_loader_return_buffer): unsigned header/body len
610 2003-01-30 Havoc Pennington <hp@pobox.com>
612 * dbus/dbus-auth.c: rework to use only REJECTED, no
615 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
616 use REJECTED, suggested by Mark McLoughlin
618 2003-01-30 Havoc Pennington <hp@pobox.com>
620 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
621 a better way to report errors here. e.g. "unix address lacks
622 path" or something. also "no such file" when the path doesn't
625 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
627 (dbus_parse_address): add @todo about documenting address format,
628 and allowing , and ; to be escaped
630 2003-01-30 Anders Carlsson <andersca@codefactory.se>
633 Add dbus-address.[ch]
635 * dbus/dbus-address.c: (dbus_address_entry_free),
636 (dbus_address_entries_free), (create_entry),
637 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
638 (dbus_parse_address), (_dbus_address_test):
639 * dbus/dbus-address.h:
640 New files for dealing with address parsing.
642 * dbus/dbus-connection.c:
643 Document timeout functions.
645 * dbus/dbus-message.c:
646 Document dbus_message_new_from_message.
648 * dbus/dbus-server-debug.c:
651 * dbus/dbus-server.c: (dbus_server_listen):
652 Parse address and use correct server implementation.
654 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
655 * dbus/dbus-string.h:
656 New function with test.
658 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
662 * dbus/dbus-transport-debug.c:
665 * dbus/dbus-transport.c: (_dbus_transport_open):
666 Parse address and use correct transport implementation.
668 2003-01-30 Havoc Pennington <hp@pobox.com>
670 * dbus/dbus-message.c: use message->byte_order instead of
671 DBUS_COMPILER_BYTE_ORDER throughout.
672 (dbus_message_create_header): pad header to align the
673 start of the body of the message to 8-byte boundary
675 * dbus/dbus-marshal.h: make all the demarshalers take const
676 DBusString arguments.
678 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
679 validate message args here, so we don't have to do slow validation
680 later, and so we catch bad messages as they are incoming. Also add
681 better checks on header_len and body_len. Also fill in
684 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
685 implemented properly)
686 (_dbus_string_validate_nul): new function to check all-nul
688 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
689 get_arg_end_pos and remove all validation
690 (_dbus_marshal_validate_arg): actually do validation here.
692 2003-01-29 Havoc Pennington <hp@pobox.com>
694 * dbus/dbus-message.c (check_message_handling): fix assertion
695 failure on set_client_serial
697 2003-01-28 Havoc Pennington <hp@pobox.com>
699 * dbus/dbus-server-debug.c: Add doc section comments
701 * dbus/dbus-transport-debug.c: add doc section comments
703 2003-01-28 Havoc Pennington <hp@redhat.com>
705 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
706 the reverse order from how I had it
707 (_dbus_string_base64_encode): reverse encoding order. I was
708 basically byteswapping everything during encoding.
710 2003-01-28 Anders Carlsson <andersca@codefactory.se>
712 * dbus/dbus-connection-internal.h:
713 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
714 (_dbus_connection_remove_timeout):
715 Add functions for adding and removing timeouts.
717 * dbus/dbus-message.c: (dbus_message_new_from_message):
718 Add new function that takes a message and creates an exact
719 copy of it, but with the refcount set to 1.
720 (check_message_handling):
723 * dbus/dbus-server-protected.h:
724 * dbus/dbus-server.c: (_dbus_server_init_base),
725 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
726 (dbus_server_set_timeout_functions):
727 (_dbus_server_remove_timeout):
728 New functions so that a server can add and remove timeouts.
730 (dbus_server_listen):
731 Add commented out call to dbus_server_debug_new.
733 * dbus/dbus-timeout.c: (_dbus_timeout_new):
734 Actually set the handler, doh.
736 * dbus/dbus-transport.c: (_dbus_transport_open):
737 Add commented out call to dbus_transport_debug_client_new.
740 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
742 2003-01-28 Havoc Pennington <hp@pobox.com>
744 * dbus/dbus-message.c (check_message_handling): function to check
745 on the loaded message, iterates over it etc.
747 2003-01-28 Havoc Pennington <hp@pobox.com>
749 * test/Makefile.am (dist-hook): fix make distdir
751 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
753 2003-01-27 Havoc Pennington <hp@pobox.com>
755 * dbus/dbus-mempool.c (time_for_size): replace printf with
758 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
759 empty lines; fix the SAVE_LENGTH stuff to be
760 START_LENGTH/END_LENGTH so it actually works; couple other
763 * test/Makefile.am (dist-hook): add dist-hook for .message files
765 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
766 can be constant or locked.
767 (_dbus_string_free): allow freeing a const string as
770 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
772 * dbus/dbus-test-main.c (main): take an argument which is the
773 directory containing test data
775 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
776 argument to this and load all the messages in test/data/
777 checking that they can be loaded or not loaded as appropriate.
779 2003-01-27 Anders Carlsson <andersca@codefactory.se>
781 * bus/dispatch.c: (bus_dispatch_message_handler):
782 Dispatch messages sent to services.
784 * bus/driver.c: (bus_driver_send_service_deleted),
785 (bus_driver_send_service_created), (bus_driver_send_service_lost),
786 (bus_driver_send_service_acquired):
787 Add helper functions for sending service related messages.
789 (bus_driver_send_welcome_message):
790 Send HELLO_REPLY instead of WELCOME.
792 (bus_driver_handle_list_services):
793 Send LIST_SERVICES_REPLY instead of SERVICES.
795 (bus_driver_handle_own_service),
796 (bus_driver_handle_service_exists):
797 New message handlers.
799 (bus_driver_handle_message):
800 Invoke new message handlers.
802 (bus_driver_remove_connection):
803 Don't remove any services here since that's done automatically
804 by bus_service_remove_owner now.
807 New function signatures.
809 * bus/services.c: (bus_service_add_owner):
810 Send ServiceAcquired message if we're the only primary owner.
812 (bus_service_remove_owner):
813 Send ServiceAcquired/ServiceLost messages.
815 (bus_service_set_prohibit_replacement),
816 (bus_service_get_prohibit_replacement):
817 Functions for setting prohibit replacement.
819 (bus_service_has_owner):
820 New function that checks if a connection is in the owner queue of
824 Add new function signatures.
826 * dbus/dbus-list.c: (_dbus_list_test):
827 Add tests for _dbus_list_remove_last and traversing the list backwards.
830 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
831 go any further, so return NULL then.
833 * dbus/dbus-protocol.h:
834 Add new messages, service flags and service replies.
836 2003-01-26 Havoc Pennington <hp@pobox.com>
838 * dbus/dbus-message-builder.c: implement, completely untested.
840 * test/data/*: add data to be used in testing.
841 ".message" files are our simple loadable text format.
842 ".message-raw" will be binary dumps of messages.
844 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
846 2003-01-26 Havoc Pennington <hp@pobox.com>
848 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
850 * dbus/dbus-errors.c (dbus_result_to_string): add
853 * dbus/dbus-message-builder.c: new file, will contain code to load
854 up messages from files. Not implemented yet.
856 2003-01-26 Havoc Pennington <hp@pobox.com>
858 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
859 the sender by setting to NULL
861 2003-01-26 Havoc Pennington <hp@pobox.com>
863 The unit tests pass, but otherwise untested. If it breaks, the
864 tests should have been better. ;-)
866 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
869 * dbus/dbus-message.c: redo everything so we maintain
870 message->header as the only copy of the various fields.
871 This avoids the possibility of out-of-memory in some cases,
872 for example dbus_message_lock() can't run out of memory anymore,
873 and avoids extra copying. Figured I may as well go ahead and do
874 this since it was busted for dbus_message_lock to not return
875 failure on OOM, and dbus_message_write_header was totally
876 unchecked for OOM. Also fixed some random other bugs.
878 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
879 that strings are nul-terminated. Also, end_pos can be equal
880 to string length just not greater than, I think.
881 (_dbus_marshal_set_int32): new function
882 (_dbus_marshal_set_uint32): new function
883 (_dbus_marshal_set_string): new function
885 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
886 a warning, init timeout_list to NULL
887 (dbus_connection_send_message): don't use uninitialized variable
890 * dbus/dbus-string.c (_dbus_string_replace_len): new function
892 2003-01-26 Anders Carlsson <andersca@codefactory.se>
894 * bus/driver.c: (bus_driver_handle_hello),
895 (bus_driver_send_welcome_message):
898 2003-01-26 Anders Carlsson <andersca@codefactory.se>
900 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
901 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
902 (dbus_connection_unref):
903 * dbus/dbus-marshal.c: (_dbus_marshal_test):
904 * dbus/dbus-message.c: (dbus_message_unref),
907 (dbus_message_get_fields):
908 Remove debugging printout.
910 (_dbus_message_loader_return_buffer):
911 Don't store the header string.
913 (_dbus_message_test):
916 2003-01-26 Richard Hult <rhult@codefactory.se>
918 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
919 the file descriptor list, since it can change under us.
921 2003-01-25 Anders Carlsson <andersca@codefactory.se>
923 * glib/dbus-gmain.c: (dbus_connection_prepare),
924 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
925 (remove_watch), (dbus_connection_hookup_with_g_main):
926 Rewrite the glib handling to use its own GSource instead of a
927 GIOChannel so we can catch messages put in the queue while waiting
930 2003-01-25 Anders Carlsson <andersca@codefactory.se>
933 * bus/connection.c: (connection_disconnect_handler),
934 (connection_watch_callback), (bus_connection_setup):
935 * bus/dispatch.c: (send_one_message),
936 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
937 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
939 * bus/driver.c: (bus_driver_send_service_deleted),
940 (bus_driver_send_service_created), (bus_driver_handle_hello),
941 (bus_driver_send_welcome_message),
942 (bus_driver_handle_list_services), (bus_driver_remove_connection),
943 (bus_driver_handle_message):
945 Refactor code, put the message dispatching in its own file. Use
946 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
949 2003-01-25 Anders Carlsson <andersca@codefactory.se>
951 * dbus/dbus-internals.h:
952 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
954 * dbus/dbus-message.c: (dbus_message_get_sender):
955 * dbus/dbus-message.h:
956 Implement dbus_message_get_sender.
958 * dbus/dbus-protocol.h:
959 Add message and service defines.
961 2003-01-25 Anders Carlsson <andersca@codefactory.se>
963 * dbus/dbus-connection.c: (dbus_connection_send_message):
964 * dbus/dbus-message-internal.h:
965 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
966 (dbus_message_write_header):
967 Remove _dbus_messag_unlock and don't set the client serial on a
968 message if one already exists.
970 2003-01-24 Havoc Pennington <hp@pobox.com>
972 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
975 * bus/driver.c (bus_driver_handle_list_services): fix a leak
978 2003-01-25 Anders Carlsson <andersca@codefactory.se>
980 * dbus/dbus-list.c: (alloc_link), (free_link):
981 Use a memory pool for the links.
983 2003-01-25 Anders Carlsson <andersca@codefactory.se>
985 * bus/connection.c: (bus_connection_foreach):
987 Add new bus_connection_foreach function.
989 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
990 Add function that broadcasts a message to all clients.
992 (bus_driver_send_service_created), (bus_driver_handle_hello),
993 (bus_driver_send_welcome_message),
994 (bus_driver_handle_list_services), (bus_driver_message_handler):
995 Implement functions that take care of listing services, and notifying
996 clients when new services are created.
998 * bus/services.c: (bus_services_list):
1000 Add new function that returns an array of strings with the currently
1001 registered services.
1004 * glib/dbus-gmain.c:
1005 Update copyright year.
1007 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1009 * dbus/dbus-connection.c: (dbus_connection_send_message):
1010 Unlock the message in case it was sent earlier.
1012 (dbus_connection_send_message_with_reply_and_block):
1013 Remove the reply message from the list.
1015 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1016 Set array_len and new_pos correctly.
1018 (_dbus_marshal_test):
1019 Remove debug output.
1021 * dbus/dbus-message-internal.h:
1022 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1023 New function that returns the reply serial.
1025 (_dbus_message_unlock):
1026 New function that unlocks a message and resets its header.
1028 (dbus_message_append_string_array),
1029 (dbus_message_get_fields_valist),
1030 (dbus_message_iter_get_field_type),
1031 (dbus_message_iter_get_string_array),
1032 (dbus_message_get_fields),
1033 (dbus_message_append_fields_valist):
1034 Handle string arrays.
1036 (dbus_message_set_sender):
1037 Make this function public since the bus daemon needs it.
1039 (decode_header_data):
1040 Set the reply serial to -1 initially.
1042 * dbus/dbus-message.h:
1043 Add dbus_message_set_sender.
1045 2003-01-24 Havoc Pennington <hp@pobox.com>
1047 * doc/dbus-specification.sgml: add some stuff
1049 2003-01-22 Havoc Pennington <hp@pobox.com>
1051 * doc/dbus-specification.sgml: Start to document the protocol.
1053 2003-01-22 Havoc Pennington <hp@pobox.com>
1055 * dbus/dbus-connection.c
1056 (dbus_connection_send_message_with_reply_and_block): add some @todo
1058 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1060 2003-01-21 Havoc Pennington <hp@pobox.com>
1062 (patch untested because can't compile)
1064 * bus/driver.c (create_unique_client_name): make this function
1065 never recycle client names. Also, caller should initialize
1068 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1070 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1072 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1073 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1074 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1075 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1076 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1077 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1078 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1079 * dbus/dbus-marshal.h:
1080 * dbus/dbus-protocol.h:
1081 Add support for marshalling and demarshalling integer, double
1084 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1089 * bus/connection.c: (connection_disconnect_handler):
1090 Remove the connection from the bus driver's list.
1092 (connection_watch_callback): Dispatch messages.
1094 (free_connection_data): Free connection name.
1096 (bus_connection_setup): Add connection to the bus driver's list.
1097 (bus_connection_remove_owned_service):
1098 (bus_connection_set_name), (bus_connection_get_name):
1099 Add functions for setting and getting the connection's name.
1102 Add function headers.
1104 * bus/driver.c: (create_unique_client_name),
1105 (bus_driver_handle_hello_message),
1106 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1107 (bus_driver_add_connection), (bus_driver_remove_connection):
1110 * bus/services.c: (bus_service_free):
1112 New file that handles communication and registreation with the bus
1115 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1117 * dbus/dbus-connection.c: (dbus_connection_send_message):
1118 Add a new client_serial parameter.
1120 (dbus_connection_send_message_with_reply):
1121 Remove a @todo since we've implemented the blocking function.
1123 (dbus_connection_send_message_with_reply_and_block):
1124 New function that sends a message and waits for a reply and
1125 then returns the reply.
1127 * dbus/dbus-connection.h:
1130 * dbus/dbus-errors.c: (dbus_result_to_string):
1131 * dbus/dbus-errors.h:
1132 Add new DBUS_RESULT.
1134 * dbus/dbus-message-internal.h:
1135 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1136 (_dbus_message_set_sender), (dbus_message_write_header),
1137 (dbus_message_new_reply), (decode_header_data),
1138 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1139 * dbus/dbus-message.h:
1140 Add new functions that set the reply serial and sender.
1141 Also marshal and demarshal them correctly and add test.
1143 * dbus/dbus-protocol.h:
1144 Add new DBUS_MESSAGE_TYPE_SENDER.
1147 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1148 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1149 (dbus_connection_hookup_with_g_main):
1150 * glib/test-dbus-glib.c: (main):
1151 Rewrite to use GIOChannel and remove the GSource crack.
1153 * test/echo-client.c: (main):
1154 * test/watch.c: (check_messages):
1155 Update for changed APIs
1157 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1159 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1161 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1162 Create a DBusTimeoutList.
1163 (dbus_connection_set_timeout_functions): Add new function to
1164 set timeout callbacks
1166 * dbus/dbus-connection.h: Add public DBusTimeout API.
1168 * dbus/dbus-message.c: (dbus_message_get_service):
1169 * dbus/dbus-message.h: New function.
1171 * dbus/dbus-server.c: Fix small doc typo.
1173 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1175 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1177 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1178 of the string, just as long as specified.
1180 2003-01-19 Havoc Pennington <hp@pobox.com>
1182 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1185 * dbus/dbus-server.c (dbus_server_set_max_connections)
1186 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1187 keep track of current number of connections, and add API for
1188 setting a max (but haven't implemented enforcing the max yet)
1190 2003-01-18 Havoc Pennington <hp@pobox.com>
1192 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1193 reading/writing if read_watch != NULL or write_watch != NULL.
1195 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1196 the message loader code to actually load message->header and
1197 message->body into the newly-created message.
1199 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1202 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1203 (dbus_connection_get_max_message_size)
1204 (dbus_connection_set_max_live_messages_size)
1205 (dbus_connection_get_max_live_messages_size): implement some
1206 resource limitation functions
1208 * dbus/dbus-resources.c: new file implementing some of the
1209 resource limits stuff
1211 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1212 missing docs, add @todo to handle OOM etc.
1214 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1217 2003-01-18 Havoc Pennington <hp@pobox.com>
1219 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1220 connection if it hasn't been already.
1222 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1223 replace with DisconnectFunction.
1225 2003-01-18 Havoc Pennington <hp@pobox.com>
1227 Building --disable-verbose-mode --disable-asserts --disable-tests
1228 cuts the library from 112K to 45K or so
1230 * configure.in: check for varargs macro support,
1231 add --enable-verbose-mode, --enable-asserts.
1233 * dbus/dbus-internals.h (_dbus_assert): support
1235 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1237 2003-01-18 Havoc Pennington <hp@pobox.com>
1239 * dbus/dbus-test.c: include config.h so that tests actually run
1241 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1242 so the failure mode when that assumption fails will be plenty
1245 2003-01-18 Havoc Pennington <hp@pobox.com>
1247 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1249 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1252 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1253 since we don't want to use those in make check
1255 2003-01-15 Havoc Pennington <hp@redhat.com>
1261 2003-01-15 Havoc Pennington <hp@redhat.com>
1263 * test/Makefile.am: fix so that test source code ends up in the
1264 distribution on make distcheck
1266 2003-01-15 Havoc Pennington <hp@redhat.com>
1272 2003-01-15 Havoc Pennington <hp@redhat.com>
1274 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1275 fix build when --disable-tests
1277 * Makefile.am (EXTRA_DIST): put HACKING in here
1279 * HACKING: document procedure for making a tarball release.
1281 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1283 * bus/connection.c: (connection_error_handler),
1284 (bus_connection_setup):
1285 * bus/main.c: (main):
1286 Make sure that the DBusConnectionData struct is NULLed
1287 out to prevent a segfault.
1289 * dbus/dbus-errors.c: (dbus_result_to_string):
1290 * dbus/dbus-errors.h:
1291 * dbus/dbus-message.c: (dbus_message_get_fields),
1292 (dbus_message_get_fields_valist), (_dbus_message_test):
1293 * dbus/dbus-message.h:
1294 Make dbus_message_get_fields return a result code so we can
1295 track invalid fields as well as oom.
1297 2003-01-11 Havoc Pennington <hp@pobox.com>
1299 * configure.in: change --enable-test/--enable-ansi action-if-given
1300 to enable_foo=$enableval instead of enable_foo=yes
1302 2003-01-08 Havoc Pennington <hp@pobox.com>
1304 * dbus/dbus-string.c (_dbus_string_align_length): new function
1306 * dbus/dbus-test-main.c: move main() for test app here
1308 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1309 symbol to run tests, because dbus-test isn't in the main
1312 Code review nitpicks.
1314 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1315 for people with narrow emacs ;-). Assert client_serial was filled
1316 in. Assert message->name != NULL.
1317 (dbus_message_append_fields): have "first_field_type" arg separate
1318 from va list, needed for C++ binding that also uses varargs IIRC
1319 and helps with type safety
1320 (dbus_message_new): add @todo about using DBusString to store
1321 service/name internally
1322 (dbus_message_new): don't leak ->service and ->name on OOM later
1324 (dbus_message_unref): free the service name
1325 (dbus_message_get_fields): same change to varargs
1326 i.e. first_field_type
1327 (_dbus_message_loader_return_buffer): assert that the message data
1328 is aligned (if not it's a bug in our code). Put in verbose griping
1329 about why we set corrupted = TRUE.
1330 (decode_header_data): add FIXME that char* is evil. Was going to
1331 add FIXME about evil locale-specific string.h strncmp, but just
1332 switched to wacky string-as-uint32 optimization. Move check for
1333 "no room for field name" above get_const_data_len() to avoid
1334 assertion failure in get_const_data_len if we have trailing 2
1335 bytes or the like. Check for service and name fields being
1336 provided twice. Don't leak service/name on error. Require field
1337 names to be aligned to 4 bytes.
1339 * dbus/dbus-marshal.c: move byte swap stuff to header
1340 (_dbus_pack_int32): uscore-prefix
1341 (_dbus_unpack_int32): uscore-prefix
1342 (_dbus_unpack_uint32): export
1343 (_dbus_demarshal_string): add @todo complaining about use of
1345 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1346 handling allowing corrupt data to go unchecked
1348 2003-01-08 Havoc Pennington <hp@redhat.com>
1350 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1351 to the select() as needed for authentication. (should be using
1352 _dbus_poll() not select, but for another day)
1354 * dbus/dbus.h: include dbus/dbus-protocol.h
1356 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1358 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1361 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1363 * dbus/dbus-internals.c: (_dbus_type_to_string):
1364 New function that returns a string describing a type.
1366 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1367 * dbus/dbus-marshal.h:
1368 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1369 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1370 (dbus_message_iter_get_byte_array):
1371 * dbus/dbus-message.h:
1372 Add new convenience functions for appending and getting message fields.
1373 Also add demarshalling routines for byte arrays.
1375 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1377 * dbus/dbus-connection-internal.h:
1378 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1379 (_dbus_connection_get_next_client_serial),
1380 (dbus_connection_send_message):
1381 * dbus/dbus-internals.h:
1382 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1383 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1384 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1385 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1386 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1387 (_dbus_verbose_bytes), (_dbus_marshal_test):
1388 * dbus/dbus-marshal.h:
1389 * dbus/dbus-message-internal.h:
1390 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1391 (dbus_message_write_header), (_dbus_message_lock),
1392 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1393 (dbus_message_get_name), (dbus_message_append_int32),
1394 (dbus_message_append_uint32), (dbus_message_append_double),
1395 (dbus_message_append_string), (dbus_message_append_byte_array),
1396 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1397 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1398 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1399 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1400 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1401 (decode_header_data), (_dbus_message_loader_return_buffer),
1402 (message_iter_test), (_dbus_message_test):
1403 * dbus/dbus-message.h:
1404 * dbus/dbus-protocol.h:
1405 * dbus/dbus-test.c: (main):
1407 * glib/test-dbus-glib.c: (message_handler), (main):
1408 * test/echo-client.c: (main):
1409 * test/watch.c: (check_messages):
1410 Make messages sendable and receivable for real.
1412 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1414 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1415 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1416 * dbus/dbus-message.c: (dbus_message_append_int32),
1417 (dbus_message_append_uint32), (dbus_message_append_double),
1418 (dbus_message_append_string), (dbus_message_append_byte_array):
1419 Handle OOM restoration.
1421 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1423 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1424 (_dbus_demarshal_string), (_dbus_marshal_test):
1425 * dbus/dbus-marshal.h:
1426 * dbus/dbus-message.c: (dbus_message_get_name),
1427 Document these functions.
1429 (dbus_message_append_int32), (dbus_message_append_uint32),
1430 (dbus_message_append_double), (dbus_message_append_string),
1431 (dbus_message_append_byte_array):
1432 * dbus/dbus-message.h:
1433 Add functions for adding message fields of different types.
1435 * dbus/dbus-protocol.h:
1436 Add the different types.
1438 2003-01-05 Havoc Pennington <hp@pobox.com>
1440 * bus/connection.c: implement routines for handling connections,
1441 first thing is keeping a list of owned services on each connection
1442 and setting up watches etc.
1444 * bus/services.c: implement a mapping from service names to lists
1447 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1449 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1450 to use static mutexes for global data
1452 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1453 collection of functions to set/get application-specific data
1454 on the DBusConnection.
1456 2003-01-04 Havoc Pennington <hp@pobox.com>
1458 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1459 (_dbus_poll): new function
1461 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1464 * bus/loop.c: initial code for the daemon main loop
1466 2003-01-04 Havoc Pennington <hp@pobox.com>
1468 * test/watch.c (error_handler): make it safe if the error handler
1469 is called multiple times (if we s/error handler/disconnect
1470 handler/ we should just guarantee it's called only once)
1472 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1473 error handler on disconnect (it's quite possible we should
1474 just change the error handler to a "disconnect handler," I'm
1475 not sure we have any other meaningful errors)
1477 * configure.in: check for getpwnam_r
1479 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1480 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1481 mechanism as in SASL spec, using socket credentials
1483 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1484 (_dbus_send_credentials_unix_socket): new function
1486 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1488 (_dbus_write): only check errno if <0 returned
1489 (_dbus_write_two): ditto
1491 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1493 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1494 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1495 (_dbus_marshal_test):
1496 * dbus/dbus-marshal.h:
1497 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1498 to _dbus_marshal_utf8_string. Also fix some tests.
1500 2002-12-28 Harri Porten <porten@kde.org>
1502 * configure.in: added check for C++ compiler and a very cheesy
1503 check for the Qt integration
1505 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1507 * qt/Makefile.am: added
1509 * qt/.cvsignore: added
1511 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1512 latter, added #ifdef QT_THREAD_SUPPORT guard.
1514 * dbus/Makefile.am: added missing headers for make dist
1516 2002-12-28 Kristian Rietveld <kris@gtk.org>
1518 * dbus/Makefile.am: fixup export-symbols-regex.
1520 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1522 * acinclude.m4: Add this file and put the
1523 PKG_CHECK_MODULE macro in it.
1525 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1527 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1528 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1529 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1530 (_dbus_marshal_test):
1531 Make the demarshalling routines align the pos argument.
1532 Add string marshalling tests and fix the obvious bugs
1535 2002-12-26 Havoc Pennington <hp@pobox.com>
1537 * dbus/dbus-auth.c: fixes fixes fixes
1539 * dbus/dbus-transport-unix.c: wire up support for
1540 encoding/decoding data on the wire
1542 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1543 (_dbus_auth_decode_data): append to target string
1544 instead of nuking it.
1546 2002-12-26 Havoc Pennington <hp@pobox.com>
1548 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1549 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1552 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1553 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1554 now). Main point is because I wanted unpack_uint32 to implement
1556 (_dbus_verbose_bytes): new function
1558 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1560 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1561 mechanism to handle a corrupt message stream
1562 (_dbus_message_loader_new): fix preallocation to only prealloc,
1565 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1566 (_dbus_string_test): enhance tests for copy/move and fix the
1569 * dbus/dbus-transport-unix.c: Hold references in more places to
1570 avoid reentrancy problems
1572 * dbus/dbus-transport.c: ditto
1574 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1575 leak reference count in no-message case
1577 * test/watch.c (do_mainloop): handle adding/removing watches
1578 during iteration over the watches. Also, ref the connection/server
1579 stored on a watch, so we don't try to mangle a destroyed one.
1581 * dbus/dbus-transport-unix.c (do_authentication): perform
1584 * dbus/dbus-auth.c (get_state): add a state
1585 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1586 (_dbus_auth_get_unused_bytes): append the unused bytes
1587 to the passed in string, rather than prepend
1589 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1590 the auth conversation DBusAuth
1592 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1593 (_dbus_transport_new_for_domain_socket): when creating a
1594 transport, pass in whether it's a client-side or server-side
1595 transport so we know which DBusAuth to create
1597 2002-12-03 Havoc Pennington <hp@pobox.com>
1599 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1600 _after_ finalizing the derived members
1601 (unix_connection_set): unref watch if we fail to add it
1603 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1604 transport first, so that the connection owned by the
1605 transport will be valid as the transport finalizes.
1607 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1608 if necessary, and remove watches from the connection.
1610 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1612 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1614 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1615 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1616 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1617 (_dbus_marshal_test):
1618 * dbus/dbus-marshal.h:
1619 Add string marshal functions and have the demarshal functions
1620 return the new position.
1622 2002-12-25 Havoc Pennington <hp@pobox.com>
1624 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1625 it is a simple protocol that just maps directly to SASL.
1627 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1628 initial implementation, not actually used yet.
1630 * dbus/dbus-string.c (_dbus_string_find): new function
1631 (_dbus_string_equal): new function
1632 (_dbus_string_base64_encode): new function
1633 (_dbus_string_base64_decode): new function
1635 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1638 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1639 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1640 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1641 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1642 * dbus/dbus-marshal.h:
1643 * dbus/dbus-protocol.h:
1644 * dbus/dbus-test.c: (main):
1646 Add un-optimized marshalling/demarshalling routines.
1648 2002-12-25 Harri Porten <porten@kde.org>
1650 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1652 2002-12-24 Zack Rusin <zack@kde.org>
1654 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1655 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1658 2002-12-24 Havoc Pennington <hp@pobox.com>
1660 * glib/dbus-gthread.c: fix include
1662 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1663 I think glib API needs to change, though, as you don't
1664 want to use DBusMessageFunction, you want to use the
1665 DBusMessageHandler object. Probably
1666 dbus_connection_open_with_g_main_loop()
1667 and dbus_connection_setup_g_main_loop() or something like that
1668 (but think of better names...) that just create a connection
1669 that has watch/timeout functions etc. already set up.
1671 * dbus/dbus-connection.c
1672 (dbus_connection_send_message_with_reply): new function just to
1673 show how the message handler helps us deal with replies.
1675 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1677 * dbus/dbus-string.c (_dbus_string_test): free a string that
1680 * dbus/dbus-hash.c: use memory pools for the hash entries
1681 (rebuild_table): be more paranoid about overflow, and
1682 shrink table when we can
1683 (_dbus_hash_test): reduce number of sprintfs and write
1684 valid C89. Add tests for case where we grow and then
1685 shrink the hash table.
1687 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1689 * dbus/dbus-connection.c (dbus_connection_register_handler)
1690 (dbus_connection_unregister_handler): new functions
1692 * dbus/dbus-message.c (dbus_message_get_name): new
1694 * dbus/dbus-list.c: fix docs typo
1696 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1697 an object representing a handler for messages.
1699 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1702 * glib/dbus-gthread.c: (dbus_gthread_init):
1703 Don't use the gdbus prefix for public functions.
1705 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1709 Add GLib checks and fixup .pc files
1713 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1714 (gdbus_connection_check), (gdbus_connection_dispatch),
1715 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1716 (dbus_connection_gsource_new):
1717 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1718 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1719 * glib/test-dbus-glib.c: (message_handler), (main):
1722 2002-12-15 Harri Porten <porten@kde.org>
1724 * autogen.sh: check for libtoolize before attempting to use it
1726 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1729 * .cvsignore: ignore more stamp files
1731 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1733 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1734 without make install.
1736 2002-12-15 Havoc Pennington <hp@pobox.com>
1738 * dbus/dbus-threads.c: add thread stubs that a higher library
1739 layer can fill in. e.g. the GLib wrapper might fill them in with
1740 GThread stuff. We still need to use this thread API to
1741 thread-safe-ize the library.
1743 2002-12-12 Havoc Pennington <hp@pobox.com>
1745 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1746 below new interfaces and include fewer system headers.
1748 * dbus/dbus-sysdeps.c (_dbus_read): new function
1749 (_dbus_write): new function
1750 (_dbus_write_two): new function
1751 (_dbus_connect_unix_socket): new function
1752 (_dbus_listen_unix_socket): new function
1754 * dbus/dbus-message-internal.h: change interfaces to use
1757 2002-12-11 Havoc Pennington <hp@pobox.com>
1759 * dbus/dbus-types.h: add dbus_unichar
1761 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1763 * dbus/dbus-connection.c (dbus_connection_send_message): return
1766 * dbus/dbus-transport.c: include dbus-watch.h
1768 * dbus/dbus-connection.c: include dbus-message-internal.h
1770 * HACKING: add file with coding guidelines stuff.
1772 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1773 handling here, for security purposes (as in vsftpd). Not actually
1774 using this class yet.
1776 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1777 system/libc usage here, as in vsftpd, for ease of auditing (and
1778 should also simplify portability). Haven't actually moved all the
1779 system/libc usage into here yet.
1781 2002-11-25 Havoc Pennington <hp@pobox.com>
1783 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1784 always print the first verbose message.
1786 2002-11-24 Havoc Pennington <hp@pobox.com>
1788 * test/echo-client.c, test/echo-server.c: cheesy test
1791 * configure.in (AC_CHECK_FUNCS): check for writev
1793 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1796 * dbus/dbus-list.c (_dbus_list_foreach): new function
1798 * dbus/dbus-internals.c (_dbus_verbose): new function
1800 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1801 representing a server that listens for connections.
1803 * dbus/.cvsignore: create
1805 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1806 public API for reporting errors
1808 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1809 public object representing a connection that
1810 sends/receives messages. (Same object used for
1811 both client and server.)
1813 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1814 Basic abstraction for different kinds of stream
1815 that we might read/write messages from.
1817 2002-11-23 Havoc Pennington <hp@pobox.com>
1819 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1822 * dbus/dbus-test.c (main): add list test, and include
1823 dbus-test.h as intended
1825 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1826 (_dbus_hash_table_remove_int): return value indicates
1827 whether the entry existed to remove
1829 * dbus/dbus-list.c: add linked list utility class,
1832 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1835 2002-11-23 Havoc Pennington <hp@pobox.com>
1837 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1838 DBUS_END_DECLS to nothing, that should fix this once and for all
1840 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1842 * dbus/dbus-message.c, dbus/dbus-hash.c:
1843 add some missing @brief
1845 2002-11-23 Havoc Pennington <hp@pobox.com>
1847 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1848 to avoid confusing Doxygen
1850 * dbus/dbus-hash.c: @} not }@
1852 * dbus/dbus-message.c (struct DBusMessage): split out
1855 2002-11-23 Havoc Pennington <hp@pobox.com>
1857 * configure.in: pile on more warning flags if using gcc
1859 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1860 to document static functions
1862 * configure.in: add summary to end of configure so it
1863 looks nice and attractive
1865 * dbus/dbus-hash.c: finish implementation and write unit
1868 * configure.in: add --enable-tests to enable unit tests
1870 * dbus/dbus-test.c: test program to run unit tests
1871 for all files in dbus/*, initially runs a test for
1874 * dbus/dbus-internals.h: file to hold some internal utility stuff
1876 2002-11-22 Havoc Pennington <hp@redhat.com>
1878 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1879 "ported" away from Tcl
1881 * dbus/dbus-types.h: header for types such as dbus_bool_t
1883 2002-11-22 Havoc Pennington <hp@redhat.com>
1885 * dbus/dbus.h: fixups for doc warnings
1887 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1889 (QUIET): make it quiet so we can see warnings
1891 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1893 2002-11-22 Havoc Pennington <hp@redhat.com>
1895 * Makefile.am: include "Doxyfile" target in all-local
1897 * configure.in: generate the Doxyfile
1899 * Doxyfile.in: move Doxyfile here, so we can use
1900 configure to generate a Doxyfile with the right
1903 2002-11-22 Havoc Pennington <hp@redhat.com>
1905 * dbus/dbus-message.c: move inline docs into .c file
1907 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1908 so all docs are under doc/
1909 (MAN_EXTENSION): generate man pages. Use extension
1910 ".3dbus" which matches ".3qt" on my system,
1911 I guess this is OK, I don't know really.
1912 (FILE_PATTERNS): look for .c files not .h, makes sense
1915 2002-11-22 Havoc Pennington <hp@pobox.com>
1917 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1918 because any app can be a server, and any app can be a client,
1919 the bus is a special kind of server.
1921 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1923 * Doxyfile : adding. Still needs Makefile rules to be generated
1924 automatically (just run "doxygen" in the toplevel dir for now to
1927 * dbus/dbus-message.h : Adding sample docs (javadoc since
1928 resembles gtk-doc a little more)
1930 * dbus/dbus.h : Adding sample docs
1932 2002-11-21 Havoc Pennington <hp@redhat.com>
1934 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1935 so we can allow ourselves to include files directly,
1936 instead of having to use dbus.h
1938 * dbus/dbus.h: fill in
1940 * dbus/dbus-message.h: sketch out a sample header file.
1941 Include griping if you include it directly instead of
1944 * dbus/dbus-macros.h: new file with macros for extern "C",
1945 TRUE/FALSE, NULL, etc.
1947 * doc/file-boilerplate.c: put include guards in here
1949 2002-11-21 Havoc Pennington <hp@redhat.com>
1951 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1953 * COPYING: include the GPL as well, and license code
1954 under both AFL and GPL.
1956 2002-11-21 Havoc Pennington <hp@redhat.com>
1958 * acconfig.h: get rid of this
1960 * autogen.sh (run_configure): add --no-configure option
1962 * configure.in: remove AC_ARG_PROGRAM to make
1963 autoconf complain less. add AC_PREREQ.
1964 add AC_DEFINE third arg.
1966 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1969 Fix references so we can distcheck.
1971 2002-11-21 Havoc Pennington <hp@redhat.com>
1973 * Initial module creation