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