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