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