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