1 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8 * dbus/dbus-internals.c: (_dbus_type_to_string):
9 New function that returns a string describing a type.
11 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
12 * dbus/dbus-marshal.h:
13 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
14 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
15 (dbus_message_iter_get_byte_array):
16 * dbus/dbus-message.h:
17 Add new convenience functions for appending and getting message fields.
18 Also add demarshalling routines for byte arrays.
20 2003-01-07 Anders Carlsson <andersca@codefactory.se>
22 * dbus/dbus-connection-internal.h:
23 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
24 (_dbus_connection_get_next_client_serial),
25 (dbus_connection_send_message):
26 * dbus/dbus-internals.h:
27 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
28 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
29 (_dbus_marshal_uint32), (_dbus_demarshal_double),
30 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
31 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
32 (_dbus_verbose_bytes), (_dbus_marshal_test):
33 * dbus/dbus-marshal.h:
34 * dbus/dbus-message-internal.h:
35 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
36 (dbus_message_write_header), (_dbus_message_lock),
37 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
38 (dbus_message_get_name), (dbus_message_append_int32),
39 (dbus_message_append_uint32), (dbus_message_append_double),
40 (dbus_message_append_string), (dbus_message_append_byte_array),
41 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
42 (dbus_message_iter_unref), (dbus_message_iter_has_next),
43 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
44 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
45 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
46 (decode_header_data), (_dbus_message_loader_return_buffer),
47 (message_iter_test), (_dbus_message_test):
48 * dbus/dbus-message.h:
49 * dbus/dbus-protocol.h:
50 * dbus/dbus-test.c: (main):
52 * glib/test-dbus-glib.c: (message_handler), (main):
53 * test/echo-client.c: (main):
54 * test/watch.c: (check_messages):
55 Make messages sendable and receivable for real.
57 2003-01-07 Anders Carlsson <andersca@codefactory.se>
59 * dbus/dbus-marshal.c: (_dbus_marshal_double),
60 (_dbus_marshal_string), (_dbus_marshal_byte_array):
61 * dbus/dbus-message.c: (dbus_message_append_int32),
62 (dbus_message_append_uint32), (dbus_message_append_double),
63 (dbus_message_append_string), (dbus_message_append_byte_array):
64 Handle OOM restoration.
66 2003-01-07 Anders Carlsson <andersca@codefactory.se>
68 * dbus/dbus-marshal.c: (_dbus_marshal_string),
69 (_dbus_demarshal_string), (_dbus_marshal_test):
70 * dbus/dbus-marshal.h:
71 * dbus/dbus-message.c: (dbus_message_get_name),
72 Document these functions.
74 (dbus_message_append_int32), (dbus_message_append_uint32),
75 (dbus_message_append_double), (dbus_message_append_string),
76 (dbus_message_append_byte_array):
77 * dbus/dbus-message.h:
78 Add functions for adding message fields of different types.
80 * dbus/dbus-protocol.h:
81 Add the different types.
83 2003-01-05 Havoc Pennington <hp@pobox.com>
85 * bus/connection.c: implement routines for handling connections,
86 first thing is keeping a list of owned services on each connection
87 and setting up watches etc.
89 * bus/services.c: implement a mapping from service names to lists
92 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
94 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
95 to use static mutexes for global data
97 * dbus/dbus-connection.c (dbus_connection_set_data): add new
98 collection of functions to set/get application-specific data
99 on the DBusConnection.
101 2003-01-04 Havoc Pennington <hp@pobox.com>
103 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
104 (_dbus_poll): new function
106 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
109 * bus/loop.c: initial code for the daemon main loop
111 2003-01-04 Havoc Pennington <hp@pobox.com>
113 * test/watch.c (error_handler): make it safe if the error handler
114 is called multiple times (if we s/error handler/disconnect
115 handler/ we should just guarantee it's called only once)
117 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
118 error handler on disconnect (it's quite possible we should
119 just change the error handler to a "disconnect handler," I'm
120 not sure we have any other meaningful errors)
122 * configure.in: check for getpwnam_r
124 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
125 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
126 mechanism as in SASL spec, using socket credentials
128 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
129 (_dbus_send_credentials_unix_socket): new function
131 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
133 (_dbus_write): only check errno if <0 returned
134 (_dbus_write_two): ditto
136 2003-01-02 Anders Carlsson <andersca@codefactory.se>
138 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
139 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
140 (_dbus_marshal_test):
141 * dbus/dbus-marshal.h:
142 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
143 to _dbus_marshal_utf8_string. Also fix some tests.
145 2002-12-28 Harri Porten <porten@kde.org>
147 * configure.in: added check for C++ compiler and a very cheesy
148 check for the Qt integration
150 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
152 * qt/Makefile.am: added
154 * qt/.cvsignore: added
156 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
157 latter, added #ifdef QT_THREAD_SUPPORT guard.
159 * dbus/Makefile.am: added missing headers for make dist
161 2002-12-28 Kristian Rietveld <kris@gtk.org>
163 * dbus/Makefile.am: fixup export-symbols-regex.
165 2002-12-27 Anders Carlsson <andersca@codefactory.se>
167 * acinclude.m4: Add this file and put the
168 PKG_CHECK_MODULE macro in it.
170 2002-12-27 Anders Carlsson <andersca@codefactory.se>
172 * dbus/dbus-marshal.c: (_dbus_marshal_string),
173 (_dbus_demarshal_double), (_dbus_demarshal_int32),
174 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
175 (_dbus_marshal_test):
176 Make the demarshalling routines align the pos argument.
177 Add string marshalling tests and fix the obvious bugs
180 2002-12-26 Havoc Pennington <hp@pobox.com>
182 * dbus/dbus-auth.c: fixes fixes fixes
184 * dbus/dbus-transport-unix.c: wire up support for
185 encoding/decoding data on the wire
187 * dbus/dbus-auth.c (_dbus_auth_encode_data)
188 (_dbus_auth_decode_data): append to target string
189 instead of nuking it.
191 2002-12-26 Havoc Pennington <hp@pobox.com>
193 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
194 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
197 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
198 avoid swap_bytes() overhead (ignoring possible assembly stuff for
199 now). Main point is because I wanted unpack_uint32 to implement
201 (_dbus_verbose_bytes): new function
203 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
205 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
206 mechanism to handle a corrupt message stream
207 (_dbus_message_loader_new): fix preallocation to only prealloc,
210 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
211 (_dbus_string_test): enhance tests for copy/move and fix the
214 * dbus/dbus-transport-unix.c: Hold references in more places to
215 avoid reentrancy problems
217 * dbus/dbus-transport.c: ditto
219 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
220 leak reference count in no-message case
222 * test/watch.c (do_mainloop): handle adding/removing watches
223 during iteration over the watches. Also, ref the connection/server
224 stored on a watch, so we don't try to mangle a destroyed one.
226 * dbus/dbus-transport-unix.c (do_authentication): perform
229 * dbus/dbus-auth.c (get_state): add a state
230 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
231 (_dbus_auth_get_unused_bytes): append the unused bytes
232 to the passed in string, rather than prepend
234 * dbus/dbus-transport.c (_dbus_transport_init_base): create
235 the auth conversation DBusAuth
237 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
238 (_dbus_transport_new_for_domain_socket): when creating a
239 transport, pass in whether it's a client-side or server-side
240 transport so we know which DBusAuth to create
242 2002-12-03 Havoc Pennington <hp@pobox.com>
244 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
245 _after_ finalizing the derived members
246 (unix_connection_set): unref watch if we fail to add it
248 * dbus/dbus-connection.c (dbus_connection_unref): delete the
249 transport first, so that the connection owned by the
250 transport will be valid as the transport finalizes.
252 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
253 if necessary, and remove watches from the connection.
255 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
257 2002-12-26 Anders Carlsson <andersca@codefactory.se>
259 * dbus/dbus-marshal.c: (_dbus_marshal_string),
260 (_dbus_demarshal_double), (_dbus_demarshal_int32),
261 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
262 (_dbus_marshal_test):
263 * dbus/dbus-marshal.h:
264 Add string marshal functions and have the demarshal functions
265 return the new position.
267 2002-12-25 Havoc Pennington <hp@pobox.com>
269 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
270 it is a simple protocol that just maps directly to SASL.
272 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
273 initial implementation, not actually used yet.
275 * dbus/dbus-string.c (_dbus_string_find): new function
276 (_dbus_string_equal): new function
277 (_dbus_string_base64_encode): new function
278 (_dbus_string_base64_decode): new function
280 2002-12-25 Anders Carlsson <andersca@codefactory.se>
283 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
284 (_dbus_marshal_int32), (_dbus_marshal_uint32),
285 (_dbus_demarshal_double), (_dbus_demarshal_int32),
286 (_dbus_demarshal_uint32), (_dbus_marshal_test):
287 * dbus/dbus-marshal.h:
288 * dbus/dbus-protocol.h:
289 * dbus/dbus-test.c: (main):
291 Add un-optimized marshalling/demarshalling routines.
293 2002-12-25 Harri Porten <porten@kde.org>
295 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
297 2002-12-24 Zack Rusin <zack@kde.org>
299 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
300 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
303 2002-12-24 Havoc Pennington <hp@pobox.com>
305 * glib/dbus-gthread.c: fix include
307 * glib/dbus-glib.h: rename DBusMessageHandler for now.
308 I think glib API needs to change, though, as you don't
309 want to use DBusMessageFunction, you want to use the
310 DBusMessageHandler object. Probably
311 dbus_connection_open_with_g_main_loop()
312 and dbus_connection_setup_g_main_loop() or something like that
313 (but think of better names...) that just create a connection
314 that has watch/timeout functions etc. already set up.
316 * dbus/dbus-connection.c
317 (dbus_connection_send_message_with_reply): new function just to
318 show how the message handler helps us deal with replies.
320 * dbus/dbus-list.c (_dbus_list_remove_last): new function
322 * dbus/dbus-string.c (_dbus_string_test): free a string that
325 * dbus/dbus-hash.c: use memory pools for the hash entries
326 (rebuild_table): be more paranoid about overflow, and
327 shrink table when we can
328 (_dbus_hash_test): reduce number of sprintfs and write
329 valid C89. Add tests for case where we grow and then
330 shrink the hash table.
332 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
334 * dbus/dbus-connection.c (dbus_connection_register_handler)
335 (dbus_connection_unregister_handler): new functions
337 * dbus/dbus-message.c (dbus_message_get_name): new
339 * dbus/dbus-list.c: fix docs typo
341 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
342 an object representing a handler for messages.
344 2002-12-16 Anders Carlsson <andersca@codefactory.se>
347 * glib/dbus-gthread.c: (dbus_gthread_init):
348 Don't use the gdbus prefix for public functions.
350 2002-12-16 Anders Carlsson <andersca@codefactory.se>
354 Add GLib checks and fixup .pc files
358 * glib/dbus-gmain.c: (gdbus_connection_prepare),
359 (gdbus_connection_check), (gdbus_connection_dispatch),
360 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
361 (dbus_connection_gsource_new):
362 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
363 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
364 * glib/test-dbus-glib.c: (message_handler), (main):
367 2002-12-15 Harri Porten <porten@kde.org>
369 * autogen.sh: check for libtoolize before attempting to use it
371 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
374 * .cvsignore: ignore more stamp files
376 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
378 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
379 without make install.
381 2002-12-15 Havoc Pennington <hp@pobox.com>
383 * dbus/dbus-threads.c: add thread stubs that a higher library
384 layer can fill in. e.g. the GLib wrapper might fill them in with
385 GThread stuff. We still need to use this thread API to
386 thread-safe-ize the library.
388 2002-12-12 Havoc Pennington <hp@pobox.com>
390 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
391 below new interfaces and include fewer system headers.
393 * dbus/dbus-sysdeps.c (_dbus_read): new function
394 (_dbus_write): new function
395 (_dbus_write_two): new function
396 (_dbus_connect_unix_socket): new function
397 (_dbus_listen_unix_socket): new function
399 * dbus/dbus-message-internal.h: change interfaces to use
402 2002-12-11 Havoc Pennington <hp@pobox.com>
404 * dbus/dbus-types.h: add dbus_unichar
406 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
408 * dbus/dbus-connection.c (dbus_connection_send_message): return
411 * dbus/dbus-transport.c: include dbus-watch.h
413 * dbus/dbus-connection.c: include dbus-message-internal.h
415 * HACKING: add file with coding guidelines stuff.
417 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
418 handling here, for security purposes (as in vsftpd). Not actually
419 using this class yet.
421 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
422 system/libc usage here, as in vsftpd, for ease of auditing (and
423 should also simplify portability). Haven't actually moved all the
424 system/libc usage into here yet.
426 2002-11-25 Havoc Pennington <hp@pobox.com>
428 * dbus/dbus-internals.c (_dbus_verbose): fix to not
429 always print the first verbose message.
431 2002-11-24 Havoc Pennington <hp@pobox.com>
433 * test/echo-client.c, test/echo-server.c: cheesy test
436 * configure.in (AC_CHECK_FUNCS): check for writev
438 * dbus/dbus-message.c (_dbus_message_get_network_data): new
441 * dbus/dbus-list.c (_dbus_list_foreach): new function
443 * dbus/dbus-internals.c (_dbus_verbose): new function
445 * dbus/dbus-server.c, dbus/dbus-server.h: public object
446 representing a server that listens for connections.
448 * dbus/.cvsignore: create
450 * dbus/dbus-errors.h, dbus/dbus-errors.c:
451 public API for reporting errors
453 * dbus/dbus-connection.h, dbus/dbus-connection.c:
454 public object representing a connection that
455 sends/receives messages. (Same object used for
456 both client and server.)
458 * dbus/dbus-transport.h, dbus/dbus-transport.c:
459 Basic abstraction for different kinds of stream
460 that we might read/write messages from.
462 2002-11-23 Havoc Pennington <hp@pobox.com>
464 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
467 * dbus/dbus-test.c (main): add list test, and include
468 dbus-test.h as intended
470 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
471 (_dbus_hash_table_remove_int): return value indicates
472 whether the entry existed to remove
474 * dbus/dbus-list.c: add linked list utility class,
477 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
480 2002-11-23 Havoc Pennington <hp@pobox.com>
482 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
483 DBUS_END_DECLS to nothing, that should fix this once and for all
485 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
487 * dbus/dbus-message.c, dbus/dbus-hash.c:
488 add some missing @brief
490 2002-11-23 Havoc Pennington <hp@pobox.com>
492 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
493 to avoid confusing Doxygen
495 * dbus/dbus-hash.c: @} not }@
497 * dbus/dbus-message.c (struct DBusMessage): split out
500 2002-11-23 Havoc Pennington <hp@pobox.com>
502 * configure.in: pile on more warning flags if using gcc
504 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
505 to document static functions
507 * configure.in: add summary to end of configure so it
508 looks nice and attractive
510 * dbus/dbus-hash.c: finish implementation and write unit
513 * configure.in: add --enable-tests to enable unit tests
515 * dbus/dbus-test.c: test program to run unit tests
516 for all files in dbus/*, initially runs a test for
519 * dbus/dbus-internals.h: file to hold some internal utility stuff
521 2002-11-22 Havoc Pennington <hp@redhat.com>
523 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
524 "ported" away from Tcl
526 * dbus/dbus-types.h: header for types such as dbus_bool_t
528 2002-11-22 Havoc Pennington <hp@redhat.com>
530 * dbus/dbus.h: fixups for doc warnings
532 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
534 (QUIET): make it quiet so we can see warnings
536 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
538 2002-11-22 Havoc Pennington <hp@redhat.com>
540 * Makefile.am: include "Doxyfile" target in all-local
542 * configure.in: generate the Doxyfile
544 * Doxyfile.in: move Doxyfile here, so we can use
545 configure to generate a Doxyfile with the right
548 2002-11-22 Havoc Pennington <hp@redhat.com>
550 * dbus/dbus-message.c: move inline docs into .c file
552 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
553 so all docs are under doc/
554 (MAN_EXTENSION): generate man pages. Use extension
555 ".3dbus" which matches ".3qt" on my system,
556 I guess this is OK, I don't know really.
557 (FILE_PATTERNS): look for .c files not .h, makes sense
560 2002-11-22 Havoc Pennington <hp@pobox.com>
562 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
563 because any app can be a server, and any app can be a client,
564 the bus is a special kind of server.
566 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
568 * Doxyfile : adding. Still needs Makefile rules to be generated
569 automatically (just run "doxygen" in the toplevel dir for now to
572 * dbus/dbus-message.h : Adding sample docs (javadoc since
573 resembles gtk-doc a little more)
575 * dbus/dbus.h : Adding sample docs
577 2002-11-21 Havoc Pennington <hp@redhat.com>
579 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
580 so we can allow ourselves to include files directly,
581 instead of having to use dbus.h
583 * dbus/dbus.h: fill in
585 * dbus/dbus-message.h: sketch out a sample header file.
586 Include griping if you include it directly instead of
589 * dbus/dbus-macros.h: new file with macros for extern "C",
590 TRUE/FALSE, NULL, etc.
592 * doc/file-boilerplate.c: put include guards in here
594 2002-11-21 Havoc Pennington <hp@redhat.com>
596 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
598 * COPYING: include the GPL as well, and license code
599 under both AFL and GPL.
601 2002-11-21 Havoc Pennington <hp@redhat.com>
603 * acconfig.h: get rid of this
605 * autogen.sh (run_configure): add --no-configure option
607 * configure.in: remove AC_ARG_PROGRAM to make
608 autoconf complain less. add AC_PREREQ.
609 add AC_DEFINE third arg.
611 2002-11-21 Anders Carlsson <andersca@codefactory.se>
614 Fix references so we can distcheck.
616 2002-11-21 Havoc Pennington <hp@redhat.com>
618 * Initial module creation