1 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3 * dbus/dbus-connection-internal.h:
4 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5 (_dbus_connection_remove_timeout):
6 Add functions for adding and removing timeouts.
8 * dbus/dbus-message.c: (dbus_message_new_from_message):
9 Add new function that takes a message and creates an exact
10 copy of it, but with the refcount set to 1.
11 (check_message_handling):
14 * dbus/dbus-server-protected.h:
15 * dbus/dbus-server.c: (_dbus_server_init_base),
16 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
17 (dbus_server_set_timeout_functions):
18 (_dbus_server_remove_timeout):
19 New functions so that a server can add and remove timeouts.
22 Add commented out call to dbus_server_debug_new.
24 * dbus/dbus-timeout.c: (_dbus_timeout_new):
25 Actually set the handler, doh.
27 * dbus/dbus-transport.c: (_dbus_transport_open):
28 Add commented out call to dbus_transport_debug_client_new.
31 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
33 2003-01-28 Havoc Pennington <hp@pobox.com>
35 * dbus/dbus-message.c (check_message_handling): function to check
36 on the loaded message, iterates over it etc.
38 2003-01-28 Havoc Pennington <hp@pobox.com>
40 * test/Makefile.am (dist-hook): fix make distdir
42 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
44 2003-01-27 Havoc Pennington <hp@pobox.com>
46 * dbus/dbus-mempool.c (time_for_size): replace printf with
49 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
50 empty lines; fix the SAVE_LENGTH stuff to be
51 START_LENGTH/END_LENGTH so it actually works; couple other
54 * test/Makefile.am (dist-hook): add dist-hook for .message files
56 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
57 can be constant or locked.
58 (_dbus_string_free): allow freeing a const string as
61 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
63 * dbus/dbus-test-main.c (main): take an argument which is the
64 directory containing test data
66 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
67 argument to this and load all the messages in test/data/
68 checking that they can be loaded or not loaded as appropriate.
70 2003-01-27 Anders Carlsson <andersca@codefactory.se>
72 * bus/dispatch.c: (bus_dispatch_message_handler):
73 Dispatch messages sent to services.
75 * bus/driver.c: (bus_driver_send_service_deleted),
76 (bus_driver_send_service_created), (bus_driver_send_service_lost),
77 (bus_driver_send_service_acquired):
78 Add helper functions for sending service related messages.
80 (bus_driver_send_welcome_message):
81 Send HELLO_REPLY instead of WELCOME.
83 (bus_driver_handle_list_services):
84 Send LIST_SERVICES_REPLY instead of SERVICES.
86 (bus_driver_handle_own_service),
87 (bus_driver_handle_service_exists):
90 (bus_driver_handle_message):
91 Invoke new message handlers.
93 (bus_driver_remove_connection):
94 Don't remove any services here since that's done automatically
95 by bus_service_remove_owner now.
98 New function signatures.
100 * bus/services.c: (bus_service_add_owner):
101 Send ServiceAcquired message if we're the only primary owner.
103 (bus_service_remove_owner):
104 Send ServiceAcquired/ServiceLost messages.
106 (bus_service_set_prohibit_replacement),
107 (bus_service_get_prohibit_replacement):
108 Functions for setting prohibit replacement.
110 (bus_service_has_owner):
111 New function that checks if a connection is in the owner queue of
115 Add new function signatures.
117 * dbus/dbus-list.c: (_dbus_list_test):
118 Add tests for _dbus_list_remove_last and traversing the list backwards.
121 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
122 go any further, so return NULL then.
124 * dbus/dbus-protocol.h:
125 Add new messages, service flags and service replies.
127 2003-01-26 Havoc Pennington <hp@pobox.com>
129 * dbus/dbus-message-builder.c: implement, completely untested.
131 * test/data/*: add data to be used in testing.
132 ".message" files are our simple loadable text format.
133 ".message-raw" will be binary dumps of messages.
135 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
137 2003-01-26 Havoc Pennington <hp@pobox.com>
139 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
141 * dbus/dbus-errors.c (dbus_result_to_string): add
144 * dbus/dbus-message-builder.c: new file, will contain code to load
145 up messages from files. Not implemented yet.
147 2003-01-26 Havoc Pennington <hp@pobox.com>
149 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
150 the sender by setting to NULL
152 2003-01-26 Havoc Pennington <hp@pobox.com>
154 The unit tests pass, but otherwise untested. If it breaks, the
155 tests should have been better. ;-)
157 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
160 * dbus/dbus-message.c: redo everything so we maintain
161 message->header as the only copy of the various fields.
162 This avoids the possibility of out-of-memory in some cases,
163 for example dbus_message_lock() can't run out of memory anymore,
164 and avoids extra copying. Figured I may as well go ahead and do
165 this since it was busted for dbus_message_lock to not return
166 failure on OOM, and dbus_message_write_header was totally
167 unchecked for OOM. Also fixed some random other bugs.
169 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
170 that strings are nul-terminated. Also, end_pos can be equal
171 to string length just not greater than, I think.
172 (_dbus_marshal_set_int32): new function
173 (_dbus_marshal_set_uint32): new function
174 (_dbus_marshal_set_string): new function
176 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
177 a warning, init timeout_list to NULL
178 (dbus_connection_send_message): don't use uninitialized variable
181 * dbus/dbus-string.c (_dbus_string_replace_len): new function
183 2003-01-26 Anders Carlsson <andersca@codefactory.se>
185 * bus/driver.c: (bus_driver_handle_hello),
186 (bus_driver_send_welcome_message):
189 2003-01-26 Anders Carlsson <andersca@codefactory.se>
191 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
192 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
193 (dbus_connection_unref):
194 * dbus/dbus-marshal.c: (_dbus_marshal_test):
195 * dbus/dbus-message.c: (dbus_message_unref),
198 (dbus_message_get_fields):
199 Remove debugging printout.
201 (_dbus_message_loader_return_buffer):
202 Don't store the header string.
204 (_dbus_message_test):
207 2003-01-26 Richard Hult <rhult@codefactory.se>
209 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
210 the file descriptor list, since it can change under us.
212 2003-01-25 Anders Carlsson <andersca@codefactory.se>
214 * glib/dbus-gmain.c: (dbus_connection_prepare),
215 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
216 (remove_watch), (dbus_connection_hookup_with_g_main):
217 Rewrite the glib handling to use its own GSource instead of a
218 GIOChannel so we can catch messages put in the queue while waiting
221 2003-01-25 Anders Carlsson <andersca@codefactory.se>
224 * bus/connection.c: (connection_disconnect_handler),
225 (connection_watch_callback), (bus_connection_setup):
226 * bus/dispatch.c: (send_one_message),
227 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
228 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
230 * bus/driver.c: (bus_driver_send_service_deleted),
231 (bus_driver_send_service_created), (bus_driver_handle_hello),
232 (bus_driver_send_welcome_message),
233 (bus_driver_handle_list_services), (bus_driver_remove_connection),
234 (bus_driver_handle_message):
236 Refactor code, put the message dispatching in its own file. Use
237 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
240 2003-01-25 Anders Carlsson <andersca@codefactory.se>
242 * dbus/dbus-internals.h:
243 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
245 * dbus/dbus-message.c: (dbus_message_get_sender):
246 * dbus/dbus-message.h:
247 Implement dbus_message_get_sender.
249 * dbus/dbus-protocol.h:
250 Add message and service defines.
252 2003-01-25 Anders Carlsson <andersca@codefactory.se>
254 * dbus/dbus-connection.c: (dbus_connection_send_message):
255 * dbus/dbus-message-internal.h:
256 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
257 (dbus_message_write_header):
258 Remove _dbus_messag_unlock and don't set the client serial on a
259 message if one already exists.
261 2003-01-24 Havoc Pennington <hp@pobox.com>
263 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
266 * bus/driver.c (bus_driver_handle_list_services): fix a leak
269 2003-01-25 Anders Carlsson <andersca@codefactory.se>
271 * dbus/dbus-list.c: (alloc_link), (free_link):
272 Use a memory pool for the links.
274 2003-01-25 Anders Carlsson <andersca@codefactory.se>
276 * bus/connection.c: (bus_connection_foreach):
278 Add new bus_connection_foreach function.
280 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
281 Add function that broadcasts a message to all clients.
283 (bus_driver_send_service_created), (bus_driver_handle_hello),
284 (bus_driver_send_welcome_message),
285 (bus_driver_handle_list_services), (bus_driver_message_handler):
286 Implement functions that take care of listing services, and notifying
287 clients when new services are created.
289 * bus/services.c: (bus_services_list):
291 Add new function that returns an array of strings with the currently
296 Update copyright year.
298 2003-01-25 Anders Carlsson <andersca@codefactory.se>
300 * dbus/dbus-connection.c: (dbus_connection_send_message):
301 Unlock the message in case it was sent earlier.
303 (dbus_connection_send_message_with_reply_and_block):
304 Remove the reply message from the list.
306 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
307 Set array_len and new_pos correctly.
309 (_dbus_marshal_test):
312 * dbus/dbus-message-internal.h:
313 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
314 New function that returns the reply serial.
316 (_dbus_message_unlock):
317 New function that unlocks a message and resets its header.
319 (dbus_message_append_string_array),
320 (dbus_message_get_fields_valist),
321 (dbus_message_iter_get_field_type),
322 (dbus_message_iter_get_string_array),
323 (dbus_message_get_fields),
324 (dbus_message_append_fields_valist):
325 Handle string arrays.
327 (dbus_message_set_sender):
328 Make this function public since the bus daemon needs it.
330 (decode_header_data):
331 Set the reply serial to -1 initially.
333 * dbus/dbus-message.h:
334 Add dbus_message_set_sender.
336 2003-01-24 Havoc Pennington <hp@pobox.com>
338 * doc/dbus-specification.sgml: add some stuff
340 2003-01-22 Havoc Pennington <hp@pobox.com>
342 * doc/dbus-specification.sgml: Start to document the protocol.
344 2003-01-22 Havoc Pennington <hp@pobox.com>
346 * dbus/dbus-connection.c
347 (dbus_connection_send_message_with_reply_and_block): add some @todo
349 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
351 2003-01-21 Havoc Pennington <hp@pobox.com>
353 (patch untested because can't compile)
355 * bus/driver.c (create_unique_client_name): make this function
356 never recycle client names. Also, caller should initialize
359 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
361 2003-01-21 Anders Carlsson <andersca@codefactory.se>
363 * dbus/dbus-marshal.c: (_dbus_marshal_double),
364 (_dbus_marshal_int32), (_dbus_marshal_uint32),
365 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
366 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
367 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
368 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
369 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
370 * dbus/dbus-marshal.h:
371 * dbus/dbus-protocol.h:
372 Add support for marshalling and demarshalling integer, double
375 2003-01-21 Anders Carlsson <andersca@codefactory.se>
380 * bus/connection.c: (connection_disconnect_handler):
381 Remove the connection from the bus driver's list.
383 (connection_watch_callback): Dispatch messages.
385 (free_connection_data): Free connection name.
387 (bus_connection_setup): Add connection to the bus driver's list.
388 (bus_connection_remove_owned_service):
389 (bus_connection_set_name), (bus_connection_get_name):
390 Add functions for setting and getting the connection's name.
393 Add function headers.
395 * bus/driver.c: (create_unique_client_name),
396 (bus_driver_handle_hello_message),
397 (bus_driver_send_welcome_message), (bus_driver_message_handler),
398 (bus_driver_add_connection), (bus_driver_remove_connection):
401 * bus/services.c: (bus_service_free):
403 New file that handles communication and registreation with the bus
406 2003-01-21 Anders Carlsson <andersca@codefactory.se>
408 * dbus/dbus-connection.c: (dbus_connection_send_message):
409 Add a new client_serial parameter.
411 (dbus_connection_send_message_with_reply):
412 Remove a @todo since we've implemented the blocking function.
414 (dbus_connection_send_message_with_reply_and_block):
415 New function that sends a message and waits for a reply and
416 then returns the reply.
418 * dbus/dbus-connection.h:
421 * dbus/dbus-errors.c: (dbus_result_to_string):
422 * dbus/dbus-errors.h:
425 * dbus/dbus-message-internal.h:
426 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
427 (_dbus_message_set_sender), (dbus_message_write_header),
428 (dbus_message_new_reply), (decode_header_data),
429 (_dbus_message_loader_return_buffer), (_dbus_message_test):
430 * dbus/dbus-message.h:
431 Add new functions that set the reply serial and sender.
432 Also marshal and demarshal them correctly and add test.
434 * dbus/dbus-protocol.h:
435 Add new DBUS_MESSAGE_TYPE_SENDER.
438 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
439 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
440 (dbus_connection_hookup_with_g_main):
441 * glib/test-dbus-glib.c: (main):
442 Rewrite to use GIOChannel and remove the GSource crack.
444 * test/echo-client.c: (main):
445 * test/watch.c: (check_messages):
446 Update for changed APIs
448 2003-01-19 Anders Carlsson <andersca@codefactory.se>
450 * dbus/Makefile.am: Add dbus-timeout.[cħ]
452 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
453 Create a DBusTimeoutList.
454 (dbus_connection_set_timeout_functions): Add new function to
455 set timeout callbacks
457 * dbus/dbus-connection.h: Add public DBusTimeout API.
459 * dbus/dbus-message.c: (dbus_message_get_service):
460 * dbus/dbus-message.h: New function.
462 * dbus/dbus-server.c: Fix small doc typo.
464 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
466 2003-01-19 Anders Carlsson <andersca@codefactory.se>
468 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
469 of the string, just as long as specified.
471 2003-01-19 Havoc Pennington <hp@pobox.com>
473 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
476 * dbus/dbus-server.c (dbus_server_set_max_connections)
477 (dbus_server_get_max_connections, dbus_server_get_n_connections):
478 keep track of current number of connections, and add API for
479 setting a max (but haven't implemented enforcing the max yet)
481 2003-01-18 Havoc Pennington <hp@pobox.com>
483 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
484 reading/writing if read_watch != NULL or write_watch != NULL.
486 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
487 the message loader code to actually load message->header and
488 message->body into the newly-created message.
490 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
493 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
494 (dbus_connection_get_max_message_size)
495 (dbus_connection_set_max_live_messages_size)
496 (dbus_connection_get_max_live_messages_size): implement some
497 resource limitation functions
499 * dbus/dbus-resources.c: new file implementing some of the
500 resource limits stuff
502 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
503 missing docs, add @todo to handle OOM etc.
505 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
508 2003-01-18 Havoc Pennington <hp@pobox.com>
510 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
511 connection if it hasn't been already.
513 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
514 replace with DisconnectFunction.
516 2003-01-18 Havoc Pennington <hp@pobox.com>
518 Building --disable-verbose-mode --disable-asserts --disable-tests
519 cuts the library from 112K to 45K or so
521 * configure.in: check for varargs macro support,
522 add --enable-verbose-mode, --enable-asserts.
524 * dbus/dbus-internals.h (_dbus_assert): support
526 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
528 2003-01-18 Havoc Pennington <hp@pobox.com>
530 * dbus/dbus-test.c: include config.h so that tests actually run
532 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
533 so the failure mode when that assumption fails will be plenty
536 2003-01-18 Havoc Pennington <hp@pobox.com>
538 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
540 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
543 * test/Makefile.am: don't use special variable "TESTS" for echo-*
544 since we don't want to use those in make check
546 2003-01-15 Havoc Pennington <hp@redhat.com>
552 2003-01-15 Havoc Pennington <hp@redhat.com>
554 * test/Makefile.am: fix so that test source code ends up in the
555 distribution on make distcheck
557 2003-01-15 Havoc Pennington <hp@redhat.com>
563 2003-01-15 Havoc Pennington <hp@redhat.com>
565 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
566 fix build when --disable-tests
568 * Makefile.am (EXTRA_DIST): put HACKING in here
570 * HACKING: document procedure for making a tarball release.
572 2003-01-14 Anders Carlsson <andersca@codefactory.se>
574 * bus/connection.c: (connection_error_handler),
575 (bus_connection_setup):
576 * bus/main.c: (main):
577 Make sure that the DBusConnectionData struct is NULLed
578 out to prevent a segfault.
580 * dbus/dbus-errors.c: (dbus_result_to_string):
581 * dbus/dbus-errors.h:
582 * dbus/dbus-message.c: (dbus_message_get_fields),
583 (dbus_message_get_fields_valist), (_dbus_message_test):
584 * dbus/dbus-message.h:
585 Make dbus_message_get_fields return a result code so we can
586 track invalid fields as well as oom.
588 2003-01-11 Havoc Pennington <hp@pobox.com>
590 * configure.in: change --enable-test/--enable-ansi action-if-given
591 to enable_foo=$enableval instead of enable_foo=yes
593 2003-01-08 Havoc Pennington <hp@pobox.com>
595 * dbus/dbus-string.c (_dbus_string_align_length): new function
597 * dbus/dbus-test-main.c: move main() for test app here
599 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
600 symbol to run tests, because dbus-test isn't in the main
603 Code review nitpicks.
605 * dbus/dbus-message.c (dbus_message_write_header): add newlines
606 for people with narrow emacs ;-). Assert client_serial was filled
607 in. Assert message->name != NULL.
608 (dbus_message_append_fields): have "first_field_type" arg separate
609 from va list, needed for C++ binding that also uses varargs IIRC
610 and helps with type safety
611 (dbus_message_new): add @todo about using DBusString to store
612 service/name internally
613 (dbus_message_new): don't leak ->service and ->name on OOM later
615 (dbus_message_unref): free the service name
616 (dbus_message_get_fields): same change to varargs
617 i.e. first_field_type
618 (_dbus_message_loader_return_buffer): assert that the message data
619 is aligned (if not it's a bug in our code). Put in verbose griping
620 about why we set corrupted = TRUE.
621 (decode_header_data): add FIXME that char* is evil. Was going to
622 add FIXME about evil locale-specific string.h strncmp, but just
623 switched to wacky string-as-uint32 optimization. Move check for
624 "no room for field name" above get_const_data_len() to avoid
625 assertion failure in get_const_data_len if we have trailing 2
626 bytes or the like. Check for service and name fields being
627 provided twice. Don't leak service/name on error. Require field
628 names to be aligned to 4 bytes.
630 * dbus/dbus-marshal.c: move byte swap stuff to header
631 (_dbus_pack_int32): uscore-prefix
632 (_dbus_unpack_int32): uscore-prefix
633 (_dbus_unpack_uint32): export
634 (_dbus_demarshal_string): add @todo complaining about use of
636 (_dbus_marshal_get_field_end_pos): add @todo about bad error
637 handling allowing corrupt data to go unchecked
639 2003-01-08 Havoc Pennington <hp@redhat.com>
641 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
642 to the select() as needed for authentication. (should be using
643 _dbus_poll() not select, but for another day)
645 * dbus/dbus.h: include dbus/dbus-protocol.h
647 2003-01-08 Anders Carlsson <andersca@codefactory.se>
649 * dbus/Makefile.am (dbusinclude_HEADERS): Install
652 2003-01-08 Anders Carlsson <andersca@codefactory.se>
654 * dbus/dbus-internals.c: (_dbus_type_to_string):
655 New function that returns a string describing a type.
657 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
658 * dbus/dbus-marshal.h:
659 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
660 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
661 (dbus_message_iter_get_byte_array):
662 * dbus/dbus-message.h:
663 Add new convenience functions for appending and getting message fields.
664 Also add demarshalling routines for byte arrays.
666 2003-01-07 Anders Carlsson <andersca@codefactory.se>
668 * dbus/dbus-connection-internal.h:
669 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
670 (_dbus_connection_get_next_client_serial),
671 (dbus_connection_send_message):
672 * dbus/dbus-internals.h:
673 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
674 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
675 (_dbus_marshal_uint32), (_dbus_demarshal_double),
676 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
677 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
678 (_dbus_verbose_bytes), (_dbus_marshal_test):
679 * dbus/dbus-marshal.h:
680 * dbus/dbus-message-internal.h:
681 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
682 (dbus_message_write_header), (_dbus_message_lock),
683 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
684 (dbus_message_get_name), (dbus_message_append_int32),
685 (dbus_message_append_uint32), (dbus_message_append_double),
686 (dbus_message_append_string), (dbus_message_append_byte_array),
687 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
688 (dbus_message_iter_unref), (dbus_message_iter_has_next),
689 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
690 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
691 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
692 (decode_header_data), (_dbus_message_loader_return_buffer),
693 (message_iter_test), (_dbus_message_test):
694 * dbus/dbus-message.h:
695 * dbus/dbus-protocol.h:
696 * dbus/dbus-test.c: (main):
698 * glib/test-dbus-glib.c: (message_handler), (main):
699 * test/echo-client.c: (main):
700 * test/watch.c: (check_messages):
701 Make messages sendable and receivable for real.
703 2003-01-07 Anders Carlsson <andersca@codefactory.se>
705 * dbus/dbus-marshal.c: (_dbus_marshal_double),
706 (_dbus_marshal_string), (_dbus_marshal_byte_array):
707 * dbus/dbus-message.c: (dbus_message_append_int32),
708 (dbus_message_append_uint32), (dbus_message_append_double),
709 (dbus_message_append_string), (dbus_message_append_byte_array):
710 Handle OOM restoration.
712 2003-01-07 Anders Carlsson <andersca@codefactory.se>
714 * dbus/dbus-marshal.c: (_dbus_marshal_string),
715 (_dbus_demarshal_string), (_dbus_marshal_test):
716 * dbus/dbus-marshal.h:
717 * dbus/dbus-message.c: (dbus_message_get_name),
718 Document these functions.
720 (dbus_message_append_int32), (dbus_message_append_uint32),
721 (dbus_message_append_double), (dbus_message_append_string),
722 (dbus_message_append_byte_array):
723 * dbus/dbus-message.h:
724 Add functions for adding message fields of different types.
726 * dbus/dbus-protocol.h:
727 Add the different types.
729 2003-01-05 Havoc Pennington <hp@pobox.com>
731 * bus/connection.c: implement routines for handling connections,
732 first thing is keeping a list of owned services on each connection
733 and setting up watches etc.
735 * bus/services.c: implement a mapping from service names to lists
738 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
740 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
741 to use static mutexes for global data
743 * dbus/dbus-connection.c (dbus_connection_set_data): add new
744 collection of functions to set/get application-specific data
745 on the DBusConnection.
747 2003-01-04 Havoc Pennington <hp@pobox.com>
749 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
750 (_dbus_poll): new function
752 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
755 * bus/loop.c: initial code for the daemon main loop
757 2003-01-04 Havoc Pennington <hp@pobox.com>
759 * test/watch.c (error_handler): make it safe if the error handler
760 is called multiple times (if we s/error handler/disconnect
761 handler/ we should just guarantee it's called only once)
763 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
764 error handler on disconnect (it's quite possible we should
765 just change the error handler to a "disconnect handler," I'm
766 not sure we have any other meaningful errors)
768 * configure.in: check for getpwnam_r
770 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
771 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
772 mechanism as in SASL spec, using socket credentials
774 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
775 (_dbus_send_credentials_unix_socket): new function
777 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
779 (_dbus_write): only check errno if <0 returned
780 (_dbus_write_two): ditto
782 2003-01-02 Anders Carlsson <andersca@codefactory.se>
784 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
785 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
786 (_dbus_marshal_test):
787 * dbus/dbus-marshal.h:
788 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
789 to _dbus_marshal_utf8_string. Also fix some tests.
791 2002-12-28 Harri Porten <porten@kde.org>
793 * configure.in: added check for C++ compiler and a very cheesy
794 check for the Qt integration
796 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
798 * qt/Makefile.am: added
800 * qt/.cvsignore: added
802 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
803 latter, added #ifdef QT_THREAD_SUPPORT guard.
805 * dbus/Makefile.am: added missing headers for make dist
807 2002-12-28 Kristian Rietveld <kris@gtk.org>
809 * dbus/Makefile.am: fixup export-symbols-regex.
811 2002-12-27 Anders Carlsson <andersca@codefactory.se>
813 * acinclude.m4: Add this file and put the
814 PKG_CHECK_MODULE macro in it.
816 2002-12-27 Anders Carlsson <andersca@codefactory.se>
818 * dbus/dbus-marshal.c: (_dbus_marshal_string),
819 (_dbus_demarshal_double), (_dbus_demarshal_int32),
820 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
821 (_dbus_marshal_test):
822 Make the demarshalling routines align the pos argument.
823 Add string marshalling tests and fix the obvious bugs
826 2002-12-26 Havoc Pennington <hp@pobox.com>
828 * dbus/dbus-auth.c: fixes fixes fixes
830 * dbus/dbus-transport-unix.c: wire up support for
831 encoding/decoding data on the wire
833 * dbus/dbus-auth.c (_dbus_auth_encode_data)
834 (_dbus_auth_decode_data): append to target string
835 instead of nuking it.
837 2002-12-26 Havoc Pennington <hp@pobox.com>
839 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
840 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
843 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
844 avoid swap_bytes() overhead (ignoring possible assembly stuff for
845 now). Main point is because I wanted unpack_uint32 to implement
847 (_dbus_verbose_bytes): new function
849 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
851 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
852 mechanism to handle a corrupt message stream
853 (_dbus_message_loader_new): fix preallocation to only prealloc,
856 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
857 (_dbus_string_test): enhance tests for copy/move and fix the
860 * dbus/dbus-transport-unix.c: Hold references in more places to
861 avoid reentrancy problems
863 * dbus/dbus-transport.c: ditto
865 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
866 leak reference count in no-message case
868 * test/watch.c (do_mainloop): handle adding/removing watches
869 during iteration over the watches. Also, ref the connection/server
870 stored on a watch, so we don't try to mangle a destroyed one.
872 * dbus/dbus-transport-unix.c (do_authentication): perform
875 * dbus/dbus-auth.c (get_state): add a state
876 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
877 (_dbus_auth_get_unused_bytes): append the unused bytes
878 to the passed in string, rather than prepend
880 * dbus/dbus-transport.c (_dbus_transport_init_base): create
881 the auth conversation DBusAuth
883 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
884 (_dbus_transport_new_for_domain_socket): when creating a
885 transport, pass in whether it's a client-side or server-side
886 transport so we know which DBusAuth to create
888 2002-12-03 Havoc Pennington <hp@pobox.com>
890 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
891 _after_ finalizing the derived members
892 (unix_connection_set): unref watch if we fail to add it
894 * dbus/dbus-connection.c (dbus_connection_unref): delete the
895 transport first, so that the connection owned by the
896 transport will be valid as the transport finalizes.
898 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
899 if necessary, and remove watches from the connection.
901 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
903 2002-12-26 Anders Carlsson <andersca@codefactory.se>
905 * dbus/dbus-marshal.c: (_dbus_marshal_string),
906 (_dbus_demarshal_double), (_dbus_demarshal_int32),
907 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
908 (_dbus_marshal_test):
909 * dbus/dbus-marshal.h:
910 Add string marshal functions and have the demarshal functions
911 return the new position.
913 2002-12-25 Havoc Pennington <hp@pobox.com>
915 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
916 it is a simple protocol that just maps directly to SASL.
918 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
919 initial implementation, not actually used yet.
921 * dbus/dbus-string.c (_dbus_string_find): new function
922 (_dbus_string_equal): new function
923 (_dbus_string_base64_encode): new function
924 (_dbus_string_base64_decode): new function
926 2002-12-25 Anders Carlsson <andersca@codefactory.se>
929 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
930 (_dbus_marshal_int32), (_dbus_marshal_uint32),
931 (_dbus_demarshal_double), (_dbus_demarshal_int32),
932 (_dbus_demarshal_uint32), (_dbus_marshal_test):
933 * dbus/dbus-marshal.h:
934 * dbus/dbus-protocol.h:
935 * dbus/dbus-test.c: (main):
937 Add un-optimized marshalling/demarshalling routines.
939 2002-12-25 Harri Porten <porten@kde.org>
941 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
943 2002-12-24 Zack Rusin <zack@kde.org>
945 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
946 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
949 2002-12-24 Havoc Pennington <hp@pobox.com>
951 * glib/dbus-gthread.c: fix include
953 * glib/dbus-glib.h: rename DBusMessageHandler for now.
954 I think glib API needs to change, though, as you don't
955 want to use DBusMessageFunction, you want to use the
956 DBusMessageHandler object. Probably
957 dbus_connection_open_with_g_main_loop()
958 and dbus_connection_setup_g_main_loop() or something like that
959 (but think of better names...) that just create a connection
960 that has watch/timeout functions etc. already set up.
962 * dbus/dbus-connection.c
963 (dbus_connection_send_message_with_reply): new function just to
964 show how the message handler helps us deal with replies.
966 * dbus/dbus-list.c (_dbus_list_remove_last): new function
968 * dbus/dbus-string.c (_dbus_string_test): free a string that
971 * dbus/dbus-hash.c: use memory pools for the hash entries
972 (rebuild_table): be more paranoid about overflow, and
973 shrink table when we can
974 (_dbus_hash_test): reduce number of sprintfs and write
975 valid C89. Add tests for case where we grow and then
976 shrink the hash table.
978 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
980 * dbus/dbus-connection.c (dbus_connection_register_handler)
981 (dbus_connection_unregister_handler): new functions
983 * dbus/dbus-message.c (dbus_message_get_name): new
985 * dbus/dbus-list.c: fix docs typo
987 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
988 an object representing a handler for messages.
990 2002-12-16 Anders Carlsson <andersca@codefactory.se>
993 * glib/dbus-gthread.c: (dbus_gthread_init):
994 Don't use the gdbus prefix for public functions.
996 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1000 Add GLib checks and fixup .pc files
1004 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1005 (gdbus_connection_check), (gdbus_connection_dispatch),
1006 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1007 (dbus_connection_gsource_new):
1008 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1009 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1010 * glib/test-dbus-glib.c: (message_handler), (main):
1013 2002-12-15 Harri Porten <porten@kde.org>
1015 * autogen.sh: check for libtoolize before attempting to use it
1017 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1020 * .cvsignore: ignore more stamp files
1022 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1024 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1025 without make install.
1027 2002-12-15 Havoc Pennington <hp@pobox.com>
1029 * dbus/dbus-threads.c: add thread stubs that a higher library
1030 layer can fill in. e.g. the GLib wrapper might fill them in with
1031 GThread stuff. We still need to use this thread API to
1032 thread-safe-ize the library.
1034 2002-12-12 Havoc Pennington <hp@pobox.com>
1036 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1037 below new interfaces and include fewer system headers.
1039 * dbus/dbus-sysdeps.c (_dbus_read): new function
1040 (_dbus_write): new function
1041 (_dbus_write_two): new function
1042 (_dbus_connect_unix_socket): new function
1043 (_dbus_listen_unix_socket): new function
1045 * dbus/dbus-message-internal.h: change interfaces to use
1048 2002-12-11 Havoc Pennington <hp@pobox.com>
1050 * dbus/dbus-types.h: add dbus_unichar
1052 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1054 * dbus/dbus-connection.c (dbus_connection_send_message): return
1057 * dbus/dbus-transport.c: include dbus-watch.h
1059 * dbus/dbus-connection.c: include dbus-message-internal.h
1061 * HACKING: add file with coding guidelines stuff.
1063 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1064 handling here, for security purposes (as in vsftpd). Not actually
1065 using this class yet.
1067 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1068 system/libc usage here, as in vsftpd, for ease of auditing (and
1069 should also simplify portability). Haven't actually moved all the
1070 system/libc usage into here yet.
1072 2002-11-25 Havoc Pennington <hp@pobox.com>
1074 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1075 always print the first verbose message.
1077 2002-11-24 Havoc Pennington <hp@pobox.com>
1079 * test/echo-client.c, test/echo-server.c: cheesy test
1082 * configure.in (AC_CHECK_FUNCS): check for writev
1084 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1087 * dbus/dbus-list.c (_dbus_list_foreach): new function
1089 * dbus/dbus-internals.c (_dbus_verbose): new function
1091 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1092 representing a server that listens for connections.
1094 * dbus/.cvsignore: create
1096 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1097 public API for reporting errors
1099 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1100 public object representing a connection that
1101 sends/receives messages. (Same object used for
1102 both client and server.)
1104 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1105 Basic abstraction for different kinds of stream
1106 that we might read/write messages from.
1108 2002-11-23 Havoc Pennington <hp@pobox.com>
1110 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1113 * dbus/dbus-test.c (main): add list test, and include
1114 dbus-test.h as intended
1116 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1117 (_dbus_hash_table_remove_int): return value indicates
1118 whether the entry existed to remove
1120 * dbus/dbus-list.c: add linked list utility class,
1123 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1126 2002-11-23 Havoc Pennington <hp@pobox.com>
1128 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1129 DBUS_END_DECLS to nothing, that should fix this once and for all
1131 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1133 * dbus/dbus-message.c, dbus/dbus-hash.c:
1134 add some missing @brief
1136 2002-11-23 Havoc Pennington <hp@pobox.com>
1138 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1139 to avoid confusing Doxygen
1141 * dbus/dbus-hash.c: @} not }@
1143 * dbus/dbus-message.c (struct DBusMessage): split out
1146 2002-11-23 Havoc Pennington <hp@pobox.com>
1148 * configure.in: pile on more warning flags if using gcc
1150 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1151 to document static functions
1153 * configure.in: add summary to end of configure so it
1154 looks nice and attractive
1156 * dbus/dbus-hash.c: finish implementation and write unit
1159 * configure.in: add --enable-tests to enable unit tests
1161 * dbus/dbus-test.c: test program to run unit tests
1162 for all files in dbus/*, initially runs a test for
1165 * dbus/dbus-internals.h: file to hold some internal utility stuff
1167 2002-11-22 Havoc Pennington <hp@redhat.com>
1169 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1170 "ported" away from Tcl
1172 * dbus/dbus-types.h: header for types such as dbus_bool_t
1174 2002-11-22 Havoc Pennington <hp@redhat.com>
1176 * dbus/dbus.h: fixups for doc warnings
1178 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1180 (QUIET): make it quiet so we can see warnings
1182 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1184 2002-11-22 Havoc Pennington <hp@redhat.com>
1186 * Makefile.am: include "Doxyfile" target in all-local
1188 * configure.in: generate the Doxyfile
1190 * Doxyfile.in: move Doxyfile here, so we can use
1191 configure to generate a Doxyfile with the right
1194 2002-11-22 Havoc Pennington <hp@redhat.com>
1196 * dbus/dbus-message.c: move inline docs into .c file
1198 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1199 so all docs are under doc/
1200 (MAN_EXTENSION): generate man pages. Use extension
1201 ".3dbus" which matches ".3qt" on my system,
1202 I guess this is OK, I don't know really.
1203 (FILE_PATTERNS): look for .c files not .h, makes sense
1206 2002-11-22 Havoc Pennington <hp@pobox.com>
1208 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1209 because any app can be a server, and any app can be a client,
1210 the bus is a special kind of server.
1212 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1214 * Doxyfile : adding. Still needs Makefile rules to be generated
1215 automatically (just run "doxygen" in the toplevel dir for now to
1218 * dbus/dbus-message.h : Adding sample docs (javadoc since
1219 resembles gtk-doc a little more)
1221 * dbus/dbus.h : Adding sample docs
1223 2002-11-21 Havoc Pennington <hp@redhat.com>
1225 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1226 so we can allow ourselves to include files directly,
1227 instead of having to use dbus.h
1229 * dbus/dbus.h: fill in
1231 * dbus/dbus-message.h: sketch out a sample header file.
1232 Include griping if you include it directly instead of
1235 * dbus/dbus-macros.h: new file with macros for extern "C",
1236 TRUE/FALSE, NULL, etc.
1238 * doc/file-boilerplate.c: put include guards in here
1240 2002-11-21 Havoc Pennington <hp@redhat.com>
1242 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1244 * COPYING: include the GPL as well, and license code
1245 under both AFL and GPL.
1247 2002-11-21 Havoc Pennington <hp@redhat.com>
1249 * acconfig.h: get rid of this
1251 * autogen.sh (run_configure): add --no-configure option
1253 * configure.in: remove AC_ARG_PROGRAM to make
1254 autoconf complain less. add AC_PREREQ.
1255 add AC_DEFINE third arg.
1257 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1260 Fix references so we can distcheck.
1262 2002-11-21 Havoc Pennington <hp@redhat.com>
1264 * Initial module creation