1 2003-01-26 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
4 the sender by setting to NULL
6 2003-01-26 Havoc Pennington <hp@pobox.com>
8 The unit tests pass, but otherwise untested. If it breaks, the
9 tests should have been better. ;-)
11 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
14 * dbus/dbus-message.c: redo everything so we maintain
15 message->header as the only copy of the various fields.
16 This avoids the possibility of out-of-memory in some cases,
17 for example dbus_message_lock() can't run out of memory anymore,
18 and avoids extra copying. Figured I may as well go ahead and do
19 this since it was busted for dbus_message_lock to not return
20 failure on OOM, and dbus_message_write_header was totally
21 unchecked for OOM. Also fixed some random other bugs.
23 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
24 that strings are nul-terminated. Also, end_pos can be equal
25 to string length just not greater than, I think.
26 (_dbus_marshal_set_int32): new function
27 (_dbus_marshal_set_uint32): new function
28 (_dbus_marshal_set_string): new function
30 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
31 a warning, init timeout_list to NULL
32 (dbus_connection_send_message): don't use uninitialized variable
35 * dbus/dbus-string.c (_dbus_string_replace_len): new function
37 2003-01-26 Anders Carlsson <andersca@codefactory.se>
39 * bus/driver.c: (bus_driver_handle_hello),
40 (bus_driver_send_welcome_message):
43 2003-01-26 Anders Carlsson <andersca@codefactory.se>
45 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
46 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
47 (dbus_connection_unref):
48 * dbus/dbus-marshal.c: (_dbus_marshal_test):
49 * dbus/dbus-message.c: (dbus_message_unref),
52 (dbus_message_get_fields):
53 Remove debugging printout.
55 (_dbus_message_loader_return_buffer):
56 Don't store the header string.
61 2003-01-26 Richard Hult <rhult@codefactory.se>
63 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
64 the file descriptor list, since it can change under us.
66 2003-01-25 Anders Carlsson <andersca@codefactory.se>
68 * glib/dbus-gmain.c: (dbus_connection_prepare),
69 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
70 (remove_watch), (dbus_connection_hookup_with_g_main):
71 Rewrite the glib handling to use its own GSource instead of a
72 GIOChannel so we can catch messages put in the queue while waiting
75 2003-01-25 Anders Carlsson <andersca@codefactory.se>
78 * bus/connection.c: (connection_disconnect_handler),
79 (connection_watch_callback), (bus_connection_setup):
80 * bus/dispatch.c: (send_one_message),
81 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
82 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
84 * bus/driver.c: (bus_driver_send_service_deleted),
85 (bus_driver_send_service_created), (bus_driver_handle_hello),
86 (bus_driver_send_welcome_message),
87 (bus_driver_handle_list_services), (bus_driver_remove_connection),
88 (bus_driver_handle_message):
90 Refactor code, put the message dispatching in its own file. Use
91 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
94 2003-01-25 Anders Carlsson <andersca@codefactory.se>
96 * dbus/dbus-internals.h:
97 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
99 * dbus/dbus-message.c: (dbus_message_get_sender):
100 * dbus/dbus-message.h:
101 Implement dbus_message_get_sender.
103 * dbus/dbus-protocol.h:
104 Add message and service defines.
106 2003-01-25 Anders Carlsson <andersca@codefactory.se>
108 * dbus/dbus-connection.c: (dbus_connection_send_message):
109 * dbus/dbus-message-internal.h:
110 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
111 (dbus_message_write_header):
112 Remove _dbus_messag_unlock and don't set the client serial on a
113 message if one already exists.
115 2003-01-24 Havoc Pennington <hp@pobox.com>
117 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
120 * bus/driver.c (bus_driver_handle_list_services): fix a leak
123 2003-01-25 Anders Carlsson <andersca@codefactory.se>
125 * dbus/dbus-list.c: (alloc_link), (free_link):
126 Use a memory pool for the links.
128 2003-01-25 Anders Carlsson <andersca@codefactory.se>
130 * bus/connection.c: (bus_connection_foreach):
132 Add new bus_connection_foreach function.
134 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
135 Add function that broadcasts a message to all clients.
137 (bus_driver_send_service_created), (bus_driver_handle_hello),
138 (bus_driver_send_welcome_message),
139 (bus_driver_handle_list_services), (bus_driver_message_handler):
140 Implement functions that take care of listing services, and notifying
141 clients when new services are created.
143 * bus/services.c: (bus_services_list):
145 Add new function that returns an array of strings with the currently
150 Update copyright year.
152 2003-01-25 Anders Carlsson <andersca@codefactory.se>
154 * dbus/dbus-connection.c: (dbus_connection_send_message):
155 Unlock the message in case it was sent earlier.
157 (dbus_connection_send_message_with_reply_and_block):
158 Remove the reply message from the list.
160 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
161 Set array_len and new_pos correctly.
163 (_dbus_marshal_test):
166 * dbus/dbus-message-internal.h:
167 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
168 New function that returns the reply serial.
170 (_dbus_message_unlock):
171 New function that unlocks a message and resets its header.
173 (dbus_message_append_string_array),
174 (dbus_message_get_fields_valist),
175 (dbus_message_iter_get_field_type),
176 (dbus_message_iter_get_string_array),
177 (dbus_message_get_fields),
178 (dbus_message_append_fields_valist):
179 Handle string arrays.
181 (dbus_message_set_sender):
182 Make this function public since the bus daemon needs it.
184 (decode_header_data):
185 Set the reply serial to -1 initially.
187 * dbus/dbus-message.h:
188 Add dbus_message_set_sender.
190 2003-01-24 Havoc Pennington <hp@pobox.com>
192 * doc/dbus-specification.sgml: add some stuff
194 2003-01-22 Havoc Pennington <hp@pobox.com>
196 * doc/dbus-specification.sgml: Start to document the protocol.
198 2003-01-22 Havoc Pennington <hp@pobox.com>
200 * dbus/dbus-connection.c
201 (dbus_connection_send_message_with_reply_and_block): add some @todo
203 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
205 2003-01-21 Havoc Pennington <hp@pobox.com>
207 (patch untested because can't compile)
209 * bus/driver.c (create_unique_client_name): make this function
210 never recycle client names. Also, caller should initialize
213 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
215 2003-01-21 Anders Carlsson <andersca@codefactory.se>
217 * dbus/dbus-marshal.c: (_dbus_marshal_double),
218 (_dbus_marshal_int32), (_dbus_marshal_uint32),
219 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
220 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
221 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
222 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
223 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
224 * dbus/dbus-marshal.h:
225 * dbus/dbus-protocol.h:
226 Add support for marshalling and demarshalling integer, double
229 2003-01-21 Anders Carlsson <andersca@codefactory.se>
234 * bus/connection.c: (connection_disconnect_handler):
235 Remove the connection from the bus driver's list.
237 (connection_watch_callback): Dispatch messages.
239 (free_connection_data): Free connection name.
241 (bus_connection_setup): Add connection to the bus driver's list.
242 (bus_connection_remove_owned_service):
243 (bus_connection_set_name), (bus_connection_get_name):
244 Add functions for setting and getting the connection's name.
247 Add function headers.
249 * bus/driver.c: (create_unique_client_name),
250 (bus_driver_handle_hello_message),
251 (bus_driver_send_welcome_message), (bus_driver_message_handler),
252 (bus_driver_add_connection), (bus_driver_remove_connection):
255 * bus/services.c: (bus_service_free):
257 New file that handles communication and registreation with the bus
260 2003-01-21 Anders Carlsson <andersca@codefactory.se>
262 * dbus/dbus-connection.c: (dbus_connection_send_message):
263 Add a new client_serial parameter.
265 (dbus_connection_send_message_with_reply):
266 Remove a @todo since we've implemented the blocking function.
268 (dbus_connection_send_message_with_reply_and_block):
269 New function that sends a message and waits for a reply and
270 then returns the reply.
272 * dbus/dbus-connection.h:
275 * dbus/dbus-errors.c: (dbus_result_to_string):
276 * dbus/dbus-errors.h:
279 * dbus/dbus-message-internal.h:
280 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
281 (_dbus_message_set_sender), (dbus_message_write_header),
282 (dbus_message_new_reply), (decode_header_data),
283 (_dbus_message_loader_return_buffer), (_dbus_message_test):
284 * dbus/dbus-message.h:
285 Add new functions that set the reply serial and sender.
286 Also marshal and demarshal them correctly and add test.
288 * dbus/dbus-protocol.h:
289 Add new DBUS_MESSAGE_TYPE_SENDER.
292 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
293 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
294 (dbus_connection_hookup_with_g_main):
295 * glib/test-dbus-glib.c: (main):
296 Rewrite to use GIOChannel and remove the GSource crack.
298 * test/echo-client.c: (main):
299 * test/watch.c: (check_messages):
300 Update for changed APIs
302 2003-01-19 Anders Carlsson <andersca@codefactory.se>
304 * dbus/Makefile.am: Add dbus-timeout.[cħ]
306 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
307 Create a DBusTimeoutList.
308 (dbus_connection_set_timeout_functions): Add new function to
309 set timeout callbacks
311 * dbus/dbus-connection.h: Add public DBusTimeout API.
313 * dbus/dbus-message.c: (dbus_message_get_service):
314 * dbus/dbus-message.h: New function.
316 * dbus/dbus-server.c: Fix small doc typo.
318 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
320 2003-01-19 Anders Carlsson <andersca@codefactory.se>
322 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
323 of the string, just as long as specified.
325 2003-01-19 Havoc Pennington <hp@pobox.com>
327 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
330 * dbus/dbus-server.c (dbus_server_set_max_connections)
331 (dbus_server_get_max_connections, dbus_server_get_n_connections):
332 keep track of current number of connections, and add API for
333 setting a max (but haven't implemented enforcing the max yet)
335 2003-01-18 Havoc Pennington <hp@pobox.com>
337 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
338 reading/writing if read_watch != NULL or write_watch != NULL.
340 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
341 the message loader code to actually load message->header and
342 message->body into the newly-created message.
344 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
347 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
348 (dbus_connection_get_max_message_size)
349 (dbus_connection_set_max_live_messages_size)
350 (dbus_connection_get_max_live_messages_size): implement some
351 resource limitation functions
353 * dbus/dbus-resources.c: new file implementing some of the
354 resource limits stuff
356 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
357 missing docs, add @todo to handle OOM etc.
359 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
362 2003-01-18 Havoc Pennington <hp@pobox.com>
364 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
365 connection if it hasn't been already.
367 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
368 replace with DisconnectFunction.
370 2003-01-18 Havoc Pennington <hp@pobox.com>
372 Building --disable-verbose-mode --disable-asserts --disable-tests
373 cuts the library from 112K to 45K or so
375 * configure.in: check for varargs macro support,
376 add --enable-verbose-mode, --enable-asserts.
378 * dbus/dbus-internals.h (_dbus_assert): support
380 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
382 2003-01-18 Havoc Pennington <hp@pobox.com>
384 * dbus/dbus-test.c: include config.h so that tests actually run
386 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
387 so the failure mode when that assumption fails will be plenty
390 2003-01-18 Havoc Pennington <hp@pobox.com>
392 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
394 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
397 * test/Makefile.am: don't use special variable "TESTS" for echo-*
398 since we don't want to use those in make check
400 2003-01-15 Havoc Pennington <hp@redhat.com>
406 2003-01-15 Havoc Pennington <hp@redhat.com>
408 * test/Makefile.am: fix so that test source code ends up in the
409 distribution on make distcheck
411 2003-01-15 Havoc Pennington <hp@redhat.com>
417 2003-01-15 Havoc Pennington <hp@redhat.com>
419 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
420 fix build when --disable-tests
422 * Makefile.am (EXTRA_DIST): put HACKING in here
424 * HACKING: document procedure for making a tarball release.
426 2003-01-14 Anders Carlsson <andersca@codefactory.se>
428 * bus/connection.c: (connection_error_handler),
429 (bus_connection_setup):
430 * bus/main.c: (main):
431 Make sure that the DBusConnectionData struct is NULLed
432 out to prevent a segfault.
434 * dbus/dbus-errors.c: (dbus_result_to_string):
435 * dbus/dbus-errors.h:
436 * dbus/dbus-message.c: (dbus_message_get_fields),
437 (dbus_message_get_fields_valist), (_dbus_message_test):
438 * dbus/dbus-message.h:
439 Make dbus_message_get_fields return a result code so we can
440 track invalid fields as well as oom.
442 2003-01-11 Havoc Pennington <hp@pobox.com>
444 * configure.in: change --enable-test/--enable-ansi action-if-given
445 to enable_foo=$enableval instead of enable_foo=yes
447 2003-01-08 Havoc Pennington <hp@pobox.com>
449 * dbus/dbus-string.c (_dbus_string_align_length): new function
451 * dbus/dbus-test-main.c: move main() for test app here
453 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
454 symbol to run tests, because dbus-test isn't in the main
457 Code review nitpicks.
459 * dbus/dbus-message.c (dbus_message_write_header): add newlines
460 for people with narrow emacs ;-). Assert client_serial was filled
461 in. Assert message->name != NULL.
462 (dbus_message_append_fields): have "first_field_type" arg separate
463 from va list, needed for C++ binding that also uses varargs IIRC
464 and helps with type safety
465 (dbus_message_new): add @todo about using DBusString to store
466 service/name internally
467 (dbus_message_new): don't leak ->service and ->name on OOM later
469 (dbus_message_unref): free the service name
470 (dbus_message_get_fields): same change to varargs
471 i.e. first_field_type
472 (_dbus_message_loader_return_buffer): assert that the message data
473 is aligned (if not it's a bug in our code). Put in verbose griping
474 about why we set corrupted = TRUE.
475 (decode_header_data): add FIXME that char* is evil. Was going to
476 add FIXME about evil locale-specific string.h strncmp, but just
477 switched to wacky string-as-uint32 optimization. Move check for
478 "no room for field name" above get_const_data_len() to avoid
479 assertion failure in get_const_data_len if we have trailing 2
480 bytes or the like. Check for service and name fields being
481 provided twice. Don't leak service/name on error. Require field
482 names to be aligned to 4 bytes.
484 * dbus/dbus-marshal.c: move byte swap stuff to header
485 (_dbus_pack_int32): uscore-prefix
486 (_dbus_unpack_int32): uscore-prefix
487 (_dbus_unpack_uint32): export
488 (_dbus_demarshal_string): add @todo complaining about use of
490 (_dbus_marshal_get_field_end_pos): add @todo about bad error
491 handling allowing corrupt data to go unchecked
493 2003-01-08 Havoc Pennington <hp@redhat.com>
495 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
496 to the select() as needed for authentication. (should be using
497 _dbus_poll() not select, but for another day)
499 * dbus/dbus.h: include dbus/dbus-protocol.h
501 2003-01-08 Anders Carlsson <andersca@codefactory.se>
503 * dbus/Makefile.am (dbusinclude_HEADERS): Install
506 2003-01-08 Anders Carlsson <andersca@codefactory.se>
508 * dbus/dbus-internals.c: (_dbus_type_to_string):
509 New function that returns a string describing a type.
511 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
512 * dbus/dbus-marshal.h:
513 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
514 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
515 (dbus_message_iter_get_byte_array):
516 * dbus/dbus-message.h:
517 Add new convenience functions for appending and getting message fields.
518 Also add demarshalling routines for byte arrays.
520 2003-01-07 Anders Carlsson <andersca@codefactory.se>
522 * dbus/dbus-connection-internal.h:
523 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
524 (_dbus_connection_get_next_client_serial),
525 (dbus_connection_send_message):
526 * dbus/dbus-internals.h:
527 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
528 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
529 (_dbus_marshal_uint32), (_dbus_demarshal_double),
530 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
531 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
532 (_dbus_verbose_bytes), (_dbus_marshal_test):
533 * dbus/dbus-marshal.h:
534 * dbus/dbus-message-internal.h:
535 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
536 (dbus_message_write_header), (_dbus_message_lock),
537 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
538 (dbus_message_get_name), (dbus_message_append_int32),
539 (dbus_message_append_uint32), (dbus_message_append_double),
540 (dbus_message_append_string), (dbus_message_append_byte_array),
541 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
542 (dbus_message_iter_unref), (dbus_message_iter_has_next),
543 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
544 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
545 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
546 (decode_header_data), (_dbus_message_loader_return_buffer),
547 (message_iter_test), (_dbus_message_test):
548 * dbus/dbus-message.h:
549 * dbus/dbus-protocol.h:
550 * dbus/dbus-test.c: (main):
552 * glib/test-dbus-glib.c: (message_handler), (main):
553 * test/echo-client.c: (main):
554 * test/watch.c: (check_messages):
555 Make messages sendable and receivable for real.
557 2003-01-07 Anders Carlsson <andersca@codefactory.se>
559 * dbus/dbus-marshal.c: (_dbus_marshal_double),
560 (_dbus_marshal_string), (_dbus_marshal_byte_array):
561 * dbus/dbus-message.c: (dbus_message_append_int32),
562 (dbus_message_append_uint32), (dbus_message_append_double),
563 (dbus_message_append_string), (dbus_message_append_byte_array):
564 Handle OOM restoration.
566 2003-01-07 Anders Carlsson <andersca@codefactory.se>
568 * dbus/dbus-marshal.c: (_dbus_marshal_string),
569 (_dbus_demarshal_string), (_dbus_marshal_test):
570 * dbus/dbus-marshal.h:
571 * dbus/dbus-message.c: (dbus_message_get_name),
572 Document these functions.
574 (dbus_message_append_int32), (dbus_message_append_uint32),
575 (dbus_message_append_double), (dbus_message_append_string),
576 (dbus_message_append_byte_array):
577 * dbus/dbus-message.h:
578 Add functions for adding message fields of different types.
580 * dbus/dbus-protocol.h:
581 Add the different types.
583 2003-01-05 Havoc Pennington <hp@pobox.com>
585 * bus/connection.c: implement routines for handling connections,
586 first thing is keeping a list of owned services on each connection
587 and setting up watches etc.
589 * bus/services.c: implement a mapping from service names to lists
592 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
594 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
595 to use static mutexes for global data
597 * dbus/dbus-connection.c (dbus_connection_set_data): add new
598 collection of functions to set/get application-specific data
599 on the DBusConnection.
601 2003-01-04 Havoc Pennington <hp@pobox.com>
603 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
604 (_dbus_poll): new function
606 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
609 * bus/loop.c: initial code for the daemon main loop
611 2003-01-04 Havoc Pennington <hp@pobox.com>
613 * test/watch.c (error_handler): make it safe if the error handler
614 is called multiple times (if we s/error handler/disconnect
615 handler/ we should just guarantee it's called only once)
617 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
618 error handler on disconnect (it's quite possible we should
619 just change the error handler to a "disconnect handler," I'm
620 not sure we have any other meaningful errors)
622 * configure.in: check for getpwnam_r
624 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
625 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
626 mechanism as in SASL spec, using socket credentials
628 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
629 (_dbus_send_credentials_unix_socket): new function
631 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
633 (_dbus_write): only check errno if <0 returned
634 (_dbus_write_two): ditto
636 2003-01-02 Anders Carlsson <andersca@codefactory.se>
638 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
639 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
640 (_dbus_marshal_test):
641 * dbus/dbus-marshal.h:
642 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
643 to _dbus_marshal_utf8_string. Also fix some tests.
645 2002-12-28 Harri Porten <porten@kde.org>
647 * configure.in: added check for C++ compiler and a very cheesy
648 check for the Qt integration
650 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
652 * qt/Makefile.am: added
654 * qt/.cvsignore: added
656 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
657 latter, added #ifdef QT_THREAD_SUPPORT guard.
659 * dbus/Makefile.am: added missing headers for make dist
661 2002-12-28 Kristian Rietveld <kris@gtk.org>
663 * dbus/Makefile.am: fixup export-symbols-regex.
665 2002-12-27 Anders Carlsson <andersca@codefactory.se>
667 * acinclude.m4: Add this file and put the
668 PKG_CHECK_MODULE macro in it.
670 2002-12-27 Anders Carlsson <andersca@codefactory.se>
672 * dbus/dbus-marshal.c: (_dbus_marshal_string),
673 (_dbus_demarshal_double), (_dbus_demarshal_int32),
674 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
675 (_dbus_marshal_test):
676 Make the demarshalling routines align the pos argument.
677 Add string marshalling tests and fix the obvious bugs
680 2002-12-26 Havoc Pennington <hp@pobox.com>
682 * dbus/dbus-auth.c: fixes fixes fixes
684 * dbus/dbus-transport-unix.c: wire up support for
685 encoding/decoding data on the wire
687 * dbus/dbus-auth.c (_dbus_auth_encode_data)
688 (_dbus_auth_decode_data): append to target string
689 instead of nuking it.
691 2002-12-26 Havoc Pennington <hp@pobox.com>
693 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
694 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
697 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
698 avoid swap_bytes() overhead (ignoring possible assembly stuff for
699 now). Main point is because I wanted unpack_uint32 to implement
701 (_dbus_verbose_bytes): new function
703 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
705 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
706 mechanism to handle a corrupt message stream
707 (_dbus_message_loader_new): fix preallocation to only prealloc,
710 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
711 (_dbus_string_test): enhance tests for copy/move and fix the
714 * dbus/dbus-transport-unix.c: Hold references in more places to
715 avoid reentrancy problems
717 * dbus/dbus-transport.c: ditto
719 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
720 leak reference count in no-message case
722 * test/watch.c (do_mainloop): handle adding/removing watches
723 during iteration over the watches. Also, ref the connection/server
724 stored on a watch, so we don't try to mangle a destroyed one.
726 * dbus/dbus-transport-unix.c (do_authentication): perform
729 * dbus/dbus-auth.c (get_state): add a state
730 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
731 (_dbus_auth_get_unused_bytes): append the unused bytes
732 to the passed in string, rather than prepend
734 * dbus/dbus-transport.c (_dbus_transport_init_base): create
735 the auth conversation DBusAuth
737 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
738 (_dbus_transport_new_for_domain_socket): when creating a
739 transport, pass in whether it's a client-side or server-side
740 transport so we know which DBusAuth to create
742 2002-12-03 Havoc Pennington <hp@pobox.com>
744 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
745 _after_ finalizing the derived members
746 (unix_connection_set): unref watch if we fail to add it
748 * dbus/dbus-connection.c (dbus_connection_unref): delete the
749 transport first, so that the connection owned by the
750 transport will be valid as the transport finalizes.
752 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
753 if necessary, and remove watches from the connection.
755 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
757 2002-12-26 Anders Carlsson <andersca@codefactory.se>
759 * dbus/dbus-marshal.c: (_dbus_marshal_string),
760 (_dbus_demarshal_double), (_dbus_demarshal_int32),
761 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
762 (_dbus_marshal_test):
763 * dbus/dbus-marshal.h:
764 Add string marshal functions and have the demarshal functions
765 return the new position.
767 2002-12-25 Havoc Pennington <hp@pobox.com>
769 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
770 it is a simple protocol that just maps directly to SASL.
772 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
773 initial implementation, not actually used yet.
775 * dbus/dbus-string.c (_dbus_string_find): new function
776 (_dbus_string_equal): new function
777 (_dbus_string_base64_encode): new function
778 (_dbus_string_base64_decode): new function
780 2002-12-25 Anders Carlsson <andersca@codefactory.se>
783 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
784 (_dbus_marshal_int32), (_dbus_marshal_uint32),
785 (_dbus_demarshal_double), (_dbus_demarshal_int32),
786 (_dbus_demarshal_uint32), (_dbus_marshal_test):
787 * dbus/dbus-marshal.h:
788 * dbus/dbus-protocol.h:
789 * dbus/dbus-test.c: (main):
791 Add un-optimized marshalling/demarshalling routines.
793 2002-12-25 Harri Porten <porten@kde.org>
795 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
797 2002-12-24 Zack Rusin <zack@kde.org>
799 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
800 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
803 2002-12-24 Havoc Pennington <hp@pobox.com>
805 * glib/dbus-gthread.c: fix include
807 * glib/dbus-glib.h: rename DBusMessageHandler for now.
808 I think glib API needs to change, though, as you don't
809 want to use DBusMessageFunction, you want to use the
810 DBusMessageHandler object. Probably
811 dbus_connection_open_with_g_main_loop()
812 and dbus_connection_setup_g_main_loop() or something like that
813 (but think of better names...) that just create a connection
814 that has watch/timeout functions etc. already set up.
816 * dbus/dbus-connection.c
817 (dbus_connection_send_message_with_reply): new function just to
818 show how the message handler helps us deal with replies.
820 * dbus/dbus-list.c (_dbus_list_remove_last): new function
822 * dbus/dbus-string.c (_dbus_string_test): free a string that
825 * dbus/dbus-hash.c: use memory pools for the hash entries
826 (rebuild_table): be more paranoid about overflow, and
827 shrink table when we can
828 (_dbus_hash_test): reduce number of sprintfs and write
829 valid C89. Add tests for case where we grow and then
830 shrink the hash table.
832 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
834 * dbus/dbus-connection.c (dbus_connection_register_handler)
835 (dbus_connection_unregister_handler): new functions
837 * dbus/dbus-message.c (dbus_message_get_name): new
839 * dbus/dbus-list.c: fix docs typo
841 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
842 an object representing a handler for messages.
844 2002-12-16 Anders Carlsson <andersca@codefactory.se>
847 * glib/dbus-gthread.c: (dbus_gthread_init):
848 Don't use the gdbus prefix for public functions.
850 2002-12-16 Anders Carlsson <andersca@codefactory.se>
854 Add GLib checks and fixup .pc files
858 * glib/dbus-gmain.c: (gdbus_connection_prepare),
859 (gdbus_connection_check), (gdbus_connection_dispatch),
860 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
861 (dbus_connection_gsource_new):
862 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
863 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
864 * glib/test-dbus-glib.c: (message_handler), (main):
867 2002-12-15 Harri Porten <porten@kde.org>
869 * autogen.sh: check for libtoolize before attempting to use it
871 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
874 * .cvsignore: ignore more stamp files
876 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
878 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
879 without make install.
881 2002-12-15 Havoc Pennington <hp@pobox.com>
883 * dbus/dbus-threads.c: add thread stubs that a higher library
884 layer can fill in. e.g. the GLib wrapper might fill them in with
885 GThread stuff. We still need to use this thread API to
886 thread-safe-ize the library.
888 2002-12-12 Havoc Pennington <hp@pobox.com>
890 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
891 below new interfaces and include fewer system headers.
893 * dbus/dbus-sysdeps.c (_dbus_read): new function
894 (_dbus_write): new function
895 (_dbus_write_two): new function
896 (_dbus_connect_unix_socket): new function
897 (_dbus_listen_unix_socket): new function
899 * dbus/dbus-message-internal.h: change interfaces to use
902 2002-12-11 Havoc Pennington <hp@pobox.com>
904 * dbus/dbus-types.h: add dbus_unichar
906 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
908 * dbus/dbus-connection.c (dbus_connection_send_message): return
911 * dbus/dbus-transport.c: include dbus-watch.h
913 * dbus/dbus-connection.c: include dbus-message-internal.h
915 * HACKING: add file with coding guidelines stuff.
917 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
918 handling here, for security purposes (as in vsftpd). Not actually
919 using this class yet.
921 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
922 system/libc usage here, as in vsftpd, for ease of auditing (and
923 should also simplify portability). Haven't actually moved all the
924 system/libc usage into here yet.
926 2002-11-25 Havoc Pennington <hp@pobox.com>
928 * dbus/dbus-internals.c (_dbus_verbose): fix to not
929 always print the first verbose message.
931 2002-11-24 Havoc Pennington <hp@pobox.com>
933 * test/echo-client.c, test/echo-server.c: cheesy test
936 * configure.in (AC_CHECK_FUNCS): check for writev
938 * dbus/dbus-message.c (_dbus_message_get_network_data): new
941 * dbus/dbus-list.c (_dbus_list_foreach): new function
943 * dbus/dbus-internals.c (_dbus_verbose): new function
945 * dbus/dbus-server.c, dbus/dbus-server.h: public object
946 representing a server that listens for connections.
948 * dbus/.cvsignore: create
950 * dbus/dbus-errors.h, dbus/dbus-errors.c:
951 public API for reporting errors
953 * dbus/dbus-connection.h, dbus/dbus-connection.c:
954 public object representing a connection that
955 sends/receives messages. (Same object used for
956 both client and server.)
958 * dbus/dbus-transport.h, dbus/dbus-transport.c:
959 Basic abstraction for different kinds of stream
960 that we might read/write messages from.
962 2002-11-23 Havoc Pennington <hp@pobox.com>
964 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
967 * dbus/dbus-test.c (main): add list test, and include
968 dbus-test.h as intended
970 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
971 (_dbus_hash_table_remove_int): return value indicates
972 whether the entry existed to remove
974 * dbus/dbus-list.c: add linked list utility class,
977 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
980 2002-11-23 Havoc Pennington <hp@pobox.com>
982 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
983 DBUS_END_DECLS to nothing, that should fix this once and for all
985 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
987 * dbus/dbus-message.c, dbus/dbus-hash.c:
988 add some missing @brief
990 2002-11-23 Havoc Pennington <hp@pobox.com>
992 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
993 to avoid confusing Doxygen
995 * dbus/dbus-hash.c: @} not }@
997 * dbus/dbus-message.c (struct DBusMessage): split out
1000 2002-11-23 Havoc Pennington <hp@pobox.com>
1002 * configure.in: pile on more warning flags if using gcc
1004 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1005 to document static functions
1007 * configure.in: add summary to end of configure so it
1008 looks nice and attractive
1010 * dbus/dbus-hash.c: finish implementation and write unit
1013 * configure.in: add --enable-tests to enable unit tests
1015 * dbus/dbus-test.c: test program to run unit tests
1016 for all files in dbus/*, initially runs a test for
1019 * dbus/dbus-internals.h: file to hold some internal utility stuff
1021 2002-11-22 Havoc Pennington <hp@redhat.com>
1023 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1024 "ported" away from Tcl
1026 * dbus/dbus-types.h: header for types such as dbus_bool_t
1028 2002-11-22 Havoc Pennington <hp@redhat.com>
1030 * dbus/dbus.h: fixups for doc warnings
1032 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1034 (QUIET): make it quiet so we can see warnings
1036 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1038 2002-11-22 Havoc Pennington <hp@redhat.com>
1040 * Makefile.am: include "Doxyfile" target in all-local
1042 * configure.in: generate the Doxyfile
1044 * Doxyfile.in: move Doxyfile here, so we can use
1045 configure to generate a Doxyfile with the right
1048 2002-11-22 Havoc Pennington <hp@redhat.com>
1050 * dbus/dbus-message.c: move inline docs into .c file
1052 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1053 so all docs are under doc/
1054 (MAN_EXTENSION): generate man pages. Use extension
1055 ".3dbus" which matches ".3qt" on my system,
1056 I guess this is OK, I don't know really.
1057 (FILE_PATTERNS): look for .c files not .h, makes sense
1060 2002-11-22 Havoc Pennington <hp@pobox.com>
1062 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1063 because any app can be a server, and any app can be a client,
1064 the bus is a special kind of server.
1066 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1068 * Doxyfile : adding. Still needs Makefile rules to be generated
1069 automatically (just run "doxygen" in the toplevel dir for now to
1072 * dbus/dbus-message.h : Adding sample docs (javadoc since
1073 resembles gtk-doc a little more)
1075 * dbus/dbus.h : Adding sample docs
1077 2002-11-21 Havoc Pennington <hp@redhat.com>
1079 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1080 so we can allow ourselves to include files directly,
1081 instead of having to use dbus.h
1083 * dbus/dbus.h: fill in
1085 * dbus/dbus-message.h: sketch out a sample header file.
1086 Include griping if you include it directly instead of
1089 * dbus/dbus-macros.h: new file with macros for extern "C",
1090 TRUE/FALSE, NULL, etc.
1092 * doc/file-boilerplate.c: put include guards in here
1094 2002-11-21 Havoc Pennington <hp@redhat.com>
1096 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1098 * COPYING: include the GPL as well, and license code
1099 under both AFL and GPL.
1101 2002-11-21 Havoc Pennington <hp@redhat.com>
1103 * acconfig.h: get rid of this
1105 * autogen.sh (run_configure): add --no-configure option
1107 * configure.in: remove AC_ARG_PROGRAM to make
1108 autoconf complain less. add AC_PREREQ.
1109 add AC_DEFINE third arg.
1111 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1114 Fix references so we can distcheck.
1116 2002-11-21 Havoc Pennington <hp@redhat.com>
1118 * Initial module creation