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