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