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