1 2003-02-15 Alexander Larsson <alexl@redhat.com>
5 Add condvars. Remove static mutext from API.
6 Implement static mutexes by initializing them from threads_init.
10 Update with the thread api changes.
15 Turn StaticMutex into normal mutex + init function.
16 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
17 _dbus_list_append_link, _dbus_list_prepend_link
20 * dbus/dbus-sysdeps.c:
21 * dbus/dbus-sysdeps.h:
22 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
23 _dbus_atomic_dec. Only slow fallback implementation at the moment.
25 * dbus/dbus-protocol.h:
26 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
28 * dbus/dbus-message.c:
29 Make ref/unref atomic.
32 * dbus/dbus-connection-internal.h:
33 * dbus/dbus-connection.c:
34 * dbus/dbus-connection.h:
36 Change _peek to _borrow,_return & _steal_borrowed.
37 Change disconnect callback to event.
38 Make dbus_connection_dispatch_messages reentrant.
40 * dbus/dbus-transport.c:
41 Don't ref the connection on calls to the transport
44 * dbus/dbus-message-handler.c:
48 Don't use peek_message anymore
51 * test/debug-thread.c:
52 * test/debug-thread.h:
53 Simple thread implementation that asserts() on deadlocks in
57 (main) Call debug_threads_init.
60 Use disconnect message instead of disconnect callback.
64 Don't call dbus_connection_set_disconnect_function. Instead export
65 bus_connection_disconnect.
68 Call bus_connection_disconnect when we get a disconnected message.
70 2003-02-15 Havoc Pennington <hp@pobox.com>
72 * dbus/dbus-message.c (dbus_message_new): fool around with the
75 2003-02-14 Havoc Pennington <hp@pobox.com>
77 * dbus/dbus-mempool.c: fail if the debug functions so indicate
79 * dbus/dbus-memory.c: fail if the debug functions indicate we
82 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
83 (_dbus_decrement_fail_alloc_counter): debug functions to
84 simulate memory allocation failures
86 2003-02-14 Havoc Pennington <hp@pobox.com>
88 * dbus/dbus-errors.h (struct DBusError): add a word of padding
91 2003-02-13 Anders Carlsson <andersca@codefactory.se>
93 * bus/driver.c: (bus_driver_handle_hello):
95 * bus/services.c: (bus_service_lookup):
96 Reorder message sending so we get a more sane order.
98 * test/bus-test.c: (message_handler):
101 2003-02-13 Anders Carlsson <andersca@codefactory.se>
103 * bus/driver.c: (bus_driver_send_service_deleted),
104 (bus_driver_send_service_created), (bus_driver_send_service_lost),
105 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
106 (bus_driver_send_welcome_message),
107 (bus_driver_handle_list_services),
108 (bus_driver_handle_acquire_service),
109 (bus_driver_handle_service_exists):
110 * dbus/dbus-bus.c: (dbus_bus_register_client),
111 (dbus_bus_acquire_service), (dbus_bus_service_exists):
112 * dbus/dbus-errors.c: (dbus_result_to_string):
113 * dbus/dbus-errors.h:
114 * dbus/dbus-message.c: (dbus_message_append_args),
115 (dbus_message_append_args_valist), (dbus_message_get_args),
116 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
117 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
118 (dbus_message_iter_get_byte_array),
119 (dbus_message_iter_get_string_array), (message_iter_test),
120 (check_message_handling), (_dbus_message_test):
121 * dbus/dbus-message.h:
122 * test/bus-test.c: (main):
123 Change fields to arguments in messages, so that they won't be
124 confused with header fields.
126 * glib/test-dbus-glib.c: (main):
127 Remove append_fields from hello message.
129 2003-02-13 Anders Carlsson <andersca@codefactory.se>
131 * dbus/dbus-errors.c:
132 * dbus/dbus-message.c:
133 * dbus/dbus-string.c:
136 2003-02-13 Anders Carlsson <andersca@codefactory.se>
138 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
140 Implement support for timeouts in dbus-glib.
142 2003-02-13 Anders Carlsson <andersca@codefactory.se>
144 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
145 * dbus/dbus-message.c: (process_test_subdir):
146 * test/break-loader.c: (find_breaks_based_on):
147 Plug some memory leaks.
149 2003-02-13 Richard Hult <rhult@codefactory.se>
151 * bus/main.c: Fix build.
153 * dbus/dbus-errors.h:
154 * dbus/dbus-errors.c: Fix copyright for Anders.
156 2003-02-13 Anders Carlsson <andersca@codefactory.se>
161 * bus/connection.c: (bus_connection_foreach):
164 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
165 (unescape_string), (new_section), (parse_section_start),
166 (parse_key_value), (report_error), (bus_desktop_file_load),
167 (bus_desktop_file_get_string):
168 * bus/desktop-file.h:
169 Use DBusError for error reporting.
171 * bus/dispatch.c: (send_one_message),
172 (bus_dispatch_message_handler):
173 * bus/driver.c: (bus_driver_send_service_deleted),
174 (bus_driver_send_service_created), (bus_driver_send_service_lost),
175 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
176 (bus_driver_send_welcome_message),
177 (bus_driver_handle_list_services),
178 (bus_driver_handle_acquire_service),
179 (bus_driver_handle_service_exists):
180 * bus/loop.c: (bus_loop_run):
182 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
184 * bus/utils.c: (bus_wait_for_memory):
186 New files with general utility functions.
188 * dbus/dbus-internals.h:
189 Remove _DBUS_HANDLE_OOM.
191 2003-02-13 Anders Carlsson <andersca@codefactory.se>
193 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
194 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
195 * dbus/dbus-errors.h:
196 Add DBusError structure.
198 2003-02-13 Anders Carlsson <andersca@codefactory.se>
200 * test/data/valid-messages/standard-acquire-service.message:
201 * test/data/valid-messages/standard-hello.message:
202 * test/data/valid-messages/standard-list-services.message:
203 * test/data/valid-messages/standard-service-exists.message:
204 Add some standard messages.
206 2003-02-13 Anders Carlsson <andersca@codefactory.se>
208 * bus/driver.c: (bus_driver_send_welcome_message),
209 (bus_driver_handle_list_services),
210 (bus_driver_handle_acquire_service),
211 (bus_driver_handle_service_exists), (bus_driver_handle_message):
212 Update for API changes in libdbus.
214 * dbus/dbus-message.c: (dbus_message_new_reply):
215 * dbus/dbus-message.h:
216 Remove the name argument. The spec states that replies shouldn't
219 2003-02-13 Anders Carlsson <andersca@codefactory.se>
221 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
222 (report_error), (bus_desktop_file_load), (lookup_section),
223 (lookup_line), (bus_desktop_file_get_raw),
224 (bus_desktop_file_get_string):
225 * bus/desktop-file.h:
226 Some fixes, and new functions for getting a key value from a section.
228 2003-02-13 Havoc Pennington <hp@pobox.com>
230 * test/data/auth/fail-after-n-attempts.auth-script: new test
232 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
235 2003-02-13 Havoc Pennington <hp@pobox.com>
237 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
238 dbus_credentials_match were backward
240 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
241 NO_CREDENTIALS and ROOT_CREDENTIALS
243 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
244 into here. Never process more commands after we've reached an
245 end state; store further data as unused bytes.
247 * test/data/auth/*: add more auth tests
249 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
250 command to match exact string and EXPECT_UNUSED to match unused
253 * test/Makefile.am (dist-hook): fix to dist all the test stuff
255 2003-02-12 Havoc Pennington <hp@pobox.com>
257 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
258 \r off of popped lines
260 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
263 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
266 2003-02-12 Havoc Pennington <hp@pobox.com>
268 * dbus/Makefile.am: remove break-loader from the build, since it
271 * configure.in: add --enable-gcov to turn on coverage profiling
272 flags and disable optimization
274 2003-02-10 Havoc Pennington <hp@pobox.com>
276 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
277 initial cut at test framework for DBusAuth from laptop.
278 Doesn't quite work yet but it compiles and I need to get
279 it off the 266mhz laptop. ;-)
281 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
282 fix a memleak in error case
284 2003-02-12 Anders Carlsson <andersca@codefactory.se>
287 * bus/desktop-file.c:
288 * bus/desktop-file.h:
289 Add a desktop file parser.
291 2003-02-11 Zack Rusin <zack@kde.org>
293 * qt/message.[h|cpp]: sample implementation
294 of the KDE wrapper for DBusMessage
296 2003-02-09 Zack Rusin <zack@kde.org>
298 * test/bus-test.c: make_it_compile
299 * doc/dbus-specification.sgml: minimal semantic fix
301 2003-02-06 Anders Carlsson <andersca@codefactory.se>
307 2003-02-06 Anders Carlsson <andersca@codefactory.se>
310 * dbus/dbus-break-loader.c:
312 * test/break-loader.c:
313 Move dbus-break-loader to test/ and rename it to break-loader.
315 2003-02-02 Havoc Pennington <hp@pobox.com>
317 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
318 for code to manage cookies in your home directory
320 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
322 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
323 to authenticate, then disconnect the client.
325 2003-02-03 Alexander Larsson <alexl@redhat.com>
327 * dbus/dbus-message.c (dbus_message_append_fields):
330 2003-02-02 Anders Carlsson <andersca@codefactory.se>
332 * doc/dbus-specification.sgml:
333 Update address format section.
335 2003-02-02 Anders Carlsson <andersca@codefactory.se>
338 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
339 (message_handler), (new_connection_callback), (loop_quit),
343 2003-02-02 Anders Carlsson <andersca@codefactory.se>
345 * bus/driver.c: (bus_driver_handle_service_exists):
346 Simplify the code a bit.
348 * dbus/dbus-bus.c: (dbus_bus_service_exists):
351 2003-02-02 Anders Carlsson <andersca@codefactory.se>
354 Add libdbus-daemon.la and link to it.
356 2003-02-01 James Willcox <jwillcox@gnome.org>
358 * bus/driver.c: (bus_driver_handle_own_service):
359 Actually include the service reply code in the message.
361 2003-02-02 Anders Carlsson <andersca@codefactory.se>
363 * bus/driver.c: (bus_driver_handle_service_exists):
364 Don't unref the incoming message.
366 2003-02-02 Anders Carlsson <andersca@codefactory.se>
368 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
370 2003-02-02 Anders Carlsson <andersca@codefactory.se>
372 * dbus/dbus-server.c: (dbus_server_listen):
373 * dbus/dbus-transport.c: (_dbus_transport_open):
374 ifdef out the calls to the debug transport and server.
376 2003-02-02 Alexander Larsson <alexl@redhat.com>
378 * dbus/dbus-watch.c (dbus_watch_get_flags):
379 Add note in the docs that ERROR or HANGUP won't be returned
380 and are assumed always on.
382 * glib/dbus-gmain.c (add_watch):
383 Always add IO_ERR | IO_HUP
385 * dbus/dbus-message.h:
386 Add semicolon after dbus_message_iter_get_string_array().
387 Makes qt code build again
389 2003-02-01 Anders Carlsson <andersca@codefactory.se>
391 * bus/driver.c: (create_unique_client_name),
392 (bus_driver_handle_hello):
393 Don't take a name, just use a numeric id to identify
397 * dbus/dbus-bus.c: (dbus_bus_register_client),
398 (dbus_bus_acquire_service), (dbus_bus_service_exists):
400 Add new convenience functions for communicating with the bus.
402 * dbus/dbus-message.h:
404 * dbus/dbus-protocol.h:
407 2003-02-01 Alexander Larsson <alexl@redhat.com>
409 * dbus/dbus-message.c (dbus_message_append_fields):
410 Add some more doc comments.
412 2003-02-01 Havoc Pennington <hp@pobox.com>
414 * dbus/dbus-break-loader.c (randomly_modify_length): change
415 a 4-byte value in the message as if it were a length
417 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
418 execute bit on saved files
420 2003-02-01 Havoc Pennington <hp@pobox.com>
422 * dbus/dbus-break-loader.c (main): new program to find messages
423 that break the loader.
425 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
426 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
428 * dbus/dbus-string.c (_dbus_string_set_byte): new
430 2003-01-31 Havoc Pennington <hp@pobox.com>
432 * dbus/dbus-message.c: refactor the test code to be more general,
433 in preparation for writing a "randomly permute test cases to
434 try to break the loader" program.
436 2003-01-31 Havoc Pennington <hp@pobox.com>
438 * doc/dbus-specification.sgml: work on the specification
440 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
441 the protocol version of the message.
443 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
444 no longer specifies that.
445 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
448 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
449 "break" for DBUS_TYPE_NIL, remove @todo
451 2003-01-31 Havoc Pennington <hp@pobox.com>
453 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
454 just set_is_error/get_is_error as this is a commonly-used
455 function, and write docs.
457 2003-01-31 Anders Carlsson <andersca@codefactory.se>
459 * dbus/dbus-address.c: (dbus_address_entry_free):
460 Free key and value lists.
462 * dbus/dbus-internals.c: (_dbus_type_to_string):
463 Add the types we didn't have.
465 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
466 (_dbus_marshal_validate_arg):
469 * dbus/dbus-message.c: (dbus_message_set_sender):
470 Remove todo about being able to set sender to NULL.
472 (dbus_message_set_is_error_reply),
473 (dbus_message_get_is_error_reply):
474 * dbus/dbus-message.h:
477 * dbus/dbus-protocol.h:
478 Add error reply flag.
480 * test/data/valid-messages/opposite-endian.message:
481 Add NIL type to test.
483 2003-01-31 Havoc Pennington <hp@pobox.com>
485 * doc/dbus-specification.sgml: fully specify the header. Add
486 flags and major protocol version, and change header/body len to
489 * dbus/dbus-message-builder.c (append_saved_length): append length
492 * dbus/dbus-message.c (dbus_message_create_header): change header
493 length and body length to unsigned. Add the new fields from the
495 (_dbus_message_loader_return_buffer): unsigned header/body len
497 2003-01-30 Havoc Pennington <hp@pobox.com>
499 * dbus/dbus-auth.c: rework to use only REJECTED, no
502 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
503 use REJECTED, suggested by Mark McLoughlin
505 2003-01-30 Havoc Pennington <hp@pobox.com>
507 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
508 a better way to report errors here. e.g. "unix address lacks
509 path" or something. also "no such file" when the path doesn't
512 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
514 (dbus_parse_address): add @todo about documenting address format,
515 and allowing , and ; to be escaped
517 2003-01-30 Anders Carlsson <andersca@codefactory.se>
520 Add dbus-address.[ch]
522 * dbus/dbus-address.c: (dbus_address_entry_free),
523 (dbus_address_entries_free), (create_entry),
524 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
525 (dbus_parse_address), (_dbus_address_test):
526 * dbus/dbus-address.h:
527 New files for dealing with address parsing.
529 * dbus/dbus-connection.c:
530 Document timeout functions.
532 * dbus/dbus-message.c:
533 Document dbus_message_new_from_message.
535 * dbus/dbus-server-debug.c:
538 * dbus/dbus-server.c: (dbus_server_listen):
539 Parse address and use correct server implementation.
541 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
542 * dbus/dbus-string.h:
543 New function with test.
545 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
549 * dbus/dbus-transport-debug.c:
552 * dbus/dbus-transport.c: (_dbus_transport_open):
553 Parse address and use correct transport implementation.
555 2003-01-30 Havoc Pennington <hp@pobox.com>
557 * dbus/dbus-message.c: use message->byte_order instead of
558 DBUS_COMPILER_BYTE_ORDER throughout.
559 (dbus_message_create_header): pad header to align the
560 start of the body of the message to 8-byte boundary
562 * dbus/dbus-marshal.h: make all the demarshalers take const
563 DBusString arguments.
565 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
566 validate message args here, so we don't have to do slow validation
567 later, and so we catch bad messages as they are incoming. Also add
568 better checks on header_len and body_len. Also fill in
571 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
572 implemented properly)
573 (_dbus_string_validate_nul): new function to check all-nul
575 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
576 get_arg_end_pos and remove all validation
577 (_dbus_marshal_validate_arg): actually do validation here.
579 2003-01-29 Havoc Pennington <hp@pobox.com>
581 * dbus/dbus-message.c (check_message_handling): fix assertion
582 failure on set_client_serial
584 2003-01-28 Havoc Pennington <hp@pobox.com>
586 * dbus/dbus-server-debug.c: Add doc section comments
588 * dbus/dbus-transport-debug.c: add doc section comments
590 2003-01-28 Havoc Pennington <hp@redhat.com>
592 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
593 the reverse order from how I had it
594 (_dbus_string_base64_encode): reverse encoding order. I was
595 basically byteswapping everything during encoding.
597 2003-01-28 Anders Carlsson <andersca@codefactory.se>
599 * dbus/dbus-connection-internal.h:
600 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
601 (_dbus_connection_remove_timeout):
602 Add functions for adding and removing timeouts.
604 * dbus/dbus-message.c: (dbus_message_new_from_message):
605 Add new function that takes a message and creates an exact
606 copy of it, but with the refcount set to 1.
607 (check_message_handling):
610 * dbus/dbus-server-protected.h:
611 * dbus/dbus-server.c: (_dbus_server_init_base),
612 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
613 (dbus_server_set_timeout_functions):
614 (_dbus_server_remove_timeout):
615 New functions so that a server can add and remove timeouts.
617 (dbus_server_listen):
618 Add commented out call to dbus_server_debug_new.
620 * dbus/dbus-timeout.c: (_dbus_timeout_new):
621 Actually set the handler, doh.
623 * dbus/dbus-transport.c: (_dbus_transport_open):
624 Add commented out call to dbus_transport_debug_client_new.
627 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
629 2003-01-28 Havoc Pennington <hp@pobox.com>
631 * dbus/dbus-message.c (check_message_handling): function to check
632 on the loaded message, iterates over it etc.
634 2003-01-28 Havoc Pennington <hp@pobox.com>
636 * test/Makefile.am (dist-hook): fix make distdir
638 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
640 2003-01-27 Havoc Pennington <hp@pobox.com>
642 * dbus/dbus-mempool.c (time_for_size): replace printf with
645 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
646 empty lines; fix the SAVE_LENGTH stuff to be
647 START_LENGTH/END_LENGTH so it actually works; couple other
650 * test/Makefile.am (dist-hook): add dist-hook for .message files
652 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
653 can be constant or locked.
654 (_dbus_string_free): allow freeing a const string as
657 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
659 * dbus/dbus-test-main.c (main): take an argument which is the
660 directory containing test data
662 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
663 argument to this and load all the messages in test/data/
664 checking that they can be loaded or not loaded as appropriate.
666 2003-01-27 Anders Carlsson <andersca@codefactory.se>
668 * bus/dispatch.c: (bus_dispatch_message_handler):
669 Dispatch messages sent to services.
671 * bus/driver.c: (bus_driver_send_service_deleted),
672 (bus_driver_send_service_created), (bus_driver_send_service_lost),
673 (bus_driver_send_service_acquired):
674 Add helper functions for sending service related messages.
676 (bus_driver_send_welcome_message):
677 Send HELLO_REPLY instead of WELCOME.
679 (bus_driver_handle_list_services):
680 Send LIST_SERVICES_REPLY instead of SERVICES.
682 (bus_driver_handle_own_service),
683 (bus_driver_handle_service_exists):
684 New message handlers.
686 (bus_driver_handle_message):
687 Invoke new message handlers.
689 (bus_driver_remove_connection):
690 Don't remove any services here since that's done automatically
691 by bus_service_remove_owner now.
694 New function signatures.
696 * bus/services.c: (bus_service_add_owner):
697 Send ServiceAcquired message if we're the only primary owner.
699 (bus_service_remove_owner):
700 Send ServiceAcquired/ServiceLost messages.
702 (bus_service_set_prohibit_replacement),
703 (bus_service_get_prohibit_replacement):
704 Functions for setting prohibit replacement.
706 (bus_service_has_owner):
707 New function that checks if a connection is in the owner queue of
711 Add new function signatures.
713 * dbus/dbus-list.c: (_dbus_list_test):
714 Add tests for _dbus_list_remove_last and traversing the list backwards.
717 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
718 go any further, so return NULL then.
720 * dbus/dbus-protocol.h:
721 Add new messages, service flags and service replies.
723 2003-01-26 Havoc Pennington <hp@pobox.com>
725 * dbus/dbus-message-builder.c: implement, completely untested.
727 * test/data/*: add data to be used in testing.
728 ".message" files are our simple loadable text format.
729 ".message-raw" will be binary dumps of messages.
731 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
733 2003-01-26 Havoc Pennington <hp@pobox.com>
735 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
737 * dbus/dbus-errors.c (dbus_result_to_string): add
740 * dbus/dbus-message-builder.c: new file, will contain code to load
741 up messages from files. Not implemented yet.
743 2003-01-26 Havoc Pennington <hp@pobox.com>
745 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
746 the sender by setting to NULL
748 2003-01-26 Havoc Pennington <hp@pobox.com>
750 The unit tests pass, but otherwise untested. If it breaks, the
751 tests should have been better. ;-)
753 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
756 * dbus/dbus-message.c: redo everything so we maintain
757 message->header as the only copy of the various fields.
758 This avoids the possibility of out-of-memory in some cases,
759 for example dbus_message_lock() can't run out of memory anymore,
760 and avoids extra copying. Figured I may as well go ahead and do
761 this since it was busted for dbus_message_lock to not return
762 failure on OOM, and dbus_message_write_header was totally
763 unchecked for OOM. Also fixed some random other bugs.
765 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
766 that strings are nul-terminated. Also, end_pos can be equal
767 to string length just not greater than, I think.
768 (_dbus_marshal_set_int32): new function
769 (_dbus_marshal_set_uint32): new function
770 (_dbus_marshal_set_string): new function
772 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
773 a warning, init timeout_list to NULL
774 (dbus_connection_send_message): don't use uninitialized variable
777 * dbus/dbus-string.c (_dbus_string_replace_len): new function
779 2003-01-26 Anders Carlsson <andersca@codefactory.se>
781 * bus/driver.c: (bus_driver_handle_hello),
782 (bus_driver_send_welcome_message):
785 2003-01-26 Anders Carlsson <andersca@codefactory.se>
787 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
788 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
789 (dbus_connection_unref):
790 * dbus/dbus-marshal.c: (_dbus_marshal_test):
791 * dbus/dbus-message.c: (dbus_message_unref),
794 (dbus_message_get_fields):
795 Remove debugging printout.
797 (_dbus_message_loader_return_buffer):
798 Don't store the header string.
800 (_dbus_message_test):
803 2003-01-26 Richard Hult <rhult@codefactory.se>
805 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
806 the file descriptor list, since it can change under us.
808 2003-01-25 Anders Carlsson <andersca@codefactory.se>
810 * glib/dbus-gmain.c: (dbus_connection_prepare),
811 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
812 (remove_watch), (dbus_connection_hookup_with_g_main):
813 Rewrite the glib handling to use its own GSource instead of a
814 GIOChannel so we can catch messages put in the queue while waiting
817 2003-01-25 Anders Carlsson <andersca@codefactory.se>
820 * bus/connection.c: (connection_disconnect_handler),
821 (connection_watch_callback), (bus_connection_setup):
822 * bus/dispatch.c: (send_one_message),
823 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
824 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
826 * bus/driver.c: (bus_driver_send_service_deleted),
827 (bus_driver_send_service_created), (bus_driver_handle_hello),
828 (bus_driver_send_welcome_message),
829 (bus_driver_handle_list_services), (bus_driver_remove_connection),
830 (bus_driver_handle_message):
832 Refactor code, put the message dispatching in its own file. Use
833 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
836 2003-01-25 Anders Carlsson <andersca@codefactory.se>
838 * dbus/dbus-internals.h:
839 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
841 * dbus/dbus-message.c: (dbus_message_get_sender):
842 * dbus/dbus-message.h:
843 Implement dbus_message_get_sender.
845 * dbus/dbus-protocol.h:
846 Add message and service defines.
848 2003-01-25 Anders Carlsson <andersca@codefactory.se>
850 * dbus/dbus-connection.c: (dbus_connection_send_message):
851 * dbus/dbus-message-internal.h:
852 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
853 (dbus_message_write_header):
854 Remove _dbus_messag_unlock and don't set the client serial on a
855 message if one already exists.
857 2003-01-24 Havoc Pennington <hp@pobox.com>
859 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
862 * bus/driver.c (bus_driver_handle_list_services): fix a leak
865 2003-01-25 Anders Carlsson <andersca@codefactory.se>
867 * dbus/dbus-list.c: (alloc_link), (free_link):
868 Use a memory pool for the links.
870 2003-01-25 Anders Carlsson <andersca@codefactory.se>
872 * bus/connection.c: (bus_connection_foreach):
874 Add new bus_connection_foreach function.
876 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
877 Add function that broadcasts a message to all clients.
879 (bus_driver_send_service_created), (bus_driver_handle_hello),
880 (bus_driver_send_welcome_message),
881 (bus_driver_handle_list_services), (bus_driver_message_handler):
882 Implement functions that take care of listing services, and notifying
883 clients when new services are created.
885 * bus/services.c: (bus_services_list):
887 Add new function that returns an array of strings with the currently
892 Update copyright year.
894 2003-01-25 Anders Carlsson <andersca@codefactory.se>
896 * dbus/dbus-connection.c: (dbus_connection_send_message):
897 Unlock the message in case it was sent earlier.
899 (dbus_connection_send_message_with_reply_and_block):
900 Remove the reply message from the list.
902 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
903 Set array_len and new_pos correctly.
905 (_dbus_marshal_test):
908 * dbus/dbus-message-internal.h:
909 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
910 New function that returns the reply serial.
912 (_dbus_message_unlock):
913 New function that unlocks a message and resets its header.
915 (dbus_message_append_string_array),
916 (dbus_message_get_fields_valist),
917 (dbus_message_iter_get_field_type),
918 (dbus_message_iter_get_string_array),
919 (dbus_message_get_fields),
920 (dbus_message_append_fields_valist):
921 Handle string arrays.
923 (dbus_message_set_sender):
924 Make this function public since the bus daemon needs it.
926 (decode_header_data):
927 Set the reply serial to -1 initially.
929 * dbus/dbus-message.h:
930 Add dbus_message_set_sender.
932 2003-01-24 Havoc Pennington <hp@pobox.com>
934 * doc/dbus-specification.sgml: add some stuff
936 2003-01-22 Havoc Pennington <hp@pobox.com>
938 * doc/dbus-specification.sgml: Start to document the protocol.
940 2003-01-22 Havoc Pennington <hp@pobox.com>
942 * dbus/dbus-connection.c
943 (dbus_connection_send_message_with_reply_and_block): add some @todo
945 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
947 2003-01-21 Havoc Pennington <hp@pobox.com>
949 (patch untested because can't compile)
951 * bus/driver.c (create_unique_client_name): make this function
952 never recycle client names. Also, caller should initialize
955 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
957 2003-01-21 Anders Carlsson <andersca@codefactory.se>
959 * dbus/dbus-marshal.c: (_dbus_marshal_double),
960 (_dbus_marshal_int32), (_dbus_marshal_uint32),
961 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
962 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
963 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
964 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
965 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
966 * dbus/dbus-marshal.h:
967 * dbus/dbus-protocol.h:
968 Add support for marshalling and demarshalling integer, double
971 2003-01-21 Anders Carlsson <andersca@codefactory.se>
976 * bus/connection.c: (connection_disconnect_handler):
977 Remove the connection from the bus driver's list.
979 (connection_watch_callback): Dispatch messages.
981 (free_connection_data): Free connection name.
983 (bus_connection_setup): Add connection to the bus driver's list.
984 (bus_connection_remove_owned_service):
985 (bus_connection_set_name), (bus_connection_get_name):
986 Add functions for setting and getting the connection's name.
989 Add function headers.
991 * bus/driver.c: (create_unique_client_name),
992 (bus_driver_handle_hello_message),
993 (bus_driver_send_welcome_message), (bus_driver_message_handler),
994 (bus_driver_add_connection), (bus_driver_remove_connection):
997 * bus/services.c: (bus_service_free):
999 New file that handles communication and registreation with the bus
1002 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1004 * dbus/dbus-connection.c: (dbus_connection_send_message):
1005 Add a new client_serial parameter.
1007 (dbus_connection_send_message_with_reply):
1008 Remove a @todo since we've implemented the blocking function.
1010 (dbus_connection_send_message_with_reply_and_block):
1011 New function that sends a message and waits for a reply and
1012 then returns the reply.
1014 * dbus/dbus-connection.h:
1017 * dbus/dbus-errors.c: (dbus_result_to_string):
1018 * dbus/dbus-errors.h:
1019 Add new DBUS_RESULT.
1021 * dbus/dbus-message-internal.h:
1022 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1023 (_dbus_message_set_sender), (dbus_message_write_header),
1024 (dbus_message_new_reply), (decode_header_data),
1025 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1026 * dbus/dbus-message.h:
1027 Add new functions that set the reply serial and sender.
1028 Also marshal and demarshal them correctly and add test.
1030 * dbus/dbus-protocol.h:
1031 Add new DBUS_MESSAGE_TYPE_SENDER.
1034 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1035 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1036 (dbus_connection_hookup_with_g_main):
1037 * glib/test-dbus-glib.c: (main):
1038 Rewrite to use GIOChannel and remove the GSource crack.
1040 * test/echo-client.c: (main):
1041 * test/watch.c: (check_messages):
1042 Update for changed APIs
1044 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1046 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1048 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1049 Create a DBusTimeoutList.
1050 (dbus_connection_set_timeout_functions): Add new function to
1051 set timeout callbacks
1053 * dbus/dbus-connection.h: Add public DBusTimeout API.
1055 * dbus/dbus-message.c: (dbus_message_get_service):
1056 * dbus/dbus-message.h: New function.
1058 * dbus/dbus-server.c: Fix small doc typo.
1060 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1062 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1064 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1065 of the string, just as long as specified.
1067 2003-01-19 Havoc Pennington <hp@pobox.com>
1069 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1072 * dbus/dbus-server.c (dbus_server_set_max_connections)
1073 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1074 keep track of current number of connections, and add API for
1075 setting a max (but haven't implemented enforcing the max yet)
1077 2003-01-18 Havoc Pennington <hp@pobox.com>
1079 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1080 reading/writing if read_watch != NULL or write_watch != NULL.
1082 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1083 the message loader code to actually load message->header and
1084 message->body into the newly-created message.
1086 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1089 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1090 (dbus_connection_get_max_message_size)
1091 (dbus_connection_set_max_live_messages_size)
1092 (dbus_connection_get_max_live_messages_size): implement some
1093 resource limitation functions
1095 * dbus/dbus-resources.c: new file implementing some of the
1096 resource limits stuff
1098 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1099 missing docs, add @todo to handle OOM etc.
1101 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1104 2003-01-18 Havoc Pennington <hp@pobox.com>
1106 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1107 connection if it hasn't been already.
1109 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1110 replace with DisconnectFunction.
1112 2003-01-18 Havoc Pennington <hp@pobox.com>
1114 Building --disable-verbose-mode --disable-asserts --disable-tests
1115 cuts the library from 112K to 45K or so
1117 * configure.in: check for varargs macro support,
1118 add --enable-verbose-mode, --enable-asserts.
1120 * dbus/dbus-internals.h (_dbus_assert): support
1122 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1124 2003-01-18 Havoc Pennington <hp@pobox.com>
1126 * dbus/dbus-test.c: include config.h so that tests actually run
1128 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1129 so the failure mode when that assumption fails will be plenty
1132 2003-01-18 Havoc Pennington <hp@pobox.com>
1134 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1136 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1139 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1140 since we don't want to use those in make check
1142 2003-01-15 Havoc Pennington <hp@redhat.com>
1148 2003-01-15 Havoc Pennington <hp@redhat.com>
1150 * test/Makefile.am: fix so that test source code ends up in the
1151 distribution on make distcheck
1153 2003-01-15 Havoc Pennington <hp@redhat.com>
1159 2003-01-15 Havoc Pennington <hp@redhat.com>
1161 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1162 fix build when --disable-tests
1164 * Makefile.am (EXTRA_DIST): put HACKING in here
1166 * HACKING: document procedure for making a tarball release.
1168 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1170 * bus/connection.c: (connection_error_handler),
1171 (bus_connection_setup):
1172 * bus/main.c: (main):
1173 Make sure that the DBusConnectionData struct is NULLed
1174 out to prevent a segfault.
1176 * dbus/dbus-errors.c: (dbus_result_to_string):
1177 * dbus/dbus-errors.h:
1178 * dbus/dbus-message.c: (dbus_message_get_fields),
1179 (dbus_message_get_fields_valist), (_dbus_message_test):
1180 * dbus/dbus-message.h:
1181 Make dbus_message_get_fields return a result code so we can
1182 track invalid fields as well as oom.
1184 2003-01-11 Havoc Pennington <hp@pobox.com>
1186 * configure.in: change --enable-test/--enable-ansi action-if-given
1187 to enable_foo=$enableval instead of enable_foo=yes
1189 2003-01-08 Havoc Pennington <hp@pobox.com>
1191 * dbus/dbus-string.c (_dbus_string_align_length): new function
1193 * dbus/dbus-test-main.c: move main() for test app here
1195 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1196 symbol to run tests, because dbus-test isn't in the main
1199 Code review nitpicks.
1201 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1202 for people with narrow emacs ;-). Assert client_serial was filled
1203 in. Assert message->name != NULL.
1204 (dbus_message_append_fields): have "first_field_type" arg separate
1205 from va list, needed for C++ binding that also uses varargs IIRC
1206 and helps with type safety
1207 (dbus_message_new): add @todo about using DBusString to store
1208 service/name internally
1209 (dbus_message_new): don't leak ->service and ->name on OOM later
1211 (dbus_message_unref): free the service name
1212 (dbus_message_get_fields): same change to varargs
1213 i.e. first_field_type
1214 (_dbus_message_loader_return_buffer): assert that the message data
1215 is aligned (if not it's a bug in our code). Put in verbose griping
1216 about why we set corrupted = TRUE.
1217 (decode_header_data): add FIXME that char* is evil. Was going to
1218 add FIXME about evil locale-specific string.h strncmp, but just
1219 switched to wacky string-as-uint32 optimization. Move check for
1220 "no room for field name" above get_const_data_len() to avoid
1221 assertion failure in get_const_data_len if we have trailing 2
1222 bytes or the like. Check for service and name fields being
1223 provided twice. Don't leak service/name on error. Require field
1224 names to be aligned to 4 bytes.
1226 * dbus/dbus-marshal.c: move byte swap stuff to header
1227 (_dbus_pack_int32): uscore-prefix
1228 (_dbus_unpack_int32): uscore-prefix
1229 (_dbus_unpack_uint32): export
1230 (_dbus_demarshal_string): add @todo complaining about use of
1232 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1233 handling allowing corrupt data to go unchecked
1235 2003-01-08 Havoc Pennington <hp@redhat.com>
1237 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1238 to the select() as needed for authentication. (should be using
1239 _dbus_poll() not select, but for another day)
1241 * dbus/dbus.h: include dbus/dbus-protocol.h
1243 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1245 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1248 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1250 * dbus/dbus-internals.c: (_dbus_type_to_string):
1251 New function that returns a string describing a type.
1253 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1254 * dbus/dbus-marshal.h:
1255 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1256 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1257 (dbus_message_iter_get_byte_array):
1258 * dbus/dbus-message.h:
1259 Add new convenience functions for appending and getting message fields.
1260 Also add demarshalling routines for byte arrays.
1262 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1264 * dbus/dbus-connection-internal.h:
1265 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1266 (_dbus_connection_get_next_client_serial),
1267 (dbus_connection_send_message):
1268 * dbus/dbus-internals.h:
1269 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1270 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1271 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1272 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1273 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1274 (_dbus_verbose_bytes), (_dbus_marshal_test):
1275 * dbus/dbus-marshal.h:
1276 * dbus/dbus-message-internal.h:
1277 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1278 (dbus_message_write_header), (_dbus_message_lock),
1279 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1280 (dbus_message_get_name), (dbus_message_append_int32),
1281 (dbus_message_append_uint32), (dbus_message_append_double),
1282 (dbus_message_append_string), (dbus_message_append_byte_array),
1283 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1284 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1285 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1286 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1287 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1288 (decode_header_data), (_dbus_message_loader_return_buffer),
1289 (message_iter_test), (_dbus_message_test):
1290 * dbus/dbus-message.h:
1291 * dbus/dbus-protocol.h:
1292 * dbus/dbus-test.c: (main):
1294 * glib/test-dbus-glib.c: (message_handler), (main):
1295 * test/echo-client.c: (main):
1296 * test/watch.c: (check_messages):
1297 Make messages sendable and receivable for real.
1299 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1301 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1302 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1303 * dbus/dbus-message.c: (dbus_message_append_int32),
1304 (dbus_message_append_uint32), (dbus_message_append_double),
1305 (dbus_message_append_string), (dbus_message_append_byte_array):
1306 Handle OOM restoration.
1308 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1310 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1311 (_dbus_demarshal_string), (_dbus_marshal_test):
1312 * dbus/dbus-marshal.h:
1313 * dbus/dbus-message.c: (dbus_message_get_name),
1314 Document these functions.
1316 (dbus_message_append_int32), (dbus_message_append_uint32),
1317 (dbus_message_append_double), (dbus_message_append_string),
1318 (dbus_message_append_byte_array):
1319 * dbus/dbus-message.h:
1320 Add functions for adding message fields of different types.
1322 * dbus/dbus-protocol.h:
1323 Add the different types.
1325 2003-01-05 Havoc Pennington <hp@pobox.com>
1327 * bus/connection.c: implement routines for handling connections,
1328 first thing is keeping a list of owned services on each connection
1329 and setting up watches etc.
1331 * bus/services.c: implement a mapping from service names to lists
1334 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1336 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1337 to use static mutexes for global data
1339 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1340 collection of functions to set/get application-specific data
1341 on the DBusConnection.
1343 2003-01-04 Havoc Pennington <hp@pobox.com>
1345 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1346 (_dbus_poll): new function
1348 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1351 * bus/loop.c: initial code for the daemon main loop
1353 2003-01-04 Havoc Pennington <hp@pobox.com>
1355 * test/watch.c (error_handler): make it safe if the error handler
1356 is called multiple times (if we s/error handler/disconnect
1357 handler/ we should just guarantee it's called only once)
1359 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1360 error handler on disconnect (it's quite possible we should
1361 just change the error handler to a "disconnect handler," I'm
1362 not sure we have any other meaningful errors)
1364 * configure.in: check for getpwnam_r
1366 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1367 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1368 mechanism as in SASL spec, using socket credentials
1370 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1371 (_dbus_send_credentials_unix_socket): new function
1373 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1375 (_dbus_write): only check errno if <0 returned
1376 (_dbus_write_two): ditto
1378 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1380 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1381 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1382 (_dbus_marshal_test):
1383 * dbus/dbus-marshal.h:
1384 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1385 to _dbus_marshal_utf8_string. Also fix some tests.
1387 2002-12-28 Harri Porten <porten@kde.org>
1389 * configure.in: added check for C++ compiler and a very cheesy
1390 check for the Qt integration
1392 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1394 * qt/Makefile.am: added
1396 * qt/.cvsignore: added
1398 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1399 latter, added #ifdef QT_THREAD_SUPPORT guard.
1401 * dbus/Makefile.am: added missing headers for make dist
1403 2002-12-28 Kristian Rietveld <kris@gtk.org>
1405 * dbus/Makefile.am: fixup export-symbols-regex.
1407 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1409 * acinclude.m4: Add this file and put the
1410 PKG_CHECK_MODULE macro in it.
1412 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1414 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1415 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1416 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1417 (_dbus_marshal_test):
1418 Make the demarshalling routines align the pos argument.
1419 Add string marshalling tests and fix the obvious bugs
1422 2002-12-26 Havoc Pennington <hp@pobox.com>
1424 * dbus/dbus-auth.c: fixes fixes fixes
1426 * dbus/dbus-transport-unix.c: wire up support for
1427 encoding/decoding data on the wire
1429 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1430 (_dbus_auth_decode_data): append to target string
1431 instead of nuking it.
1433 2002-12-26 Havoc Pennington <hp@pobox.com>
1435 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1436 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1439 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1440 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1441 now). Main point is because I wanted unpack_uint32 to implement
1443 (_dbus_verbose_bytes): new function
1445 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1447 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1448 mechanism to handle a corrupt message stream
1449 (_dbus_message_loader_new): fix preallocation to only prealloc,
1452 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1453 (_dbus_string_test): enhance tests for copy/move and fix the
1456 * dbus/dbus-transport-unix.c: Hold references in more places to
1457 avoid reentrancy problems
1459 * dbus/dbus-transport.c: ditto
1461 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1462 leak reference count in no-message case
1464 * test/watch.c (do_mainloop): handle adding/removing watches
1465 during iteration over the watches. Also, ref the connection/server
1466 stored on a watch, so we don't try to mangle a destroyed one.
1468 * dbus/dbus-transport-unix.c (do_authentication): perform
1471 * dbus/dbus-auth.c (get_state): add a state
1472 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1473 (_dbus_auth_get_unused_bytes): append the unused bytes
1474 to the passed in string, rather than prepend
1476 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1477 the auth conversation DBusAuth
1479 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1480 (_dbus_transport_new_for_domain_socket): when creating a
1481 transport, pass in whether it's a client-side or server-side
1482 transport so we know which DBusAuth to create
1484 2002-12-03 Havoc Pennington <hp@pobox.com>
1486 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1487 _after_ finalizing the derived members
1488 (unix_connection_set): unref watch if we fail to add it
1490 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1491 transport first, so that the connection owned by the
1492 transport will be valid as the transport finalizes.
1494 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1495 if necessary, and remove watches from the connection.
1497 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1499 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1501 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1502 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1503 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1504 (_dbus_marshal_test):
1505 * dbus/dbus-marshal.h:
1506 Add string marshal functions and have the demarshal functions
1507 return the new position.
1509 2002-12-25 Havoc Pennington <hp@pobox.com>
1511 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1512 it is a simple protocol that just maps directly to SASL.
1514 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1515 initial implementation, not actually used yet.
1517 * dbus/dbus-string.c (_dbus_string_find): new function
1518 (_dbus_string_equal): new function
1519 (_dbus_string_base64_encode): new function
1520 (_dbus_string_base64_decode): new function
1522 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1525 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1526 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1527 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1528 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1529 * dbus/dbus-marshal.h:
1530 * dbus/dbus-protocol.h:
1531 * dbus/dbus-test.c: (main):
1533 Add un-optimized marshalling/demarshalling routines.
1535 2002-12-25 Harri Porten <porten@kde.org>
1537 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1539 2002-12-24 Zack Rusin <zack@kde.org>
1541 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1542 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1545 2002-12-24 Havoc Pennington <hp@pobox.com>
1547 * glib/dbus-gthread.c: fix include
1549 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1550 I think glib API needs to change, though, as you don't
1551 want to use DBusMessageFunction, you want to use the
1552 DBusMessageHandler object. Probably
1553 dbus_connection_open_with_g_main_loop()
1554 and dbus_connection_setup_g_main_loop() or something like that
1555 (but think of better names...) that just create a connection
1556 that has watch/timeout functions etc. already set up.
1558 * dbus/dbus-connection.c
1559 (dbus_connection_send_message_with_reply): new function just to
1560 show how the message handler helps us deal with replies.
1562 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1564 * dbus/dbus-string.c (_dbus_string_test): free a string that
1567 * dbus/dbus-hash.c: use memory pools for the hash entries
1568 (rebuild_table): be more paranoid about overflow, and
1569 shrink table when we can
1570 (_dbus_hash_test): reduce number of sprintfs and write
1571 valid C89. Add tests for case where we grow and then
1572 shrink the hash table.
1574 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1576 * dbus/dbus-connection.c (dbus_connection_register_handler)
1577 (dbus_connection_unregister_handler): new functions
1579 * dbus/dbus-message.c (dbus_message_get_name): new
1581 * dbus/dbus-list.c: fix docs typo
1583 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1584 an object representing a handler for messages.
1586 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1589 * glib/dbus-gthread.c: (dbus_gthread_init):
1590 Don't use the gdbus prefix for public functions.
1592 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1596 Add GLib checks and fixup .pc files
1600 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1601 (gdbus_connection_check), (gdbus_connection_dispatch),
1602 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1603 (dbus_connection_gsource_new):
1604 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1605 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1606 * glib/test-dbus-glib.c: (message_handler), (main):
1609 2002-12-15 Harri Porten <porten@kde.org>
1611 * autogen.sh: check for libtoolize before attempting to use it
1613 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1616 * .cvsignore: ignore more stamp files
1618 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1620 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1621 without make install.
1623 2002-12-15 Havoc Pennington <hp@pobox.com>
1625 * dbus/dbus-threads.c: add thread stubs that a higher library
1626 layer can fill in. e.g. the GLib wrapper might fill them in with
1627 GThread stuff. We still need to use this thread API to
1628 thread-safe-ize the library.
1630 2002-12-12 Havoc Pennington <hp@pobox.com>
1632 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1633 below new interfaces and include fewer system headers.
1635 * dbus/dbus-sysdeps.c (_dbus_read): new function
1636 (_dbus_write): new function
1637 (_dbus_write_two): new function
1638 (_dbus_connect_unix_socket): new function
1639 (_dbus_listen_unix_socket): new function
1641 * dbus/dbus-message-internal.h: change interfaces to use
1644 2002-12-11 Havoc Pennington <hp@pobox.com>
1646 * dbus/dbus-types.h: add dbus_unichar
1648 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1650 * dbus/dbus-connection.c (dbus_connection_send_message): return
1653 * dbus/dbus-transport.c: include dbus-watch.h
1655 * dbus/dbus-connection.c: include dbus-message-internal.h
1657 * HACKING: add file with coding guidelines stuff.
1659 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1660 handling here, for security purposes (as in vsftpd). Not actually
1661 using this class yet.
1663 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1664 system/libc usage here, as in vsftpd, for ease of auditing (and
1665 should also simplify portability). Haven't actually moved all the
1666 system/libc usage into here yet.
1668 2002-11-25 Havoc Pennington <hp@pobox.com>
1670 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1671 always print the first verbose message.
1673 2002-11-24 Havoc Pennington <hp@pobox.com>
1675 * test/echo-client.c, test/echo-server.c: cheesy test
1678 * configure.in (AC_CHECK_FUNCS): check for writev
1680 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1683 * dbus/dbus-list.c (_dbus_list_foreach): new function
1685 * dbus/dbus-internals.c (_dbus_verbose): new function
1687 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1688 representing a server that listens for connections.
1690 * dbus/.cvsignore: create
1692 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1693 public API for reporting errors
1695 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1696 public object representing a connection that
1697 sends/receives messages. (Same object used for
1698 both client and server.)
1700 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1701 Basic abstraction for different kinds of stream
1702 that we might read/write messages from.
1704 2002-11-23 Havoc Pennington <hp@pobox.com>
1706 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1709 * dbus/dbus-test.c (main): add list test, and include
1710 dbus-test.h as intended
1712 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1713 (_dbus_hash_table_remove_int): return value indicates
1714 whether the entry existed to remove
1716 * dbus/dbus-list.c: add linked list utility class,
1719 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1722 2002-11-23 Havoc Pennington <hp@pobox.com>
1724 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1725 DBUS_END_DECLS to nothing, that should fix this once and for all
1727 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1729 * dbus/dbus-message.c, dbus/dbus-hash.c:
1730 add some missing @brief
1732 2002-11-23 Havoc Pennington <hp@pobox.com>
1734 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1735 to avoid confusing Doxygen
1737 * dbus/dbus-hash.c: @} not }@
1739 * dbus/dbus-message.c (struct DBusMessage): split out
1742 2002-11-23 Havoc Pennington <hp@pobox.com>
1744 * configure.in: pile on more warning flags if using gcc
1746 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1747 to document static functions
1749 * configure.in: add summary to end of configure so it
1750 looks nice and attractive
1752 * dbus/dbus-hash.c: finish implementation and write unit
1755 * configure.in: add --enable-tests to enable unit tests
1757 * dbus/dbus-test.c: test program to run unit tests
1758 for all files in dbus/*, initially runs a test for
1761 * dbus/dbus-internals.h: file to hold some internal utility stuff
1763 2002-11-22 Havoc Pennington <hp@redhat.com>
1765 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1766 "ported" away from Tcl
1768 * dbus/dbus-types.h: header for types such as dbus_bool_t
1770 2002-11-22 Havoc Pennington <hp@redhat.com>
1772 * dbus/dbus.h: fixups for doc warnings
1774 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1776 (QUIET): make it quiet so we can see warnings
1778 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1780 2002-11-22 Havoc Pennington <hp@redhat.com>
1782 * Makefile.am: include "Doxyfile" target in all-local
1784 * configure.in: generate the Doxyfile
1786 * Doxyfile.in: move Doxyfile here, so we can use
1787 configure to generate a Doxyfile with the right
1790 2002-11-22 Havoc Pennington <hp@redhat.com>
1792 * dbus/dbus-message.c: move inline docs into .c file
1794 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1795 so all docs are under doc/
1796 (MAN_EXTENSION): generate man pages. Use extension
1797 ".3dbus" which matches ".3qt" on my system,
1798 I guess this is OK, I don't know really.
1799 (FILE_PATTERNS): look for .c files not .h, makes sense
1802 2002-11-22 Havoc Pennington <hp@pobox.com>
1804 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1805 because any app can be a server, and any app can be a client,
1806 the bus is a special kind of server.
1808 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1810 * Doxyfile : adding. Still needs Makefile rules to be generated
1811 automatically (just run "doxygen" in the toplevel dir for now to
1814 * dbus/dbus-message.h : Adding sample docs (javadoc since
1815 resembles gtk-doc a little more)
1817 * dbus/dbus.h : Adding sample docs
1819 2002-11-21 Havoc Pennington <hp@redhat.com>
1821 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1822 so we can allow ourselves to include files directly,
1823 instead of having to use dbus.h
1825 * dbus/dbus.h: fill in
1827 * dbus/dbus-message.h: sketch out a sample header file.
1828 Include griping if you include it directly instead of
1831 * dbus/dbus-macros.h: new file with macros for extern "C",
1832 TRUE/FALSE, NULL, etc.
1834 * doc/file-boilerplate.c: put include guards in here
1836 2002-11-21 Havoc Pennington <hp@redhat.com>
1838 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1840 * COPYING: include the GPL as well, and license code
1841 under both AFL and GPL.
1843 2002-11-21 Havoc Pennington <hp@redhat.com>
1845 * acconfig.h: get rid of this
1847 * autogen.sh (run_configure): add --no-configure option
1849 * configure.in: remove AC_ARG_PROGRAM to make
1850 autoconf complain less. add AC_PREREQ.
1851 add AC_DEFINE third arg.
1853 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1856 Fix references so we can distcheck.
1858 2002-11-21 Havoc Pennington <hp@redhat.com>
1860 * Initial module creation