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