1 2003-01-08 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
4 to the select() as needed for authentication. (should be using
5 _dbus_poll() not select, but for another day)
7 * dbus/dbus.h: include dbus/dbus-protocol.h
9 2003-01-08 Anders Carlsson <andersca@codefactory.se>
11 * dbus/Makefile.am (dbusinclude_HEADERS): Install
14 2003-01-08 Anders Carlsson <andersca@codefactory.se>
16 * dbus/dbus-internals.c: (_dbus_type_to_string):
17 New function that returns a string describing a type.
19 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
20 * dbus/dbus-marshal.h:
21 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
22 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
23 (dbus_message_iter_get_byte_array):
24 * dbus/dbus-message.h:
25 Add new convenience functions for appending and getting message fields.
26 Also add demarshalling routines for byte arrays.
28 2003-01-07 Anders Carlsson <andersca@codefactory.se>
30 * dbus/dbus-connection-internal.h:
31 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
32 (_dbus_connection_get_next_client_serial),
33 (dbus_connection_send_message):
34 * dbus/dbus-internals.h:
35 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
36 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
37 (_dbus_marshal_uint32), (_dbus_demarshal_double),
38 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
39 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
40 (_dbus_verbose_bytes), (_dbus_marshal_test):
41 * dbus/dbus-marshal.h:
42 * dbus/dbus-message-internal.h:
43 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
44 (dbus_message_write_header), (_dbus_message_lock),
45 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
46 (dbus_message_get_name), (dbus_message_append_int32),
47 (dbus_message_append_uint32), (dbus_message_append_double),
48 (dbus_message_append_string), (dbus_message_append_byte_array),
49 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
50 (dbus_message_iter_unref), (dbus_message_iter_has_next),
51 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
52 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
53 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
54 (decode_header_data), (_dbus_message_loader_return_buffer),
55 (message_iter_test), (_dbus_message_test):
56 * dbus/dbus-message.h:
57 * dbus/dbus-protocol.h:
58 * dbus/dbus-test.c: (main):
60 * glib/test-dbus-glib.c: (message_handler), (main):
61 * test/echo-client.c: (main):
62 * test/watch.c: (check_messages):
63 Make messages sendable and receivable for real.
65 2003-01-07 Anders Carlsson <andersca@codefactory.se>
67 * dbus/dbus-marshal.c: (_dbus_marshal_double),
68 (_dbus_marshal_string), (_dbus_marshal_byte_array):
69 * dbus/dbus-message.c: (dbus_message_append_int32),
70 (dbus_message_append_uint32), (dbus_message_append_double),
71 (dbus_message_append_string), (dbus_message_append_byte_array):
72 Handle OOM restoration.
74 2003-01-07 Anders Carlsson <andersca@codefactory.se>
76 * dbus/dbus-marshal.c: (_dbus_marshal_string),
77 (_dbus_demarshal_string), (_dbus_marshal_test):
78 * dbus/dbus-marshal.h:
79 * dbus/dbus-message.c: (dbus_message_get_name),
80 Document these functions.
82 (dbus_message_append_int32), (dbus_message_append_uint32),
83 (dbus_message_append_double), (dbus_message_append_string),
84 (dbus_message_append_byte_array):
85 * dbus/dbus-message.h:
86 Add functions for adding message fields of different types.
88 * dbus/dbus-protocol.h:
89 Add the different types.
91 2003-01-05 Havoc Pennington <hp@pobox.com>
93 * bus/connection.c: implement routines for handling connections,
94 first thing is keeping a list of owned services on each connection
95 and setting up watches etc.
97 * bus/services.c: implement a mapping from service names to lists
100 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
102 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
103 to use static mutexes for global data
105 * dbus/dbus-connection.c (dbus_connection_set_data): add new
106 collection of functions to set/get application-specific data
107 on the DBusConnection.
109 2003-01-04 Havoc Pennington <hp@pobox.com>
111 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
112 (_dbus_poll): new function
114 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
117 * bus/loop.c: initial code for the daemon main loop
119 2003-01-04 Havoc Pennington <hp@pobox.com>
121 * test/watch.c (error_handler): make it safe if the error handler
122 is called multiple times (if we s/error handler/disconnect
123 handler/ we should just guarantee it's called only once)
125 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
126 error handler on disconnect (it's quite possible we should
127 just change the error handler to a "disconnect handler," I'm
128 not sure we have any other meaningful errors)
130 * configure.in: check for getpwnam_r
132 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
133 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
134 mechanism as in SASL spec, using socket credentials
136 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
137 (_dbus_send_credentials_unix_socket): new function
139 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
141 (_dbus_write): only check errno if <0 returned
142 (_dbus_write_two): ditto
144 2003-01-02 Anders Carlsson <andersca@codefactory.se>
146 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
147 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
148 (_dbus_marshal_test):
149 * dbus/dbus-marshal.h:
150 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
151 to _dbus_marshal_utf8_string. Also fix some tests.
153 2002-12-28 Harri Porten <porten@kde.org>
155 * configure.in: added check for C++ compiler and a very cheesy
156 check for the Qt integration
158 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
160 * qt/Makefile.am: added
162 * qt/.cvsignore: added
164 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
165 latter, added #ifdef QT_THREAD_SUPPORT guard.
167 * dbus/Makefile.am: added missing headers for make dist
169 2002-12-28 Kristian Rietveld <kris@gtk.org>
171 * dbus/Makefile.am: fixup export-symbols-regex.
173 2002-12-27 Anders Carlsson <andersca@codefactory.se>
175 * acinclude.m4: Add this file and put the
176 PKG_CHECK_MODULE macro in it.
178 2002-12-27 Anders Carlsson <andersca@codefactory.se>
180 * dbus/dbus-marshal.c: (_dbus_marshal_string),
181 (_dbus_demarshal_double), (_dbus_demarshal_int32),
182 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
183 (_dbus_marshal_test):
184 Make the demarshalling routines align the pos argument.
185 Add string marshalling tests and fix the obvious bugs
188 2002-12-26 Havoc Pennington <hp@pobox.com>
190 * dbus/dbus-auth.c: fixes fixes fixes
192 * dbus/dbus-transport-unix.c: wire up support for
193 encoding/decoding data on the wire
195 * dbus/dbus-auth.c (_dbus_auth_encode_data)
196 (_dbus_auth_decode_data): append to target string
197 instead of nuking it.
199 2002-12-26 Havoc Pennington <hp@pobox.com>
201 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
202 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
205 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
206 avoid swap_bytes() overhead (ignoring possible assembly stuff for
207 now). Main point is because I wanted unpack_uint32 to implement
209 (_dbus_verbose_bytes): new function
211 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
213 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
214 mechanism to handle a corrupt message stream
215 (_dbus_message_loader_new): fix preallocation to only prealloc,
218 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
219 (_dbus_string_test): enhance tests for copy/move and fix the
222 * dbus/dbus-transport-unix.c: Hold references in more places to
223 avoid reentrancy problems
225 * dbus/dbus-transport.c: ditto
227 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
228 leak reference count in no-message case
230 * test/watch.c (do_mainloop): handle adding/removing watches
231 during iteration over the watches. Also, ref the connection/server
232 stored on a watch, so we don't try to mangle a destroyed one.
234 * dbus/dbus-transport-unix.c (do_authentication): perform
237 * dbus/dbus-auth.c (get_state): add a state
238 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
239 (_dbus_auth_get_unused_bytes): append the unused bytes
240 to the passed in string, rather than prepend
242 * dbus/dbus-transport.c (_dbus_transport_init_base): create
243 the auth conversation DBusAuth
245 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
246 (_dbus_transport_new_for_domain_socket): when creating a
247 transport, pass in whether it's a client-side or server-side
248 transport so we know which DBusAuth to create
250 2002-12-03 Havoc Pennington <hp@pobox.com>
252 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
253 _after_ finalizing the derived members
254 (unix_connection_set): unref watch if we fail to add it
256 * dbus/dbus-connection.c (dbus_connection_unref): delete the
257 transport first, so that the connection owned by the
258 transport will be valid as the transport finalizes.
260 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
261 if necessary, and remove watches from the connection.
263 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
265 2002-12-26 Anders Carlsson <andersca@codefactory.se>
267 * dbus/dbus-marshal.c: (_dbus_marshal_string),
268 (_dbus_demarshal_double), (_dbus_demarshal_int32),
269 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
270 (_dbus_marshal_test):
271 * dbus/dbus-marshal.h:
272 Add string marshal functions and have the demarshal functions
273 return the new position.
275 2002-12-25 Havoc Pennington <hp@pobox.com>
277 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
278 it is a simple protocol that just maps directly to SASL.
280 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
281 initial implementation, not actually used yet.
283 * dbus/dbus-string.c (_dbus_string_find): new function
284 (_dbus_string_equal): new function
285 (_dbus_string_base64_encode): new function
286 (_dbus_string_base64_decode): new function
288 2002-12-25 Anders Carlsson <andersca@codefactory.se>
291 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
292 (_dbus_marshal_int32), (_dbus_marshal_uint32),
293 (_dbus_demarshal_double), (_dbus_demarshal_int32),
294 (_dbus_demarshal_uint32), (_dbus_marshal_test):
295 * dbus/dbus-marshal.h:
296 * dbus/dbus-protocol.h:
297 * dbus/dbus-test.c: (main):
299 Add un-optimized marshalling/demarshalling routines.
301 2002-12-25 Harri Porten <porten@kde.org>
303 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
305 2002-12-24 Zack Rusin <zack@kde.org>
307 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
308 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
311 2002-12-24 Havoc Pennington <hp@pobox.com>
313 * glib/dbus-gthread.c: fix include
315 * glib/dbus-glib.h: rename DBusMessageHandler for now.
316 I think glib API needs to change, though, as you don't
317 want to use DBusMessageFunction, you want to use the
318 DBusMessageHandler object. Probably
319 dbus_connection_open_with_g_main_loop()
320 and dbus_connection_setup_g_main_loop() or something like that
321 (but think of better names...) that just create a connection
322 that has watch/timeout functions etc. already set up.
324 * dbus/dbus-connection.c
325 (dbus_connection_send_message_with_reply): new function just to
326 show how the message handler helps us deal with replies.
328 * dbus/dbus-list.c (_dbus_list_remove_last): new function
330 * dbus/dbus-string.c (_dbus_string_test): free a string that
333 * dbus/dbus-hash.c: use memory pools for the hash entries
334 (rebuild_table): be more paranoid about overflow, and
335 shrink table when we can
336 (_dbus_hash_test): reduce number of sprintfs and write
337 valid C89. Add tests for case where we grow and then
338 shrink the hash table.
340 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
342 * dbus/dbus-connection.c (dbus_connection_register_handler)
343 (dbus_connection_unregister_handler): new functions
345 * dbus/dbus-message.c (dbus_message_get_name): new
347 * dbus/dbus-list.c: fix docs typo
349 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
350 an object representing a handler for messages.
352 2002-12-16 Anders Carlsson <andersca@codefactory.se>
355 * glib/dbus-gthread.c: (dbus_gthread_init):
356 Don't use the gdbus prefix for public functions.
358 2002-12-16 Anders Carlsson <andersca@codefactory.se>
362 Add GLib checks and fixup .pc files
366 * glib/dbus-gmain.c: (gdbus_connection_prepare),
367 (gdbus_connection_check), (gdbus_connection_dispatch),
368 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
369 (dbus_connection_gsource_new):
370 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
371 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
372 * glib/test-dbus-glib.c: (message_handler), (main):
375 2002-12-15 Harri Porten <porten@kde.org>
377 * autogen.sh: check for libtoolize before attempting to use it
379 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
382 * .cvsignore: ignore more stamp files
384 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
386 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
387 without make install.
389 2002-12-15 Havoc Pennington <hp@pobox.com>
391 * dbus/dbus-threads.c: add thread stubs that a higher library
392 layer can fill in. e.g. the GLib wrapper might fill them in with
393 GThread stuff. We still need to use this thread API to
394 thread-safe-ize the library.
396 2002-12-12 Havoc Pennington <hp@pobox.com>
398 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
399 below new interfaces and include fewer system headers.
401 * dbus/dbus-sysdeps.c (_dbus_read): new function
402 (_dbus_write): new function
403 (_dbus_write_two): new function
404 (_dbus_connect_unix_socket): new function
405 (_dbus_listen_unix_socket): new function
407 * dbus/dbus-message-internal.h: change interfaces to use
410 2002-12-11 Havoc Pennington <hp@pobox.com>
412 * dbus/dbus-types.h: add dbus_unichar
414 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
416 * dbus/dbus-connection.c (dbus_connection_send_message): return
419 * dbus/dbus-transport.c: include dbus-watch.h
421 * dbus/dbus-connection.c: include dbus-message-internal.h
423 * HACKING: add file with coding guidelines stuff.
425 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
426 handling here, for security purposes (as in vsftpd). Not actually
427 using this class yet.
429 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
430 system/libc usage here, as in vsftpd, for ease of auditing (and
431 should also simplify portability). Haven't actually moved all the
432 system/libc usage into here yet.
434 2002-11-25 Havoc Pennington <hp@pobox.com>
436 * dbus/dbus-internals.c (_dbus_verbose): fix to not
437 always print the first verbose message.
439 2002-11-24 Havoc Pennington <hp@pobox.com>
441 * test/echo-client.c, test/echo-server.c: cheesy test
444 * configure.in (AC_CHECK_FUNCS): check for writev
446 * dbus/dbus-message.c (_dbus_message_get_network_data): new
449 * dbus/dbus-list.c (_dbus_list_foreach): new function
451 * dbus/dbus-internals.c (_dbus_verbose): new function
453 * dbus/dbus-server.c, dbus/dbus-server.h: public object
454 representing a server that listens for connections.
456 * dbus/.cvsignore: create
458 * dbus/dbus-errors.h, dbus/dbus-errors.c:
459 public API for reporting errors
461 * dbus/dbus-connection.h, dbus/dbus-connection.c:
462 public object representing a connection that
463 sends/receives messages. (Same object used for
464 both client and server.)
466 * dbus/dbus-transport.h, dbus/dbus-transport.c:
467 Basic abstraction for different kinds of stream
468 that we might read/write messages from.
470 2002-11-23 Havoc Pennington <hp@pobox.com>
472 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
475 * dbus/dbus-test.c (main): add list test, and include
476 dbus-test.h as intended
478 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
479 (_dbus_hash_table_remove_int): return value indicates
480 whether the entry existed to remove
482 * dbus/dbus-list.c: add linked list utility class,
485 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
488 2002-11-23 Havoc Pennington <hp@pobox.com>
490 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
491 DBUS_END_DECLS to nothing, that should fix this once and for all
493 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
495 * dbus/dbus-message.c, dbus/dbus-hash.c:
496 add some missing @brief
498 2002-11-23 Havoc Pennington <hp@pobox.com>
500 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
501 to avoid confusing Doxygen
503 * dbus/dbus-hash.c: @} not }@
505 * dbus/dbus-message.c (struct DBusMessage): split out
508 2002-11-23 Havoc Pennington <hp@pobox.com>
510 * configure.in: pile on more warning flags if using gcc
512 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
513 to document static functions
515 * configure.in: add summary to end of configure so it
516 looks nice and attractive
518 * dbus/dbus-hash.c: finish implementation and write unit
521 * configure.in: add --enable-tests to enable unit tests
523 * dbus/dbus-test.c: test program to run unit tests
524 for all files in dbus/*, initially runs a test for
527 * dbus/dbus-internals.h: file to hold some internal utility stuff
529 2002-11-22 Havoc Pennington <hp@redhat.com>
531 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
532 "ported" away from Tcl
534 * dbus/dbus-types.h: header for types such as dbus_bool_t
536 2002-11-22 Havoc Pennington <hp@redhat.com>
538 * dbus/dbus.h: fixups for doc warnings
540 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
542 (QUIET): make it quiet so we can see warnings
544 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
546 2002-11-22 Havoc Pennington <hp@redhat.com>
548 * Makefile.am: include "Doxyfile" target in all-local
550 * configure.in: generate the Doxyfile
552 * Doxyfile.in: move Doxyfile here, so we can use
553 configure to generate a Doxyfile with the right
556 2002-11-22 Havoc Pennington <hp@redhat.com>
558 * dbus/dbus-message.c: move inline docs into .c file
560 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
561 so all docs are under doc/
562 (MAN_EXTENSION): generate man pages. Use extension
563 ".3dbus" which matches ".3qt" on my system,
564 I guess this is OK, I don't know really.
565 (FILE_PATTERNS): look for .c files not .h, makes sense
568 2002-11-22 Havoc Pennington <hp@pobox.com>
570 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
571 because any app can be a server, and any app can be a client,
572 the bus is a special kind of server.
574 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
576 * Doxyfile : adding. Still needs Makefile rules to be generated
577 automatically (just run "doxygen" in the toplevel dir for now to
580 * dbus/dbus-message.h : Adding sample docs (javadoc since
581 resembles gtk-doc a little more)
583 * dbus/dbus.h : Adding sample docs
585 2002-11-21 Havoc Pennington <hp@redhat.com>
587 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
588 so we can allow ourselves to include files directly,
589 instead of having to use dbus.h
591 * dbus/dbus.h: fill in
593 * dbus/dbus-message.h: sketch out a sample header file.
594 Include griping if you include it directly instead of
597 * dbus/dbus-macros.h: new file with macros for extern "C",
598 TRUE/FALSE, NULL, etc.
600 * doc/file-boilerplate.c: put include guards in here
602 2002-11-21 Havoc Pennington <hp@redhat.com>
604 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
606 * COPYING: include the GPL as well, and license code
607 under both AFL and GPL.
609 2002-11-21 Havoc Pennington <hp@redhat.com>
611 * acconfig.h: get rid of this
613 * autogen.sh (run_configure): add --no-configure option
615 * configure.in: remove AC_ARG_PROGRAM to make
616 autoconf complain less. add AC_PREREQ.
617 add AC_DEFINE third arg.
619 2002-11-21 Anders Carlsson <andersca@codefactory.se>
622 Fix references so we can distcheck.
624 2002-11-21 Havoc Pennington <hp@redhat.com>
626 * Initial module creation