1 2003-02-13 Richard Hult <rhult@codefactory.se>
3 * bus/main.c: Fix build.
6 * dbus/dbus-errors.c: Fix copyright for Anders.
8 2003-02-13 Anders Carlsson <andersca@codefactory.se>
13 * bus/connection.c: (bus_connection_foreach):
16 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
17 (unescape_string), (new_section), (parse_section_start),
18 (parse_key_value), (report_error), (bus_desktop_file_load),
19 (bus_desktop_file_get_string):
21 Use DBusError for error reporting.
23 * bus/dispatch.c: (send_one_message),
24 (bus_dispatch_message_handler):
25 * bus/driver.c: (bus_driver_send_service_deleted),
26 (bus_driver_send_service_created), (bus_driver_send_service_lost),
27 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
28 (bus_driver_send_welcome_message),
29 (bus_driver_handle_list_services),
30 (bus_driver_handle_acquire_service),
31 (bus_driver_handle_service_exists):
32 * bus/loop.c: (bus_loop_run):
34 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
36 * bus/utils.c: (bus_wait_for_memory):
38 New files with general utility functions.
40 * dbus/dbus-internals.h:
41 Remove _DBUS_HANDLE_OOM.
43 2003-02-13 Anders Carlsson <andersca@codefactory.se>
45 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
46 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
48 Add DBusError structure.
50 2003-02-13 Anders Carlsson <andersca@codefactory.se>
52 * test/data/valid-messages/standard-acquire-service.message:
53 * test/data/valid-messages/standard-hello.message:
54 * test/data/valid-messages/standard-list-services.message:
55 * test/data/valid-messages/standard-service-exists.message:
56 Add some standard messages.
58 2003-02-13 Anders Carlsson <andersca@codefactory.se>
60 * bus/driver.c: (bus_driver_send_welcome_message),
61 (bus_driver_handle_list_services),
62 (bus_driver_handle_acquire_service),
63 (bus_driver_handle_service_exists), (bus_driver_handle_message):
64 Update for API changes in libdbus.
66 * dbus/dbus-message.c: (dbus_message_new_reply):
67 * dbus/dbus-message.h:
68 Remove the name argument. The spec states that replies shouldn't
71 2003-02-13 Anders Carlsson <andersca@codefactory.se>
73 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
74 (report_error), (bus_desktop_file_load), (lookup_section),
75 (lookup_line), (bus_desktop_file_get_raw),
76 (bus_desktop_file_get_string):
78 Some fixes, and new functions for getting a key value from a section.
80 2003-02-13 Havoc Pennington <hp@pobox.com>
82 * test/data/auth/fail-after-n-attempts.auth-script: new test
84 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
87 2003-02-13 Havoc Pennington <hp@pobox.com>
89 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
90 dbus_credentials_match were backward
92 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
93 NO_CREDENTIALS and ROOT_CREDENTIALS
95 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
96 into here. Never process more commands after we've reached an
97 end state; store further data as unused bytes.
99 * test/data/auth/*: add more auth tests
101 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
102 command to match exact string and EXPECT_UNUSED to match unused
105 * test/Makefile.am (dist-hook): fix to dist all the test stuff
107 2003-02-12 Havoc Pennington <hp@pobox.com>
109 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
110 \r off of popped lines
112 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
115 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
118 2003-02-12 Havoc Pennington <hp@pobox.com>
120 * dbus/Makefile.am: remove break-loader from the build, since it
123 * configure.in: add --enable-gcov to turn on coverage profiling
124 flags and disable optimization
126 2003-02-10 Havoc Pennington <hp@pobox.com>
128 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
129 initial cut at test framework for DBusAuth from laptop.
130 Doesn't quite work yet but it compiles and I need to get
131 it off the 266mhz laptop. ;-)
133 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
134 fix a memleak in error case
136 2003-02-12 Anders Carlsson <andersca@codefactory.se>
139 * bus/desktop-file.c:
140 * bus/desktop-file.h:
141 Add a desktop file parser.
143 2003-02-11 Zack Rusin <zack@kde.org>
145 * qt/message.[h|cpp]: sample implementation
146 of the KDE wrapper for DBusMessage
148 2003-02-09 Zack Rusin <zack@kde.org>
150 * test/bus-test.c: make_it_compile
151 * doc/dbus-specification.sgml: minimal semantic fix
153 2003-02-06 Anders Carlsson <andersca@codefactory.se>
159 2003-02-06 Anders Carlsson <andersca@codefactory.se>
162 * dbus/dbus-break-loader.c:
164 * test/break-loader.c:
165 Move dbus-break-loader to test/ and rename it to break-loader.
167 2003-02-02 Havoc Pennington <hp@pobox.com>
169 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
170 for code to manage cookies in your home directory
172 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
174 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
175 to authenticate, then disconnect the client.
177 2003-02-03 Alexander Larsson <alexl@redhat.com>
179 * dbus/dbus-message.c (dbus_message_append_fields):
182 2003-02-02 Anders Carlsson <andersca@codefactory.se>
184 * doc/dbus-specification.sgml:
185 Update address format section.
187 2003-02-02 Anders Carlsson <andersca@codefactory.se>
190 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
191 (message_handler), (new_connection_callback), (loop_quit),
195 2003-02-02 Anders Carlsson <andersca@codefactory.se>
197 * bus/driver.c: (bus_driver_handle_service_exists):
198 Simplify the code a bit.
200 * dbus/dbus-bus.c: (dbus_bus_service_exists):
203 2003-02-02 Anders Carlsson <andersca@codefactory.se>
206 Add libdbus-daemon.la and link to it.
208 2003-02-01 James Willcox <jwillcox@gnome.org>
210 * bus/driver.c: (bus_driver_handle_own_service):
211 Actually include the service reply code in the message.
213 2003-02-02 Anders Carlsson <andersca@codefactory.se>
215 * bus/driver.c: (bus_driver_handle_service_exists):
216 Don't unref the incoming message.
218 2003-02-02 Anders Carlsson <andersca@codefactory.se>
220 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
222 2003-02-02 Anders Carlsson <andersca@codefactory.se>
224 * dbus/dbus-server.c: (dbus_server_listen):
225 * dbus/dbus-transport.c: (_dbus_transport_open):
226 ifdef out the calls to the debug transport and server.
228 2003-02-02 Alexander Larsson <alexl@redhat.com>
230 * dbus/dbus-watch.c (dbus_watch_get_flags):
231 Add note in the docs that ERROR or HANGUP won't be returned
232 and are assumed always on.
234 * glib/dbus-gmain.c (add_watch):
235 Always add IO_ERR | IO_HUP
237 * dbus/dbus-message.h:
238 Add semicolon after dbus_message_iter_get_string_array().
239 Makes qt code build again
241 2003-02-01 Anders Carlsson <andersca@codefactory.se>
243 * bus/driver.c: (create_unique_client_name),
244 (bus_driver_handle_hello):
245 Don't take a name, just use a numeric id to identify
249 * dbus/dbus-bus.c: (dbus_bus_register_client),
250 (dbus_bus_acquire_service), (dbus_bus_service_exists):
252 Add new convenience functions for communicating with the bus.
254 * dbus/dbus-message.h:
256 * dbus/dbus-protocol.h:
259 2003-02-01 Alexander Larsson <alexl@redhat.com>
261 * dbus/dbus-message.c (dbus_message_append_fields):
262 Add some more doc comments.
264 2003-02-01 Havoc Pennington <hp@pobox.com>
266 * dbus/dbus-break-loader.c (randomly_modify_length): change
267 a 4-byte value in the message as if it were a length
269 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
270 execute bit on saved files
272 2003-02-01 Havoc Pennington <hp@pobox.com>
274 * dbus/dbus-break-loader.c (main): new program to find messages
275 that break the loader.
277 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
278 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
280 * dbus/dbus-string.c (_dbus_string_set_byte): new
282 2003-01-31 Havoc Pennington <hp@pobox.com>
284 * dbus/dbus-message.c: refactor the test code to be more general,
285 in preparation for writing a "randomly permute test cases to
286 try to break the loader" program.
288 2003-01-31 Havoc Pennington <hp@pobox.com>
290 * doc/dbus-specification.sgml: work on the specification
292 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
293 the protocol version of the message.
295 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
296 no longer specifies that.
297 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
300 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
301 "break" for DBUS_TYPE_NIL, remove @todo
303 2003-01-31 Havoc Pennington <hp@pobox.com>
305 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
306 just set_is_error/get_is_error as this is a commonly-used
307 function, and write docs.
309 2003-01-31 Anders Carlsson <andersca@codefactory.se>
311 * dbus/dbus-address.c: (dbus_address_entry_free):
312 Free key and value lists.
314 * dbus/dbus-internals.c: (_dbus_type_to_string):
315 Add the types we didn't have.
317 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
318 (_dbus_marshal_validate_arg):
321 * dbus/dbus-message.c: (dbus_message_set_sender):
322 Remove todo about being able to set sender to NULL.
324 (dbus_message_set_is_error_reply),
325 (dbus_message_get_is_error_reply):
326 * dbus/dbus-message.h:
329 * dbus/dbus-protocol.h:
330 Add error reply flag.
332 * test/data/valid-messages/opposite-endian.message:
333 Add NIL type to test.
335 2003-01-31 Havoc Pennington <hp@pobox.com>
337 * doc/dbus-specification.sgml: fully specify the header. Add
338 flags and major protocol version, and change header/body len to
341 * dbus/dbus-message-builder.c (append_saved_length): append length
344 * dbus/dbus-message.c (dbus_message_create_header): change header
345 length and body length to unsigned. Add the new fields from the
347 (_dbus_message_loader_return_buffer): unsigned header/body len
349 2003-01-30 Havoc Pennington <hp@pobox.com>
351 * dbus/dbus-auth.c: rework to use only REJECTED, no
354 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
355 use REJECTED, suggested by Mark McLoughlin
357 2003-01-30 Havoc Pennington <hp@pobox.com>
359 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
360 a better way to report errors here. e.g. "unix address lacks
361 path" or something. also "no such file" when the path doesn't
364 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
366 (dbus_parse_address): add @todo about documenting address format,
367 and allowing , and ; to be escaped
369 2003-01-30 Anders Carlsson <andersca@codefactory.se>
372 Add dbus-address.[ch]
374 * dbus/dbus-address.c: (dbus_address_entry_free),
375 (dbus_address_entries_free), (create_entry),
376 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
377 (dbus_parse_address), (_dbus_address_test):
378 * dbus/dbus-address.h:
379 New files for dealing with address parsing.
381 * dbus/dbus-connection.c:
382 Document timeout functions.
384 * dbus/dbus-message.c:
385 Document dbus_message_new_from_message.
387 * dbus/dbus-server-debug.c:
390 * dbus/dbus-server.c: (dbus_server_listen):
391 Parse address and use correct server implementation.
393 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
394 * dbus/dbus-string.h:
395 New function with test.
397 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
401 * dbus/dbus-transport-debug.c:
404 * dbus/dbus-transport.c: (_dbus_transport_open):
405 Parse address and use correct transport implementation.
407 2003-01-30 Havoc Pennington <hp@pobox.com>
409 * dbus/dbus-message.c: use message->byte_order instead of
410 DBUS_COMPILER_BYTE_ORDER throughout.
411 (dbus_message_create_header): pad header to align the
412 start of the body of the message to 8-byte boundary
414 * dbus/dbus-marshal.h: make all the demarshalers take const
415 DBusString arguments.
417 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
418 validate message args here, so we don't have to do slow validation
419 later, and so we catch bad messages as they are incoming. Also add
420 better checks on header_len and body_len. Also fill in
423 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
424 implemented properly)
425 (_dbus_string_validate_nul): new function to check all-nul
427 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
428 get_arg_end_pos and remove all validation
429 (_dbus_marshal_validate_arg): actually do validation here.
431 2003-01-29 Havoc Pennington <hp@pobox.com>
433 * dbus/dbus-message.c (check_message_handling): fix assertion
434 failure on set_client_serial
436 2003-01-28 Havoc Pennington <hp@pobox.com>
438 * dbus/dbus-server-debug.c: Add doc section comments
440 * dbus/dbus-transport-debug.c: add doc section comments
442 2003-01-28 Havoc Pennington <hp@redhat.com>
444 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
445 the reverse order from how I had it
446 (_dbus_string_base64_encode): reverse encoding order. I was
447 basically byteswapping everything during encoding.
449 2003-01-28 Anders Carlsson <andersca@codefactory.se>
451 * dbus/dbus-connection-internal.h:
452 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
453 (_dbus_connection_remove_timeout):
454 Add functions for adding and removing timeouts.
456 * dbus/dbus-message.c: (dbus_message_new_from_message):
457 Add new function that takes a message and creates an exact
458 copy of it, but with the refcount set to 1.
459 (check_message_handling):
462 * dbus/dbus-server-protected.h:
463 * dbus/dbus-server.c: (_dbus_server_init_base),
464 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
465 (dbus_server_set_timeout_functions):
466 (_dbus_server_remove_timeout):
467 New functions so that a server can add and remove timeouts.
469 (dbus_server_listen):
470 Add commented out call to dbus_server_debug_new.
472 * dbus/dbus-timeout.c: (_dbus_timeout_new):
473 Actually set the handler, doh.
475 * dbus/dbus-transport.c: (_dbus_transport_open):
476 Add commented out call to dbus_transport_debug_client_new.
479 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
481 2003-01-28 Havoc Pennington <hp@pobox.com>
483 * dbus/dbus-message.c (check_message_handling): function to check
484 on the loaded message, iterates over it etc.
486 2003-01-28 Havoc Pennington <hp@pobox.com>
488 * test/Makefile.am (dist-hook): fix make distdir
490 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
492 2003-01-27 Havoc Pennington <hp@pobox.com>
494 * dbus/dbus-mempool.c (time_for_size): replace printf with
497 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
498 empty lines; fix the SAVE_LENGTH stuff to be
499 START_LENGTH/END_LENGTH so it actually works; couple other
502 * test/Makefile.am (dist-hook): add dist-hook for .message files
504 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
505 can be constant or locked.
506 (_dbus_string_free): allow freeing a const string as
509 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
511 * dbus/dbus-test-main.c (main): take an argument which is the
512 directory containing test data
514 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
515 argument to this and load all the messages in test/data/
516 checking that they can be loaded or not loaded as appropriate.
518 2003-01-27 Anders Carlsson <andersca@codefactory.se>
520 * bus/dispatch.c: (bus_dispatch_message_handler):
521 Dispatch messages sent to services.
523 * bus/driver.c: (bus_driver_send_service_deleted),
524 (bus_driver_send_service_created), (bus_driver_send_service_lost),
525 (bus_driver_send_service_acquired):
526 Add helper functions for sending service related messages.
528 (bus_driver_send_welcome_message):
529 Send HELLO_REPLY instead of WELCOME.
531 (bus_driver_handle_list_services):
532 Send LIST_SERVICES_REPLY instead of SERVICES.
534 (bus_driver_handle_own_service),
535 (bus_driver_handle_service_exists):
536 New message handlers.
538 (bus_driver_handle_message):
539 Invoke new message handlers.
541 (bus_driver_remove_connection):
542 Don't remove any services here since that's done automatically
543 by bus_service_remove_owner now.
546 New function signatures.
548 * bus/services.c: (bus_service_add_owner):
549 Send ServiceAcquired message if we're the only primary owner.
551 (bus_service_remove_owner):
552 Send ServiceAcquired/ServiceLost messages.
554 (bus_service_set_prohibit_replacement),
555 (bus_service_get_prohibit_replacement):
556 Functions for setting prohibit replacement.
558 (bus_service_has_owner):
559 New function that checks if a connection is in the owner queue of
563 Add new function signatures.
565 * dbus/dbus-list.c: (_dbus_list_test):
566 Add tests for _dbus_list_remove_last and traversing the list backwards.
569 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
570 go any further, so return NULL then.
572 * dbus/dbus-protocol.h:
573 Add new messages, service flags and service replies.
575 2003-01-26 Havoc Pennington <hp@pobox.com>
577 * dbus/dbus-message-builder.c: implement, completely untested.
579 * test/data/*: add data to be used in testing.
580 ".message" files are our simple loadable text format.
581 ".message-raw" will be binary dumps of messages.
583 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
585 2003-01-26 Havoc Pennington <hp@pobox.com>
587 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
589 * dbus/dbus-errors.c (dbus_result_to_string): add
592 * dbus/dbus-message-builder.c: new file, will contain code to load
593 up messages from files. Not implemented yet.
595 2003-01-26 Havoc Pennington <hp@pobox.com>
597 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
598 the sender by setting to NULL
600 2003-01-26 Havoc Pennington <hp@pobox.com>
602 The unit tests pass, but otherwise untested. If it breaks, the
603 tests should have been better. ;-)
605 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
608 * dbus/dbus-message.c: redo everything so we maintain
609 message->header as the only copy of the various fields.
610 This avoids the possibility of out-of-memory in some cases,
611 for example dbus_message_lock() can't run out of memory anymore,
612 and avoids extra copying. Figured I may as well go ahead and do
613 this since it was busted for dbus_message_lock to not return
614 failure on OOM, and dbus_message_write_header was totally
615 unchecked for OOM. Also fixed some random other bugs.
617 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
618 that strings are nul-terminated. Also, end_pos can be equal
619 to string length just not greater than, I think.
620 (_dbus_marshal_set_int32): new function
621 (_dbus_marshal_set_uint32): new function
622 (_dbus_marshal_set_string): new function
624 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
625 a warning, init timeout_list to NULL
626 (dbus_connection_send_message): don't use uninitialized variable
629 * dbus/dbus-string.c (_dbus_string_replace_len): new function
631 2003-01-26 Anders Carlsson <andersca@codefactory.se>
633 * bus/driver.c: (bus_driver_handle_hello),
634 (bus_driver_send_welcome_message):
637 2003-01-26 Anders Carlsson <andersca@codefactory.se>
639 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
640 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
641 (dbus_connection_unref):
642 * dbus/dbus-marshal.c: (_dbus_marshal_test):
643 * dbus/dbus-message.c: (dbus_message_unref),
646 (dbus_message_get_fields):
647 Remove debugging printout.
649 (_dbus_message_loader_return_buffer):
650 Don't store the header string.
652 (_dbus_message_test):
655 2003-01-26 Richard Hult <rhult@codefactory.se>
657 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
658 the file descriptor list, since it can change under us.
660 2003-01-25 Anders Carlsson <andersca@codefactory.se>
662 * glib/dbus-gmain.c: (dbus_connection_prepare),
663 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
664 (remove_watch), (dbus_connection_hookup_with_g_main):
665 Rewrite the glib handling to use its own GSource instead of a
666 GIOChannel so we can catch messages put in the queue while waiting
669 2003-01-25 Anders Carlsson <andersca@codefactory.se>
672 * bus/connection.c: (connection_disconnect_handler),
673 (connection_watch_callback), (bus_connection_setup):
674 * bus/dispatch.c: (send_one_message),
675 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
676 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
678 * bus/driver.c: (bus_driver_send_service_deleted),
679 (bus_driver_send_service_created), (bus_driver_handle_hello),
680 (bus_driver_send_welcome_message),
681 (bus_driver_handle_list_services), (bus_driver_remove_connection),
682 (bus_driver_handle_message):
684 Refactor code, put the message dispatching in its own file. Use
685 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
688 2003-01-25 Anders Carlsson <andersca@codefactory.se>
690 * dbus/dbus-internals.h:
691 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
693 * dbus/dbus-message.c: (dbus_message_get_sender):
694 * dbus/dbus-message.h:
695 Implement dbus_message_get_sender.
697 * dbus/dbus-protocol.h:
698 Add message and service defines.
700 2003-01-25 Anders Carlsson <andersca@codefactory.se>
702 * dbus/dbus-connection.c: (dbus_connection_send_message):
703 * dbus/dbus-message-internal.h:
704 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
705 (dbus_message_write_header):
706 Remove _dbus_messag_unlock and don't set the client serial on a
707 message if one already exists.
709 2003-01-24 Havoc Pennington <hp@pobox.com>
711 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
714 * bus/driver.c (bus_driver_handle_list_services): fix a leak
717 2003-01-25 Anders Carlsson <andersca@codefactory.se>
719 * dbus/dbus-list.c: (alloc_link), (free_link):
720 Use a memory pool for the links.
722 2003-01-25 Anders Carlsson <andersca@codefactory.se>
724 * bus/connection.c: (bus_connection_foreach):
726 Add new bus_connection_foreach function.
728 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
729 Add function that broadcasts a message to all clients.
731 (bus_driver_send_service_created), (bus_driver_handle_hello),
732 (bus_driver_send_welcome_message),
733 (bus_driver_handle_list_services), (bus_driver_message_handler):
734 Implement functions that take care of listing services, and notifying
735 clients when new services are created.
737 * bus/services.c: (bus_services_list):
739 Add new function that returns an array of strings with the currently
744 Update copyright year.
746 2003-01-25 Anders Carlsson <andersca@codefactory.se>
748 * dbus/dbus-connection.c: (dbus_connection_send_message):
749 Unlock the message in case it was sent earlier.
751 (dbus_connection_send_message_with_reply_and_block):
752 Remove the reply message from the list.
754 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
755 Set array_len and new_pos correctly.
757 (_dbus_marshal_test):
760 * dbus/dbus-message-internal.h:
761 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
762 New function that returns the reply serial.
764 (_dbus_message_unlock):
765 New function that unlocks a message and resets its header.
767 (dbus_message_append_string_array),
768 (dbus_message_get_fields_valist),
769 (dbus_message_iter_get_field_type),
770 (dbus_message_iter_get_string_array),
771 (dbus_message_get_fields),
772 (dbus_message_append_fields_valist):
773 Handle string arrays.
775 (dbus_message_set_sender):
776 Make this function public since the bus daemon needs it.
778 (decode_header_data):
779 Set the reply serial to -1 initially.
781 * dbus/dbus-message.h:
782 Add dbus_message_set_sender.
784 2003-01-24 Havoc Pennington <hp@pobox.com>
786 * doc/dbus-specification.sgml: add some stuff
788 2003-01-22 Havoc Pennington <hp@pobox.com>
790 * doc/dbus-specification.sgml: Start to document the protocol.
792 2003-01-22 Havoc Pennington <hp@pobox.com>
794 * dbus/dbus-connection.c
795 (dbus_connection_send_message_with_reply_and_block): add some @todo
797 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
799 2003-01-21 Havoc Pennington <hp@pobox.com>
801 (patch untested because can't compile)
803 * bus/driver.c (create_unique_client_name): make this function
804 never recycle client names. Also, caller should initialize
807 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
809 2003-01-21 Anders Carlsson <andersca@codefactory.se>
811 * dbus/dbus-marshal.c: (_dbus_marshal_double),
812 (_dbus_marshal_int32), (_dbus_marshal_uint32),
813 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
814 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
815 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
816 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
817 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
818 * dbus/dbus-marshal.h:
819 * dbus/dbus-protocol.h:
820 Add support for marshalling and demarshalling integer, double
823 2003-01-21 Anders Carlsson <andersca@codefactory.se>
828 * bus/connection.c: (connection_disconnect_handler):
829 Remove the connection from the bus driver's list.
831 (connection_watch_callback): Dispatch messages.
833 (free_connection_data): Free connection name.
835 (bus_connection_setup): Add connection to the bus driver's list.
836 (bus_connection_remove_owned_service):
837 (bus_connection_set_name), (bus_connection_get_name):
838 Add functions for setting and getting the connection's name.
841 Add function headers.
843 * bus/driver.c: (create_unique_client_name),
844 (bus_driver_handle_hello_message),
845 (bus_driver_send_welcome_message), (bus_driver_message_handler),
846 (bus_driver_add_connection), (bus_driver_remove_connection):
849 * bus/services.c: (bus_service_free):
851 New file that handles communication and registreation with the bus
854 2003-01-21 Anders Carlsson <andersca@codefactory.se>
856 * dbus/dbus-connection.c: (dbus_connection_send_message):
857 Add a new client_serial parameter.
859 (dbus_connection_send_message_with_reply):
860 Remove a @todo since we've implemented the blocking function.
862 (dbus_connection_send_message_with_reply_and_block):
863 New function that sends a message and waits for a reply and
864 then returns the reply.
866 * dbus/dbus-connection.h:
869 * dbus/dbus-errors.c: (dbus_result_to_string):
870 * dbus/dbus-errors.h:
873 * dbus/dbus-message-internal.h:
874 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
875 (_dbus_message_set_sender), (dbus_message_write_header),
876 (dbus_message_new_reply), (decode_header_data),
877 (_dbus_message_loader_return_buffer), (_dbus_message_test):
878 * dbus/dbus-message.h:
879 Add new functions that set the reply serial and sender.
880 Also marshal and demarshal them correctly and add test.
882 * dbus/dbus-protocol.h:
883 Add new DBUS_MESSAGE_TYPE_SENDER.
886 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
887 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
888 (dbus_connection_hookup_with_g_main):
889 * glib/test-dbus-glib.c: (main):
890 Rewrite to use GIOChannel and remove the GSource crack.
892 * test/echo-client.c: (main):
893 * test/watch.c: (check_messages):
894 Update for changed APIs
896 2003-01-19 Anders Carlsson <andersca@codefactory.se>
898 * dbus/Makefile.am: Add dbus-timeout.[cħ]
900 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
901 Create a DBusTimeoutList.
902 (dbus_connection_set_timeout_functions): Add new function to
903 set timeout callbacks
905 * dbus/dbus-connection.h: Add public DBusTimeout API.
907 * dbus/dbus-message.c: (dbus_message_get_service):
908 * dbus/dbus-message.h: New function.
910 * dbus/dbus-server.c: Fix small doc typo.
912 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
914 2003-01-19 Anders Carlsson <andersca@codefactory.se>
916 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
917 of the string, just as long as specified.
919 2003-01-19 Havoc Pennington <hp@pobox.com>
921 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
924 * dbus/dbus-server.c (dbus_server_set_max_connections)
925 (dbus_server_get_max_connections, dbus_server_get_n_connections):
926 keep track of current number of connections, and add API for
927 setting a max (but haven't implemented enforcing the max yet)
929 2003-01-18 Havoc Pennington <hp@pobox.com>
931 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
932 reading/writing if read_watch != NULL or write_watch != NULL.
934 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
935 the message loader code to actually load message->header and
936 message->body into the newly-created message.
938 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
941 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
942 (dbus_connection_get_max_message_size)
943 (dbus_connection_set_max_live_messages_size)
944 (dbus_connection_get_max_live_messages_size): implement some
945 resource limitation functions
947 * dbus/dbus-resources.c: new file implementing some of the
948 resource limits stuff
950 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
951 missing docs, add @todo to handle OOM etc.
953 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
956 2003-01-18 Havoc Pennington <hp@pobox.com>
958 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
959 connection if it hasn't been already.
961 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
962 replace with DisconnectFunction.
964 2003-01-18 Havoc Pennington <hp@pobox.com>
966 Building --disable-verbose-mode --disable-asserts --disable-tests
967 cuts the library from 112K to 45K or so
969 * configure.in: check for varargs macro support,
970 add --enable-verbose-mode, --enable-asserts.
972 * dbus/dbus-internals.h (_dbus_assert): support
974 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
976 2003-01-18 Havoc Pennington <hp@pobox.com>
978 * dbus/dbus-test.c: include config.h so that tests actually run
980 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
981 so the failure mode when that assumption fails will be plenty
984 2003-01-18 Havoc Pennington <hp@pobox.com>
986 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
988 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
991 * test/Makefile.am: don't use special variable "TESTS" for echo-*
992 since we don't want to use those in make check
994 2003-01-15 Havoc Pennington <hp@redhat.com>
1000 2003-01-15 Havoc Pennington <hp@redhat.com>
1002 * test/Makefile.am: fix so that test source code ends up in the
1003 distribution on make distcheck
1005 2003-01-15 Havoc Pennington <hp@redhat.com>
1011 2003-01-15 Havoc Pennington <hp@redhat.com>
1013 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1014 fix build when --disable-tests
1016 * Makefile.am (EXTRA_DIST): put HACKING in here
1018 * HACKING: document procedure for making a tarball release.
1020 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1022 * bus/connection.c: (connection_error_handler),
1023 (bus_connection_setup):
1024 * bus/main.c: (main):
1025 Make sure that the DBusConnectionData struct is NULLed
1026 out to prevent a segfault.
1028 * dbus/dbus-errors.c: (dbus_result_to_string):
1029 * dbus/dbus-errors.h:
1030 * dbus/dbus-message.c: (dbus_message_get_fields),
1031 (dbus_message_get_fields_valist), (_dbus_message_test):
1032 * dbus/dbus-message.h:
1033 Make dbus_message_get_fields return a result code so we can
1034 track invalid fields as well as oom.
1036 2003-01-11 Havoc Pennington <hp@pobox.com>
1038 * configure.in: change --enable-test/--enable-ansi action-if-given
1039 to enable_foo=$enableval instead of enable_foo=yes
1041 2003-01-08 Havoc Pennington <hp@pobox.com>
1043 * dbus/dbus-string.c (_dbus_string_align_length): new function
1045 * dbus/dbus-test-main.c: move main() for test app here
1047 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1048 symbol to run tests, because dbus-test isn't in the main
1051 Code review nitpicks.
1053 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1054 for people with narrow emacs ;-). Assert client_serial was filled
1055 in. Assert message->name != NULL.
1056 (dbus_message_append_fields): have "first_field_type" arg separate
1057 from va list, needed for C++ binding that also uses varargs IIRC
1058 and helps with type safety
1059 (dbus_message_new): add @todo about using DBusString to store
1060 service/name internally
1061 (dbus_message_new): don't leak ->service and ->name on OOM later
1063 (dbus_message_unref): free the service name
1064 (dbus_message_get_fields): same change to varargs
1065 i.e. first_field_type
1066 (_dbus_message_loader_return_buffer): assert that the message data
1067 is aligned (if not it's a bug in our code). Put in verbose griping
1068 about why we set corrupted = TRUE.
1069 (decode_header_data): add FIXME that char* is evil. Was going to
1070 add FIXME about evil locale-specific string.h strncmp, but just
1071 switched to wacky string-as-uint32 optimization. Move check for
1072 "no room for field name" above get_const_data_len() to avoid
1073 assertion failure in get_const_data_len if we have trailing 2
1074 bytes or the like. Check for service and name fields being
1075 provided twice. Don't leak service/name on error. Require field
1076 names to be aligned to 4 bytes.
1078 * dbus/dbus-marshal.c: move byte swap stuff to header
1079 (_dbus_pack_int32): uscore-prefix
1080 (_dbus_unpack_int32): uscore-prefix
1081 (_dbus_unpack_uint32): export
1082 (_dbus_demarshal_string): add @todo complaining about use of
1084 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1085 handling allowing corrupt data to go unchecked
1087 2003-01-08 Havoc Pennington <hp@redhat.com>
1089 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1090 to the select() as needed for authentication. (should be using
1091 _dbus_poll() not select, but for another day)
1093 * dbus/dbus.h: include dbus/dbus-protocol.h
1095 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1097 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1100 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1102 * dbus/dbus-internals.c: (_dbus_type_to_string):
1103 New function that returns a string describing a type.
1105 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1106 * dbus/dbus-marshal.h:
1107 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1108 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1109 (dbus_message_iter_get_byte_array):
1110 * dbus/dbus-message.h:
1111 Add new convenience functions for appending and getting message fields.
1112 Also add demarshalling routines for byte arrays.
1114 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1116 * dbus/dbus-connection-internal.h:
1117 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1118 (_dbus_connection_get_next_client_serial),
1119 (dbus_connection_send_message):
1120 * dbus/dbus-internals.h:
1121 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1122 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1123 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1124 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1125 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1126 (_dbus_verbose_bytes), (_dbus_marshal_test):
1127 * dbus/dbus-marshal.h:
1128 * dbus/dbus-message-internal.h:
1129 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1130 (dbus_message_write_header), (_dbus_message_lock),
1131 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1132 (dbus_message_get_name), (dbus_message_append_int32),
1133 (dbus_message_append_uint32), (dbus_message_append_double),
1134 (dbus_message_append_string), (dbus_message_append_byte_array),
1135 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1136 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1137 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1138 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1139 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1140 (decode_header_data), (_dbus_message_loader_return_buffer),
1141 (message_iter_test), (_dbus_message_test):
1142 * dbus/dbus-message.h:
1143 * dbus/dbus-protocol.h:
1144 * dbus/dbus-test.c: (main):
1146 * glib/test-dbus-glib.c: (message_handler), (main):
1147 * test/echo-client.c: (main):
1148 * test/watch.c: (check_messages):
1149 Make messages sendable and receivable for real.
1151 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1153 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1154 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1155 * dbus/dbus-message.c: (dbus_message_append_int32),
1156 (dbus_message_append_uint32), (dbus_message_append_double),
1157 (dbus_message_append_string), (dbus_message_append_byte_array):
1158 Handle OOM restoration.
1160 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1162 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1163 (_dbus_demarshal_string), (_dbus_marshal_test):
1164 * dbus/dbus-marshal.h:
1165 * dbus/dbus-message.c: (dbus_message_get_name),
1166 Document these functions.
1168 (dbus_message_append_int32), (dbus_message_append_uint32),
1169 (dbus_message_append_double), (dbus_message_append_string),
1170 (dbus_message_append_byte_array):
1171 * dbus/dbus-message.h:
1172 Add functions for adding message fields of different types.
1174 * dbus/dbus-protocol.h:
1175 Add the different types.
1177 2003-01-05 Havoc Pennington <hp@pobox.com>
1179 * bus/connection.c: implement routines for handling connections,
1180 first thing is keeping a list of owned services on each connection
1181 and setting up watches etc.
1183 * bus/services.c: implement a mapping from service names to lists
1186 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1188 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1189 to use static mutexes for global data
1191 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1192 collection of functions to set/get application-specific data
1193 on the DBusConnection.
1195 2003-01-04 Havoc Pennington <hp@pobox.com>
1197 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1198 (_dbus_poll): new function
1200 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1203 * bus/loop.c: initial code for the daemon main loop
1205 2003-01-04 Havoc Pennington <hp@pobox.com>
1207 * test/watch.c (error_handler): make it safe if the error handler
1208 is called multiple times (if we s/error handler/disconnect
1209 handler/ we should just guarantee it's called only once)
1211 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1212 error handler on disconnect (it's quite possible we should
1213 just change the error handler to a "disconnect handler," I'm
1214 not sure we have any other meaningful errors)
1216 * configure.in: check for getpwnam_r
1218 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1219 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1220 mechanism as in SASL spec, using socket credentials
1222 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1223 (_dbus_send_credentials_unix_socket): new function
1225 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1227 (_dbus_write): only check errno if <0 returned
1228 (_dbus_write_two): ditto
1230 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1232 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1233 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1234 (_dbus_marshal_test):
1235 * dbus/dbus-marshal.h:
1236 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1237 to _dbus_marshal_utf8_string. Also fix some tests.
1239 2002-12-28 Harri Porten <porten@kde.org>
1241 * configure.in: added check for C++ compiler and a very cheesy
1242 check for the Qt integration
1244 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1246 * qt/Makefile.am: added
1248 * qt/.cvsignore: added
1250 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1251 latter, added #ifdef QT_THREAD_SUPPORT guard.
1253 * dbus/Makefile.am: added missing headers for make dist
1255 2002-12-28 Kristian Rietveld <kris@gtk.org>
1257 * dbus/Makefile.am: fixup export-symbols-regex.
1259 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1261 * acinclude.m4: Add this file and put the
1262 PKG_CHECK_MODULE macro in it.
1264 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1266 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1267 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1268 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1269 (_dbus_marshal_test):
1270 Make the demarshalling routines align the pos argument.
1271 Add string marshalling tests and fix the obvious bugs
1274 2002-12-26 Havoc Pennington <hp@pobox.com>
1276 * dbus/dbus-auth.c: fixes fixes fixes
1278 * dbus/dbus-transport-unix.c: wire up support for
1279 encoding/decoding data on the wire
1281 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1282 (_dbus_auth_decode_data): append to target string
1283 instead of nuking it.
1285 2002-12-26 Havoc Pennington <hp@pobox.com>
1287 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1288 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1291 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1292 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1293 now). Main point is because I wanted unpack_uint32 to implement
1295 (_dbus_verbose_bytes): new function
1297 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1299 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1300 mechanism to handle a corrupt message stream
1301 (_dbus_message_loader_new): fix preallocation to only prealloc,
1304 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1305 (_dbus_string_test): enhance tests for copy/move and fix the
1308 * dbus/dbus-transport-unix.c: Hold references in more places to
1309 avoid reentrancy problems
1311 * dbus/dbus-transport.c: ditto
1313 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1314 leak reference count in no-message case
1316 * test/watch.c (do_mainloop): handle adding/removing watches
1317 during iteration over the watches. Also, ref the connection/server
1318 stored on a watch, so we don't try to mangle a destroyed one.
1320 * dbus/dbus-transport-unix.c (do_authentication): perform
1323 * dbus/dbus-auth.c (get_state): add a state
1324 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1325 (_dbus_auth_get_unused_bytes): append the unused bytes
1326 to the passed in string, rather than prepend
1328 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1329 the auth conversation DBusAuth
1331 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1332 (_dbus_transport_new_for_domain_socket): when creating a
1333 transport, pass in whether it's a client-side or server-side
1334 transport so we know which DBusAuth to create
1336 2002-12-03 Havoc Pennington <hp@pobox.com>
1338 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1339 _after_ finalizing the derived members
1340 (unix_connection_set): unref watch if we fail to add it
1342 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1343 transport first, so that the connection owned by the
1344 transport will be valid as the transport finalizes.
1346 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1347 if necessary, and remove watches from the connection.
1349 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1351 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1353 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1354 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1355 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1356 (_dbus_marshal_test):
1357 * dbus/dbus-marshal.h:
1358 Add string marshal functions and have the demarshal functions
1359 return the new position.
1361 2002-12-25 Havoc Pennington <hp@pobox.com>
1363 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1364 it is a simple protocol that just maps directly to SASL.
1366 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1367 initial implementation, not actually used yet.
1369 * dbus/dbus-string.c (_dbus_string_find): new function
1370 (_dbus_string_equal): new function
1371 (_dbus_string_base64_encode): new function
1372 (_dbus_string_base64_decode): new function
1374 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1377 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1378 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1379 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1380 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1381 * dbus/dbus-marshal.h:
1382 * dbus/dbus-protocol.h:
1383 * dbus/dbus-test.c: (main):
1385 Add un-optimized marshalling/demarshalling routines.
1387 2002-12-25 Harri Porten <porten@kde.org>
1389 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1391 2002-12-24 Zack Rusin <zack@kde.org>
1393 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1394 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1397 2002-12-24 Havoc Pennington <hp@pobox.com>
1399 * glib/dbus-gthread.c: fix include
1401 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1402 I think glib API needs to change, though, as you don't
1403 want to use DBusMessageFunction, you want to use the
1404 DBusMessageHandler object. Probably
1405 dbus_connection_open_with_g_main_loop()
1406 and dbus_connection_setup_g_main_loop() or something like that
1407 (but think of better names...) that just create a connection
1408 that has watch/timeout functions etc. already set up.
1410 * dbus/dbus-connection.c
1411 (dbus_connection_send_message_with_reply): new function just to
1412 show how the message handler helps us deal with replies.
1414 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1416 * dbus/dbus-string.c (_dbus_string_test): free a string that
1419 * dbus/dbus-hash.c: use memory pools for the hash entries
1420 (rebuild_table): be more paranoid about overflow, and
1421 shrink table when we can
1422 (_dbus_hash_test): reduce number of sprintfs and write
1423 valid C89. Add tests for case where we grow and then
1424 shrink the hash table.
1426 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1428 * dbus/dbus-connection.c (dbus_connection_register_handler)
1429 (dbus_connection_unregister_handler): new functions
1431 * dbus/dbus-message.c (dbus_message_get_name): new
1433 * dbus/dbus-list.c: fix docs typo
1435 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1436 an object representing a handler for messages.
1438 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1441 * glib/dbus-gthread.c: (dbus_gthread_init):
1442 Don't use the gdbus prefix for public functions.
1444 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1448 Add GLib checks and fixup .pc files
1452 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1453 (gdbus_connection_check), (gdbus_connection_dispatch),
1454 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1455 (dbus_connection_gsource_new):
1456 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1457 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1458 * glib/test-dbus-glib.c: (message_handler), (main):
1461 2002-12-15 Harri Porten <porten@kde.org>
1463 * autogen.sh: check for libtoolize before attempting to use it
1465 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1468 * .cvsignore: ignore more stamp files
1470 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1472 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1473 without make install.
1475 2002-12-15 Havoc Pennington <hp@pobox.com>
1477 * dbus/dbus-threads.c: add thread stubs that a higher library
1478 layer can fill in. e.g. the GLib wrapper might fill them in with
1479 GThread stuff. We still need to use this thread API to
1480 thread-safe-ize the library.
1482 2002-12-12 Havoc Pennington <hp@pobox.com>
1484 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1485 below new interfaces and include fewer system headers.
1487 * dbus/dbus-sysdeps.c (_dbus_read): new function
1488 (_dbus_write): new function
1489 (_dbus_write_two): new function
1490 (_dbus_connect_unix_socket): new function
1491 (_dbus_listen_unix_socket): new function
1493 * dbus/dbus-message-internal.h: change interfaces to use
1496 2002-12-11 Havoc Pennington <hp@pobox.com>
1498 * dbus/dbus-types.h: add dbus_unichar
1500 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1502 * dbus/dbus-connection.c (dbus_connection_send_message): return
1505 * dbus/dbus-transport.c: include dbus-watch.h
1507 * dbus/dbus-connection.c: include dbus-message-internal.h
1509 * HACKING: add file with coding guidelines stuff.
1511 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1512 handling here, for security purposes (as in vsftpd). Not actually
1513 using this class yet.
1515 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1516 system/libc usage here, as in vsftpd, for ease of auditing (and
1517 should also simplify portability). Haven't actually moved all the
1518 system/libc usage into here yet.
1520 2002-11-25 Havoc Pennington <hp@pobox.com>
1522 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1523 always print the first verbose message.
1525 2002-11-24 Havoc Pennington <hp@pobox.com>
1527 * test/echo-client.c, test/echo-server.c: cheesy test
1530 * configure.in (AC_CHECK_FUNCS): check for writev
1532 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1535 * dbus/dbus-list.c (_dbus_list_foreach): new function
1537 * dbus/dbus-internals.c (_dbus_verbose): new function
1539 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1540 representing a server that listens for connections.
1542 * dbus/.cvsignore: create
1544 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1545 public API for reporting errors
1547 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1548 public object representing a connection that
1549 sends/receives messages. (Same object used for
1550 both client and server.)
1552 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1553 Basic abstraction for different kinds of stream
1554 that we might read/write messages from.
1556 2002-11-23 Havoc Pennington <hp@pobox.com>
1558 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1561 * dbus/dbus-test.c (main): add list test, and include
1562 dbus-test.h as intended
1564 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1565 (_dbus_hash_table_remove_int): return value indicates
1566 whether the entry existed to remove
1568 * dbus/dbus-list.c: add linked list utility class,
1571 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1574 2002-11-23 Havoc Pennington <hp@pobox.com>
1576 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1577 DBUS_END_DECLS to nothing, that should fix this once and for all
1579 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1581 * dbus/dbus-message.c, dbus/dbus-hash.c:
1582 add some missing @brief
1584 2002-11-23 Havoc Pennington <hp@pobox.com>
1586 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1587 to avoid confusing Doxygen
1589 * dbus/dbus-hash.c: @} not }@
1591 * dbus/dbus-message.c (struct DBusMessage): split out
1594 2002-11-23 Havoc Pennington <hp@pobox.com>
1596 * configure.in: pile on more warning flags if using gcc
1598 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1599 to document static functions
1601 * configure.in: add summary to end of configure so it
1602 looks nice and attractive
1604 * dbus/dbus-hash.c: finish implementation and write unit
1607 * configure.in: add --enable-tests to enable unit tests
1609 * dbus/dbus-test.c: test program to run unit tests
1610 for all files in dbus/*, initially runs a test for
1613 * dbus/dbus-internals.h: file to hold some internal utility stuff
1615 2002-11-22 Havoc Pennington <hp@redhat.com>
1617 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1618 "ported" away from Tcl
1620 * dbus/dbus-types.h: header for types such as dbus_bool_t
1622 2002-11-22 Havoc Pennington <hp@redhat.com>
1624 * dbus/dbus.h: fixups for doc warnings
1626 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1628 (QUIET): make it quiet so we can see warnings
1630 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1632 2002-11-22 Havoc Pennington <hp@redhat.com>
1634 * Makefile.am: include "Doxyfile" target in all-local
1636 * configure.in: generate the Doxyfile
1638 * Doxyfile.in: move Doxyfile here, so we can use
1639 configure to generate a Doxyfile with the right
1642 2002-11-22 Havoc Pennington <hp@redhat.com>
1644 * dbus/dbus-message.c: move inline docs into .c file
1646 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1647 so all docs are under doc/
1648 (MAN_EXTENSION): generate man pages. Use extension
1649 ".3dbus" which matches ".3qt" on my system,
1650 I guess this is OK, I don't know really.
1651 (FILE_PATTERNS): look for .c files not .h, makes sense
1654 2002-11-22 Havoc Pennington <hp@pobox.com>
1656 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1657 because any app can be a server, and any app can be a client,
1658 the bus is a special kind of server.
1660 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1662 * Doxyfile : adding. Still needs Makefile rules to be generated
1663 automatically (just run "doxygen" in the toplevel dir for now to
1666 * dbus/dbus-message.h : Adding sample docs (javadoc since
1667 resembles gtk-doc a little more)
1669 * dbus/dbus.h : Adding sample docs
1671 2002-11-21 Havoc Pennington <hp@redhat.com>
1673 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1674 so we can allow ourselves to include files directly,
1675 instead of having to use dbus.h
1677 * dbus/dbus.h: fill in
1679 * dbus/dbus-message.h: sketch out a sample header file.
1680 Include griping if you include it directly instead of
1683 * dbus/dbus-macros.h: new file with macros for extern "C",
1684 TRUE/FALSE, NULL, etc.
1686 * doc/file-boilerplate.c: put include guards in here
1688 2002-11-21 Havoc Pennington <hp@redhat.com>
1690 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1692 * COPYING: include the GPL as well, and license code
1693 under both AFL and GPL.
1695 2002-11-21 Havoc Pennington <hp@redhat.com>
1697 * acconfig.h: get rid of this
1699 * autogen.sh (run_configure): add --no-configure option
1701 * configure.in: remove AC_ARG_PROGRAM to make
1702 autoconf complain less. add AC_PREREQ.
1703 add AC_DEFINE third arg.
1705 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1708 Fix references so we can distcheck.
1710 2002-11-21 Havoc Pennington <hp@redhat.com>
1712 * Initial module creation