1 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4 * bus/connection.c: (connection_disconnect_handler),
5 (connection_watch_callback), (bus_connection_setup):
6 * bus/dispatch.c: (send_one_message),
7 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
10 * bus/driver.c: (bus_driver_send_service_deleted),
11 (bus_driver_send_service_created), (bus_driver_handle_hello),
12 (bus_driver_send_welcome_message),
13 (bus_driver_handle_list_services), (bus_driver_remove_connection),
14 (bus_driver_handle_message):
16 Refactor code, put the message dispatching in its own file. Use
17 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
20 2003-01-25 Anders Carlsson <andersca@codefactory.se>
22 * dbus/dbus-internals.h:
23 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
25 * dbus/dbus-message.c: (dbus_message_get_sender):
26 * dbus/dbus-message.h:
27 Implement dbus_message_get_sender.
29 * dbus/dbus-protocol.h:
30 Add message and service defines.
32 2003-01-25 Anders Carlsson <andersca@codefactory.se>
34 * dbus/dbus-connection.c: (dbus_connection_send_message):
35 * dbus/dbus-message-internal.h:
36 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
37 (dbus_message_write_header):
38 Remove _dbus_messag_unlock and don't set the client serial on a
39 message if one already exists.
41 2003-01-24 Havoc Pennington <hp@pobox.com>
43 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
46 * bus/driver.c (bus_driver_handle_list_services): fix a leak
49 2003-01-25 Anders Carlsson <andersca@codefactory.se>
51 * dbus/dbus-list.c: (alloc_link), (free_link):
52 Use a memory pool for the links.
54 2003-01-25 Anders Carlsson <andersca@codefactory.se>
56 * bus/connection.c: (bus_connection_foreach):
58 Add new bus_connection_foreach function.
60 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
61 Add function that broadcasts a message to all clients.
63 (bus_driver_send_service_created), (bus_driver_handle_hello),
64 (bus_driver_send_welcome_message),
65 (bus_driver_handle_list_services), (bus_driver_message_handler):
66 Implement functions that take care of listing services, and notifying
67 clients when new services are created.
69 * bus/services.c: (bus_services_list):
71 Add new function that returns an array of strings with the currently
76 Update copyright year.
78 2003-01-25 Anders Carlsson <andersca@codefactory.se>
80 * dbus/dbus-connection.c: (dbus_connection_send_message):
81 Unlock the message in case it was sent earlier.
83 (dbus_connection_send_message_with_reply_and_block):
84 Remove the reply message from the list.
86 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
87 Set array_len and new_pos correctly.
92 * dbus/dbus-message-internal.h:
93 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
94 New function that returns the reply serial.
96 (_dbus_message_unlock):
97 New function that unlocks a message and resets its header.
99 (dbus_message_append_string_array),
100 (dbus_message_get_fields_valist),
101 (dbus_message_iter_get_field_type),
102 (dbus_message_iter_get_string_array),
103 (dbus_message_get_fields),
104 (dbus_message_append_fields_valist):
105 Handle string arrays.
107 (dbus_message_set_sender):
108 Make this function public since the bus daemon needs it.
110 (decode_header_data):
111 Set the reply serial to -1 initially.
113 * dbus/dbus-message.h:
114 Add dbus_message_set_sender.
116 2003-01-24 Havoc Pennington <hp@pobox.com>
118 * doc/dbus-specification.sgml: add some stuff
120 2003-01-22 Havoc Pennington <hp@pobox.com>
122 * doc/dbus-specification.sgml: Start to document the protocol.
124 2003-01-22 Havoc Pennington <hp@pobox.com>
126 * dbus/dbus-connection.c
127 (dbus_connection_send_message_with_reply_and_block): add some @todo
129 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
131 2003-01-21 Havoc Pennington <hp@pobox.com>
133 (patch untested because can't compile)
135 * bus/driver.c (create_unique_client_name): make this function
136 never recycle client names. Also, caller should initialize
139 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
141 2003-01-21 Anders Carlsson <andersca@codefactory.se>
143 * dbus/dbus-marshal.c: (_dbus_marshal_double),
144 (_dbus_marshal_int32), (_dbus_marshal_uint32),
145 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
146 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
147 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
148 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
149 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
150 * dbus/dbus-marshal.h:
151 * dbus/dbus-protocol.h:
152 Add support for marshalling and demarshalling integer, double
155 2003-01-21 Anders Carlsson <andersca@codefactory.se>
160 * bus/connection.c: (connection_disconnect_handler):
161 Remove the connection from the bus driver's list.
163 (connection_watch_callback): Dispatch messages.
165 (free_connection_data): Free connection name.
167 (bus_connection_setup): Add connection to the bus driver's list.
168 (bus_connection_remove_owned_service):
169 (bus_connection_set_name), (bus_connection_get_name):
170 Add functions for setting and getting the connection's name.
173 Add function headers.
175 * bus/driver.c: (create_unique_client_name),
176 (bus_driver_handle_hello_message),
177 (bus_driver_send_welcome_message), (bus_driver_message_handler),
178 (bus_driver_add_connection), (bus_driver_remove_connection):
181 * bus/services.c: (bus_service_free):
183 New file that handles communication and registreation with the bus
186 2003-01-21 Anders Carlsson <andersca@codefactory.se>
188 * dbus/dbus-connection.c: (dbus_connection_send_message):
189 Add a new client_serial parameter.
191 (dbus_connection_send_message_with_reply):
192 Remove a @todo since we've implemented the blocking function.
194 (dbus_connection_send_message_with_reply_and_block):
195 New function that sends a message and waits for a reply and
196 then returns the reply.
198 * dbus/dbus-connection.h:
201 * dbus/dbus-errors.c: (dbus_result_to_string):
202 * dbus/dbus-errors.h:
205 * dbus/dbus-message-internal.h:
206 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
207 (_dbus_message_set_sender), (dbus_message_write_header),
208 (dbus_message_new_reply), (decode_header_data),
209 (_dbus_message_loader_return_buffer), (_dbus_message_test):
210 * dbus/dbus-message.h:
211 Add new functions that set the reply serial and sender.
212 Also marshal and demarshal them correctly and add test.
214 * dbus/dbus-protocol.h:
215 Add new DBUS_MESSAGE_TYPE_SENDER.
218 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
219 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
220 (dbus_connection_hookup_with_g_main):
221 * glib/test-dbus-glib.c: (main):
222 Rewrite to use GIOChannel and remove the GSource crack.
224 * test/echo-client.c: (main):
225 * test/watch.c: (check_messages):
226 Update for changed APIs
228 2003-01-19 Anders Carlsson <andersca@codefactory.se>
230 * dbus/Makefile.am: Add dbus-timeout.[cħ]
232 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
233 Create a DBusTimeoutList.
234 (dbus_connection_set_timeout_functions): Add new function to
235 set timeout callbacks
237 * dbus/dbus-connection.h: Add public DBusTimeout API.
239 * dbus/dbus-message.c: (dbus_message_get_service):
240 * dbus/dbus-message.h: New function.
242 * dbus/dbus-server.c: Fix small doc typo.
244 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
246 2003-01-19 Anders Carlsson <andersca@codefactory.se>
248 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
249 of the string, just as long as specified.
251 2003-01-19 Havoc Pennington <hp@pobox.com>
253 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
256 * dbus/dbus-server.c (dbus_server_set_max_connections)
257 (dbus_server_get_max_connections, dbus_server_get_n_connections):
258 keep track of current number of connections, and add API for
259 setting a max (but haven't implemented enforcing the max yet)
261 2003-01-18 Havoc Pennington <hp@pobox.com>
263 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
264 reading/writing if read_watch != NULL or write_watch != NULL.
266 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
267 the message loader code to actually load message->header and
268 message->body into the newly-created message.
270 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
273 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
274 (dbus_connection_get_max_message_size)
275 (dbus_connection_set_max_live_messages_size)
276 (dbus_connection_get_max_live_messages_size): implement some
277 resource limitation functions
279 * dbus/dbus-resources.c: new file implementing some of the
280 resource limits stuff
282 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
283 missing docs, add @todo to handle OOM etc.
285 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
288 2003-01-18 Havoc Pennington <hp@pobox.com>
290 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
291 connection if it hasn't been already.
293 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
294 replace with DisconnectFunction.
296 2003-01-18 Havoc Pennington <hp@pobox.com>
298 Building --disable-verbose-mode --disable-asserts --disable-tests
299 cuts the library from 112K to 45K or so
301 * configure.in: check for varargs macro support,
302 add --enable-verbose-mode, --enable-asserts.
304 * dbus/dbus-internals.h (_dbus_assert): support
306 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
308 2003-01-18 Havoc Pennington <hp@pobox.com>
310 * dbus/dbus-test.c: include config.h so that tests actually run
312 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
313 so the failure mode when that assumption fails will be plenty
316 2003-01-18 Havoc Pennington <hp@pobox.com>
318 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
320 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
323 * test/Makefile.am: don't use special variable "TESTS" for echo-*
324 since we don't want to use those in make check
326 2003-01-15 Havoc Pennington <hp@redhat.com>
332 2003-01-15 Havoc Pennington <hp@redhat.com>
334 * test/Makefile.am: fix so that test source code ends up in the
335 distribution on make distcheck
337 2003-01-15 Havoc Pennington <hp@redhat.com>
343 2003-01-15 Havoc Pennington <hp@redhat.com>
345 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
346 fix build when --disable-tests
348 * Makefile.am (EXTRA_DIST): put HACKING in here
350 * HACKING: document procedure for making a tarball release.
352 2003-01-14 Anders Carlsson <andersca@codefactory.se>
354 * bus/connection.c: (connection_error_handler),
355 (bus_connection_setup):
356 * bus/main.c: (main):
357 Make sure that the DBusConnectionData struct is NULLed
358 out to prevent a segfault.
360 * dbus/dbus-errors.c: (dbus_result_to_string):
361 * dbus/dbus-errors.h:
362 * dbus/dbus-message.c: (dbus_message_get_fields),
363 (dbus_message_get_fields_valist), (_dbus_message_test):
364 * dbus/dbus-message.h:
365 Make dbus_message_get_fields return a result code so we can
366 track invalid fields as well as oom.
368 2003-01-11 Havoc Pennington <hp@pobox.com>
370 * configure.in: change --enable-test/--enable-ansi action-if-given
371 to enable_foo=$enableval instead of enable_foo=yes
373 2003-01-08 Havoc Pennington <hp@pobox.com>
375 * dbus/dbus-string.c (_dbus_string_align_length): new function
377 * dbus/dbus-test-main.c: move main() for test app here
379 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
380 symbol to run tests, because dbus-test isn't in the main
383 Code review nitpicks.
385 * dbus/dbus-message.c (dbus_message_write_header): add newlines
386 for people with narrow emacs ;-). Assert client_serial was filled
387 in. Assert message->name != NULL.
388 (dbus_message_append_fields): have "first_field_type" arg separate
389 from va list, needed for C++ binding that also uses varargs IIRC
390 and helps with type safety
391 (dbus_message_new): add @todo about using DBusString to store
392 service/name internally
393 (dbus_message_new): don't leak ->service and ->name on OOM later
395 (dbus_message_unref): free the service name
396 (dbus_message_get_fields): same change to varargs
397 i.e. first_field_type
398 (_dbus_message_loader_return_buffer): assert that the message data
399 is aligned (if not it's a bug in our code). Put in verbose griping
400 about why we set corrupted = TRUE.
401 (decode_header_data): add FIXME that char* is evil. Was going to
402 add FIXME about evil locale-specific string.h strncmp, but just
403 switched to wacky string-as-uint32 optimization. Move check for
404 "no room for field name" above get_const_data_len() to avoid
405 assertion failure in get_const_data_len if we have trailing 2
406 bytes or the like. Check for service and name fields being
407 provided twice. Don't leak service/name on error. Require field
408 names to be aligned to 4 bytes.
410 * dbus/dbus-marshal.c: move byte swap stuff to header
411 (_dbus_pack_int32): uscore-prefix
412 (_dbus_unpack_int32): uscore-prefix
413 (_dbus_unpack_uint32): export
414 (_dbus_demarshal_string): add @todo complaining about use of
416 (_dbus_marshal_get_field_end_pos): add @todo about bad error
417 handling allowing corrupt data to go unchecked
419 2003-01-08 Havoc Pennington <hp@redhat.com>
421 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
422 to the select() as needed for authentication. (should be using
423 _dbus_poll() not select, but for another day)
425 * dbus/dbus.h: include dbus/dbus-protocol.h
427 2003-01-08 Anders Carlsson <andersca@codefactory.se>
429 * dbus/Makefile.am (dbusinclude_HEADERS): Install
432 2003-01-08 Anders Carlsson <andersca@codefactory.se>
434 * dbus/dbus-internals.c: (_dbus_type_to_string):
435 New function that returns a string describing a type.
437 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
438 * dbus/dbus-marshal.h:
439 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
440 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
441 (dbus_message_iter_get_byte_array):
442 * dbus/dbus-message.h:
443 Add new convenience functions for appending and getting message fields.
444 Also add demarshalling routines for byte arrays.
446 2003-01-07 Anders Carlsson <andersca@codefactory.se>
448 * dbus/dbus-connection-internal.h:
449 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
450 (_dbus_connection_get_next_client_serial),
451 (dbus_connection_send_message):
452 * dbus/dbus-internals.h:
453 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
454 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
455 (_dbus_marshal_uint32), (_dbus_demarshal_double),
456 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
457 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
458 (_dbus_verbose_bytes), (_dbus_marshal_test):
459 * dbus/dbus-marshal.h:
460 * dbus/dbus-message-internal.h:
461 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
462 (dbus_message_write_header), (_dbus_message_lock),
463 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
464 (dbus_message_get_name), (dbus_message_append_int32),
465 (dbus_message_append_uint32), (dbus_message_append_double),
466 (dbus_message_append_string), (dbus_message_append_byte_array),
467 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
468 (dbus_message_iter_unref), (dbus_message_iter_has_next),
469 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
470 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
471 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
472 (decode_header_data), (_dbus_message_loader_return_buffer),
473 (message_iter_test), (_dbus_message_test):
474 * dbus/dbus-message.h:
475 * dbus/dbus-protocol.h:
476 * dbus/dbus-test.c: (main):
478 * glib/test-dbus-glib.c: (message_handler), (main):
479 * test/echo-client.c: (main):
480 * test/watch.c: (check_messages):
481 Make messages sendable and receivable for real.
483 2003-01-07 Anders Carlsson <andersca@codefactory.se>
485 * dbus/dbus-marshal.c: (_dbus_marshal_double),
486 (_dbus_marshal_string), (_dbus_marshal_byte_array):
487 * dbus/dbus-message.c: (dbus_message_append_int32),
488 (dbus_message_append_uint32), (dbus_message_append_double),
489 (dbus_message_append_string), (dbus_message_append_byte_array):
490 Handle OOM restoration.
492 2003-01-07 Anders Carlsson <andersca@codefactory.se>
494 * dbus/dbus-marshal.c: (_dbus_marshal_string),
495 (_dbus_demarshal_string), (_dbus_marshal_test):
496 * dbus/dbus-marshal.h:
497 * dbus/dbus-message.c: (dbus_message_get_name),
498 Document these functions.
500 (dbus_message_append_int32), (dbus_message_append_uint32),
501 (dbus_message_append_double), (dbus_message_append_string),
502 (dbus_message_append_byte_array):
503 * dbus/dbus-message.h:
504 Add functions for adding message fields of different types.
506 * dbus/dbus-protocol.h:
507 Add the different types.
509 2003-01-05 Havoc Pennington <hp@pobox.com>
511 * bus/connection.c: implement routines for handling connections,
512 first thing is keeping a list of owned services on each connection
513 and setting up watches etc.
515 * bus/services.c: implement a mapping from service names to lists
518 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
520 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
521 to use static mutexes for global data
523 * dbus/dbus-connection.c (dbus_connection_set_data): add new
524 collection of functions to set/get application-specific data
525 on the DBusConnection.
527 2003-01-04 Havoc Pennington <hp@pobox.com>
529 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
530 (_dbus_poll): new function
532 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
535 * bus/loop.c: initial code for the daemon main loop
537 2003-01-04 Havoc Pennington <hp@pobox.com>
539 * test/watch.c (error_handler): make it safe if the error handler
540 is called multiple times (if we s/error handler/disconnect
541 handler/ we should just guarantee it's called only once)
543 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
544 error handler on disconnect (it's quite possible we should
545 just change the error handler to a "disconnect handler," I'm
546 not sure we have any other meaningful errors)
548 * configure.in: check for getpwnam_r
550 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
551 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
552 mechanism as in SASL spec, using socket credentials
554 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
555 (_dbus_send_credentials_unix_socket): new function
557 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
559 (_dbus_write): only check errno if <0 returned
560 (_dbus_write_two): ditto
562 2003-01-02 Anders Carlsson <andersca@codefactory.se>
564 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
565 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
566 (_dbus_marshal_test):
567 * dbus/dbus-marshal.h:
568 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
569 to _dbus_marshal_utf8_string. Also fix some tests.
571 2002-12-28 Harri Porten <porten@kde.org>
573 * configure.in: added check for C++ compiler and a very cheesy
574 check for the Qt integration
576 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
578 * qt/Makefile.am: added
580 * qt/.cvsignore: added
582 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
583 latter, added #ifdef QT_THREAD_SUPPORT guard.
585 * dbus/Makefile.am: added missing headers for make dist
587 2002-12-28 Kristian Rietveld <kris@gtk.org>
589 * dbus/Makefile.am: fixup export-symbols-regex.
591 2002-12-27 Anders Carlsson <andersca@codefactory.se>
593 * acinclude.m4: Add this file and put the
594 PKG_CHECK_MODULE macro in it.
596 2002-12-27 Anders Carlsson <andersca@codefactory.se>
598 * dbus/dbus-marshal.c: (_dbus_marshal_string),
599 (_dbus_demarshal_double), (_dbus_demarshal_int32),
600 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
601 (_dbus_marshal_test):
602 Make the demarshalling routines align the pos argument.
603 Add string marshalling tests and fix the obvious bugs
606 2002-12-26 Havoc Pennington <hp@pobox.com>
608 * dbus/dbus-auth.c: fixes fixes fixes
610 * dbus/dbus-transport-unix.c: wire up support for
611 encoding/decoding data on the wire
613 * dbus/dbus-auth.c (_dbus_auth_encode_data)
614 (_dbus_auth_decode_data): append to target string
615 instead of nuking it.
617 2002-12-26 Havoc Pennington <hp@pobox.com>
619 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
620 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
623 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
624 avoid swap_bytes() overhead (ignoring possible assembly stuff for
625 now). Main point is because I wanted unpack_uint32 to implement
627 (_dbus_verbose_bytes): new function
629 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
631 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
632 mechanism to handle a corrupt message stream
633 (_dbus_message_loader_new): fix preallocation to only prealloc,
636 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
637 (_dbus_string_test): enhance tests for copy/move and fix the
640 * dbus/dbus-transport-unix.c: Hold references in more places to
641 avoid reentrancy problems
643 * dbus/dbus-transport.c: ditto
645 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
646 leak reference count in no-message case
648 * test/watch.c (do_mainloop): handle adding/removing watches
649 during iteration over the watches. Also, ref the connection/server
650 stored on a watch, so we don't try to mangle a destroyed one.
652 * dbus/dbus-transport-unix.c (do_authentication): perform
655 * dbus/dbus-auth.c (get_state): add a state
656 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
657 (_dbus_auth_get_unused_bytes): append the unused bytes
658 to the passed in string, rather than prepend
660 * dbus/dbus-transport.c (_dbus_transport_init_base): create
661 the auth conversation DBusAuth
663 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
664 (_dbus_transport_new_for_domain_socket): when creating a
665 transport, pass in whether it's a client-side or server-side
666 transport so we know which DBusAuth to create
668 2002-12-03 Havoc Pennington <hp@pobox.com>
670 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
671 _after_ finalizing the derived members
672 (unix_connection_set): unref watch if we fail to add it
674 * dbus/dbus-connection.c (dbus_connection_unref): delete the
675 transport first, so that the connection owned by the
676 transport will be valid as the transport finalizes.
678 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
679 if necessary, and remove watches from the connection.
681 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
683 2002-12-26 Anders Carlsson <andersca@codefactory.se>
685 * dbus/dbus-marshal.c: (_dbus_marshal_string),
686 (_dbus_demarshal_double), (_dbus_demarshal_int32),
687 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
688 (_dbus_marshal_test):
689 * dbus/dbus-marshal.h:
690 Add string marshal functions and have the demarshal functions
691 return the new position.
693 2002-12-25 Havoc Pennington <hp@pobox.com>
695 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
696 it is a simple protocol that just maps directly to SASL.
698 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
699 initial implementation, not actually used yet.
701 * dbus/dbus-string.c (_dbus_string_find): new function
702 (_dbus_string_equal): new function
703 (_dbus_string_base64_encode): new function
704 (_dbus_string_base64_decode): new function
706 2002-12-25 Anders Carlsson <andersca@codefactory.se>
709 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
710 (_dbus_marshal_int32), (_dbus_marshal_uint32),
711 (_dbus_demarshal_double), (_dbus_demarshal_int32),
712 (_dbus_demarshal_uint32), (_dbus_marshal_test):
713 * dbus/dbus-marshal.h:
714 * dbus/dbus-protocol.h:
715 * dbus/dbus-test.c: (main):
717 Add un-optimized marshalling/demarshalling routines.
719 2002-12-25 Harri Porten <porten@kde.org>
721 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
723 2002-12-24 Zack Rusin <zack@kde.org>
725 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
726 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
729 2002-12-24 Havoc Pennington <hp@pobox.com>
731 * glib/dbus-gthread.c: fix include
733 * glib/dbus-glib.h: rename DBusMessageHandler for now.
734 I think glib API needs to change, though, as you don't
735 want to use DBusMessageFunction, you want to use the
736 DBusMessageHandler object. Probably
737 dbus_connection_open_with_g_main_loop()
738 and dbus_connection_setup_g_main_loop() or something like that
739 (but think of better names...) that just create a connection
740 that has watch/timeout functions etc. already set up.
742 * dbus/dbus-connection.c
743 (dbus_connection_send_message_with_reply): new function just to
744 show how the message handler helps us deal with replies.
746 * dbus/dbus-list.c (_dbus_list_remove_last): new function
748 * dbus/dbus-string.c (_dbus_string_test): free a string that
751 * dbus/dbus-hash.c: use memory pools for the hash entries
752 (rebuild_table): be more paranoid about overflow, and
753 shrink table when we can
754 (_dbus_hash_test): reduce number of sprintfs and write
755 valid C89. Add tests for case where we grow and then
756 shrink the hash table.
758 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
760 * dbus/dbus-connection.c (dbus_connection_register_handler)
761 (dbus_connection_unregister_handler): new functions
763 * dbus/dbus-message.c (dbus_message_get_name): new
765 * dbus/dbus-list.c: fix docs typo
767 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
768 an object representing a handler for messages.
770 2002-12-16 Anders Carlsson <andersca@codefactory.se>
773 * glib/dbus-gthread.c: (dbus_gthread_init):
774 Don't use the gdbus prefix for public functions.
776 2002-12-16 Anders Carlsson <andersca@codefactory.se>
780 Add GLib checks and fixup .pc files
784 * glib/dbus-gmain.c: (gdbus_connection_prepare),
785 (gdbus_connection_check), (gdbus_connection_dispatch),
786 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
787 (dbus_connection_gsource_new):
788 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
789 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
790 * glib/test-dbus-glib.c: (message_handler), (main):
793 2002-12-15 Harri Porten <porten@kde.org>
795 * autogen.sh: check for libtoolize before attempting to use it
797 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
800 * .cvsignore: ignore more stamp files
802 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
804 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
805 without make install.
807 2002-12-15 Havoc Pennington <hp@pobox.com>
809 * dbus/dbus-threads.c: add thread stubs that a higher library
810 layer can fill in. e.g. the GLib wrapper might fill them in with
811 GThread stuff. We still need to use this thread API to
812 thread-safe-ize the library.
814 2002-12-12 Havoc Pennington <hp@pobox.com>
816 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
817 below new interfaces and include fewer system headers.
819 * dbus/dbus-sysdeps.c (_dbus_read): new function
820 (_dbus_write): new function
821 (_dbus_write_two): new function
822 (_dbus_connect_unix_socket): new function
823 (_dbus_listen_unix_socket): new function
825 * dbus/dbus-message-internal.h: change interfaces to use
828 2002-12-11 Havoc Pennington <hp@pobox.com>
830 * dbus/dbus-types.h: add dbus_unichar
832 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
834 * dbus/dbus-connection.c (dbus_connection_send_message): return
837 * dbus/dbus-transport.c: include dbus-watch.h
839 * dbus/dbus-connection.c: include dbus-message-internal.h
841 * HACKING: add file with coding guidelines stuff.
843 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
844 handling here, for security purposes (as in vsftpd). Not actually
845 using this class yet.
847 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
848 system/libc usage here, as in vsftpd, for ease of auditing (and
849 should also simplify portability). Haven't actually moved all the
850 system/libc usage into here yet.
852 2002-11-25 Havoc Pennington <hp@pobox.com>
854 * dbus/dbus-internals.c (_dbus_verbose): fix to not
855 always print the first verbose message.
857 2002-11-24 Havoc Pennington <hp@pobox.com>
859 * test/echo-client.c, test/echo-server.c: cheesy test
862 * configure.in (AC_CHECK_FUNCS): check for writev
864 * dbus/dbus-message.c (_dbus_message_get_network_data): new
867 * dbus/dbus-list.c (_dbus_list_foreach): new function
869 * dbus/dbus-internals.c (_dbus_verbose): new function
871 * dbus/dbus-server.c, dbus/dbus-server.h: public object
872 representing a server that listens for connections.
874 * dbus/.cvsignore: create
876 * dbus/dbus-errors.h, dbus/dbus-errors.c:
877 public API for reporting errors
879 * dbus/dbus-connection.h, dbus/dbus-connection.c:
880 public object representing a connection that
881 sends/receives messages. (Same object used for
882 both client and server.)
884 * dbus/dbus-transport.h, dbus/dbus-transport.c:
885 Basic abstraction for different kinds of stream
886 that we might read/write messages from.
888 2002-11-23 Havoc Pennington <hp@pobox.com>
890 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
893 * dbus/dbus-test.c (main): add list test, and include
894 dbus-test.h as intended
896 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
897 (_dbus_hash_table_remove_int): return value indicates
898 whether the entry existed to remove
900 * dbus/dbus-list.c: add linked list utility class,
903 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
906 2002-11-23 Havoc Pennington <hp@pobox.com>
908 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
909 DBUS_END_DECLS to nothing, that should fix this once and for all
911 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
913 * dbus/dbus-message.c, dbus/dbus-hash.c:
914 add some missing @brief
916 2002-11-23 Havoc Pennington <hp@pobox.com>
918 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
919 to avoid confusing Doxygen
921 * dbus/dbus-hash.c: @} not }@
923 * dbus/dbus-message.c (struct DBusMessage): split out
926 2002-11-23 Havoc Pennington <hp@pobox.com>
928 * configure.in: pile on more warning flags if using gcc
930 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
931 to document static functions
933 * configure.in: add summary to end of configure so it
934 looks nice and attractive
936 * dbus/dbus-hash.c: finish implementation and write unit
939 * configure.in: add --enable-tests to enable unit tests
941 * dbus/dbus-test.c: test program to run unit tests
942 for all files in dbus/*, initially runs a test for
945 * dbus/dbus-internals.h: file to hold some internal utility stuff
947 2002-11-22 Havoc Pennington <hp@redhat.com>
949 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
950 "ported" away from Tcl
952 * dbus/dbus-types.h: header for types such as dbus_bool_t
954 2002-11-22 Havoc Pennington <hp@redhat.com>
956 * dbus/dbus.h: fixups for doc warnings
958 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
960 (QUIET): make it quiet so we can see warnings
962 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
964 2002-11-22 Havoc Pennington <hp@redhat.com>
966 * Makefile.am: include "Doxyfile" target in all-local
968 * configure.in: generate the Doxyfile
970 * Doxyfile.in: move Doxyfile here, so we can use
971 configure to generate a Doxyfile with the right
974 2002-11-22 Havoc Pennington <hp@redhat.com>
976 * dbus/dbus-message.c: move inline docs into .c file
978 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
979 so all docs are under doc/
980 (MAN_EXTENSION): generate man pages. Use extension
981 ".3dbus" which matches ".3qt" on my system,
982 I guess this is OK, I don't know really.
983 (FILE_PATTERNS): look for .c files not .h, makes sense
986 2002-11-22 Havoc Pennington <hp@pobox.com>
988 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
989 because any app can be a server, and any app can be a client,
990 the bus is a special kind of server.
992 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
994 * Doxyfile : adding. Still needs Makefile rules to be generated
995 automatically (just run "doxygen" in the toplevel dir for now to
998 * dbus/dbus-message.h : Adding sample docs (javadoc since
999 resembles gtk-doc a little more)
1001 * dbus/dbus.h : Adding sample docs
1003 2002-11-21 Havoc Pennington <hp@redhat.com>
1005 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1006 so we can allow ourselves to include files directly,
1007 instead of having to use dbus.h
1009 * dbus/dbus.h: fill in
1011 * dbus/dbus-message.h: sketch out a sample header file.
1012 Include griping if you include it directly instead of
1015 * dbus/dbus-macros.h: new file with macros for extern "C",
1016 TRUE/FALSE, NULL, etc.
1018 * doc/file-boilerplate.c: put include guards in here
1020 2002-11-21 Havoc Pennington <hp@redhat.com>
1022 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1024 * COPYING: include the GPL as well, and license code
1025 under both AFL and GPL.
1027 2002-11-21 Havoc Pennington <hp@redhat.com>
1029 * acconfig.h: get rid of this
1031 * autogen.sh (run_configure): add --no-configure option
1033 * configure.in: remove AC_ARG_PROGRAM to make
1034 autoconf complain less. add AC_PREREQ.
1035 add AC_DEFINE third arg.
1037 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1040 Fix references so we can distcheck.
1042 2002-11-21 Havoc Pennington <hp@redhat.com>
1044 * Initial module creation