1 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
4 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5 (dbus_connection_unref):
6 * dbus/dbus-marshal.c: (_dbus_marshal_test):
7 * dbus/dbus-message.c: (dbus_message_unref),
10 (dbus_message_get_fields):
11 Remove debugging printout.
13 (_dbus_message_loader_return_buffer):
14 Don't store the header string.
19 2003-01-26 Richard Hult <rhult@codefactory.se>
21 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
22 the file descriptor list, since it can change under us.
24 2003-01-25 Anders Carlsson <andersca@codefactory.se>
26 * glib/dbus-gmain.c: (dbus_connection_prepare),
27 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
28 (remove_watch), (dbus_connection_hookup_with_g_main):
29 Rewrite the glib handling to use its own GSource instead of a
30 GIOChannel so we can catch messages put in the queue while waiting
33 2003-01-25 Anders Carlsson <andersca@codefactory.se>
36 * bus/connection.c: (connection_disconnect_handler),
37 (connection_watch_callback), (bus_connection_setup):
38 * bus/dispatch.c: (send_one_message),
39 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
40 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
42 * bus/driver.c: (bus_driver_send_service_deleted),
43 (bus_driver_send_service_created), (bus_driver_handle_hello),
44 (bus_driver_send_welcome_message),
45 (bus_driver_handle_list_services), (bus_driver_remove_connection),
46 (bus_driver_handle_message):
48 Refactor code, put the message dispatching in its own file. Use
49 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
52 2003-01-25 Anders Carlsson <andersca@codefactory.se>
54 * dbus/dbus-internals.h:
55 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
57 * dbus/dbus-message.c: (dbus_message_get_sender):
58 * dbus/dbus-message.h:
59 Implement dbus_message_get_sender.
61 * dbus/dbus-protocol.h:
62 Add message and service defines.
64 2003-01-25 Anders Carlsson <andersca@codefactory.se>
66 * dbus/dbus-connection.c: (dbus_connection_send_message):
67 * dbus/dbus-message-internal.h:
68 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
69 (dbus_message_write_header):
70 Remove _dbus_messag_unlock and don't set the client serial on a
71 message if one already exists.
73 2003-01-24 Havoc Pennington <hp@pobox.com>
75 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
78 * bus/driver.c (bus_driver_handle_list_services): fix a leak
81 2003-01-25 Anders Carlsson <andersca@codefactory.se>
83 * dbus/dbus-list.c: (alloc_link), (free_link):
84 Use a memory pool for the links.
86 2003-01-25 Anders Carlsson <andersca@codefactory.se>
88 * bus/connection.c: (bus_connection_foreach):
90 Add new bus_connection_foreach function.
92 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
93 Add function that broadcasts a message to all clients.
95 (bus_driver_send_service_created), (bus_driver_handle_hello),
96 (bus_driver_send_welcome_message),
97 (bus_driver_handle_list_services), (bus_driver_message_handler):
98 Implement functions that take care of listing services, and notifying
99 clients when new services are created.
101 * bus/services.c: (bus_services_list):
103 Add new function that returns an array of strings with the currently
108 Update copyright year.
110 2003-01-25 Anders Carlsson <andersca@codefactory.se>
112 * dbus/dbus-connection.c: (dbus_connection_send_message):
113 Unlock the message in case it was sent earlier.
115 (dbus_connection_send_message_with_reply_and_block):
116 Remove the reply message from the list.
118 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
119 Set array_len and new_pos correctly.
121 (_dbus_marshal_test):
124 * dbus/dbus-message-internal.h:
125 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
126 New function that returns the reply serial.
128 (_dbus_message_unlock):
129 New function that unlocks a message and resets its header.
131 (dbus_message_append_string_array),
132 (dbus_message_get_fields_valist),
133 (dbus_message_iter_get_field_type),
134 (dbus_message_iter_get_string_array),
135 (dbus_message_get_fields),
136 (dbus_message_append_fields_valist):
137 Handle string arrays.
139 (dbus_message_set_sender):
140 Make this function public since the bus daemon needs it.
142 (decode_header_data):
143 Set the reply serial to -1 initially.
145 * dbus/dbus-message.h:
146 Add dbus_message_set_sender.
148 2003-01-24 Havoc Pennington <hp@pobox.com>
150 * doc/dbus-specification.sgml: add some stuff
152 2003-01-22 Havoc Pennington <hp@pobox.com>
154 * doc/dbus-specification.sgml: Start to document the protocol.
156 2003-01-22 Havoc Pennington <hp@pobox.com>
158 * dbus/dbus-connection.c
159 (dbus_connection_send_message_with_reply_and_block): add some @todo
161 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
163 2003-01-21 Havoc Pennington <hp@pobox.com>
165 (patch untested because can't compile)
167 * bus/driver.c (create_unique_client_name): make this function
168 never recycle client names. Also, caller should initialize
171 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
173 2003-01-21 Anders Carlsson <andersca@codefactory.se>
175 * dbus/dbus-marshal.c: (_dbus_marshal_double),
176 (_dbus_marshal_int32), (_dbus_marshal_uint32),
177 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
178 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
179 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
180 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
181 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
182 * dbus/dbus-marshal.h:
183 * dbus/dbus-protocol.h:
184 Add support for marshalling and demarshalling integer, double
187 2003-01-21 Anders Carlsson <andersca@codefactory.se>
192 * bus/connection.c: (connection_disconnect_handler):
193 Remove the connection from the bus driver's list.
195 (connection_watch_callback): Dispatch messages.
197 (free_connection_data): Free connection name.
199 (bus_connection_setup): Add connection to the bus driver's list.
200 (bus_connection_remove_owned_service):
201 (bus_connection_set_name), (bus_connection_get_name):
202 Add functions for setting and getting the connection's name.
205 Add function headers.
207 * bus/driver.c: (create_unique_client_name),
208 (bus_driver_handle_hello_message),
209 (bus_driver_send_welcome_message), (bus_driver_message_handler),
210 (bus_driver_add_connection), (bus_driver_remove_connection):
213 * bus/services.c: (bus_service_free):
215 New file that handles communication and registreation with the bus
218 2003-01-21 Anders Carlsson <andersca@codefactory.se>
220 * dbus/dbus-connection.c: (dbus_connection_send_message):
221 Add a new client_serial parameter.
223 (dbus_connection_send_message_with_reply):
224 Remove a @todo since we've implemented the blocking function.
226 (dbus_connection_send_message_with_reply_and_block):
227 New function that sends a message and waits for a reply and
228 then returns the reply.
230 * dbus/dbus-connection.h:
233 * dbus/dbus-errors.c: (dbus_result_to_string):
234 * dbus/dbus-errors.h:
237 * dbus/dbus-message-internal.h:
238 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
239 (_dbus_message_set_sender), (dbus_message_write_header),
240 (dbus_message_new_reply), (decode_header_data),
241 (_dbus_message_loader_return_buffer), (_dbus_message_test):
242 * dbus/dbus-message.h:
243 Add new functions that set the reply serial and sender.
244 Also marshal and demarshal them correctly and add test.
246 * dbus/dbus-protocol.h:
247 Add new DBUS_MESSAGE_TYPE_SENDER.
250 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
251 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
252 (dbus_connection_hookup_with_g_main):
253 * glib/test-dbus-glib.c: (main):
254 Rewrite to use GIOChannel and remove the GSource crack.
256 * test/echo-client.c: (main):
257 * test/watch.c: (check_messages):
258 Update for changed APIs
260 2003-01-19 Anders Carlsson <andersca@codefactory.se>
262 * dbus/Makefile.am: Add dbus-timeout.[cħ]
264 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
265 Create a DBusTimeoutList.
266 (dbus_connection_set_timeout_functions): Add new function to
267 set timeout callbacks
269 * dbus/dbus-connection.h: Add public DBusTimeout API.
271 * dbus/dbus-message.c: (dbus_message_get_service):
272 * dbus/dbus-message.h: New function.
274 * dbus/dbus-server.c: Fix small doc typo.
276 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
278 2003-01-19 Anders Carlsson <andersca@codefactory.se>
280 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
281 of the string, just as long as specified.
283 2003-01-19 Havoc Pennington <hp@pobox.com>
285 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
288 * dbus/dbus-server.c (dbus_server_set_max_connections)
289 (dbus_server_get_max_connections, dbus_server_get_n_connections):
290 keep track of current number of connections, and add API for
291 setting a max (but haven't implemented enforcing the max yet)
293 2003-01-18 Havoc Pennington <hp@pobox.com>
295 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
296 reading/writing if read_watch != NULL or write_watch != NULL.
298 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
299 the message loader code to actually load message->header and
300 message->body into the newly-created message.
302 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
305 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
306 (dbus_connection_get_max_message_size)
307 (dbus_connection_set_max_live_messages_size)
308 (dbus_connection_get_max_live_messages_size): implement some
309 resource limitation functions
311 * dbus/dbus-resources.c: new file implementing some of the
312 resource limits stuff
314 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
315 missing docs, add @todo to handle OOM etc.
317 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
320 2003-01-18 Havoc Pennington <hp@pobox.com>
322 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
323 connection if it hasn't been already.
325 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
326 replace with DisconnectFunction.
328 2003-01-18 Havoc Pennington <hp@pobox.com>
330 Building --disable-verbose-mode --disable-asserts --disable-tests
331 cuts the library from 112K to 45K or so
333 * configure.in: check for varargs macro support,
334 add --enable-verbose-mode, --enable-asserts.
336 * dbus/dbus-internals.h (_dbus_assert): support
338 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
340 2003-01-18 Havoc Pennington <hp@pobox.com>
342 * dbus/dbus-test.c: include config.h so that tests actually run
344 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
345 so the failure mode when that assumption fails will be plenty
348 2003-01-18 Havoc Pennington <hp@pobox.com>
350 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
352 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
355 * test/Makefile.am: don't use special variable "TESTS" for echo-*
356 since we don't want to use those in make check
358 2003-01-15 Havoc Pennington <hp@redhat.com>
364 2003-01-15 Havoc Pennington <hp@redhat.com>
366 * test/Makefile.am: fix so that test source code ends up in the
367 distribution on make distcheck
369 2003-01-15 Havoc Pennington <hp@redhat.com>
375 2003-01-15 Havoc Pennington <hp@redhat.com>
377 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
378 fix build when --disable-tests
380 * Makefile.am (EXTRA_DIST): put HACKING in here
382 * HACKING: document procedure for making a tarball release.
384 2003-01-14 Anders Carlsson <andersca@codefactory.se>
386 * bus/connection.c: (connection_error_handler),
387 (bus_connection_setup):
388 * bus/main.c: (main):
389 Make sure that the DBusConnectionData struct is NULLed
390 out to prevent a segfault.
392 * dbus/dbus-errors.c: (dbus_result_to_string):
393 * dbus/dbus-errors.h:
394 * dbus/dbus-message.c: (dbus_message_get_fields),
395 (dbus_message_get_fields_valist), (_dbus_message_test):
396 * dbus/dbus-message.h:
397 Make dbus_message_get_fields return a result code so we can
398 track invalid fields as well as oom.
400 2003-01-11 Havoc Pennington <hp@pobox.com>
402 * configure.in: change --enable-test/--enable-ansi action-if-given
403 to enable_foo=$enableval instead of enable_foo=yes
405 2003-01-08 Havoc Pennington <hp@pobox.com>
407 * dbus/dbus-string.c (_dbus_string_align_length): new function
409 * dbus/dbus-test-main.c: move main() for test app here
411 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
412 symbol to run tests, because dbus-test isn't in the main
415 Code review nitpicks.
417 * dbus/dbus-message.c (dbus_message_write_header): add newlines
418 for people with narrow emacs ;-). Assert client_serial was filled
419 in. Assert message->name != NULL.
420 (dbus_message_append_fields): have "first_field_type" arg separate
421 from va list, needed for C++ binding that also uses varargs IIRC
422 and helps with type safety
423 (dbus_message_new): add @todo about using DBusString to store
424 service/name internally
425 (dbus_message_new): don't leak ->service and ->name on OOM later
427 (dbus_message_unref): free the service name
428 (dbus_message_get_fields): same change to varargs
429 i.e. first_field_type
430 (_dbus_message_loader_return_buffer): assert that the message data
431 is aligned (if not it's a bug in our code). Put in verbose griping
432 about why we set corrupted = TRUE.
433 (decode_header_data): add FIXME that char* is evil. Was going to
434 add FIXME about evil locale-specific string.h strncmp, but just
435 switched to wacky string-as-uint32 optimization. Move check for
436 "no room for field name" above get_const_data_len() to avoid
437 assertion failure in get_const_data_len if we have trailing 2
438 bytes or the like. Check for service and name fields being
439 provided twice. Don't leak service/name on error. Require field
440 names to be aligned to 4 bytes.
442 * dbus/dbus-marshal.c: move byte swap stuff to header
443 (_dbus_pack_int32): uscore-prefix
444 (_dbus_unpack_int32): uscore-prefix
445 (_dbus_unpack_uint32): export
446 (_dbus_demarshal_string): add @todo complaining about use of
448 (_dbus_marshal_get_field_end_pos): add @todo about bad error
449 handling allowing corrupt data to go unchecked
451 2003-01-08 Havoc Pennington <hp@redhat.com>
453 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
454 to the select() as needed for authentication. (should be using
455 _dbus_poll() not select, but for another day)
457 * dbus/dbus.h: include dbus/dbus-protocol.h
459 2003-01-08 Anders Carlsson <andersca@codefactory.se>
461 * dbus/Makefile.am (dbusinclude_HEADERS): Install
464 2003-01-08 Anders Carlsson <andersca@codefactory.se>
466 * dbus/dbus-internals.c: (_dbus_type_to_string):
467 New function that returns a string describing a type.
469 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
470 * dbus/dbus-marshal.h:
471 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
472 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
473 (dbus_message_iter_get_byte_array):
474 * dbus/dbus-message.h:
475 Add new convenience functions for appending and getting message fields.
476 Also add demarshalling routines for byte arrays.
478 2003-01-07 Anders Carlsson <andersca@codefactory.se>
480 * dbus/dbus-connection-internal.h:
481 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
482 (_dbus_connection_get_next_client_serial),
483 (dbus_connection_send_message):
484 * dbus/dbus-internals.h:
485 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
486 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
487 (_dbus_marshal_uint32), (_dbus_demarshal_double),
488 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
489 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
490 (_dbus_verbose_bytes), (_dbus_marshal_test):
491 * dbus/dbus-marshal.h:
492 * dbus/dbus-message-internal.h:
493 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
494 (dbus_message_write_header), (_dbus_message_lock),
495 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
496 (dbus_message_get_name), (dbus_message_append_int32),
497 (dbus_message_append_uint32), (dbus_message_append_double),
498 (dbus_message_append_string), (dbus_message_append_byte_array),
499 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
500 (dbus_message_iter_unref), (dbus_message_iter_has_next),
501 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
502 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
503 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
504 (decode_header_data), (_dbus_message_loader_return_buffer),
505 (message_iter_test), (_dbus_message_test):
506 * dbus/dbus-message.h:
507 * dbus/dbus-protocol.h:
508 * dbus/dbus-test.c: (main):
510 * glib/test-dbus-glib.c: (message_handler), (main):
511 * test/echo-client.c: (main):
512 * test/watch.c: (check_messages):
513 Make messages sendable and receivable for real.
515 2003-01-07 Anders Carlsson <andersca@codefactory.se>
517 * dbus/dbus-marshal.c: (_dbus_marshal_double),
518 (_dbus_marshal_string), (_dbus_marshal_byte_array):
519 * dbus/dbus-message.c: (dbus_message_append_int32),
520 (dbus_message_append_uint32), (dbus_message_append_double),
521 (dbus_message_append_string), (dbus_message_append_byte_array):
522 Handle OOM restoration.
524 2003-01-07 Anders Carlsson <andersca@codefactory.se>
526 * dbus/dbus-marshal.c: (_dbus_marshal_string),
527 (_dbus_demarshal_string), (_dbus_marshal_test):
528 * dbus/dbus-marshal.h:
529 * dbus/dbus-message.c: (dbus_message_get_name),
530 Document these functions.
532 (dbus_message_append_int32), (dbus_message_append_uint32),
533 (dbus_message_append_double), (dbus_message_append_string),
534 (dbus_message_append_byte_array):
535 * dbus/dbus-message.h:
536 Add functions for adding message fields of different types.
538 * dbus/dbus-protocol.h:
539 Add the different types.
541 2003-01-05 Havoc Pennington <hp@pobox.com>
543 * bus/connection.c: implement routines for handling connections,
544 first thing is keeping a list of owned services on each connection
545 and setting up watches etc.
547 * bus/services.c: implement a mapping from service names to lists
550 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
552 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
553 to use static mutexes for global data
555 * dbus/dbus-connection.c (dbus_connection_set_data): add new
556 collection of functions to set/get application-specific data
557 on the DBusConnection.
559 2003-01-04 Havoc Pennington <hp@pobox.com>
561 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
562 (_dbus_poll): new function
564 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
567 * bus/loop.c: initial code for the daemon main loop
569 2003-01-04 Havoc Pennington <hp@pobox.com>
571 * test/watch.c (error_handler): make it safe if the error handler
572 is called multiple times (if we s/error handler/disconnect
573 handler/ we should just guarantee it's called only once)
575 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
576 error handler on disconnect (it's quite possible we should
577 just change the error handler to a "disconnect handler," I'm
578 not sure we have any other meaningful errors)
580 * configure.in: check for getpwnam_r
582 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
583 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
584 mechanism as in SASL spec, using socket credentials
586 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
587 (_dbus_send_credentials_unix_socket): new function
589 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
591 (_dbus_write): only check errno if <0 returned
592 (_dbus_write_two): ditto
594 2003-01-02 Anders Carlsson <andersca@codefactory.se>
596 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
597 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
598 (_dbus_marshal_test):
599 * dbus/dbus-marshal.h:
600 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
601 to _dbus_marshal_utf8_string. Also fix some tests.
603 2002-12-28 Harri Porten <porten@kde.org>
605 * configure.in: added check for C++ compiler and a very cheesy
606 check for the Qt integration
608 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
610 * qt/Makefile.am: added
612 * qt/.cvsignore: added
614 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
615 latter, added #ifdef QT_THREAD_SUPPORT guard.
617 * dbus/Makefile.am: added missing headers for make dist
619 2002-12-28 Kristian Rietveld <kris@gtk.org>
621 * dbus/Makefile.am: fixup export-symbols-regex.
623 2002-12-27 Anders Carlsson <andersca@codefactory.se>
625 * acinclude.m4: Add this file and put the
626 PKG_CHECK_MODULE macro in it.
628 2002-12-27 Anders Carlsson <andersca@codefactory.se>
630 * dbus/dbus-marshal.c: (_dbus_marshal_string),
631 (_dbus_demarshal_double), (_dbus_demarshal_int32),
632 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
633 (_dbus_marshal_test):
634 Make the demarshalling routines align the pos argument.
635 Add string marshalling tests and fix the obvious bugs
638 2002-12-26 Havoc Pennington <hp@pobox.com>
640 * dbus/dbus-auth.c: fixes fixes fixes
642 * dbus/dbus-transport-unix.c: wire up support for
643 encoding/decoding data on the wire
645 * dbus/dbus-auth.c (_dbus_auth_encode_data)
646 (_dbus_auth_decode_data): append to target string
647 instead of nuking it.
649 2002-12-26 Havoc Pennington <hp@pobox.com>
651 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
652 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
655 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
656 avoid swap_bytes() overhead (ignoring possible assembly stuff for
657 now). Main point is because I wanted unpack_uint32 to implement
659 (_dbus_verbose_bytes): new function
661 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
663 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
664 mechanism to handle a corrupt message stream
665 (_dbus_message_loader_new): fix preallocation to only prealloc,
668 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
669 (_dbus_string_test): enhance tests for copy/move and fix the
672 * dbus/dbus-transport-unix.c: Hold references in more places to
673 avoid reentrancy problems
675 * dbus/dbus-transport.c: ditto
677 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
678 leak reference count in no-message case
680 * test/watch.c (do_mainloop): handle adding/removing watches
681 during iteration over the watches. Also, ref the connection/server
682 stored on a watch, so we don't try to mangle a destroyed one.
684 * dbus/dbus-transport-unix.c (do_authentication): perform
687 * dbus/dbus-auth.c (get_state): add a state
688 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
689 (_dbus_auth_get_unused_bytes): append the unused bytes
690 to the passed in string, rather than prepend
692 * dbus/dbus-transport.c (_dbus_transport_init_base): create
693 the auth conversation DBusAuth
695 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
696 (_dbus_transport_new_for_domain_socket): when creating a
697 transport, pass in whether it's a client-side or server-side
698 transport so we know which DBusAuth to create
700 2002-12-03 Havoc Pennington <hp@pobox.com>
702 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
703 _after_ finalizing the derived members
704 (unix_connection_set): unref watch if we fail to add it
706 * dbus/dbus-connection.c (dbus_connection_unref): delete the
707 transport first, so that the connection owned by the
708 transport will be valid as the transport finalizes.
710 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
711 if necessary, and remove watches from the connection.
713 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
715 2002-12-26 Anders Carlsson <andersca@codefactory.se>
717 * dbus/dbus-marshal.c: (_dbus_marshal_string),
718 (_dbus_demarshal_double), (_dbus_demarshal_int32),
719 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
720 (_dbus_marshal_test):
721 * dbus/dbus-marshal.h:
722 Add string marshal functions and have the demarshal functions
723 return the new position.
725 2002-12-25 Havoc Pennington <hp@pobox.com>
727 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
728 it is a simple protocol that just maps directly to SASL.
730 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
731 initial implementation, not actually used yet.
733 * dbus/dbus-string.c (_dbus_string_find): new function
734 (_dbus_string_equal): new function
735 (_dbus_string_base64_encode): new function
736 (_dbus_string_base64_decode): new function
738 2002-12-25 Anders Carlsson <andersca@codefactory.se>
741 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
742 (_dbus_marshal_int32), (_dbus_marshal_uint32),
743 (_dbus_demarshal_double), (_dbus_demarshal_int32),
744 (_dbus_demarshal_uint32), (_dbus_marshal_test):
745 * dbus/dbus-marshal.h:
746 * dbus/dbus-protocol.h:
747 * dbus/dbus-test.c: (main):
749 Add un-optimized marshalling/demarshalling routines.
751 2002-12-25 Harri Porten <porten@kde.org>
753 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
755 2002-12-24 Zack Rusin <zack@kde.org>
757 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
758 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
761 2002-12-24 Havoc Pennington <hp@pobox.com>
763 * glib/dbus-gthread.c: fix include
765 * glib/dbus-glib.h: rename DBusMessageHandler for now.
766 I think glib API needs to change, though, as you don't
767 want to use DBusMessageFunction, you want to use the
768 DBusMessageHandler object. Probably
769 dbus_connection_open_with_g_main_loop()
770 and dbus_connection_setup_g_main_loop() or something like that
771 (but think of better names...) that just create a connection
772 that has watch/timeout functions etc. already set up.
774 * dbus/dbus-connection.c
775 (dbus_connection_send_message_with_reply): new function just to
776 show how the message handler helps us deal with replies.
778 * dbus/dbus-list.c (_dbus_list_remove_last): new function
780 * dbus/dbus-string.c (_dbus_string_test): free a string that
783 * dbus/dbus-hash.c: use memory pools for the hash entries
784 (rebuild_table): be more paranoid about overflow, and
785 shrink table when we can
786 (_dbus_hash_test): reduce number of sprintfs and write
787 valid C89. Add tests for case where we grow and then
788 shrink the hash table.
790 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
792 * dbus/dbus-connection.c (dbus_connection_register_handler)
793 (dbus_connection_unregister_handler): new functions
795 * dbus/dbus-message.c (dbus_message_get_name): new
797 * dbus/dbus-list.c: fix docs typo
799 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
800 an object representing a handler for messages.
802 2002-12-16 Anders Carlsson <andersca@codefactory.se>
805 * glib/dbus-gthread.c: (dbus_gthread_init):
806 Don't use the gdbus prefix for public functions.
808 2002-12-16 Anders Carlsson <andersca@codefactory.se>
812 Add GLib checks and fixup .pc files
816 * glib/dbus-gmain.c: (gdbus_connection_prepare),
817 (gdbus_connection_check), (gdbus_connection_dispatch),
818 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
819 (dbus_connection_gsource_new):
820 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
821 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
822 * glib/test-dbus-glib.c: (message_handler), (main):
825 2002-12-15 Harri Porten <porten@kde.org>
827 * autogen.sh: check for libtoolize before attempting to use it
829 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
832 * .cvsignore: ignore more stamp files
834 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
836 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
837 without make install.
839 2002-12-15 Havoc Pennington <hp@pobox.com>
841 * dbus/dbus-threads.c: add thread stubs that a higher library
842 layer can fill in. e.g. the GLib wrapper might fill them in with
843 GThread stuff. We still need to use this thread API to
844 thread-safe-ize the library.
846 2002-12-12 Havoc Pennington <hp@pobox.com>
848 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
849 below new interfaces and include fewer system headers.
851 * dbus/dbus-sysdeps.c (_dbus_read): new function
852 (_dbus_write): new function
853 (_dbus_write_two): new function
854 (_dbus_connect_unix_socket): new function
855 (_dbus_listen_unix_socket): new function
857 * dbus/dbus-message-internal.h: change interfaces to use
860 2002-12-11 Havoc Pennington <hp@pobox.com>
862 * dbus/dbus-types.h: add dbus_unichar
864 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
866 * dbus/dbus-connection.c (dbus_connection_send_message): return
869 * dbus/dbus-transport.c: include dbus-watch.h
871 * dbus/dbus-connection.c: include dbus-message-internal.h
873 * HACKING: add file with coding guidelines stuff.
875 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
876 handling here, for security purposes (as in vsftpd). Not actually
877 using this class yet.
879 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
880 system/libc usage here, as in vsftpd, for ease of auditing (and
881 should also simplify portability). Haven't actually moved all the
882 system/libc usage into here yet.
884 2002-11-25 Havoc Pennington <hp@pobox.com>
886 * dbus/dbus-internals.c (_dbus_verbose): fix to not
887 always print the first verbose message.
889 2002-11-24 Havoc Pennington <hp@pobox.com>
891 * test/echo-client.c, test/echo-server.c: cheesy test
894 * configure.in (AC_CHECK_FUNCS): check for writev
896 * dbus/dbus-message.c (_dbus_message_get_network_data): new
899 * dbus/dbus-list.c (_dbus_list_foreach): new function
901 * dbus/dbus-internals.c (_dbus_verbose): new function
903 * dbus/dbus-server.c, dbus/dbus-server.h: public object
904 representing a server that listens for connections.
906 * dbus/.cvsignore: create
908 * dbus/dbus-errors.h, dbus/dbus-errors.c:
909 public API for reporting errors
911 * dbus/dbus-connection.h, dbus/dbus-connection.c:
912 public object representing a connection that
913 sends/receives messages. (Same object used for
914 both client and server.)
916 * dbus/dbus-transport.h, dbus/dbus-transport.c:
917 Basic abstraction for different kinds of stream
918 that we might read/write messages from.
920 2002-11-23 Havoc Pennington <hp@pobox.com>
922 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
925 * dbus/dbus-test.c (main): add list test, and include
926 dbus-test.h as intended
928 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
929 (_dbus_hash_table_remove_int): return value indicates
930 whether the entry existed to remove
932 * dbus/dbus-list.c: add linked list utility class,
935 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
938 2002-11-23 Havoc Pennington <hp@pobox.com>
940 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
941 DBUS_END_DECLS to nothing, that should fix this once and for all
943 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
945 * dbus/dbus-message.c, dbus/dbus-hash.c:
946 add some missing @brief
948 2002-11-23 Havoc Pennington <hp@pobox.com>
950 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
951 to avoid confusing Doxygen
953 * dbus/dbus-hash.c: @} not }@
955 * dbus/dbus-message.c (struct DBusMessage): split out
958 2002-11-23 Havoc Pennington <hp@pobox.com>
960 * configure.in: pile on more warning flags if using gcc
962 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
963 to document static functions
965 * configure.in: add summary to end of configure so it
966 looks nice and attractive
968 * dbus/dbus-hash.c: finish implementation and write unit
971 * configure.in: add --enable-tests to enable unit tests
973 * dbus/dbus-test.c: test program to run unit tests
974 for all files in dbus/*, initially runs a test for
977 * dbus/dbus-internals.h: file to hold some internal utility stuff
979 2002-11-22 Havoc Pennington <hp@redhat.com>
981 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
982 "ported" away from Tcl
984 * dbus/dbus-types.h: header for types such as dbus_bool_t
986 2002-11-22 Havoc Pennington <hp@redhat.com>
988 * dbus/dbus.h: fixups for doc warnings
990 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
992 (QUIET): make it quiet so we can see warnings
994 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
996 2002-11-22 Havoc Pennington <hp@redhat.com>
998 * Makefile.am: include "Doxyfile" target in all-local
1000 * configure.in: generate the Doxyfile
1002 * Doxyfile.in: move Doxyfile here, so we can use
1003 configure to generate a Doxyfile with the right
1006 2002-11-22 Havoc Pennington <hp@redhat.com>
1008 * dbus/dbus-message.c: move inline docs into .c file
1010 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1011 so all docs are under doc/
1012 (MAN_EXTENSION): generate man pages. Use extension
1013 ".3dbus" which matches ".3qt" on my system,
1014 I guess this is OK, I don't know really.
1015 (FILE_PATTERNS): look for .c files not .h, makes sense
1018 2002-11-22 Havoc Pennington <hp@pobox.com>
1020 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1021 because any app can be a server, and any app can be a client,
1022 the bus is a special kind of server.
1024 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1026 * Doxyfile : adding. Still needs Makefile rules to be generated
1027 automatically (just run "doxygen" in the toplevel dir for now to
1030 * dbus/dbus-message.h : Adding sample docs (javadoc since
1031 resembles gtk-doc a little more)
1033 * dbus/dbus.h : Adding sample docs
1035 2002-11-21 Havoc Pennington <hp@redhat.com>
1037 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1038 so we can allow ourselves to include files directly,
1039 instead of having to use dbus.h
1041 * dbus/dbus.h: fill in
1043 * dbus/dbus-message.h: sketch out a sample header file.
1044 Include griping if you include it directly instead of
1047 * dbus/dbus-macros.h: new file with macros for extern "C",
1048 TRUE/FALSE, NULL, etc.
1050 * doc/file-boilerplate.c: put include guards in here
1052 2002-11-21 Havoc Pennington <hp@redhat.com>
1054 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1056 * COPYING: include the GPL as well, and license code
1057 under both AFL and GPL.
1059 2002-11-21 Havoc Pennington <hp@redhat.com>
1061 * acconfig.h: get rid of this
1063 * autogen.sh (run_configure): add --no-configure option
1065 * configure.in: remove AC_ARG_PROGRAM to make
1066 autoconf complain less. add AC_PREREQ.
1067 add AC_DEFINE third arg.
1069 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1072 Fix references so we can distcheck.
1074 2002-11-21 Havoc Pennington <hp@redhat.com>
1076 * Initial module creation