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