1 2003-01-26 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5 * dbus/dbus-errors.c (dbus_result_to_string): add
8 * dbus/dbus-message-builder.c: new file, will contain code to load
9 up messages from files. Not implemented yet.
11 2003-01-26 Havoc Pennington <hp@pobox.com>
13 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
14 the sender by setting to NULL
16 2003-01-26 Havoc Pennington <hp@pobox.com>
18 The unit tests pass, but otherwise untested. If it breaks, the
19 tests should have been better. ;-)
21 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
24 * dbus/dbus-message.c: redo everything so we maintain
25 message->header as the only copy of the various fields.
26 This avoids the possibility of out-of-memory in some cases,
27 for example dbus_message_lock() can't run out of memory anymore,
28 and avoids extra copying. Figured I may as well go ahead and do
29 this since it was busted for dbus_message_lock to not return
30 failure on OOM, and dbus_message_write_header was totally
31 unchecked for OOM. Also fixed some random other bugs.
33 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
34 that strings are nul-terminated. Also, end_pos can be equal
35 to string length just not greater than, I think.
36 (_dbus_marshal_set_int32): new function
37 (_dbus_marshal_set_uint32): new function
38 (_dbus_marshal_set_string): new function
40 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
41 a warning, init timeout_list to NULL
42 (dbus_connection_send_message): don't use uninitialized variable
45 * dbus/dbus-string.c (_dbus_string_replace_len): new function
47 2003-01-26 Anders Carlsson <andersca@codefactory.se>
49 * bus/driver.c: (bus_driver_handle_hello),
50 (bus_driver_send_welcome_message):
53 2003-01-26 Anders Carlsson <andersca@codefactory.se>
55 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
56 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
57 (dbus_connection_unref):
58 * dbus/dbus-marshal.c: (_dbus_marshal_test):
59 * dbus/dbus-message.c: (dbus_message_unref),
62 (dbus_message_get_fields):
63 Remove debugging printout.
65 (_dbus_message_loader_return_buffer):
66 Don't store the header string.
71 2003-01-26 Richard Hult <rhult@codefactory.se>
73 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
74 the file descriptor list, since it can change under us.
76 2003-01-25 Anders Carlsson <andersca@codefactory.se>
78 * glib/dbus-gmain.c: (dbus_connection_prepare),
79 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
80 (remove_watch), (dbus_connection_hookup_with_g_main):
81 Rewrite the glib handling to use its own GSource instead of a
82 GIOChannel so we can catch messages put in the queue while waiting
85 2003-01-25 Anders Carlsson <andersca@codefactory.se>
88 * bus/connection.c: (connection_disconnect_handler),
89 (connection_watch_callback), (bus_connection_setup):
90 * bus/dispatch.c: (send_one_message),
91 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
92 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
94 * bus/driver.c: (bus_driver_send_service_deleted),
95 (bus_driver_send_service_created), (bus_driver_handle_hello),
96 (bus_driver_send_welcome_message),
97 (bus_driver_handle_list_services), (bus_driver_remove_connection),
98 (bus_driver_handle_message):
100 Refactor code, put the message dispatching in its own file. Use
101 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
104 2003-01-25 Anders Carlsson <andersca@codefactory.se>
106 * dbus/dbus-internals.h:
107 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
109 * dbus/dbus-message.c: (dbus_message_get_sender):
110 * dbus/dbus-message.h:
111 Implement dbus_message_get_sender.
113 * dbus/dbus-protocol.h:
114 Add message and service defines.
116 2003-01-25 Anders Carlsson <andersca@codefactory.se>
118 * dbus/dbus-connection.c: (dbus_connection_send_message):
119 * dbus/dbus-message-internal.h:
120 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
121 (dbus_message_write_header):
122 Remove _dbus_messag_unlock and don't set the client serial on a
123 message if one already exists.
125 2003-01-24 Havoc Pennington <hp@pobox.com>
127 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
130 * bus/driver.c (bus_driver_handle_list_services): fix a leak
133 2003-01-25 Anders Carlsson <andersca@codefactory.se>
135 * dbus/dbus-list.c: (alloc_link), (free_link):
136 Use a memory pool for the links.
138 2003-01-25 Anders Carlsson <andersca@codefactory.se>
140 * bus/connection.c: (bus_connection_foreach):
142 Add new bus_connection_foreach function.
144 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
145 Add function that broadcasts a message to all clients.
147 (bus_driver_send_service_created), (bus_driver_handle_hello),
148 (bus_driver_send_welcome_message),
149 (bus_driver_handle_list_services), (bus_driver_message_handler):
150 Implement functions that take care of listing services, and notifying
151 clients when new services are created.
153 * bus/services.c: (bus_services_list):
155 Add new function that returns an array of strings with the currently
160 Update copyright year.
162 2003-01-25 Anders Carlsson <andersca@codefactory.se>
164 * dbus/dbus-connection.c: (dbus_connection_send_message):
165 Unlock the message in case it was sent earlier.
167 (dbus_connection_send_message_with_reply_and_block):
168 Remove the reply message from the list.
170 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
171 Set array_len and new_pos correctly.
173 (_dbus_marshal_test):
176 * dbus/dbus-message-internal.h:
177 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
178 New function that returns the reply serial.
180 (_dbus_message_unlock):
181 New function that unlocks a message and resets its header.
183 (dbus_message_append_string_array),
184 (dbus_message_get_fields_valist),
185 (dbus_message_iter_get_field_type),
186 (dbus_message_iter_get_string_array),
187 (dbus_message_get_fields),
188 (dbus_message_append_fields_valist):
189 Handle string arrays.
191 (dbus_message_set_sender):
192 Make this function public since the bus daemon needs it.
194 (decode_header_data):
195 Set the reply serial to -1 initially.
197 * dbus/dbus-message.h:
198 Add dbus_message_set_sender.
200 2003-01-24 Havoc Pennington <hp@pobox.com>
202 * doc/dbus-specification.sgml: add some stuff
204 2003-01-22 Havoc Pennington <hp@pobox.com>
206 * doc/dbus-specification.sgml: Start to document the protocol.
208 2003-01-22 Havoc Pennington <hp@pobox.com>
210 * dbus/dbus-connection.c
211 (dbus_connection_send_message_with_reply_and_block): add some @todo
213 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
215 2003-01-21 Havoc Pennington <hp@pobox.com>
217 (patch untested because can't compile)
219 * bus/driver.c (create_unique_client_name): make this function
220 never recycle client names. Also, caller should initialize
223 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
225 2003-01-21 Anders Carlsson <andersca@codefactory.se>
227 * dbus/dbus-marshal.c: (_dbus_marshal_double),
228 (_dbus_marshal_int32), (_dbus_marshal_uint32),
229 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
230 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
231 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
232 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
233 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
234 * dbus/dbus-marshal.h:
235 * dbus/dbus-protocol.h:
236 Add support for marshalling and demarshalling integer, double
239 2003-01-21 Anders Carlsson <andersca@codefactory.se>
244 * bus/connection.c: (connection_disconnect_handler):
245 Remove the connection from the bus driver's list.
247 (connection_watch_callback): Dispatch messages.
249 (free_connection_data): Free connection name.
251 (bus_connection_setup): Add connection to the bus driver's list.
252 (bus_connection_remove_owned_service):
253 (bus_connection_set_name), (bus_connection_get_name):
254 Add functions for setting and getting the connection's name.
257 Add function headers.
259 * bus/driver.c: (create_unique_client_name),
260 (bus_driver_handle_hello_message),
261 (bus_driver_send_welcome_message), (bus_driver_message_handler),
262 (bus_driver_add_connection), (bus_driver_remove_connection):
265 * bus/services.c: (bus_service_free):
267 New file that handles communication and registreation with the bus
270 2003-01-21 Anders Carlsson <andersca@codefactory.se>
272 * dbus/dbus-connection.c: (dbus_connection_send_message):
273 Add a new client_serial parameter.
275 (dbus_connection_send_message_with_reply):
276 Remove a @todo since we've implemented the blocking function.
278 (dbus_connection_send_message_with_reply_and_block):
279 New function that sends a message and waits for a reply and
280 then returns the reply.
282 * dbus/dbus-connection.h:
285 * dbus/dbus-errors.c: (dbus_result_to_string):
286 * dbus/dbus-errors.h:
289 * dbus/dbus-message-internal.h:
290 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
291 (_dbus_message_set_sender), (dbus_message_write_header),
292 (dbus_message_new_reply), (decode_header_data),
293 (_dbus_message_loader_return_buffer), (_dbus_message_test):
294 * dbus/dbus-message.h:
295 Add new functions that set the reply serial and sender.
296 Also marshal and demarshal them correctly and add test.
298 * dbus/dbus-protocol.h:
299 Add new DBUS_MESSAGE_TYPE_SENDER.
302 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
303 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
304 (dbus_connection_hookup_with_g_main):
305 * glib/test-dbus-glib.c: (main):
306 Rewrite to use GIOChannel and remove the GSource crack.
308 * test/echo-client.c: (main):
309 * test/watch.c: (check_messages):
310 Update for changed APIs
312 2003-01-19 Anders Carlsson <andersca@codefactory.se>
314 * dbus/Makefile.am: Add dbus-timeout.[cħ]
316 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
317 Create a DBusTimeoutList.
318 (dbus_connection_set_timeout_functions): Add new function to
319 set timeout callbacks
321 * dbus/dbus-connection.h: Add public DBusTimeout API.
323 * dbus/dbus-message.c: (dbus_message_get_service):
324 * dbus/dbus-message.h: New function.
326 * dbus/dbus-server.c: Fix small doc typo.
328 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
330 2003-01-19 Anders Carlsson <andersca@codefactory.se>
332 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
333 of the string, just as long as specified.
335 2003-01-19 Havoc Pennington <hp@pobox.com>
337 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
340 * dbus/dbus-server.c (dbus_server_set_max_connections)
341 (dbus_server_get_max_connections, dbus_server_get_n_connections):
342 keep track of current number of connections, and add API for
343 setting a max (but haven't implemented enforcing the max yet)
345 2003-01-18 Havoc Pennington <hp@pobox.com>
347 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
348 reading/writing if read_watch != NULL or write_watch != NULL.
350 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
351 the message loader code to actually load message->header and
352 message->body into the newly-created message.
354 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
357 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
358 (dbus_connection_get_max_message_size)
359 (dbus_connection_set_max_live_messages_size)
360 (dbus_connection_get_max_live_messages_size): implement some
361 resource limitation functions
363 * dbus/dbus-resources.c: new file implementing some of the
364 resource limits stuff
366 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
367 missing docs, add @todo to handle OOM etc.
369 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
372 2003-01-18 Havoc Pennington <hp@pobox.com>
374 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
375 connection if it hasn't been already.
377 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
378 replace with DisconnectFunction.
380 2003-01-18 Havoc Pennington <hp@pobox.com>
382 Building --disable-verbose-mode --disable-asserts --disable-tests
383 cuts the library from 112K to 45K or so
385 * configure.in: check for varargs macro support,
386 add --enable-verbose-mode, --enable-asserts.
388 * dbus/dbus-internals.h (_dbus_assert): support
390 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
392 2003-01-18 Havoc Pennington <hp@pobox.com>
394 * dbus/dbus-test.c: include config.h so that tests actually run
396 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
397 so the failure mode when that assumption fails will be plenty
400 2003-01-18 Havoc Pennington <hp@pobox.com>
402 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
404 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
407 * test/Makefile.am: don't use special variable "TESTS" for echo-*
408 since we don't want to use those in make check
410 2003-01-15 Havoc Pennington <hp@redhat.com>
416 2003-01-15 Havoc Pennington <hp@redhat.com>
418 * test/Makefile.am: fix so that test source code ends up in the
419 distribution on make distcheck
421 2003-01-15 Havoc Pennington <hp@redhat.com>
427 2003-01-15 Havoc Pennington <hp@redhat.com>
429 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
430 fix build when --disable-tests
432 * Makefile.am (EXTRA_DIST): put HACKING in here
434 * HACKING: document procedure for making a tarball release.
436 2003-01-14 Anders Carlsson <andersca@codefactory.se>
438 * bus/connection.c: (connection_error_handler),
439 (bus_connection_setup):
440 * bus/main.c: (main):
441 Make sure that the DBusConnectionData struct is NULLed
442 out to prevent a segfault.
444 * dbus/dbus-errors.c: (dbus_result_to_string):
445 * dbus/dbus-errors.h:
446 * dbus/dbus-message.c: (dbus_message_get_fields),
447 (dbus_message_get_fields_valist), (_dbus_message_test):
448 * dbus/dbus-message.h:
449 Make dbus_message_get_fields return a result code so we can
450 track invalid fields as well as oom.
452 2003-01-11 Havoc Pennington <hp@pobox.com>
454 * configure.in: change --enable-test/--enable-ansi action-if-given
455 to enable_foo=$enableval instead of enable_foo=yes
457 2003-01-08 Havoc Pennington <hp@pobox.com>
459 * dbus/dbus-string.c (_dbus_string_align_length): new function
461 * dbus/dbus-test-main.c: move main() for test app here
463 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
464 symbol to run tests, because dbus-test isn't in the main
467 Code review nitpicks.
469 * dbus/dbus-message.c (dbus_message_write_header): add newlines
470 for people with narrow emacs ;-). Assert client_serial was filled
471 in. Assert message->name != NULL.
472 (dbus_message_append_fields): have "first_field_type" arg separate
473 from va list, needed for C++ binding that also uses varargs IIRC
474 and helps with type safety
475 (dbus_message_new): add @todo about using DBusString to store
476 service/name internally
477 (dbus_message_new): don't leak ->service and ->name on OOM later
479 (dbus_message_unref): free the service name
480 (dbus_message_get_fields): same change to varargs
481 i.e. first_field_type
482 (_dbus_message_loader_return_buffer): assert that the message data
483 is aligned (if not it's a bug in our code). Put in verbose griping
484 about why we set corrupted = TRUE.
485 (decode_header_data): add FIXME that char* is evil. Was going to
486 add FIXME about evil locale-specific string.h strncmp, but just
487 switched to wacky string-as-uint32 optimization. Move check for
488 "no room for field name" above get_const_data_len() to avoid
489 assertion failure in get_const_data_len if we have trailing 2
490 bytes or the like. Check for service and name fields being
491 provided twice. Don't leak service/name on error. Require field
492 names to be aligned to 4 bytes.
494 * dbus/dbus-marshal.c: move byte swap stuff to header
495 (_dbus_pack_int32): uscore-prefix
496 (_dbus_unpack_int32): uscore-prefix
497 (_dbus_unpack_uint32): export
498 (_dbus_demarshal_string): add @todo complaining about use of
500 (_dbus_marshal_get_field_end_pos): add @todo about bad error
501 handling allowing corrupt data to go unchecked
503 2003-01-08 Havoc Pennington <hp@redhat.com>
505 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
506 to the select() as needed for authentication. (should be using
507 _dbus_poll() not select, but for another day)
509 * dbus/dbus.h: include dbus/dbus-protocol.h
511 2003-01-08 Anders Carlsson <andersca@codefactory.se>
513 * dbus/Makefile.am (dbusinclude_HEADERS): Install
516 2003-01-08 Anders Carlsson <andersca@codefactory.se>
518 * dbus/dbus-internals.c: (_dbus_type_to_string):
519 New function that returns a string describing a type.
521 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
522 * dbus/dbus-marshal.h:
523 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
524 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
525 (dbus_message_iter_get_byte_array):
526 * dbus/dbus-message.h:
527 Add new convenience functions for appending and getting message fields.
528 Also add demarshalling routines for byte arrays.
530 2003-01-07 Anders Carlsson <andersca@codefactory.se>
532 * dbus/dbus-connection-internal.h:
533 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
534 (_dbus_connection_get_next_client_serial),
535 (dbus_connection_send_message):
536 * dbus/dbus-internals.h:
537 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
538 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
539 (_dbus_marshal_uint32), (_dbus_demarshal_double),
540 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
541 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
542 (_dbus_verbose_bytes), (_dbus_marshal_test):
543 * dbus/dbus-marshal.h:
544 * dbus/dbus-message-internal.h:
545 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
546 (dbus_message_write_header), (_dbus_message_lock),
547 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
548 (dbus_message_get_name), (dbus_message_append_int32),
549 (dbus_message_append_uint32), (dbus_message_append_double),
550 (dbus_message_append_string), (dbus_message_append_byte_array),
551 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
552 (dbus_message_iter_unref), (dbus_message_iter_has_next),
553 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
554 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
555 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
556 (decode_header_data), (_dbus_message_loader_return_buffer),
557 (message_iter_test), (_dbus_message_test):
558 * dbus/dbus-message.h:
559 * dbus/dbus-protocol.h:
560 * dbus/dbus-test.c: (main):
562 * glib/test-dbus-glib.c: (message_handler), (main):
563 * test/echo-client.c: (main):
564 * test/watch.c: (check_messages):
565 Make messages sendable and receivable for real.
567 2003-01-07 Anders Carlsson <andersca@codefactory.se>
569 * dbus/dbus-marshal.c: (_dbus_marshal_double),
570 (_dbus_marshal_string), (_dbus_marshal_byte_array):
571 * dbus/dbus-message.c: (dbus_message_append_int32),
572 (dbus_message_append_uint32), (dbus_message_append_double),
573 (dbus_message_append_string), (dbus_message_append_byte_array):
574 Handle OOM restoration.
576 2003-01-07 Anders Carlsson <andersca@codefactory.se>
578 * dbus/dbus-marshal.c: (_dbus_marshal_string),
579 (_dbus_demarshal_string), (_dbus_marshal_test):
580 * dbus/dbus-marshal.h:
581 * dbus/dbus-message.c: (dbus_message_get_name),
582 Document these functions.
584 (dbus_message_append_int32), (dbus_message_append_uint32),
585 (dbus_message_append_double), (dbus_message_append_string),
586 (dbus_message_append_byte_array):
587 * dbus/dbus-message.h:
588 Add functions for adding message fields of different types.
590 * dbus/dbus-protocol.h:
591 Add the different types.
593 2003-01-05 Havoc Pennington <hp@pobox.com>
595 * bus/connection.c: implement routines for handling connections,
596 first thing is keeping a list of owned services on each connection
597 and setting up watches etc.
599 * bus/services.c: implement a mapping from service names to lists
602 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
604 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
605 to use static mutexes for global data
607 * dbus/dbus-connection.c (dbus_connection_set_data): add new
608 collection of functions to set/get application-specific data
609 on the DBusConnection.
611 2003-01-04 Havoc Pennington <hp@pobox.com>
613 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
614 (_dbus_poll): new function
616 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
619 * bus/loop.c: initial code for the daemon main loop
621 2003-01-04 Havoc Pennington <hp@pobox.com>
623 * test/watch.c (error_handler): make it safe if the error handler
624 is called multiple times (if we s/error handler/disconnect
625 handler/ we should just guarantee it's called only once)
627 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
628 error handler on disconnect (it's quite possible we should
629 just change the error handler to a "disconnect handler," I'm
630 not sure we have any other meaningful errors)
632 * configure.in: check for getpwnam_r
634 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
635 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
636 mechanism as in SASL spec, using socket credentials
638 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
639 (_dbus_send_credentials_unix_socket): new function
641 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
643 (_dbus_write): only check errno if <0 returned
644 (_dbus_write_two): ditto
646 2003-01-02 Anders Carlsson <andersca@codefactory.se>
648 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
649 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
650 (_dbus_marshal_test):
651 * dbus/dbus-marshal.h:
652 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
653 to _dbus_marshal_utf8_string. Also fix some tests.
655 2002-12-28 Harri Porten <porten@kde.org>
657 * configure.in: added check for C++ compiler and a very cheesy
658 check for the Qt integration
660 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
662 * qt/Makefile.am: added
664 * qt/.cvsignore: added
666 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
667 latter, added #ifdef QT_THREAD_SUPPORT guard.
669 * dbus/Makefile.am: added missing headers for make dist
671 2002-12-28 Kristian Rietveld <kris@gtk.org>
673 * dbus/Makefile.am: fixup export-symbols-regex.
675 2002-12-27 Anders Carlsson <andersca@codefactory.se>
677 * acinclude.m4: Add this file and put the
678 PKG_CHECK_MODULE macro in it.
680 2002-12-27 Anders Carlsson <andersca@codefactory.se>
682 * dbus/dbus-marshal.c: (_dbus_marshal_string),
683 (_dbus_demarshal_double), (_dbus_demarshal_int32),
684 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
685 (_dbus_marshal_test):
686 Make the demarshalling routines align the pos argument.
687 Add string marshalling tests and fix the obvious bugs
690 2002-12-26 Havoc Pennington <hp@pobox.com>
692 * dbus/dbus-auth.c: fixes fixes fixes
694 * dbus/dbus-transport-unix.c: wire up support for
695 encoding/decoding data on the wire
697 * dbus/dbus-auth.c (_dbus_auth_encode_data)
698 (_dbus_auth_decode_data): append to target string
699 instead of nuking it.
701 2002-12-26 Havoc Pennington <hp@pobox.com>
703 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
704 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
707 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
708 avoid swap_bytes() overhead (ignoring possible assembly stuff for
709 now). Main point is because I wanted unpack_uint32 to implement
711 (_dbus_verbose_bytes): new function
713 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
715 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
716 mechanism to handle a corrupt message stream
717 (_dbus_message_loader_new): fix preallocation to only prealloc,
720 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
721 (_dbus_string_test): enhance tests for copy/move and fix the
724 * dbus/dbus-transport-unix.c: Hold references in more places to
725 avoid reentrancy problems
727 * dbus/dbus-transport.c: ditto
729 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
730 leak reference count in no-message case
732 * test/watch.c (do_mainloop): handle adding/removing watches
733 during iteration over the watches. Also, ref the connection/server
734 stored on a watch, so we don't try to mangle a destroyed one.
736 * dbus/dbus-transport-unix.c (do_authentication): perform
739 * dbus/dbus-auth.c (get_state): add a state
740 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
741 (_dbus_auth_get_unused_bytes): append the unused bytes
742 to the passed in string, rather than prepend
744 * dbus/dbus-transport.c (_dbus_transport_init_base): create
745 the auth conversation DBusAuth
747 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
748 (_dbus_transport_new_for_domain_socket): when creating a
749 transport, pass in whether it's a client-side or server-side
750 transport so we know which DBusAuth to create
752 2002-12-03 Havoc Pennington <hp@pobox.com>
754 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
755 _after_ finalizing the derived members
756 (unix_connection_set): unref watch if we fail to add it
758 * dbus/dbus-connection.c (dbus_connection_unref): delete the
759 transport first, so that the connection owned by the
760 transport will be valid as the transport finalizes.
762 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
763 if necessary, and remove watches from the connection.
765 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
767 2002-12-26 Anders Carlsson <andersca@codefactory.se>
769 * dbus/dbus-marshal.c: (_dbus_marshal_string),
770 (_dbus_demarshal_double), (_dbus_demarshal_int32),
771 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
772 (_dbus_marshal_test):
773 * dbus/dbus-marshal.h:
774 Add string marshal functions and have the demarshal functions
775 return the new position.
777 2002-12-25 Havoc Pennington <hp@pobox.com>
779 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
780 it is a simple protocol that just maps directly to SASL.
782 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
783 initial implementation, not actually used yet.
785 * dbus/dbus-string.c (_dbus_string_find): new function
786 (_dbus_string_equal): new function
787 (_dbus_string_base64_encode): new function
788 (_dbus_string_base64_decode): new function
790 2002-12-25 Anders Carlsson <andersca@codefactory.se>
793 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
794 (_dbus_marshal_int32), (_dbus_marshal_uint32),
795 (_dbus_demarshal_double), (_dbus_demarshal_int32),
796 (_dbus_demarshal_uint32), (_dbus_marshal_test):
797 * dbus/dbus-marshal.h:
798 * dbus/dbus-protocol.h:
799 * dbus/dbus-test.c: (main):
801 Add un-optimized marshalling/demarshalling routines.
803 2002-12-25 Harri Porten <porten@kde.org>
805 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
807 2002-12-24 Zack Rusin <zack@kde.org>
809 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
810 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
813 2002-12-24 Havoc Pennington <hp@pobox.com>
815 * glib/dbus-gthread.c: fix include
817 * glib/dbus-glib.h: rename DBusMessageHandler for now.
818 I think glib API needs to change, though, as you don't
819 want to use DBusMessageFunction, you want to use the
820 DBusMessageHandler object. Probably
821 dbus_connection_open_with_g_main_loop()
822 and dbus_connection_setup_g_main_loop() or something like that
823 (but think of better names...) that just create a connection
824 that has watch/timeout functions etc. already set up.
826 * dbus/dbus-connection.c
827 (dbus_connection_send_message_with_reply): new function just to
828 show how the message handler helps us deal with replies.
830 * dbus/dbus-list.c (_dbus_list_remove_last): new function
832 * dbus/dbus-string.c (_dbus_string_test): free a string that
835 * dbus/dbus-hash.c: use memory pools for the hash entries
836 (rebuild_table): be more paranoid about overflow, and
837 shrink table when we can
838 (_dbus_hash_test): reduce number of sprintfs and write
839 valid C89. Add tests for case where we grow and then
840 shrink the hash table.
842 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
844 * dbus/dbus-connection.c (dbus_connection_register_handler)
845 (dbus_connection_unregister_handler): new functions
847 * dbus/dbus-message.c (dbus_message_get_name): new
849 * dbus/dbus-list.c: fix docs typo
851 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
852 an object representing a handler for messages.
854 2002-12-16 Anders Carlsson <andersca@codefactory.se>
857 * glib/dbus-gthread.c: (dbus_gthread_init):
858 Don't use the gdbus prefix for public functions.
860 2002-12-16 Anders Carlsson <andersca@codefactory.se>
864 Add GLib checks and fixup .pc files
868 * glib/dbus-gmain.c: (gdbus_connection_prepare),
869 (gdbus_connection_check), (gdbus_connection_dispatch),
870 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
871 (dbus_connection_gsource_new):
872 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
873 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
874 * glib/test-dbus-glib.c: (message_handler), (main):
877 2002-12-15 Harri Porten <porten@kde.org>
879 * autogen.sh: check for libtoolize before attempting to use it
881 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
884 * .cvsignore: ignore more stamp files
886 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
888 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
889 without make install.
891 2002-12-15 Havoc Pennington <hp@pobox.com>
893 * dbus/dbus-threads.c: add thread stubs that a higher library
894 layer can fill in. e.g. the GLib wrapper might fill them in with
895 GThread stuff. We still need to use this thread API to
896 thread-safe-ize the library.
898 2002-12-12 Havoc Pennington <hp@pobox.com>
900 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
901 below new interfaces and include fewer system headers.
903 * dbus/dbus-sysdeps.c (_dbus_read): new function
904 (_dbus_write): new function
905 (_dbus_write_two): new function
906 (_dbus_connect_unix_socket): new function
907 (_dbus_listen_unix_socket): new function
909 * dbus/dbus-message-internal.h: change interfaces to use
912 2002-12-11 Havoc Pennington <hp@pobox.com>
914 * dbus/dbus-types.h: add dbus_unichar
916 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
918 * dbus/dbus-connection.c (dbus_connection_send_message): return
921 * dbus/dbus-transport.c: include dbus-watch.h
923 * dbus/dbus-connection.c: include dbus-message-internal.h
925 * HACKING: add file with coding guidelines stuff.
927 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
928 handling here, for security purposes (as in vsftpd). Not actually
929 using this class yet.
931 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
932 system/libc usage here, as in vsftpd, for ease of auditing (and
933 should also simplify portability). Haven't actually moved all the
934 system/libc usage into here yet.
936 2002-11-25 Havoc Pennington <hp@pobox.com>
938 * dbus/dbus-internals.c (_dbus_verbose): fix to not
939 always print the first verbose message.
941 2002-11-24 Havoc Pennington <hp@pobox.com>
943 * test/echo-client.c, test/echo-server.c: cheesy test
946 * configure.in (AC_CHECK_FUNCS): check for writev
948 * dbus/dbus-message.c (_dbus_message_get_network_data): new
951 * dbus/dbus-list.c (_dbus_list_foreach): new function
953 * dbus/dbus-internals.c (_dbus_verbose): new function
955 * dbus/dbus-server.c, dbus/dbus-server.h: public object
956 representing a server that listens for connections.
958 * dbus/.cvsignore: create
960 * dbus/dbus-errors.h, dbus/dbus-errors.c:
961 public API for reporting errors
963 * dbus/dbus-connection.h, dbus/dbus-connection.c:
964 public object representing a connection that
965 sends/receives messages. (Same object used for
966 both client and server.)
968 * dbus/dbus-transport.h, dbus/dbus-transport.c:
969 Basic abstraction for different kinds of stream
970 that we might read/write messages from.
972 2002-11-23 Havoc Pennington <hp@pobox.com>
974 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
977 * dbus/dbus-test.c (main): add list test, and include
978 dbus-test.h as intended
980 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
981 (_dbus_hash_table_remove_int): return value indicates
982 whether the entry existed to remove
984 * dbus/dbus-list.c: add linked list utility class,
987 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
990 2002-11-23 Havoc Pennington <hp@pobox.com>
992 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
993 DBUS_END_DECLS to nothing, that should fix this once and for all
995 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
997 * dbus/dbus-message.c, dbus/dbus-hash.c:
998 add some missing @brief
1000 2002-11-23 Havoc Pennington <hp@pobox.com>
1002 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1003 to avoid confusing Doxygen
1005 * dbus/dbus-hash.c: @} not }@
1007 * dbus/dbus-message.c (struct DBusMessage): split out
1010 2002-11-23 Havoc Pennington <hp@pobox.com>
1012 * configure.in: pile on more warning flags if using gcc
1014 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1015 to document static functions
1017 * configure.in: add summary to end of configure so it
1018 looks nice and attractive
1020 * dbus/dbus-hash.c: finish implementation and write unit
1023 * configure.in: add --enable-tests to enable unit tests
1025 * dbus/dbus-test.c: test program to run unit tests
1026 for all files in dbus/*, initially runs a test for
1029 * dbus/dbus-internals.h: file to hold some internal utility stuff
1031 2002-11-22 Havoc Pennington <hp@redhat.com>
1033 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1034 "ported" away from Tcl
1036 * dbus/dbus-types.h: header for types such as dbus_bool_t
1038 2002-11-22 Havoc Pennington <hp@redhat.com>
1040 * dbus/dbus.h: fixups for doc warnings
1042 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1044 (QUIET): make it quiet so we can see warnings
1046 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1048 2002-11-22 Havoc Pennington <hp@redhat.com>
1050 * Makefile.am: include "Doxyfile" target in all-local
1052 * configure.in: generate the Doxyfile
1054 * Doxyfile.in: move Doxyfile here, so we can use
1055 configure to generate a Doxyfile with the right
1058 2002-11-22 Havoc Pennington <hp@redhat.com>
1060 * dbus/dbus-message.c: move inline docs into .c file
1062 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1063 so all docs are under doc/
1064 (MAN_EXTENSION): generate man pages. Use extension
1065 ".3dbus" which matches ".3qt" on my system,
1066 I guess this is OK, I don't know really.
1067 (FILE_PATTERNS): look for .c files not .h, makes sense
1070 2002-11-22 Havoc Pennington <hp@pobox.com>
1072 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1073 because any app can be a server, and any app can be a client,
1074 the bus is a special kind of server.
1076 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1078 * Doxyfile : adding. Still needs Makefile rules to be generated
1079 automatically (just run "doxygen" in the toplevel dir for now to
1082 * dbus/dbus-message.h : Adding sample docs (javadoc since
1083 resembles gtk-doc a little more)
1085 * dbus/dbus.h : Adding sample docs
1087 2002-11-21 Havoc Pennington <hp@redhat.com>
1089 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1090 so we can allow ourselves to include files directly,
1091 instead of having to use dbus.h
1093 * dbus/dbus.h: fill in
1095 * dbus/dbus-message.h: sketch out a sample header file.
1096 Include griping if you include it directly instead of
1099 * dbus/dbus-macros.h: new file with macros for extern "C",
1100 TRUE/FALSE, NULL, etc.
1102 * doc/file-boilerplate.c: put include guards in here
1104 2002-11-21 Havoc Pennington <hp@redhat.com>
1106 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1108 * COPYING: include the GPL as well, and license code
1109 under both AFL and GPL.
1111 2002-11-21 Havoc Pennington <hp@redhat.com>
1113 * acconfig.h: get rid of this
1115 * autogen.sh (run_configure): add --no-configure option
1117 * configure.in: remove AC_ARG_PROGRAM to make
1118 autoconf complain less. add AC_PREREQ.
1119 add AC_DEFINE third arg.
1121 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1124 Fix references so we can distcheck.
1126 2002-11-21 Havoc Pennington <hp@redhat.com>
1128 * Initial module creation