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