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