1 2003-01-26 Havoc Pennington <hp@pobox.com>
3 The unit tests pass, but otherwise untested. If it breaks, the
4 tests should have been better. ;-)
6 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
9 * dbus/dbus-message.c: redo everything so we maintain
10 message->header as the only copy of the various fields.
11 This avoids the possibility of out-of-memory in some cases,
12 for example dbus_message_lock() can't run out of memory anymore,
13 and avoids extra copying. Figured I may as well go ahead and do
14 this since it was busted for dbus_message_lock to not return
15 failure on OOM, and dbus_message_write_header was totally
16 unchecked for OOM. Also fixed some random other bugs.
18 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
19 that strings are nul-terminated. Also, end_pos can be equal
20 to string length just not greater than, I think.
21 (_dbus_marshal_set_int32): new function
22 (_dbus_marshal_set_uint32): new function
23 (_dbus_marshal_set_string): new function
25 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
26 a warning, init timeout_list to NULL
27 (dbus_connection_send_message): don't use uninitialized variable
30 * dbus/dbus-string.c (_dbus_string_replace_len): new function
32 2003-01-26 Anders Carlsson <andersca@codefactory.se>
34 * bus/driver.c: (bus_driver_handle_hello),
35 (bus_driver_send_welcome_message):
38 2003-01-26 Anders Carlsson <andersca@codefactory.se>
40 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
41 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
42 (dbus_connection_unref):
43 * dbus/dbus-marshal.c: (_dbus_marshal_test):
44 * dbus/dbus-message.c: (dbus_message_unref),
47 (dbus_message_get_fields):
48 Remove debugging printout.
50 (_dbus_message_loader_return_buffer):
51 Don't store the header string.
56 2003-01-26 Richard Hult <rhult@codefactory.se>
58 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
59 the file descriptor list, since it can change under us.
61 2003-01-25 Anders Carlsson <andersca@codefactory.se>
63 * glib/dbus-gmain.c: (dbus_connection_prepare),
64 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
65 (remove_watch), (dbus_connection_hookup_with_g_main):
66 Rewrite the glib handling to use its own GSource instead of a
67 GIOChannel so we can catch messages put in the queue while waiting
70 2003-01-25 Anders Carlsson <andersca@codefactory.se>
73 * bus/connection.c: (connection_disconnect_handler),
74 (connection_watch_callback), (bus_connection_setup):
75 * bus/dispatch.c: (send_one_message),
76 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
77 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
79 * bus/driver.c: (bus_driver_send_service_deleted),
80 (bus_driver_send_service_created), (bus_driver_handle_hello),
81 (bus_driver_send_welcome_message),
82 (bus_driver_handle_list_services), (bus_driver_remove_connection),
83 (bus_driver_handle_message):
85 Refactor code, put the message dispatching in its own file. Use
86 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
89 2003-01-25 Anders Carlsson <andersca@codefactory.se>
91 * dbus/dbus-internals.h:
92 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
94 * dbus/dbus-message.c: (dbus_message_get_sender):
95 * dbus/dbus-message.h:
96 Implement dbus_message_get_sender.
98 * dbus/dbus-protocol.h:
99 Add message and service defines.
101 2003-01-25 Anders Carlsson <andersca@codefactory.se>
103 * dbus/dbus-connection.c: (dbus_connection_send_message):
104 * dbus/dbus-message-internal.h:
105 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
106 (dbus_message_write_header):
107 Remove _dbus_messag_unlock and don't set the client serial on a
108 message if one already exists.
110 2003-01-24 Havoc Pennington <hp@pobox.com>
112 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
115 * bus/driver.c (bus_driver_handle_list_services): fix a leak
118 2003-01-25 Anders Carlsson <andersca@codefactory.se>
120 * dbus/dbus-list.c: (alloc_link), (free_link):
121 Use a memory pool for the links.
123 2003-01-25 Anders Carlsson <andersca@codefactory.se>
125 * bus/connection.c: (bus_connection_foreach):
127 Add new bus_connection_foreach function.
129 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
130 Add function that broadcasts a message to all clients.
132 (bus_driver_send_service_created), (bus_driver_handle_hello),
133 (bus_driver_send_welcome_message),
134 (bus_driver_handle_list_services), (bus_driver_message_handler):
135 Implement functions that take care of listing services, and notifying
136 clients when new services are created.
138 * bus/services.c: (bus_services_list):
140 Add new function that returns an array of strings with the currently
145 Update copyright year.
147 2003-01-25 Anders Carlsson <andersca@codefactory.se>
149 * dbus/dbus-connection.c: (dbus_connection_send_message):
150 Unlock the message in case it was sent earlier.
152 (dbus_connection_send_message_with_reply_and_block):
153 Remove the reply message from the list.
155 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
156 Set array_len and new_pos correctly.
158 (_dbus_marshal_test):
161 * dbus/dbus-message-internal.h:
162 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
163 New function that returns the reply serial.
165 (_dbus_message_unlock):
166 New function that unlocks a message and resets its header.
168 (dbus_message_append_string_array),
169 (dbus_message_get_fields_valist),
170 (dbus_message_iter_get_field_type),
171 (dbus_message_iter_get_string_array),
172 (dbus_message_get_fields),
173 (dbus_message_append_fields_valist):
174 Handle string arrays.
176 (dbus_message_set_sender):
177 Make this function public since the bus daemon needs it.
179 (decode_header_data):
180 Set the reply serial to -1 initially.
182 * dbus/dbus-message.h:
183 Add dbus_message_set_sender.
185 2003-01-24 Havoc Pennington <hp@pobox.com>
187 * doc/dbus-specification.sgml: add some stuff
189 2003-01-22 Havoc Pennington <hp@pobox.com>
191 * doc/dbus-specification.sgml: Start to document the protocol.
193 2003-01-22 Havoc Pennington <hp@pobox.com>
195 * dbus/dbus-connection.c
196 (dbus_connection_send_message_with_reply_and_block): add some @todo
198 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
200 2003-01-21 Havoc Pennington <hp@pobox.com>
202 (patch untested because can't compile)
204 * bus/driver.c (create_unique_client_name): make this function
205 never recycle client names. Also, caller should initialize
208 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
210 2003-01-21 Anders Carlsson <andersca@codefactory.se>
212 * dbus/dbus-marshal.c: (_dbus_marshal_double),
213 (_dbus_marshal_int32), (_dbus_marshal_uint32),
214 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
215 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
216 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
217 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
218 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
219 * dbus/dbus-marshal.h:
220 * dbus/dbus-protocol.h:
221 Add support for marshalling and demarshalling integer, double
224 2003-01-21 Anders Carlsson <andersca@codefactory.se>
229 * bus/connection.c: (connection_disconnect_handler):
230 Remove the connection from the bus driver's list.
232 (connection_watch_callback): Dispatch messages.
234 (free_connection_data): Free connection name.
236 (bus_connection_setup): Add connection to the bus driver's list.
237 (bus_connection_remove_owned_service):
238 (bus_connection_set_name), (bus_connection_get_name):
239 Add functions for setting and getting the connection's name.
242 Add function headers.
244 * bus/driver.c: (create_unique_client_name),
245 (bus_driver_handle_hello_message),
246 (bus_driver_send_welcome_message), (bus_driver_message_handler),
247 (bus_driver_add_connection), (bus_driver_remove_connection):
250 * bus/services.c: (bus_service_free):
252 New file that handles communication and registreation with the bus
255 2003-01-21 Anders Carlsson <andersca@codefactory.se>
257 * dbus/dbus-connection.c: (dbus_connection_send_message):
258 Add a new client_serial parameter.
260 (dbus_connection_send_message_with_reply):
261 Remove a @todo since we've implemented the blocking function.
263 (dbus_connection_send_message_with_reply_and_block):
264 New function that sends a message and waits for a reply and
265 then returns the reply.
267 * dbus/dbus-connection.h:
270 * dbus/dbus-errors.c: (dbus_result_to_string):
271 * dbus/dbus-errors.h:
274 * dbus/dbus-message-internal.h:
275 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
276 (_dbus_message_set_sender), (dbus_message_write_header),
277 (dbus_message_new_reply), (decode_header_data),
278 (_dbus_message_loader_return_buffer), (_dbus_message_test):
279 * dbus/dbus-message.h:
280 Add new functions that set the reply serial and sender.
281 Also marshal and demarshal them correctly and add test.
283 * dbus/dbus-protocol.h:
284 Add new DBUS_MESSAGE_TYPE_SENDER.
287 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
288 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
289 (dbus_connection_hookup_with_g_main):
290 * glib/test-dbus-glib.c: (main):
291 Rewrite to use GIOChannel and remove the GSource crack.
293 * test/echo-client.c: (main):
294 * test/watch.c: (check_messages):
295 Update for changed APIs
297 2003-01-19 Anders Carlsson <andersca@codefactory.se>
299 * dbus/Makefile.am: Add dbus-timeout.[cħ]
301 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
302 Create a DBusTimeoutList.
303 (dbus_connection_set_timeout_functions): Add new function to
304 set timeout callbacks
306 * dbus/dbus-connection.h: Add public DBusTimeout API.
308 * dbus/dbus-message.c: (dbus_message_get_service):
309 * dbus/dbus-message.h: New function.
311 * dbus/dbus-server.c: Fix small doc typo.
313 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
315 2003-01-19 Anders Carlsson <andersca@codefactory.se>
317 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
318 of the string, just as long as specified.
320 2003-01-19 Havoc Pennington <hp@pobox.com>
322 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
325 * dbus/dbus-server.c (dbus_server_set_max_connections)
326 (dbus_server_get_max_connections, dbus_server_get_n_connections):
327 keep track of current number of connections, and add API for
328 setting a max (but haven't implemented enforcing the max yet)
330 2003-01-18 Havoc Pennington <hp@pobox.com>
332 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
333 reading/writing if read_watch != NULL or write_watch != NULL.
335 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
336 the message loader code to actually load message->header and
337 message->body into the newly-created message.
339 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
342 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
343 (dbus_connection_get_max_message_size)
344 (dbus_connection_set_max_live_messages_size)
345 (dbus_connection_get_max_live_messages_size): implement some
346 resource limitation functions
348 * dbus/dbus-resources.c: new file implementing some of the
349 resource limits stuff
351 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
352 missing docs, add @todo to handle OOM etc.
354 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
357 2003-01-18 Havoc Pennington <hp@pobox.com>
359 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
360 connection if it hasn't been already.
362 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
363 replace with DisconnectFunction.
365 2003-01-18 Havoc Pennington <hp@pobox.com>
367 Building --disable-verbose-mode --disable-asserts --disable-tests
368 cuts the library from 112K to 45K or so
370 * configure.in: check for varargs macro support,
371 add --enable-verbose-mode, --enable-asserts.
373 * dbus/dbus-internals.h (_dbus_assert): support
375 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
377 2003-01-18 Havoc Pennington <hp@pobox.com>
379 * dbus/dbus-test.c: include config.h so that tests actually run
381 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
382 so the failure mode when that assumption fails will be plenty
385 2003-01-18 Havoc Pennington <hp@pobox.com>
387 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
389 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
392 * test/Makefile.am: don't use special variable "TESTS" for echo-*
393 since we don't want to use those in make check
395 2003-01-15 Havoc Pennington <hp@redhat.com>
401 2003-01-15 Havoc Pennington <hp@redhat.com>
403 * test/Makefile.am: fix so that test source code ends up in the
404 distribution on make distcheck
406 2003-01-15 Havoc Pennington <hp@redhat.com>
412 2003-01-15 Havoc Pennington <hp@redhat.com>
414 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
415 fix build when --disable-tests
417 * Makefile.am (EXTRA_DIST): put HACKING in here
419 * HACKING: document procedure for making a tarball release.
421 2003-01-14 Anders Carlsson <andersca@codefactory.se>
423 * bus/connection.c: (connection_error_handler),
424 (bus_connection_setup):
425 * bus/main.c: (main):
426 Make sure that the DBusConnectionData struct is NULLed
427 out to prevent a segfault.
429 * dbus/dbus-errors.c: (dbus_result_to_string):
430 * dbus/dbus-errors.h:
431 * dbus/dbus-message.c: (dbus_message_get_fields),
432 (dbus_message_get_fields_valist), (_dbus_message_test):
433 * dbus/dbus-message.h:
434 Make dbus_message_get_fields return a result code so we can
435 track invalid fields as well as oom.
437 2003-01-11 Havoc Pennington <hp@pobox.com>
439 * configure.in: change --enable-test/--enable-ansi action-if-given
440 to enable_foo=$enableval instead of enable_foo=yes
442 2003-01-08 Havoc Pennington <hp@pobox.com>
444 * dbus/dbus-string.c (_dbus_string_align_length): new function
446 * dbus/dbus-test-main.c: move main() for test app here
448 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
449 symbol to run tests, because dbus-test isn't in the main
452 Code review nitpicks.
454 * dbus/dbus-message.c (dbus_message_write_header): add newlines
455 for people with narrow emacs ;-). Assert client_serial was filled
456 in. Assert message->name != NULL.
457 (dbus_message_append_fields): have "first_field_type" arg separate
458 from va list, needed for C++ binding that also uses varargs IIRC
459 and helps with type safety
460 (dbus_message_new): add @todo about using DBusString to store
461 service/name internally
462 (dbus_message_new): don't leak ->service and ->name on OOM later
464 (dbus_message_unref): free the service name
465 (dbus_message_get_fields): same change to varargs
466 i.e. first_field_type
467 (_dbus_message_loader_return_buffer): assert that the message data
468 is aligned (if not it's a bug in our code). Put in verbose griping
469 about why we set corrupted = TRUE.
470 (decode_header_data): add FIXME that char* is evil. Was going to
471 add FIXME about evil locale-specific string.h strncmp, but just
472 switched to wacky string-as-uint32 optimization. Move check for
473 "no room for field name" above get_const_data_len() to avoid
474 assertion failure in get_const_data_len if we have trailing 2
475 bytes or the like. Check for service and name fields being
476 provided twice. Don't leak service/name on error. Require field
477 names to be aligned to 4 bytes.
479 * dbus/dbus-marshal.c: move byte swap stuff to header
480 (_dbus_pack_int32): uscore-prefix
481 (_dbus_unpack_int32): uscore-prefix
482 (_dbus_unpack_uint32): export
483 (_dbus_demarshal_string): add @todo complaining about use of
485 (_dbus_marshal_get_field_end_pos): add @todo about bad error
486 handling allowing corrupt data to go unchecked
488 2003-01-08 Havoc Pennington <hp@redhat.com>
490 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
491 to the select() as needed for authentication. (should be using
492 _dbus_poll() not select, but for another day)
494 * dbus/dbus.h: include dbus/dbus-protocol.h
496 2003-01-08 Anders Carlsson <andersca@codefactory.se>
498 * dbus/Makefile.am (dbusinclude_HEADERS): Install
501 2003-01-08 Anders Carlsson <andersca@codefactory.se>
503 * dbus/dbus-internals.c: (_dbus_type_to_string):
504 New function that returns a string describing a type.
506 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
507 * dbus/dbus-marshal.h:
508 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
509 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
510 (dbus_message_iter_get_byte_array):
511 * dbus/dbus-message.h:
512 Add new convenience functions for appending and getting message fields.
513 Also add demarshalling routines for byte arrays.
515 2003-01-07 Anders Carlsson <andersca@codefactory.se>
517 * dbus/dbus-connection-internal.h:
518 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
519 (_dbus_connection_get_next_client_serial),
520 (dbus_connection_send_message):
521 * dbus/dbus-internals.h:
522 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
523 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
524 (_dbus_marshal_uint32), (_dbus_demarshal_double),
525 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
526 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
527 (_dbus_verbose_bytes), (_dbus_marshal_test):
528 * dbus/dbus-marshal.h:
529 * dbus/dbus-message-internal.h:
530 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
531 (dbus_message_write_header), (_dbus_message_lock),
532 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
533 (dbus_message_get_name), (dbus_message_append_int32),
534 (dbus_message_append_uint32), (dbus_message_append_double),
535 (dbus_message_append_string), (dbus_message_append_byte_array),
536 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
537 (dbus_message_iter_unref), (dbus_message_iter_has_next),
538 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
539 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
540 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
541 (decode_header_data), (_dbus_message_loader_return_buffer),
542 (message_iter_test), (_dbus_message_test):
543 * dbus/dbus-message.h:
544 * dbus/dbus-protocol.h:
545 * dbus/dbus-test.c: (main):
547 * glib/test-dbus-glib.c: (message_handler), (main):
548 * test/echo-client.c: (main):
549 * test/watch.c: (check_messages):
550 Make messages sendable and receivable for real.
552 2003-01-07 Anders Carlsson <andersca@codefactory.se>
554 * dbus/dbus-marshal.c: (_dbus_marshal_double),
555 (_dbus_marshal_string), (_dbus_marshal_byte_array):
556 * dbus/dbus-message.c: (dbus_message_append_int32),
557 (dbus_message_append_uint32), (dbus_message_append_double),
558 (dbus_message_append_string), (dbus_message_append_byte_array):
559 Handle OOM restoration.
561 2003-01-07 Anders Carlsson <andersca@codefactory.se>
563 * dbus/dbus-marshal.c: (_dbus_marshal_string),
564 (_dbus_demarshal_string), (_dbus_marshal_test):
565 * dbus/dbus-marshal.h:
566 * dbus/dbus-message.c: (dbus_message_get_name),
567 Document these functions.
569 (dbus_message_append_int32), (dbus_message_append_uint32),
570 (dbus_message_append_double), (dbus_message_append_string),
571 (dbus_message_append_byte_array):
572 * dbus/dbus-message.h:
573 Add functions for adding message fields of different types.
575 * dbus/dbus-protocol.h:
576 Add the different types.
578 2003-01-05 Havoc Pennington <hp@pobox.com>
580 * bus/connection.c: implement routines for handling connections,
581 first thing is keeping a list of owned services on each connection
582 and setting up watches etc.
584 * bus/services.c: implement a mapping from service names to lists
587 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
589 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
590 to use static mutexes for global data
592 * dbus/dbus-connection.c (dbus_connection_set_data): add new
593 collection of functions to set/get application-specific data
594 on the DBusConnection.
596 2003-01-04 Havoc Pennington <hp@pobox.com>
598 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
599 (_dbus_poll): new function
601 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
604 * bus/loop.c: initial code for the daemon main loop
606 2003-01-04 Havoc Pennington <hp@pobox.com>
608 * test/watch.c (error_handler): make it safe if the error handler
609 is called multiple times (if we s/error handler/disconnect
610 handler/ we should just guarantee it's called only once)
612 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
613 error handler on disconnect (it's quite possible we should
614 just change the error handler to a "disconnect handler," I'm
615 not sure we have any other meaningful errors)
617 * configure.in: check for getpwnam_r
619 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
620 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
621 mechanism as in SASL spec, using socket credentials
623 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
624 (_dbus_send_credentials_unix_socket): new function
626 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
628 (_dbus_write): only check errno if <0 returned
629 (_dbus_write_two): ditto
631 2003-01-02 Anders Carlsson <andersca@codefactory.se>
633 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
634 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
635 (_dbus_marshal_test):
636 * dbus/dbus-marshal.h:
637 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
638 to _dbus_marshal_utf8_string. Also fix some tests.
640 2002-12-28 Harri Porten <porten@kde.org>
642 * configure.in: added check for C++ compiler and a very cheesy
643 check for the Qt integration
645 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
647 * qt/Makefile.am: added
649 * qt/.cvsignore: added
651 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
652 latter, added #ifdef QT_THREAD_SUPPORT guard.
654 * dbus/Makefile.am: added missing headers for make dist
656 2002-12-28 Kristian Rietveld <kris@gtk.org>
658 * dbus/Makefile.am: fixup export-symbols-regex.
660 2002-12-27 Anders Carlsson <andersca@codefactory.se>
662 * acinclude.m4: Add this file and put the
663 PKG_CHECK_MODULE macro in it.
665 2002-12-27 Anders Carlsson <andersca@codefactory.se>
667 * dbus/dbus-marshal.c: (_dbus_marshal_string),
668 (_dbus_demarshal_double), (_dbus_demarshal_int32),
669 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
670 (_dbus_marshal_test):
671 Make the demarshalling routines align the pos argument.
672 Add string marshalling tests and fix the obvious bugs
675 2002-12-26 Havoc Pennington <hp@pobox.com>
677 * dbus/dbus-auth.c: fixes fixes fixes
679 * dbus/dbus-transport-unix.c: wire up support for
680 encoding/decoding data on the wire
682 * dbus/dbus-auth.c (_dbus_auth_encode_data)
683 (_dbus_auth_decode_data): append to target string
684 instead of nuking it.
686 2002-12-26 Havoc Pennington <hp@pobox.com>
688 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
689 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
692 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
693 avoid swap_bytes() overhead (ignoring possible assembly stuff for
694 now). Main point is because I wanted unpack_uint32 to implement
696 (_dbus_verbose_bytes): new function
698 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
700 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
701 mechanism to handle a corrupt message stream
702 (_dbus_message_loader_new): fix preallocation to only prealloc,
705 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
706 (_dbus_string_test): enhance tests for copy/move and fix the
709 * dbus/dbus-transport-unix.c: Hold references in more places to
710 avoid reentrancy problems
712 * dbus/dbus-transport.c: ditto
714 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
715 leak reference count in no-message case
717 * test/watch.c (do_mainloop): handle adding/removing watches
718 during iteration over the watches. Also, ref the connection/server
719 stored on a watch, so we don't try to mangle a destroyed one.
721 * dbus/dbus-transport-unix.c (do_authentication): perform
724 * dbus/dbus-auth.c (get_state): add a state
725 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
726 (_dbus_auth_get_unused_bytes): append the unused bytes
727 to the passed in string, rather than prepend
729 * dbus/dbus-transport.c (_dbus_transport_init_base): create
730 the auth conversation DBusAuth
732 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
733 (_dbus_transport_new_for_domain_socket): when creating a
734 transport, pass in whether it's a client-side or server-side
735 transport so we know which DBusAuth to create
737 2002-12-03 Havoc Pennington <hp@pobox.com>
739 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
740 _after_ finalizing the derived members
741 (unix_connection_set): unref watch if we fail to add it
743 * dbus/dbus-connection.c (dbus_connection_unref): delete the
744 transport first, so that the connection owned by the
745 transport will be valid as the transport finalizes.
747 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
748 if necessary, and remove watches from the connection.
750 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
752 2002-12-26 Anders Carlsson <andersca@codefactory.se>
754 * dbus/dbus-marshal.c: (_dbus_marshal_string),
755 (_dbus_demarshal_double), (_dbus_demarshal_int32),
756 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
757 (_dbus_marshal_test):
758 * dbus/dbus-marshal.h:
759 Add string marshal functions and have the demarshal functions
760 return the new position.
762 2002-12-25 Havoc Pennington <hp@pobox.com>
764 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
765 it is a simple protocol that just maps directly to SASL.
767 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
768 initial implementation, not actually used yet.
770 * dbus/dbus-string.c (_dbus_string_find): new function
771 (_dbus_string_equal): new function
772 (_dbus_string_base64_encode): new function
773 (_dbus_string_base64_decode): new function
775 2002-12-25 Anders Carlsson <andersca@codefactory.se>
778 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
779 (_dbus_marshal_int32), (_dbus_marshal_uint32),
780 (_dbus_demarshal_double), (_dbus_demarshal_int32),
781 (_dbus_demarshal_uint32), (_dbus_marshal_test):
782 * dbus/dbus-marshal.h:
783 * dbus/dbus-protocol.h:
784 * dbus/dbus-test.c: (main):
786 Add un-optimized marshalling/demarshalling routines.
788 2002-12-25 Harri Porten <porten@kde.org>
790 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
792 2002-12-24 Zack Rusin <zack@kde.org>
794 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
795 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
798 2002-12-24 Havoc Pennington <hp@pobox.com>
800 * glib/dbus-gthread.c: fix include
802 * glib/dbus-glib.h: rename DBusMessageHandler for now.
803 I think glib API needs to change, though, as you don't
804 want to use DBusMessageFunction, you want to use the
805 DBusMessageHandler object. Probably
806 dbus_connection_open_with_g_main_loop()
807 and dbus_connection_setup_g_main_loop() or something like that
808 (but think of better names...) that just create a connection
809 that has watch/timeout functions etc. already set up.
811 * dbus/dbus-connection.c
812 (dbus_connection_send_message_with_reply): new function just to
813 show how the message handler helps us deal with replies.
815 * dbus/dbus-list.c (_dbus_list_remove_last): new function
817 * dbus/dbus-string.c (_dbus_string_test): free a string that
820 * dbus/dbus-hash.c: use memory pools for the hash entries
821 (rebuild_table): be more paranoid about overflow, and
822 shrink table when we can
823 (_dbus_hash_test): reduce number of sprintfs and write
824 valid C89. Add tests for case where we grow and then
825 shrink the hash table.
827 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
829 * dbus/dbus-connection.c (dbus_connection_register_handler)
830 (dbus_connection_unregister_handler): new functions
832 * dbus/dbus-message.c (dbus_message_get_name): new
834 * dbus/dbus-list.c: fix docs typo
836 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
837 an object representing a handler for messages.
839 2002-12-16 Anders Carlsson <andersca@codefactory.se>
842 * glib/dbus-gthread.c: (dbus_gthread_init):
843 Don't use the gdbus prefix for public functions.
845 2002-12-16 Anders Carlsson <andersca@codefactory.se>
849 Add GLib checks and fixup .pc files
853 * glib/dbus-gmain.c: (gdbus_connection_prepare),
854 (gdbus_connection_check), (gdbus_connection_dispatch),
855 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
856 (dbus_connection_gsource_new):
857 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
858 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
859 * glib/test-dbus-glib.c: (message_handler), (main):
862 2002-12-15 Harri Porten <porten@kde.org>
864 * autogen.sh: check for libtoolize before attempting to use it
866 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
869 * .cvsignore: ignore more stamp files
871 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
873 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
874 without make install.
876 2002-12-15 Havoc Pennington <hp@pobox.com>
878 * dbus/dbus-threads.c: add thread stubs that a higher library
879 layer can fill in. e.g. the GLib wrapper might fill them in with
880 GThread stuff. We still need to use this thread API to
881 thread-safe-ize the library.
883 2002-12-12 Havoc Pennington <hp@pobox.com>
885 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
886 below new interfaces and include fewer system headers.
888 * dbus/dbus-sysdeps.c (_dbus_read): new function
889 (_dbus_write): new function
890 (_dbus_write_two): new function
891 (_dbus_connect_unix_socket): new function
892 (_dbus_listen_unix_socket): new function
894 * dbus/dbus-message-internal.h: change interfaces to use
897 2002-12-11 Havoc Pennington <hp@pobox.com>
899 * dbus/dbus-types.h: add dbus_unichar
901 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
903 * dbus/dbus-connection.c (dbus_connection_send_message): return
906 * dbus/dbus-transport.c: include dbus-watch.h
908 * dbus/dbus-connection.c: include dbus-message-internal.h
910 * HACKING: add file with coding guidelines stuff.
912 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
913 handling here, for security purposes (as in vsftpd). Not actually
914 using this class yet.
916 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
917 system/libc usage here, as in vsftpd, for ease of auditing (and
918 should also simplify portability). Haven't actually moved all the
919 system/libc usage into here yet.
921 2002-11-25 Havoc Pennington <hp@pobox.com>
923 * dbus/dbus-internals.c (_dbus_verbose): fix to not
924 always print the first verbose message.
926 2002-11-24 Havoc Pennington <hp@pobox.com>
928 * test/echo-client.c, test/echo-server.c: cheesy test
931 * configure.in (AC_CHECK_FUNCS): check for writev
933 * dbus/dbus-message.c (_dbus_message_get_network_data): new
936 * dbus/dbus-list.c (_dbus_list_foreach): new function
938 * dbus/dbus-internals.c (_dbus_verbose): new function
940 * dbus/dbus-server.c, dbus/dbus-server.h: public object
941 representing a server that listens for connections.
943 * dbus/.cvsignore: create
945 * dbus/dbus-errors.h, dbus/dbus-errors.c:
946 public API for reporting errors
948 * dbus/dbus-connection.h, dbus/dbus-connection.c:
949 public object representing a connection that
950 sends/receives messages. (Same object used for
951 both client and server.)
953 * dbus/dbus-transport.h, dbus/dbus-transport.c:
954 Basic abstraction for different kinds of stream
955 that we might read/write messages from.
957 2002-11-23 Havoc Pennington <hp@pobox.com>
959 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
962 * dbus/dbus-test.c (main): add list test, and include
963 dbus-test.h as intended
965 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
966 (_dbus_hash_table_remove_int): return value indicates
967 whether the entry existed to remove
969 * dbus/dbus-list.c: add linked list utility class,
972 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
975 2002-11-23 Havoc Pennington <hp@pobox.com>
977 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
978 DBUS_END_DECLS to nothing, that should fix this once and for all
980 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
982 * dbus/dbus-message.c, dbus/dbus-hash.c:
983 add some missing @brief
985 2002-11-23 Havoc Pennington <hp@pobox.com>
987 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
988 to avoid confusing Doxygen
990 * dbus/dbus-hash.c: @} not }@
992 * dbus/dbus-message.c (struct DBusMessage): split out
995 2002-11-23 Havoc Pennington <hp@pobox.com>
997 * configure.in: pile on more warning flags if using gcc
999 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1000 to document static functions
1002 * configure.in: add summary to end of configure so it
1003 looks nice and attractive
1005 * dbus/dbus-hash.c: finish implementation and write unit
1008 * configure.in: add --enable-tests to enable unit tests
1010 * dbus/dbus-test.c: test program to run unit tests
1011 for all files in dbus/*, initially runs a test for
1014 * dbus/dbus-internals.h: file to hold some internal utility stuff
1016 2002-11-22 Havoc Pennington <hp@redhat.com>
1018 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1019 "ported" away from Tcl
1021 * dbus/dbus-types.h: header for types such as dbus_bool_t
1023 2002-11-22 Havoc Pennington <hp@redhat.com>
1025 * dbus/dbus.h: fixups for doc warnings
1027 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1029 (QUIET): make it quiet so we can see warnings
1031 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1033 2002-11-22 Havoc Pennington <hp@redhat.com>
1035 * Makefile.am: include "Doxyfile" target in all-local
1037 * configure.in: generate the Doxyfile
1039 * Doxyfile.in: move Doxyfile here, so we can use
1040 configure to generate a Doxyfile with the right
1043 2002-11-22 Havoc Pennington <hp@redhat.com>
1045 * dbus/dbus-message.c: move inline docs into .c file
1047 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1048 so all docs are under doc/
1049 (MAN_EXTENSION): generate man pages. Use extension
1050 ".3dbus" which matches ".3qt" on my system,
1051 I guess this is OK, I don't know really.
1052 (FILE_PATTERNS): look for .c files not .h, makes sense
1055 2002-11-22 Havoc Pennington <hp@pobox.com>
1057 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1058 because any app can be a server, and any app can be a client,
1059 the bus is a special kind of server.
1061 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1063 * Doxyfile : adding. Still needs Makefile rules to be generated
1064 automatically (just run "doxygen" in the toplevel dir for now to
1067 * dbus/dbus-message.h : Adding sample docs (javadoc since
1068 resembles gtk-doc a little more)
1070 * dbus/dbus.h : Adding sample docs
1072 2002-11-21 Havoc Pennington <hp@redhat.com>
1074 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1075 so we can allow ourselves to include files directly,
1076 instead of having to use dbus.h
1078 * dbus/dbus.h: fill in
1080 * dbus/dbus-message.h: sketch out a sample header file.
1081 Include griping if you include it directly instead of
1084 * dbus/dbus-macros.h: new file with macros for extern "C",
1085 TRUE/FALSE, NULL, etc.
1087 * doc/file-boilerplate.c: put include guards in here
1089 2002-11-21 Havoc Pennington <hp@redhat.com>
1091 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1093 * COPYING: include the GPL as well, and license code
1094 under both AFL and GPL.
1096 2002-11-21 Havoc Pennington <hp@redhat.com>
1098 * acconfig.h: get rid of this
1100 * autogen.sh (run_configure): add --no-configure option
1102 * configure.in: remove AC_ARG_PROGRAM to make
1103 autoconf complain less. add AC_PREREQ.
1104 add AC_DEFINE third arg.
1106 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1109 Fix references so we can distcheck.
1111 2002-11-21 Havoc Pennington <hp@redhat.com>
1113 * Initial module creation