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