1 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
4 (report_error), (bus_desktop_file_load), (lookup_section),
5 (lookup_line), (bus_desktop_file_get_raw),
6 (bus_desktop_file_get_string):
8 Some fixes, and new functions for getting a key value from a section.
10 2003-02-13 Havoc Pennington <hp@pobox.com>
12 * test/data/auth/fail-after-n-attempts.auth-script: new test
14 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
17 2003-02-13 Havoc Pennington <hp@pobox.com>
19 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
20 dbus_credentials_match were backward
22 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
23 NO_CREDENTIALS and ROOT_CREDENTIALS
25 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
26 into here. Never process more commands after we've reached an
27 end state; store further data as unused bytes.
29 * test/data/auth/*: add more auth tests
31 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
32 command to match exact string and EXPECT_UNUSED to match unused
35 * test/Makefile.am (dist-hook): fix to dist all the test stuff
37 2003-02-12 Havoc Pennington <hp@pobox.com>
39 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
40 \r off of popped lines
42 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
45 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
48 2003-02-12 Havoc Pennington <hp@pobox.com>
50 * dbus/Makefile.am: remove break-loader from the build, since it
53 * configure.in: add --enable-gcov to turn on coverage profiling
54 flags and disable optimization
56 2003-02-10 Havoc Pennington <hp@pobox.com>
58 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
59 initial cut at test framework for DBusAuth from laptop.
60 Doesn't quite work yet but it compiles and I need to get
61 it off the 266mhz laptop. ;-)
63 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
64 fix a memleak in error case
66 2003-02-12 Anders Carlsson <andersca@codefactory.se>
71 Add a desktop file parser.
73 2003-02-11 Zack Rusin <zack@kde.org>
75 * qt/message.[h|cpp]: sample implementation
76 of the KDE wrapper for DBusMessage
78 2003-02-09 Zack Rusin <zack@kde.org>
80 * test/bus-test.c: make_it_compile
81 * doc/dbus-specification.sgml: minimal semantic fix
83 2003-02-06 Anders Carlsson <andersca@codefactory.se>
89 2003-02-06 Anders Carlsson <andersca@codefactory.se>
92 * dbus/dbus-break-loader.c:
94 * test/break-loader.c:
95 Move dbus-break-loader to test/ and rename it to break-loader.
97 2003-02-02 Havoc Pennington <hp@pobox.com>
99 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
100 for code to manage cookies in your home directory
102 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
104 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
105 to authenticate, then disconnect the client.
107 2003-02-03 Alexander Larsson <alexl@redhat.com>
109 * dbus/dbus-message.c (dbus_message_append_fields):
112 2003-02-02 Anders Carlsson <andersca@codefactory.se>
114 * doc/dbus-specification.sgml:
115 Update address format section.
117 2003-02-02 Anders Carlsson <andersca@codefactory.se>
120 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
121 (message_handler), (new_connection_callback), (loop_quit),
125 2003-02-02 Anders Carlsson <andersca@codefactory.se>
127 * bus/driver.c: (bus_driver_handle_service_exists):
128 Simplify the code a bit.
130 * dbus/dbus-bus.c: (dbus_bus_service_exists):
133 2003-02-02 Anders Carlsson <andersca@codefactory.se>
136 Add libdbus-daemon.la and link to it.
138 2003-02-01 James Willcox <jwillcox@gnome.org>
140 * bus/driver.c: (bus_driver_handle_own_service):
141 Actually include the service reply code in the message.
143 2003-02-02 Anders Carlsson <andersca@codefactory.se>
145 * bus/driver.c: (bus_driver_handle_service_exists):
146 Don't unref the incoming message.
148 2003-02-02 Anders Carlsson <andersca@codefactory.se>
150 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
152 2003-02-02 Anders Carlsson <andersca@codefactory.se>
154 * dbus/dbus-server.c: (dbus_server_listen):
155 * dbus/dbus-transport.c: (_dbus_transport_open):
156 ifdef out the calls to the debug transport and server.
158 2003-02-02 Alexander Larsson <alexl@redhat.com>
160 * dbus/dbus-watch.c (dbus_watch_get_flags):
161 Add note in the docs that ERROR or HANGUP won't be returned
162 and are assumed always on.
164 * glib/dbus-gmain.c (add_watch):
165 Always add IO_ERR | IO_HUP
167 * dbus/dbus-message.h:
168 Add semicolon after dbus_message_iter_get_string_array().
169 Makes qt code build again
171 2003-02-01 Anders Carlsson <andersca@codefactory.se>
173 * bus/driver.c: (create_unique_client_name),
174 (bus_driver_handle_hello):
175 Don't take a name, just use a numeric id to identify
179 * dbus/dbus-bus.c: (dbus_bus_register_client),
180 (dbus_bus_acquire_service), (dbus_bus_service_exists):
182 Add new convenience functions for communicating with the bus.
184 * dbus/dbus-message.h:
186 * dbus/dbus-protocol.h:
189 2003-02-01 Alexander Larsson <alexl@redhat.com>
191 * dbus/dbus-message.c (dbus_message_append_fields):
192 Add some more doc comments.
194 2003-02-01 Havoc Pennington <hp@pobox.com>
196 * dbus/dbus-break-loader.c (randomly_modify_length): change
197 a 4-byte value in the message as if it were a length
199 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
200 execute bit on saved files
202 2003-02-01 Havoc Pennington <hp@pobox.com>
204 * dbus/dbus-break-loader.c (main): new program to find messages
205 that break the loader.
207 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
208 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
210 * dbus/dbus-string.c (_dbus_string_set_byte): new
212 2003-01-31 Havoc Pennington <hp@pobox.com>
214 * dbus/dbus-message.c: refactor the test code to be more general,
215 in preparation for writing a "randomly permute test cases to
216 try to break the loader" program.
218 2003-01-31 Havoc Pennington <hp@pobox.com>
220 * doc/dbus-specification.sgml: work on the specification
222 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
223 the protocol version of the message.
225 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
226 no longer specifies that.
227 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
230 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
231 "break" for DBUS_TYPE_NIL, remove @todo
233 2003-01-31 Havoc Pennington <hp@pobox.com>
235 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
236 just set_is_error/get_is_error as this is a commonly-used
237 function, and write docs.
239 2003-01-31 Anders Carlsson <andersca@codefactory.se>
241 * dbus/dbus-address.c: (dbus_address_entry_free):
242 Free key and value lists.
244 * dbus/dbus-internals.c: (_dbus_type_to_string):
245 Add the types we didn't have.
247 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
248 (_dbus_marshal_validate_arg):
251 * dbus/dbus-message.c: (dbus_message_set_sender):
252 Remove todo about being able to set sender to NULL.
254 (dbus_message_set_is_error_reply),
255 (dbus_message_get_is_error_reply):
256 * dbus/dbus-message.h:
259 * dbus/dbus-protocol.h:
260 Add error reply flag.
262 * test/data/valid-messages/opposite-endian.message:
263 Add NIL type to test.
265 2003-01-31 Havoc Pennington <hp@pobox.com>
267 * doc/dbus-specification.sgml: fully specify the header. Add
268 flags and major protocol version, and change header/body len to
271 * dbus/dbus-message-builder.c (append_saved_length): append length
274 * dbus/dbus-message.c (dbus_message_create_header): change header
275 length and body length to unsigned. Add the new fields from the
277 (_dbus_message_loader_return_buffer): unsigned header/body len
279 2003-01-30 Havoc Pennington <hp@pobox.com>
281 * dbus/dbus-auth.c: rework to use only REJECTED, no
284 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
285 use REJECTED, suggested by Mark McLoughlin
287 2003-01-30 Havoc Pennington <hp@pobox.com>
289 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
290 a better way to report errors here. e.g. "unix address lacks
291 path" or something. also "no such file" when the path doesn't
294 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
296 (dbus_parse_address): add @todo about documenting address format,
297 and allowing , and ; to be escaped
299 2003-01-30 Anders Carlsson <andersca@codefactory.se>
302 Add dbus-address.[ch]
304 * dbus/dbus-address.c: (dbus_address_entry_free),
305 (dbus_address_entries_free), (create_entry),
306 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
307 (dbus_parse_address), (_dbus_address_test):
308 * dbus/dbus-address.h:
309 New files for dealing with address parsing.
311 * dbus/dbus-connection.c:
312 Document timeout functions.
314 * dbus/dbus-message.c:
315 Document dbus_message_new_from_message.
317 * dbus/dbus-server-debug.c:
320 * dbus/dbus-server.c: (dbus_server_listen):
321 Parse address and use correct server implementation.
323 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
324 * dbus/dbus-string.h:
325 New function with test.
327 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
331 * dbus/dbus-transport-debug.c:
334 * dbus/dbus-transport.c: (_dbus_transport_open):
335 Parse address and use correct transport implementation.
337 2003-01-30 Havoc Pennington <hp@pobox.com>
339 * dbus/dbus-message.c: use message->byte_order instead of
340 DBUS_COMPILER_BYTE_ORDER throughout.
341 (dbus_message_create_header): pad header to align the
342 start of the body of the message to 8-byte boundary
344 * dbus/dbus-marshal.h: make all the demarshalers take const
345 DBusString arguments.
347 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
348 validate message args here, so we don't have to do slow validation
349 later, and so we catch bad messages as they are incoming. Also add
350 better checks on header_len and body_len. Also fill in
353 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
354 implemented properly)
355 (_dbus_string_validate_nul): new function to check all-nul
357 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
358 get_arg_end_pos and remove all validation
359 (_dbus_marshal_validate_arg): actually do validation here.
361 2003-01-29 Havoc Pennington <hp@pobox.com>
363 * dbus/dbus-message.c (check_message_handling): fix assertion
364 failure on set_client_serial
366 2003-01-28 Havoc Pennington <hp@pobox.com>
368 * dbus/dbus-server-debug.c: Add doc section comments
370 * dbus/dbus-transport-debug.c: add doc section comments
372 2003-01-28 Havoc Pennington <hp@redhat.com>
374 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
375 the reverse order from how I had it
376 (_dbus_string_base64_encode): reverse encoding order. I was
377 basically byteswapping everything during encoding.
379 2003-01-28 Anders Carlsson <andersca@codefactory.se>
381 * dbus/dbus-connection-internal.h:
382 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
383 (_dbus_connection_remove_timeout):
384 Add functions for adding and removing timeouts.
386 * dbus/dbus-message.c: (dbus_message_new_from_message):
387 Add new function that takes a message and creates an exact
388 copy of it, but with the refcount set to 1.
389 (check_message_handling):
392 * dbus/dbus-server-protected.h:
393 * dbus/dbus-server.c: (_dbus_server_init_base),
394 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
395 (dbus_server_set_timeout_functions):
396 (_dbus_server_remove_timeout):
397 New functions so that a server can add and remove timeouts.
399 (dbus_server_listen):
400 Add commented out call to dbus_server_debug_new.
402 * dbus/dbus-timeout.c: (_dbus_timeout_new):
403 Actually set the handler, doh.
405 * dbus/dbus-transport.c: (_dbus_transport_open):
406 Add commented out call to dbus_transport_debug_client_new.
409 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
411 2003-01-28 Havoc Pennington <hp@pobox.com>
413 * dbus/dbus-message.c (check_message_handling): function to check
414 on the loaded message, iterates over it etc.
416 2003-01-28 Havoc Pennington <hp@pobox.com>
418 * test/Makefile.am (dist-hook): fix make distdir
420 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
422 2003-01-27 Havoc Pennington <hp@pobox.com>
424 * dbus/dbus-mempool.c (time_for_size): replace printf with
427 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
428 empty lines; fix the SAVE_LENGTH stuff to be
429 START_LENGTH/END_LENGTH so it actually works; couple other
432 * test/Makefile.am (dist-hook): add dist-hook for .message files
434 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
435 can be constant or locked.
436 (_dbus_string_free): allow freeing a const string as
439 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
441 * dbus/dbus-test-main.c (main): take an argument which is the
442 directory containing test data
444 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
445 argument to this and load all the messages in test/data/
446 checking that they can be loaded or not loaded as appropriate.
448 2003-01-27 Anders Carlsson <andersca@codefactory.se>
450 * bus/dispatch.c: (bus_dispatch_message_handler):
451 Dispatch messages sent to services.
453 * bus/driver.c: (bus_driver_send_service_deleted),
454 (bus_driver_send_service_created), (bus_driver_send_service_lost),
455 (bus_driver_send_service_acquired):
456 Add helper functions for sending service related messages.
458 (bus_driver_send_welcome_message):
459 Send HELLO_REPLY instead of WELCOME.
461 (bus_driver_handle_list_services):
462 Send LIST_SERVICES_REPLY instead of SERVICES.
464 (bus_driver_handle_own_service),
465 (bus_driver_handle_service_exists):
466 New message handlers.
468 (bus_driver_handle_message):
469 Invoke new message handlers.
471 (bus_driver_remove_connection):
472 Don't remove any services here since that's done automatically
473 by bus_service_remove_owner now.
476 New function signatures.
478 * bus/services.c: (bus_service_add_owner):
479 Send ServiceAcquired message if we're the only primary owner.
481 (bus_service_remove_owner):
482 Send ServiceAcquired/ServiceLost messages.
484 (bus_service_set_prohibit_replacement),
485 (bus_service_get_prohibit_replacement):
486 Functions for setting prohibit replacement.
488 (bus_service_has_owner):
489 New function that checks if a connection is in the owner queue of
493 Add new function signatures.
495 * dbus/dbus-list.c: (_dbus_list_test):
496 Add tests for _dbus_list_remove_last and traversing the list backwards.
499 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
500 go any further, so return NULL then.
502 * dbus/dbus-protocol.h:
503 Add new messages, service flags and service replies.
505 2003-01-26 Havoc Pennington <hp@pobox.com>
507 * dbus/dbus-message-builder.c: implement, completely untested.
509 * test/data/*: add data to be used in testing.
510 ".message" files are our simple loadable text format.
511 ".message-raw" will be binary dumps of messages.
513 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
515 2003-01-26 Havoc Pennington <hp@pobox.com>
517 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
519 * dbus/dbus-errors.c (dbus_result_to_string): add
522 * dbus/dbus-message-builder.c: new file, will contain code to load
523 up messages from files. Not implemented yet.
525 2003-01-26 Havoc Pennington <hp@pobox.com>
527 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
528 the sender by setting to NULL
530 2003-01-26 Havoc Pennington <hp@pobox.com>
532 The unit tests pass, but otherwise untested. If it breaks, the
533 tests should have been better. ;-)
535 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
538 * dbus/dbus-message.c: redo everything so we maintain
539 message->header as the only copy of the various fields.
540 This avoids the possibility of out-of-memory in some cases,
541 for example dbus_message_lock() can't run out of memory anymore,
542 and avoids extra copying. Figured I may as well go ahead and do
543 this since it was busted for dbus_message_lock to not return
544 failure on OOM, and dbus_message_write_header was totally
545 unchecked for OOM. Also fixed some random other bugs.
547 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
548 that strings are nul-terminated. Also, end_pos can be equal
549 to string length just not greater than, I think.
550 (_dbus_marshal_set_int32): new function
551 (_dbus_marshal_set_uint32): new function
552 (_dbus_marshal_set_string): new function
554 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
555 a warning, init timeout_list to NULL
556 (dbus_connection_send_message): don't use uninitialized variable
559 * dbus/dbus-string.c (_dbus_string_replace_len): new function
561 2003-01-26 Anders Carlsson <andersca@codefactory.se>
563 * bus/driver.c: (bus_driver_handle_hello),
564 (bus_driver_send_welcome_message):
567 2003-01-26 Anders Carlsson <andersca@codefactory.se>
569 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
570 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
571 (dbus_connection_unref):
572 * dbus/dbus-marshal.c: (_dbus_marshal_test):
573 * dbus/dbus-message.c: (dbus_message_unref),
576 (dbus_message_get_fields):
577 Remove debugging printout.
579 (_dbus_message_loader_return_buffer):
580 Don't store the header string.
582 (_dbus_message_test):
585 2003-01-26 Richard Hult <rhult@codefactory.se>
587 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
588 the file descriptor list, since it can change under us.
590 2003-01-25 Anders Carlsson <andersca@codefactory.se>
592 * glib/dbus-gmain.c: (dbus_connection_prepare),
593 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
594 (remove_watch), (dbus_connection_hookup_with_g_main):
595 Rewrite the glib handling to use its own GSource instead of a
596 GIOChannel so we can catch messages put in the queue while waiting
599 2003-01-25 Anders Carlsson <andersca@codefactory.se>
602 * bus/connection.c: (connection_disconnect_handler),
603 (connection_watch_callback), (bus_connection_setup):
604 * bus/dispatch.c: (send_one_message),
605 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
606 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
608 * bus/driver.c: (bus_driver_send_service_deleted),
609 (bus_driver_send_service_created), (bus_driver_handle_hello),
610 (bus_driver_send_welcome_message),
611 (bus_driver_handle_list_services), (bus_driver_remove_connection),
612 (bus_driver_handle_message):
614 Refactor code, put the message dispatching in its own file. Use
615 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
618 2003-01-25 Anders Carlsson <andersca@codefactory.se>
620 * dbus/dbus-internals.h:
621 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
623 * dbus/dbus-message.c: (dbus_message_get_sender):
624 * dbus/dbus-message.h:
625 Implement dbus_message_get_sender.
627 * dbus/dbus-protocol.h:
628 Add message and service defines.
630 2003-01-25 Anders Carlsson <andersca@codefactory.se>
632 * dbus/dbus-connection.c: (dbus_connection_send_message):
633 * dbus/dbus-message-internal.h:
634 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
635 (dbus_message_write_header):
636 Remove _dbus_messag_unlock and don't set the client serial on a
637 message if one already exists.
639 2003-01-24 Havoc Pennington <hp@pobox.com>
641 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
644 * bus/driver.c (bus_driver_handle_list_services): fix a leak
647 2003-01-25 Anders Carlsson <andersca@codefactory.se>
649 * dbus/dbus-list.c: (alloc_link), (free_link):
650 Use a memory pool for the links.
652 2003-01-25 Anders Carlsson <andersca@codefactory.se>
654 * bus/connection.c: (bus_connection_foreach):
656 Add new bus_connection_foreach function.
658 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
659 Add function that broadcasts a message to all clients.
661 (bus_driver_send_service_created), (bus_driver_handle_hello),
662 (bus_driver_send_welcome_message),
663 (bus_driver_handle_list_services), (bus_driver_message_handler):
664 Implement functions that take care of listing services, and notifying
665 clients when new services are created.
667 * bus/services.c: (bus_services_list):
669 Add new function that returns an array of strings with the currently
674 Update copyright year.
676 2003-01-25 Anders Carlsson <andersca@codefactory.se>
678 * dbus/dbus-connection.c: (dbus_connection_send_message):
679 Unlock the message in case it was sent earlier.
681 (dbus_connection_send_message_with_reply_and_block):
682 Remove the reply message from the list.
684 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
685 Set array_len and new_pos correctly.
687 (_dbus_marshal_test):
690 * dbus/dbus-message-internal.h:
691 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
692 New function that returns the reply serial.
694 (_dbus_message_unlock):
695 New function that unlocks a message and resets its header.
697 (dbus_message_append_string_array),
698 (dbus_message_get_fields_valist),
699 (dbus_message_iter_get_field_type),
700 (dbus_message_iter_get_string_array),
701 (dbus_message_get_fields),
702 (dbus_message_append_fields_valist):
703 Handle string arrays.
705 (dbus_message_set_sender):
706 Make this function public since the bus daemon needs it.
708 (decode_header_data):
709 Set the reply serial to -1 initially.
711 * dbus/dbus-message.h:
712 Add dbus_message_set_sender.
714 2003-01-24 Havoc Pennington <hp@pobox.com>
716 * doc/dbus-specification.sgml: add some stuff
718 2003-01-22 Havoc Pennington <hp@pobox.com>
720 * doc/dbus-specification.sgml: Start to document the protocol.
722 2003-01-22 Havoc Pennington <hp@pobox.com>
724 * dbus/dbus-connection.c
725 (dbus_connection_send_message_with_reply_and_block): add some @todo
727 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
729 2003-01-21 Havoc Pennington <hp@pobox.com>
731 (patch untested because can't compile)
733 * bus/driver.c (create_unique_client_name): make this function
734 never recycle client names. Also, caller should initialize
737 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
739 2003-01-21 Anders Carlsson <andersca@codefactory.se>
741 * dbus/dbus-marshal.c: (_dbus_marshal_double),
742 (_dbus_marshal_int32), (_dbus_marshal_uint32),
743 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
744 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
745 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
746 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
747 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
748 * dbus/dbus-marshal.h:
749 * dbus/dbus-protocol.h:
750 Add support for marshalling and demarshalling integer, double
753 2003-01-21 Anders Carlsson <andersca@codefactory.se>
758 * bus/connection.c: (connection_disconnect_handler):
759 Remove the connection from the bus driver's list.
761 (connection_watch_callback): Dispatch messages.
763 (free_connection_data): Free connection name.
765 (bus_connection_setup): Add connection to the bus driver's list.
766 (bus_connection_remove_owned_service):
767 (bus_connection_set_name), (bus_connection_get_name):
768 Add functions for setting and getting the connection's name.
771 Add function headers.
773 * bus/driver.c: (create_unique_client_name),
774 (bus_driver_handle_hello_message),
775 (bus_driver_send_welcome_message), (bus_driver_message_handler),
776 (bus_driver_add_connection), (bus_driver_remove_connection):
779 * bus/services.c: (bus_service_free):
781 New file that handles communication and registreation with the bus
784 2003-01-21 Anders Carlsson <andersca@codefactory.se>
786 * dbus/dbus-connection.c: (dbus_connection_send_message):
787 Add a new client_serial parameter.
789 (dbus_connection_send_message_with_reply):
790 Remove a @todo since we've implemented the blocking function.
792 (dbus_connection_send_message_with_reply_and_block):
793 New function that sends a message and waits for a reply and
794 then returns the reply.
796 * dbus/dbus-connection.h:
799 * dbus/dbus-errors.c: (dbus_result_to_string):
800 * dbus/dbus-errors.h:
803 * dbus/dbus-message-internal.h:
804 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
805 (_dbus_message_set_sender), (dbus_message_write_header),
806 (dbus_message_new_reply), (decode_header_data),
807 (_dbus_message_loader_return_buffer), (_dbus_message_test):
808 * dbus/dbus-message.h:
809 Add new functions that set the reply serial and sender.
810 Also marshal and demarshal them correctly and add test.
812 * dbus/dbus-protocol.h:
813 Add new DBUS_MESSAGE_TYPE_SENDER.
816 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
817 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
818 (dbus_connection_hookup_with_g_main):
819 * glib/test-dbus-glib.c: (main):
820 Rewrite to use GIOChannel and remove the GSource crack.
822 * test/echo-client.c: (main):
823 * test/watch.c: (check_messages):
824 Update for changed APIs
826 2003-01-19 Anders Carlsson <andersca@codefactory.se>
828 * dbus/Makefile.am: Add dbus-timeout.[cħ]
830 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
831 Create a DBusTimeoutList.
832 (dbus_connection_set_timeout_functions): Add new function to
833 set timeout callbacks
835 * dbus/dbus-connection.h: Add public DBusTimeout API.
837 * dbus/dbus-message.c: (dbus_message_get_service):
838 * dbus/dbus-message.h: New function.
840 * dbus/dbus-server.c: Fix small doc typo.
842 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
844 2003-01-19 Anders Carlsson <andersca@codefactory.se>
846 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
847 of the string, just as long as specified.
849 2003-01-19 Havoc Pennington <hp@pobox.com>
851 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
854 * dbus/dbus-server.c (dbus_server_set_max_connections)
855 (dbus_server_get_max_connections, dbus_server_get_n_connections):
856 keep track of current number of connections, and add API for
857 setting a max (but haven't implemented enforcing the max yet)
859 2003-01-18 Havoc Pennington <hp@pobox.com>
861 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
862 reading/writing if read_watch != NULL or write_watch != NULL.
864 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
865 the message loader code to actually load message->header and
866 message->body into the newly-created message.
868 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
871 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
872 (dbus_connection_get_max_message_size)
873 (dbus_connection_set_max_live_messages_size)
874 (dbus_connection_get_max_live_messages_size): implement some
875 resource limitation functions
877 * dbus/dbus-resources.c: new file implementing some of the
878 resource limits stuff
880 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
881 missing docs, add @todo to handle OOM etc.
883 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
886 2003-01-18 Havoc Pennington <hp@pobox.com>
888 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
889 connection if it hasn't been already.
891 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
892 replace with DisconnectFunction.
894 2003-01-18 Havoc Pennington <hp@pobox.com>
896 Building --disable-verbose-mode --disable-asserts --disable-tests
897 cuts the library from 112K to 45K or so
899 * configure.in: check for varargs macro support,
900 add --enable-verbose-mode, --enable-asserts.
902 * dbus/dbus-internals.h (_dbus_assert): support
904 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
906 2003-01-18 Havoc Pennington <hp@pobox.com>
908 * dbus/dbus-test.c: include config.h so that tests actually run
910 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
911 so the failure mode when that assumption fails will be plenty
914 2003-01-18 Havoc Pennington <hp@pobox.com>
916 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
918 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
921 * test/Makefile.am: don't use special variable "TESTS" for echo-*
922 since we don't want to use those in make check
924 2003-01-15 Havoc Pennington <hp@redhat.com>
930 2003-01-15 Havoc Pennington <hp@redhat.com>
932 * test/Makefile.am: fix so that test source code ends up in the
933 distribution on make distcheck
935 2003-01-15 Havoc Pennington <hp@redhat.com>
941 2003-01-15 Havoc Pennington <hp@redhat.com>
943 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
944 fix build when --disable-tests
946 * Makefile.am (EXTRA_DIST): put HACKING in here
948 * HACKING: document procedure for making a tarball release.
950 2003-01-14 Anders Carlsson <andersca@codefactory.se>
952 * bus/connection.c: (connection_error_handler),
953 (bus_connection_setup):
954 * bus/main.c: (main):
955 Make sure that the DBusConnectionData struct is NULLed
956 out to prevent a segfault.
958 * dbus/dbus-errors.c: (dbus_result_to_string):
959 * dbus/dbus-errors.h:
960 * dbus/dbus-message.c: (dbus_message_get_fields),
961 (dbus_message_get_fields_valist), (_dbus_message_test):
962 * dbus/dbus-message.h:
963 Make dbus_message_get_fields return a result code so we can
964 track invalid fields as well as oom.
966 2003-01-11 Havoc Pennington <hp@pobox.com>
968 * configure.in: change --enable-test/--enable-ansi action-if-given
969 to enable_foo=$enableval instead of enable_foo=yes
971 2003-01-08 Havoc Pennington <hp@pobox.com>
973 * dbus/dbus-string.c (_dbus_string_align_length): new function
975 * dbus/dbus-test-main.c: move main() for test app here
977 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
978 symbol to run tests, because dbus-test isn't in the main
981 Code review nitpicks.
983 * dbus/dbus-message.c (dbus_message_write_header): add newlines
984 for people with narrow emacs ;-). Assert client_serial was filled
985 in. Assert message->name != NULL.
986 (dbus_message_append_fields): have "first_field_type" arg separate
987 from va list, needed for C++ binding that also uses varargs IIRC
988 and helps with type safety
989 (dbus_message_new): add @todo about using DBusString to store
990 service/name internally
991 (dbus_message_new): don't leak ->service and ->name on OOM later
993 (dbus_message_unref): free the service name
994 (dbus_message_get_fields): same change to varargs
995 i.e. first_field_type
996 (_dbus_message_loader_return_buffer): assert that the message data
997 is aligned (if not it's a bug in our code). Put in verbose griping
998 about why we set corrupted = TRUE.
999 (decode_header_data): add FIXME that char* is evil. Was going to
1000 add FIXME about evil locale-specific string.h strncmp, but just
1001 switched to wacky string-as-uint32 optimization. Move check for
1002 "no room for field name" above get_const_data_len() to avoid
1003 assertion failure in get_const_data_len if we have trailing 2
1004 bytes or the like. Check for service and name fields being
1005 provided twice. Don't leak service/name on error. Require field
1006 names to be aligned to 4 bytes.
1008 * dbus/dbus-marshal.c: move byte swap stuff to header
1009 (_dbus_pack_int32): uscore-prefix
1010 (_dbus_unpack_int32): uscore-prefix
1011 (_dbus_unpack_uint32): export
1012 (_dbus_demarshal_string): add @todo complaining about use of
1014 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1015 handling allowing corrupt data to go unchecked
1017 2003-01-08 Havoc Pennington <hp@redhat.com>
1019 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1020 to the select() as needed for authentication. (should be using
1021 _dbus_poll() not select, but for another day)
1023 * dbus/dbus.h: include dbus/dbus-protocol.h
1025 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1027 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1030 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1032 * dbus/dbus-internals.c: (_dbus_type_to_string):
1033 New function that returns a string describing a type.
1035 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1036 * dbus/dbus-marshal.h:
1037 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1038 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1039 (dbus_message_iter_get_byte_array):
1040 * dbus/dbus-message.h:
1041 Add new convenience functions for appending and getting message fields.
1042 Also add demarshalling routines for byte arrays.
1044 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1046 * dbus/dbus-connection-internal.h:
1047 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1048 (_dbus_connection_get_next_client_serial),
1049 (dbus_connection_send_message):
1050 * dbus/dbus-internals.h:
1051 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1052 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1053 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1054 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1055 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1056 (_dbus_verbose_bytes), (_dbus_marshal_test):
1057 * dbus/dbus-marshal.h:
1058 * dbus/dbus-message-internal.h:
1059 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1060 (dbus_message_write_header), (_dbus_message_lock),
1061 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1062 (dbus_message_get_name), (dbus_message_append_int32),
1063 (dbus_message_append_uint32), (dbus_message_append_double),
1064 (dbus_message_append_string), (dbus_message_append_byte_array),
1065 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1066 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1067 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1068 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1069 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1070 (decode_header_data), (_dbus_message_loader_return_buffer),
1071 (message_iter_test), (_dbus_message_test):
1072 * dbus/dbus-message.h:
1073 * dbus/dbus-protocol.h:
1074 * dbus/dbus-test.c: (main):
1076 * glib/test-dbus-glib.c: (message_handler), (main):
1077 * test/echo-client.c: (main):
1078 * test/watch.c: (check_messages):
1079 Make messages sendable and receivable for real.
1081 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1083 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1084 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1085 * dbus/dbus-message.c: (dbus_message_append_int32),
1086 (dbus_message_append_uint32), (dbus_message_append_double),
1087 (dbus_message_append_string), (dbus_message_append_byte_array):
1088 Handle OOM restoration.
1090 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1092 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1093 (_dbus_demarshal_string), (_dbus_marshal_test):
1094 * dbus/dbus-marshal.h:
1095 * dbus/dbus-message.c: (dbus_message_get_name),
1096 Document these functions.
1098 (dbus_message_append_int32), (dbus_message_append_uint32),
1099 (dbus_message_append_double), (dbus_message_append_string),
1100 (dbus_message_append_byte_array):
1101 * dbus/dbus-message.h:
1102 Add functions for adding message fields of different types.
1104 * dbus/dbus-protocol.h:
1105 Add the different types.
1107 2003-01-05 Havoc Pennington <hp@pobox.com>
1109 * bus/connection.c: implement routines for handling connections,
1110 first thing is keeping a list of owned services on each connection
1111 and setting up watches etc.
1113 * bus/services.c: implement a mapping from service names to lists
1116 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1118 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1119 to use static mutexes for global data
1121 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1122 collection of functions to set/get application-specific data
1123 on the DBusConnection.
1125 2003-01-04 Havoc Pennington <hp@pobox.com>
1127 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1128 (_dbus_poll): new function
1130 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1133 * bus/loop.c: initial code for the daemon main loop
1135 2003-01-04 Havoc Pennington <hp@pobox.com>
1137 * test/watch.c (error_handler): make it safe if the error handler
1138 is called multiple times (if we s/error handler/disconnect
1139 handler/ we should just guarantee it's called only once)
1141 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1142 error handler on disconnect (it's quite possible we should
1143 just change the error handler to a "disconnect handler," I'm
1144 not sure we have any other meaningful errors)
1146 * configure.in: check for getpwnam_r
1148 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1149 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1150 mechanism as in SASL spec, using socket credentials
1152 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1153 (_dbus_send_credentials_unix_socket): new function
1155 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1157 (_dbus_write): only check errno if <0 returned
1158 (_dbus_write_two): ditto
1160 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1162 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1163 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1164 (_dbus_marshal_test):
1165 * dbus/dbus-marshal.h:
1166 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1167 to _dbus_marshal_utf8_string. Also fix some tests.
1169 2002-12-28 Harri Porten <porten@kde.org>
1171 * configure.in: added check for C++ compiler and a very cheesy
1172 check for the Qt integration
1174 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1176 * qt/Makefile.am: added
1178 * qt/.cvsignore: added
1180 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1181 latter, added #ifdef QT_THREAD_SUPPORT guard.
1183 * dbus/Makefile.am: added missing headers for make dist
1185 2002-12-28 Kristian Rietveld <kris@gtk.org>
1187 * dbus/Makefile.am: fixup export-symbols-regex.
1189 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1191 * acinclude.m4: Add this file and put the
1192 PKG_CHECK_MODULE macro in it.
1194 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1196 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1197 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1198 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1199 (_dbus_marshal_test):
1200 Make the demarshalling routines align the pos argument.
1201 Add string marshalling tests and fix the obvious bugs
1204 2002-12-26 Havoc Pennington <hp@pobox.com>
1206 * dbus/dbus-auth.c: fixes fixes fixes
1208 * dbus/dbus-transport-unix.c: wire up support for
1209 encoding/decoding data on the wire
1211 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1212 (_dbus_auth_decode_data): append to target string
1213 instead of nuking it.
1215 2002-12-26 Havoc Pennington <hp@pobox.com>
1217 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1218 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1221 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1222 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1223 now). Main point is because I wanted unpack_uint32 to implement
1225 (_dbus_verbose_bytes): new function
1227 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1229 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1230 mechanism to handle a corrupt message stream
1231 (_dbus_message_loader_new): fix preallocation to only prealloc,
1234 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1235 (_dbus_string_test): enhance tests for copy/move and fix the
1238 * dbus/dbus-transport-unix.c: Hold references in more places to
1239 avoid reentrancy problems
1241 * dbus/dbus-transport.c: ditto
1243 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1244 leak reference count in no-message case
1246 * test/watch.c (do_mainloop): handle adding/removing watches
1247 during iteration over the watches. Also, ref the connection/server
1248 stored on a watch, so we don't try to mangle a destroyed one.
1250 * dbus/dbus-transport-unix.c (do_authentication): perform
1253 * dbus/dbus-auth.c (get_state): add a state
1254 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1255 (_dbus_auth_get_unused_bytes): append the unused bytes
1256 to the passed in string, rather than prepend
1258 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1259 the auth conversation DBusAuth
1261 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1262 (_dbus_transport_new_for_domain_socket): when creating a
1263 transport, pass in whether it's a client-side or server-side
1264 transport so we know which DBusAuth to create
1266 2002-12-03 Havoc Pennington <hp@pobox.com>
1268 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1269 _after_ finalizing the derived members
1270 (unix_connection_set): unref watch if we fail to add it
1272 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1273 transport first, so that the connection owned by the
1274 transport will be valid as the transport finalizes.
1276 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1277 if necessary, and remove watches from the connection.
1279 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1281 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1283 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1284 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1285 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1286 (_dbus_marshal_test):
1287 * dbus/dbus-marshal.h:
1288 Add string marshal functions and have the demarshal functions
1289 return the new position.
1291 2002-12-25 Havoc Pennington <hp@pobox.com>
1293 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1294 it is a simple protocol that just maps directly to SASL.
1296 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1297 initial implementation, not actually used yet.
1299 * dbus/dbus-string.c (_dbus_string_find): new function
1300 (_dbus_string_equal): new function
1301 (_dbus_string_base64_encode): new function
1302 (_dbus_string_base64_decode): new function
1304 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1307 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1308 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1309 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1310 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1311 * dbus/dbus-marshal.h:
1312 * dbus/dbus-protocol.h:
1313 * dbus/dbus-test.c: (main):
1315 Add un-optimized marshalling/demarshalling routines.
1317 2002-12-25 Harri Porten <porten@kde.org>
1319 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1321 2002-12-24 Zack Rusin <zack@kde.org>
1323 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1324 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1327 2002-12-24 Havoc Pennington <hp@pobox.com>
1329 * glib/dbus-gthread.c: fix include
1331 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1332 I think glib API needs to change, though, as you don't
1333 want to use DBusMessageFunction, you want to use the
1334 DBusMessageHandler object. Probably
1335 dbus_connection_open_with_g_main_loop()
1336 and dbus_connection_setup_g_main_loop() or something like that
1337 (but think of better names...) that just create a connection
1338 that has watch/timeout functions etc. already set up.
1340 * dbus/dbus-connection.c
1341 (dbus_connection_send_message_with_reply): new function just to
1342 show how the message handler helps us deal with replies.
1344 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1346 * dbus/dbus-string.c (_dbus_string_test): free a string that
1349 * dbus/dbus-hash.c: use memory pools for the hash entries
1350 (rebuild_table): be more paranoid about overflow, and
1351 shrink table when we can
1352 (_dbus_hash_test): reduce number of sprintfs and write
1353 valid C89. Add tests for case where we grow and then
1354 shrink the hash table.
1356 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1358 * dbus/dbus-connection.c (dbus_connection_register_handler)
1359 (dbus_connection_unregister_handler): new functions
1361 * dbus/dbus-message.c (dbus_message_get_name): new
1363 * dbus/dbus-list.c: fix docs typo
1365 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1366 an object representing a handler for messages.
1368 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1371 * glib/dbus-gthread.c: (dbus_gthread_init):
1372 Don't use the gdbus prefix for public functions.
1374 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1378 Add GLib checks and fixup .pc files
1382 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1383 (gdbus_connection_check), (gdbus_connection_dispatch),
1384 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1385 (dbus_connection_gsource_new):
1386 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1387 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1388 * glib/test-dbus-glib.c: (message_handler), (main):
1391 2002-12-15 Harri Porten <porten@kde.org>
1393 * autogen.sh: check for libtoolize before attempting to use it
1395 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1398 * .cvsignore: ignore more stamp files
1400 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1402 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1403 without make install.
1405 2002-12-15 Havoc Pennington <hp@pobox.com>
1407 * dbus/dbus-threads.c: add thread stubs that a higher library
1408 layer can fill in. e.g. the GLib wrapper might fill them in with
1409 GThread stuff. We still need to use this thread API to
1410 thread-safe-ize the library.
1412 2002-12-12 Havoc Pennington <hp@pobox.com>
1414 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1415 below new interfaces and include fewer system headers.
1417 * dbus/dbus-sysdeps.c (_dbus_read): new function
1418 (_dbus_write): new function
1419 (_dbus_write_two): new function
1420 (_dbus_connect_unix_socket): new function
1421 (_dbus_listen_unix_socket): new function
1423 * dbus/dbus-message-internal.h: change interfaces to use
1426 2002-12-11 Havoc Pennington <hp@pobox.com>
1428 * dbus/dbus-types.h: add dbus_unichar
1430 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1432 * dbus/dbus-connection.c (dbus_connection_send_message): return
1435 * dbus/dbus-transport.c: include dbus-watch.h
1437 * dbus/dbus-connection.c: include dbus-message-internal.h
1439 * HACKING: add file with coding guidelines stuff.
1441 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1442 handling here, for security purposes (as in vsftpd). Not actually
1443 using this class yet.
1445 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1446 system/libc usage here, as in vsftpd, for ease of auditing (and
1447 should also simplify portability). Haven't actually moved all the
1448 system/libc usage into here yet.
1450 2002-11-25 Havoc Pennington <hp@pobox.com>
1452 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1453 always print the first verbose message.
1455 2002-11-24 Havoc Pennington <hp@pobox.com>
1457 * test/echo-client.c, test/echo-server.c: cheesy test
1460 * configure.in (AC_CHECK_FUNCS): check for writev
1462 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1465 * dbus/dbus-list.c (_dbus_list_foreach): new function
1467 * dbus/dbus-internals.c (_dbus_verbose): new function
1469 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1470 representing a server that listens for connections.
1472 * dbus/.cvsignore: create
1474 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1475 public API for reporting errors
1477 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1478 public object representing a connection that
1479 sends/receives messages. (Same object used for
1480 both client and server.)
1482 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1483 Basic abstraction for different kinds of stream
1484 that we might read/write messages from.
1486 2002-11-23 Havoc Pennington <hp@pobox.com>
1488 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1491 * dbus/dbus-test.c (main): add list test, and include
1492 dbus-test.h as intended
1494 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1495 (_dbus_hash_table_remove_int): return value indicates
1496 whether the entry existed to remove
1498 * dbus/dbus-list.c: add linked list utility class,
1501 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1504 2002-11-23 Havoc Pennington <hp@pobox.com>
1506 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1507 DBUS_END_DECLS to nothing, that should fix this once and for all
1509 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1511 * dbus/dbus-message.c, dbus/dbus-hash.c:
1512 add some missing @brief
1514 2002-11-23 Havoc Pennington <hp@pobox.com>
1516 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1517 to avoid confusing Doxygen
1519 * dbus/dbus-hash.c: @} not }@
1521 * dbus/dbus-message.c (struct DBusMessage): split out
1524 2002-11-23 Havoc Pennington <hp@pobox.com>
1526 * configure.in: pile on more warning flags if using gcc
1528 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1529 to document static functions
1531 * configure.in: add summary to end of configure so it
1532 looks nice and attractive
1534 * dbus/dbus-hash.c: finish implementation and write unit
1537 * configure.in: add --enable-tests to enable unit tests
1539 * dbus/dbus-test.c: test program to run unit tests
1540 for all files in dbus/*, initially runs a test for
1543 * dbus/dbus-internals.h: file to hold some internal utility stuff
1545 2002-11-22 Havoc Pennington <hp@redhat.com>
1547 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1548 "ported" away from Tcl
1550 * dbus/dbus-types.h: header for types such as dbus_bool_t
1552 2002-11-22 Havoc Pennington <hp@redhat.com>
1554 * dbus/dbus.h: fixups for doc warnings
1556 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1558 (QUIET): make it quiet so we can see warnings
1560 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1562 2002-11-22 Havoc Pennington <hp@redhat.com>
1564 * Makefile.am: include "Doxyfile" target in all-local
1566 * configure.in: generate the Doxyfile
1568 * Doxyfile.in: move Doxyfile here, so we can use
1569 configure to generate a Doxyfile with the right
1572 2002-11-22 Havoc Pennington <hp@redhat.com>
1574 * dbus/dbus-message.c: move inline docs into .c file
1576 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1577 so all docs are under doc/
1578 (MAN_EXTENSION): generate man pages. Use extension
1579 ".3dbus" which matches ".3qt" on my system,
1580 I guess this is OK, I don't know really.
1581 (FILE_PATTERNS): look for .c files not .h, makes sense
1584 2002-11-22 Havoc Pennington <hp@pobox.com>
1586 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1587 because any app can be a server, and any app can be a client,
1588 the bus is a special kind of server.
1590 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1592 * Doxyfile : adding. Still needs Makefile rules to be generated
1593 automatically (just run "doxygen" in the toplevel dir for now to
1596 * dbus/dbus-message.h : Adding sample docs (javadoc since
1597 resembles gtk-doc a little more)
1599 * dbus/dbus.h : Adding sample docs
1601 2002-11-21 Havoc Pennington <hp@redhat.com>
1603 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1604 so we can allow ourselves to include files directly,
1605 instead of having to use dbus.h
1607 * dbus/dbus.h: fill in
1609 * dbus/dbus-message.h: sketch out a sample header file.
1610 Include griping if you include it directly instead of
1613 * dbus/dbus-macros.h: new file with macros for extern "C",
1614 TRUE/FALSE, NULL, etc.
1616 * doc/file-boilerplate.c: put include guards in here
1618 2002-11-21 Havoc Pennington <hp@redhat.com>
1620 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1622 * COPYING: include the GPL as well, and license code
1623 under both AFL and GPL.
1625 2002-11-21 Havoc Pennington <hp@redhat.com>
1627 * acconfig.h: get rid of this
1629 * autogen.sh (run_configure): add --no-configure option
1631 * configure.in: remove AC_ARG_PROGRAM to make
1632 autoconf complain less. add AC_PREREQ.
1633 add AC_DEFINE third arg.
1635 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1638 Fix references so we can distcheck.
1640 2002-11-21 Havoc Pennington <hp@redhat.com>
1642 * Initial module creation