1 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3 * glib/dbus-gmain.c: (dbus_connection_prepare),
4 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5 (remove_watch), (dbus_connection_hookup_with_g_main):
6 Rewrite the glib handling to use its own GSource instead of a
7 GIOChannel so we can catch messages put in the queue while waiting
10 2003-01-25 Anders Carlsson <andersca@codefactory.se>
13 * bus/connection.c: (connection_disconnect_handler),
14 (connection_watch_callback), (bus_connection_setup):
15 * bus/dispatch.c: (send_one_message),
16 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
17 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
19 * bus/driver.c: (bus_driver_send_service_deleted),
20 (bus_driver_send_service_created), (bus_driver_handle_hello),
21 (bus_driver_send_welcome_message),
22 (bus_driver_handle_list_services), (bus_driver_remove_connection),
23 (bus_driver_handle_message):
25 Refactor code, put the message dispatching in its own file. Use
26 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
29 2003-01-25 Anders Carlsson <andersca@codefactory.se>
31 * dbus/dbus-internals.h:
32 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
34 * dbus/dbus-message.c: (dbus_message_get_sender):
35 * dbus/dbus-message.h:
36 Implement dbus_message_get_sender.
38 * dbus/dbus-protocol.h:
39 Add message and service defines.
41 2003-01-25 Anders Carlsson <andersca@codefactory.se>
43 * dbus/dbus-connection.c: (dbus_connection_send_message):
44 * dbus/dbus-message-internal.h:
45 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
46 (dbus_message_write_header):
47 Remove _dbus_messag_unlock and don't set the client serial on a
48 message if one already exists.
50 2003-01-24 Havoc Pennington <hp@pobox.com>
52 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
55 * bus/driver.c (bus_driver_handle_list_services): fix a leak
58 2003-01-25 Anders Carlsson <andersca@codefactory.se>
60 * dbus/dbus-list.c: (alloc_link), (free_link):
61 Use a memory pool for the links.
63 2003-01-25 Anders Carlsson <andersca@codefactory.se>
65 * bus/connection.c: (bus_connection_foreach):
67 Add new bus_connection_foreach function.
69 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
70 Add function that broadcasts a message to all clients.
72 (bus_driver_send_service_created), (bus_driver_handle_hello),
73 (bus_driver_send_welcome_message),
74 (bus_driver_handle_list_services), (bus_driver_message_handler):
75 Implement functions that take care of listing services, and notifying
76 clients when new services are created.
78 * bus/services.c: (bus_services_list):
80 Add new function that returns an array of strings with the currently
85 Update copyright year.
87 2003-01-25 Anders Carlsson <andersca@codefactory.se>
89 * dbus/dbus-connection.c: (dbus_connection_send_message):
90 Unlock the message in case it was sent earlier.
92 (dbus_connection_send_message_with_reply_and_block):
93 Remove the reply message from the list.
95 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
96 Set array_len and new_pos correctly.
101 * dbus/dbus-message-internal.h:
102 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
103 New function that returns the reply serial.
105 (_dbus_message_unlock):
106 New function that unlocks a message and resets its header.
108 (dbus_message_append_string_array),
109 (dbus_message_get_fields_valist),
110 (dbus_message_iter_get_field_type),
111 (dbus_message_iter_get_string_array),
112 (dbus_message_get_fields),
113 (dbus_message_append_fields_valist):
114 Handle string arrays.
116 (dbus_message_set_sender):
117 Make this function public since the bus daemon needs it.
119 (decode_header_data):
120 Set the reply serial to -1 initially.
122 * dbus/dbus-message.h:
123 Add dbus_message_set_sender.
125 2003-01-24 Havoc Pennington <hp@pobox.com>
127 * doc/dbus-specification.sgml: add some stuff
129 2003-01-22 Havoc Pennington <hp@pobox.com>
131 * doc/dbus-specification.sgml: Start to document the protocol.
133 2003-01-22 Havoc Pennington <hp@pobox.com>
135 * dbus/dbus-connection.c
136 (dbus_connection_send_message_with_reply_and_block): add some @todo
138 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
140 2003-01-21 Havoc Pennington <hp@pobox.com>
142 (patch untested because can't compile)
144 * bus/driver.c (create_unique_client_name): make this function
145 never recycle client names. Also, caller should initialize
148 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
150 2003-01-21 Anders Carlsson <andersca@codefactory.se>
152 * dbus/dbus-marshal.c: (_dbus_marshal_double),
153 (_dbus_marshal_int32), (_dbus_marshal_uint32),
154 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
155 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
156 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
157 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
158 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
159 * dbus/dbus-marshal.h:
160 * dbus/dbus-protocol.h:
161 Add support for marshalling and demarshalling integer, double
164 2003-01-21 Anders Carlsson <andersca@codefactory.se>
169 * bus/connection.c: (connection_disconnect_handler):
170 Remove the connection from the bus driver's list.
172 (connection_watch_callback): Dispatch messages.
174 (free_connection_data): Free connection name.
176 (bus_connection_setup): Add connection to the bus driver's list.
177 (bus_connection_remove_owned_service):
178 (bus_connection_set_name), (bus_connection_get_name):
179 Add functions for setting and getting the connection's name.
182 Add function headers.
184 * bus/driver.c: (create_unique_client_name),
185 (bus_driver_handle_hello_message),
186 (bus_driver_send_welcome_message), (bus_driver_message_handler),
187 (bus_driver_add_connection), (bus_driver_remove_connection):
190 * bus/services.c: (bus_service_free):
192 New file that handles communication and registreation with the bus
195 2003-01-21 Anders Carlsson <andersca@codefactory.se>
197 * dbus/dbus-connection.c: (dbus_connection_send_message):
198 Add a new client_serial parameter.
200 (dbus_connection_send_message_with_reply):
201 Remove a @todo since we've implemented the blocking function.
203 (dbus_connection_send_message_with_reply_and_block):
204 New function that sends a message and waits for a reply and
205 then returns the reply.
207 * dbus/dbus-connection.h:
210 * dbus/dbus-errors.c: (dbus_result_to_string):
211 * dbus/dbus-errors.h:
214 * dbus/dbus-message-internal.h:
215 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
216 (_dbus_message_set_sender), (dbus_message_write_header),
217 (dbus_message_new_reply), (decode_header_data),
218 (_dbus_message_loader_return_buffer), (_dbus_message_test):
219 * dbus/dbus-message.h:
220 Add new functions that set the reply serial and sender.
221 Also marshal and demarshal them correctly and add test.
223 * dbus/dbus-protocol.h:
224 Add new DBUS_MESSAGE_TYPE_SENDER.
227 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
228 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
229 (dbus_connection_hookup_with_g_main):
230 * glib/test-dbus-glib.c: (main):
231 Rewrite to use GIOChannel and remove the GSource crack.
233 * test/echo-client.c: (main):
234 * test/watch.c: (check_messages):
235 Update for changed APIs
237 2003-01-19 Anders Carlsson <andersca@codefactory.se>
239 * dbus/Makefile.am: Add dbus-timeout.[cħ]
241 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
242 Create a DBusTimeoutList.
243 (dbus_connection_set_timeout_functions): Add new function to
244 set timeout callbacks
246 * dbus/dbus-connection.h: Add public DBusTimeout API.
248 * dbus/dbus-message.c: (dbus_message_get_service):
249 * dbus/dbus-message.h: New function.
251 * dbus/dbus-server.c: Fix small doc typo.
253 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
255 2003-01-19 Anders Carlsson <andersca@codefactory.se>
257 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
258 of the string, just as long as specified.
260 2003-01-19 Havoc Pennington <hp@pobox.com>
262 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
265 * dbus/dbus-server.c (dbus_server_set_max_connections)
266 (dbus_server_get_max_connections, dbus_server_get_n_connections):
267 keep track of current number of connections, and add API for
268 setting a max (but haven't implemented enforcing the max yet)
270 2003-01-18 Havoc Pennington <hp@pobox.com>
272 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
273 reading/writing if read_watch != NULL or write_watch != NULL.
275 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
276 the message loader code to actually load message->header and
277 message->body into the newly-created message.
279 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
282 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
283 (dbus_connection_get_max_message_size)
284 (dbus_connection_set_max_live_messages_size)
285 (dbus_connection_get_max_live_messages_size): implement some
286 resource limitation functions
288 * dbus/dbus-resources.c: new file implementing some of the
289 resource limits stuff
291 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
292 missing docs, add @todo to handle OOM etc.
294 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
297 2003-01-18 Havoc Pennington <hp@pobox.com>
299 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
300 connection if it hasn't been already.
302 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
303 replace with DisconnectFunction.
305 2003-01-18 Havoc Pennington <hp@pobox.com>
307 Building --disable-verbose-mode --disable-asserts --disable-tests
308 cuts the library from 112K to 45K or so
310 * configure.in: check for varargs macro support,
311 add --enable-verbose-mode, --enable-asserts.
313 * dbus/dbus-internals.h (_dbus_assert): support
315 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
317 2003-01-18 Havoc Pennington <hp@pobox.com>
319 * dbus/dbus-test.c: include config.h so that tests actually run
321 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
322 so the failure mode when that assumption fails will be plenty
325 2003-01-18 Havoc Pennington <hp@pobox.com>
327 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
329 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
332 * test/Makefile.am: don't use special variable "TESTS" for echo-*
333 since we don't want to use those in make check
335 2003-01-15 Havoc Pennington <hp@redhat.com>
341 2003-01-15 Havoc Pennington <hp@redhat.com>
343 * test/Makefile.am: fix so that test source code ends up in the
344 distribution on make distcheck
346 2003-01-15 Havoc Pennington <hp@redhat.com>
352 2003-01-15 Havoc Pennington <hp@redhat.com>
354 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
355 fix build when --disable-tests
357 * Makefile.am (EXTRA_DIST): put HACKING in here
359 * HACKING: document procedure for making a tarball release.
361 2003-01-14 Anders Carlsson <andersca@codefactory.se>
363 * bus/connection.c: (connection_error_handler),
364 (bus_connection_setup):
365 * bus/main.c: (main):
366 Make sure that the DBusConnectionData struct is NULLed
367 out to prevent a segfault.
369 * dbus/dbus-errors.c: (dbus_result_to_string):
370 * dbus/dbus-errors.h:
371 * dbus/dbus-message.c: (dbus_message_get_fields),
372 (dbus_message_get_fields_valist), (_dbus_message_test):
373 * dbus/dbus-message.h:
374 Make dbus_message_get_fields return a result code so we can
375 track invalid fields as well as oom.
377 2003-01-11 Havoc Pennington <hp@pobox.com>
379 * configure.in: change --enable-test/--enable-ansi action-if-given
380 to enable_foo=$enableval instead of enable_foo=yes
382 2003-01-08 Havoc Pennington <hp@pobox.com>
384 * dbus/dbus-string.c (_dbus_string_align_length): new function
386 * dbus/dbus-test-main.c: move main() for test app here
388 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
389 symbol to run tests, because dbus-test isn't in the main
392 Code review nitpicks.
394 * dbus/dbus-message.c (dbus_message_write_header): add newlines
395 for people with narrow emacs ;-). Assert client_serial was filled
396 in. Assert message->name != NULL.
397 (dbus_message_append_fields): have "first_field_type" arg separate
398 from va list, needed for C++ binding that also uses varargs IIRC
399 and helps with type safety
400 (dbus_message_new): add @todo about using DBusString to store
401 service/name internally
402 (dbus_message_new): don't leak ->service and ->name on OOM later
404 (dbus_message_unref): free the service name
405 (dbus_message_get_fields): same change to varargs
406 i.e. first_field_type
407 (_dbus_message_loader_return_buffer): assert that the message data
408 is aligned (if not it's a bug in our code). Put in verbose griping
409 about why we set corrupted = TRUE.
410 (decode_header_data): add FIXME that char* is evil. Was going to
411 add FIXME about evil locale-specific string.h strncmp, but just
412 switched to wacky string-as-uint32 optimization. Move check for
413 "no room for field name" above get_const_data_len() to avoid
414 assertion failure in get_const_data_len if we have trailing 2
415 bytes or the like. Check for service and name fields being
416 provided twice. Don't leak service/name on error. Require field
417 names to be aligned to 4 bytes.
419 * dbus/dbus-marshal.c: move byte swap stuff to header
420 (_dbus_pack_int32): uscore-prefix
421 (_dbus_unpack_int32): uscore-prefix
422 (_dbus_unpack_uint32): export
423 (_dbus_demarshal_string): add @todo complaining about use of
425 (_dbus_marshal_get_field_end_pos): add @todo about bad error
426 handling allowing corrupt data to go unchecked
428 2003-01-08 Havoc Pennington <hp@redhat.com>
430 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
431 to the select() as needed for authentication. (should be using
432 _dbus_poll() not select, but for another day)
434 * dbus/dbus.h: include dbus/dbus-protocol.h
436 2003-01-08 Anders Carlsson <andersca@codefactory.se>
438 * dbus/Makefile.am (dbusinclude_HEADERS): Install
441 2003-01-08 Anders Carlsson <andersca@codefactory.se>
443 * dbus/dbus-internals.c: (_dbus_type_to_string):
444 New function that returns a string describing a type.
446 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
447 * dbus/dbus-marshal.h:
448 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
449 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
450 (dbus_message_iter_get_byte_array):
451 * dbus/dbus-message.h:
452 Add new convenience functions for appending and getting message fields.
453 Also add demarshalling routines for byte arrays.
455 2003-01-07 Anders Carlsson <andersca@codefactory.se>
457 * dbus/dbus-connection-internal.h:
458 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
459 (_dbus_connection_get_next_client_serial),
460 (dbus_connection_send_message):
461 * dbus/dbus-internals.h:
462 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
463 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
464 (_dbus_marshal_uint32), (_dbus_demarshal_double),
465 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
466 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
467 (_dbus_verbose_bytes), (_dbus_marshal_test):
468 * dbus/dbus-marshal.h:
469 * dbus/dbus-message-internal.h:
470 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
471 (dbus_message_write_header), (_dbus_message_lock),
472 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
473 (dbus_message_get_name), (dbus_message_append_int32),
474 (dbus_message_append_uint32), (dbus_message_append_double),
475 (dbus_message_append_string), (dbus_message_append_byte_array),
476 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
477 (dbus_message_iter_unref), (dbus_message_iter_has_next),
478 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
479 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
480 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
481 (decode_header_data), (_dbus_message_loader_return_buffer),
482 (message_iter_test), (_dbus_message_test):
483 * dbus/dbus-message.h:
484 * dbus/dbus-protocol.h:
485 * dbus/dbus-test.c: (main):
487 * glib/test-dbus-glib.c: (message_handler), (main):
488 * test/echo-client.c: (main):
489 * test/watch.c: (check_messages):
490 Make messages sendable and receivable for real.
492 2003-01-07 Anders Carlsson <andersca@codefactory.se>
494 * dbus/dbus-marshal.c: (_dbus_marshal_double),
495 (_dbus_marshal_string), (_dbus_marshal_byte_array):
496 * dbus/dbus-message.c: (dbus_message_append_int32),
497 (dbus_message_append_uint32), (dbus_message_append_double),
498 (dbus_message_append_string), (dbus_message_append_byte_array):
499 Handle OOM restoration.
501 2003-01-07 Anders Carlsson <andersca@codefactory.se>
503 * dbus/dbus-marshal.c: (_dbus_marshal_string),
504 (_dbus_demarshal_string), (_dbus_marshal_test):
505 * dbus/dbus-marshal.h:
506 * dbus/dbus-message.c: (dbus_message_get_name),
507 Document these functions.
509 (dbus_message_append_int32), (dbus_message_append_uint32),
510 (dbus_message_append_double), (dbus_message_append_string),
511 (dbus_message_append_byte_array):
512 * dbus/dbus-message.h:
513 Add functions for adding message fields of different types.
515 * dbus/dbus-protocol.h:
516 Add the different types.
518 2003-01-05 Havoc Pennington <hp@pobox.com>
520 * bus/connection.c: implement routines for handling connections,
521 first thing is keeping a list of owned services on each connection
522 and setting up watches etc.
524 * bus/services.c: implement a mapping from service names to lists
527 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
529 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
530 to use static mutexes for global data
532 * dbus/dbus-connection.c (dbus_connection_set_data): add new
533 collection of functions to set/get application-specific data
534 on the DBusConnection.
536 2003-01-04 Havoc Pennington <hp@pobox.com>
538 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
539 (_dbus_poll): new function
541 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
544 * bus/loop.c: initial code for the daemon main loop
546 2003-01-04 Havoc Pennington <hp@pobox.com>
548 * test/watch.c (error_handler): make it safe if the error handler
549 is called multiple times (if we s/error handler/disconnect
550 handler/ we should just guarantee it's called only once)
552 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
553 error handler on disconnect (it's quite possible we should
554 just change the error handler to a "disconnect handler," I'm
555 not sure we have any other meaningful errors)
557 * configure.in: check for getpwnam_r
559 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
560 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
561 mechanism as in SASL spec, using socket credentials
563 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
564 (_dbus_send_credentials_unix_socket): new function
566 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
568 (_dbus_write): only check errno if <0 returned
569 (_dbus_write_two): ditto
571 2003-01-02 Anders Carlsson <andersca@codefactory.se>
573 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
574 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
575 (_dbus_marshal_test):
576 * dbus/dbus-marshal.h:
577 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
578 to _dbus_marshal_utf8_string. Also fix some tests.
580 2002-12-28 Harri Porten <porten@kde.org>
582 * configure.in: added check for C++ compiler and a very cheesy
583 check for the Qt integration
585 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
587 * qt/Makefile.am: added
589 * qt/.cvsignore: added
591 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
592 latter, added #ifdef QT_THREAD_SUPPORT guard.
594 * dbus/Makefile.am: added missing headers for make dist
596 2002-12-28 Kristian Rietveld <kris@gtk.org>
598 * dbus/Makefile.am: fixup export-symbols-regex.
600 2002-12-27 Anders Carlsson <andersca@codefactory.se>
602 * acinclude.m4: Add this file and put the
603 PKG_CHECK_MODULE macro in it.
605 2002-12-27 Anders Carlsson <andersca@codefactory.se>
607 * dbus/dbus-marshal.c: (_dbus_marshal_string),
608 (_dbus_demarshal_double), (_dbus_demarshal_int32),
609 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
610 (_dbus_marshal_test):
611 Make the demarshalling routines align the pos argument.
612 Add string marshalling tests and fix the obvious bugs
615 2002-12-26 Havoc Pennington <hp@pobox.com>
617 * dbus/dbus-auth.c: fixes fixes fixes
619 * dbus/dbus-transport-unix.c: wire up support for
620 encoding/decoding data on the wire
622 * dbus/dbus-auth.c (_dbus_auth_encode_data)
623 (_dbus_auth_decode_data): append to target string
624 instead of nuking it.
626 2002-12-26 Havoc Pennington <hp@pobox.com>
628 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
629 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
632 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
633 avoid swap_bytes() overhead (ignoring possible assembly stuff for
634 now). Main point is because I wanted unpack_uint32 to implement
636 (_dbus_verbose_bytes): new function
638 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
640 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
641 mechanism to handle a corrupt message stream
642 (_dbus_message_loader_new): fix preallocation to only prealloc,
645 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
646 (_dbus_string_test): enhance tests for copy/move and fix the
649 * dbus/dbus-transport-unix.c: Hold references in more places to
650 avoid reentrancy problems
652 * dbus/dbus-transport.c: ditto
654 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
655 leak reference count in no-message case
657 * test/watch.c (do_mainloop): handle adding/removing watches
658 during iteration over the watches. Also, ref the connection/server
659 stored on a watch, so we don't try to mangle a destroyed one.
661 * dbus/dbus-transport-unix.c (do_authentication): perform
664 * dbus/dbus-auth.c (get_state): add a state
665 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
666 (_dbus_auth_get_unused_bytes): append the unused bytes
667 to the passed in string, rather than prepend
669 * dbus/dbus-transport.c (_dbus_transport_init_base): create
670 the auth conversation DBusAuth
672 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
673 (_dbus_transport_new_for_domain_socket): when creating a
674 transport, pass in whether it's a client-side or server-side
675 transport so we know which DBusAuth to create
677 2002-12-03 Havoc Pennington <hp@pobox.com>
679 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
680 _after_ finalizing the derived members
681 (unix_connection_set): unref watch if we fail to add it
683 * dbus/dbus-connection.c (dbus_connection_unref): delete the
684 transport first, so that the connection owned by the
685 transport will be valid as the transport finalizes.
687 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
688 if necessary, and remove watches from the connection.
690 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
692 2002-12-26 Anders Carlsson <andersca@codefactory.se>
694 * dbus/dbus-marshal.c: (_dbus_marshal_string),
695 (_dbus_demarshal_double), (_dbus_demarshal_int32),
696 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
697 (_dbus_marshal_test):
698 * dbus/dbus-marshal.h:
699 Add string marshal functions and have the demarshal functions
700 return the new position.
702 2002-12-25 Havoc Pennington <hp@pobox.com>
704 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
705 it is a simple protocol that just maps directly to SASL.
707 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
708 initial implementation, not actually used yet.
710 * dbus/dbus-string.c (_dbus_string_find): new function
711 (_dbus_string_equal): new function
712 (_dbus_string_base64_encode): new function
713 (_dbus_string_base64_decode): new function
715 2002-12-25 Anders Carlsson <andersca@codefactory.se>
718 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
719 (_dbus_marshal_int32), (_dbus_marshal_uint32),
720 (_dbus_demarshal_double), (_dbus_demarshal_int32),
721 (_dbus_demarshal_uint32), (_dbus_marshal_test):
722 * dbus/dbus-marshal.h:
723 * dbus/dbus-protocol.h:
724 * dbus/dbus-test.c: (main):
726 Add un-optimized marshalling/demarshalling routines.
728 2002-12-25 Harri Porten <porten@kde.org>
730 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
732 2002-12-24 Zack Rusin <zack@kde.org>
734 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
735 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
738 2002-12-24 Havoc Pennington <hp@pobox.com>
740 * glib/dbus-gthread.c: fix include
742 * glib/dbus-glib.h: rename DBusMessageHandler for now.
743 I think glib API needs to change, though, as you don't
744 want to use DBusMessageFunction, you want to use the
745 DBusMessageHandler object. Probably
746 dbus_connection_open_with_g_main_loop()
747 and dbus_connection_setup_g_main_loop() or something like that
748 (but think of better names...) that just create a connection
749 that has watch/timeout functions etc. already set up.
751 * dbus/dbus-connection.c
752 (dbus_connection_send_message_with_reply): new function just to
753 show how the message handler helps us deal with replies.
755 * dbus/dbus-list.c (_dbus_list_remove_last): new function
757 * dbus/dbus-string.c (_dbus_string_test): free a string that
760 * dbus/dbus-hash.c: use memory pools for the hash entries
761 (rebuild_table): be more paranoid about overflow, and
762 shrink table when we can
763 (_dbus_hash_test): reduce number of sprintfs and write
764 valid C89. Add tests for case where we grow and then
765 shrink the hash table.
767 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
769 * dbus/dbus-connection.c (dbus_connection_register_handler)
770 (dbus_connection_unregister_handler): new functions
772 * dbus/dbus-message.c (dbus_message_get_name): new
774 * dbus/dbus-list.c: fix docs typo
776 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
777 an object representing a handler for messages.
779 2002-12-16 Anders Carlsson <andersca@codefactory.se>
782 * glib/dbus-gthread.c: (dbus_gthread_init):
783 Don't use the gdbus prefix for public functions.
785 2002-12-16 Anders Carlsson <andersca@codefactory.se>
789 Add GLib checks and fixup .pc files
793 * glib/dbus-gmain.c: (gdbus_connection_prepare),
794 (gdbus_connection_check), (gdbus_connection_dispatch),
795 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
796 (dbus_connection_gsource_new):
797 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
798 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
799 * glib/test-dbus-glib.c: (message_handler), (main):
802 2002-12-15 Harri Porten <porten@kde.org>
804 * autogen.sh: check for libtoolize before attempting to use it
806 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
809 * .cvsignore: ignore more stamp files
811 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
813 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
814 without make install.
816 2002-12-15 Havoc Pennington <hp@pobox.com>
818 * dbus/dbus-threads.c: add thread stubs that a higher library
819 layer can fill in. e.g. the GLib wrapper might fill them in with
820 GThread stuff. We still need to use this thread API to
821 thread-safe-ize the library.
823 2002-12-12 Havoc Pennington <hp@pobox.com>
825 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
826 below new interfaces and include fewer system headers.
828 * dbus/dbus-sysdeps.c (_dbus_read): new function
829 (_dbus_write): new function
830 (_dbus_write_two): new function
831 (_dbus_connect_unix_socket): new function
832 (_dbus_listen_unix_socket): new function
834 * dbus/dbus-message-internal.h: change interfaces to use
837 2002-12-11 Havoc Pennington <hp@pobox.com>
839 * dbus/dbus-types.h: add dbus_unichar
841 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
843 * dbus/dbus-connection.c (dbus_connection_send_message): return
846 * dbus/dbus-transport.c: include dbus-watch.h
848 * dbus/dbus-connection.c: include dbus-message-internal.h
850 * HACKING: add file with coding guidelines stuff.
852 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
853 handling here, for security purposes (as in vsftpd). Not actually
854 using this class yet.
856 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
857 system/libc usage here, as in vsftpd, for ease of auditing (and
858 should also simplify portability). Haven't actually moved all the
859 system/libc usage into here yet.
861 2002-11-25 Havoc Pennington <hp@pobox.com>
863 * dbus/dbus-internals.c (_dbus_verbose): fix to not
864 always print the first verbose message.
866 2002-11-24 Havoc Pennington <hp@pobox.com>
868 * test/echo-client.c, test/echo-server.c: cheesy test
871 * configure.in (AC_CHECK_FUNCS): check for writev
873 * dbus/dbus-message.c (_dbus_message_get_network_data): new
876 * dbus/dbus-list.c (_dbus_list_foreach): new function
878 * dbus/dbus-internals.c (_dbus_verbose): new function
880 * dbus/dbus-server.c, dbus/dbus-server.h: public object
881 representing a server that listens for connections.
883 * dbus/.cvsignore: create
885 * dbus/dbus-errors.h, dbus/dbus-errors.c:
886 public API for reporting errors
888 * dbus/dbus-connection.h, dbus/dbus-connection.c:
889 public object representing a connection that
890 sends/receives messages. (Same object used for
891 both client and server.)
893 * dbus/dbus-transport.h, dbus/dbus-transport.c:
894 Basic abstraction for different kinds of stream
895 that we might read/write messages from.
897 2002-11-23 Havoc Pennington <hp@pobox.com>
899 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
902 * dbus/dbus-test.c (main): add list test, and include
903 dbus-test.h as intended
905 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
906 (_dbus_hash_table_remove_int): return value indicates
907 whether the entry existed to remove
909 * dbus/dbus-list.c: add linked list utility class,
912 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
915 2002-11-23 Havoc Pennington <hp@pobox.com>
917 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
918 DBUS_END_DECLS to nothing, that should fix this once and for all
920 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
922 * dbus/dbus-message.c, dbus/dbus-hash.c:
923 add some missing @brief
925 2002-11-23 Havoc Pennington <hp@pobox.com>
927 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
928 to avoid confusing Doxygen
930 * dbus/dbus-hash.c: @} not }@
932 * dbus/dbus-message.c (struct DBusMessage): split out
935 2002-11-23 Havoc Pennington <hp@pobox.com>
937 * configure.in: pile on more warning flags if using gcc
939 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
940 to document static functions
942 * configure.in: add summary to end of configure so it
943 looks nice and attractive
945 * dbus/dbus-hash.c: finish implementation and write unit
948 * configure.in: add --enable-tests to enable unit tests
950 * dbus/dbus-test.c: test program to run unit tests
951 for all files in dbus/*, initially runs a test for
954 * dbus/dbus-internals.h: file to hold some internal utility stuff
956 2002-11-22 Havoc Pennington <hp@redhat.com>
958 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
959 "ported" away from Tcl
961 * dbus/dbus-types.h: header for types such as dbus_bool_t
963 2002-11-22 Havoc Pennington <hp@redhat.com>
965 * dbus/dbus.h: fixups for doc warnings
967 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
969 (QUIET): make it quiet so we can see warnings
971 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
973 2002-11-22 Havoc Pennington <hp@redhat.com>
975 * Makefile.am: include "Doxyfile" target in all-local
977 * configure.in: generate the Doxyfile
979 * Doxyfile.in: move Doxyfile here, so we can use
980 configure to generate a Doxyfile with the right
983 2002-11-22 Havoc Pennington <hp@redhat.com>
985 * dbus/dbus-message.c: move inline docs into .c file
987 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
988 so all docs are under doc/
989 (MAN_EXTENSION): generate man pages. Use extension
990 ".3dbus" which matches ".3qt" on my system,
991 I guess this is OK, I don't know really.
992 (FILE_PATTERNS): look for .c files not .h, makes sense
995 2002-11-22 Havoc Pennington <hp@pobox.com>
997 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
998 because any app can be a server, and any app can be a client,
999 the bus is a special kind of server.
1001 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1003 * Doxyfile : adding. Still needs Makefile rules to be generated
1004 automatically (just run "doxygen" in the toplevel dir for now to
1007 * dbus/dbus-message.h : Adding sample docs (javadoc since
1008 resembles gtk-doc a little more)
1010 * dbus/dbus.h : Adding sample docs
1012 2002-11-21 Havoc Pennington <hp@redhat.com>
1014 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1015 so we can allow ourselves to include files directly,
1016 instead of having to use dbus.h
1018 * dbus/dbus.h: fill in
1020 * dbus/dbus-message.h: sketch out a sample header file.
1021 Include griping if you include it directly instead of
1024 * dbus/dbus-macros.h: new file with macros for extern "C",
1025 TRUE/FALSE, NULL, etc.
1027 * doc/file-boilerplate.c: put include guards in here
1029 2002-11-21 Havoc Pennington <hp@redhat.com>
1031 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1033 * COPYING: include the GPL as well, and license code
1034 under both AFL and GPL.
1036 2002-11-21 Havoc Pennington <hp@redhat.com>
1038 * acconfig.h: get rid of this
1040 * autogen.sh (run_configure): add --no-configure option
1042 * configure.in: remove AC_ARG_PROGRAM to make
1043 autoconf complain less. add AC_PREREQ.
1044 add AC_DEFINE third arg.
1046 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1049 Fix references so we can distcheck.
1051 2002-11-21 Havoc Pennington <hp@redhat.com>
1053 * Initial module creation