2003-02-22 Havoc Pennington <hp@pobox.com>
[platform/upstream/dbus.git] / ChangeLog
1 2003-02-22  Havoc Pennington  <hp@pobox.com>
2
3         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5
6         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7
8         * dbus/test/data/sha-1: add US government test suite for SHA-1
9
10 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
11
12         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
13         Make string arrays NULL-terminated.
14         
15         * dbus/dbus-memory.c: (dbus_free_string_array):
16         * dbus/dbus-memory.h:
17         New function for freeing NULL-terminated string arrays.
18         
19         * dbus/dbus-message-builder.c: (append_quoted_string),
20         (_dbus_message_data_load):
21         Add support for array types.
22         
23         * dbus/dbus-message.c: (check_message_handling):
24         Add more types as test cases.
25         
26         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
27         (_dbus_string_parse_double):
28         Add the start offset to the end offset.
29         
30         * test/data/valid-messages/lots-of-arguments.message:
31         New test message with lots of arguments.
32         
33 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
34
35         * dbus/dbus-message.c: (dbus_message_append_nil),
36         (dbus_message_append_int32), (dbus_message_append_uint32),
37         (dbus_message_append_double), (dbus_message_append_string),
38         (dbus_message_append_int32_array),
39         (dbus_message_append_uint32_array),
40         (dbus_message_append_double_array),
41         (dbus_message_append_byte_array),
42         (dbus_message_append_string_array):
43         Fix all out-of-memory handling in these functions.
44
45 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
46
47         * dbus/dbus-message.c: (dbus_message_append_nil):
48         Fix a silly.
49         
50 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
51
52         * dbus/dbus-message.c: (dbus_message_append_args_valist),
53         (dbus_message_append_nil), (dbus_message_append_int32_array),
54         (dbus_message_append_uint32_array),
55         (dbus_message_append_double_array),
56         (dbus_message_append_byte_array),
57         (dbus_message_append_string_array), (dbus_message_get_args_valist),
58         (dbus_message_iter_get_int32_array),
59         (dbus_message_iter_get_uint32_array),
60         (dbus_message_iter_get_double_array),
61         (dbus_message_iter_get_byte_array),
62         (dbus_message_iter_get_string_array):
63
64         * dbus/dbus-message.h:
65         Add functions for appending and getting arrays.
66         
67 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
68
69         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
70         element size at least 8 bytes, fixes mempool tests on
71         64-bit machines.
72
73 2003-02-20  Alexander Larsson  <alexl@redhat.com>
74
75         * dbus/dbus-transport-unix.c (unix_do_iteration):
76         Unlock the connection mutex during a blocking select call.
77         Add todo about how we need a way to wake up the select.
78
79         * dbus/dbus-connection-internal.h: 
80         * dbus/dbus-connection.c:
81         Add _dbus_connection_lock and _dbus_connection_unlock.
82
83 2003-02-19  Havoc Pennington  <hp@pobox.com>
84
85         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
86         Doxyfile.in, not Doxyfile
87
88         * dbus/dbus-keyring.c: do some hacking on this
89
90         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
91
92         * dbus/dbus-errors.c (dbus_set_error_const): do not call
93         dbus_error_init
94         (dbus_set_error): remove dbus_error_init, check for message ==
95         NULL *before* we sprintf into it, and add @todo about including 
96         system headers in this file
97
98         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
99
100         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
101
102         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
103         get various bits of user information based on either username 
104         or user ID
105         (_dbus_homedir_from_username): new function
106
107 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
108
109         * configure.in:
110         Add check for nonposix getpwnam_r
111         
112         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
113         Align the pool element size to a sizeof (void *) boundary.
114         
115         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
116         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
117         General Solaris fixes.
118         
119         * test/data/valid-messages/simplest-manual.message:
120         Explicitly state that we want little-endian packing.
121         
122 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
123
124         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
125
126         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket): 
127         Added to create a transport connecting using a tcp/ip socket.
128
129         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
130         to a tcp socket at given host and port.
131         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
132         hostname and port.
133
134         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
135
136         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket): 
137         Added to create a server listening on a TCP/IP socket.
138
139 2003-02-19  Havoc Pennington  <hp@pobox.com>
140
141         Throughout: mop up all the Doxygen warnings and undocumented
142         stuff.
143         
144         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
145         to search any paths.
146
147         * dbus/dbus-threads.c: move global mutex initializers to
148         dbus-internals.h, multiple prototypes was confusing doxygen
149         besides being kind of ugly
150
151         * Doxyfile (PREDEFINED): have Doxygen define
152         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from 
153         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
154         (do not abuse the feature! it's for stuff like the autogenerated 
155         macros in dbus-md5.c, not just for things you don't feel like 
156         documenting...)
157
158 2003-02-18  Havoc Pennington  <hp@pobox.com>
159
160         * dbus/dbus-string.c (_dbus_string_zero): new function
161
162         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
163         wrap it in some dbus-friendly API
164
165         * dbus/dbus-types.h: add 16-bit types
166
167 2003-02-18  Joe Shaw  <joe@assbarn.com>
168
169         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
170         credentials from our currently running process.
171         (get_word): Fix a buglet where we were copying the entire length
172         instead of relative to our position.
173
174         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
175         keys on the stack... it's 640k of data.
176
177         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
178         read the credentials byte off the socket, even if we don't have
179         SO_PEERCRED.
180         (_dbus_poll): Implement poll() using select() for systems which
181         don't have it.
182
183         * glib/test-dbus-glib.c (main): Print out an error if no
184         parameters are given.
185
186         * test/data/auth/fallback.auth-script: Added.  Tests that a client
187         can fallback to a secondary auth mechanism if the first fails.
188
189 2003-02-18  Havoc Pennington  <hp@pobox.com>
190
191         * AUTHORS: add Alex
192
193 2003-02-17  Havoc Pennington  <hp@pobox.com>
194
195         * doc/dbus-specification.sgml: lots of cosmetic
196         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
197         env variable to DBUS_BUS_ADDRESS, s/client/application/,
198         s/server/bus/ (except in authentication section). Add a section
199         "Message Bus Message Routing"
200
201 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
202
203         Release 0.4
204         
205         * NEWS: Update
206
207 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
208
209         * doc/dbus-specification.sgml:
210         Specification updates.
211         
212 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
213
214         * bus/activation.c: (bus_activation_init), (child_setup),
215         (bus_activation_activate_service):
216         * bus/activation.h:
217         * bus/main.c: (main):
218         Set DBUS_ADDRESS environment variable.
219         
220         * dbus/dbus-errors.c: (dbus_set_error):
221         Don't use va_copy since that's a C99 feature.
222         
223         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
224         (_dbus_spawn_async):
225         * dbus/dbus-sysdeps.h:
226         Add child_setup_func to _dbus_spawn_async.
227         
228         * doc/dbus-specification.sgml:
229         Update specification.
230         
231         * test/spawn-test.c: (setup_func), (main):
232         Fix test.
233         
234 2003-02-17  Alexander Larsson  <alexl@redhat.com>
235
236         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
237         Added todo.
238
239 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
240
241         * doc/.cvsignore:
242         * doc/Makefile.am:
243         * doc/dbus-test-plan.sgml:
244         Add test plan document.
245         
246         * test/Makefile.am:
247         Fix distcheck.
248         
249 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
250
251         * dbus/dbus-message.c: (decode_header_data),
252         (_dbus_message_loader_return_buffer):
253         Set the header padding amount when loading a message.
254
255 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
256
257         * bus/dispatch.c: (send_one_message):
258         Only send broadcast messages to registered connections.
259         
260         * dbus/dbus-message.c: (dbus_message_name_is):
261         * dbus/dbus-message.h:
262         New convenience function.
263         
264         * dbus/dbus-transport-debug.c: (do_reading):
265         Only dispatch one message per run.
266
267         * test/Makefile.am:
268         * test/bus-test.c: (new_connection_callback), (die),
269         (test_hello_client1_handler), (test_hello_client2_handler),
270         (test_hello_replies), (main):
271
272         * test/bus-test-loop.[ch]:
273         Add these.
274         
275 2003-02-16  Havoc Pennington  <hp@pobox.com>
276
277         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
278         backward conditional
279
280 2003-02-16  Alexander Larsson  <alexl@redhat.com>
281
282         * dbus/dbus-connection.c:
283         Implement sent_message_with_reply. (with_reply_and block is still
284         busted).
285         Made dispatch_message not lose message if OOM.
286         
287         * dbus/dbus-errors.h:
288         Add NoReply error (for reply timeouts).
289
290 2003-02-16  Alexander Larsson  <alexl@redhat.com>
291
292         * dbus/dbus-hash.c (_dbus_hash_table_unref):
293         Actually free keys and values when destroying hashtable.
294
295 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
296
297         * dbus/dbus-auth.c: (client_try_next_mechanism):
298         Plug a leak.
299         
300         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
301         Return TRUE if there's no thread implementation around.
302         
303         * glib/dbus-gmain.c: (free_source),
304         (dbus_connection_hookup_with_g_main):
305         Make sure to remove the GSource when the connection is finalized.
306         
307 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
308
309         * bus/dispatch.c: (bus_dispatch_message_handler):
310         * dbus/dbus-errors.h:
311         Return an error if someone tries to send a message to a service
312         that doesn't exist.
313         
314 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
315
316         * bus/activation.c: (load_directory), (bus_activation_init),
317         (bus_activation_activate_service):
318         * bus/activation.h:
319         * bus/driver.c: 
320         (bus_driver_handle_activate_service), (bus_driver_handle_message):
321         More work on the activation handling.
322         
323         * dbus/dbus-errors.h:
324         Add some error messages
325         
326         * dbus/dbus-message.c: (dbus_message_new_error_reply):
327         * dbus/dbus-message.h:
328         New function that creates an error message.
329         
330         * dbus/dbus-protocol.h:
331         Add ACTIVATE_SERVER message.
332         
333         * dbus/dbus-server-unix.c: (unix_handle_watch),
334         (_dbus_server_new_for_domain_socket):
335         Call _dbus_fd_set_close_on_exec.
336         
337         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
338         (_dbus_spawn_async), (_dbus_disable_sigpipe),
339         (_dbus_fd_set_close_on_exec):
340         * dbus/dbus-sysdeps.h:
341         Add _dbus_fd_set_close_on exec function. Also add function that checks
342         that all open fds are set to close-on-exec and warns otherwise.
343         
344         * dbus/dbus-transport-unix.c:
345         (_dbus_transport_new_for_domain_socket):
346         Call _dbus_fd_set_close_on_exec.
347
348 2003-02-16  Havoc Pennington  <hp@pobox.com>
349
350         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
351         allow people to avoid setting SIGPIPE to SIG_IGN
352         (_dbus_connection_new_for_transport): disable SIGPIPE unless 
353         we've been asked not to
354
355 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
356
357         * dbus/dbus-list.c: (_dbus_list_append_link),
358         (_dbus_list_prepend_link):
359         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
360         (dbus_realloc):
361         Warning fixes.
362
363 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
364
365         * bus/Makefile.am:
366         * bus/activation.c: (bus_activation_entry_free),
367         (add_desktop_file_entry), (load_directory), (bus_activation_init):
368         * bus/activation.h:
369         * bus/main.c: (main):
370         Add simple activation support, doesn't work yet though.
371
372 2003-02-15   Zack Rusin  <zack@kde.org>
373
374         * qt/dbus-qthread.cpp:  small casting fix
375
376 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
377
378         * dbus/dbus-errors.c: (dbus_set_error):
379         * dbus/dbus-errors.h:
380         Add a few errors and make dbus_set_error void.
381         
382         * dbus/dbus-sysdeps.c: 
383         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
384         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
385         * dbus/dbus-sysdeps.h:
386         Add _dbus_spawn_async.
387         
388         * test/spawn-test.c: (main):
389         Test for _dbus_spawn_async.
390         
391 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
392
393         * dbus/dbus-internals.h:
394         Fix build without tests.
395         
396         * dbus/dbus-list.c: (alloc_link):
397         Fix a segfault when a malloc fails.
398         
399         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
400         (dbus_malloc0), (dbus_realloc):
401         Add support for malloc debugging.
402
403 2003-02-15  Alexander Larsson  <alexl@redhat.com>
404
405         * dbus/dbus-threads.c:
406         * dbus/dbus-threads.h:
407         Add condvars. Remove static mutext from API.
408         Implement static mutexes by initializing them from threads_init.
409         
410         * glib/dbus-gthread.c:
411         * qt/dbus-qthread.cpp:
412         Update with the thread api changes.
413
414                 
415         * dbus/dbus-list.c:
416         * dbus/dbus-list.h:
417         Turn StaticMutex into normal mutex + init function.
418         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
419         _dbus_list_append_link, _dbus_list_prepend_link
420
421
422         * dbus/dbus-sysdeps.c: 
423         * dbus/dbus-sysdeps.h:
424         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
425         _dbus_atomic_dec. Only slow fallback implementation at the moment.
426         
427         * dbus/dbus-protocol.h:
428         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
429         
430         * dbus/dbus-message.c:
431         Make ref/unref atomic.
432         Fix some docs.
433         
434         * dbus/dbus-connection-internal.h:
435         * dbus/dbus-connection.c:
436         * dbus/dbus-connection.h:
437         Make threadsafe.
438         Change _peek to _borrow,_return & _steal_borrowed.
439         Change disconnect callback to event.
440         Make dbus_connection_dispatch_messages reentrant.
441         
442         * dbus/dbus-transport.c:
443         Don't ref the connection on calls to the transport
444         implementation.
445         
446         * dbus/dbus-message-handler.c:
447         Make threadsafe.
448         
449         * glib/dbus-gmain.c:
450         Don't use peek_message anymore
451         
452         * test/Makefile.am:
453         * test/debug-thread.c:
454         * test/debug-thread.h:
455         Simple thread implementation that asserts() on deadlocks in
456         single-threaded code.
457         
458         * test/bus-test.c:
459         (main) Call debug_threads_init.
460
461         * test/watch.c:
462         Use disconnect message instead of disconnect callback.
463
464         * bus/connection.c:
465         * bus/connection.h:
466         Don't call dbus_connection_set_disconnect_function. Instead export
467         bus_connection_disconnect.
468         
469         * bus/dispatch.c:
470         Call bus_connection_disconnect when we get a disconnected message.
471         
472 2003-02-15  Havoc Pennington  <hp@pobox.com>
473
474         * dbus/dbus-message.c (dbus_message_new): fool around with the
475         docs
476
477 2003-02-14  Havoc Pennington  <hp@pobox.com>
478
479         * dbus/dbus-mempool.c: fail if the debug functions so indicate
480
481         * dbus/dbus-memory.c: fail if the debug functions indicate we
482         should
483
484         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
485         (_dbus_decrement_fail_alloc_counter): debug functions to 
486         simulate memory allocation failures
487
488 2003-02-14  Havoc Pennington  <hp@pobox.com>
489
490         * dbus/dbus-errors.h (struct DBusError): add a word of padding 
491         to DBusError
492
493 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
494
495         * bus/driver.c: (bus_driver_handle_hello):
496         * bus/driver.h:
497         * bus/services.c: (bus_service_lookup):
498         Reorder message sending so we get a more sane order.
499         
500         * test/bus-test.c: (message_handler):
501         Fix tyop.
502         
503 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
504
505         * bus/driver.c: (bus_driver_send_service_deleted),
506         (bus_driver_send_service_created), (bus_driver_send_service_lost),
507         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
508         (bus_driver_send_welcome_message),
509         (bus_driver_handle_list_services),
510         (bus_driver_handle_acquire_service),
511         (bus_driver_handle_service_exists):
512         * dbus/dbus-bus.c: (dbus_bus_register_client),
513         (dbus_bus_acquire_service), (dbus_bus_service_exists):
514         * dbus/dbus-errors.c: (dbus_result_to_string):
515         * dbus/dbus-errors.h:
516         * dbus/dbus-message.c: (dbus_message_append_args),
517         (dbus_message_append_args_valist), (dbus_message_get_args),
518         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
519         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
520         (dbus_message_iter_get_byte_array),
521         (dbus_message_iter_get_string_array), (message_iter_test),
522         (check_message_handling), (_dbus_message_test):
523         * dbus/dbus-message.h:
524         * test/bus-test.c: (main):
525         Change fields to arguments in messages, so that they won't be
526         confused with header fields.
527         
528         * glib/test-dbus-glib.c: (main):
529         Remove append_fields from hello message.
530         
531 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
532
533         * dbus/dbus-errors.c:
534         * dbus/dbus-message.c:
535         * dbus/dbus-string.c:
536         Documentation fixes.
537
538 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
539
540         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
541         (remove_timeout):
542         Implement support for timeouts in dbus-glib.
543         
544 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
545
546         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
547         * dbus/dbus-message.c: (process_test_subdir):
548         * test/break-loader.c: (find_breaks_based_on):
549         Plug some memory leaks.
550         
551 2003-02-13  Richard Hult  <rhult@codefactory.se>
552
553         * bus/main.c: Fix build.
554
555         * dbus/dbus-errors.h: 
556         * dbus/dbus-errors.c: Fix copyright for Anders.
557
558 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
559
560         * bus/Makefile.am:
561         Add utils.[ch]
562         
563         * bus/connection.c: (bus_connection_foreach):
564         Fix a warning.
565         
566         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
567         (unescape_string), (new_section), (parse_section_start),
568         (parse_key_value), (report_error), (bus_desktop_file_load),
569         (bus_desktop_file_get_string):
570         * bus/desktop-file.h:
571         Use DBusError for error reporting.
572         
573         * bus/dispatch.c: (send_one_message),
574         (bus_dispatch_message_handler):
575         * bus/driver.c: (bus_driver_send_service_deleted),
576         (bus_driver_send_service_created), (bus_driver_send_service_lost),
577         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
578         (bus_driver_send_welcome_message),
579         (bus_driver_handle_list_services),
580         (bus_driver_handle_acquire_service),
581         (bus_driver_handle_service_exists):
582         * bus/loop.c: (bus_loop_run):
583         * bus/main.c:
584         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
585         
586         * bus/utils.c: (bus_wait_for_memory):
587         * bus/utils.h:
588         New files with general utility functions.
589         
590         * dbus/dbus-internals.h:
591         Remove _DBUS_HANDLE_OOM.
592         
593 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
594
595         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
596         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
597         * dbus/dbus-errors.h:
598         Add DBusError structure.
599         
600 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
601
602         * test/data/valid-messages/standard-acquire-service.message:
603         * test/data/valid-messages/standard-hello.message:
604         * test/data/valid-messages/standard-list-services.message:
605         * test/data/valid-messages/standard-service-exists.message:
606         Add some standard messages.
607         
608 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
609
610         * bus/driver.c: (bus_driver_send_welcome_message),
611         (bus_driver_handle_list_services),
612         (bus_driver_handle_acquire_service),
613         (bus_driver_handle_service_exists), (bus_driver_handle_message):
614         Update for API changes in libdbus.
615         
616         * dbus/dbus-message.c: (dbus_message_new_reply):
617         * dbus/dbus-message.h:
618         Remove the name argument. The spec states that replies shouldn't
619         have a name.
620
621 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
622
623         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
624         (report_error), (bus_desktop_file_load), (lookup_section),
625         (lookup_line), (bus_desktop_file_get_raw),
626         (bus_desktop_file_get_string):
627         * bus/desktop-file.h:
628         Some fixes, and new functions for getting a key value from a section.
629         
630 2003-02-13  Havoc Pennington  <hp@pobox.com>
631
632         * test/data/auth/fail-after-n-attempts.auth-script: new test
633
634         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
635         reject the client.
636
637 2003-02-13  Havoc Pennington  <hp@pobox.com>
638
639         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
640         dbus_credentials_match were backward
641
642         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
643         NO_CREDENTIALS and ROOT_CREDENTIALS
644
645         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine 
646         into here. Never process more commands after we've reached an 
647         end state; store further data as unused bytes.
648
649         * test/data/auth/*: add more auth tests
650         
651         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
652         command to match exact string and EXPECT_UNUSED to match unused
653         bytes
654
655         * test/Makefile.am (dist-hook): fix to dist all the test stuff
656
657 2003-02-12  Havoc Pennington  <hp@pobox.com>
658
659         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
660         \r off of popped lines
661
662         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
663         scripts
664
665         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
666         SEND, append \r\n
667
668 2003-02-12  Havoc Pennington  <hp@pobox.com>
669
670         * dbus/Makefile.am: remove break-loader from the build, since it
671         moved.
672
673         * configure.in: add --enable-gcov to turn on coverage profiling
674         flags and disable optimization
675
676 2003-02-10  Havoc Pennington  <hp@pobox.com>
677
678         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync 
679         initial cut at test framework for DBusAuth from laptop.
680         Doesn't quite work yet but it compiles and I need to get 
681         it off the 266mhz laptop. ;-)
682         
683         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
684         fix a memleak in error case
685
686 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
687
688         * bus/Makefile.am:
689         * bus/desktop-file.c:
690         * bus/desktop-file.h:
691         Add a desktop file parser.
692
693 2003-02-11  Zack Rusin  <zack@kde.org>
694
695         * qt/message.[h|cpp]: sample implementation
696         of the KDE wrapper for DBusMessage
697
698 2003-02-09  Zack Rusin  <zack@kde.org>
699
700         * test/bus-test.c: make_it_compile
701         * doc/dbus-specification.sgml: minimal semantic fix
702
703 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
704
705         Release 0.3
706         
707         * NEWS: Update
708
709 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
710
711         * dbus/Makefile.am:
712         * dbus/dbus-break-loader.c:
713         * test/Makefile.am:
714         * test/break-loader.c:
715         Move dbus-break-loader to test/ and rename it to break-loader.
716
717 2003-02-02  Havoc Pennington  <hp@pobox.com>
718
719         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files 
720         for code to manage cookies in your home directory
721
722         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
723
724         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
725         to authenticate, then disconnect the client.
726
727 2003-02-03  Alexander Larsson  <alexl@redhat.com>
728
729         * dbus/dbus-message.c (dbus_message_append_fields):
730         Correct docs.
731
732 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
733
734         * doc/dbus-specification.sgml:
735         Update address format section.
736         
737 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
738
739         * test/Makefile.am:
740         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
741         (message_handler), (new_connection_callback), (loop_quit),
742         (loop_run), (main):
743         Add bus test.
744         
745 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
746
747         * bus/driver.c: (bus_driver_handle_service_exists):
748         Simplify the code a bit.
749         
750         * dbus/dbus-bus.c: (dbus_bus_service_exists):
751         Fix a silly. 
752         
753 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
754
755         * bus/Makefile.am:
756         Add libdbus-daemon.la and link to it.
757
758 2003-02-01  James Willcox  <jwillcox@gnome.org>
759
760         * bus/driver.c: (bus_driver_handle_own_service):
761         Actually include the service reply code in the message.
762
763 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
764
765         * bus/driver.c: (bus_driver_handle_service_exists):
766         Don't unref the incoming message.
767         
768 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
769
770         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
771
772 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
773
774         * dbus/dbus-server.c: (dbus_server_listen):
775         * dbus/dbus-transport.c: (_dbus_transport_open):
776         ifdef out the calls to the debug transport and server.
777         
778 2003-02-02  Alexander Larsson  <alexl@redhat.com>
779
780         * dbus/dbus-watch.c (dbus_watch_get_flags):
781         Add note in the docs that ERROR or HANGUP won't be returned
782         and are assumed always on.
783
784         * glib/dbus-gmain.c (add_watch):
785         Always add IO_ERR | IO_HUP
786
787         * dbus/dbus-message.h:
788         Add semicolon after dbus_message_iter_get_string_array().
789         Makes qt code build again
790
791 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
792
793         * bus/driver.c: (create_unique_client_name),
794         (bus_driver_handle_hello):
795         Don't take a name, just use a numeric id to identify
796         each client.
797         
798         * dbus/Makefile.am:
799         * dbus/dbus-bus.c: (dbus_bus_register_client),
800         (dbus_bus_acquire_service), (dbus_bus_service_exists):
801         * dbus/dbus-bus.h:
802         Add new convenience functions for communicating with the bus.
803         
804         * dbus/dbus-message.h:
805         
806         * dbus/dbus-protocol.h:
807         Fix a typo.
808         
809 2003-02-01  Alexander Larsson  <alexl@redhat.com>
810
811         * dbus/dbus-message.c (dbus_message_append_fields):
812         Add some more doc comments.
813
814 2003-02-01  Havoc Pennington  <hp@pobox.com>
815
816         * dbus/dbus-break-loader.c (randomly_modify_length): change 
817         a 4-byte value in the message as if it were a length
818
819         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
820         execute bit on saved files
821
822 2003-02-01  Havoc Pennington  <hp@pobox.com>
823
824         * dbus/dbus-break-loader.c (main): new program to find messages
825         that break the loader.
826
827         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
828         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
829
830         * dbus/dbus-string.c (_dbus_string_set_byte): new
831         
832 2003-01-31  Havoc Pennington  <hp@pobox.com>
833
834         * dbus/dbus-message.c: refactor the test code to be more general, 
835         in preparation for writing a "randomly permute test cases to 
836         try to break the loader" program.
837
838 2003-01-31  Havoc Pennington  <hp@pobox.com>
839         
840         * doc/dbus-specification.sgml: work on the specification
841
842         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check 
843         the protocol version of the message.
844
845         * dbus/dbus-protocol.h: drop special _REPLY names, the spec 
846         no longer specifies that.
847         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 
848         1/2/3/4)
849
850         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
851         "break" for DBUS_TYPE_NIL, remove @todo
852
853 2003-01-31  Havoc Pennington  <hp@pobox.com>
854
855         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename 
856         just set_is_error/get_is_error as this is a commonly-used
857         function, and write docs.
858
859 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
860
861         * dbus/dbus-address.c: (dbus_address_entry_free):
862         Free key and value lists.
863         
864         * dbus/dbus-internals.c: (_dbus_type_to_string):
865         Add the types we didn't have.
866         
867         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
868         (_dbus_marshal_validate_arg):
869         Add NIL types.
870         
871         * dbus/dbus-message.c: (dbus_message_set_sender):
872         Remove todo about being able to set sender to NULL.
873         
874         (dbus_message_set_is_error_reply),
875         (dbus_message_get_is_error_reply):
876         * dbus/dbus-message.h:
877         New functions.
878         
879         * dbus/dbus-protocol.h:
880         Add error reply flag.
881         
882         * test/data/valid-messages/opposite-endian.message:
883         Add NIL type to test.
884         
885 2003-01-31  Havoc Pennington  <hp@pobox.com>
886
887         * doc/dbus-specification.sgml: fully specify the header.  Add
888         flags and major protocol version, and change header/body len to
889         unsigned.
890
891         * dbus/dbus-message-builder.c (append_saved_length): append length
892         as uint32
893
894         * dbus/dbus-message.c (dbus_message_create_header): change header
895         length and body length to unsigned. Add the new fields from the
896         spec
897         (_dbus_message_loader_return_buffer): unsigned header/body len
898
899 2003-01-30  Havoc Pennington  <hp@pobox.com>
900
901         * dbus/dbus-auth.c: rework to use only REJECTED, no 
902         MECHANISMS
903
904         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just 
905         use REJECTED, suggested by Mark McLoughlin
906
907 2003-01-30  Havoc Pennington  <hp@pobox.com>
908
909         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
910         a better way to report errors here. e.g.  "unix address lacks
911         path" or something. also "no such file" when the path doesn't
912         exist, etc.
913
914         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
915         leaking list nodes
916         (dbus_parse_address): add @todo about documenting address format, 
917         and allowing , and ; to be escaped
918
919 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
920
921         * dbus/Makefile.am:
922         Add dbus-address.[ch]
923         
924         * dbus/dbus-address.c: (dbus_address_entry_free),
925         (dbus_address_entries_free), (create_entry),
926         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
927         (dbus_parse_address), (_dbus_address_test):
928         * dbus/dbus-address.h:
929         New files for dealing with address parsing.
930         
931         * dbus/dbus-connection.c:
932         Document timeout functions.
933         
934         * dbus/dbus-message.c:
935         Document dbus_message_new_from_message.
936         
937         * dbus/dbus-server-debug.c:
938         Document.
939         
940         * dbus/dbus-server.c: (dbus_server_listen):
941         Parse address and use correct server implementation.
942         
943         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
944         * dbus/dbus-string.h:
945         New function with test.
946         
947         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
948         * dbus/dbus-test.h:
949         Add address tests.
950         
951         * dbus/dbus-transport-debug.c:
952         Document.
953         
954         * dbus/dbus-transport.c: (_dbus_transport_open):
955         Parse address and use correct transport implementation. 
956
957 2003-01-30  Havoc Pennington  <hp@pobox.com>
958
959         * dbus/dbus-message.c: use message->byte_order instead of 
960         DBUS_COMPILER_BYTE_ORDER throughout.
961         (dbus_message_create_header): pad header to align the 
962         start of the body of the message to 8-byte boundary
963
964         * dbus/dbus-marshal.h: make all the demarshalers take const 
965         DBusString arguments.
966
967         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
968         validate message args here, so we don't have to do slow validation
969         later, and so we catch bad messages as they are incoming. Also add
970         better checks on header_len and body_len. Also fill in
971         message->byte_order
972
973         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
974         implemented properly)
975         (_dbus_string_validate_nul): new function to check all-nul
976
977         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename 
978         get_arg_end_pos and remove all validation
979         (_dbus_marshal_validate_arg): actually do validation here.
980
981 2003-01-29  Havoc Pennington  <hp@pobox.com>
982
983         * dbus/dbus-message.c (check_message_handling): fix assertion
984         failure on set_client_serial
985
986 2003-01-28  Havoc Pennington  <hp@pobox.com>
987
988         * dbus/dbus-server-debug.c: Add doc section comments
989         
990         * dbus/dbus-transport-debug.c: add doc section comments
991         
992 2003-01-28  Havoc Pennington  <hp@redhat.com>
993
994         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
995         the reverse order from how I had it
996         (_dbus_string_base64_encode): reverse encoding order. I was
997         basically byteswapping everything during encoding.
998
999 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
1000
1001         * dbus/dbus-connection-internal.h:
1002         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1003         (_dbus_connection_remove_timeout):
1004         Add functions for adding and removing timeouts.
1005         
1006         * dbus/dbus-message.c: (dbus_message_new_from_message):
1007         Add new function that takes a message and creates an exact
1008         copy of it, but with the refcount set to 1.
1009         (check_message_handling):
1010         Fix build error.
1011         
1012         * dbus/dbus-server-protected.h:
1013         * dbus/dbus-server.c: (_dbus_server_init_base),
1014         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1015         (dbus_server_set_timeout_functions):
1016         (_dbus_server_remove_timeout):
1017         New functions so that a server can add and remove timeouts.
1018
1019         (dbus_server_listen):
1020         Add commented out call to dbus_server_debug_new.
1021
1022         * dbus/dbus-timeout.c: (_dbus_timeout_new):
1023         Actually set the handler, doh.
1024         
1025         * dbus/dbus-transport.c: (_dbus_transport_open):
1026         Add commented out call to dbus_transport_debug_client_new.
1027         
1028         * dbus/Makefile.am:
1029         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1030         
1031 2003-01-28  Havoc Pennington  <hp@pobox.com>
1032
1033         * dbus/dbus-message.c (check_message_handling): function to check 
1034         on the loaded message, iterates over it etc.
1035
1036 2003-01-28  Havoc Pennington  <hp@pobox.com>
1037
1038         * test/Makefile.am (dist-hook): fix make distdir
1039
1040         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1041
1042 2003-01-27  Havoc Pennington  <hp@pobox.com>
1043
1044         * dbus/dbus-mempool.c (time_for_size): replace printf with 
1045         _dbus_verbose
1046
1047         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1048         empty lines; fix the SAVE_LENGTH stuff to be
1049         START_LENGTH/END_LENGTH so it actually works; couple other 
1050         bugfixes
1051         
1052         * test/Makefile.am (dist-hook): add dist-hook for .message files
1053
1054         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1055         can be constant or locked.
1056         (_dbus_string_free): allow freeing a const string as
1057         documented/intended
1058
1059         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1060
1061         * dbus/dbus-test-main.c (main): take an argument which is the 
1062         directory containing test data
1063
1064         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1065         argument to this and load all the messages in test/data/
1066         checking that they can be loaded or not loaded as appropriate.
1067
1068 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
1069
1070         * bus/dispatch.c: (bus_dispatch_message_handler):
1071         Dispatch messages sent to services.
1072         
1073         * bus/driver.c: (bus_driver_send_service_deleted),
1074         (bus_driver_send_service_created), (bus_driver_send_service_lost),
1075         (bus_driver_send_service_acquired):
1076         Add helper functions for sending service related messages.
1077
1078         (bus_driver_send_welcome_message):
1079         Send HELLO_REPLY instead of WELCOME.
1080         
1081         (bus_driver_handle_list_services):
1082         Send LIST_SERVICES_REPLY instead of SERVICES.
1083         
1084         (bus_driver_handle_own_service),
1085         (bus_driver_handle_service_exists):
1086         New message handlers.
1087         
1088         (bus_driver_handle_message):
1089         Invoke new message handlers.
1090         
1091         (bus_driver_remove_connection):
1092         Don't remove any services here since that's done automatically
1093         by bus_service_remove_owner now.
1094         
1095         * bus/driver.h:
1096         New function signatures.
1097         
1098         * bus/services.c: (bus_service_add_owner):
1099         Send ServiceAcquired message if we're the only primary owner.
1100         
1101         (bus_service_remove_owner):
1102         Send ServiceAcquired/ServiceLost messages.
1103         
1104         (bus_service_set_prohibit_replacement),
1105         (bus_service_get_prohibit_replacement):
1106         Functions for setting prohibit replacement.
1107         
1108         (bus_service_has_owner):
1109         New function that checks if a connection is in the owner queue of 
1110         a certain service.
1111         
1112         * bus/services.h:
1113         Add new function signatures.
1114         
1115         * dbus/dbus-list.c: (_dbus_list_test):
1116         Add tests for _dbus_list_remove_last and traversing the list backwards.
1117         
1118         * dbus/dbus-list.h:
1119         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1120         go any further, so return NULL then.
1121         
1122         * dbus/dbus-protocol.h:
1123         Add new messages, service flags and service replies.
1124         
1125 2003-01-26  Havoc Pennington  <hp@pobox.com>
1126
1127         * dbus/dbus-message-builder.c: implement, completely untested.
1128
1129         * test/data/*: add data to be used in testing. 
1130         ".message" files are our simple loadable text format.
1131         ".message-raw" will be binary dumps of messages.
1132
1133         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1134
1135 2003-01-26  Havoc Pennington  <hp@pobox.com>
1136
1137         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1138
1139         * dbus/dbus-errors.c (dbus_result_to_string): add
1140         file errors
1141
1142         * dbus/dbus-message-builder.c: new file, will contain code to load
1143         up messages from files. Not implemented yet.
1144
1145 2003-01-26  Havoc Pennington  <hp@pobox.com>
1146
1147         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1148         the sender by setting to NULL
1149
1150 2003-01-26  Havoc Pennington  <hp@pobox.com>
1151
1152         The unit tests pass, but otherwise untested.  If it breaks, the
1153         tests should have been better. ;-)
1154         
1155         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1156         the connection.
1157
1158         * dbus/dbus-message.c: redo everything so we maintain 
1159         message->header as the only copy of the various fields.
1160         This avoids the possibility of out-of-memory in some cases,
1161         for example dbus_message_lock() can't run out of memory anymore,
1162         and avoids extra copying. Figured I may as well go ahead and do 
1163         this since it was busted for dbus_message_lock to not return 
1164         failure on OOM, and dbus_message_write_header was totally
1165         unchecked for OOM. Also fixed some random other bugs.
1166
1167         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1168         that strings are nul-terminated. Also, end_pos can be equal 
1169         to string length just not greater than, I think.
1170         (_dbus_marshal_set_int32): new function
1171         (_dbus_marshal_set_uint32): new function
1172         (_dbus_marshal_set_string): new function
1173
1174         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1175         a warning, init timeout_list to NULL
1176         (dbus_connection_send_message): don't use uninitialized variable
1177         "serial"
1178
1179         * dbus/dbus-string.c (_dbus_string_replace_len): new function
1180
1181 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
1182
1183         * bus/driver.c: (bus_driver_handle_hello),
1184         (bus_driver_send_welcome_message):
1185         Plug leaks
1186         
1187 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
1188
1189         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1190         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1191         (dbus_connection_unref):
1192         * dbus/dbus-marshal.c: (_dbus_marshal_test):
1193         * dbus/dbus-message.c: (dbus_message_unref),
1194         Plug memory leaks.
1195         
1196         (dbus_message_get_fields): 
1197         Remove debugging printout.
1198
1199         (_dbus_message_loader_return_buffer):
1200         Don't store the header string.
1201         
1202         (_dbus_message_test):
1203         Plug leaks.
1204
1205 2003-01-26  Richard Hult  <rhult@codefactory.se>
1206
1207         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1208         the file descriptor list, since it can change under us.
1209
1210 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1211
1212         * glib/dbus-gmain.c: (dbus_connection_prepare),
1213         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1214         (remove_watch), (dbus_connection_hookup_with_g_main):
1215         Rewrite the glib handling to use its own GSource instead of a 
1216         GIOChannel so we can catch messages put in the queue while waiting
1217         for a reply.
1218         
1219 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1220
1221         * bus/Makefile.am:
1222         * bus/connection.c: (connection_disconnect_handler),
1223         (connection_watch_callback), (bus_connection_setup):
1224         * bus/dispatch.c: (send_one_message),
1225         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1226         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1227         * bus/dispatch.h:
1228         * bus/driver.c: (bus_driver_send_service_deleted),
1229         (bus_driver_send_service_created), (bus_driver_handle_hello),
1230         (bus_driver_send_welcome_message),
1231         (bus_driver_handle_list_services), (bus_driver_remove_connection),
1232         (bus_driver_handle_message):
1233         * bus/driver.h:
1234         Refactor code, put the message dispatching in its own file. Use 
1235         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1236         is disconnected.
1237         
1238 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1239
1240         * dbus/dbus-internals.h:
1241         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1242         
1243         * dbus/dbus-message.c: (dbus_message_get_sender):
1244         * dbus/dbus-message.h:
1245         Implement dbus_message_get_sender.
1246         
1247         * dbus/dbus-protocol.h:
1248         Add message and service defines.
1249         
1250 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1251
1252         * dbus/dbus-connection.c: (dbus_connection_send_message):
1253         * dbus/dbus-message-internal.h:
1254         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1255         (dbus_message_write_header):
1256         Remove _dbus_messag_unlock and don't set the client serial on a 
1257         message if one already exists.
1258         
1259 2003-01-24  Havoc Pennington  <hp@pobox.com>
1260
1261         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1262         list_pool
1263
1264         * bus/driver.c (bus_driver_handle_list_services): fix a leak 
1265         on OOM
1266
1267 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1268
1269         * dbus/dbus-list.c: (alloc_link), (free_link):
1270         Use a memory pool for the links.
1271         
1272 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1273
1274         * bus/connection.c: (bus_connection_foreach):
1275         * bus/connection.h:
1276         Add new bus_connection_foreach function.
1277         
1278         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1279         Add function that broadcasts a message to all clients.
1280         
1281         (bus_driver_send_service_created), (bus_driver_handle_hello),
1282         (bus_driver_send_welcome_message),
1283         (bus_driver_handle_list_services), (bus_driver_message_handler):
1284         Implement functions that take care of listing services, and notifying
1285         clients when new services are created.
1286         
1287         * bus/services.c: (bus_services_list):
1288         * bus/services.h:
1289         Add new function that returns an array of strings with the currently
1290         registered services.
1291         
1292         * glib/dbus-glib.h:
1293         * glib/dbus-gmain.c:
1294         Update copyright year.
1295         
1296 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
1297
1298         * dbus/dbus-connection.c: (dbus_connection_send_message):
1299         Unlock the message in case it was sent earlier.
1300         
1301         (dbus_connection_send_message_with_reply_and_block):
1302         Remove the reply message from the list.
1303         
1304         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1305         Set array_len and new_pos correctly.
1306         
1307         (_dbus_marshal_test):
1308         Remove debug output.
1309         
1310         * dbus/dbus-message-internal.h:
1311         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1312         New function that returns the reply serial.
1313         
1314         (_dbus_message_unlock):
1315         New function that unlocks a message and resets its header.
1316
1317         (dbus_message_append_string_array), 
1318         (dbus_message_get_fields_valist),
1319         (dbus_message_iter_get_field_type),
1320         (dbus_message_iter_get_string_array),   
1321         (dbus_message_get_fields),      
1322         (dbus_message_append_fields_valist):
1323         Handle string arrays.
1324         
1325         (dbus_message_set_sender):
1326         Make this function public since the bus daemon needs it.
1327         
1328         (decode_header_data):
1329         Set the reply serial to -1 initially.
1330
1331         * dbus/dbus-message.h:
1332         Add dbus_message_set_sender.    
1333
1334 2003-01-24  Havoc Pennington  <hp@pobox.com>
1335
1336         * doc/dbus-specification.sgml: add some stuff
1337
1338 2003-01-22  Havoc Pennington  <hp@pobox.com>
1339
1340         * doc/dbus-specification.sgml: Start to document the protocol.
1341
1342 2003-01-22  Havoc Pennington  <hp@pobox.com>
1343
1344         * dbus/dbus-connection.c
1345         (dbus_connection_send_message_with_reply_and_block): add some @todo
1346
1347         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1348
1349 2003-01-21  Havoc Pennington  <hp@pobox.com>
1350
1351         (patch untested because can't compile)
1352         
1353         * bus/driver.c (create_unique_client_name): make this function
1354         never recycle client names. Also, caller should initialize 
1355         the DBusString.
1356
1357         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1358
1359 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
1360
1361         * dbus/dbus-marshal.c: (_dbus_marshal_double),
1362         (_dbus_marshal_int32), (_dbus_marshal_uint32),
1363         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1364         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1365         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1366         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1367         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1368         * dbus/dbus-marshal.h:
1369         * dbus/dbus-protocol.h:
1370         Add support for marshalling and demarshalling integer, double
1371         and string arrays.
1372         
1373 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
1374
1375         * bus/Makefile.am:
1376         Add driver.[ch]
1377         
1378         * bus/connection.c: (connection_disconnect_handler):
1379         Remove the connection from the bus driver's list.
1380         
1381         (connection_watch_callback): Dispatch messages.
1382
1383         (free_connection_data): Free connection name.
1384         
1385         (bus_connection_setup): Add connection to the bus driver's list.
1386         (bus_connection_remove_owned_service): 
1387         (bus_connection_set_name), (bus_connection_get_name):
1388         Add functions for setting and getting the connection's name.
1389         
1390         * bus/connection.h:
1391         Add function headers.
1392         
1393         * bus/driver.c: (create_unique_client_name),
1394         (bus_driver_handle_hello_message),
1395         (bus_driver_send_welcome_message), (bus_driver_message_handler),
1396         (bus_driver_add_connection), (bus_driver_remove_connection):
1397         * bus/driver.h:
1398         * bus/main.c:
1399         * bus/services.c: (bus_service_free):
1400         * bus/services.h:
1401         New file that handles communication and registreation with the bus
1402         itself. 
1403         
1404 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
1405
1406         * dbus/dbus-connection.c: (dbus_connection_send_message):
1407         Add a new client_serial parameter.
1408         
1409         (dbus_connection_send_message_with_reply):
1410         Remove a @todo since we've implemented the blocking function.
1411         
1412         (dbus_connection_send_message_with_reply_and_block):
1413         New function that sends a message and waits for a reply and
1414         then returns the reply.
1415         
1416         * dbus/dbus-connection.h:
1417         Add new functions.
1418         
1419         * dbus/dbus-errors.c: (dbus_result_to_string):
1420         * dbus/dbus-errors.h:
1421         Add new DBUS_RESULT.
1422         
1423         * dbus/dbus-message-internal.h:
1424         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1425         (_dbus_message_set_sender), (dbus_message_write_header),
1426         (dbus_message_new_reply), (decode_header_data),
1427         (_dbus_message_loader_return_buffer), (_dbus_message_test):
1428         * dbus/dbus-message.h:
1429         Add new functions that set the reply serial and sender.
1430         Also marshal and demarshal them correctly and add test.
1431         
1432         * dbus/dbus-protocol.h:
1433         Add new DBUS_MESSAGE_TYPE_SENDER.
1434         
1435         * glib/dbus-glib.h:
1436         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1437         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1438         (dbus_connection_hookup_with_g_main):
1439         * glib/test-dbus-glib.c: (main):
1440         Rewrite to use GIOChannel and remove the GSource crack.
1441         
1442         * test/echo-client.c: (main):
1443         * test/watch.c: (check_messages):
1444         Update for changed APIs
1445         
1446 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
1447
1448         * dbus/Makefile.am: Add dbus-timeout.[cħ]
1449         
1450         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1451         Create a DBusTimeoutList.       
1452         (dbus_connection_set_timeout_functions): Add new function to
1453         set timeout callbacks
1454         
1455         * dbus/dbus-connection.h: Add public DBusTimeout API.
1456         
1457         * dbus/dbus-message.c: (dbus_message_get_service):
1458         * dbus/dbus-message.h:  New function.
1459
1460         * dbus/dbus-server.c: Fix small doc typo.
1461         
1462         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1463
1464 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
1465
1466         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1467         of the string, just as long as specified.
1468
1469 2003-01-19  Havoc Pennington  <hp@pobox.com>
1470
1471         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1472         new function
1473
1474         * dbus/dbus-server.c (dbus_server_set_max_connections)
1475         (dbus_server_get_max_connections, dbus_server_get_n_connections):
1476         keep track of current number of connections, and add API for
1477         setting a max (but haven't implemented enforcing the max yet)
1478
1479 2003-01-18  Havoc Pennington  <hp@pobox.com>
1480
1481         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1482         reading/writing if read_watch != NULL or write_watch != NULL.
1483
1484         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1485         the message loader code to actually load message->header and
1486         message->body into the newly-created message.
1487
1488         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1489         in OOM case
1490
1491         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
1492         (dbus_connection_get_max_message_size) 
1493         (dbus_connection_set_max_live_messages_size) 
1494         (dbus_connection_get_max_live_messages_size): implement some
1495         resource limitation functions
1496
1497         * dbus/dbus-resources.c: new file implementing some of the
1498         resource limits stuff
1499
1500         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1501         missing docs, add @todo to handle OOM etc.
1502
1503         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1504         docs
1505         
1506 2003-01-18  Havoc Pennington  <hp@pobox.com>
1507
1508         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
1509         connection if it hasn't been already.
1510
1511         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1512         replace with DisconnectFunction.
1513
1514 2003-01-18  Havoc Pennington  <hp@pobox.com>
1515
1516         Building --disable-verbose-mode --disable-asserts --disable-tests
1517         cuts the library from 112K to 45K or so
1518         
1519         * configure.in: check for varargs macro support, 
1520         add --enable-verbose-mode, --enable-asserts. 
1521
1522         * dbus/dbus-internals.h (_dbus_assert): support
1523         DBUS_DISABLE_ASSERT
1524         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1525
1526 2003-01-18  Havoc Pennington  <hp@pobox.com>
1527
1528         * dbus/dbus-test.c: include config.h so that tests actually run
1529
1530         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1531         so the failure mode when that assumption fails will be plenty
1532         obvious.
1533
1534 2003-01-18  Havoc Pennington  <hp@pobox.com>
1535
1536         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1537
1538         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1539         the distribution
1540
1541         * test/Makefile.am: don't use special variable "TESTS" for echo-*
1542         since we don't want to use those in make check
1543
1544 2003-01-15  Havoc Pennington  <hp@redhat.com>
1545
1546         Release 0.2
1547         
1548         * NEWS: update
1549
1550 2003-01-15  Havoc Pennington  <hp@redhat.com>
1551
1552         * test/Makefile.am: fix so that test source code ends up in the
1553         distribution on make distcheck
1554
1555 2003-01-15  Havoc Pennington  <hp@redhat.com>
1556
1557         Release 0.1.
1558         
1559         * NEWS: update  
1560
1561 2003-01-15  Havoc Pennington  <hp@redhat.com>
1562
1563         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1564         fix build when --disable-tests
1565
1566         * Makefile.am (EXTRA_DIST): put HACKING in here
1567
1568         * HACKING: document procedure for making a tarball release.
1569
1570 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
1571
1572         * bus/connection.c: (connection_error_handler),
1573         (bus_connection_setup):
1574         * bus/main.c: (main):
1575         Make sure that the DBusConnectionData struct is NULLed
1576         out to prevent a segfault.
1577         
1578         * dbus/dbus-errors.c: (dbus_result_to_string):
1579         * dbus/dbus-errors.h:
1580         * dbus/dbus-message.c: (dbus_message_get_fields),
1581         (dbus_message_get_fields_valist), (_dbus_message_test):
1582         * dbus/dbus-message.h:
1583         Make dbus_message_get_fields return a result code so we can
1584         track invalid fields as well as oom.
1585         
1586 2003-01-11  Havoc Pennington  <hp@pobox.com>
1587
1588         * configure.in: change --enable-test/--enable-ansi action-if-given
1589         to enable_foo=$enableval instead of enable_foo=yes
1590
1591 2003-01-08  Havoc Pennington  <hp@pobox.com>
1592
1593         * dbus/dbus-string.c (_dbus_string_align_length): new function
1594
1595         * dbus/dbus-test-main.c: move main() for test app here
1596         * dbus/dbus-test.c
1597         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1598         symbol to run tests, because dbus-test isn't in the main 
1599         library
1600
1601         Code review nitpicks.
1602         
1603         * dbus/dbus-message.c (dbus_message_write_header): add newlines
1604         for people with narrow emacs ;-). Assert client_serial was filled
1605         in. Assert message->name != NULL.
1606         (dbus_message_append_fields): have "first_field_type" arg separate
1607         from va list, needed for C++ binding that also uses varargs IIRC
1608         and helps with type safety
1609         (dbus_message_new): add @todo about using DBusString to store
1610         service/name internally
1611         (dbus_message_new): don't leak ->service and ->name on OOM later
1612         in the function
1613         (dbus_message_unref): free the service name
1614         (dbus_message_get_fields): same change to varargs
1615         i.e. first_field_type
1616         (_dbus_message_loader_return_buffer): assert that the message data
1617         is aligned (if not it's a bug in our code). Put in verbose griping
1618         about why we set corrupted = TRUE.
1619         (decode_header_data): add FIXME that char* is evil.  Was going to
1620         add FIXME about evil locale-specific string.h strncmp, but just
1621         switched to wacky string-as-uint32 optimization. Move check for
1622         "no room for field name" above get_const_data_len() to avoid
1623         assertion failure in get_const_data_len if we have trailing 2
1624         bytes or the like. Check for service and name fields being
1625         provided twice. Don't leak service/name on error. Require field
1626         names to be aligned to 4 bytes.
1627
1628         * dbus/dbus-marshal.c: move byte swap stuff to header
1629         (_dbus_pack_int32): uscore-prefix
1630         (_dbus_unpack_int32): uscore-prefix
1631         (_dbus_unpack_uint32): export
1632         (_dbus_demarshal_string): add @todo complaining about use of
1633         memcpy()
1634         (_dbus_marshal_get_field_end_pos): add @todo about bad error
1635         handling allowing corrupt data to go unchecked
1636
1637 2003-01-08  Havoc Pennington  <hp@redhat.com>
1638
1639         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
1640         to the select() as needed for authentication. (should be using
1641         _dbus_poll() not select, but for another day)
1642
1643         * dbus/dbus.h: include dbus/dbus-protocol.h
1644
1645 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
1646
1647         * dbus/Makefile.am (dbusinclude_HEADERS): Install
1648         dbus-connection.h
1649
1650 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
1651
1652         * dbus/dbus-internals.c: (_dbus_type_to_string):
1653         New function that returns a string describing a type.
1654         
1655         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1656         * dbus/dbus-marshal.h:
1657         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1658         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1659         (dbus_message_iter_get_byte_array):
1660         * dbus/dbus-message.h:
1661         Add new convenience functions for appending and getting message fields.
1662         Also add demarshalling routines for byte arrays.
1663
1664 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
1665
1666         * dbus/dbus-connection-internal.h:
1667         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1668         (_dbus_connection_get_next_client_serial),
1669         (dbus_connection_send_message):
1670         * dbus/dbus-internals.h:
1671         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1672         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1673         (_dbus_marshal_uint32), (_dbus_demarshal_double),
1674         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1675         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1676         (_dbus_verbose_bytes), (_dbus_marshal_test):
1677         * dbus/dbus-marshal.h:
1678         * dbus/dbus-message-internal.h:
1679         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1680         (dbus_message_write_header), (_dbus_message_lock),
1681         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1682         (dbus_message_get_name), (dbus_message_append_int32),
1683         (dbus_message_append_uint32), (dbus_message_append_double),
1684         (dbus_message_append_string), (dbus_message_append_byte_array),
1685         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1686         (dbus_message_iter_unref), (dbus_message_iter_has_next),
1687         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1688         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1689         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1690         (decode_header_data), (_dbus_message_loader_return_buffer),
1691         (message_iter_test), (_dbus_message_test):
1692         * dbus/dbus-message.h:
1693         * dbus/dbus-protocol.h:
1694         * dbus/dbus-test.c: (main):
1695         * dbus/dbus-test.h:
1696         * glib/test-dbus-glib.c: (message_handler), (main):
1697         * test/echo-client.c: (main):
1698         * test/watch.c: (check_messages):
1699         Make messages sendable and receivable for real.
1700         
1701 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
1702
1703         * dbus/dbus-marshal.c: (_dbus_marshal_double),
1704         (_dbus_marshal_string), (_dbus_marshal_byte_array):
1705         * dbus/dbus-message.c: (dbus_message_append_int32),
1706         (dbus_message_append_uint32), (dbus_message_append_double),
1707         (dbus_message_append_string), (dbus_message_append_byte_array):
1708         Handle OOM restoration.
1709         
1710 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
1711
1712         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1713         (_dbus_demarshal_string), (_dbus_marshal_test):
1714         * dbus/dbus-marshal.h:
1715         * dbus/dbus-message.c: (dbus_message_get_name),
1716         Document these functions.
1717         
1718         (dbus_message_append_int32), (dbus_message_append_uint32),
1719         (dbus_message_append_double), (dbus_message_append_string),
1720         (dbus_message_append_byte_array):
1721         * dbus/dbus-message.h:
1722         Add functions for adding message fields of different types.
1723         
1724         * dbus/dbus-protocol.h:
1725         Add the different types.
1726
1727 2003-01-05  Havoc Pennington  <hp@pobox.com>
1728
1729         * bus/connection.c: implement routines for handling connections,
1730         first thing is keeping a list of owned services on each connection
1731         and setting up watches etc.
1732
1733         * bus/services.c: implement a mapping from service names to lists
1734         of connections
1735
1736         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1737
1738         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1739         to use static mutexes for global data
1740
1741         * dbus/dbus-connection.c (dbus_connection_set_data): add new
1742         collection of functions to set/get application-specific data
1743         on the DBusConnection.
1744
1745 2003-01-04  Havoc Pennington  <hp@pobox.com>
1746
1747         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1748         (_dbus_poll): new function
1749
1750         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1751         copied from GLib
1752
1753         * bus/loop.c: initial code for the daemon main loop
1754
1755 2003-01-04  Havoc Pennington  <hp@pobox.com>
1756
1757         * test/watch.c (error_handler): make it safe if the error handler 
1758         is called multiple times (if we s/error handler/disconnect
1759         handler/ we should just guarantee it's called only once)
1760
1761         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1762         error handler on disconnect (it's quite possible we should
1763         just change the error handler to a "disconnect handler," I'm 
1764         not sure we have any other meaningful errors)
1765
1766         * configure.in: check for getpwnam_r
1767
1768         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1769         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1770         mechanism as in SASL spec, using socket credentials
1771
1772         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1773         (_dbus_send_credentials_unix_socket): new function
1774
1775         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1776         dbus_accept()
1777         (_dbus_write): only check errno if <0 returned
1778         (_dbus_write_two): ditto
1779
1780 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
1781
1782         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1783         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1784         (_dbus_marshal_test):
1785         * dbus/dbus-marshal.h:
1786         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1787         to _dbus_marshal_utf8_string. Also fix some tests.
1788         
1789 2002-12-28  Harri Porten  <porten@kde.org>
1790
1791         * configure.in: added check for C++ compiler and a very cheesy
1792         check for the Qt integration
1793
1794         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1795
1796         * qt/Makefile.am: added 
1797
1798         * qt/.cvsignore: added  
1799
1800         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1801         latter, added #ifdef QT_THREAD_SUPPORT guard.
1802
1803         * dbus/Makefile.am: added missing headers for make dist
1804
1805 2002-12-28  Kristian Rietveld  <kris@gtk.org>
1806
1807         * dbus/Makefile.am: fixup export-symbols-regex.
1808
1809 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1810
1811         * acinclude.m4: Add this file and put the 
1812         PKG_CHECK_MODULE macro in it.
1813
1814 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1815
1816         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1817         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1818         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1819         (_dbus_marshal_test):
1820         Make the demarshalling routines align the pos argument.
1821         Add string marshalling tests and fix the obvious bugs 
1822         discovered.
1823         
1824 2002-12-26  Havoc Pennington  <hp@pobox.com>
1825
1826         * dbus/dbus-auth.c: fixes fixes fixes
1827
1828         * dbus/dbus-transport-unix.c: wire up support for
1829         encoding/decoding data on the wire
1830
1831         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
1832         (_dbus_auth_decode_data): append to target string 
1833         instead of nuking it.
1834
1835 2002-12-26  Havoc Pennington  <hp@pobox.com>
1836
1837         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1838         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1839         doh
1840
1841         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1842         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
1843         now). Main point is because I wanted unpack_uint32 to implement
1844         _dbus_verbose_bytes
1845         (_dbus_verbose_bytes): new function
1846
1847         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1848
1849         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1850         mechanism to handle a corrupt message stream
1851         (_dbus_message_loader_new): fix preallocation to only prealloc, 
1852         not prelengthen
1853         
1854         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1855         (_dbus_string_test): enhance tests for copy/move and fix the
1856         functions
1857
1858         * dbus/dbus-transport-unix.c: Hold references in more places to 
1859         avoid reentrancy problems
1860
1861         * dbus/dbus-transport.c: ditto
1862
1863         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1864         leak reference count in no-message case
1865
1866         * test/watch.c (do_mainloop): handle adding/removing watches
1867         during iteration over the watches. Also, ref the connection/server
1868         stored on a watch, so we don't try to mangle a destroyed one.
1869
1870         * dbus/dbus-transport-unix.c (do_authentication): perform
1871         authentication
1872
1873         * dbus/dbus-auth.c (get_state): add a state
1874         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1875         (_dbus_auth_get_unused_bytes): append the unused bytes
1876         to the passed in string, rather than prepend
1877
1878         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
1879         the auth conversation DBusAuth
1880
1881         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1882         (_dbus_transport_new_for_domain_socket): when creating a
1883         transport, pass in whether it's a client-side or server-side
1884         transport so we know which DBusAuth to create
1885
1886 2002-12-03  Havoc Pennington  <hp@pobox.com>
1887
1888         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1889         _after_ finalizing the derived members
1890         (unix_connection_set): unref watch if we fail to add it
1891
1892         * dbus/dbus-connection.c (dbus_connection_unref): delete the
1893         transport first, so that the connection owned by the 
1894         transport will be valid as the transport finalizes.
1895
1896         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1897         if necessary, and remove watches from the connection.
1898         
1899         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1900         
1901 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
1902
1903         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1904         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1905         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1906         (_dbus_marshal_test):
1907         * dbus/dbus-marshal.h:
1908         Add string marshal functions and have the demarshal functions
1909         return the new position.
1910         
1911 2002-12-25  Havoc Pennington  <hp@pobox.com>
1912
1913         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
1914         it is a simple protocol that just maps directly to SASL.
1915
1916         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1917         initial implementation, not actually used yet.
1918         
1919         * dbus/dbus-string.c (_dbus_string_find): new function
1920         (_dbus_string_equal): new function
1921         (_dbus_string_base64_encode): new function
1922         (_dbus_string_base64_decode): new function
1923
1924 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
1925
1926         * dbus/Makefile.am:
1927         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1928         (_dbus_marshal_int32), (_dbus_marshal_uint32),
1929         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1930         (_dbus_demarshal_uint32), (_dbus_marshal_test):
1931         * dbus/dbus-marshal.h:
1932         * dbus/dbus-protocol.h:
1933         * dbus/dbus-test.c: (main):
1934         * dbus/dbus-test.h:
1935         Add un-optimized marshalling/demarshalling routines.
1936         
1937 2002-12-25  Harri Porten  <porten@kde.org>
1938
1939         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1940
1941 2002-12-24  Zack Rusin  <zack@kde.org>
1942
1943         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1944         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1945         main loop stuff
1946
1947 2002-12-24  Havoc Pennington  <hp@pobox.com>
1948
1949         * glib/dbus-gthread.c: fix include
1950
1951         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
1952         I think glib API needs to change, though, as you don't 
1953         want to use DBusMessageFunction, you want to use the 
1954         DBusMessageHandler object. Probably 
1955         dbus_connection_open_with_g_main_loop()
1956         and dbus_connection_setup_g_main_loop() or something like that
1957         (but think of better names...) that just create a connection 
1958         that has watch/timeout functions etc. already set up.
1959
1960         * dbus/dbus-connection.c
1961         (dbus_connection_send_message_with_reply): new function just to 
1962         show how the message handler helps us deal with replies.
1963
1964         * dbus/dbus-list.c (_dbus_list_remove_last): new function
1965
1966         * dbus/dbus-string.c (_dbus_string_test): free a string that
1967         wasn't
1968
1969         * dbus/dbus-hash.c: use memory pools for the hash entries
1970         (rebuild_table): be more paranoid about overflow, and 
1971         shrink table when we can
1972         (_dbus_hash_test): reduce number of sprintfs and write
1973         valid C89. Add tests for case where we grow and then 
1974         shrink the hash table.
1975
1976         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1977
1978         * dbus/dbus-connection.c (dbus_connection_register_handler) 
1979         (dbus_connection_unregister_handler): new functions
1980
1981         * dbus/dbus-message.c (dbus_message_get_name): new
1982
1983         * dbus/dbus-list.c: fix docs typo
1984
1985         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1986         an object representing a handler for messages.
1987
1988 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1989
1990         * glib/dbus-glib.h:
1991         * glib/dbus-gthread.c: (dbus_gthread_init):
1992         Don't use the gdbus prefix for public functions.
1993         
1994 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1995
1996         * Makefile.am:
1997         * configure.in:
1998         Add GLib checks and fixup .pc files
1999         
2000         * glib/Makefile.am:
2001         * glib/dbus-glib.h:
2002         * glib/dbus-gmain.c: (gdbus_connection_prepare),
2003         (gdbus_connection_check), (gdbus_connection_dispatch),
2004         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2005         (dbus_connection_gsource_new):
2006         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2007         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2008         * glib/test-dbus-glib.c: (message_handler), (main):
2009         Add GLib support.
2010         
2011 2002-12-15  Harri Porten  <porten@kde.org>
2012
2013         * autogen.sh: check for libtoolize before attempting to use it 
2014         
2015         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2016         struct.
2017         
2018         * .cvsignore: ignore more stamp files
2019
2020         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2021
2022         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2023         without make install.
2024
2025 2002-12-15  Havoc Pennington  <hp@pobox.com>
2026
2027         * dbus/dbus-threads.c: add thread stubs that a higher library
2028         layer can fill in. e.g. the GLib wrapper might fill them in with
2029         GThread stuff. We still need to use this thread API to
2030         thread-safe-ize the library.
2031
2032 2002-12-12  Havoc Pennington  <hp@pobox.com>
2033
2034         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2035         below new interfaces and include fewer system headers.
2036
2037         * dbus/dbus-sysdeps.c (_dbus_read): new function
2038         (_dbus_write): new function
2039         (_dbus_write_two): new function
2040         (_dbus_connect_unix_socket): new function
2041         (_dbus_listen_unix_socket): new function
2042
2043         * dbus/dbus-message-internal.h: change interfaces to use
2044         DBusString
2045
2046 2002-12-11  Havoc Pennington  <hp@pobox.com>
2047
2048         * dbus/dbus-types.h: add dbus_unichar
2049
2050         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2051
2052         * dbus/dbus-connection.c (dbus_connection_send_message): return
2053         TRUE on success
2054
2055         * dbus/dbus-transport.c: include dbus-watch.h   
2056
2057         * dbus/dbus-connection.c: include dbus-message-internal.h
2058
2059         * HACKING: add file with coding guidelines stuff.
2060
2061         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2062         handling here, for security purposes (as in vsftpd). Not actually
2063         using this class yet.
2064
2065         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2066         system/libc usage here, as in vsftpd, for ease of auditing (and
2067         should also simplify portability). Haven't actually moved all the
2068         system/libc usage into here yet.
2069         
2070 2002-11-25  Havoc Pennington  <hp@pobox.com>
2071
2072         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
2073         always print the first verbose message.
2074
2075 2002-11-24  Havoc Pennington  <hp@pobox.com>
2076
2077         * test/echo-client.c, test/echo-server.c: cheesy test 
2078         clients.
2079         
2080         * configure.in (AC_CHECK_FUNCS): check for writev
2081
2082         * dbus/dbus-message.c (_dbus_message_get_network_data): new
2083         function
2084
2085         * dbus/dbus-list.c (_dbus_list_foreach): new function
2086
2087         * dbus/dbus-internals.c (_dbus_verbose): new function
2088
2089         * dbus/dbus-server.c, dbus/dbus-server.h: public object
2090         representing a server that listens for connections.
2091
2092         * dbus/.cvsignore: create
2093
2094         * dbus/dbus-errors.h, dbus/dbus-errors.c:
2095         public API for reporting errors
2096
2097         * dbus/dbus-connection.h, dbus/dbus-connection.c:
2098         public object representing a connection that 
2099         sends/receives messages. (Same object used for 
2100         both client and server.)
2101
2102         * dbus/dbus-transport.h, dbus/dbus-transport.c:
2103         Basic abstraction for different kinds of stream
2104         that we might read/write messages from.
2105
2106 2002-11-23  Havoc Pennington  <hp@pobox.com>
2107
2108         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
2109         _DBUS_INT_MAX
2110
2111         * dbus/dbus-test.c (main): add list test, and include 
2112         dbus-test.h as intended
2113
2114         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
2115         (_dbus_hash_table_remove_int): return value indicates 
2116         whether the entry existed to remove
2117
2118         * dbus/dbus-list.c: add linked list utility class, 
2119         with docs and tests
2120
2121         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
2122         array sometimes.
2123
2124 2002-11-23  Havoc Pennington  <hp@pobox.com>
2125
2126         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2127         DBUS_END_DECLS to nothing, that should fix this once and for all
2128
2129         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2130
2131         * dbus/dbus-message.c, dbus/dbus-hash.c: 
2132         add some missing @brief
2133
2134 2002-11-23  Havoc Pennington  <hp@pobox.com>
2135
2136         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
2137         to avoid confusing Doxygen
2138
2139         * dbus/dbus-hash.c: @} not }@
2140
2141         * dbus/dbus-message.c (struct DBusMessage): split out 
2142         internals docs
2143
2144 2002-11-23  Havoc Pennington  <hp@pobox.com>
2145
2146         * configure.in: pile on more warning flags if using gcc
2147
2148         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
2149         to document static functions
2150
2151         * configure.in: add summary to end of configure so it 
2152         looks nice and attractive
2153
2154         * dbus/dbus-hash.c: finish implementation and write unit 
2155         tests and docs
2156
2157         * configure.in: add --enable-tests to enable unit tests
2158
2159         * dbus/dbus-test.c: test program to run unit tests 
2160         for all files in dbus/*, initially runs a test for 
2161         dbus-hash.c
2162         
2163         * dbus/dbus-internals.h: file to hold some internal utility stuff
2164
2165 2002-11-22  Havoc Pennington  <hp@redhat.com>
2166
2167         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
2168         "ported" away from Tcl
2169
2170         * dbus/dbus-types.h: header for types such as dbus_bool_t
2171
2172 2002-11-22  Havoc Pennington  <hp@redhat.com>
2173
2174         * dbus/dbus.h: fixups for doc warnings
2175
2176         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
2177         macros
2178         (QUIET): make it quiet so we can see warnings
2179
2180         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2181
2182 2002-11-22  Havoc Pennington  <hp@redhat.com>
2183
2184         * Makefile.am: include "Doxyfile" target in all-local
2185
2186         * configure.in: generate the Doxyfile
2187
2188         * Doxyfile.in: move Doxyfile here, so we can use 
2189         configure to generate a Doxyfile with the right 
2190         version number etc.
2191
2192 2002-11-22  Havoc Pennington  <hp@redhat.com>
2193
2194         * dbus/dbus-message.c: move inline docs into .c file
2195
2196         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2197         so all docs are under doc/
2198         (MAN_EXTENSION): generate man pages. Use extension 
2199         ".3dbus" which matches ".3qt" on my system, 
2200         I guess this is OK, I don't know really.
2201         (FILE_PATTERNS): look for .c files not .h, makes sense
2202         for plain C I think
2203
2204 2002-11-22  Havoc Pennington  <hp@pobox.com>
2205
2206         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
2207         because any app can be a server, and any app can be a client, 
2208         the bus is a special kind of server.
2209
2210 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
2211
2212         * Doxyfile : adding. Still needs Makefile rules to be generated
2213         automatically (just run "doxygen" in the toplevel dir for now to
2214         generate docs)
2215         
2216         * dbus/dbus-message.h : Adding sample docs (javadoc since
2217         resembles gtk-doc a little more)
2218
2219         * dbus/dbus.h : Adding sample docs
2220
2221 2002-11-21  Havoc Pennington  <hp@redhat.com>
2222
2223         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
2224         so we can allow ourselves to include files directly, 
2225         instead of having to use dbus.h
2226
2227         * dbus/dbus.h: fill in
2228
2229         * dbus/dbus-message.h: sketch out a sample header file.
2230         Include griping if you include it directly instead of 
2231         via dbus.h
2232
2233         * dbus/dbus-macros.h: new file with macros for extern "C", 
2234         TRUE/FALSE, NULL, etc.
2235
2236         * doc/file-boilerplate.c: put include guards in here
2237
2238 2002-11-21  Havoc Pennington  <hp@redhat.com>
2239
2240         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2241
2242         * COPYING: include the GPL as well, and license code 
2243         under both AFL and GPL.
2244
2245 2002-11-21  Havoc Pennington  <hp@redhat.com>
2246
2247         * acconfig.h: get rid of this
2248
2249         * autogen.sh (run_configure): add --no-configure option
2250
2251         * configure.in: remove AC_ARG_PROGRAM to make
2252         autoconf complain less. add AC_PREREQ. 
2253         add AC_DEFINE third arg.
2254         
2255 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
2256
2257         * doc/Makefile.am:
2258         Fix references so we can distcheck.
2259
2260 2002-11-21  Havoc Pennington  <hp@redhat.com>
2261
2262         * Initial module creation
2263