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