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