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