1 2003-01-05 Havoc Pennington <hp@pobox.com>
3 * bus/connection.c: implement routines for handling connections,
4 first thing is keeping a list of owned services on each connection
5 and setting up watches etc.
7 * bus/services.c: implement a mapping from service names to lists
10 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
12 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
13 to use static mutexes for global data
15 * dbus/dbus-connection.c (dbus_connection_set_data): add new
16 collection of functions to set/get application-specific data
17 on the DBusConnection.
19 2003-01-04 Havoc Pennington <hp@pobox.com>
21 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
22 (_dbus_poll): new function
24 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
27 * bus/loop.c: initial code for the daemon main loop
29 2003-01-04 Havoc Pennington <hp@pobox.com>
31 * test/watch.c (error_handler): make it safe if the error handler
32 is called multiple times (if we s/error handler/disconnect
33 handler/ we should just guarantee it's called only once)
35 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
36 error handler on disconnect (it's quite possible we should
37 just change the error handler to a "disconnect handler," I'm
38 not sure we have any other meaningful errors)
40 * configure.in: check for getpwnam_r
42 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
43 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
44 mechanism as in SASL spec, using socket credentials
46 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
47 (_dbus_send_credentials_unix_socket): new function
49 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
51 (_dbus_write): only check errno if <0 returned
52 (_dbus_write_two): ditto
54 2003-01-02 Anders Carlsson <andersca@codefactory.se>
56 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
57 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
59 * dbus/dbus-marshal.h:
60 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
61 to _dbus_marshal_utf8_string. Also fix some tests.
63 2002-12-28 Harri Porten <porten@kde.org>
65 * configure.in: added check for C++ compiler and a very cheesy
66 check for the Qt integration
68 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
70 * qt/Makefile.am: added
72 * qt/.cvsignore: added
74 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
75 latter, added #ifdef QT_THREAD_SUPPORT guard.
77 * dbus/Makefile.am: added missing headers for make dist
79 2002-12-28 Kristian Rietveld <kris@gtk.org>
81 * dbus/Makefile.am: fixup export-symbols-regex.
83 2002-12-27 Anders Carlsson <andersca@codefactory.se>
85 * acinclude.m4: Add this file and put the
86 PKG_CHECK_MODULE macro in it.
88 2002-12-27 Anders Carlsson <andersca@codefactory.se>
90 * dbus/dbus-marshal.c: (_dbus_marshal_string),
91 (_dbus_demarshal_double), (_dbus_demarshal_int32),
92 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
94 Make the demarshalling routines align the pos argument.
95 Add string marshalling tests and fix the obvious bugs
98 2002-12-26 Havoc Pennington <hp@pobox.com>
100 * dbus/dbus-auth.c: fixes fixes fixes
102 * dbus/dbus-transport-unix.c: wire up support for
103 encoding/decoding data on the wire
105 * dbus/dbus-auth.c (_dbus_auth_encode_data)
106 (_dbus_auth_decode_data): append to target string
107 instead of nuking it.
109 2002-12-26 Havoc Pennington <hp@pobox.com>
111 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
112 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
115 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
116 avoid swap_bytes() overhead (ignoring possible assembly stuff for
117 now). Main point is because I wanted unpack_uint32 to implement
119 (_dbus_verbose_bytes): new function
121 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
123 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
124 mechanism to handle a corrupt message stream
125 (_dbus_message_loader_new): fix preallocation to only prealloc,
128 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
129 (_dbus_string_test): enhance tests for copy/move and fix the
132 * dbus/dbus-transport-unix.c: Hold references in more places to
133 avoid reentrancy problems
135 * dbus/dbus-transport.c: ditto
137 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
138 leak reference count in no-message case
140 * test/watch.c (do_mainloop): handle adding/removing watches
141 during iteration over the watches. Also, ref the connection/server
142 stored on a watch, so we don't try to mangle a destroyed one.
144 * dbus/dbus-transport-unix.c (do_authentication): perform
147 * dbus/dbus-auth.c (get_state): add a state
148 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
149 (_dbus_auth_get_unused_bytes): append the unused bytes
150 to the passed in string, rather than prepend
152 * dbus/dbus-transport.c (_dbus_transport_init_base): create
153 the auth conversation DBusAuth
155 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
156 (_dbus_transport_new_for_domain_socket): when creating a
157 transport, pass in whether it's a client-side or server-side
158 transport so we know which DBusAuth to create
160 2002-12-03 Havoc Pennington <hp@pobox.com>
162 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
163 _after_ finalizing the derived members
164 (unix_connection_set): unref watch if we fail to add it
166 * dbus/dbus-connection.c (dbus_connection_unref): delete the
167 transport first, so that the connection owned by the
168 transport will be valid as the transport finalizes.
170 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
171 if necessary, and remove watches from the connection.
173 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
175 2002-12-26 Anders Carlsson <andersca@codefactory.se>
177 * dbus/dbus-marshal.c: (_dbus_marshal_string),
178 (_dbus_demarshal_double), (_dbus_demarshal_int32),
179 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
180 (_dbus_marshal_test):
181 * dbus/dbus-marshal.h:
182 Add string marshal functions and have the demarshal functions
183 return the new position.
185 2002-12-25 Havoc Pennington <hp@pobox.com>
187 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
188 it is a simple protocol that just maps directly to SASL.
190 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
191 initial implementation, not actually used yet.
193 * dbus/dbus-string.c (_dbus_string_find): new function
194 (_dbus_string_equal): new function
195 (_dbus_string_base64_encode): new function
196 (_dbus_string_base64_decode): new function
198 2002-12-25 Anders Carlsson <andersca@codefactory.se>
201 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
202 (_dbus_marshal_int32), (_dbus_marshal_uint32),
203 (_dbus_demarshal_double), (_dbus_demarshal_int32),
204 (_dbus_demarshal_uint32), (_dbus_marshal_test):
205 * dbus/dbus-marshal.h:
206 * dbus/dbus-protocol.h:
207 * dbus/dbus-test.c: (main):
209 Add un-optimized marshalling/demarshalling routines.
211 2002-12-25 Harri Porten <porten@kde.org>
213 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
215 2002-12-24 Zack Rusin <zack@kde.org>
217 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
218 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
221 2002-12-24 Havoc Pennington <hp@pobox.com>
223 * glib/dbus-gthread.c: fix include
225 * glib/dbus-glib.h: rename DBusMessageHandler for now.
226 I think glib API needs to change, though, as you don't
227 want to use DBusMessageFunction, you want to use the
228 DBusMessageHandler object. Probably
229 dbus_connection_open_with_g_main_loop()
230 and dbus_connection_setup_g_main_loop() or something like that
231 (but think of better names...) that just create a connection
232 that has watch/timeout functions etc. already set up.
234 * dbus/dbus-connection.c
235 (dbus_connection_send_message_with_reply): new function just to
236 show how the message handler helps us deal with replies.
238 * dbus/dbus-list.c (_dbus_list_remove_last): new function
240 * dbus/dbus-string.c (_dbus_string_test): free a string that
243 * dbus/dbus-hash.c: use memory pools for the hash entries
244 (rebuild_table): be more paranoid about overflow, and
245 shrink table when we can
246 (_dbus_hash_test): reduce number of sprintfs and write
247 valid C89. Add tests for case where we grow and then
248 shrink the hash table.
250 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
252 * dbus/dbus-connection.c (dbus_connection_register_handler)
253 (dbus_connection_unregister_handler): new functions
255 * dbus/dbus-message.c (dbus_message_get_name): new
257 * dbus/dbus-list.c: fix docs typo
259 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
260 an object representing a handler for messages.
262 2002-12-16 Anders Carlsson <andersca@codefactory.se>
265 * glib/dbus-gthread.c: (dbus_gthread_init):
266 Don't use the gdbus prefix for public functions.
268 2002-12-16 Anders Carlsson <andersca@codefactory.se>
272 Add GLib checks and fixup .pc files
276 * glib/dbus-gmain.c: (gdbus_connection_prepare),
277 (gdbus_connection_check), (gdbus_connection_dispatch),
278 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
279 (dbus_connection_gsource_new):
280 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
281 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
282 * glib/test-dbus-glib.c: (message_handler), (main):
285 2002-12-15 Harri Porten <porten@kde.org>
287 * autogen.sh: check for libtoolize before attempting to use it
289 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
292 * .cvsignore: ignore more stamp files
294 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
296 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
297 without make install.
299 2002-12-15 Havoc Pennington <hp@pobox.com>
301 * dbus/dbus-threads.c: add thread stubs that a higher library
302 layer can fill in. e.g. the GLib wrapper might fill them in with
303 GThread stuff. We still need to use this thread API to
304 thread-safe-ize the library.
306 2002-12-12 Havoc Pennington <hp@pobox.com>
308 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
309 below new interfaces and include fewer system headers.
311 * dbus/dbus-sysdeps.c (_dbus_read): new function
312 (_dbus_write): new function
313 (_dbus_write_two): new function
314 (_dbus_connect_unix_socket): new function
315 (_dbus_listen_unix_socket): new function
317 * dbus/dbus-message-internal.h: change interfaces to use
320 2002-12-11 Havoc Pennington <hp@pobox.com>
322 * dbus/dbus-types.h: add dbus_unichar
324 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
326 * dbus/dbus-connection.c (dbus_connection_send_message): return
329 * dbus/dbus-transport.c: include dbus-watch.h
331 * dbus/dbus-connection.c: include dbus-message-internal.h
333 * HACKING: add file with coding guidelines stuff.
335 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
336 handling here, for security purposes (as in vsftpd). Not actually
337 using this class yet.
339 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
340 system/libc usage here, as in vsftpd, for ease of auditing (and
341 should also simplify portability). Haven't actually moved all the
342 system/libc usage into here yet.
344 2002-11-25 Havoc Pennington <hp@pobox.com>
346 * dbus/dbus-internals.c (_dbus_verbose): fix to not
347 always print the first verbose message.
349 2002-11-24 Havoc Pennington <hp@pobox.com>
351 * test/echo-client.c, test/echo-server.c: cheesy test
354 * configure.in (AC_CHECK_FUNCS): check for writev
356 * dbus/dbus-message.c (_dbus_message_get_network_data): new
359 * dbus/dbus-list.c (_dbus_list_foreach): new function
361 * dbus/dbus-internals.c (_dbus_verbose): new function
363 * dbus/dbus-server.c, dbus/dbus-server.h: public object
364 representing a server that listens for connections.
366 * dbus/.cvsignore: create
368 * dbus/dbus-errors.h, dbus/dbus-errors.c:
369 public API for reporting errors
371 * dbus/dbus-connection.h, dbus/dbus-connection.c:
372 public object representing a connection that
373 sends/receives messages. (Same object used for
374 both client and server.)
376 * dbus/dbus-transport.h, dbus/dbus-transport.c:
377 Basic abstraction for different kinds of stream
378 that we might read/write messages from.
380 2002-11-23 Havoc Pennington <hp@pobox.com>
382 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
385 * dbus/dbus-test.c (main): add list test, and include
386 dbus-test.h as intended
388 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
389 (_dbus_hash_table_remove_int): return value indicates
390 whether the entry existed to remove
392 * dbus/dbus-list.c: add linked list utility class,
395 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
398 2002-11-23 Havoc Pennington <hp@pobox.com>
400 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
401 DBUS_END_DECLS to nothing, that should fix this once and for all
403 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
405 * dbus/dbus-message.c, dbus/dbus-hash.c:
406 add some missing @brief
408 2002-11-23 Havoc Pennington <hp@pobox.com>
410 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
411 to avoid confusing Doxygen
413 * dbus/dbus-hash.c: @} not }@
415 * dbus/dbus-message.c (struct DBusMessage): split out
418 2002-11-23 Havoc Pennington <hp@pobox.com>
420 * configure.in: pile on more warning flags if using gcc
422 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
423 to document static functions
425 * configure.in: add summary to end of configure so it
426 looks nice and attractive
428 * dbus/dbus-hash.c: finish implementation and write unit
431 * configure.in: add --enable-tests to enable unit tests
433 * dbus/dbus-test.c: test program to run unit tests
434 for all files in dbus/*, initially runs a test for
437 * dbus/dbus-internals.h: file to hold some internal utility stuff
439 2002-11-22 Havoc Pennington <hp@redhat.com>
441 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
442 "ported" away from Tcl
444 * dbus/dbus-types.h: header for types such as dbus_bool_t
446 2002-11-22 Havoc Pennington <hp@redhat.com>
448 * dbus/dbus.h: fixups for doc warnings
450 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
452 (QUIET): make it quiet so we can see warnings
454 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
456 2002-11-22 Havoc Pennington <hp@redhat.com>
458 * Makefile.am: include "Doxyfile" target in all-local
460 * configure.in: generate the Doxyfile
462 * Doxyfile.in: move Doxyfile here, so we can use
463 configure to generate a Doxyfile with the right
466 2002-11-22 Havoc Pennington <hp@redhat.com>
468 * dbus/dbus-message.c: move inline docs into .c file
470 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
471 so all docs are under doc/
472 (MAN_EXTENSION): generate man pages. Use extension
473 ".3dbus" which matches ".3qt" on my system,
474 I guess this is OK, I don't know really.
475 (FILE_PATTERNS): look for .c files not .h, makes sense
478 2002-11-22 Havoc Pennington <hp@pobox.com>
480 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
481 because any app can be a server, and any app can be a client,
482 the bus is a special kind of server.
484 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
486 * Doxyfile : adding. Still needs Makefile rules to be generated
487 automatically (just run "doxygen" in the toplevel dir for now to
490 * dbus/dbus-message.h : Adding sample docs (javadoc since
491 resembles gtk-doc a little more)
493 * dbus/dbus.h : Adding sample docs
495 2002-11-21 Havoc Pennington <hp@redhat.com>
497 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
498 so we can allow ourselves to include files directly,
499 instead of having to use dbus.h
501 * dbus/dbus.h: fill in
503 * dbus/dbus-message.h: sketch out a sample header file.
504 Include griping if you include it directly instead of
507 * dbus/dbus-macros.h: new file with macros for extern "C",
508 TRUE/FALSE, NULL, etc.
510 * doc/file-boilerplate.c: put include guards in here
512 2002-11-21 Havoc Pennington <hp@redhat.com>
514 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
516 * COPYING: include the GPL as well, and license code
517 under both AFL and GPL.
519 2002-11-21 Havoc Pennington <hp@redhat.com>
521 * acconfig.h: get rid of this
523 * autogen.sh (run_configure): add --no-configure option
525 * configure.in: remove AC_ARG_PROGRAM to make
526 autoconf complain less. add AC_PREREQ.
527 add AC_DEFINE third arg.
529 2002-11-21 Anders Carlsson <andersca@codefactory.se>
532 Fix references so we can distcheck.
534 2002-11-21 Havoc Pennington <hp@redhat.com>
536 * Initial module creation