1 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3 * bus/driver.c: (bus_driver_handle_hello),
4 (bus_driver_send_welcome_message):
7 2003-01-26 Anders Carlsson <andersca@codefactory.se>
9 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
10 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11 (dbus_connection_unref):
12 * dbus/dbus-marshal.c: (_dbus_marshal_test):
13 * dbus/dbus-message.c: (dbus_message_unref),
16 (dbus_message_get_fields):
17 Remove debugging printout.
19 (_dbus_message_loader_return_buffer):
20 Don't store the header string.
25 2003-01-26 Richard Hult <rhult@codefactory.se>
27 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
28 the file descriptor list, since it can change under us.
30 2003-01-25 Anders Carlsson <andersca@codefactory.se>
32 * glib/dbus-gmain.c: (dbus_connection_prepare),
33 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
34 (remove_watch), (dbus_connection_hookup_with_g_main):
35 Rewrite the glib handling to use its own GSource instead of a
36 GIOChannel so we can catch messages put in the queue while waiting
39 2003-01-25 Anders Carlsson <andersca@codefactory.se>
42 * bus/connection.c: (connection_disconnect_handler),
43 (connection_watch_callback), (bus_connection_setup):
44 * bus/dispatch.c: (send_one_message),
45 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
46 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
48 * bus/driver.c: (bus_driver_send_service_deleted),
49 (bus_driver_send_service_created), (bus_driver_handle_hello),
50 (bus_driver_send_welcome_message),
51 (bus_driver_handle_list_services), (bus_driver_remove_connection),
52 (bus_driver_handle_message):
54 Refactor code, put the message dispatching in its own file. Use
55 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
58 2003-01-25 Anders Carlsson <andersca@codefactory.se>
60 * dbus/dbus-internals.h:
61 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
63 * dbus/dbus-message.c: (dbus_message_get_sender):
64 * dbus/dbus-message.h:
65 Implement dbus_message_get_sender.
67 * dbus/dbus-protocol.h:
68 Add message and service defines.
70 2003-01-25 Anders Carlsson <andersca@codefactory.se>
72 * dbus/dbus-connection.c: (dbus_connection_send_message):
73 * dbus/dbus-message-internal.h:
74 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
75 (dbus_message_write_header):
76 Remove _dbus_messag_unlock and don't set the client serial on a
77 message if one already exists.
79 2003-01-24 Havoc Pennington <hp@pobox.com>
81 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
84 * bus/driver.c (bus_driver_handle_list_services): fix a leak
87 2003-01-25 Anders Carlsson <andersca@codefactory.se>
89 * dbus/dbus-list.c: (alloc_link), (free_link):
90 Use a memory pool for the links.
92 2003-01-25 Anders Carlsson <andersca@codefactory.se>
94 * bus/connection.c: (bus_connection_foreach):
96 Add new bus_connection_foreach function.
98 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
99 Add function that broadcasts a message to all clients.
101 (bus_driver_send_service_created), (bus_driver_handle_hello),
102 (bus_driver_send_welcome_message),
103 (bus_driver_handle_list_services), (bus_driver_message_handler):
104 Implement functions that take care of listing services, and notifying
105 clients when new services are created.
107 * bus/services.c: (bus_services_list):
109 Add new function that returns an array of strings with the currently
114 Update copyright year.
116 2003-01-25 Anders Carlsson <andersca@codefactory.se>
118 * dbus/dbus-connection.c: (dbus_connection_send_message):
119 Unlock the message in case it was sent earlier.
121 (dbus_connection_send_message_with_reply_and_block):
122 Remove the reply message from the list.
124 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
125 Set array_len and new_pos correctly.
127 (_dbus_marshal_test):
130 * dbus/dbus-message-internal.h:
131 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
132 New function that returns the reply serial.
134 (_dbus_message_unlock):
135 New function that unlocks a message and resets its header.
137 (dbus_message_append_string_array),
138 (dbus_message_get_fields_valist),
139 (dbus_message_iter_get_field_type),
140 (dbus_message_iter_get_string_array),
141 (dbus_message_get_fields),
142 (dbus_message_append_fields_valist):
143 Handle string arrays.
145 (dbus_message_set_sender):
146 Make this function public since the bus daemon needs it.
148 (decode_header_data):
149 Set the reply serial to -1 initially.
151 * dbus/dbus-message.h:
152 Add dbus_message_set_sender.
154 2003-01-24 Havoc Pennington <hp@pobox.com>
156 * doc/dbus-specification.sgml: add some stuff
158 2003-01-22 Havoc Pennington <hp@pobox.com>
160 * doc/dbus-specification.sgml: Start to document the protocol.
162 2003-01-22 Havoc Pennington <hp@pobox.com>
164 * dbus/dbus-connection.c
165 (dbus_connection_send_message_with_reply_and_block): add some @todo
167 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
169 2003-01-21 Havoc Pennington <hp@pobox.com>
171 (patch untested because can't compile)
173 * bus/driver.c (create_unique_client_name): make this function
174 never recycle client names. Also, caller should initialize
177 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
179 2003-01-21 Anders Carlsson <andersca@codefactory.se>
181 * dbus/dbus-marshal.c: (_dbus_marshal_double),
182 (_dbus_marshal_int32), (_dbus_marshal_uint32),
183 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
184 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
185 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
186 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
187 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
188 * dbus/dbus-marshal.h:
189 * dbus/dbus-protocol.h:
190 Add support for marshalling and demarshalling integer, double
193 2003-01-21 Anders Carlsson <andersca@codefactory.se>
198 * bus/connection.c: (connection_disconnect_handler):
199 Remove the connection from the bus driver's list.
201 (connection_watch_callback): Dispatch messages.
203 (free_connection_data): Free connection name.
205 (bus_connection_setup): Add connection to the bus driver's list.
206 (bus_connection_remove_owned_service):
207 (bus_connection_set_name), (bus_connection_get_name):
208 Add functions for setting and getting the connection's name.
211 Add function headers.
213 * bus/driver.c: (create_unique_client_name),
214 (bus_driver_handle_hello_message),
215 (bus_driver_send_welcome_message), (bus_driver_message_handler),
216 (bus_driver_add_connection), (bus_driver_remove_connection):
219 * bus/services.c: (bus_service_free):
221 New file that handles communication and registreation with the bus
224 2003-01-21 Anders Carlsson <andersca@codefactory.se>
226 * dbus/dbus-connection.c: (dbus_connection_send_message):
227 Add a new client_serial parameter.
229 (dbus_connection_send_message_with_reply):
230 Remove a @todo since we've implemented the blocking function.
232 (dbus_connection_send_message_with_reply_and_block):
233 New function that sends a message and waits for a reply and
234 then returns the reply.
236 * dbus/dbus-connection.h:
239 * dbus/dbus-errors.c: (dbus_result_to_string):
240 * dbus/dbus-errors.h:
243 * dbus/dbus-message-internal.h:
244 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
245 (_dbus_message_set_sender), (dbus_message_write_header),
246 (dbus_message_new_reply), (decode_header_data),
247 (_dbus_message_loader_return_buffer), (_dbus_message_test):
248 * dbus/dbus-message.h:
249 Add new functions that set the reply serial and sender.
250 Also marshal and demarshal them correctly and add test.
252 * dbus/dbus-protocol.h:
253 Add new DBUS_MESSAGE_TYPE_SENDER.
256 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
257 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
258 (dbus_connection_hookup_with_g_main):
259 * glib/test-dbus-glib.c: (main):
260 Rewrite to use GIOChannel and remove the GSource crack.
262 * test/echo-client.c: (main):
263 * test/watch.c: (check_messages):
264 Update for changed APIs
266 2003-01-19 Anders Carlsson <andersca@codefactory.se>
268 * dbus/Makefile.am: Add dbus-timeout.[cħ]
270 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
271 Create a DBusTimeoutList.
272 (dbus_connection_set_timeout_functions): Add new function to
273 set timeout callbacks
275 * dbus/dbus-connection.h: Add public DBusTimeout API.
277 * dbus/dbus-message.c: (dbus_message_get_service):
278 * dbus/dbus-message.h: New function.
280 * dbus/dbus-server.c: Fix small doc typo.
282 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
284 2003-01-19 Anders Carlsson <andersca@codefactory.se>
286 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
287 of the string, just as long as specified.
289 2003-01-19 Havoc Pennington <hp@pobox.com>
291 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
294 * dbus/dbus-server.c (dbus_server_set_max_connections)
295 (dbus_server_get_max_connections, dbus_server_get_n_connections):
296 keep track of current number of connections, and add API for
297 setting a max (but haven't implemented enforcing the max yet)
299 2003-01-18 Havoc Pennington <hp@pobox.com>
301 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
302 reading/writing if read_watch != NULL or write_watch != NULL.
304 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
305 the message loader code to actually load message->header and
306 message->body into the newly-created message.
308 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
311 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
312 (dbus_connection_get_max_message_size)
313 (dbus_connection_set_max_live_messages_size)
314 (dbus_connection_get_max_live_messages_size): implement some
315 resource limitation functions
317 * dbus/dbus-resources.c: new file implementing some of the
318 resource limits stuff
320 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
321 missing docs, add @todo to handle OOM etc.
323 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
326 2003-01-18 Havoc Pennington <hp@pobox.com>
328 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
329 connection if it hasn't been already.
331 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
332 replace with DisconnectFunction.
334 2003-01-18 Havoc Pennington <hp@pobox.com>
336 Building --disable-verbose-mode --disable-asserts --disable-tests
337 cuts the library from 112K to 45K or so
339 * configure.in: check for varargs macro support,
340 add --enable-verbose-mode, --enable-asserts.
342 * dbus/dbus-internals.h (_dbus_assert): support
344 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
346 2003-01-18 Havoc Pennington <hp@pobox.com>
348 * dbus/dbus-test.c: include config.h so that tests actually run
350 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
351 so the failure mode when that assumption fails will be plenty
354 2003-01-18 Havoc Pennington <hp@pobox.com>
356 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
358 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
361 * test/Makefile.am: don't use special variable "TESTS" for echo-*
362 since we don't want to use those in make check
364 2003-01-15 Havoc Pennington <hp@redhat.com>
370 2003-01-15 Havoc Pennington <hp@redhat.com>
372 * test/Makefile.am: fix so that test source code ends up in the
373 distribution on make distcheck
375 2003-01-15 Havoc Pennington <hp@redhat.com>
381 2003-01-15 Havoc Pennington <hp@redhat.com>
383 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
384 fix build when --disable-tests
386 * Makefile.am (EXTRA_DIST): put HACKING in here
388 * HACKING: document procedure for making a tarball release.
390 2003-01-14 Anders Carlsson <andersca@codefactory.se>
392 * bus/connection.c: (connection_error_handler),
393 (bus_connection_setup):
394 * bus/main.c: (main):
395 Make sure that the DBusConnectionData struct is NULLed
396 out to prevent a segfault.
398 * dbus/dbus-errors.c: (dbus_result_to_string):
399 * dbus/dbus-errors.h:
400 * dbus/dbus-message.c: (dbus_message_get_fields),
401 (dbus_message_get_fields_valist), (_dbus_message_test):
402 * dbus/dbus-message.h:
403 Make dbus_message_get_fields return a result code so we can
404 track invalid fields as well as oom.
406 2003-01-11 Havoc Pennington <hp@pobox.com>
408 * configure.in: change --enable-test/--enable-ansi action-if-given
409 to enable_foo=$enableval instead of enable_foo=yes
411 2003-01-08 Havoc Pennington <hp@pobox.com>
413 * dbus/dbus-string.c (_dbus_string_align_length): new function
415 * dbus/dbus-test-main.c: move main() for test app here
417 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
418 symbol to run tests, because dbus-test isn't in the main
421 Code review nitpicks.
423 * dbus/dbus-message.c (dbus_message_write_header): add newlines
424 for people with narrow emacs ;-). Assert client_serial was filled
425 in. Assert message->name != NULL.
426 (dbus_message_append_fields): have "first_field_type" arg separate
427 from va list, needed for C++ binding that also uses varargs IIRC
428 and helps with type safety
429 (dbus_message_new): add @todo about using DBusString to store
430 service/name internally
431 (dbus_message_new): don't leak ->service and ->name on OOM later
433 (dbus_message_unref): free the service name
434 (dbus_message_get_fields): same change to varargs
435 i.e. first_field_type
436 (_dbus_message_loader_return_buffer): assert that the message data
437 is aligned (if not it's a bug in our code). Put in verbose griping
438 about why we set corrupted = TRUE.
439 (decode_header_data): add FIXME that char* is evil. Was going to
440 add FIXME about evil locale-specific string.h strncmp, but just
441 switched to wacky string-as-uint32 optimization. Move check for
442 "no room for field name" above get_const_data_len() to avoid
443 assertion failure in get_const_data_len if we have trailing 2
444 bytes or the like. Check for service and name fields being
445 provided twice. Don't leak service/name on error. Require field
446 names to be aligned to 4 bytes.
448 * dbus/dbus-marshal.c: move byte swap stuff to header
449 (_dbus_pack_int32): uscore-prefix
450 (_dbus_unpack_int32): uscore-prefix
451 (_dbus_unpack_uint32): export
452 (_dbus_demarshal_string): add @todo complaining about use of
454 (_dbus_marshal_get_field_end_pos): add @todo about bad error
455 handling allowing corrupt data to go unchecked
457 2003-01-08 Havoc Pennington <hp@redhat.com>
459 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
460 to the select() as needed for authentication. (should be using
461 _dbus_poll() not select, but for another day)
463 * dbus/dbus.h: include dbus/dbus-protocol.h
465 2003-01-08 Anders Carlsson <andersca@codefactory.se>
467 * dbus/Makefile.am (dbusinclude_HEADERS): Install
470 2003-01-08 Anders Carlsson <andersca@codefactory.se>
472 * dbus/dbus-internals.c: (_dbus_type_to_string):
473 New function that returns a string describing a type.
475 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
476 * dbus/dbus-marshal.h:
477 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
478 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
479 (dbus_message_iter_get_byte_array):
480 * dbus/dbus-message.h:
481 Add new convenience functions for appending and getting message fields.
482 Also add demarshalling routines for byte arrays.
484 2003-01-07 Anders Carlsson <andersca@codefactory.se>
486 * dbus/dbus-connection-internal.h:
487 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
488 (_dbus_connection_get_next_client_serial),
489 (dbus_connection_send_message):
490 * dbus/dbus-internals.h:
491 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
492 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
493 (_dbus_marshal_uint32), (_dbus_demarshal_double),
494 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
495 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
496 (_dbus_verbose_bytes), (_dbus_marshal_test):
497 * dbus/dbus-marshal.h:
498 * dbus/dbus-message-internal.h:
499 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
500 (dbus_message_write_header), (_dbus_message_lock),
501 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
502 (dbus_message_get_name), (dbus_message_append_int32),
503 (dbus_message_append_uint32), (dbus_message_append_double),
504 (dbus_message_append_string), (dbus_message_append_byte_array),
505 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
506 (dbus_message_iter_unref), (dbus_message_iter_has_next),
507 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
508 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
509 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
510 (decode_header_data), (_dbus_message_loader_return_buffer),
511 (message_iter_test), (_dbus_message_test):
512 * dbus/dbus-message.h:
513 * dbus/dbus-protocol.h:
514 * dbus/dbus-test.c: (main):
516 * glib/test-dbus-glib.c: (message_handler), (main):
517 * test/echo-client.c: (main):
518 * test/watch.c: (check_messages):
519 Make messages sendable and receivable for real.
521 2003-01-07 Anders Carlsson <andersca@codefactory.se>
523 * dbus/dbus-marshal.c: (_dbus_marshal_double),
524 (_dbus_marshal_string), (_dbus_marshal_byte_array):
525 * dbus/dbus-message.c: (dbus_message_append_int32),
526 (dbus_message_append_uint32), (dbus_message_append_double),
527 (dbus_message_append_string), (dbus_message_append_byte_array):
528 Handle OOM restoration.
530 2003-01-07 Anders Carlsson <andersca@codefactory.se>
532 * dbus/dbus-marshal.c: (_dbus_marshal_string),
533 (_dbus_demarshal_string), (_dbus_marshal_test):
534 * dbus/dbus-marshal.h:
535 * dbus/dbus-message.c: (dbus_message_get_name),
536 Document these functions.
538 (dbus_message_append_int32), (dbus_message_append_uint32),
539 (dbus_message_append_double), (dbus_message_append_string),
540 (dbus_message_append_byte_array):
541 * dbus/dbus-message.h:
542 Add functions for adding message fields of different types.
544 * dbus/dbus-protocol.h:
545 Add the different types.
547 2003-01-05 Havoc Pennington <hp@pobox.com>
549 * bus/connection.c: implement routines for handling connections,
550 first thing is keeping a list of owned services on each connection
551 and setting up watches etc.
553 * bus/services.c: implement a mapping from service names to lists
556 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
558 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
559 to use static mutexes for global data
561 * dbus/dbus-connection.c (dbus_connection_set_data): add new
562 collection of functions to set/get application-specific data
563 on the DBusConnection.
565 2003-01-04 Havoc Pennington <hp@pobox.com>
567 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
568 (_dbus_poll): new function
570 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
573 * bus/loop.c: initial code for the daemon main loop
575 2003-01-04 Havoc Pennington <hp@pobox.com>
577 * test/watch.c (error_handler): make it safe if the error handler
578 is called multiple times (if we s/error handler/disconnect
579 handler/ we should just guarantee it's called only once)
581 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
582 error handler on disconnect (it's quite possible we should
583 just change the error handler to a "disconnect handler," I'm
584 not sure we have any other meaningful errors)
586 * configure.in: check for getpwnam_r
588 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
589 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
590 mechanism as in SASL spec, using socket credentials
592 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
593 (_dbus_send_credentials_unix_socket): new function
595 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
597 (_dbus_write): only check errno if <0 returned
598 (_dbus_write_two): ditto
600 2003-01-02 Anders Carlsson <andersca@codefactory.se>
602 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
603 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
604 (_dbus_marshal_test):
605 * dbus/dbus-marshal.h:
606 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
607 to _dbus_marshal_utf8_string. Also fix some tests.
609 2002-12-28 Harri Porten <porten@kde.org>
611 * configure.in: added check for C++ compiler and a very cheesy
612 check for the Qt integration
614 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
616 * qt/Makefile.am: added
618 * qt/.cvsignore: added
620 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
621 latter, added #ifdef QT_THREAD_SUPPORT guard.
623 * dbus/Makefile.am: added missing headers for make dist
625 2002-12-28 Kristian Rietveld <kris@gtk.org>
627 * dbus/Makefile.am: fixup export-symbols-regex.
629 2002-12-27 Anders Carlsson <andersca@codefactory.se>
631 * acinclude.m4: Add this file and put the
632 PKG_CHECK_MODULE macro in it.
634 2002-12-27 Anders Carlsson <andersca@codefactory.se>
636 * dbus/dbus-marshal.c: (_dbus_marshal_string),
637 (_dbus_demarshal_double), (_dbus_demarshal_int32),
638 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
639 (_dbus_marshal_test):
640 Make the demarshalling routines align the pos argument.
641 Add string marshalling tests and fix the obvious bugs
644 2002-12-26 Havoc Pennington <hp@pobox.com>
646 * dbus/dbus-auth.c: fixes fixes fixes
648 * dbus/dbus-transport-unix.c: wire up support for
649 encoding/decoding data on the wire
651 * dbus/dbus-auth.c (_dbus_auth_encode_data)
652 (_dbus_auth_decode_data): append to target string
653 instead of nuking it.
655 2002-12-26 Havoc Pennington <hp@pobox.com>
657 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
658 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
661 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
662 avoid swap_bytes() overhead (ignoring possible assembly stuff for
663 now). Main point is because I wanted unpack_uint32 to implement
665 (_dbus_verbose_bytes): new function
667 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
669 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
670 mechanism to handle a corrupt message stream
671 (_dbus_message_loader_new): fix preallocation to only prealloc,
674 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
675 (_dbus_string_test): enhance tests for copy/move and fix the
678 * dbus/dbus-transport-unix.c: Hold references in more places to
679 avoid reentrancy problems
681 * dbus/dbus-transport.c: ditto
683 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
684 leak reference count in no-message case
686 * test/watch.c (do_mainloop): handle adding/removing watches
687 during iteration over the watches. Also, ref the connection/server
688 stored on a watch, so we don't try to mangle a destroyed one.
690 * dbus/dbus-transport-unix.c (do_authentication): perform
693 * dbus/dbus-auth.c (get_state): add a state
694 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
695 (_dbus_auth_get_unused_bytes): append the unused bytes
696 to the passed in string, rather than prepend
698 * dbus/dbus-transport.c (_dbus_transport_init_base): create
699 the auth conversation DBusAuth
701 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
702 (_dbus_transport_new_for_domain_socket): when creating a
703 transport, pass in whether it's a client-side or server-side
704 transport so we know which DBusAuth to create
706 2002-12-03 Havoc Pennington <hp@pobox.com>
708 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
709 _after_ finalizing the derived members
710 (unix_connection_set): unref watch if we fail to add it
712 * dbus/dbus-connection.c (dbus_connection_unref): delete the
713 transport first, so that the connection owned by the
714 transport will be valid as the transport finalizes.
716 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
717 if necessary, and remove watches from the connection.
719 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
721 2002-12-26 Anders Carlsson <andersca@codefactory.se>
723 * dbus/dbus-marshal.c: (_dbus_marshal_string),
724 (_dbus_demarshal_double), (_dbus_demarshal_int32),
725 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
726 (_dbus_marshal_test):
727 * dbus/dbus-marshal.h:
728 Add string marshal functions and have the demarshal functions
729 return the new position.
731 2002-12-25 Havoc Pennington <hp@pobox.com>
733 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
734 it is a simple protocol that just maps directly to SASL.
736 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
737 initial implementation, not actually used yet.
739 * dbus/dbus-string.c (_dbus_string_find): new function
740 (_dbus_string_equal): new function
741 (_dbus_string_base64_encode): new function
742 (_dbus_string_base64_decode): new function
744 2002-12-25 Anders Carlsson <andersca@codefactory.se>
747 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
748 (_dbus_marshal_int32), (_dbus_marshal_uint32),
749 (_dbus_demarshal_double), (_dbus_demarshal_int32),
750 (_dbus_demarshal_uint32), (_dbus_marshal_test):
751 * dbus/dbus-marshal.h:
752 * dbus/dbus-protocol.h:
753 * dbus/dbus-test.c: (main):
755 Add un-optimized marshalling/demarshalling routines.
757 2002-12-25 Harri Porten <porten@kde.org>
759 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
761 2002-12-24 Zack Rusin <zack@kde.org>
763 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
764 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
767 2002-12-24 Havoc Pennington <hp@pobox.com>
769 * glib/dbus-gthread.c: fix include
771 * glib/dbus-glib.h: rename DBusMessageHandler for now.
772 I think glib API needs to change, though, as you don't
773 want to use DBusMessageFunction, you want to use the
774 DBusMessageHandler object. Probably
775 dbus_connection_open_with_g_main_loop()
776 and dbus_connection_setup_g_main_loop() or something like that
777 (but think of better names...) that just create a connection
778 that has watch/timeout functions etc. already set up.
780 * dbus/dbus-connection.c
781 (dbus_connection_send_message_with_reply): new function just to
782 show how the message handler helps us deal with replies.
784 * dbus/dbus-list.c (_dbus_list_remove_last): new function
786 * dbus/dbus-string.c (_dbus_string_test): free a string that
789 * dbus/dbus-hash.c: use memory pools for the hash entries
790 (rebuild_table): be more paranoid about overflow, and
791 shrink table when we can
792 (_dbus_hash_test): reduce number of sprintfs and write
793 valid C89. Add tests for case where we grow and then
794 shrink the hash table.
796 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
798 * dbus/dbus-connection.c (dbus_connection_register_handler)
799 (dbus_connection_unregister_handler): new functions
801 * dbus/dbus-message.c (dbus_message_get_name): new
803 * dbus/dbus-list.c: fix docs typo
805 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
806 an object representing a handler for messages.
808 2002-12-16 Anders Carlsson <andersca@codefactory.se>
811 * glib/dbus-gthread.c: (dbus_gthread_init):
812 Don't use the gdbus prefix for public functions.
814 2002-12-16 Anders Carlsson <andersca@codefactory.se>
818 Add GLib checks and fixup .pc files
822 * glib/dbus-gmain.c: (gdbus_connection_prepare),
823 (gdbus_connection_check), (gdbus_connection_dispatch),
824 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
825 (dbus_connection_gsource_new):
826 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
827 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
828 * glib/test-dbus-glib.c: (message_handler), (main):
831 2002-12-15 Harri Porten <porten@kde.org>
833 * autogen.sh: check for libtoolize before attempting to use it
835 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
838 * .cvsignore: ignore more stamp files
840 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
842 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
843 without make install.
845 2002-12-15 Havoc Pennington <hp@pobox.com>
847 * dbus/dbus-threads.c: add thread stubs that a higher library
848 layer can fill in. e.g. the GLib wrapper might fill them in with
849 GThread stuff. We still need to use this thread API to
850 thread-safe-ize the library.
852 2002-12-12 Havoc Pennington <hp@pobox.com>
854 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
855 below new interfaces and include fewer system headers.
857 * dbus/dbus-sysdeps.c (_dbus_read): new function
858 (_dbus_write): new function
859 (_dbus_write_two): new function
860 (_dbus_connect_unix_socket): new function
861 (_dbus_listen_unix_socket): new function
863 * dbus/dbus-message-internal.h: change interfaces to use
866 2002-12-11 Havoc Pennington <hp@pobox.com>
868 * dbus/dbus-types.h: add dbus_unichar
870 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
872 * dbus/dbus-connection.c (dbus_connection_send_message): return
875 * dbus/dbus-transport.c: include dbus-watch.h
877 * dbus/dbus-connection.c: include dbus-message-internal.h
879 * HACKING: add file with coding guidelines stuff.
881 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
882 handling here, for security purposes (as in vsftpd). Not actually
883 using this class yet.
885 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
886 system/libc usage here, as in vsftpd, for ease of auditing (and
887 should also simplify portability). Haven't actually moved all the
888 system/libc usage into here yet.
890 2002-11-25 Havoc Pennington <hp@pobox.com>
892 * dbus/dbus-internals.c (_dbus_verbose): fix to not
893 always print the first verbose message.
895 2002-11-24 Havoc Pennington <hp@pobox.com>
897 * test/echo-client.c, test/echo-server.c: cheesy test
900 * configure.in (AC_CHECK_FUNCS): check for writev
902 * dbus/dbus-message.c (_dbus_message_get_network_data): new
905 * dbus/dbus-list.c (_dbus_list_foreach): new function
907 * dbus/dbus-internals.c (_dbus_verbose): new function
909 * dbus/dbus-server.c, dbus/dbus-server.h: public object
910 representing a server that listens for connections.
912 * dbus/.cvsignore: create
914 * dbus/dbus-errors.h, dbus/dbus-errors.c:
915 public API for reporting errors
917 * dbus/dbus-connection.h, dbus/dbus-connection.c:
918 public object representing a connection that
919 sends/receives messages. (Same object used for
920 both client and server.)
922 * dbus/dbus-transport.h, dbus/dbus-transport.c:
923 Basic abstraction for different kinds of stream
924 that we might read/write messages from.
926 2002-11-23 Havoc Pennington <hp@pobox.com>
928 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
931 * dbus/dbus-test.c (main): add list test, and include
932 dbus-test.h as intended
934 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
935 (_dbus_hash_table_remove_int): return value indicates
936 whether the entry existed to remove
938 * dbus/dbus-list.c: add linked list utility class,
941 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
944 2002-11-23 Havoc Pennington <hp@pobox.com>
946 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
947 DBUS_END_DECLS to nothing, that should fix this once and for all
949 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
951 * dbus/dbus-message.c, dbus/dbus-hash.c:
952 add some missing @brief
954 2002-11-23 Havoc Pennington <hp@pobox.com>
956 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
957 to avoid confusing Doxygen
959 * dbus/dbus-hash.c: @} not }@
961 * dbus/dbus-message.c (struct DBusMessage): split out
964 2002-11-23 Havoc Pennington <hp@pobox.com>
966 * configure.in: pile on more warning flags if using gcc
968 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
969 to document static functions
971 * configure.in: add summary to end of configure so it
972 looks nice and attractive
974 * dbus/dbus-hash.c: finish implementation and write unit
977 * configure.in: add --enable-tests to enable unit tests
979 * dbus/dbus-test.c: test program to run unit tests
980 for all files in dbus/*, initially runs a test for
983 * dbus/dbus-internals.h: file to hold some internal utility stuff
985 2002-11-22 Havoc Pennington <hp@redhat.com>
987 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
988 "ported" away from Tcl
990 * dbus/dbus-types.h: header for types such as dbus_bool_t
992 2002-11-22 Havoc Pennington <hp@redhat.com>
994 * dbus/dbus.h: fixups for doc warnings
996 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
998 (QUIET): make it quiet so we can see warnings
1000 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1002 2002-11-22 Havoc Pennington <hp@redhat.com>
1004 * Makefile.am: include "Doxyfile" target in all-local
1006 * configure.in: generate the Doxyfile
1008 * Doxyfile.in: move Doxyfile here, so we can use
1009 configure to generate a Doxyfile with the right
1012 2002-11-22 Havoc Pennington <hp@redhat.com>
1014 * dbus/dbus-message.c: move inline docs into .c file
1016 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1017 so all docs are under doc/
1018 (MAN_EXTENSION): generate man pages. Use extension
1019 ".3dbus" which matches ".3qt" on my system,
1020 I guess this is OK, I don't know really.
1021 (FILE_PATTERNS): look for .c files not .h, makes sense
1024 2002-11-22 Havoc Pennington <hp@pobox.com>
1026 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1027 because any app can be a server, and any app can be a client,
1028 the bus is a special kind of server.
1030 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1032 * Doxyfile : adding. Still needs Makefile rules to be generated
1033 automatically (just run "doxygen" in the toplevel dir for now to
1036 * dbus/dbus-message.h : Adding sample docs (javadoc since
1037 resembles gtk-doc a little more)
1039 * dbus/dbus.h : Adding sample docs
1041 2002-11-21 Havoc Pennington <hp@redhat.com>
1043 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1044 so we can allow ourselves to include files directly,
1045 instead of having to use dbus.h
1047 * dbus/dbus.h: fill in
1049 * dbus/dbus-message.h: sketch out a sample header file.
1050 Include griping if you include it directly instead of
1053 * dbus/dbus-macros.h: new file with macros for extern "C",
1054 TRUE/FALSE, NULL, etc.
1056 * doc/file-boilerplate.c: put include guards in here
1058 2002-11-21 Havoc Pennington <hp@redhat.com>
1060 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1062 * COPYING: include the GPL as well, and license code
1063 under both AFL and GPL.
1065 2002-11-21 Havoc Pennington <hp@redhat.com>
1067 * acconfig.h: get rid of this
1069 * autogen.sh (run_configure): add --no-configure option
1071 * configure.in: remove AC_ARG_PROGRAM to make
1072 autoconf complain less. add AC_PREREQ.
1073 add AC_DEFINE third arg.
1075 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1078 Fix references so we can distcheck.
1080 2002-11-21 Havoc Pennington <hp@redhat.com>
1082 * Initial module creation