1 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3 * dbus/dbus-list.c: (alloc_link), (free_link):
4 Use a memory pool for the links.
6 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8 * bus/connection.c: (bus_connection_foreach):
10 Add new bus_connection_foreach function.
12 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
13 Add function that broadcasts a message to all clients.
15 (bus_driver_send_service_created), (bus_driver_handle_hello),
16 (bus_driver_send_welcome_message),
17 (bus_driver_handle_list_services), (bus_driver_message_handler):
18 Implement functions that take care of listing services, and notifying
19 clients when new services are created.
21 * bus/services.c: (bus_services_list):
23 Add new function that returns an array of strings with the currently
28 Update copyright year.
30 2003-01-25 Anders Carlsson <andersca@codefactory.se>
32 * dbus/dbus-connection.c: (dbus_connection_send_message):
33 Unlock the message in case it was sent earlier.
35 (dbus_connection_send_message_with_reply_and_block):
36 Remove the reply message from the list.
38 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
39 Set array_len and new_pos correctly.
44 * dbus/dbus-message-internal.h:
45 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
46 New function that returns the reply serial.
48 (_dbus_message_unlock):
49 New function that unlocks a message and resets its header.
51 (dbus_message_append_string_array),
52 (dbus_message_get_fields_valist),
53 (dbus_message_iter_get_field_type),
54 (dbus_message_iter_get_string_array),
55 (dbus_message_get_fields),
56 (dbus_message_append_fields_valist):
59 (dbus_message_set_sender):
60 Make this function public since the bus daemon needs it.
63 Set the reply serial to -1 initially.
65 * dbus/dbus-message.h:
66 Add dbus_message_set_sender.
68 2003-01-24 Havoc Pennington <hp@pobox.com>
70 * doc/dbus-specification.sgml: add some stuff
72 2003-01-22 Havoc Pennington <hp@pobox.com>
74 * doc/dbus-specification.sgml: Start to document the protocol.
76 2003-01-22 Havoc Pennington <hp@pobox.com>
78 * dbus/dbus-connection.c
79 (dbus_connection_send_message_with_reply_and_block): add some @todo
81 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
83 2003-01-21 Havoc Pennington <hp@pobox.com>
85 (patch untested because can't compile)
87 * bus/driver.c (create_unique_client_name): make this function
88 never recycle client names. Also, caller should initialize
91 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
93 2003-01-21 Anders Carlsson <andersca@codefactory.se>
95 * dbus/dbus-marshal.c: (_dbus_marshal_double),
96 (_dbus_marshal_int32), (_dbus_marshal_uint32),
97 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
98 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
99 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
100 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
101 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
102 * dbus/dbus-marshal.h:
103 * dbus/dbus-protocol.h:
104 Add support for marshalling and demarshalling integer, double
107 2003-01-21 Anders Carlsson <andersca@codefactory.se>
112 * bus/connection.c: (connection_disconnect_handler):
113 Remove the connection from the bus driver's list.
115 (connection_watch_callback): Dispatch messages.
117 (free_connection_data): Free connection name.
119 (bus_connection_setup): Add connection to the bus driver's list.
120 (bus_connection_remove_owned_service):
121 (bus_connection_set_name), (bus_connection_get_name):
122 Add functions for setting and getting the connection's name.
125 Add function headers.
127 * bus/driver.c: (create_unique_client_name),
128 (bus_driver_handle_hello_message),
129 (bus_driver_send_welcome_message), (bus_driver_message_handler),
130 (bus_driver_add_connection), (bus_driver_remove_connection):
133 * bus/services.c: (bus_service_free):
135 New file that handles communication and registreation with the bus
138 2003-01-21 Anders Carlsson <andersca@codefactory.se>
140 * dbus/dbus-connection.c: (dbus_connection_send_message):
141 Add a new client_serial parameter.
143 (dbus_connection_send_message_with_reply):
144 Remove a @todo since we've implemented the blocking function.
146 (dbus_connection_send_message_with_reply_and_block):
147 New function that sends a message and waits for a reply and
148 then returns the reply.
150 * dbus/dbus-connection.h:
153 * dbus/dbus-errors.c: (dbus_result_to_string):
154 * dbus/dbus-errors.h:
157 * dbus/dbus-message-internal.h:
158 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
159 (_dbus_message_set_sender), (dbus_message_write_header),
160 (dbus_message_new_reply), (decode_header_data),
161 (_dbus_message_loader_return_buffer), (_dbus_message_test):
162 * dbus/dbus-message.h:
163 Add new functions that set the reply serial and sender.
164 Also marshal and demarshal them correctly and add test.
166 * dbus/dbus-protocol.h:
167 Add new DBUS_MESSAGE_TYPE_SENDER.
170 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
171 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
172 (dbus_connection_hookup_with_g_main):
173 * glib/test-dbus-glib.c: (main):
174 Rewrite to use GIOChannel and remove the GSource crack.
176 * test/echo-client.c: (main):
177 * test/watch.c: (check_messages):
178 Update for changed APIs
180 2003-01-19 Anders Carlsson <andersca@codefactory.se>
182 * dbus/Makefile.am: Add dbus-timeout.[cħ]
184 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
185 Create a DBusTimeoutList.
186 (dbus_connection_set_timeout_functions): Add new function to
187 set timeout callbacks
189 * dbus/dbus-connection.h: Add public DBusTimeout API.
191 * dbus/dbus-message.c: (dbus_message_get_service):
192 * dbus/dbus-message.h: New function.
194 * dbus/dbus-server.c: Fix small doc typo.
196 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
198 2003-01-19 Anders Carlsson <andersca@codefactory.se>
200 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
201 of the string, just as long as specified.
203 2003-01-19 Havoc Pennington <hp@pobox.com>
205 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
208 * dbus/dbus-server.c (dbus_server_set_max_connections)
209 (dbus_server_get_max_connections, dbus_server_get_n_connections):
210 keep track of current number of connections, and add API for
211 setting a max (but haven't implemented enforcing the max yet)
213 2003-01-18 Havoc Pennington <hp@pobox.com>
215 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
216 reading/writing if read_watch != NULL or write_watch != NULL.
218 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
219 the message loader code to actually load message->header and
220 message->body into the newly-created message.
222 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
225 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
226 (dbus_connection_get_max_message_size)
227 (dbus_connection_set_max_live_messages_size)
228 (dbus_connection_get_max_live_messages_size): implement some
229 resource limitation functions
231 * dbus/dbus-resources.c: new file implementing some of the
232 resource limits stuff
234 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
235 missing docs, add @todo to handle OOM etc.
237 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
240 2003-01-18 Havoc Pennington <hp@pobox.com>
242 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
243 connection if it hasn't been already.
245 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
246 replace with DisconnectFunction.
248 2003-01-18 Havoc Pennington <hp@pobox.com>
250 Building --disable-verbose-mode --disable-asserts --disable-tests
251 cuts the library from 112K to 45K or so
253 * configure.in: check for varargs macro support,
254 add --enable-verbose-mode, --enable-asserts.
256 * dbus/dbus-internals.h (_dbus_assert): support
258 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
260 2003-01-18 Havoc Pennington <hp@pobox.com>
262 * dbus/dbus-test.c: include config.h so that tests actually run
264 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
265 so the failure mode when that assumption fails will be plenty
268 2003-01-18 Havoc Pennington <hp@pobox.com>
270 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
272 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
275 * test/Makefile.am: don't use special variable "TESTS" for echo-*
276 since we don't want to use those in make check
278 2003-01-15 Havoc Pennington <hp@redhat.com>
284 2003-01-15 Havoc Pennington <hp@redhat.com>
286 * test/Makefile.am: fix so that test source code ends up in the
287 distribution on make distcheck
289 2003-01-15 Havoc Pennington <hp@redhat.com>
295 2003-01-15 Havoc Pennington <hp@redhat.com>
297 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
298 fix build when --disable-tests
300 * Makefile.am (EXTRA_DIST): put HACKING in here
302 * HACKING: document procedure for making a tarball release.
304 2003-01-14 Anders Carlsson <andersca@codefactory.se>
306 * bus/connection.c: (connection_error_handler),
307 (bus_connection_setup):
308 * bus/main.c: (main):
309 Make sure that the DBusConnectionData struct is NULLed
310 out to prevent a segfault.
312 * dbus/dbus-errors.c: (dbus_result_to_string):
313 * dbus/dbus-errors.h:
314 * dbus/dbus-message.c: (dbus_message_get_fields),
315 (dbus_message_get_fields_valist), (_dbus_message_test):
316 * dbus/dbus-message.h:
317 Make dbus_message_get_fields return a result code so we can
318 track invalid fields as well as oom.
320 2003-01-11 Havoc Pennington <hp@pobox.com>
322 * configure.in: change --enable-test/--enable-ansi action-if-given
323 to enable_foo=$enableval instead of enable_foo=yes
325 2003-01-08 Havoc Pennington <hp@pobox.com>
327 * dbus/dbus-string.c (_dbus_string_align_length): new function
329 * dbus/dbus-test-main.c: move main() for test app here
331 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
332 symbol to run tests, because dbus-test isn't in the main
335 Code review nitpicks.
337 * dbus/dbus-message.c (dbus_message_write_header): add newlines
338 for people with narrow emacs ;-). Assert client_serial was filled
339 in. Assert message->name != NULL.
340 (dbus_message_append_fields): have "first_field_type" arg separate
341 from va list, needed for C++ binding that also uses varargs IIRC
342 and helps with type safety
343 (dbus_message_new): add @todo about using DBusString to store
344 service/name internally
345 (dbus_message_new): don't leak ->service and ->name on OOM later
347 (dbus_message_unref): free the service name
348 (dbus_message_get_fields): same change to varargs
349 i.e. first_field_type
350 (_dbus_message_loader_return_buffer): assert that the message data
351 is aligned (if not it's a bug in our code). Put in verbose griping
352 about why we set corrupted = TRUE.
353 (decode_header_data): add FIXME that char* is evil. Was going to
354 add FIXME about evil locale-specific string.h strncmp, but just
355 switched to wacky string-as-uint32 optimization. Move check for
356 "no room for field name" above get_const_data_len() to avoid
357 assertion failure in get_const_data_len if we have trailing 2
358 bytes or the like. Check for service and name fields being
359 provided twice. Don't leak service/name on error. Require field
360 names to be aligned to 4 bytes.
362 * dbus/dbus-marshal.c: move byte swap stuff to header
363 (_dbus_pack_int32): uscore-prefix
364 (_dbus_unpack_int32): uscore-prefix
365 (_dbus_unpack_uint32): export
366 (_dbus_demarshal_string): add @todo complaining about use of
368 (_dbus_marshal_get_field_end_pos): add @todo about bad error
369 handling allowing corrupt data to go unchecked
371 2003-01-08 Havoc Pennington <hp@redhat.com>
373 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
374 to the select() as needed for authentication. (should be using
375 _dbus_poll() not select, but for another day)
377 * dbus/dbus.h: include dbus/dbus-protocol.h
379 2003-01-08 Anders Carlsson <andersca@codefactory.se>
381 * dbus/Makefile.am (dbusinclude_HEADERS): Install
384 2003-01-08 Anders Carlsson <andersca@codefactory.se>
386 * dbus/dbus-internals.c: (_dbus_type_to_string):
387 New function that returns a string describing a type.
389 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
390 * dbus/dbus-marshal.h:
391 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
392 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
393 (dbus_message_iter_get_byte_array):
394 * dbus/dbus-message.h:
395 Add new convenience functions for appending and getting message fields.
396 Also add demarshalling routines for byte arrays.
398 2003-01-07 Anders Carlsson <andersca@codefactory.se>
400 * dbus/dbus-connection-internal.h:
401 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
402 (_dbus_connection_get_next_client_serial),
403 (dbus_connection_send_message):
404 * dbus/dbus-internals.h:
405 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
406 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
407 (_dbus_marshal_uint32), (_dbus_demarshal_double),
408 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
409 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
410 (_dbus_verbose_bytes), (_dbus_marshal_test):
411 * dbus/dbus-marshal.h:
412 * dbus/dbus-message-internal.h:
413 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
414 (dbus_message_write_header), (_dbus_message_lock),
415 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
416 (dbus_message_get_name), (dbus_message_append_int32),
417 (dbus_message_append_uint32), (dbus_message_append_double),
418 (dbus_message_append_string), (dbus_message_append_byte_array),
419 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
420 (dbus_message_iter_unref), (dbus_message_iter_has_next),
421 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
422 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
423 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
424 (decode_header_data), (_dbus_message_loader_return_buffer),
425 (message_iter_test), (_dbus_message_test):
426 * dbus/dbus-message.h:
427 * dbus/dbus-protocol.h:
428 * dbus/dbus-test.c: (main):
430 * glib/test-dbus-glib.c: (message_handler), (main):
431 * test/echo-client.c: (main):
432 * test/watch.c: (check_messages):
433 Make messages sendable and receivable for real.
435 2003-01-07 Anders Carlsson <andersca@codefactory.se>
437 * dbus/dbus-marshal.c: (_dbus_marshal_double),
438 (_dbus_marshal_string), (_dbus_marshal_byte_array):
439 * dbus/dbus-message.c: (dbus_message_append_int32),
440 (dbus_message_append_uint32), (dbus_message_append_double),
441 (dbus_message_append_string), (dbus_message_append_byte_array):
442 Handle OOM restoration.
444 2003-01-07 Anders Carlsson <andersca@codefactory.se>
446 * dbus/dbus-marshal.c: (_dbus_marshal_string),
447 (_dbus_demarshal_string), (_dbus_marshal_test):
448 * dbus/dbus-marshal.h:
449 * dbus/dbus-message.c: (dbus_message_get_name),
450 Document these functions.
452 (dbus_message_append_int32), (dbus_message_append_uint32),
453 (dbus_message_append_double), (dbus_message_append_string),
454 (dbus_message_append_byte_array):
455 * dbus/dbus-message.h:
456 Add functions for adding message fields of different types.
458 * dbus/dbus-protocol.h:
459 Add the different types.
461 2003-01-05 Havoc Pennington <hp@pobox.com>
463 * bus/connection.c: implement routines for handling connections,
464 first thing is keeping a list of owned services on each connection
465 and setting up watches etc.
467 * bus/services.c: implement a mapping from service names to lists
470 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
472 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
473 to use static mutexes for global data
475 * dbus/dbus-connection.c (dbus_connection_set_data): add new
476 collection of functions to set/get application-specific data
477 on the DBusConnection.
479 2003-01-04 Havoc Pennington <hp@pobox.com>
481 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
482 (_dbus_poll): new function
484 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
487 * bus/loop.c: initial code for the daemon main loop
489 2003-01-04 Havoc Pennington <hp@pobox.com>
491 * test/watch.c (error_handler): make it safe if the error handler
492 is called multiple times (if we s/error handler/disconnect
493 handler/ we should just guarantee it's called only once)
495 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
496 error handler on disconnect (it's quite possible we should
497 just change the error handler to a "disconnect handler," I'm
498 not sure we have any other meaningful errors)
500 * configure.in: check for getpwnam_r
502 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
503 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
504 mechanism as in SASL spec, using socket credentials
506 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
507 (_dbus_send_credentials_unix_socket): new function
509 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
511 (_dbus_write): only check errno if <0 returned
512 (_dbus_write_two): ditto
514 2003-01-02 Anders Carlsson <andersca@codefactory.se>
516 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
517 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
518 (_dbus_marshal_test):
519 * dbus/dbus-marshal.h:
520 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
521 to _dbus_marshal_utf8_string. Also fix some tests.
523 2002-12-28 Harri Porten <porten@kde.org>
525 * configure.in: added check for C++ compiler and a very cheesy
526 check for the Qt integration
528 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
530 * qt/Makefile.am: added
532 * qt/.cvsignore: added
534 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
535 latter, added #ifdef QT_THREAD_SUPPORT guard.
537 * dbus/Makefile.am: added missing headers for make dist
539 2002-12-28 Kristian Rietveld <kris@gtk.org>
541 * dbus/Makefile.am: fixup export-symbols-regex.
543 2002-12-27 Anders Carlsson <andersca@codefactory.se>
545 * acinclude.m4: Add this file and put the
546 PKG_CHECK_MODULE macro in it.
548 2002-12-27 Anders Carlsson <andersca@codefactory.se>
550 * dbus/dbus-marshal.c: (_dbus_marshal_string),
551 (_dbus_demarshal_double), (_dbus_demarshal_int32),
552 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
553 (_dbus_marshal_test):
554 Make the demarshalling routines align the pos argument.
555 Add string marshalling tests and fix the obvious bugs
558 2002-12-26 Havoc Pennington <hp@pobox.com>
560 * dbus/dbus-auth.c: fixes fixes fixes
562 * dbus/dbus-transport-unix.c: wire up support for
563 encoding/decoding data on the wire
565 * dbus/dbus-auth.c (_dbus_auth_encode_data)
566 (_dbus_auth_decode_data): append to target string
567 instead of nuking it.
569 2002-12-26 Havoc Pennington <hp@pobox.com>
571 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
572 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
575 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
576 avoid swap_bytes() overhead (ignoring possible assembly stuff for
577 now). Main point is because I wanted unpack_uint32 to implement
579 (_dbus_verbose_bytes): new function
581 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
583 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
584 mechanism to handle a corrupt message stream
585 (_dbus_message_loader_new): fix preallocation to only prealloc,
588 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
589 (_dbus_string_test): enhance tests for copy/move and fix the
592 * dbus/dbus-transport-unix.c: Hold references in more places to
593 avoid reentrancy problems
595 * dbus/dbus-transport.c: ditto
597 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
598 leak reference count in no-message case
600 * test/watch.c (do_mainloop): handle adding/removing watches
601 during iteration over the watches. Also, ref the connection/server
602 stored on a watch, so we don't try to mangle a destroyed one.
604 * dbus/dbus-transport-unix.c (do_authentication): perform
607 * dbus/dbus-auth.c (get_state): add a state
608 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
609 (_dbus_auth_get_unused_bytes): append the unused bytes
610 to the passed in string, rather than prepend
612 * dbus/dbus-transport.c (_dbus_transport_init_base): create
613 the auth conversation DBusAuth
615 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
616 (_dbus_transport_new_for_domain_socket): when creating a
617 transport, pass in whether it's a client-side or server-side
618 transport so we know which DBusAuth to create
620 2002-12-03 Havoc Pennington <hp@pobox.com>
622 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
623 _after_ finalizing the derived members
624 (unix_connection_set): unref watch if we fail to add it
626 * dbus/dbus-connection.c (dbus_connection_unref): delete the
627 transport first, so that the connection owned by the
628 transport will be valid as the transport finalizes.
630 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
631 if necessary, and remove watches from the connection.
633 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
635 2002-12-26 Anders Carlsson <andersca@codefactory.se>
637 * dbus/dbus-marshal.c: (_dbus_marshal_string),
638 (_dbus_demarshal_double), (_dbus_demarshal_int32),
639 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
640 (_dbus_marshal_test):
641 * dbus/dbus-marshal.h:
642 Add string marshal functions and have the demarshal functions
643 return the new position.
645 2002-12-25 Havoc Pennington <hp@pobox.com>
647 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
648 it is a simple protocol that just maps directly to SASL.
650 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
651 initial implementation, not actually used yet.
653 * dbus/dbus-string.c (_dbus_string_find): new function
654 (_dbus_string_equal): new function
655 (_dbus_string_base64_encode): new function
656 (_dbus_string_base64_decode): new function
658 2002-12-25 Anders Carlsson <andersca@codefactory.se>
661 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
662 (_dbus_marshal_int32), (_dbus_marshal_uint32),
663 (_dbus_demarshal_double), (_dbus_demarshal_int32),
664 (_dbus_demarshal_uint32), (_dbus_marshal_test):
665 * dbus/dbus-marshal.h:
666 * dbus/dbus-protocol.h:
667 * dbus/dbus-test.c: (main):
669 Add un-optimized marshalling/demarshalling routines.
671 2002-12-25 Harri Porten <porten@kde.org>
673 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
675 2002-12-24 Zack Rusin <zack@kde.org>
677 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
678 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
681 2002-12-24 Havoc Pennington <hp@pobox.com>
683 * glib/dbus-gthread.c: fix include
685 * glib/dbus-glib.h: rename DBusMessageHandler for now.
686 I think glib API needs to change, though, as you don't
687 want to use DBusMessageFunction, you want to use the
688 DBusMessageHandler object. Probably
689 dbus_connection_open_with_g_main_loop()
690 and dbus_connection_setup_g_main_loop() or something like that
691 (but think of better names...) that just create a connection
692 that has watch/timeout functions etc. already set up.
694 * dbus/dbus-connection.c
695 (dbus_connection_send_message_with_reply): new function just to
696 show how the message handler helps us deal with replies.
698 * dbus/dbus-list.c (_dbus_list_remove_last): new function
700 * dbus/dbus-string.c (_dbus_string_test): free a string that
703 * dbus/dbus-hash.c: use memory pools for the hash entries
704 (rebuild_table): be more paranoid about overflow, and
705 shrink table when we can
706 (_dbus_hash_test): reduce number of sprintfs and write
707 valid C89. Add tests for case where we grow and then
708 shrink the hash table.
710 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
712 * dbus/dbus-connection.c (dbus_connection_register_handler)
713 (dbus_connection_unregister_handler): new functions
715 * dbus/dbus-message.c (dbus_message_get_name): new
717 * dbus/dbus-list.c: fix docs typo
719 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
720 an object representing a handler for messages.
722 2002-12-16 Anders Carlsson <andersca@codefactory.se>
725 * glib/dbus-gthread.c: (dbus_gthread_init):
726 Don't use the gdbus prefix for public functions.
728 2002-12-16 Anders Carlsson <andersca@codefactory.se>
732 Add GLib checks and fixup .pc files
736 * glib/dbus-gmain.c: (gdbus_connection_prepare),
737 (gdbus_connection_check), (gdbus_connection_dispatch),
738 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
739 (dbus_connection_gsource_new):
740 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
741 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
742 * glib/test-dbus-glib.c: (message_handler), (main):
745 2002-12-15 Harri Porten <porten@kde.org>
747 * autogen.sh: check for libtoolize before attempting to use it
749 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
752 * .cvsignore: ignore more stamp files
754 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
756 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
757 without make install.
759 2002-12-15 Havoc Pennington <hp@pobox.com>
761 * dbus/dbus-threads.c: add thread stubs that a higher library
762 layer can fill in. e.g. the GLib wrapper might fill them in with
763 GThread stuff. We still need to use this thread API to
764 thread-safe-ize the library.
766 2002-12-12 Havoc Pennington <hp@pobox.com>
768 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
769 below new interfaces and include fewer system headers.
771 * dbus/dbus-sysdeps.c (_dbus_read): new function
772 (_dbus_write): new function
773 (_dbus_write_two): new function
774 (_dbus_connect_unix_socket): new function
775 (_dbus_listen_unix_socket): new function
777 * dbus/dbus-message-internal.h: change interfaces to use
780 2002-12-11 Havoc Pennington <hp@pobox.com>
782 * dbus/dbus-types.h: add dbus_unichar
784 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
786 * dbus/dbus-connection.c (dbus_connection_send_message): return
789 * dbus/dbus-transport.c: include dbus-watch.h
791 * dbus/dbus-connection.c: include dbus-message-internal.h
793 * HACKING: add file with coding guidelines stuff.
795 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
796 handling here, for security purposes (as in vsftpd). Not actually
797 using this class yet.
799 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
800 system/libc usage here, as in vsftpd, for ease of auditing (and
801 should also simplify portability). Haven't actually moved all the
802 system/libc usage into here yet.
804 2002-11-25 Havoc Pennington <hp@pobox.com>
806 * dbus/dbus-internals.c (_dbus_verbose): fix to not
807 always print the first verbose message.
809 2002-11-24 Havoc Pennington <hp@pobox.com>
811 * test/echo-client.c, test/echo-server.c: cheesy test
814 * configure.in (AC_CHECK_FUNCS): check for writev
816 * dbus/dbus-message.c (_dbus_message_get_network_data): new
819 * dbus/dbus-list.c (_dbus_list_foreach): new function
821 * dbus/dbus-internals.c (_dbus_verbose): new function
823 * dbus/dbus-server.c, dbus/dbus-server.h: public object
824 representing a server that listens for connections.
826 * dbus/.cvsignore: create
828 * dbus/dbus-errors.h, dbus/dbus-errors.c:
829 public API for reporting errors
831 * dbus/dbus-connection.h, dbus/dbus-connection.c:
832 public object representing a connection that
833 sends/receives messages. (Same object used for
834 both client and server.)
836 * dbus/dbus-transport.h, dbus/dbus-transport.c:
837 Basic abstraction for different kinds of stream
838 that we might read/write messages from.
840 2002-11-23 Havoc Pennington <hp@pobox.com>
842 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
845 * dbus/dbus-test.c (main): add list test, and include
846 dbus-test.h as intended
848 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
849 (_dbus_hash_table_remove_int): return value indicates
850 whether the entry existed to remove
852 * dbus/dbus-list.c: add linked list utility class,
855 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
858 2002-11-23 Havoc Pennington <hp@pobox.com>
860 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
861 DBUS_END_DECLS to nothing, that should fix this once and for all
863 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
865 * dbus/dbus-message.c, dbus/dbus-hash.c:
866 add some missing @brief
868 2002-11-23 Havoc Pennington <hp@pobox.com>
870 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
871 to avoid confusing Doxygen
873 * dbus/dbus-hash.c: @} not }@
875 * dbus/dbus-message.c (struct DBusMessage): split out
878 2002-11-23 Havoc Pennington <hp@pobox.com>
880 * configure.in: pile on more warning flags if using gcc
882 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
883 to document static functions
885 * configure.in: add summary to end of configure so it
886 looks nice and attractive
888 * dbus/dbus-hash.c: finish implementation and write unit
891 * configure.in: add --enable-tests to enable unit tests
893 * dbus/dbus-test.c: test program to run unit tests
894 for all files in dbus/*, initially runs a test for
897 * dbus/dbus-internals.h: file to hold some internal utility stuff
899 2002-11-22 Havoc Pennington <hp@redhat.com>
901 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
902 "ported" away from Tcl
904 * dbus/dbus-types.h: header for types such as dbus_bool_t
906 2002-11-22 Havoc Pennington <hp@redhat.com>
908 * dbus/dbus.h: fixups for doc warnings
910 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
912 (QUIET): make it quiet so we can see warnings
914 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
916 2002-11-22 Havoc Pennington <hp@redhat.com>
918 * Makefile.am: include "Doxyfile" target in all-local
920 * configure.in: generate the Doxyfile
922 * Doxyfile.in: move Doxyfile here, so we can use
923 configure to generate a Doxyfile with the right
926 2002-11-22 Havoc Pennington <hp@redhat.com>
928 * dbus/dbus-message.c: move inline docs into .c file
930 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
931 so all docs are under doc/
932 (MAN_EXTENSION): generate man pages. Use extension
933 ".3dbus" which matches ".3qt" on my system,
934 I guess this is OK, I don't know really.
935 (FILE_PATTERNS): look for .c files not .h, makes sense
938 2002-11-22 Havoc Pennington <hp@pobox.com>
940 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
941 because any app can be a server, and any app can be a client,
942 the bus is a special kind of server.
944 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
946 * Doxyfile : adding. Still needs Makefile rules to be generated
947 automatically (just run "doxygen" in the toplevel dir for now to
950 * dbus/dbus-message.h : Adding sample docs (javadoc since
951 resembles gtk-doc a little more)
953 * dbus/dbus.h : Adding sample docs
955 2002-11-21 Havoc Pennington <hp@redhat.com>
957 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
958 so we can allow ourselves to include files directly,
959 instead of having to use dbus.h
961 * dbus/dbus.h: fill in
963 * dbus/dbus-message.h: sketch out a sample header file.
964 Include griping if you include it directly instead of
967 * dbus/dbus-macros.h: new file with macros for extern "C",
968 TRUE/FALSE, NULL, etc.
970 * doc/file-boilerplate.c: put include guards in here
972 2002-11-21 Havoc Pennington <hp@redhat.com>
974 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
976 * COPYING: include the GPL as well, and license code
977 under both AFL and GPL.
979 2002-11-21 Havoc Pennington <hp@redhat.com>
981 * acconfig.h: get rid of this
983 * autogen.sh (run_configure): add --no-configure option
985 * configure.in: remove AC_ARG_PROGRAM to make
986 autoconf complain less. add AC_PREREQ.
987 add AC_DEFINE third arg.
989 2002-11-21 Anders Carlsson <andersca@codefactory.se>
992 Fix references so we can distcheck.
994 2002-11-21 Havoc Pennington <hp@redhat.com>
996 * Initial module creation