1 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6 * bus/connection.c: (bus_connection_foreach):
9 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10 (unescape_string), (new_section), (parse_section_start),
11 (parse_key_value), (report_error), (bus_desktop_file_load),
12 (bus_desktop_file_get_string):
14 Use DBusError for error reporting.
16 * bus/dispatch.c: (send_one_message),
17 (bus_dispatch_message_handler):
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 * bus/loop.c: (bus_loop_run):
27 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
29 * bus/utils.c: (bus_wait_for_memory):
31 New files with general utility functions.
33 * dbus/dbus-internals.h:
34 Remove _DBUS_HANDLE_OOM.
36 2003-02-13 Anders Carlsson <andersca@codefactory.se>
38 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
39 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
41 Add DBusError structure.
43 2003-02-13 Anders Carlsson <andersca@codefactory.se>
45 * test/data/valid-messages/standard-acquire-service.message:
46 * test/data/valid-messages/standard-hello.message:
47 * test/data/valid-messages/standard-list-services.message:
48 * test/data/valid-messages/standard-service-exists.message:
49 Add some standard messages.
51 2003-02-13 Anders Carlsson <andersca@codefactory.se>
53 * bus/driver.c: (bus_driver_send_welcome_message),
54 (bus_driver_handle_list_services),
55 (bus_driver_handle_acquire_service),
56 (bus_driver_handle_service_exists), (bus_driver_handle_message):
57 Update for API changes in libdbus.
59 * dbus/dbus-message.c: (dbus_message_new_reply):
60 * dbus/dbus-message.h:
61 Remove the name argument. The spec states that replies shouldn't
64 2003-02-13 Anders Carlsson <andersca@codefactory.se>
66 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
67 (report_error), (bus_desktop_file_load), (lookup_section),
68 (lookup_line), (bus_desktop_file_get_raw),
69 (bus_desktop_file_get_string):
71 Some fixes, and new functions for getting a key value from a section.
73 2003-02-13 Havoc Pennington <hp@pobox.com>
75 * test/data/auth/fail-after-n-attempts.auth-script: new test
77 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
80 2003-02-13 Havoc Pennington <hp@pobox.com>
82 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
83 dbus_credentials_match were backward
85 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
86 NO_CREDENTIALS and ROOT_CREDENTIALS
88 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
89 into here. Never process more commands after we've reached an
90 end state; store further data as unused bytes.
92 * test/data/auth/*: add more auth tests
94 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
95 command to match exact string and EXPECT_UNUSED to match unused
98 * test/Makefile.am (dist-hook): fix to dist all the test stuff
100 2003-02-12 Havoc Pennington <hp@pobox.com>
102 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
103 \r off of popped lines
105 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
108 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
111 2003-02-12 Havoc Pennington <hp@pobox.com>
113 * dbus/Makefile.am: remove break-loader from the build, since it
116 * configure.in: add --enable-gcov to turn on coverage profiling
117 flags and disable optimization
119 2003-02-10 Havoc Pennington <hp@pobox.com>
121 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
122 initial cut at test framework for DBusAuth from laptop.
123 Doesn't quite work yet but it compiles and I need to get
124 it off the 266mhz laptop. ;-)
126 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
127 fix a memleak in error case
129 2003-02-12 Anders Carlsson <andersca@codefactory.se>
132 * bus/desktop-file.c:
133 * bus/desktop-file.h:
134 Add a desktop file parser.
136 2003-02-11 Zack Rusin <zack@kde.org>
138 * qt/message.[h|cpp]: sample implementation
139 of the KDE wrapper for DBusMessage
141 2003-02-09 Zack Rusin <zack@kde.org>
143 * test/bus-test.c: make_it_compile
144 * doc/dbus-specification.sgml: minimal semantic fix
146 2003-02-06 Anders Carlsson <andersca@codefactory.se>
152 2003-02-06 Anders Carlsson <andersca@codefactory.se>
155 * dbus/dbus-break-loader.c:
157 * test/break-loader.c:
158 Move dbus-break-loader to test/ and rename it to break-loader.
160 2003-02-02 Havoc Pennington <hp@pobox.com>
162 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
163 for code to manage cookies in your home directory
165 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
167 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
168 to authenticate, then disconnect the client.
170 2003-02-03 Alexander Larsson <alexl@redhat.com>
172 * dbus/dbus-message.c (dbus_message_append_fields):
175 2003-02-02 Anders Carlsson <andersca@codefactory.se>
177 * doc/dbus-specification.sgml:
178 Update address format section.
180 2003-02-02 Anders Carlsson <andersca@codefactory.se>
183 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
184 (message_handler), (new_connection_callback), (loop_quit),
188 2003-02-02 Anders Carlsson <andersca@codefactory.se>
190 * bus/driver.c: (bus_driver_handle_service_exists):
191 Simplify the code a bit.
193 * dbus/dbus-bus.c: (dbus_bus_service_exists):
196 2003-02-02 Anders Carlsson <andersca@codefactory.se>
199 Add libdbus-daemon.la and link to it.
201 2003-02-01 James Willcox <jwillcox@gnome.org>
203 * bus/driver.c: (bus_driver_handle_own_service):
204 Actually include the service reply code in the message.
206 2003-02-02 Anders Carlsson <andersca@codefactory.se>
208 * bus/driver.c: (bus_driver_handle_service_exists):
209 Don't unref the incoming message.
211 2003-02-02 Anders Carlsson <andersca@codefactory.se>
213 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
215 2003-02-02 Anders Carlsson <andersca@codefactory.se>
217 * dbus/dbus-server.c: (dbus_server_listen):
218 * dbus/dbus-transport.c: (_dbus_transport_open):
219 ifdef out the calls to the debug transport and server.
221 2003-02-02 Alexander Larsson <alexl@redhat.com>
223 * dbus/dbus-watch.c (dbus_watch_get_flags):
224 Add note in the docs that ERROR or HANGUP won't be returned
225 and are assumed always on.
227 * glib/dbus-gmain.c (add_watch):
228 Always add IO_ERR | IO_HUP
230 * dbus/dbus-message.h:
231 Add semicolon after dbus_message_iter_get_string_array().
232 Makes qt code build again
234 2003-02-01 Anders Carlsson <andersca@codefactory.se>
236 * bus/driver.c: (create_unique_client_name),
237 (bus_driver_handle_hello):
238 Don't take a name, just use a numeric id to identify
242 * dbus/dbus-bus.c: (dbus_bus_register_client),
243 (dbus_bus_acquire_service), (dbus_bus_service_exists):
245 Add new convenience functions for communicating with the bus.
247 * dbus/dbus-message.h:
249 * dbus/dbus-protocol.h:
252 2003-02-01 Alexander Larsson <alexl@redhat.com>
254 * dbus/dbus-message.c (dbus_message_append_fields):
255 Add some more doc comments.
257 2003-02-01 Havoc Pennington <hp@pobox.com>
259 * dbus/dbus-break-loader.c (randomly_modify_length): change
260 a 4-byte value in the message as if it were a length
262 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
263 execute bit on saved files
265 2003-02-01 Havoc Pennington <hp@pobox.com>
267 * dbus/dbus-break-loader.c (main): new program to find messages
268 that break the loader.
270 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
271 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
273 * dbus/dbus-string.c (_dbus_string_set_byte): new
275 2003-01-31 Havoc Pennington <hp@pobox.com>
277 * dbus/dbus-message.c: refactor the test code to be more general,
278 in preparation for writing a "randomly permute test cases to
279 try to break the loader" program.
281 2003-01-31 Havoc Pennington <hp@pobox.com>
283 * doc/dbus-specification.sgml: work on the specification
285 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
286 the protocol version of the message.
288 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
289 no longer specifies that.
290 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
293 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
294 "break" for DBUS_TYPE_NIL, remove @todo
296 2003-01-31 Havoc Pennington <hp@pobox.com>
298 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
299 just set_is_error/get_is_error as this is a commonly-used
300 function, and write docs.
302 2003-01-31 Anders Carlsson <andersca@codefactory.se>
304 * dbus/dbus-address.c: (dbus_address_entry_free):
305 Free key and value lists.
307 * dbus/dbus-internals.c: (_dbus_type_to_string):
308 Add the types we didn't have.
310 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
311 (_dbus_marshal_validate_arg):
314 * dbus/dbus-message.c: (dbus_message_set_sender):
315 Remove todo about being able to set sender to NULL.
317 (dbus_message_set_is_error_reply),
318 (dbus_message_get_is_error_reply):
319 * dbus/dbus-message.h:
322 * dbus/dbus-protocol.h:
323 Add error reply flag.
325 * test/data/valid-messages/opposite-endian.message:
326 Add NIL type to test.
328 2003-01-31 Havoc Pennington <hp@pobox.com>
330 * doc/dbus-specification.sgml: fully specify the header. Add
331 flags and major protocol version, and change header/body len to
334 * dbus/dbus-message-builder.c (append_saved_length): append length
337 * dbus/dbus-message.c (dbus_message_create_header): change header
338 length and body length to unsigned. Add the new fields from the
340 (_dbus_message_loader_return_buffer): unsigned header/body len
342 2003-01-30 Havoc Pennington <hp@pobox.com>
344 * dbus/dbus-auth.c: rework to use only REJECTED, no
347 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
348 use REJECTED, suggested by Mark McLoughlin
350 2003-01-30 Havoc Pennington <hp@pobox.com>
352 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
353 a better way to report errors here. e.g. "unix address lacks
354 path" or something. also "no such file" when the path doesn't
357 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
359 (dbus_parse_address): add @todo about documenting address format,
360 and allowing , and ; to be escaped
362 2003-01-30 Anders Carlsson <andersca@codefactory.se>
365 Add dbus-address.[ch]
367 * dbus/dbus-address.c: (dbus_address_entry_free),
368 (dbus_address_entries_free), (create_entry),
369 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
370 (dbus_parse_address), (_dbus_address_test):
371 * dbus/dbus-address.h:
372 New files for dealing with address parsing.
374 * dbus/dbus-connection.c:
375 Document timeout functions.
377 * dbus/dbus-message.c:
378 Document dbus_message_new_from_message.
380 * dbus/dbus-server-debug.c:
383 * dbus/dbus-server.c: (dbus_server_listen):
384 Parse address and use correct server implementation.
386 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
387 * dbus/dbus-string.h:
388 New function with test.
390 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
394 * dbus/dbus-transport-debug.c:
397 * dbus/dbus-transport.c: (_dbus_transport_open):
398 Parse address and use correct transport implementation.
400 2003-01-30 Havoc Pennington <hp@pobox.com>
402 * dbus/dbus-message.c: use message->byte_order instead of
403 DBUS_COMPILER_BYTE_ORDER throughout.
404 (dbus_message_create_header): pad header to align the
405 start of the body of the message to 8-byte boundary
407 * dbus/dbus-marshal.h: make all the demarshalers take const
408 DBusString arguments.
410 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
411 validate message args here, so we don't have to do slow validation
412 later, and so we catch bad messages as they are incoming. Also add
413 better checks on header_len and body_len. Also fill in
416 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
417 implemented properly)
418 (_dbus_string_validate_nul): new function to check all-nul
420 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
421 get_arg_end_pos and remove all validation
422 (_dbus_marshal_validate_arg): actually do validation here.
424 2003-01-29 Havoc Pennington <hp@pobox.com>
426 * dbus/dbus-message.c (check_message_handling): fix assertion
427 failure on set_client_serial
429 2003-01-28 Havoc Pennington <hp@pobox.com>
431 * dbus/dbus-server-debug.c: Add doc section comments
433 * dbus/dbus-transport-debug.c: add doc section comments
435 2003-01-28 Havoc Pennington <hp@redhat.com>
437 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
438 the reverse order from how I had it
439 (_dbus_string_base64_encode): reverse encoding order. I was
440 basically byteswapping everything during encoding.
442 2003-01-28 Anders Carlsson <andersca@codefactory.se>
444 * dbus/dbus-connection-internal.h:
445 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
446 (_dbus_connection_remove_timeout):
447 Add functions for adding and removing timeouts.
449 * dbus/dbus-message.c: (dbus_message_new_from_message):
450 Add new function that takes a message and creates an exact
451 copy of it, but with the refcount set to 1.
452 (check_message_handling):
455 * dbus/dbus-server-protected.h:
456 * dbus/dbus-server.c: (_dbus_server_init_base),
457 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
458 (dbus_server_set_timeout_functions):
459 (_dbus_server_remove_timeout):
460 New functions so that a server can add and remove timeouts.
462 (dbus_server_listen):
463 Add commented out call to dbus_server_debug_new.
465 * dbus/dbus-timeout.c: (_dbus_timeout_new):
466 Actually set the handler, doh.
468 * dbus/dbus-transport.c: (_dbus_transport_open):
469 Add commented out call to dbus_transport_debug_client_new.
472 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
474 2003-01-28 Havoc Pennington <hp@pobox.com>
476 * dbus/dbus-message.c (check_message_handling): function to check
477 on the loaded message, iterates over it etc.
479 2003-01-28 Havoc Pennington <hp@pobox.com>
481 * test/Makefile.am (dist-hook): fix make distdir
483 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
485 2003-01-27 Havoc Pennington <hp@pobox.com>
487 * dbus/dbus-mempool.c (time_for_size): replace printf with
490 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
491 empty lines; fix the SAVE_LENGTH stuff to be
492 START_LENGTH/END_LENGTH so it actually works; couple other
495 * test/Makefile.am (dist-hook): add dist-hook for .message files
497 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
498 can be constant or locked.
499 (_dbus_string_free): allow freeing a const string as
502 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
504 * dbus/dbus-test-main.c (main): take an argument which is the
505 directory containing test data
507 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
508 argument to this and load all the messages in test/data/
509 checking that they can be loaded or not loaded as appropriate.
511 2003-01-27 Anders Carlsson <andersca@codefactory.se>
513 * bus/dispatch.c: (bus_dispatch_message_handler):
514 Dispatch messages sent to services.
516 * bus/driver.c: (bus_driver_send_service_deleted),
517 (bus_driver_send_service_created), (bus_driver_send_service_lost),
518 (bus_driver_send_service_acquired):
519 Add helper functions for sending service related messages.
521 (bus_driver_send_welcome_message):
522 Send HELLO_REPLY instead of WELCOME.
524 (bus_driver_handle_list_services):
525 Send LIST_SERVICES_REPLY instead of SERVICES.
527 (bus_driver_handle_own_service),
528 (bus_driver_handle_service_exists):
529 New message handlers.
531 (bus_driver_handle_message):
532 Invoke new message handlers.
534 (bus_driver_remove_connection):
535 Don't remove any services here since that's done automatically
536 by bus_service_remove_owner now.
539 New function signatures.
541 * bus/services.c: (bus_service_add_owner):
542 Send ServiceAcquired message if we're the only primary owner.
544 (bus_service_remove_owner):
545 Send ServiceAcquired/ServiceLost messages.
547 (bus_service_set_prohibit_replacement),
548 (bus_service_get_prohibit_replacement):
549 Functions for setting prohibit replacement.
551 (bus_service_has_owner):
552 New function that checks if a connection is in the owner queue of
556 Add new function signatures.
558 * dbus/dbus-list.c: (_dbus_list_test):
559 Add tests for _dbus_list_remove_last and traversing the list backwards.
562 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
563 go any further, so return NULL then.
565 * dbus/dbus-protocol.h:
566 Add new messages, service flags and service replies.
568 2003-01-26 Havoc Pennington <hp@pobox.com>
570 * dbus/dbus-message-builder.c: implement, completely untested.
572 * test/data/*: add data to be used in testing.
573 ".message" files are our simple loadable text format.
574 ".message-raw" will be binary dumps of messages.
576 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
578 2003-01-26 Havoc Pennington <hp@pobox.com>
580 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
582 * dbus/dbus-errors.c (dbus_result_to_string): add
585 * dbus/dbus-message-builder.c: new file, will contain code to load
586 up messages from files. Not implemented yet.
588 2003-01-26 Havoc Pennington <hp@pobox.com>
590 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
591 the sender by setting to NULL
593 2003-01-26 Havoc Pennington <hp@pobox.com>
595 The unit tests pass, but otherwise untested. If it breaks, the
596 tests should have been better. ;-)
598 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
601 * dbus/dbus-message.c: redo everything so we maintain
602 message->header as the only copy of the various fields.
603 This avoids the possibility of out-of-memory in some cases,
604 for example dbus_message_lock() can't run out of memory anymore,
605 and avoids extra copying. Figured I may as well go ahead and do
606 this since it was busted for dbus_message_lock to not return
607 failure on OOM, and dbus_message_write_header was totally
608 unchecked for OOM. Also fixed some random other bugs.
610 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
611 that strings are nul-terminated. Also, end_pos can be equal
612 to string length just not greater than, I think.
613 (_dbus_marshal_set_int32): new function
614 (_dbus_marshal_set_uint32): new function
615 (_dbus_marshal_set_string): new function
617 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
618 a warning, init timeout_list to NULL
619 (dbus_connection_send_message): don't use uninitialized variable
622 * dbus/dbus-string.c (_dbus_string_replace_len): new function
624 2003-01-26 Anders Carlsson <andersca@codefactory.se>
626 * bus/driver.c: (bus_driver_handle_hello),
627 (bus_driver_send_welcome_message):
630 2003-01-26 Anders Carlsson <andersca@codefactory.se>
632 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
633 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
634 (dbus_connection_unref):
635 * dbus/dbus-marshal.c: (_dbus_marshal_test):
636 * dbus/dbus-message.c: (dbus_message_unref),
639 (dbus_message_get_fields):
640 Remove debugging printout.
642 (_dbus_message_loader_return_buffer):
643 Don't store the header string.
645 (_dbus_message_test):
648 2003-01-26 Richard Hult <rhult@codefactory.se>
650 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
651 the file descriptor list, since it can change under us.
653 2003-01-25 Anders Carlsson <andersca@codefactory.se>
655 * glib/dbus-gmain.c: (dbus_connection_prepare),
656 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
657 (remove_watch), (dbus_connection_hookup_with_g_main):
658 Rewrite the glib handling to use its own GSource instead of a
659 GIOChannel so we can catch messages put in the queue while waiting
662 2003-01-25 Anders Carlsson <andersca@codefactory.se>
665 * bus/connection.c: (connection_disconnect_handler),
666 (connection_watch_callback), (bus_connection_setup):
667 * bus/dispatch.c: (send_one_message),
668 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
669 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
671 * bus/driver.c: (bus_driver_send_service_deleted),
672 (bus_driver_send_service_created), (bus_driver_handle_hello),
673 (bus_driver_send_welcome_message),
674 (bus_driver_handle_list_services), (bus_driver_remove_connection),
675 (bus_driver_handle_message):
677 Refactor code, put the message dispatching in its own file. Use
678 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
681 2003-01-25 Anders Carlsson <andersca@codefactory.se>
683 * dbus/dbus-internals.h:
684 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
686 * dbus/dbus-message.c: (dbus_message_get_sender):
687 * dbus/dbus-message.h:
688 Implement dbus_message_get_sender.
690 * dbus/dbus-protocol.h:
691 Add message and service defines.
693 2003-01-25 Anders Carlsson <andersca@codefactory.se>
695 * dbus/dbus-connection.c: (dbus_connection_send_message):
696 * dbus/dbus-message-internal.h:
697 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
698 (dbus_message_write_header):
699 Remove _dbus_messag_unlock and don't set the client serial on a
700 message if one already exists.
702 2003-01-24 Havoc Pennington <hp@pobox.com>
704 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
707 * bus/driver.c (bus_driver_handle_list_services): fix a leak
710 2003-01-25 Anders Carlsson <andersca@codefactory.se>
712 * dbus/dbus-list.c: (alloc_link), (free_link):
713 Use a memory pool for the links.
715 2003-01-25 Anders Carlsson <andersca@codefactory.se>
717 * bus/connection.c: (bus_connection_foreach):
719 Add new bus_connection_foreach function.
721 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
722 Add function that broadcasts a message to all clients.
724 (bus_driver_send_service_created), (bus_driver_handle_hello),
725 (bus_driver_send_welcome_message),
726 (bus_driver_handle_list_services), (bus_driver_message_handler):
727 Implement functions that take care of listing services, and notifying
728 clients when new services are created.
730 * bus/services.c: (bus_services_list):
732 Add new function that returns an array of strings with the currently
737 Update copyright year.
739 2003-01-25 Anders Carlsson <andersca@codefactory.se>
741 * dbus/dbus-connection.c: (dbus_connection_send_message):
742 Unlock the message in case it was sent earlier.
744 (dbus_connection_send_message_with_reply_and_block):
745 Remove the reply message from the list.
747 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
748 Set array_len and new_pos correctly.
750 (_dbus_marshal_test):
753 * dbus/dbus-message-internal.h:
754 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
755 New function that returns the reply serial.
757 (_dbus_message_unlock):
758 New function that unlocks a message and resets its header.
760 (dbus_message_append_string_array),
761 (dbus_message_get_fields_valist),
762 (dbus_message_iter_get_field_type),
763 (dbus_message_iter_get_string_array),
764 (dbus_message_get_fields),
765 (dbus_message_append_fields_valist):
766 Handle string arrays.
768 (dbus_message_set_sender):
769 Make this function public since the bus daemon needs it.
771 (decode_header_data):
772 Set the reply serial to -1 initially.
774 * dbus/dbus-message.h:
775 Add dbus_message_set_sender.
777 2003-01-24 Havoc Pennington <hp@pobox.com>
779 * doc/dbus-specification.sgml: add some stuff
781 2003-01-22 Havoc Pennington <hp@pobox.com>
783 * doc/dbus-specification.sgml: Start to document the protocol.
785 2003-01-22 Havoc Pennington <hp@pobox.com>
787 * dbus/dbus-connection.c
788 (dbus_connection_send_message_with_reply_and_block): add some @todo
790 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
792 2003-01-21 Havoc Pennington <hp@pobox.com>
794 (patch untested because can't compile)
796 * bus/driver.c (create_unique_client_name): make this function
797 never recycle client names. Also, caller should initialize
800 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
802 2003-01-21 Anders Carlsson <andersca@codefactory.se>
804 * dbus/dbus-marshal.c: (_dbus_marshal_double),
805 (_dbus_marshal_int32), (_dbus_marshal_uint32),
806 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
807 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
808 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
809 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
810 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
811 * dbus/dbus-marshal.h:
812 * dbus/dbus-protocol.h:
813 Add support for marshalling and demarshalling integer, double
816 2003-01-21 Anders Carlsson <andersca@codefactory.se>
821 * bus/connection.c: (connection_disconnect_handler):
822 Remove the connection from the bus driver's list.
824 (connection_watch_callback): Dispatch messages.
826 (free_connection_data): Free connection name.
828 (bus_connection_setup): Add connection to the bus driver's list.
829 (bus_connection_remove_owned_service):
830 (bus_connection_set_name), (bus_connection_get_name):
831 Add functions for setting and getting the connection's name.
834 Add function headers.
836 * bus/driver.c: (create_unique_client_name),
837 (bus_driver_handle_hello_message),
838 (bus_driver_send_welcome_message), (bus_driver_message_handler),
839 (bus_driver_add_connection), (bus_driver_remove_connection):
842 * bus/services.c: (bus_service_free):
844 New file that handles communication and registreation with the bus
847 2003-01-21 Anders Carlsson <andersca@codefactory.se>
849 * dbus/dbus-connection.c: (dbus_connection_send_message):
850 Add a new client_serial parameter.
852 (dbus_connection_send_message_with_reply):
853 Remove a @todo since we've implemented the blocking function.
855 (dbus_connection_send_message_with_reply_and_block):
856 New function that sends a message and waits for a reply and
857 then returns the reply.
859 * dbus/dbus-connection.h:
862 * dbus/dbus-errors.c: (dbus_result_to_string):
863 * dbus/dbus-errors.h:
866 * dbus/dbus-message-internal.h:
867 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
868 (_dbus_message_set_sender), (dbus_message_write_header),
869 (dbus_message_new_reply), (decode_header_data),
870 (_dbus_message_loader_return_buffer), (_dbus_message_test):
871 * dbus/dbus-message.h:
872 Add new functions that set the reply serial and sender.
873 Also marshal and demarshal them correctly and add test.
875 * dbus/dbus-protocol.h:
876 Add new DBUS_MESSAGE_TYPE_SENDER.
879 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
880 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
881 (dbus_connection_hookup_with_g_main):
882 * glib/test-dbus-glib.c: (main):
883 Rewrite to use GIOChannel and remove the GSource crack.
885 * test/echo-client.c: (main):
886 * test/watch.c: (check_messages):
887 Update for changed APIs
889 2003-01-19 Anders Carlsson <andersca@codefactory.se>
891 * dbus/Makefile.am: Add dbus-timeout.[cħ]
893 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
894 Create a DBusTimeoutList.
895 (dbus_connection_set_timeout_functions): Add new function to
896 set timeout callbacks
898 * dbus/dbus-connection.h: Add public DBusTimeout API.
900 * dbus/dbus-message.c: (dbus_message_get_service):
901 * dbus/dbus-message.h: New function.
903 * dbus/dbus-server.c: Fix small doc typo.
905 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
907 2003-01-19 Anders Carlsson <andersca@codefactory.se>
909 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
910 of the string, just as long as specified.
912 2003-01-19 Havoc Pennington <hp@pobox.com>
914 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
917 * dbus/dbus-server.c (dbus_server_set_max_connections)
918 (dbus_server_get_max_connections, dbus_server_get_n_connections):
919 keep track of current number of connections, and add API for
920 setting a max (but haven't implemented enforcing the max yet)
922 2003-01-18 Havoc Pennington <hp@pobox.com>
924 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
925 reading/writing if read_watch != NULL or write_watch != NULL.
927 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
928 the message loader code to actually load message->header and
929 message->body into the newly-created message.
931 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
934 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
935 (dbus_connection_get_max_message_size)
936 (dbus_connection_set_max_live_messages_size)
937 (dbus_connection_get_max_live_messages_size): implement some
938 resource limitation functions
940 * dbus/dbus-resources.c: new file implementing some of the
941 resource limits stuff
943 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
944 missing docs, add @todo to handle OOM etc.
946 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
949 2003-01-18 Havoc Pennington <hp@pobox.com>
951 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
952 connection if it hasn't been already.
954 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
955 replace with DisconnectFunction.
957 2003-01-18 Havoc Pennington <hp@pobox.com>
959 Building --disable-verbose-mode --disable-asserts --disable-tests
960 cuts the library from 112K to 45K or so
962 * configure.in: check for varargs macro support,
963 add --enable-verbose-mode, --enable-asserts.
965 * dbus/dbus-internals.h (_dbus_assert): support
967 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
969 2003-01-18 Havoc Pennington <hp@pobox.com>
971 * dbus/dbus-test.c: include config.h so that tests actually run
973 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
974 so the failure mode when that assumption fails will be plenty
977 2003-01-18 Havoc Pennington <hp@pobox.com>
979 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
981 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
984 * test/Makefile.am: don't use special variable "TESTS" for echo-*
985 since we don't want to use those in make check
987 2003-01-15 Havoc Pennington <hp@redhat.com>
993 2003-01-15 Havoc Pennington <hp@redhat.com>
995 * test/Makefile.am: fix so that test source code ends up in the
996 distribution on make distcheck
998 2003-01-15 Havoc Pennington <hp@redhat.com>
1004 2003-01-15 Havoc Pennington <hp@redhat.com>
1006 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1007 fix build when --disable-tests
1009 * Makefile.am (EXTRA_DIST): put HACKING in here
1011 * HACKING: document procedure for making a tarball release.
1013 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1015 * bus/connection.c: (connection_error_handler),
1016 (bus_connection_setup):
1017 * bus/main.c: (main):
1018 Make sure that the DBusConnectionData struct is NULLed
1019 out to prevent a segfault.
1021 * dbus/dbus-errors.c: (dbus_result_to_string):
1022 * dbus/dbus-errors.h:
1023 * dbus/dbus-message.c: (dbus_message_get_fields),
1024 (dbus_message_get_fields_valist), (_dbus_message_test):
1025 * dbus/dbus-message.h:
1026 Make dbus_message_get_fields return a result code so we can
1027 track invalid fields as well as oom.
1029 2003-01-11 Havoc Pennington <hp@pobox.com>
1031 * configure.in: change --enable-test/--enable-ansi action-if-given
1032 to enable_foo=$enableval instead of enable_foo=yes
1034 2003-01-08 Havoc Pennington <hp@pobox.com>
1036 * dbus/dbus-string.c (_dbus_string_align_length): new function
1038 * dbus/dbus-test-main.c: move main() for test app here
1040 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1041 symbol to run tests, because dbus-test isn't in the main
1044 Code review nitpicks.
1046 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1047 for people with narrow emacs ;-). Assert client_serial was filled
1048 in. Assert message->name != NULL.
1049 (dbus_message_append_fields): have "first_field_type" arg separate
1050 from va list, needed for C++ binding that also uses varargs IIRC
1051 and helps with type safety
1052 (dbus_message_new): add @todo about using DBusString to store
1053 service/name internally
1054 (dbus_message_new): don't leak ->service and ->name on OOM later
1056 (dbus_message_unref): free the service name
1057 (dbus_message_get_fields): same change to varargs
1058 i.e. first_field_type
1059 (_dbus_message_loader_return_buffer): assert that the message data
1060 is aligned (if not it's a bug in our code). Put in verbose griping
1061 about why we set corrupted = TRUE.
1062 (decode_header_data): add FIXME that char* is evil. Was going to
1063 add FIXME about evil locale-specific string.h strncmp, but just
1064 switched to wacky string-as-uint32 optimization. Move check for
1065 "no room for field name" above get_const_data_len() to avoid
1066 assertion failure in get_const_data_len if we have trailing 2
1067 bytes or the like. Check for service and name fields being
1068 provided twice. Don't leak service/name on error. Require field
1069 names to be aligned to 4 bytes.
1071 * dbus/dbus-marshal.c: move byte swap stuff to header
1072 (_dbus_pack_int32): uscore-prefix
1073 (_dbus_unpack_int32): uscore-prefix
1074 (_dbus_unpack_uint32): export
1075 (_dbus_demarshal_string): add @todo complaining about use of
1077 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1078 handling allowing corrupt data to go unchecked
1080 2003-01-08 Havoc Pennington <hp@redhat.com>
1082 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1083 to the select() as needed for authentication. (should be using
1084 _dbus_poll() not select, but for another day)
1086 * dbus/dbus.h: include dbus/dbus-protocol.h
1088 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1090 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1093 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1095 * dbus/dbus-internals.c: (_dbus_type_to_string):
1096 New function that returns a string describing a type.
1098 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1099 * dbus/dbus-marshal.h:
1100 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1101 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1102 (dbus_message_iter_get_byte_array):
1103 * dbus/dbus-message.h:
1104 Add new convenience functions for appending and getting message fields.
1105 Also add demarshalling routines for byte arrays.
1107 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1109 * dbus/dbus-connection-internal.h:
1110 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1111 (_dbus_connection_get_next_client_serial),
1112 (dbus_connection_send_message):
1113 * dbus/dbus-internals.h:
1114 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1115 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1116 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1117 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1118 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1119 (_dbus_verbose_bytes), (_dbus_marshal_test):
1120 * dbus/dbus-marshal.h:
1121 * dbus/dbus-message-internal.h:
1122 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1123 (dbus_message_write_header), (_dbus_message_lock),
1124 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1125 (dbus_message_get_name), (dbus_message_append_int32),
1126 (dbus_message_append_uint32), (dbus_message_append_double),
1127 (dbus_message_append_string), (dbus_message_append_byte_array),
1128 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1129 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1130 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1131 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1132 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1133 (decode_header_data), (_dbus_message_loader_return_buffer),
1134 (message_iter_test), (_dbus_message_test):
1135 * dbus/dbus-message.h:
1136 * dbus/dbus-protocol.h:
1137 * dbus/dbus-test.c: (main):
1139 * glib/test-dbus-glib.c: (message_handler), (main):
1140 * test/echo-client.c: (main):
1141 * test/watch.c: (check_messages):
1142 Make messages sendable and receivable for real.
1144 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1146 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1147 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1148 * dbus/dbus-message.c: (dbus_message_append_int32),
1149 (dbus_message_append_uint32), (dbus_message_append_double),
1150 (dbus_message_append_string), (dbus_message_append_byte_array):
1151 Handle OOM restoration.
1153 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1155 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1156 (_dbus_demarshal_string), (_dbus_marshal_test):
1157 * dbus/dbus-marshal.h:
1158 * dbus/dbus-message.c: (dbus_message_get_name),
1159 Document these functions.
1161 (dbus_message_append_int32), (dbus_message_append_uint32),
1162 (dbus_message_append_double), (dbus_message_append_string),
1163 (dbus_message_append_byte_array):
1164 * dbus/dbus-message.h:
1165 Add functions for adding message fields of different types.
1167 * dbus/dbus-protocol.h:
1168 Add the different types.
1170 2003-01-05 Havoc Pennington <hp@pobox.com>
1172 * bus/connection.c: implement routines for handling connections,
1173 first thing is keeping a list of owned services on each connection
1174 and setting up watches etc.
1176 * bus/services.c: implement a mapping from service names to lists
1179 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1181 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1182 to use static mutexes for global data
1184 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1185 collection of functions to set/get application-specific data
1186 on the DBusConnection.
1188 2003-01-04 Havoc Pennington <hp@pobox.com>
1190 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1191 (_dbus_poll): new function
1193 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1196 * bus/loop.c: initial code for the daemon main loop
1198 2003-01-04 Havoc Pennington <hp@pobox.com>
1200 * test/watch.c (error_handler): make it safe if the error handler
1201 is called multiple times (if we s/error handler/disconnect
1202 handler/ we should just guarantee it's called only once)
1204 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1205 error handler on disconnect (it's quite possible we should
1206 just change the error handler to a "disconnect handler," I'm
1207 not sure we have any other meaningful errors)
1209 * configure.in: check for getpwnam_r
1211 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1212 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1213 mechanism as in SASL spec, using socket credentials
1215 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1216 (_dbus_send_credentials_unix_socket): new function
1218 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1220 (_dbus_write): only check errno if <0 returned
1221 (_dbus_write_two): ditto
1223 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1225 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1226 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1227 (_dbus_marshal_test):
1228 * dbus/dbus-marshal.h:
1229 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1230 to _dbus_marshal_utf8_string. Also fix some tests.
1232 2002-12-28 Harri Porten <porten@kde.org>
1234 * configure.in: added check for C++ compiler and a very cheesy
1235 check for the Qt integration
1237 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1239 * qt/Makefile.am: added
1241 * qt/.cvsignore: added
1243 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1244 latter, added #ifdef QT_THREAD_SUPPORT guard.
1246 * dbus/Makefile.am: added missing headers for make dist
1248 2002-12-28 Kristian Rietveld <kris@gtk.org>
1250 * dbus/Makefile.am: fixup export-symbols-regex.
1252 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1254 * acinclude.m4: Add this file and put the
1255 PKG_CHECK_MODULE macro in it.
1257 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1259 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1260 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1261 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1262 (_dbus_marshal_test):
1263 Make the demarshalling routines align the pos argument.
1264 Add string marshalling tests and fix the obvious bugs
1267 2002-12-26 Havoc Pennington <hp@pobox.com>
1269 * dbus/dbus-auth.c: fixes fixes fixes
1271 * dbus/dbus-transport-unix.c: wire up support for
1272 encoding/decoding data on the wire
1274 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1275 (_dbus_auth_decode_data): append to target string
1276 instead of nuking it.
1278 2002-12-26 Havoc Pennington <hp@pobox.com>
1280 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1281 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1284 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1285 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1286 now). Main point is because I wanted unpack_uint32 to implement
1288 (_dbus_verbose_bytes): new function
1290 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1292 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1293 mechanism to handle a corrupt message stream
1294 (_dbus_message_loader_new): fix preallocation to only prealloc,
1297 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1298 (_dbus_string_test): enhance tests for copy/move and fix the
1301 * dbus/dbus-transport-unix.c: Hold references in more places to
1302 avoid reentrancy problems
1304 * dbus/dbus-transport.c: ditto
1306 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1307 leak reference count in no-message case
1309 * test/watch.c (do_mainloop): handle adding/removing watches
1310 during iteration over the watches. Also, ref the connection/server
1311 stored on a watch, so we don't try to mangle a destroyed one.
1313 * dbus/dbus-transport-unix.c (do_authentication): perform
1316 * dbus/dbus-auth.c (get_state): add a state
1317 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1318 (_dbus_auth_get_unused_bytes): append the unused bytes
1319 to the passed in string, rather than prepend
1321 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1322 the auth conversation DBusAuth
1324 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1325 (_dbus_transport_new_for_domain_socket): when creating a
1326 transport, pass in whether it's a client-side or server-side
1327 transport so we know which DBusAuth to create
1329 2002-12-03 Havoc Pennington <hp@pobox.com>
1331 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1332 _after_ finalizing the derived members
1333 (unix_connection_set): unref watch if we fail to add it
1335 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1336 transport first, so that the connection owned by the
1337 transport will be valid as the transport finalizes.
1339 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1340 if necessary, and remove watches from the connection.
1342 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1344 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1346 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1347 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1348 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1349 (_dbus_marshal_test):
1350 * dbus/dbus-marshal.h:
1351 Add string marshal functions and have the demarshal functions
1352 return the new position.
1354 2002-12-25 Havoc Pennington <hp@pobox.com>
1356 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1357 it is a simple protocol that just maps directly to SASL.
1359 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1360 initial implementation, not actually used yet.
1362 * dbus/dbus-string.c (_dbus_string_find): new function
1363 (_dbus_string_equal): new function
1364 (_dbus_string_base64_encode): new function
1365 (_dbus_string_base64_decode): new function
1367 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1370 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1371 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1372 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1373 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1374 * dbus/dbus-marshal.h:
1375 * dbus/dbus-protocol.h:
1376 * dbus/dbus-test.c: (main):
1378 Add un-optimized marshalling/demarshalling routines.
1380 2002-12-25 Harri Porten <porten@kde.org>
1382 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1384 2002-12-24 Zack Rusin <zack@kde.org>
1386 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1387 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1390 2002-12-24 Havoc Pennington <hp@pobox.com>
1392 * glib/dbus-gthread.c: fix include
1394 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1395 I think glib API needs to change, though, as you don't
1396 want to use DBusMessageFunction, you want to use the
1397 DBusMessageHandler object. Probably
1398 dbus_connection_open_with_g_main_loop()
1399 and dbus_connection_setup_g_main_loop() or something like that
1400 (but think of better names...) that just create a connection
1401 that has watch/timeout functions etc. already set up.
1403 * dbus/dbus-connection.c
1404 (dbus_connection_send_message_with_reply): new function just to
1405 show how the message handler helps us deal with replies.
1407 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1409 * dbus/dbus-string.c (_dbus_string_test): free a string that
1412 * dbus/dbus-hash.c: use memory pools for the hash entries
1413 (rebuild_table): be more paranoid about overflow, and
1414 shrink table when we can
1415 (_dbus_hash_test): reduce number of sprintfs and write
1416 valid C89. Add tests for case where we grow and then
1417 shrink the hash table.
1419 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1421 * dbus/dbus-connection.c (dbus_connection_register_handler)
1422 (dbus_connection_unregister_handler): new functions
1424 * dbus/dbus-message.c (dbus_message_get_name): new
1426 * dbus/dbus-list.c: fix docs typo
1428 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1429 an object representing a handler for messages.
1431 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1434 * glib/dbus-gthread.c: (dbus_gthread_init):
1435 Don't use the gdbus prefix for public functions.
1437 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1441 Add GLib checks and fixup .pc files
1445 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1446 (gdbus_connection_check), (gdbus_connection_dispatch),
1447 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1448 (dbus_connection_gsource_new):
1449 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1450 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1451 * glib/test-dbus-glib.c: (message_handler), (main):
1454 2002-12-15 Harri Porten <porten@kde.org>
1456 * autogen.sh: check for libtoolize before attempting to use it
1458 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1461 * .cvsignore: ignore more stamp files
1463 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1465 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1466 without make install.
1468 2002-12-15 Havoc Pennington <hp@pobox.com>
1470 * dbus/dbus-threads.c: add thread stubs that a higher library
1471 layer can fill in. e.g. the GLib wrapper might fill them in with
1472 GThread stuff. We still need to use this thread API to
1473 thread-safe-ize the library.
1475 2002-12-12 Havoc Pennington <hp@pobox.com>
1477 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1478 below new interfaces and include fewer system headers.
1480 * dbus/dbus-sysdeps.c (_dbus_read): new function
1481 (_dbus_write): new function
1482 (_dbus_write_two): new function
1483 (_dbus_connect_unix_socket): new function
1484 (_dbus_listen_unix_socket): new function
1486 * dbus/dbus-message-internal.h: change interfaces to use
1489 2002-12-11 Havoc Pennington <hp@pobox.com>
1491 * dbus/dbus-types.h: add dbus_unichar
1493 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1495 * dbus/dbus-connection.c (dbus_connection_send_message): return
1498 * dbus/dbus-transport.c: include dbus-watch.h
1500 * dbus/dbus-connection.c: include dbus-message-internal.h
1502 * HACKING: add file with coding guidelines stuff.
1504 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1505 handling here, for security purposes (as in vsftpd). Not actually
1506 using this class yet.
1508 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1509 system/libc usage here, as in vsftpd, for ease of auditing (and
1510 should also simplify portability). Haven't actually moved all the
1511 system/libc usage into here yet.
1513 2002-11-25 Havoc Pennington <hp@pobox.com>
1515 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1516 always print the first verbose message.
1518 2002-11-24 Havoc Pennington <hp@pobox.com>
1520 * test/echo-client.c, test/echo-server.c: cheesy test
1523 * configure.in (AC_CHECK_FUNCS): check for writev
1525 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1528 * dbus/dbus-list.c (_dbus_list_foreach): new function
1530 * dbus/dbus-internals.c (_dbus_verbose): new function
1532 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1533 representing a server that listens for connections.
1535 * dbus/.cvsignore: create
1537 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1538 public API for reporting errors
1540 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1541 public object representing a connection that
1542 sends/receives messages. (Same object used for
1543 both client and server.)
1545 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1546 Basic abstraction for different kinds of stream
1547 that we might read/write messages from.
1549 2002-11-23 Havoc Pennington <hp@pobox.com>
1551 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1554 * dbus/dbus-test.c (main): add list test, and include
1555 dbus-test.h as intended
1557 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1558 (_dbus_hash_table_remove_int): return value indicates
1559 whether the entry existed to remove
1561 * dbus/dbus-list.c: add linked list utility class,
1564 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1567 2002-11-23 Havoc Pennington <hp@pobox.com>
1569 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1570 DBUS_END_DECLS to nothing, that should fix this once and for all
1572 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1574 * dbus/dbus-message.c, dbus/dbus-hash.c:
1575 add some missing @brief
1577 2002-11-23 Havoc Pennington <hp@pobox.com>
1579 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1580 to avoid confusing Doxygen
1582 * dbus/dbus-hash.c: @} not }@
1584 * dbus/dbus-message.c (struct DBusMessage): split out
1587 2002-11-23 Havoc Pennington <hp@pobox.com>
1589 * configure.in: pile on more warning flags if using gcc
1591 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1592 to document static functions
1594 * configure.in: add summary to end of configure so it
1595 looks nice and attractive
1597 * dbus/dbus-hash.c: finish implementation and write unit
1600 * configure.in: add --enable-tests to enable unit tests
1602 * dbus/dbus-test.c: test program to run unit tests
1603 for all files in dbus/*, initially runs a test for
1606 * dbus/dbus-internals.h: file to hold some internal utility stuff
1608 2002-11-22 Havoc Pennington <hp@redhat.com>
1610 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1611 "ported" away from Tcl
1613 * dbus/dbus-types.h: header for types such as dbus_bool_t
1615 2002-11-22 Havoc Pennington <hp@redhat.com>
1617 * dbus/dbus.h: fixups for doc warnings
1619 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1621 (QUIET): make it quiet so we can see warnings
1623 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1625 2002-11-22 Havoc Pennington <hp@redhat.com>
1627 * Makefile.am: include "Doxyfile" target in all-local
1629 * configure.in: generate the Doxyfile
1631 * Doxyfile.in: move Doxyfile here, so we can use
1632 configure to generate a Doxyfile with the right
1635 2002-11-22 Havoc Pennington <hp@redhat.com>
1637 * dbus/dbus-message.c: move inline docs into .c file
1639 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1640 so all docs are under doc/
1641 (MAN_EXTENSION): generate man pages. Use extension
1642 ".3dbus" which matches ".3qt" on my system,
1643 I guess this is OK, I don't know really.
1644 (FILE_PATTERNS): look for .c files not .h, makes sense
1647 2002-11-22 Havoc Pennington <hp@pobox.com>
1649 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1650 because any app can be a server, and any app can be a client,
1651 the bus is a special kind of server.
1653 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1655 * Doxyfile : adding. Still needs Makefile rules to be generated
1656 automatically (just run "doxygen" in the toplevel dir for now to
1659 * dbus/dbus-message.h : Adding sample docs (javadoc since
1660 resembles gtk-doc a little more)
1662 * dbus/dbus.h : Adding sample docs
1664 2002-11-21 Havoc Pennington <hp@redhat.com>
1666 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1667 so we can allow ourselves to include files directly,
1668 instead of having to use dbus.h
1670 * dbus/dbus.h: fill in
1672 * dbus/dbus-message.h: sketch out a sample header file.
1673 Include griping if you include it directly instead of
1676 * dbus/dbus-macros.h: new file with macros for extern "C",
1677 TRUE/FALSE, NULL, etc.
1679 * doc/file-boilerplate.c: put include guards in here
1681 2002-11-21 Havoc Pennington <hp@redhat.com>
1683 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1685 * COPYING: include the GPL as well, and license code
1686 under both AFL and GPL.
1688 2002-11-21 Havoc Pennington <hp@redhat.com>
1690 * acconfig.h: get rid of this
1692 * autogen.sh (run_configure): add --no-configure option
1694 * configure.in: remove AC_ARG_PROGRAM to make
1695 autoconf complain less. add AC_PREREQ.
1696 add AC_DEFINE third arg.
1698 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1701 Fix references so we can distcheck.
1703 2002-11-21 Havoc Pennington <hp@redhat.com>
1705 * Initial module creation