1 2003-02-14 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8 * bus/driver.c: (bus_driver_handle_hello):
10 * bus/services.c: (bus_service_lookup):
11 Reorder message sending so we get a more sane order.
13 * test/bus-test.c: (message_handler):
16 2003-02-13 Anders Carlsson <andersca@codefactory.se>
18 * bus/driver.c: (bus_driver_send_service_deleted),
19 (bus_driver_send_service_created), (bus_driver_send_service_lost),
20 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
21 (bus_driver_send_welcome_message),
22 (bus_driver_handle_list_services),
23 (bus_driver_handle_acquire_service),
24 (bus_driver_handle_service_exists):
25 * dbus/dbus-bus.c: (dbus_bus_register_client),
26 (dbus_bus_acquire_service), (dbus_bus_service_exists):
27 * dbus/dbus-errors.c: (dbus_result_to_string):
29 * dbus/dbus-message.c: (dbus_message_append_args),
30 (dbus_message_append_args_valist), (dbus_message_get_args),
31 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
32 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
33 (dbus_message_iter_get_byte_array),
34 (dbus_message_iter_get_string_array), (message_iter_test),
35 (check_message_handling), (_dbus_message_test):
36 * dbus/dbus-message.h:
37 * test/bus-test.c: (main):
38 Change fields to arguments in messages, so that they won't be
39 confused with header fields.
41 * glib/test-dbus-glib.c: (main):
42 Remove append_fields from hello message.
44 2003-02-13 Anders Carlsson <andersca@codefactory.se>
47 * dbus/dbus-message.c:
51 2003-02-13 Anders Carlsson <andersca@codefactory.se>
53 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
55 Implement support for timeouts in dbus-glib.
57 2003-02-13 Anders Carlsson <andersca@codefactory.se>
59 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
60 * dbus/dbus-message.c: (process_test_subdir):
61 * test/break-loader.c: (find_breaks_based_on):
62 Plug some memory leaks.
64 2003-02-13 Richard Hult <rhult@codefactory.se>
66 * bus/main.c: Fix build.
69 * dbus/dbus-errors.c: Fix copyright for Anders.
71 2003-02-13 Anders Carlsson <andersca@codefactory.se>
76 * bus/connection.c: (bus_connection_foreach):
79 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
80 (unescape_string), (new_section), (parse_section_start),
81 (parse_key_value), (report_error), (bus_desktop_file_load),
82 (bus_desktop_file_get_string):
84 Use DBusError for error reporting.
86 * bus/dispatch.c: (send_one_message),
87 (bus_dispatch_message_handler):
88 * bus/driver.c: (bus_driver_send_service_deleted),
89 (bus_driver_send_service_created), (bus_driver_send_service_lost),
90 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
91 (bus_driver_send_welcome_message),
92 (bus_driver_handle_list_services),
93 (bus_driver_handle_acquire_service),
94 (bus_driver_handle_service_exists):
95 * bus/loop.c: (bus_loop_run):
97 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
99 * bus/utils.c: (bus_wait_for_memory):
101 New files with general utility functions.
103 * dbus/dbus-internals.h:
104 Remove _DBUS_HANDLE_OOM.
106 2003-02-13 Anders Carlsson <andersca@codefactory.se>
108 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
109 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
110 * dbus/dbus-errors.h:
111 Add DBusError structure.
113 2003-02-13 Anders Carlsson <andersca@codefactory.se>
115 * test/data/valid-messages/standard-acquire-service.message:
116 * test/data/valid-messages/standard-hello.message:
117 * test/data/valid-messages/standard-list-services.message:
118 * test/data/valid-messages/standard-service-exists.message:
119 Add some standard messages.
121 2003-02-13 Anders Carlsson <andersca@codefactory.se>
123 * bus/driver.c: (bus_driver_send_welcome_message),
124 (bus_driver_handle_list_services),
125 (bus_driver_handle_acquire_service),
126 (bus_driver_handle_service_exists), (bus_driver_handle_message):
127 Update for API changes in libdbus.
129 * dbus/dbus-message.c: (dbus_message_new_reply):
130 * dbus/dbus-message.h:
131 Remove the name argument. The spec states that replies shouldn't
134 2003-02-13 Anders Carlsson <andersca@codefactory.se>
136 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
137 (report_error), (bus_desktop_file_load), (lookup_section),
138 (lookup_line), (bus_desktop_file_get_raw),
139 (bus_desktop_file_get_string):
140 * bus/desktop-file.h:
141 Some fixes, and new functions for getting a key value from a section.
143 2003-02-13 Havoc Pennington <hp@pobox.com>
145 * test/data/auth/fail-after-n-attempts.auth-script: new test
147 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
150 2003-02-13 Havoc Pennington <hp@pobox.com>
152 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
153 dbus_credentials_match were backward
155 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
156 NO_CREDENTIALS and ROOT_CREDENTIALS
158 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
159 into here. Never process more commands after we've reached an
160 end state; store further data as unused bytes.
162 * test/data/auth/*: add more auth tests
164 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
165 command to match exact string and EXPECT_UNUSED to match unused
168 * test/Makefile.am (dist-hook): fix to dist all the test stuff
170 2003-02-12 Havoc Pennington <hp@pobox.com>
172 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
173 \r off of popped lines
175 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
178 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
181 2003-02-12 Havoc Pennington <hp@pobox.com>
183 * dbus/Makefile.am: remove break-loader from the build, since it
186 * configure.in: add --enable-gcov to turn on coverage profiling
187 flags and disable optimization
189 2003-02-10 Havoc Pennington <hp@pobox.com>
191 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
192 initial cut at test framework for DBusAuth from laptop.
193 Doesn't quite work yet but it compiles and I need to get
194 it off the 266mhz laptop. ;-)
196 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
197 fix a memleak in error case
199 2003-02-12 Anders Carlsson <andersca@codefactory.se>
202 * bus/desktop-file.c:
203 * bus/desktop-file.h:
204 Add a desktop file parser.
206 2003-02-11 Zack Rusin <zack@kde.org>
208 * qt/message.[h|cpp]: sample implementation
209 of the KDE wrapper for DBusMessage
211 2003-02-09 Zack Rusin <zack@kde.org>
213 * test/bus-test.c: make_it_compile
214 * doc/dbus-specification.sgml: minimal semantic fix
216 2003-02-06 Anders Carlsson <andersca@codefactory.se>
222 2003-02-06 Anders Carlsson <andersca@codefactory.se>
225 * dbus/dbus-break-loader.c:
227 * test/break-loader.c:
228 Move dbus-break-loader to test/ and rename it to break-loader.
230 2003-02-02 Havoc Pennington <hp@pobox.com>
232 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
233 for code to manage cookies in your home directory
235 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
237 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
238 to authenticate, then disconnect the client.
240 2003-02-03 Alexander Larsson <alexl@redhat.com>
242 * dbus/dbus-message.c (dbus_message_append_fields):
245 2003-02-02 Anders Carlsson <andersca@codefactory.se>
247 * doc/dbus-specification.sgml:
248 Update address format section.
250 2003-02-02 Anders Carlsson <andersca@codefactory.se>
253 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
254 (message_handler), (new_connection_callback), (loop_quit),
258 2003-02-02 Anders Carlsson <andersca@codefactory.se>
260 * bus/driver.c: (bus_driver_handle_service_exists):
261 Simplify the code a bit.
263 * dbus/dbus-bus.c: (dbus_bus_service_exists):
266 2003-02-02 Anders Carlsson <andersca@codefactory.se>
269 Add libdbus-daemon.la and link to it.
271 2003-02-01 James Willcox <jwillcox@gnome.org>
273 * bus/driver.c: (bus_driver_handle_own_service):
274 Actually include the service reply code in the message.
276 2003-02-02 Anders Carlsson <andersca@codefactory.se>
278 * bus/driver.c: (bus_driver_handle_service_exists):
279 Don't unref the incoming message.
281 2003-02-02 Anders Carlsson <andersca@codefactory.se>
283 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
285 2003-02-02 Anders Carlsson <andersca@codefactory.se>
287 * dbus/dbus-server.c: (dbus_server_listen):
288 * dbus/dbus-transport.c: (_dbus_transport_open):
289 ifdef out the calls to the debug transport and server.
291 2003-02-02 Alexander Larsson <alexl@redhat.com>
293 * dbus/dbus-watch.c (dbus_watch_get_flags):
294 Add note in the docs that ERROR or HANGUP won't be returned
295 and are assumed always on.
297 * glib/dbus-gmain.c (add_watch):
298 Always add IO_ERR | IO_HUP
300 * dbus/dbus-message.h:
301 Add semicolon after dbus_message_iter_get_string_array().
302 Makes qt code build again
304 2003-02-01 Anders Carlsson <andersca@codefactory.se>
306 * bus/driver.c: (create_unique_client_name),
307 (bus_driver_handle_hello):
308 Don't take a name, just use a numeric id to identify
312 * dbus/dbus-bus.c: (dbus_bus_register_client),
313 (dbus_bus_acquire_service), (dbus_bus_service_exists):
315 Add new convenience functions for communicating with the bus.
317 * dbus/dbus-message.h:
319 * dbus/dbus-protocol.h:
322 2003-02-01 Alexander Larsson <alexl@redhat.com>
324 * dbus/dbus-message.c (dbus_message_append_fields):
325 Add some more doc comments.
327 2003-02-01 Havoc Pennington <hp@pobox.com>
329 * dbus/dbus-break-loader.c (randomly_modify_length): change
330 a 4-byte value in the message as if it were a length
332 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
333 execute bit on saved files
335 2003-02-01 Havoc Pennington <hp@pobox.com>
337 * dbus/dbus-break-loader.c (main): new program to find messages
338 that break the loader.
340 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
341 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
343 * dbus/dbus-string.c (_dbus_string_set_byte): new
345 2003-01-31 Havoc Pennington <hp@pobox.com>
347 * dbus/dbus-message.c: refactor the test code to be more general,
348 in preparation for writing a "randomly permute test cases to
349 try to break the loader" program.
351 2003-01-31 Havoc Pennington <hp@pobox.com>
353 * doc/dbus-specification.sgml: work on the specification
355 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
356 the protocol version of the message.
358 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
359 no longer specifies that.
360 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
363 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
364 "break" for DBUS_TYPE_NIL, remove @todo
366 2003-01-31 Havoc Pennington <hp@pobox.com>
368 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
369 just set_is_error/get_is_error as this is a commonly-used
370 function, and write docs.
372 2003-01-31 Anders Carlsson <andersca@codefactory.se>
374 * dbus/dbus-address.c: (dbus_address_entry_free):
375 Free key and value lists.
377 * dbus/dbus-internals.c: (_dbus_type_to_string):
378 Add the types we didn't have.
380 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
381 (_dbus_marshal_validate_arg):
384 * dbus/dbus-message.c: (dbus_message_set_sender):
385 Remove todo about being able to set sender to NULL.
387 (dbus_message_set_is_error_reply),
388 (dbus_message_get_is_error_reply):
389 * dbus/dbus-message.h:
392 * dbus/dbus-protocol.h:
393 Add error reply flag.
395 * test/data/valid-messages/opposite-endian.message:
396 Add NIL type to test.
398 2003-01-31 Havoc Pennington <hp@pobox.com>
400 * doc/dbus-specification.sgml: fully specify the header. Add
401 flags and major protocol version, and change header/body len to
404 * dbus/dbus-message-builder.c (append_saved_length): append length
407 * dbus/dbus-message.c (dbus_message_create_header): change header
408 length and body length to unsigned. Add the new fields from the
410 (_dbus_message_loader_return_buffer): unsigned header/body len
412 2003-01-30 Havoc Pennington <hp@pobox.com>
414 * dbus/dbus-auth.c: rework to use only REJECTED, no
417 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
418 use REJECTED, suggested by Mark McLoughlin
420 2003-01-30 Havoc Pennington <hp@pobox.com>
422 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
423 a better way to report errors here. e.g. "unix address lacks
424 path" or something. also "no such file" when the path doesn't
427 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
429 (dbus_parse_address): add @todo about documenting address format,
430 and allowing , and ; to be escaped
432 2003-01-30 Anders Carlsson <andersca@codefactory.se>
435 Add dbus-address.[ch]
437 * dbus/dbus-address.c: (dbus_address_entry_free),
438 (dbus_address_entries_free), (create_entry),
439 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
440 (dbus_parse_address), (_dbus_address_test):
441 * dbus/dbus-address.h:
442 New files for dealing with address parsing.
444 * dbus/dbus-connection.c:
445 Document timeout functions.
447 * dbus/dbus-message.c:
448 Document dbus_message_new_from_message.
450 * dbus/dbus-server-debug.c:
453 * dbus/dbus-server.c: (dbus_server_listen):
454 Parse address and use correct server implementation.
456 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
457 * dbus/dbus-string.h:
458 New function with test.
460 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
464 * dbus/dbus-transport-debug.c:
467 * dbus/dbus-transport.c: (_dbus_transport_open):
468 Parse address and use correct transport implementation.
470 2003-01-30 Havoc Pennington <hp@pobox.com>
472 * dbus/dbus-message.c: use message->byte_order instead of
473 DBUS_COMPILER_BYTE_ORDER throughout.
474 (dbus_message_create_header): pad header to align the
475 start of the body of the message to 8-byte boundary
477 * dbus/dbus-marshal.h: make all the demarshalers take const
478 DBusString arguments.
480 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
481 validate message args here, so we don't have to do slow validation
482 later, and so we catch bad messages as they are incoming. Also add
483 better checks on header_len and body_len. Also fill in
486 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
487 implemented properly)
488 (_dbus_string_validate_nul): new function to check all-nul
490 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
491 get_arg_end_pos and remove all validation
492 (_dbus_marshal_validate_arg): actually do validation here.
494 2003-01-29 Havoc Pennington <hp@pobox.com>
496 * dbus/dbus-message.c (check_message_handling): fix assertion
497 failure on set_client_serial
499 2003-01-28 Havoc Pennington <hp@pobox.com>
501 * dbus/dbus-server-debug.c: Add doc section comments
503 * dbus/dbus-transport-debug.c: add doc section comments
505 2003-01-28 Havoc Pennington <hp@redhat.com>
507 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
508 the reverse order from how I had it
509 (_dbus_string_base64_encode): reverse encoding order. I was
510 basically byteswapping everything during encoding.
512 2003-01-28 Anders Carlsson <andersca@codefactory.se>
514 * dbus/dbus-connection-internal.h:
515 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
516 (_dbus_connection_remove_timeout):
517 Add functions for adding and removing timeouts.
519 * dbus/dbus-message.c: (dbus_message_new_from_message):
520 Add new function that takes a message and creates an exact
521 copy of it, but with the refcount set to 1.
522 (check_message_handling):
525 * dbus/dbus-server-protected.h:
526 * dbus/dbus-server.c: (_dbus_server_init_base),
527 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
528 (dbus_server_set_timeout_functions):
529 (_dbus_server_remove_timeout):
530 New functions so that a server can add and remove timeouts.
532 (dbus_server_listen):
533 Add commented out call to dbus_server_debug_new.
535 * dbus/dbus-timeout.c: (_dbus_timeout_new):
536 Actually set the handler, doh.
538 * dbus/dbus-transport.c: (_dbus_transport_open):
539 Add commented out call to dbus_transport_debug_client_new.
542 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
544 2003-01-28 Havoc Pennington <hp@pobox.com>
546 * dbus/dbus-message.c (check_message_handling): function to check
547 on the loaded message, iterates over it etc.
549 2003-01-28 Havoc Pennington <hp@pobox.com>
551 * test/Makefile.am (dist-hook): fix make distdir
553 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
555 2003-01-27 Havoc Pennington <hp@pobox.com>
557 * dbus/dbus-mempool.c (time_for_size): replace printf with
560 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
561 empty lines; fix the SAVE_LENGTH stuff to be
562 START_LENGTH/END_LENGTH so it actually works; couple other
565 * test/Makefile.am (dist-hook): add dist-hook for .message files
567 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
568 can be constant or locked.
569 (_dbus_string_free): allow freeing a const string as
572 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
574 * dbus/dbus-test-main.c (main): take an argument which is the
575 directory containing test data
577 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
578 argument to this and load all the messages in test/data/
579 checking that they can be loaded or not loaded as appropriate.
581 2003-01-27 Anders Carlsson <andersca@codefactory.se>
583 * bus/dispatch.c: (bus_dispatch_message_handler):
584 Dispatch messages sent to services.
586 * bus/driver.c: (bus_driver_send_service_deleted),
587 (bus_driver_send_service_created), (bus_driver_send_service_lost),
588 (bus_driver_send_service_acquired):
589 Add helper functions for sending service related messages.
591 (bus_driver_send_welcome_message):
592 Send HELLO_REPLY instead of WELCOME.
594 (bus_driver_handle_list_services):
595 Send LIST_SERVICES_REPLY instead of SERVICES.
597 (bus_driver_handle_own_service),
598 (bus_driver_handle_service_exists):
599 New message handlers.
601 (bus_driver_handle_message):
602 Invoke new message handlers.
604 (bus_driver_remove_connection):
605 Don't remove any services here since that's done automatically
606 by bus_service_remove_owner now.
609 New function signatures.
611 * bus/services.c: (bus_service_add_owner):
612 Send ServiceAcquired message if we're the only primary owner.
614 (bus_service_remove_owner):
615 Send ServiceAcquired/ServiceLost messages.
617 (bus_service_set_prohibit_replacement),
618 (bus_service_get_prohibit_replacement):
619 Functions for setting prohibit replacement.
621 (bus_service_has_owner):
622 New function that checks if a connection is in the owner queue of
626 Add new function signatures.
628 * dbus/dbus-list.c: (_dbus_list_test):
629 Add tests for _dbus_list_remove_last and traversing the list backwards.
632 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
633 go any further, so return NULL then.
635 * dbus/dbus-protocol.h:
636 Add new messages, service flags and service replies.
638 2003-01-26 Havoc Pennington <hp@pobox.com>
640 * dbus/dbus-message-builder.c: implement, completely untested.
642 * test/data/*: add data to be used in testing.
643 ".message" files are our simple loadable text format.
644 ".message-raw" will be binary dumps of messages.
646 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
648 2003-01-26 Havoc Pennington <hp@pobox.com>
650 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
652 * dbus/dbus-errors.c (dbus_result_to_string): add
655 * dbus/dbus-message-builder.c: new file, will contain code to load
656 up messages from files. Not implemented yet.
658 2003-01-26 Havoc Pennington <hp@pobox.com>
660 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
661 the sender by setting to NULL
663 2003-01-26 Havoc Pennington <hp@pobox.com>
665 The unit tests pass, but otherwise untested. If it breaks, the
666 tests should have been better. ;-)
668 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
671 * dbus/dbus-message.c: redo everything so we maintain
672 message->header as the only copy of the various fields.
673 This avoids the possibility of out-of-memory in some cases,
674 for example dbus_message_lock() can't run out of memory anymore,
675 and avoids extra copying. Figured I may as well go ahead and do
676 this since it was busted for dbus_message_lock to not return
677 failure on OOM, and dbus_message_write_header was totally
678 unchecked for OOM. Also fixed some random other bugs.
680 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
681 that strings are nul-terminated. Also, end_pos can be equal
682 to string length just not greater than, I think.
683 (_dbus_marshal_set_int32): new function
684 (_dbus_marshal_set_uint32): new function
685 (_dbus_marshal_set_string): new function
687 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
688 a warning, init timeout_list to NULL
689 (dbus_connection_send_message): don't use uninitialized variable
692 * dbus/dbus-string.c (_dbus_string_replace_len): new function
694 2003-01-26 Anders Carlsson <andersca@codefactory.se>
696 * bus/driver.c: (bus_driver_handle_hello),
697 (bus_driver_send_welcome_message):
700 2003-01-26 Anders Carlsson <andersca@codefactory.se>
702 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
703 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
704 (dbus_connection_unref):
705 * dbus/dbus-marshal.c: (_dbus_marshal_test):
706 * dbus/dbus-message.c: (dbus_message_unref),
709 (dbus_message_get_fields):
710 Remove debugging printout.
712 (_dbus_message_loader_return_buffer):
713 Don't store the header string.
715 (_dbus_message_test):
718 2003-01-26 Richard Hult <rhult@codefactory.se>
720 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
721 the file descriptor list, since it can change under us.
723 2003-01-25 Anders Carlsson <andersca@codefactory.se>
725 * glib/dbus-gmain.c: (dbus_connection_prepare),
726 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
727 (remove_watch), (dbus_connection_hookup_with_g_main):
728 Rewrite the glib handling to use its own GSource instead of a
729 GIOChannel so we can catch messages put in the queue while waiting
732 2003-01-25 Anders Carlsson <andersca@codefactory.se>
735 * bus/connection.c: (connection_disconnect_handler),
736 (connection_watch_callback), (bus_connection_setup):
737 * bus/dispatch.c: (send_one_message),
738 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
739 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
741 * bus/driver.c: (bus_driver_send_service_deleted),
742 (bus_driver_send_service_created), (bus_driver_handle_hello),
743 (bus_driver_send_welcome_message),
744 (bus_driver_handle_list_services), (bus_driver_remove_connection),
745 (bus_driver_handle_message):
747 Refactor code, put the message dispatching in its own file. Use
748 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
751 2003-01-25 Anders Carlsson <andersca@codefactory.se>
753 * dbus/dbus-internals.h:
754 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
756 * dbus/dbus-message.c: (dbus_message_get_sender):
757 * dbus/dbus-message.h:
758 Implement dbus_message_get_sender.
760 * dbus/dbus-protocol.h:
761 Add message and service defines.
763 2003-01-25 Anders Carlsson <andersca@codefactory.se>
765 * dbus/dbus-connection.c: (dbus_connection_send_message):
766 * dbus/dbus-message-internal.h:
767 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
768 (dbus_message_write_header):
769 Remove _dbus_messag_unlock and don't set the client serial on a
770 message if one already exists.
772 2003-01-24 Havoc Pennington <hp@pobox.com>
774 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
777 * bus/driver.c (bus_driver_handle_list_services): fix a leak
780 2003-01-25 Anders Carlsson <andersca@codefactory.se>
782 * dbus/dbus-list.c: (alloc_link), (free_link):
783 Use a memory pool for the links.
785 2003-01-25 Anders Carlsson <andersca@codefactory.se>
787 * bus/connection.c: (bus_connection_foreach):
789 Add new bus_connection_foreach function.
791 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
792 Add function that broadcasts a message to all clients.
794 (bus_driver_send_service_created), (bus_driver_handle_hello),
795 (bus_driver_send_welcome_message),
796 (bus_driver_handle_list_services), (bus_driver_message_handler):
797 Implement functions that take care of listing services, and notifying
798 clients when new services are created.
800 * bus/services.c: (bus_services_list):
802 Add new function that returns an array of strings with the currently
807 Update copyright year.
809 2003-01-25 Anders Carlsson <andersca@codefactory.se>
811 * dbus/dbus-connection.c: (dbus_connection_send_message):
812 Unlock the message in case it was sent earlier.
814 (dbus_connection_send_message_with_reply_and_block):
815 Remove the reply message from the list.
817 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
818 Set array_len and new_pos correctly.
820 (_dbus_marshal_test):
823 * dbus/dbus-message-internal.h:
824 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
825 New function that returns the reply serial.
827 (_dbus_message_unlock):
828 New function that unlocks a message and resets its header.
830 (dbus_message_append_string_array),
831 (dbus_message_get_fields_valist),
832 (dbus_message_iter_get_field_type),
833 (dbus_message_iter_get_string_array),
834 (dbus_message_get_fields),
835 (dbus_message_append_fields_valist):
836 Handle string arrays.
838 (dbus_message_set_sender):
839 Make this function public since the bus daemon needs it.
841 (decode_header_data):
842 Set the reply serial to -1 initially.
844 * dbus/dbus-message.h:
845 Add dbus_message_set_sender.
847 2003-01-24 Havoc Pennington <hp@pobox.com>
849 * doc/dbus-specification.sgml: add some stuff
851 2003-01-22 Havoc Pennington <hp@pobox.com>
853 * doc/dbus-specification.sgml: Start to document the protocol.
855 2003-01-22 Havoc Pennington <hp@pobox.com>
857 * dbus/dbus-connection.c
858 (dbus_connection_send_message_with_reply_and_block): add some @todo
860 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
862 2003-01-21 Havoc Pennington <hp@pobox.com>
864 (patch untested because can't compile)
866 * bus/driver.c (create_unique_client_name): make this function
867 never recycle client names. Also, caller should initialize
870 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
872 2003-01-21 Anders Carlsson <andersca@codefactory.se>
874 * dbus/dbus-marshal.c: (_dbus_marshal_double),
875 (_dbus_marshal_int32), (_dbus_marshal_uint32),
876 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
877 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
878 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
879 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
880 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
881 * dbus/dbus-marshal.h:
882 * dbus/dbus-protocol.h:
883 Add support for marshalling and demarshalling integer, double
886 2003-01-21 Anders Carlsson <andersca@codefactory.se>
891 * bus/connection.c: (connection_disconnect_handler):
892 Remove the connection from the bus driver's list.
894 (connection_watch_callback): Dispatch messages.
896 (free_connection_data): Free connection name.
898 (bus_connection_setup): Add connection to the bus driver's list.
899 (bus_connection_remove_owned_service):
900 (bus_connection_set_name), (bus_connection_get_name):
901 Add functions for setting and getting the connection's name.
904 Add function headers.
906 * bus/driver.c: (create_unique_client_name),
907 (bus_driver_handle_hello_message),
908 (bus_driver_send_welcome_message), (bus_driver_message_handler),
909 (bus_driver_add_connection), (bus_driver_remove_connection):
912 * bus/services.c: (bus_service_free):
914 New file that handles communication and registreation with the bus
917 2003-01-21 Anders Carlsson <andersca@codefactory.se>
919 * dbus/dbus-connection.c: (dbus_connection_send_message):
920 Add a new client_serial parameter.
922 (dbus_connection_send_message_with_reply):
923 Remove a @todo since we've implemented the blocking function.
925 (dbus_connection_send_message_with_reply_and_block):
926 New function that sends a message and waits for a reply and
927 then returns the reply.
929 * dbus/dbus-connection.h:
932 * dbus/dbus-errors.c: (dbus_result_to_string):
933 * dbus/dbus-errors.h:
936 * dbus/dbus-message-internal.h:
937 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
938 (_dbus_message_set_sender), (dbus_message_write_header),
939 (dbus_message_new_reply), (decode_header_data),
940 (_dbus_message_loader_return_buffer), (_dbus_message_test):
941 * dbus/dbus-message.h:
942 Add new functions that set the reply serial and sender.
943 Also marshal and demarshal them correctly and add test.
945 * dbus/dbus-protocol.h:
946 Add new DBUS_MESSAGE_TYPE_SENDER.
949 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
950 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
951 (dbus_connection_hookup_with_g_main):
952 * glib/test-dbus-glib.c: (main):
953 Rewrite to use GIOChannel and remove the GSource crack.
955 * test/echo-client.c: (main):
956 * test/watch.c: (check_messages):
957 Update for changed APIs
959 2003-01-19 Anders Carlsson <andersca@codefactory.se>
961 * dbus/Makefile.am: Add dbus-timeout.[cħ]
963 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
964 Create a DBusTimeoutList.
965 (dbus_connection_set_timeout_functions): Add new function to
966 set timeout callbacks
968 * dbus/dbus-connection.h: Add public DBusTimeout API.
970 * dbus/dbus-message.c: (dbus_message_get_service):
971 * dbus/dbus-message.h: New function.
973 * dbus/dbus-server.c: Fix small doc typo.
975 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
977 2003-01-19 Anders Carlsson <andersca@codefactory.se>
979 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
980 of the string, just as long as specified.
982 2003-01-19 Havoc Pennington <hp@pobox.com>
984 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
987 * dbus/dbus-server.c (dbus_server_set_max_connections)
988 (dbus_server_get_max_connections, dbus_server_get_n_connections):
989 keep track of current number of connections, and add API for
990 setting a max (but haven't implemented enforcing the max yet)
992 2003-01-18 Havoc Pennington <hp@pobox.com>
994 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
995 reading/writing if read_watch != NULL or write_watch != NULL.
997 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
998 the message loader code to actually load message->header and
999 message->body into the newly-created message.
1001 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1004 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1005 (dbus_connection_get_max_message_size)
1006 (dbus_connection_set_max_live_messages_size)
1007 (dbus_connection_get_max_live_messages_size): implement some
1008 resource limitation functions
1010 * dbus/dbus-resources.c: new file implementing some of the
1011 resource limits stuff
1013 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1014 missing docs, add @todo to handle OOM etc.
1016 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1019 2003-01-18 Havoc Pennington <hp@pobox.com>
1021 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1022 connection if it hasn't been already.
1024 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1025 replace with DisconnectFunction.
1027 2003-01-18 Havoc Pennington <hp@pobox.com>
1029 Building --disable-verbose-mode --disable-asserts --disable-tests
1030 cuts the library from 112K to 45K or so
1032 * configure.in: check for varargs macro support,
1033 add --enable-verbose-mode, --enable-asserts.
1035 * dbus/dbus-internals.h (_dbus_assert): support
1037 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1039 2003-01-18 Havoc Pennington <hp@pobox.com>
1041 * dbus/dbus-test.c: include config.h so that tests actually run
1043 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1044 so the failure mode when that assumption fails will be plenty
1047 2003-01-18 Havoc Pennington <hp@pobox.com>
1049 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1051 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1054 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1055 since we don't want to use those in make check
1057 2003-01-15 Havoc Pennington <hp@redhat.com>
1063 2003-01-15 Havoc Pennington <hp@redhat.com>
1065 * test/Makefile.am: fix so that test source code ends up in the
1066 distribution on make distcheck
1068 2003-01-15 Havoc Pennington <hp@redhat.com>
1074 2003-01-15 Havoc Pennington <hp@redhat.com>
1076 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1077 fix build when --disable-tests
1079 * Makefile.am (EXTRA_DIST): put HACKING in here
1081 * HACKING: document procedure for making a tarball release.
1083 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1085 * bus/connection.c: (connection_error_handler),
1086 (bus_connection_setup):
1087 * bus/main.c: (main):
1088 Make sure that the DBusConnectionData struct is NULLed
1089 out to prevent a segfault.
1091 * dbus/dbus-errors.c: (dbus_result_to_string):
1092 * dbus/dbus-errors.h:
1093 * dbus/dbus-message.c: (dbus_message_get_fields),
1094 (dbus_message_get_fields_valist), (_dbus_message_test):
1095 * dbus/dbus-message.h:
1096 Make dbus_message_get_fields return a result code so we can
1097 track invalid fields as well as oom.
1099 2003-01-11 Havoc Pennington <hp@pobox.com>
1101 * configure.in: change --enable-test/--enable-ansi action-if-given
1102 to enable_foo=$enableval instead of enable_foo=yes
1104 2003-01-08 Havoc Pennington <hp@pobox.com>
1106 * dbus/dbus-string.c (_dbus_string_align_length): new function
1108 * dbus/dbus-test-main.c: move main() for test app here
1110 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1111 symbol to run tests, because dbus-test isn't in the main
1114 Code review nitpicks.
1116 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1117 for people with narrow emacs ;-). Assert client_serial was filled
1118 in. Assert message->name != NULL.
1119 (dbus_message_append_fields): have "first_field_type" arg separate
1120 from va list, needed for C++ binding that also uses varargs IIRC
1121 and helps with type safety
1122 (dbus_message_new): add @todo about using DBusString to store
1123 service/name internally
1124 (dbus_message_new): don't leak ->service and ->name on OOM later
1126 (dbus_message_unref): free the service name
1127 (dbus_message_get_fields): same change to varargs
1128 i.e. first_field_type
1129 (_dbus_message_loader_return_buffer): assert that the message data
1130 is aligned (if not it's a bug in our code). Put in verbose griping
1131 about why we set corrupted = TRUE.
1132 (decode_header_data): add FIXME that char* is evil. Was going to
1133 add FIXME about evil locale-specific string.h strncmp, but just
1134 switched to wacky string-as-uint32 optimization. Move check for
1135 "no room for field name" above get_const_data_len() to avoid
1136 assertion failure in get_const_data_len if we have trailing 2
1137 bytes or the like. Check for service and name fields being
1138 provided twice. Don't leak service/name on error. Require field
1139 names to be aligned to 4 bytes.
1141 * dbus/dbus-marshal.c: move byte swap stuff to header
1142 (_dbus_pack_int32): uscore-prefix
1143 (_dbus_unpack_int32): uscore-prefix
1144 (_dbus_unpack_uint32): export
1145 (_dbus_demarshal_string): add @todo complaining about use of
1147 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1148 handling allowing corrupt data to go unchecked
1150 2003-01-08 Havoc Pennington <hp@redhat.com>
1152 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1153 to the select() as needed for authentication. (should be using
1154 _dbus_poll() not select, but for another day)
1156 * dbus/dbus.h: include dbus/dbus-protocol.h
1158 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1160 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1163 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1165 * dbus/dbus-internals.c: (_dbus_type_to_string):
1166 New function that returns a string describing a type.
1168 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1169 * dbus/dbus-marshal.h:
1170 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1171 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1172 (dbus_message_iter_get_byte_array):
1173 * dbus/dbus-message.h:
1174 Add new convenience functions for appending and getting message fields.
1175 Also add demarshalling routines for byte arrays.
1177 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1179 * dbus/dbus-connection-internal.h:
1180 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1181 (_dbus_connection_get_next_client_serial),
1182 (dbus_connection_send_message):
1183 * dbus/dbus-internals.h:
1184 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1185 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1186 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1187 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1188 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1189 (_dbus_verbose_bytes), (_dbus_marshal_test):
1190 * dbus/dbus-marshal.h:
1191 * dbus/dbus-message-internal.h:
1192 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1193 (dbus_message_write_header), (_dbus_message_lock),
1194 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1195 (dbus_message_get_name), (dbus_message_append_int32),
1196 (dbus_message_append_uint32), (dbus_message_append_double),
1197 (dbus_message_append_string), (dbus_message_append_byte_array),
1198 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1199 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1200 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1201 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1202 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1203 (decode_header_data), (_dbus_message_loader_return_buffer),
1204 (message_iter_test), (_dbus_message_test):
1205 * dbus/dbus-message.h:
1206 * dbus/dbus-protocol.h:
1207 * dbus/dbus-test.c: (main):
1209 * glib/test-dbus-glib.c: (message_handler), (main):
1210 * test/echo-client.c: (main):
1211 * test/watch.c: (check_messages):
1212 Make messages sendable and receivable for real.
1214 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1216 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1217 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1218 * dbus/dbus-message.c: (dbus_message_append_int32),
1219 (dbus_message_append_uint32), (dbus_message_append_double),
1220 (dbus_message_append_string), (dbus_message_append_byte_array):
1221 Handle OOM restoration.
1223 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1225 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1226 (_dbus_demarshal_string), (_dbus_marshal_test):
1227 * dbus/dbus-marshal.h:
1228 * dbus/dbus-message.c: (dbus_message_get_name),
1229 Document these functions.
1231 (dbus_message_append_int32), (dbus_message_append_uint32),
1232 (dbus_message_append_double), (dbus_message_append_string),
1233 (dbus_message_append_byte_array):
1234 * dbus/dbus-message.h:
1235 Add functions for adding message fields of different types.
1237 * dbus/dbus-protocol.h:
1238 Add the different types.
1240 2003-01-05 Havoc Pennington <hp@pobox.com>
1242 * bus/connection.c: implement routines for handling connections,
1243 first thing is keeping a list of owned services on each connection
1244 and setting up watches etc.
1246 * bus/services.c: implement a mapping from service names to lists
1249 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1251 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1252 to use static mutexes for global data
1254 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1255 collection of functions to set/get application-specific data
1256 on the DBusConnection.
1258 2003-01-04 Havoc Pennington <hp@pobox.com>
1260 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1261 (_dbus_poll): new function
1263 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1266 * bus/loop.c: initial code for the daemon main loop
1268 2003-01-04 Havoc Pennington <hp@pobox.com>
1270 * test/watch.c (error_handler): make it safe if the error handler
1271 is called multiple times (if we s/error handler/disconnect
1272 handler/ we should just guarantee it's called only once)
1274 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1275 error handler on disconnect (it's quite possible we should
1276 just change the error handler to a "disconnect handler," I'm
1277 not sure we have any other meaningful errors)
1279 * configure.in: check for getpwnam_r
1281 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1282 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1283 mechanism as in SASL spec, using socket credentials
1285 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1286 (_dbus_send_credentials_unix_socket): new function
1288 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1290 (_dbus_write): only check errno if <0 returned
1291 (_dbus_write_two): ditto
1293 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1295 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1296 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1297 (_dbus_marshal_test):
1298 * dbus/dbus-marshal.h:
1299 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1300 to _dbus_marshal_utf8_string. Also fix some tests.
1302 2002-12-28 Harri Porten <porten@kde.org>
1304 * configure.in: added check for C++ compiler and a very cheesy
1305 check for the Qt integration
1307 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1309 * qt/Makefile.am: added
1311 * qt/.cvsignore: added
1313 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1314 latter, added #ifdef QT_THREAD_SUPPORT guard.
1316 * dbus/Makefile.am: added missing headers for make dist
1318 2002-12-28 Kristian Rietveld <kris@gtk.org>
1320 * dbus/Makefile.am: fixup export-symbols-regex.
1322 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1324 * acinclude.m4: Add this file and put the
1325 PKG_CHECK_MODULE macro in it.
1327 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1329 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1330 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1331 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1332 (_dbus_marshal_test):
1333 Make the demarshalling routines align the pos argument.
1334 Add string marshalling tests and fix the obvious bugs
1337 2002-12-26 Havoc Pennington <hp@pobox.com>
1339 * dbus/dbus-auth.c: fixes fixes fixes
1341 * dbus/dbus-transport-unix.c: wire up support for
1342 encoding/decoding data on the wire
1344 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1345 (_dbus_auth_decode_data): append to target string
1346 instead of nuking it.
1348 2002-12-26 Havoc Pennington <hp@pobox.com>
1350 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1351 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1354 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1355 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1356 now). Main point is because I wanted unpack_uint32 to implement
1358 (_dbus_verbose_bytes): new function
1360 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1362 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1363 mechanism to handle a corrupt message stream
1364 (_dbus_message_loader_new): fix preallocation to only prealloc,
1367 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1368 (_dbus_string_test): enhance tests for copy/move and fix the
1371 * dbus/dbus-transport-unix.c: Hold references in more places to
1372 avoid reentrancy problems
1374 * dbus/dbus-transport.c: ditto
1376 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1377 leak reference count in no-message case
1379 * test/watch.c (do_mainloop): handle adding/removing watches
1380 during iteration over the watches. Also, ref the connection/server
1381 stored on a watch, so we don't try to mangle a destroyed one.
1383 * dbus/dbus-transport-unix.c (do_authentication): perform
1386 * dbus/dbus-auth.c (get_state): add a state
1387 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1388 (_dbus_auth_get_unused_bytes): append the unused bytes
1389 to the passed in string, rather than prepend
1391 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1392 the auth conversation DBusAuth
1394 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1395 (_dbus_transport_new_for_domain_socket): when creating a
1396 transport, pass in whether it's a client-side or server-side
1397 transport so we know which DBusAuth to create
1399 2002-12-03 Havoc Pennington <hp@pobox.com>
1401 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1402 _after_ finalizing the derived members
1403 (unix_connection_set): unref watch if we fail to add it
1405 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1406 transport first, so that the connection owned by the
1407 transport will be valid as the transport finalizes.
1409 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1410 if necessary, and remove watches from the connection.
1412 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1414 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1416 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1417 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1418 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1419 (_dbus_marshal_test):
1420 * dbus/dbus-marshal.h:
1421 Add string marshal functions and have the demarshal functions
1422 return the new position.
1424 2002-12-25 Havoc Pennington <hp@pobox.com>
1426 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1427 it is a simple protocol that just maps directly to SASL.
1429 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1430 initial implementation, not actually used yet.
1432 * dbus/dbus-string.c (_dbus_string_find): new function
1433 (_dbus_string_equal): new function
1434 (_dbus_string_base64_encode): new function
1435 (_dbus_string_base64_decode): new function
1437 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1440 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1441 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1442 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1443 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1444 * dbus/dbus-marshal.h:
1445 * dbus/dbus-protocol.h:
1446 * dbus/dbus-test.c: (main):
1448 Add un-optimized marshalling/demarshalling routines.
1450 2002-12-25 Harri Porten <porten@kde.org>
1452 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1454 2002-12-24 Zack Rusin <zack@kde.org>
1456 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1457 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1460 2002-12-24 Havoc Pennington <hp@pobox.com>
1462 * glib/dbus-gthread.c: fix include
1464 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1465 I think glib API needs to change, though, as you don't
1466 want to use DBusMessageFunction, you want to use the
1467 DBusMessageHandler object. Probably
1468 dbus_connection_open_with_g_main_loop()
1469 and dbus_connection_setup_g_main_loop() or something like that
1470 (but think of better names...) that just create a connection
1471 that has watch/timeout functions etc. already set up.
1473 * dbus/dbus-connection.c
1474 (dbus_connection_send_message_with_reply): new function just to
1475 show how the message handler helps us deal with replies.
1477 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1479 * dbus/dbus-string.c (_dbus_string_test): free a string that
1482 * dbus/dbus-hash.c: use memory pools for the hash entries
1483 (rebuild_table): be more paranoid about overflow, and
1484 shrink table when we can
1485 (_dbus_hash_test): reduce number of sprintfs and write
1486 valid C89. Add tests for case where we grow and then
1487 shrink the hash table.
1489 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1491 * dbus/dbus-connection.c (dbus_connection_register_handler)
1492 (dbus_connection_unregister_handler): new functions
1494 * dbus/dbus-message.c (dbus_message_get_name): new
1496 * dbus/dbus-list.c: fix docs typo
1498 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1499 an object representing a handler for messages.
1501 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1504 * glib/dbus-gthread.c: (dbus_gthread_init):
1505 Don't use the gdbus prefix for public functions.
1507 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1511 Add GLib checks and fixup .pc files
1515 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1516 (gdbus_connection_check), (gdbus_connection_dispatch),
1517 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1518 (dbus_connection_gsource_new):
1519 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1520 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1521 * glib/test-dbus-glib.c: (message_handler), (main):
1524 2002-12-15 Harri Porten <porten@kde.org>
1526 * autogen.sh: check for libtoolize before attempting to use it
1528 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1531 * .cvsignore: ignore more stamp files
1533 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1535 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1536 without make install.
1538 2002-12-15 Havoc Pennington <hp@pobox.com>
1540 * dbus/dbus-threads.c: add thread stubs that a higher library
1541 layer can fill in. e.g. the GLib wrapper might fill them in with
1542 GThread stuff. We still need to use this thread API to
1543 thread-safe-ize the library.
1545 2002-12-12 Havoc Pennington <hp@pobox.com>
1547 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1548 below new interfaces and include fewer system headers.
1550 * dbus/dbus-sysdeps.c (_dbus_read): new function
1551 (_dbus_write): new function
1552 (_dbus_write_two): new function
1553 (_dbus_connect_unix_socket): new function
1554 (_dbus_listen_unix_socket): new function
1556 * dbus/dbus-message-internal.h: change interfaces to use
1559 2002-12-11 Havoc Pennington <hp@pobox.com>
1561 * dbus/dbus-types.h: add dbus_unichar
1563 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1565 * dbus/dbus-connection.c (dbus_connection_send_message): return
1568 * dbus/dbus-transport.c: include dbus-watch.h
1570 * dbus/dbus-connection.c: include dbus-message-internal.h
1572 * HACKING: add file with coding guidelines stuff.
1574 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1575 handling here, for security purposes (as in vsftpd). Not actually
1576 using this class yet.
1578 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1579 system/libc usage here, as in vsftpd, for ease of auditing (and
1580 should also simplify portability). Haven't actually moved all the
1581 system/libc usage into here yet.
1583 2002-11-25 Havoc Pennington <hp@pobox.com>
1585 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1586 always print the first verbose message.
1588 2002-11-24 Havoc Pennington <hp@pobox.com>
1590 * test/echo-client.c, test/echo-server.c: cheesy test
1593 * configure.in (AC_CHECK_FUNCS): check for writev
1595 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1598 * dbus/dbus-list.c (_dbus_list_foreach): new function
1600 * dbus/dbus-internals.c (_dbus_verbose): new function
1602 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1603 representing a server that listens for connections.
1605 * dbus/.cvsignore: create
1607 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1608 public API for reporting errors
1610 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1611 public object representing a connection that
1612 sends/receives messages. (Same object used for
1613 both client and server.)
1615 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1616 Basic abstraction for different kinds of stream
1617 that we might read/write messages from.
1619 2002-11-23 Havoc Pennington <hp@pobox.com>
1621 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1624 * dbus/dbus-test.c (main): add list test, and include
1625 dbus-test.h as intended
1627 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1628 (_dbus_hash_table_remove_int): return value indicates
1629 whether the entry existed to remove
1631 * dbus/dbus-list.c: add linked list utility class,
1634 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1637 2002-11-23 Havoc Pennington <hp@pobox.com>
1639 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1640 DBUS_END_DECLS to nothing, that should fix this once and for all
1642 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1644 * dbus/dbus-message.c, dbus/dbus-hash.c:
1645 add some missing @brief
1647 2002-11-23 Havoc Pennington <hp@pobox.com>
1649 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1650 to avoid confusing Doxygen
1652 * dbus/dbus-hash.c: @} not }@
1654 * dbus/dbus-message.c (struct DBusMessage): split out
1657 2002-11-23 Havoc Pennington <hp@pobox.com>
1659 * configure.in: pile on more warning flags if using gcc
1661 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1662 to document static functions
1664 * configure.in: add summary to end of configure so it
1665 looks nice and attractive
1667 * dbus/dbus-hash.c: finish implementation and write unit
1670 * configure.in: add --enable-tests to enable unit tests
1672 * dbus/dbus-test.c: test program to run unit tests
1673 for all files in dbus/*, initially runs a test for
1676 * dbus/dbus-internals.h: file to hold some internal utility stuff
1678 2002-11-22 Havoc Pennington <hp@redhat.com>
1680 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1681 "ported" away from Tcl
1683 * dbus/dbus-types.h: header for types such as dbus_bool_t
1685 2002-11-22 Havoc Pennington <hp@redhat.com>
1687 * dbus/dbus.h: fixups for doc warnings
1689 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1691 (QUIET): make it quiet so we can see warnings
1693 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1695 2002-11-22 Havoc Pennington <hp@redhat.com>
1697 * Makefile.am: include "Doxyfile" target in all-local
1699 * configure.in: generate the Doxyfile
1701 * Doxyfile.in: move Doxyfile here, so we can use
1702 configure to generate a Doxyfile with the right
1705 2002-11-22 Havoc Pennington <hp@redhat.com>
1707 * dbus/dbus-message.c: move inline docs into .c file
1709 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1710 so all docs are under doc/
1711 (MAN_EXTENSION): generate man pages. Use extension
1712 ".3dbus" which matches ".3qt" on my system,
1713 I guess this is OK, I don't know really.
1714 (FILE_PATTERNS): look for .c files not .h, makes sense
1717 2002-11-22 Havoc Pennington <hp@pobox.com>
1719 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1720 because any app can be a server, and any app can be a client,
1721 the bus is a special kind of server.
1723 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1725 * Doxyfile : adding. Still needs Makefile rules to be generated
1726 automatically (just run "doxygen" in the toplevel dir for now to
1729 * dbus/dbus-message.h : Adding sample docs (javadoc since
1730 resembles gtk-doc a little more)
1732 * dbus/dbus.h : Adding sample docs
1734 2002-11-21 Havoc Pennington <hp@redhat.com>
1736 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1737 so we can allow ourselves to include files directly,
1738 instead of having to use dbus.h
1740 * dbus/dbus.h: fill in
1742 * dbus/dbus-message.h: sketch out a sample header file.
1743 Include griping if you include it directly instead of
1746 * dbus/dbus-macros.h: new file with macros for extern "C",
1747 TRUE/FALSE, NULL, etc.
1749 * doc/file-boilerplate.c: put include guards in here
1751 2002-11-21 Havoc Pennington <hp@redhat.com>
1753 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1755 * COPYING: include the GPL as well, and license code
1756 under both AFL and GPL.
1758 2002-11-21 Havoc Pennington <hp@redhat.com>
1760 * acconfig.h: get rid of this
1762 * autogen.sh (run_configure): add --no-configure option
1764 * configure.in: remove AC_ARG_PROGRAM to make
1765 autoconf complain less. add AC_PREREQ.
1766 add AC_DEFINE third arg.
1768 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1771 Fix references so we can distcheck.
1773 2002-11-21 Havoc Pennington <hp@redhat.com>
1775 * Initial module creation