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