1 2003-01-26 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-message-builder.c: implement, completely untested.
5 * test/data/*: add data to be used in testing.
6 ".message" files are our simple loadable text format.
7 ".message-raw" will be binary dumps of messages.
9 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11 2003-01-26 Havoc Pennington <hp@pobox.com>
13 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
15 * dbus/dbus-errors.c (dbus_result_to_string): add
18 * dbus/dbus-message-builder.c: new file, will contain code to load
19 up messages from files. Not implemented yet.
21 2003-01-26 Havoc Pennington <hp@pobox.com>
23 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
24 the sender by setting to NULL
26 2003-01-26 Havoc Pennington <hp@pobox.com>
28 The unit tests pass, but otherwise untested. If it breaks, the
29 tests should have been better. ;-)
31 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
34 * dbus/dbus-message.c: redo everything so we maintain
35 message->header as the only copy of the various fields.
36 This avoids the possibility of out-of-memory in some cases,
37 for example dbus_message_lock() can't run out of memory anymore,
38 and avoids extra copying. Figured I may as well go ahead and do
39 this since it was busted for dbus_message_lock to not return
40 failure on OOM, and dbus_message_write_header was totally
41 unchecked for OOM. Also fixed some random other bugs.
43 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
44 that strings are nul-terminated. Also, end_pos can be equal
45 to string length just not greater than, I think.
46 (_dbus_marshal_set_int32): new function
47 (_dbus_marshal_set_uint32): new function
48 (_dbus_marshal_set_string): new function
50 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
51 a warning, init timeout_list to NULL
52 (dbus_connection_send_message): don't use uninitialized variable
55 * dbus/dbus-string.c (_dbus_string_replace_len): new function
57 2003-01-26 Anders Carlsson <andersca@codefactory.se>
59 * bus/driver.c: (bus_driver_handle_hello),
60 (bus_driver_send_welcome_message):
63 2003-01-26 Anders Carlsson <andersca@codefactory.se>
65 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
66 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
67 (dbus_connection_unref):
68 * dbus/dbus-marshal.c: (_dbus_marshal_test):
69 * dbus/dbus-message.c: (dbus_message_unref),
72 (dbus_message_get_fields):
73 Remove debugging printout.
75 (_dbus_message_loader_return_buffer):
76 Don't store the header string.
81 2003-01-26 Richard Hult <rhult@codefactory.se>
83 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
84 the file descriptor list, since it can change under us.
86 2003-01-25 Anders Carlsson <andersca@codefactory.se>
88 * glib/dbus-gmain.c: (dbus_connection_prepare),
89 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
90 (remove_watch), (dbus_connection_hookup_with_g_main):
91 Rewrite the glib handling to use its own GSource instead of a
92 GIOChannel so we can catch messages put in the queue while waiting
95 2003-01-25 Anders Carlsson <andersca@codefactory.se>
98 * bus/connection.c: (connection_disconnect_handler),
99 (connection_watch_callback), (bus_connection_setup):
100 * bus/dispatch.c: (send_one_message),
101 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
102 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
104 * bus/driver.c: (bus_driver_send_service_deleted),
105 (bus_driver_send_service_created), (bus_driver_handle_hello),
106 (bus_driver_send_welcome_message),
107 (bus_driver_handle_list_services), (bus_driver_remove_connection),
108 (bus_driver_handle_message):
110 Refactor code, put the message dispatching in its own file. Use
111 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
114 2003-01-25 Anders Carlsson <andersca@codefactory.se>
116 * dbus/dbus-internals.h:
117 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
119 * dbus/dbus-message.c: (dbus_message_get_sender):
120 * dbus/dbus-message.h:
121 Implement dbus_message_get_sender.
123 * dbus/dbus-protocol.h:
124 Add message and service defines.
126 2003-01-25 Anders Carlsson <andersca@codefactory.se>
128 * dbus/dbus-connection.c: (dbus_connection_send_message):
129 * dbus/dbus-message-internal.h:
130 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
131 (dbus_message_write_header):
132 Remove _dbus_messag_unlock and don't set the client serial on a
133 message if one already exists.
135 2003-01-24 Havoc Pennington <hp@pobox.com>
137 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
140 * bus/driver.c (bus_driver_handle_list_services): fix a leak
143 2003-01-25 Anders Carlsson <andersca@codefactory.se>
145 * dbus/dbus-list.c: (alloc_link), (free_link):
146 Use a memory pool for the links.
148 2003-01-25 Anders Carlsson <andersca@codefactory.se>
150 * bus/connection.c: (bus_connection_foreach):
152 Add new bus_connection_foreach function.
154 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
155 Add function that broadcasts a message to all clients.
157 (bus_driver_send_service_created), (bus_driver_handle_hello),
158 (bus_driver_send_welcome_message),
159 (bus_driver_handle_list_services), (bus_driver_message_handler):
160 Implement functions that take care of listing services, and notifying
161 clients when new services are created.
163 * bus/services.c: (bus_services_list):
165 Add new function that returns an array of strings with the currently
170 Update copyright year.
172 2003-01-25 Anders Carlsson <andersca@codefactory.se>
174 * dbus/dbus-connection.c: (dbus_connection_send_message):
175 Unlock the message in case it was sent earlier.
177 (dbus_connection_send_message_with_reply_and_block):
178 Remove the reply message from the list.
180 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
181 Set array_len and new_pos correctly.
183 (_dbus_marshal_test):
186 * dbus/dbus-message-internal.h:
187 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
188 New function that returns the reply serial.
190 (_dbus_message_unlock):
191 New function that unlocks a message and resets its header.
193 (dbus_message_append_string_array),
194 (dbus_message_get_fields_valist),
195 (dbus_message_iter_get_field_type),
196 (dbus_message_iter_get_string_array),
197 (dbus_message_get_fields),
198 (dbus_message_append_fields_valist):
199 Handle string arrays.
201 (dbus_message_set_sender):
202 Make this function public since the bus daemon needs it.
204 (decode_header_data):
205 Set the reply serial to -1 initially.
207 * dbus/dbus-message.h:
208 Add dbus_message_set_sender.
210 2003-01-24 Havoc Pennington <hp@pobox.com>
212 * doc/dbus-specification.sgml: add some stuff
214 2003-01-22 Havoc Pennington <hp@pobox.com>
216 * doc/dbus-specification.sgml: Start to document the protocol.
218 2003-01-22 Havoc Pennington <hp@pobox.com>
220 * dbus/dbus-connection.c
221 (dbus_connection_send_message_with_reply_and_block): add some @todo
223 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
225 2003-01-21 Havoc Pennington <hp@pobox.com>
227 (patch untested because can't compile)
229 * bus/driver.c (create_unique_client_name): make this function
230 never recycle client names. Also, caller should initialize
233 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
235 2003-01-21 Anders Carlsson <andersca@codefactory.se>
237 * dbus/dbus-marshal.c: (_dbus_marshal_double),
238 (_dbus_marshal_int32), (_dbus_marshal_uint32),
239 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
240 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
241 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
242 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
243 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
244 * dbus/dbus-marshal.h:
245 * dbus/dbus-protocol.h:
246 Add support for marshalling and demarshalling integer, double
249 2003-01-21 Anders Carlsson <andersca@codefactory.se>
254 * bus/connection.c: (connection_disconnect_handler):
255 Remove the connection from the bus driver's list.
257 (connection_watch_callback): Dispatch messages.
259 (free_connection_data): Free connection name.
261 (bus_connection_setup): Add connection to the bus driver's list.
262 (bus_connection_remove_owned_service):
263 (bus_connection_set_name), (bus_connection_get_name):
264 Add functions for setting and getting the connection's name.
267 Add function headers.
269 * bus/driver.c: (create_unique_client_name),
270 (bus_driver_handle_hello_message),
271 (bus_driver_send_welcome_message), (bus_driver_message_handler),
272 (bus_driver_add_connection), (bus_driver_remove_connection):
275 * bus/services.c: (bus_service_free):
277 New file that handles communication and registreation with the bus
280 2003-01-21 Anders Carlsson <andersca@codefactory.se>
282 * dbus/dbus-connection.c: (dbus_connection_send_message):
283 Add a new client_serial parameter.
285 (dbus_connection_send_message_with_reply):
286 Remove a @todo since we've implemented the blocking function.
288 (dbus_connection_send_message_with_reply_and_block):
289 New function that sends a message and waits for a reply and
290 then returns the reply.
292 * dbus/dbus-connection.h:
295 * dbus/dbus-errors.c: (dbus_result_to_string):
296 * dbus/dbus-errors.h:
299 * dbus/dbus-message-internal.h:
300 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
301 (_dbus_message_set_sender), (dbus_message_write_header),
302 (dbus_message_new_reply), (decode_header_data),
303 (_dbus_message_loader_return_buffer), (_dbus_message_test):
304 * dbus/dbus-message.h:
305 Add new functions that set the reply serial and sender.
306 Also marshal and demarshal them correctly and add test.
308 * dbus/dbus-protocol.h:
309 Add new DBUS_MESSAGE_TYPE_SENDER.
312 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
313 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
314 (dbus_connection_hookup_with_g_main):
315 * glib/test-dbus-glib.c: (main):
316 Rewrite to use GIOChannel and remove the GSource crack.
318 * test/echo-client.c: (main):
319 * test/watch.c: (check_messages):
320 Update for changed APIs
322 2003-01-19 Anders Carlsson <andersca@codefactory.se>
324 * dbus/Makefile.am: Add dbus-timeout.[cħ]
326 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
327 Create a DBusTimeoutList.
328 (dbus_connection_set_timeout_functions): Add new function to
329 set timeout callbacks
331 * dbus/dbus-connection.h: Add public DBusTimeout API.
333 * dbus/dbus-message.c: (dbus_message_get_service):
334 * dbus/dbus-message.h: New function.
336 * dbus/dbus-server.c: Fix small doc typo.
338 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
340 2003-01-19 Anders Carlsson <andersca@codefactory.se>
342 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
343 of the string, just as long as specified.
345 2003-01-19 Havoc Pennington <hp@pobox.com>
347 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
350 * dbus/dbus-server.c (dbus_server_set_max_connections)
351 (dbus_server_get_max_connections, dbus_server_get_n_connections):
352 keep track of current number of connections, and add API for
353 setting a max (but haven't implemented enforcing the max yet)
355 2003-01-18 Havoc Pennington <hp@pobox.com>
357 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
358 reading/writing if read_watch != NULL or write_watch != NULL.
360 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
361 the message loader code to actually load message->header and
362 message->body into the newly-created message.
364 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
367 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
368 (dbus_connection_get_max_message_size)
369 (dbus_connection_set_max_live_messages_size)
370 (dbus_connection_get_max_live_messages_size): implement some
371 resource limitation functions
373 * dbus/dbus-resources.c: new file implementing some of the
374 resource limits stuff
376 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
377 missing docs, add @todo to handle OOM etc.
379 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
382 2003-01-18 Havoc Pennington <hp@pobox.com>
384 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
385 connection if it hasn't been already.
387 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
388 replace with DisconnectFunction.
390 2003-01-18 Havoc Pennington <hp@pobox.com>
392 Building --disable-verbose-mode --disable-asserts --disable-tests
393 cuts the library from 112K to 45K or so
395 * configure.in: check for varargs macro support,
396 add --enable-verbose-mode, --enable-asserts.
398 * dbus/dbus-internals.h (_dbus_assert): support
400 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
402 2003-01-18 Havoc Pennington <hp@pobox.com>
404 * dbus/dbus-test.c: include config.h so that tests actually run
406 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
407 so the failure mode when that assumption fails will be plenty
410 2003-01-18 Havoc Pennington <hp@pobox.com>
412 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
414 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
417 * test/Makefile.am: don't use special variable "TESTS" for echo-*
418 since we don't want to use those in make check
420 2003-01-15 Havoc Pennington <hp@redhat.com>
426 2003-01-15 Havoc Pennington <hp@redhat.com>
428 * test/Makefile.am: fix so that test source code ends up in the
429 distribution on make distcheck
431 2003-01-15 Havoc Pennington <hp@redhat.com>
437 2003-01-15 Havoc Pennington <hp@redhat.com>
439 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
440 fix build when --disable-tests
442 * Makefile.am (EXTRA_DIST): put HACKING in here
444 * HACKING: document procedure for making a tarball release.
446 2003-01-14 Anders Carlsson <andersca@codefactory.se>
448 * bus/connection.c: (connection_error_handler),
449 (bus_connection_setup):
450 * bus/main.c: (main):
451 Make sure that the DBusConnectionData struct is NULLed
452 out to prevent a segfault.
454 * dbus/dbus-errors.c: (dbus_result_to_string):
455 * dbus/dbus-errors.h:
456 * dbus/dbus-message.c: (dbus_message_get_fields),
457 (dbus_message_get_fields_valist), (_dbus_message_test):
458 * dbus/dbus-message.h:
459 Make dbus_message_get_fields return a result code so we can
460 track invalid fields as well as oom.
462 2003-01-11 Havoc Pennington <hp@pobox.com>
464 * configure.in: change --enable-test/--enable-ansi action-if-given
465 to enable_foo=$enableval instead of enable_foo=yes
467 2003-01-08 Havoc Pennington <hp@pobox.com>
469 * dbus/dbus-string.c (_dbus_string_align_length): new function
471 * dbus/dbus-test-main.c: move main() for test app here
473 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
474 symbol to run tests, because dbus-test isn't in the main
477 Code review nitpicks.
479 * dbus/dbus-message.c (dbus_message_write_header): add newlines
480 for people with narrow emacs ;-). Assert client_serial was filled
481 in. Assert message->name != NULL.
482 (dbus_message_append_fields): have "first_field_type" arg separate
483 from va list, needed for C++ binding that also uses varargs IIRC
484 and helps with type safety
485 (dbus_message_new): add @todo about using DBusString to store
486 service/name internally
487 (dbus_message_new): don't leak ->service and ->name on OOM later
489 (dbus_message_unref): free the service name
490 (dbus_message_get_fields): same change to varargs
491 i.e. first_field_type
492 (_dbus_message_loader_return_buffer): assert that the message data
493 is aligned (if not it's a bug in our code). Put in verbose griping
494 about why we set corrupted = TRUE.
495 (decode_header_data): add FIXME that char* is evil. Was going to
496 add FIXME about evil locale-specific string.h strncmp, but just
497 switched to wacky string-as-uint32 optimization. Move check for
498 "no room for field name" above get_const_data_len() to avoid
499 assertion failure in get_const_data_len if we have trailing 2
500 bytes or the like. Check for service and name fields being
501 provided twice. Don't leak service/name on error. Require field
502 names to be aligned to 4 bytes.
504 * dbus/dbus-marshal.c: move byte swap stuff to header
505 (_dbus_pack_int32): uscore-prefix
506 (_dbus_unpack_int32): uscore-prefix
507 (_dbus_unpack_uint32): export
508 (_dbus_demarshal_string): add @todo complaining about use of
510 (_dbus_marshal_get_field_end_pos): add @todo about bad error
511 handling allowing corrupt data to go unchecked
513 2003-01-08 Havoc Pennington <hp@redhat.com>
515 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
516 to the select() as needed for authentication. (should be using
517 _dbus_poll() not select, but for another day)
519 * dbus/dbus.h: include dbus/dbus-protocol.h
521 2003-01-08 Anders Carlsson <andersca@codefactory.se>
523 * dbus/Makefile.am (dbusinclude_HEADERS): Install
526 2003-01-08 Anders Carlsson <andersca@codefactory.se>
528 * dbus/dbus-internals.c: (_dbus_type_to_string):
529 New function that returns a string describing a type.
531 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
532 * dbus/dbus-marshal.h:
533 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
534 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
535 (dbus_message_iter_get_byte_array):
536 * dbus/dbus-message.h:
537 Add new convenience functions for appending and getting message fields.
538 Also add demarshalling routines for byte arrays.
540 2003-01-07 Anders Carlsson <andersca@codefactory.se>
542 * dbus/dbus-connection-internal.h:
543 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
544 (_dbus_connection_get_next_client_serial),
545 (dbus_connection_send_message):
546 * dbus/dbus-internals.h:
547 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
548 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
549 (_dbus_marshal_uint32), (_dbus_demarshal_double),
550 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
551 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
552 (_dbus_verbose_bytes), (_dbus_marshal_test):
553 * dbus/dbus-marshal.h:
554 * dbus/dbus-message-internal.h:
555 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
556 (dbus_message_write_header), (_dbus_message_lock),
557 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
558 (dbus_message_get_name), (dbus_message_append_int32),
559 (dbus_message_append_uint32), (dbus_message_append_double),
560 (dbus_message_append_string), (dbus_message_append_byte_array),
561 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
562 (dbus_message_iter_unref), (dbus_message_iter_has_next),
563 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
564 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
565 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
566 (decode_header_data), (_dbus_message_loader_return_buffer),
567 (message_iter_test), (_dbus_message_test):
568 * dbus/dbus-message.h:
569 * dbus/dbus-protocol.h:
570 * dbus/dbus-test.c: (main):
572 * glib/test-dbus-glib.c: (message_handler), (main):
573 * test/echo-client.c: (main):
574 * test/watch.c: (check_messages):
575 Make messages sendable and receivable for real.
577 2003-01-07 Anders Carlsson <andersca@codefactory.se>
579 * dbus/dbus-marshal.c: (_dbus_marshal_double),
580 (_dbus_marshal_string), (_dbus_marshal_byte_array):
581 * dbus/dbus-message.c: (dbus_message_append_int32),
582 (dbus_message_append_uint32), (dbus_message_append_double),
583 (dbus_message_append_string), (dbus_message_append_byte_array):
584 Handle OOM restoration.
586 2003-01-07 Anders Carlsson <andersca@codefactory.se>
588 * dbus/dbus-marshal.c: (_dbus_marshal_string),
589 (_dbus_demarshal_string), (_dbus_marshal_test):
590 * dbus/dbus-marshal.h:
591 * dbus/dbus-message.c: (dbus_message_get_name),
592 Document these functions.
594 (dbus_message_append_int32), (dbus_message_append_uint32),
595 (dbus_message_append_double), (dbus_message_append_string),
596 (dbus_message_append_byte_array):
597 * dbus/dbus-message.h:
598 Add functions for adding message fields of different types.
600 * dbus/dbus-protocol.h:
601 Add the different types.
603 2003-01-05 Havoc Pennington <hp@pobox.com>
605 * bus/connection.c: implement routines for handling connections,
606 first thing is keeping a list of owned services on each connection
607 and setting up watches etc.
609 * bus/services.c: implement a mapping from service names to lists
612 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
614 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
615 to use static mutexes for global data
617 * dbus/dbus-connection.c (dbus_connection_set_data): add new
618 collection of functions to set/get application-specific data
619 on the DBusConnection.
621 2003-01-04 Havoc Pennington <hp@pobox.com>
623 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
624 (_dbus_poll): new function
626 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
629 * bus/loop.c: initial code for the daemon main loop
631 2003-01-04 Havoc Pennington <hp@pobox.com>
633 * test/watch.c (error_handler): make it safe if the error handler
634 is called multiple times (if we s/error handler/disconnect
635 handler/ we should just guarantee it's called only once)
637 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
638 error handler on disconnect (it's quite possible we should
639 just change the error handler to a "disconnect handler," I'm
640 not sure we have any other meaningful errors)
642 * configure.in: check for getpwnam_r
644 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
645 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
646 mechanism as in SASL spec, using socket credentials
648 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
649 (_dbus_send_credentials_unix_socket): new function
651 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
653 (_dbus_write): only check errno if <0 returned
654 (_dbus_write_two): ditto
656 2003-01-02 Anders Carlsson <andersca@codefactory.se>
658 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
659 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
660 (_dbus_marshal_test):
661 * dbus/dbus-marshal.h:
662 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
663 to _dbus_marshal_utf8_string. Also fix some tests.
665 2002-12-28 Harri Porten <porten@kde.org>
667 * configure.in: added check for C++ compiler and a very cheesy
668 check for the Qt integration
670 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
672 * qt/Makefile.am: added
674 * qt/.cvsignore: added
676 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
677 latter, added #ifdef QT_THREAD_SUPPORT guard.
679 * dbus/Makefile.am: added missing headers for make dist
681 2002-12-28 Kristian Rietveld <kris@gtk.org>
683 * dbus/Makefile.am: fixup export-symbols-regex.
685 2002-12-27 Anders Carlsson <andersca@codefactory.se>
687 * acinclude.m4: Add this file and put the
688 PKG_CHECK_MODULE macro in it.
690 2002-12-27 Anders Carlsson <andersca@codefactory.se>
692 * dbus/dbus-marshal.c: (_dbus_marshal_string),
693 (_dbus_demarshal_double), (_dbus_demarshal_int32),
694 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
695 (_dbus_marshal_test):
696 Make the demarshalling routines align the pos argument.
697 Add string marshalling tests and fix the obvious bugs
700 2002-12-26 Havoc Pennington <hp@pobox.com>
702 * dbus/dbus-auth.c: fixes fixes fixes
704 * dbus/dbus-transport-unix.c: wire up support for
705 encoding/decoding data on the wire
707 * dbus/dbus-auth.c (_dbus_auth_encode_data)
708 (_dbus_auth_decode_data): append to target string
709 instead of nuking it.
711 2002-12-26 Havoc Pennington <hp@pobox.com>
713 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
714 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
717 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
718 avoid swap_bytes() overhead (ignoring possible assembly stuff for
719 now). Main point is because I wanted unpack_uint32 to implement
721 (_dbus_verbose_bytes): new function
723 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
725 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
726 mechanism to handle a corrupt message stream
727 (_dbus_message_loader_new): fix preallocation to only prealloc,
730 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
731 (_dbus_string_test): enhance tests for copy/move and fix the
734 * dbus/dbus-transport-unix.c: Hold references in more places to
735 avoid reentrancy problems
737 * dbus/dbus-transport.c: ditto
739 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
740 leak reference count in no-message case
742 * test/watch.c (do_mainloop): handle adding/removing watches
743 during iteration over the watches. Also, ref the connection/server
744 stored on a watch, so we don't try to mangle a destroyed one.
746 * dbus/dbus-transport-unix.c (do_authentication): perform
749 * dbus/dbus-auth.c (get_state): add a state
750 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
751 (_dbus_auth_get_unused_bytes): append the unused bytes
752 to the passed in string, rather than prepend
754 * dbus/dbus-transport.c (_dbus_transport_init_base): create
755 the auth conversation DBusAuth
757 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
758 (_dbus_transport_new_for_domain_socket): when creating a
759 transport, pass in whether it's a client-side or server-side
760 transport so we know which DBusAuth to create
762 2002-12-03 Havoc Pennington <hp@pobox.com>
764 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
765 _after_ finalizing the derived members
766 (unix_connection_set): unref watch if we fail to add it
768 * dbus/dbus-connection.c (dbus_connection_unref): delete the
769 transport first, so that the connection owned by the
770 transport will be valid as the transport finalizes.
772 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
773 if necessary, and remove watches from the connection.
775 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
777 2002-12-26 Anders Carlsson <andersca@codefactory.se>
779 * dbus/dbus-marshal.c: (_dbus_marshal_string),
780 (_dbus_demarshal_double), (_dbus_demarshal_int32),
781 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
782 (_dbus_marshal_test):
783 * dbus/dbus-marshal.h:
784 Add string marshal functions and have the demarshal functions
785 return the new position.
787 2002-12-25 Havoc Pennington <hp@pobox.com>
789 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
790 it is a simple protocol that just maps directly to SASL.
792 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
793 initial implementation, not actually used yet.
795 * dbus/dbus-string.c (_dbus_string_find): new function
796 (_dbus_string_equal): new function
797 (_dbus_string_base64_encode): new function
798 (_dbus_string_base64_decode): new function
800 2002-12-25 Anders Carlsson <andersca@codefactory.se>
803 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
804 (_dbus_marshal_int32), (_dbus_marshal_uint32),
805 (_dbus_demarshal_double), (_dbus_demarshal_int32),
806 (_dbus_demarshal_uint32), (_dbus_marshal_test):
807 * dbus/dbus-marshal.h:
808 * dbus/dbus-protocol.h:
809 * dbus/dbus-test.c: (main):
811 Add un-optimized marshalling/demarshalling routines.
813 2002-12-25 Harri Porten <porten@kde.org>
815 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
817 2002-12-24 Zack Rusin <zack@kde.org>
819 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
820 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
823 2002-12-24 Havoc Pennington <hp@pobox.com>
825 * glib/dbus-gthread.c: fix include
827 * glib/dbus-glib.h: rename DBusMessageHandler for now.
828 I think glib API needs to change, though, as you don't
829 want to use DBusMessageFunction, you want to use the
830 DBusMessageHandler object. Probably
831 dbus_connection_open_with_g_main_loop()
832 and dbus_connection_setup_g_main_loop() or something like that
833 (but think of better names...) that just create a connection
834 that has watch/timeout functions etc. already set up.
836 * dbus/dbus-connection.c
837 (dbus_connection_send_message_with_reply): new function just to
838 show how the message handler helps us deal with replies.
840 * dbus/dbus-list.c (_dbus_list_remove_last): new function
842 * dbus/dbus-string.c (_dbus_string_test): free a string that
845 * dbus/dbus-hash.c: use memory pools for the hash entries
846 (rebuild_table): be more paranoid about overflow, and
847 shrink table when we can
848 (_dbus_hash_test): reduce number of sprintfs and write
849 valid C89. Add tests for case where we grow and then
850 shrink the hash table.
852 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
854 * dbus/dbus-connection.c (dbus_connection_register_handler)
855 (dbus_connection_unregister_handler): new functions
857 * dbus/dbus-message.c (dbus_message_get_name): new
859 * dbus/dbus-list.c: fix docs typo
861 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
862 an object representing a handler for messages.
864 2002-12-16 Anders Carlsson <andersca@codefactory.se>
867 * glib/dbus-gthread.c: (dbus_gthread_init):
868 Don't use the gdbus prefix for public functions.
870 2002-12-16 Anders Carlsson <andersca@codefactory.se>
874 Add GLib checks and fixup .pc files
878 * glib/dbus-gmain.c: (gdbus_connection_prepare),
879 (gdbus_connection_check), (gdbus_connection_dispatch),
880 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
881 (dbus_connection_gsource_new):
882 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
883 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
884 * glib/test-dbus-glib.c: (message_handler), (main):
887 2002-12-15 Harri Porten <porten@kde.org>
889 * autogen.sh: check for libtoolize before attempting to use it
891 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
894 * .cvsignore: ignore more stamp files
896 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
898 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
899 without make install.
901 2002-12-15 Havoc Pennington <hp@pobox.com>
903 * dbus/dbus-threads.c: add thread stubs that a higher library
904 layer can fill in. e.g. the GLib wrapper might fill them in with
905 GThread stuff. We still need to use this thread API to
906 thread-safe-ize the library.
908 2002-12-12 Havoc Pennington <hp@pobox.com>
910 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
911 below new interfaces and include fewer system headers.
913 * dbus/dbus-sysdeps.c (_dbus_read): new function
914 (_dbus_write): new function
915 (_dbus_write_two): new function
916 (_dbus_connect_unix_socket): new function
917 (_dbus_listen_unix_socket): new function
919 * dbus/dbus-message-internal.h: change interfaces to use
922 2002-12-11 Havoc Pennington <hp@pobox.com>
924 * dbus/dbus-types.h: add dbus_unichar
926 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
928 * dbus/dbus-connection.c (dbus_connection_send_message): return
931 * dbus/dbus-transport.c: include dbus-watch.h
933 * dbus/dbus-connection.c: include dbus-message-internal.h
935 * HACKING: add file with coding guidelines stuff.
937 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
938 handling here, for security purposes (as in vsftpd). Not actually
939 using this class yet.
941 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
942 system/libc usage here, as in vsftpd, for ease of auditing (and
943 should also simplify portability). Haven't actually moved all the
944 system/libc usage into here yet.
946 2002-11-25 Havoc Pennington <hp@pobox.com>
948 * dbus/dbus-internals.c (_dbus_verbose): fix to not
949 always print the first verbose message.
951 2002-11-24 Havoc Pennington <hp@pobox.com>
953 * test/echo-client.c, test/echo-server.c: cheesy test
956 * configure.in (AC_CHECK_FUNCS): check for writev
958 * dbus/dbus-message.c (_dbus_message_get_network_data): new
961 * dbus/dbus-list.c (_dbus_list_foreach): new function
963 * dbus/dbus-internals.c (_dbus_verbose): new function
965 * dbus/dbus-server.c, dbus/dbus-server.h: public object
966 representing a server that listens for connections.
968 * dbus/.cvsignore: create
970 * dbus/dbus-errors.h, dbus/dbus-errors.c:
971 public API for reporting errors
973 * dbus/dbus-connection.h, dbus/dbus-connection.c:
974 public object representing a connection that
975 sends/receives messages. (Same object used for
976 both client and server.)
978 * dbus/dbus-transport.h, dbus/dbus-transport.c:
979 Basic abstraction for different kinds of stream
980 that we might read/write messages from.
982 2002-11-23 Havoc Pennington <hp@pobox.com>
984 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
987 * dbus/dbus-test.c (main): add list test, and include
988 dbus-test.h as intended
990 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
991 (_dbus_hash_table_remove_int): return value indicates
992 whether the entry existed to remove
994 * dbus/dbus-list.c: add linked list utility class,
997 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1000 2002-11-23 Havoc Pennington <hp@pobox.com>
1002 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1003 DBUS_END_DECLS to nothing, that should fix this once and for all
1005 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1007 * dbus/dbus-message.c, dbus/dbus-hash.c:
1008 add some missing @brief
1010 2002-11-23 Havoc Pennington <hp@pobox.com>
1012 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1013 to avoid confusing Doxygen
1015 * dbus/dbus-hash.c: @} not }@
1017 * dbus/dbus-message.c (struct DBusMessage): split out
1020 2002-11-23 Havoc Pennington <hp@pobox.com>
1022 * configure.in: pile on more warning flags if using gcc
1024 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1025 to document static functions
1027 * configure.in: add summary to end of configure so it
1028 looks nice and attractive
1030 * dbus/dbus-hash.c: finish implementation and write unit
1033 * configure.in: add --enable-tests to enable unit tests
1035 * dbus/dbus-test.c: test program to run unit tests
1036 for all files in dbus/*, initially runs a test for
1039 * dbus/dbus-internals.h: file to hold some internal utility stuff
1041 2002-11-22 Havoc Pennington <hp@redhat.com>
1043 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1044 "ported" away from Tcl
1046 * dbus/dbus-types.h: header for types such as dbus_bool_t
1048 2002-11-22 Havoc Pennington <hp@redhat.com>
1050 * dbus/dbus.h: fixups for doc warnings
1052 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1054 (QUIET): make it quiet so we can see warnings
1056 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1058 2002-11-22 Havoc Pennington <hp@redhat.com>
1060 * Makefile.am: include "Doxyfile" target in all-local
1062 * configure.in: generate the Doxyfile
1064 * Doxyfile.in: move Doxyfile here, so we can use
1065 configure to generate a Doxyfile with the right
1068 2002-11-22 Havoc Pennington <hp@redhat.com>
1070 * dbus/dbus-message.c: move inline docs into .c file
1072 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1073 so all docs are under doc/
1074 (MAN_EXTENSION): generate man pages. Use extension
1075 ".3dbus" which matches ".3qt" on my system,
1076 I guess this is OK, I don't know really.
1077 (FILE_PATTERNS): look for .c files not .h, makes sense
1080 2002-11-22 Havoc Pennington <hp@pobox.com>
1082 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1083 because any app can be a server, and any app can be a client,
1084 the bus is a special kind of server.
1086 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1088 * Doxyfile : adding. Still needs Makefile rules to be generated
1089 automatically (just run "doxygen" in the toplevel dir for now to
1092 * dbus/dbus-message.h : Adding sample docs (javadoc since
1093 resembles gtk-doc a little more)
1095 * dbus/dbus.h : Adding sample docs
1097 2002-11-21 Havoc Pennington <hp@redhat.com>
1099 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1100 so we can allow ourselves to include files directly,
1101 instead of having to use dbus.h
1103 * dbus/dbus.h: fill in
1105 * dbus/dbus-message.h: sketch out a sample header file.
1106 Include griping if you include it directly instead of
1109 * dbus/dbus-macros.h: new file with macros for extern "C",
1110 TRUE/FALSE, NULL, etc.
1112 * doc/file-boilerplate.c: put include guards in here
1114 2002-11-21 Havoc Pennington <hp@redhat.com>
1116 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1118 * COPYING: include the GPL as well, and license code
1119 under both AFL and GPL.
1121 2002-11-21 Havoc Pennington <hp@redhat.com>
1123 * acconfig.h: get rid of this
1125 * autogen.sh (run_configure): add --no-configure option
1127 * configure.in: remove AC_ARG_PROGRAM to make
1128 autoconf complain less. add AC_PREREQ.
1129 add AC_DEFINE third arg.
1131 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1134 Fix references so we can distcheck.
1136 2002-11-21 Havoc Pennington <hp@redhat.com>
1138 * Initial module creation