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