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