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