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