2003-01-21 Anders Carlsson <andersca@codefactory.se>
[platform/upstream/dbus.git] / ChangeLog
1 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
2
3         * bus/Makefile.am:
4         Add driver.[ch]
5         
6         * bus/connection.c: (connection_disconnect_handler):
7         Remove the connection from the bus driver's list.
8         
9         (connection_watch_callback): Dispatch messages.
10
11         (free_connection_data): Free connection name.
12         
13         (bus_connection_setup): Add connection to the bus driver's list.
14         (bus_connection_remove_owned_service): 
15         (bus_connection_set_name), (bus_connection_get_name):
16         Add functions for setting and getting the connection's name.
17         
18         * bus/connection.h:
19         Add function headers.
20         
21         * bus/driver.c: (create_unique_client_name),
22         (bus_driver_handle_hello_message),
23         (bus_driver_send_welcome_message), (bus_driver_message_handler),
24         (bus_driver_add_connection), (bus_driver_remove_connection):
25         * bus/driver.h:
26         * bus/main.c:
27         * bus/services.c: (bus_service_free):
28         * bus/services.h:
29         New file that handles communication and registreation with the bus
30         itself. 
31         
32 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
33
34         * dbus/dbus-connection.c: (dbus_connection_send_message):
35         Add a new client_serial parameter.
36         
37         (dbus_connection_send_message_with_reply):
38         Remove a @todo since we've implemented the blocking function.
39         
40         (dbus_connection_send_message_with_reply_and_block):
41         New function that sends a message and waits for a reply and
42         then returns the reply.
43         
44         * dbus/dbus-connection.h:
45         Add new functions.
46         
47         * dbus/dbus-errors.c: (dbus_result_to_string):
48         * dbus/dbus-errors.h:
49         Add new DBUS_RESULT.
50         
51         * dbus/dbus-message-internal.h:
52         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
53         (_dbus_message_set_sender), (dbus_message_write_header),
54         (dbus_message_new_reply), (decode_header_data),
55         (_dbus_message_loader_return_buffer), (_dbus_message_test):
56         * dbus/dbus-message.h:
57         Add new functions that set the reply serial and sender.
58         Also marshal and demarshal them correctly and add test.
59         
60         * dbus/dbus-protocol.h:
61         Add new DBUS_MESSAGE_TYPE_SENDER.
62         
63         * glib/dbus-glib.h:
64         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
65         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
66         (dbus_connection_hookup_with_g_main):
67         * glib/test-dbus-glib.c: (main):
68         Rewrite to use GIOChannel and remove the GSource crack.
69         
70         * test/echo-client.c: (main):
71         * test/watch.c: (check_messages):
72         Update for changed APIs
73         
74 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
75
76         * dbus/Makefile.am: Add dbus-timeout.[cħ]
77         
78         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
79         Create a DBusTimeoutList.       
80         (dbus_connection_set_timeout_functions): Add new function to
81         set timeout callbacks
82         
83         * dbus/dbus-connection.h: Add public DBusTimeout API.
84         
85         * dbus/dbus-message.c: (dbus_message_get_service):
86         * dbus/dbus-message.h:  New function.
87
88         * dbus/dbus-server.c: Fix small doc typo.
89         
90         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
91
92 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
93
94         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
95         of the string, just as long as specified.
96
97 2003-01-19  Havoc Pennington  <hp@pobox.com>
98
99         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
100         new function
101
102         * dbus/dbus-server.c (dbus_server_set_max_connections)
103         (dbus_server_get_max_connections, dbus_server_get_n_connections):
104         keep track of current number of connections, and add API for
105         setting a max (but haven't implemented enforcing the max yet)
106
107 2003-01-18  Havoc Pennington  <hp@pobox.com>
108
109         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
110         reading/writing if read_watch != NULL or write_watch != NULL.
111
112         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
113         the message loader code to actually load message->header and
114         message->body into the newly-created message.
115
116         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
117         in OOM case
118
119         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
120         (dbus_connection_get_max_message_size) 
121         (dbus_connection_set_max_live_messages_size) 
122         (dbus_connection_get_max_live_messages_size): implement some
123         resource limitation functions
124
125         * dbus/dbus-resources.c: new file implementing some of the
126         resource limits stuff
127
128         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
129         missing docs, add @todo to handle OOM etc.
130
131         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
132         docs
133         
134 2003-01-18  Havoc Pennington  <hp@pobox.com>
135
136         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
137         connection if it hasn't been already.
138
139         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
140         replace with DisconnectFunction.
141
142 2003-01-18  Havoc Pennington  <hp@pobox.com>
143
144         Building --disable-verbose-mode --disable-asserts --disable-tests
145         cuts the library from 112K to 45K or so
146         
147         * configure.in: check for varargs macro support, 
148         add --enable-verbose-mode, --enable-asserts. 
149
150         * dbus/dbus-internals.h (_dbus_assert): support
151         DBUS_DISABLE_ASSERT
152         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
153
154 2003-01-18  Havoc Pennington  <hp@pobox.com>
155
156         * dbus/dbus-test.c: include config.h so that tests actually run
157
158         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
159         so the failure mode when that assumption fails will be plenty
160         obvious.
161
162 2003-01-18  Havoc Pennington  <hp@pobox.com>
163
164         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
165
166         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
167         the distribution
168
169         * test/Makefile.am: don't use special variable "TESTS" for echo-*
170         since we don't want to use those in make check
171
172 2003-01-15  Havoc Pennington  <hp@redhat.com>
173
174         Release 0.2
175         
176         * NEWS: update
177
178 2003-01-15  Havoc Pennington  <hp@redhat.com>
179
180         * test/Makefile.am: fix so that test source code ends up in the
181         distribution on make distcheck
182
183 2003-01-15  Havoc Pennington  <hp@redhat.com>
184
185         Release 0.1.
186         
187         * NEWS: update  
188
189 2003-01-15  Havoc Pennington  <hp@redhat.com>
190
191         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
192         fix build when --disable-tests
193
194         * Makefile.am (EXTRA_DIST): put HACKING in here
195
196         * HACKING: document procedure for making a tarball release.
197
198 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
199
200         * bus/connection.c: (connection_error_handler),
201         (bus_connection_setup):
202         * bus/main.c: (main):
203         Make sure that the DBusConnectionData struct is NULLed
204         out to prevent a segfault.
205         
206         * dbus/dbus-errors.c: (dbus_result_to_string):
207         * dbus/dbus-errors.h:
208         * dbus/dbus-message.c: (dbus_message_get_fields),
209         (dbus_message_get_fields_valist), (_dbus_message_test):
210         * dbus/dbus-message.h:
211         Make dbus_message_get_fields return a result code so we can
212         track invalid fields as well as oom.
213         
214 2003-01-11  Havoc Pennington  <hp@pobox.com>
215
216         * configure.in: change --enable-test/--enable-ansi action-if-given
217         to enable_foo=$enableval instead of enable_foo=yes
218
219 2003-01-08  Havoc Pennington  <hp@pobox.com>
220
221         * dbus/dbus-string.c (_dbus_string_align_length): new function
222
223         * dbus/dbus-test-main.c: move main() for test app here
224         * dbus/dbus-test.c
225         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
226         symbol to run tests, because dbus-test isn't in the main 
227         library
228
229         Code review nitpicks.
230         
231         * dbus/dbus-message.c (dbus_message_write_header): add newlines
232         for people with narrow emacs ;-). Assert client_serial was filled
233         in. Assert message->name != NULL.
234         (dbus_message_append_fields): have "first_field_type" arg separate
235         from va list, needed for C++ binding that also uses varargs IIRC
236         and helps with type safety
237         (dbus_message_new): add @todo about using DBusString to store
238         service/name internally
239         (dbus_message_new): don't leak ->service and ->name on OOM later
240         in the function
241         (dbus_message_unref): free the service name
242         (dbus_message_get_fields): same change to varargs
243         i.e. first_field_type
244         (_dbus_message_loader_return_buffer): assert that the message data
245         is aligned (if not it's a bug in our code). Put in verbose griping
246         about why we set corrupted = TRUE.
247         (decode_header_data): add FIXME that char* is evil.  Was going to
248         add FIXME about evil locale-specific string.h strncmp, but just
249         switched to wacky string-as-uint32 optimization. Move check for
250         "no room for field name" above get_const_data_len() to avoid
251         assertion failure in get_const_data_len if we have trailing 2
252         bytes or the like. Check for service and name fields being
253         provided twice. Don't leak service/name on error. Require field
254         names to be aligned to 4 bytes.
255
256         * dbus/dbus-marshal.c: move byte swap stuff to header
257         (_dbus_pack_int32): uscore-prefix
258         (_dbus_unpack_int32): uscore-prefix
259         (_dbus_unpack_uint32): export
260         (_dbus_demarshal_string): add @todo complaining about use of
261         memcpy()
262         (_dbus_marshal_get_field_end_pos): add @todo about bad error
263         handling allowing corrupt data to go unchecked
264
265 2003-01-08  Havoc Pennington  <hp@redhat.com>
266
267         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
268         to the select() as needed for authentication. (should be using
269         _dbus_poll() not select, but for another day)
270
271         * dbus/dbus.h: include dbus/dbus-protocol.h
272
273 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
274
275         * dbus/Makefile.am (dbusinclude_HEADERS): Install
276         dbus-connection.h
277
278 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
279
280         * dbus/dbus-internals.c: (_dbus_type_to_string):
281         New function that returns a string describing a type.
282         
283         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
284         * dbus/dbus-marshal.h:
285         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
286         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
287         (dbus_message_iter_get_byte_array):
288         * dbus/dbus-message.h:
289         Add new convenience functions for appending and getting message fields.
290         Also add demarshalling routines for byte arrays.
291
292 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
293
294         * dbus/dbus-connection-internal.h:
295         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
296         (_dbus_connection_get_next_client_serial),
297         (dbus_connection_send_message):
298         * dbus/dbus-internals.h:
299         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
300         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
301         (_dbus_marshal_uint32), (_dbus_demarshal_double),
302         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
303         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
304         (_dbus_verbose_bytes), (_dbus_marshal_test):
305         * dbus/dbus-marshal.h:
306         * dbus/dbus-message-internal.h:
307         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
308         (dbus_message_write_header), (_dbus_message_lock),
309         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
310         (dbus_message_get_name), (dbus_message_append_int32),
311         (dbus_message_append_uint32), (dbus_message_append_double),
312         (dbus_message_append_string), (dbus_message_append_byte_array),
313         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
314         (dbus_message_iter_unref), (dbus_message_iter_has_next),
315         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
316         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
317         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
318         (decode_header_data), (_dbus_message_loader_return_buffer),
319         (message_iter_test), (_dbus_message_test):
320         * dbus/dbus-message.h:
321         * dbus/dbus-protocol.h:
322         * dbus/dbus-test.c: (main):
323         * dbus/dbus-test.h:
324         * glib/test-dbus-glib.c: (message_handler), (main):
325         * test/echo-client.c: (main):
326         * test/watch.c: (check_messages):
327         Make messages sendable and receivable for real.
328         
329 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
330
331         * dbus/dbus-marshal.c: (_dbus_marshal_double),
332         (_dbus_marshal_string), (_dbus_marshal_byte_array):
333         * dbus/dbus-message.c: (dbus_message_append_int32),
334         (dbus_message_append_uint32), (dbus_message_append_double),
335         (dbus_message_append_string), (dbus_message_append_byte_array):
336         Handle OOM restoration.
337         
338 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
339
340         * dbus/dbus-marshal.c: (_dbus_marshal_string),
341         (_dbus_demarshal_string), (_dbus_marshal_test):
342         * dbus/dbus-marshal.h:
343         * dbus/dbus-message.c: (dbus_message_get_name),
344         Document these functions.
345         
346         (dbus_message_append_int32), (dbus_message_append_uint32),
347         (dbus_message_append_double), (dbus_message_append_string),
348         (dbus_message_append_byte_array):
349         * dbus/dbus-message.h:
350         Add functions for adding message fields of different types.
351         
352         * dbus/dbus-protocol.h:
353         Add the different types.
354
355 2003-01-05  Havoc Pennington  <hp@pobox.com>
356
357         * bus/connection.c: implement routines for handling connections,
358         first thing is keeping a list of owned services on each connection
359         and setting up watches etc.
360
361         * bus/services.c: implement a mapping from service names to lists
362         of connections
363
364         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
365
366         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
367         to use static mutexes for global data
368
369         * dbus/dbus-connection.c (dbus_connection_set_data): add new
370         collection of functions to set/get application-specific data
371         on the DBusConnection.
372
373 2003-01-04  Havoc Pennington  <hp@pobox.com>
374
375         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
376         (_dbus_poll): new function
377
378         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
379         copied from GLib
380
381         * bus/loop.c: initial code for the daemon main loop
382
383 2003-01-04  Havoc Pennington  <hp@pobox.com>
384
385         * test/watch.c (error_handler): make it safe if the error handler 
386         is called multiple times (if we s/error handler/disconnect
387         handler/ we should just guarantee it's called only once)
388
389         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
390         error handler on disconnect (it's quite possible we should
391         just change the error handler to a "disconnect handler," I'm 
392         not sure we have any other meaningful errors)
393
394         * configure.in: check for getpwnam_r
395
396         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
397         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
398         mechanism as in SASL spec, using socket credentials
399
400         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
401         (_dbus_send_credentials_unix_socket): new function
402
403         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
404         dbus_accept()
405         (_dbus_write): only check errno if <0 returned
406         (_dbus_write_two): ditto
407
408 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
409
410         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
411         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
412         (_dbus_marshal_test):
413         * dbus/dbus-marshal.h:
414         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
415         to _dbus_marshal_utf8_string. Also fix some tests.
416         
417 2002-12-28  Harri Porten  <porten@kde.org>
418
419         * configure.in: added check for C++ compiler and a very cheesy
420         check for the Qt integration
421
422         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
423
424         * qt/Makefile.am: added 
425
426         * qt/.cvsignore: added  
427
428         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
429         latter, added #ifdef QT_THREAD_SUPPORT guard.
430
431         * dbus/Makefile.am: added missing headers for make dist
432
433 2002-12-28  Kristian Rietveld  <kris@gtk.org>
434
435         * dbus/Makefile.am: fixup export-symbols-regex.
436
437 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
438
439         * acinclude.m4: Add this file and put the 
440         PKG_CHECK_MODULE macro in it.
441
442 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
443
444         * dbus/dbus-marshal.c: (_dbus_marshal_string),
445         (_dbus_demarshal_double), (_dbus_demarshal_int32),
446         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
447         (_dbus_marshal_test):
448         Make the demarshalling routines align the pos argument.
449         Add string marshalling tests and fix the obvious bugs 
450         discovered.
451         
452 2002-12-26  Havoc Pennington  <hp@pobox.com>
453
454         * dbus/dbus-auth.c: fixes fixes fixes
455
456         * dbus/dbus-transport-unix.c: wire up support for
457         encoding/decoding data on the wire
458
459         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
460         (_dbus_auth_decode_data): append to target string 
461         instead of nuking it.
462
463 2002-12-26  Havoc Pennington  <hp@pobox.com>
464
465         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
466         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
467         doh
468
469         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
470         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
471         now). Main point is because I wanted unpack_uint32 to implement
472         _dbus_verbose_bytes
473         (_dbus_verbose_bytes): new function
474
475         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
476
477         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
478         mechanism to handle a corrupt message stream
479         (_dbus_message_loader_new): fix preallocation to only prealloc, 
480         not prelengthen
481         
482         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
483         (_dbus_string_test): enhance tests for copy/move and fix the
484         functions
485
486         * dbus/dbus-transport-unix.c: Hold references in more places to 
487         avoid reentrancy problems
488
489         * dbus/dbus-transport.c: ditto
490
491         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
492         leak reference count in no-message case
493
494         * test/watch.c (do_mainloop): handle adding/removing watches
495         during iteration over the watches. Also, ref the connection/server
496         stored on a watch, so we don't try to mangle a destroyed one.
497
498         * dbus/dbus-transport-unix.c (do_authentication): perform
499         authentication
500
501         * dbus/dbus-auth.c (get_state): add a state
502         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
503         (_dbus_auth_get_unused_bytes): append the unused bytes
504         to the passed in string, rather than prepend
505
506         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
507         the auth conversation DBusAuth
508
509         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
510         (_dbus_transport_new_for_domain_socket): when creating a
511         transport, pass in whether it's a client-side or server-side
512         transport so we know which DBusAuth to create
513
514 2002-12-03  Havoc Pennington  <hp@pobox.com>
515
516         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
517         _after_ finalizing the derived members
518         (unix_connection_set): unref watch if we fail to add it
519
520         * dbus/dbus-connection.c (dbus_connection_unref): delete the
521         transport first, so that the connection owned by the 
522         transport will be valid as the transport finalizes.
523
524         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
525         if necessary, and remove watches from the connection.
526         
527         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
528         
529 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
530
531         * dbus/dbus-marshal.c: (_dbus_marshal_string),
532         (_dbus_demarshal_double), (_dbus_demarshal_int32),
533         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
534         (_dbus_marshal_test):
535         * dbus/dbus-marshal.h:
536         Add string marshal functions and have the demarshal functions
537         return the new position.
538         
539 2002-12-25  Havoc Pennington  <hp@pobox.com>
540
541         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
542         it is a simple protocol that just maps directly to SASL.
543
544         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
545         initial implementation, not actually used yet.
546         
547         * dbus/dbus-string.c (_dbus_string_find): new function
548         (_dbus_string_equal): new function
549         (_dbus_string_base64_encode): new function
550         (_dbus_string_base64_decode): new function
551
552 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
553
554         * dbus/Makefile.am:
555         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
556         (_dbus_marshal_int32), (_dbus_marshal_uint32),
557         (_dbus_demarshal_double), (_dbus_demarshal_int32),
558         (_dbus_demarshal_uint32), (_dbus_marshal_test):
559         * dbus/dbus-marshal.h:
560         * dbus/dbus-protocol.h:
561         * dbus/dbus-test.c: (main):
562         * dbus/dbus-test.h:
563         Add un-optimized marshalling/demarshalling routines.
564         
565 2002-12-25  Harri Porten  <porten@kde.org>
566
567         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
568
569 2002-12-24  Zack Rusin  <zack@kde.org>
570
571         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
572         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
573         main loop stuff
574
575 2002-12-24  Havoc Pennington  <hp@pobox.com>
576
577         * glib/dbus-gthread.c: fix include
578
579         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
580         I think glib API needs to change, though, as you don't 
581         want to use DBusMessageFunction, you want to use the 
582         DBusMessageHandler object. Probably 
583         dbus_connection_open_with_g_main_loop()
584         and dbus_connection_setup_g_main_loop() or something like that
585         (but think of better names...) that just create a connection 
586         that has watch/timeout functions etc. already set up.
587
588         * dbus/dbus-connection.c
589         (dbus_connection_send_message_with_reply): new function just to 
590         show how the message handler helps us deal with replies.
591
592         * dbus/dbus-list.c (_dbus_list_remove_last): new function
593
594         * dbus/dbus-string.c (_dbus_string_test): free a string that
595         wasn't
596
597         * dbus/dbus-hash.c: use memory pools for the hash entries
598         (rebuild_table): be more paranoid about overflow, and 
599         shrink table when we can
600         (_dbus_hash_test): reduce number of sprintfs and write
601         valid C89. Add tests for case where we grow and then 
602         shrink the hash table.
603
604         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
605
606         * dbus/dbus-connection.c (dbus_connection_register_handler) 
607         (dbus_connection_unregister_handler): new functions
608
609         * dbus/dbus-message.c (dbus_message_get_name): new
610
611         * dbus/dbus-list.c: fix docs typo
612
613         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
614         an object representing a handler for messages.
615
616 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
617
618         * glib/dbus-glib.h:
619         * glib/dbus-gthread.c: (dbus_gthread_init):
620         Don't use the gdbus prefix for public functions.
621         
622 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
623
624         * Makefile.am:
625         * configure.in:
626         Add GLib checks and fixup .pc files
627         
628         * glib/Makefile.am:
629         * glib/dbus-glib.h:
630         * glib/dbus-gmain.c: (gdbus_connection_prepare),
631         (gdbus_connection_check), (gdbus_connection_dispatch),
632         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
633         (dbus_connection_gsource_new):
634         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
635         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
636         * glib/test-dbus-glib.c: (message_handler), (main):
637         Add GLib support.
638         
639 2002-12-15  Harri Porten  <porten@kde.org>
640
641         * autogen.sh: check for libtoolize before attempting to use it 
642         
643         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
644         struct.
645         
646         * .cvsignore: ignore more stamp files
647
648         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
649
650         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
651         without make install.
652
653 2002-12-15  Havoc Pennington  <hp@pobox.com>
654
655         * dbus/dbus-threads.c: add thread stubs that a higher library
656         layer can fill in. e.g. the GLib wrapper might fill them in with
657         GThread stuff. We still need to use this thread API to
658         thread-safe-ize the library.
659
660 2002-12-12  Havoc Pennington  <hp@pobox.com>
661
662         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
663         below new interfaces and include fewer system headers.
664
665         * dbus/dbus-sysdeps.c (_dbus_read): new function
666         (_dbus_write): new function
667         (_dbus_write_two): new function
668         (_dbus_connect_unix_socket): new function
669         (_dbus_listen_unix_socket): new function
670
671         * dbus/dbus-message-internal.h: change interfaces to use
672         DBusString
673
674 2002-12-11  Havoc Pennington  <hp@pobox.com>
675
676         * dbus/dbus-types.h: add dbus_unichar
677
678         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
679
680         * dbus/dbus-connection.c (dbus_connection_send_message): return
681         TRUE on success
682
683         * dbus/dbus-transport.c: include dbus-watch.h   
684
685         * dbus/dbus-connection.c: include dbus-message-internal.h
686
687         * HACKING: add file with coding guidelines stuff.
688
689         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
690         handling here, for security purposes (as in vsftpd). Not actually
691         using this class yet.
692
693         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
694         system/libc usage here, as in vsftpd, for ease of auditing (and
695         should also simplify portability). Haven't actually moved all the
696         system/libc usage into here yet.
697         
698 2002-11-25  Havoc Pennington  <hp@pobox.com>
699
700         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
701         always print the first verbose message.
702
703 2002-11-24  Havoc Pennington  <hp@pobox.com>
704
705         * test/echo-client.c, test/echo-server.c: cheesy test 
706         clients.
707         
708         * configure.in (AC_CHECK_FUNCS): check for writev
709
710         * dbus/dbus-message.c (_dbus_message_get_network_data): new
711         function
712
713         * dbus/dbus-list.c (_dbus_list_foreach): new function
714
715         * dbus/dbus-internals.c (_dbus_verbose): new function
716
717         * dbus/dbus-server.c, dbus/dbus-server.h: public object
718         representing a server that listens for connections.
719
720         * dbus/.cvsignore: create
721
722         * dbus/dbus-errors.h, dbus/dbus-errors.c:
723         public API for reporting errors
724
725         * dbus/dbus-connection.h, dbus/dbus-connection.c:
726         public object representing a connection that 
727         sends/receives messages. (Same object used for 
728         both client and server.)
729
730         * dbus/dbus-transport.h, dbus/dbus-transport.c:
731         Basic abstraction for different kinds of stream
732         that we might read/write messages from.
733
734 2002-11-23  Havoc Pennington  <hp@pobox.com>
735
736         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
737         _DBUS_INT_MAX
738
739         * dbus/dbus-test.c (main): add list test, and include 
740         dbus-test.h as intended
741
742         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
743         (_dbus_hash_table_remove_int): return value indicates 
744         whether the entry existed to remove
745
746         * dbus/dbus-list.c: add linked list utility class, 
747         with docs and tests
748
749         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
750         array sometimes.
751
752 2002-11-23  Havoc Pennington  <hp@pobox.com>
753
754         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
755         DBUS_END_DECLS to nothing, that should fix this once and for all
756
757         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
758
759         * dbus/dbus-message.c, dbus/dbus-hash.c: 
760         add some missing @brief
761
762 2002-11-23  Havoc Pennington  <hp@pobox.com>
763
764         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
765         to avoid confusing Doxygen
766
767         * dbus/dbus-hash.c: @} not }@
768
769         * dbus/dbus-message.c (struct DBusMessage): split out 
770         internals docs
771
772 2002-11-23  Havoc Pennington  <hp@pobox.com>
773
774         * configure.in: pile on more warning flags if using gcc
775
776         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
777         to document static functions
778
779         * configure.in: add summary to end of configure so it 
780         looks nice and attractive
781
782         * dbus/dbus-hash.c: finish implementation and write unit 
783         tests and docs
784
785         * configure.in: add --enable-tests to enable unit tests
786
787         * dbus/dbus-test.c: test program to run unit tests 
788         for all files in dbus/*, initially runs a test for 
789         dbus-hash.c
790         
791         * dbus/dbus-internals.h: file to hold some internal utility stuff
792
793 2002-11-22  Havoc Pennington  <hp@redhat.com>
794
795         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
796         "ported" away from Tcl
797
798         * dbus/dbus-types.h: header for types such as dbus_bool_t
799
800 2002-11-22  Havoc Pennington  <hp@redhat.com>
801
802         * dbus/dbus.h: fixups for doc warnings
803
804         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
805         macros
806         (QUIET): make it quiet so we can see warnings
807
808         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
809
810 2002-11-22  Havoc Pennington  <hp@redhat.com>
811
812         * Makefile.am: include "Doxyfile" target in all-local
813
814         * configure.in: generate the Doxyfile
815
816         * Doxyfile.in: move Doxyfile here, so we can use 
817         configure to generate a Doxyfile with the right 
818         version number etc.
819
820 2002-11-22  Havoc Pennington  <hp@redhat.com>
821
822         * dbus/dbus-message.c: move inline docs into .c file
823
824         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
825         so all docs are under doc/
826         (MAN_EXTENSION): generate man pages. Use extension 
827         ".3dbus" which matches ".3qt" on my system, 
828         I guess this is OK, I don't know really.
829         (FILE_PATTERNS): look for .c files not .h, makes sense
830         for plain C I think
831
832 2002-11-22  Havoc Pennington  <hp@pobox.com>
833
834         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
835         because any app can be a server, and any app can be a client, 
836         the bus is a special kind of server.
837
838 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
839
840         * Doxyfile : adding. Still needs Makefile rules to be generated
841         automatically (just run "doxygen" in the toplevel dir for now to
842         generate docs)
843         
844         * dbus/dbus-message.h : Adding sample docs (javadoc since
845         resembles gtk-doc a little more)
846
847         * dbus/dbus.h : Adding sample docs
848
849 2002-11-21  Havoc Pennington  <hp@redhat.com>
850
851         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
852         so we can allow ourselves to include files directly, 
853         instead of having to use dbus.h
854
855         * dbus/dbus.h: fill in
856
857         * dbus/dbus-message.h: sketch out a sample header file.
858         Include griping if you include it directly instead of 
859         via dbus.h
860
861         * dbus/dbus-macros.h: new file with macros for extern "C", 
862         TRUE/FALSE, NULL, etc.
863
864         * doc/file-boilerplate.c: put include guards in here
865
866 2002-11-21  Havoc Pennington  <hp@redhat.com>
867
868         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
869
870         * COPYING: include the GPL as well, and license code 
871         under both AFL and GPL.
872
873 2002-11-21  Havoc Pennington  <hp@redhat.com>
874
875         * acconfig.h: get rid of this
876
877         * autogen.sh (run_configure): add --no-configure option
878
879         * configure.in: remove AC_ARG_PROGRAM to make
880         autoconf complain less. add AC_PREREQ. 
881         add AC_DEFINE third arg.
882         
883 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
884
885         * doc/Makefile.am:
886         Fix references so we can distcheck.
887
888 2002-11-21  Havoc Pennington  <hp@redhat.com>
889
890         * Initial module creation
891