2003-02-02 Anders Carlsson <andersca@codefactory.se>
[platform/upstream/dbus.git] / ChangeLog
1 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
2
3         * dbus/dbus-server.c: (dbus_server_listen):
4         * dbus/dbus-transport.c: (_dbus_transport_open):
5         ifdef out the calls to the debug transport and server.
6         
7 2003-02-02  Alexander Larsson  <alexl@redhat.com>
8
9         * dbus/dbus-watch.c (dbus_watch_get_flags):
10         Add note in the docs that ERROR or HANGUP won't be returned
11         and are assumed always on.
12
13         * glib/dbus-gmain.c (add_watch):
14         Always add IO_ERR | IO_HUP
15
16         * dbus/dbus-message.h:
17         Add semicolon after dbus_message_iter_get_string_array().
18         Makes qt code build again
19
20 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
21
22         * bus/driver.c: (create_unique_client_name),
23         (bus_driver_handle_hello):
24         Don't take a name, just use a numeric id to identify
25         each client.
26         
27         * dbus/Makefile.am:
28         * dbus/dbus-bus.c: (dbus_bus_register_client),
29         (dbus_bus_acquire_service), (dbus_bus_service_exists):
30         * dbus/dbus-bus.h:
31         Add new convenience functions for communicating with the bus.
32         
33         * dbus/dbus-message.h:
34         
35         * dbus/dbus-protocol.h:
36         Fix a typo.
37         
38 2003-02-01  Alexander Larsson  <alexl@redhat.com>
39
40         * dbus/dbus-message.c (dbus_message_append_fields):
41         Add some more doc comments.
42
43 2003-02-01  Havoc Pennington  <hp@pobox.com>
44
45         * dbus/dbus-break-loader.c (randomly_modify_length): change 
46         a 4-byte value in the message as if it were a length
47
48         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
49         execute bit on saved files
50
51 2003-02-01  Havoc Pennington  <hp@pobox.com>
52
53         * dbus/dbus-break-loader.c (main): new program to find messages
54         that break the loader.
55
56         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
57         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
58
59         * dbus/dbus-string.c (_dbus_string_set_byte): new
60         
61 2003-01-31  Havoc Pennington  <hp@pobox.com>
62
63         * dbus/dbus-message.c: refactor the test code to be more general, 
64         in preparation for writing a "randomly permute test cases to 
65         try to break the loader" program.
66
67 2003-01-31  Havoc Pennington  <hp@pobox.com>
68         
69         * doc/dbus-specification.sgml: work on the specification
70
71         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check 
72         the protocol version of the message.
73
74         * dbus/dbus-protocol.h: drop special _REPLY names, the spec 
75         no longer specifies that.
76         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 
77         1/2/3/4)
78
79         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
80         "break" for DBUS_TYPE_NIL, remove @todo
81
82 2003-01-31  Havoc Pennington  <hp@pobox.com>
83
84         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename 
85         just set_is_error/get_is_error as this is a commonly-used
86         function, and write docs.
87
88 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
89
90         * dbus/dbus-address.c: (dbus_address_entry_free):
91         Free key and value lists.
92         
93         * dbus/dbus-internals.c: (_dbus_type_to_string):
94         Add the types we didn't have.
95         
96         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
97         (_dbus_marshal_validate_arg):
98         Add NIL types.
99         
100         * dbus/dbus-message.c: (dbus_message_set_sender):
101         Remove todo about being able to set sender to NULL.
102         
103         (dbus_message_set_is_error_reply),
104         (dbus_message_get_is_error_reply):
105         * dbus/dbus-message.h:
106         New functions.
107         
108         * dbus/dbus-protocol.h:
109         Add error reply flag.
110         
111         * test/data/valid-messages/opposite-endian.message:
112         Add NIL type to test.
113         
114 2003-01-31  Havoc Pennington  <hp@pobox.com>
115
116         * doc/dbus-specification.sgml: fully specify the header.  Add
117         flags and major protocol version, and change header/body len to
118         unsigned.
119
120         * dbus/dbus-message-builder.c (append_saved_length): append length
121         as uint32
122
123         * dbus/dbus-message.c (dbus_message_create_header): change header
124         length and body length to unsigned. Add the new fields from the
125         spec
126         (_dbus_message_loader_return_buffer): unsigned header/body len
127
128 2003-01-30  Havoc Pennington  <hp@pobox.com>
129
130         * dbus/dbus-auth.c: rework to use only REJECTED, no 
131         MECHANISMS
132
133         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just 
134         use REJECTED, suggested by Mark McLoughlin
135
136 2003-01-30  Havoc Pennington  <hp@pobox.com>
137
138         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
139         a better way to report errors here. e.g.  "unix address lacks
140         path" or something. also "no such file" when the path doesn't
141         exist, etc.
142
143         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
144         leaking list nodes
145         (dbus_parse_address): add @todo about documenting address format, 
146         and allowing , and ; to be escaped
147
148 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
149
150         * dbus/Makefile.am:
151         Add dbus-address.[ch]
152         
153         * dbus/dbus-address.c: (dbus_address_entry_free),
154         (dbus_address_entries_free), (create_entry),
155         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
156         (dbus_parse_address), (_dbus_address_test):
157         * dbus/dbus-address.h:
158         New files for dealing with address parsing.
159         
160         * dbus/dbus-connection.c:
161         Document timeout functions.
162         
163         * dbus/dbus-message.c:
164         Document dbus_message_new_from_message.
165         
166         * dbus/dbus-server-debug.c:
167         Document.
168         
169         * dbus/dbus-server.c: (dbus_server_listen):
170         Parse address and use correct server implementation.
171         
172         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
173         * dbus/dbus-string.h:
174         New function with test.
175         
176         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
177         * dbus/dbus-test.h:
178         Add address tests.
179         
180         * dbus/dbus-transport-debug.c:
181         Document.
182         
183         * dbus/dbus-transport.c: (_dbus_transport_open):
184         Parse address and use correct transport implementation. 
185
186 2003-01-30  Havoc Pennington  <hp@pobox.com>
187
188         * dbus/dbus-message.c: use message->byte_order instead of 
189         DBUS_COMPILER_BYTE_ORDER throughout.
190         (dbus_message_create_header): pad header to align the 
191         start of the body of the message to 8-byte boundary
192
193         * dbus/dbus-marshal.h: make all the demarshalers take const 
194         DBusString arguments.
195
196         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
197         validate message args here, so we don't have to do slow validation
198         later, and so we catch bad messages as they are incoming. Also add
199         better checks on header_len and body_len. Also fill in
200         message->byte_order
201
202         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
203         implemented properly)
204         (_dbus_string_validate_nul): new function to check all-nul
205
206         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename 
207         get_arg_end_pos and remove all validation
208         (_dbus_marshal_validate_arg): actually do validation here.
209
210 2003-01-29  Havoc Pennington  <hp@pobox.com>
211
212         * dbus/dbus-message.c (check_message_handling): fix assertion
213         failure on set_client_serial
214
215 2003-01-28  Havoc Pennington  <hp@pobox.com>
216
217         * dbus/dbus-server-debug.c: Add doc section comments
218         
219         * dbus/dbus-transport-debug.c: add doc section comments
220         
221 2003-01-28  Havoc Pennington  <hp@redhat.com>
222
223         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
224         the reverse order from how I had it
225         (_dbus_string_base64_encode): reverse encoding order. I was
226         basically byteswapping everything during encoding.
227
228 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
229
230         * dbus/dbus-connection-internal.h:
231         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
232         (_dbus_connection_remove_timeout):
233         Add functions for adding and removing timeouts.
234         
235         * dbus/dbus-message.c: (dbus_message_new_from_message):
236         Add new function that takes a message and creates an exact
237         copy of it, but with the refcount set to 1.
238         (check_message_handling):
239         Fix build error.
240         
241         * dbus/dbus-server-protected.h:
242         * dbus/dbus-server.c: (_dbus_server_init_base),
243         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
244         (dbus_server_set_timeout_functions):
245         (_dbus_server_remove_timeout):
246         New functions so that a server can add and remove timeouts.
247
248         (dbus_server_listen):
249         Add commented out call to dbus_server_debug_new.
250
251         * dbus/dbus-timeout.c: (_dbus_timeout_new):
252         Actually set the handler, doh.
253         
254         * dbus/dbus-transport.c: (_dbus_transport_open):
255         Add commented out call to dbus_transport_debug_client_new.
256         
257         * dbus/Makefile.am:
258         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
259         
260 2003-01-28  Havoc Pennington  <hp@pobox.com>
261
262         * dbus/dbus-message.c (check_message_handling): function to check 
263         on the loaded message, iterates over it etc.
264
265 2003-01-28  Havoc Pennington  <hp@pobox.com>
266
267         * test/Makefile.am (dist-hook): fix make distdir
268
269         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
270
271 2003-01-27  Havoc Pennington  <hp@pobox.com>
272
273         * dbus/dbus-mempool.c (time_for_size): replace printf with 
274         _dbus_verbose
275
276         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
277         empty lines; fix the SAVE_LENGTH stuff to be
278         START_LENGTH/END_LENGTH so it actually works; couple other 
279         bugfixes
280         
281         * test/Makefile.am (dist-hook): add dist-hook for .message files
282
283         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
284         can be constant or locked.
285         (_dbus_string_free): allow freeing a const string as
286         documented/intended
287
288         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
289
290         * dbus/dbus-test-main.c (main): take an argument which is the 
291         directory containing test data
292
293         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
294         argument to this and load all the messages in test/data/
295         checking that they can be loaded or not loaded as appropriate.
296
297 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
298
299         * bus/dispatch.c: (bus_dispatch_message_handler):
300         Dispatch messages sent to services.
301         
302         * bus/driver.c: (bus_driver_send_service_deleted),
303         (bus_driver_send_service_created), (bus_driver_send_service_lost),
304         (bus_driver_send_service_acquired):
305         Add helper functions for sending service related messages.
306
307         (bus_driver_send_welcome_message):
308         Send HELLO_REPLY instead of WELCOME.
309         
310         (bus_driver_handle_list_services):
311         Send LIST_SERVICES_REPLY instead of SERVICES.
312         
313         (bus_driver_handle_own_service),
314         (bus_driver_handle_service_exists):
315         New message handlers.
316         
317         (bus_driver_handle_message):
318         Invoke new message handlers.
319         
320         (bus_driver_remove_connection):
321         Don't remove any services here since that's done automatically
322         by bus_service_remove_owner now.
323         
324         * bus/driver.h:
325         New function signatures.
326         
327         * bus/services.c: (bus_service_add_owner):
328         Send ServiceAcquired message if we're the only primary owner.
329         
330         (bus_service_remove_owner):
331         Send ServiceAcquired/ServiceLost messages.
332         
333         (bus_service_set_prohibit_replacement),
334         (bus_service_get_prohibit_replacement):
335         Functions for setting prohibit replacement.
336         
337         (bus_service_has_owner):
338         New function that checks if a connection is in the owner queue of 
339         a certain service.
340         
341         * bus/services.h:
342         Add new function signatures.
343         
344         * dbus/dbus-list.c: (_dbus_list_test):
345         Add tests for _dbus_list_remove_last and traversing the list backwards.
346         
347         * dbus/dbus-list.h:
348         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
349         go any further, so return NULL then.
350         
351         * dbus/dbus-protocol.h:
352         Add new messages, service flags and service replies.
353         
354 2003-01-26  Havoc Pennington  <hp@pobox.com>
355
356         * dbus/dbus-message-builder.c: implement, completely untested.
357
358         * test/data/*: add data to be used in testing. 
359         ".message" files are our simple loadable text format.
360         ".message-raw" will be binary dumps of messages.
361
362         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
363
364 2003-01-26  Havoc Pennington  <hp@pobox.com>
365
366         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
367
368         * dbus/dbus-errors.c (dbus_result_to_string): add
369         file errors
370
371         * dbus/dbus-message-builder.c: new file, will contain code to load
372         up messages from files. Not implemented yet.
373
374 2003-01-26  Havoc Pennington  <hp@pobox.com>
375
376         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
377         the sender by setting to NULL
378
379 2003-01-26  Havoc Pennington  <hp@pobox.com>
380
381         The unit tests pass, but otherwise untested.  If it breaks, the
382         tests should have been better. ;-)
383         
384         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
385         the connection.
386
387         * dbus/dbus-message.c: redo everything so we maintain 
388         message->header as the only copy of the various fields.
389         This avoids the possibility of out-of-memory in some cases,
390         for example dbus_message_lock() can't run out of memory anymore,
391         and avoids extra copying. Figured I may as well go ahead and do 
392         this since it was busted for dbus_message_lock to not return 
393         failure on OOM, and dbus_message_write_header was totally
394         unchecked for OOM. Also fixed some random other bugs.
395
396         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
397         that strings are nul-terminated. Also, end_pos can be equal 
398         to string length just not greater than, I think.
399         (_dbus_marshal_set_int32): new function
400         (_dbus_marshal_set_uint32): new function
401         (_dbus_marshal_set_string): new function
402
403         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
404         a warning, init timeout_list to NULL
405         (dbus_connection_send_message): don't use uninitialized variable
406         "serial"
407
408         * dbus/dbus-string.c (_dbus_string_replace_len): new function
409
410 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
411
412         * bus/driver.c: (bus_driver_handle_hello),
413         (bus_driver_send_welcome_message):
414         Plug leaks
415         
416 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
417
418         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
419         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
420         (dbus_connection_unref):
421         * dbus/dbus-marshal.c: (_dbus_marshal_test):
422         * dbus/dbus-message.c: (dbus_message_unref),
423         Plug memory leaks.
424         
425         (dbus_message_get_fields): 
426         Remove debugging printout.
427
428         (_dbus_message_loader_return_buffer):
429         Don't store the header string.
430         
431         (_dbus_message_test):
432         Plug leaks.
433
434 2003-01-26  Richard Hult  <rhult@codefactory.se>
435
436         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
437         the file descriptor list, since it can change under us.
438
439 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
440
441         * glib/dbus-gmain.c: (dbus_connection_prepare),
442         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
443         (remove_watch), (dbus_connection_hookup_with_g_main):
444         Rewrite the glib handling to use its own GSource instead of a 
445         GIOChannel so we can catch messages put in the queue while waiting
446         for a reply.
447         
448 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
449
450         * bus/Makefile.am:
451         * bus/connection.c: (connection_disconnect_handler),
452         (connection_watch_callback), (bus_connection_setup):
453         * bus/dispatch.c: (send_one_message),
454         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
455         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
456         * bus/dispatch.h:
457         * bus/driver.c: (bus_driver_send_service_deleted),
458         (bus_driver_send_service_created), (bus_driver_handle_hello),
459         (bus_driver_send_welcome_message),
460         (bus_driver_handle_list_services), (bus_driver_remove_connection),
461         (bus_driver_handle_message):
462         * bus/driver.h:
463         Refactor code, put the message dispatching in its own file. Use 
464         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
465         is disconnected.
466         
467 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
468
469         * dbus/dbus-internals.h:
470         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
471         
472         * dbus/dbus-message.c: (dbus_message_get_sender):
473         * dbus/dbus-message.h:
474         Implement dbus_message_get_sender.
475         
476         * dbus/dbus-protocol.h:
477         Add message and service defines.
478         
479 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
480
481         * dbus/dbus-connection.c: (dbus_connection_send_message):
482         * dbus/dbus-message-internal.h:
483         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
484         (dbus_message_write_header):
485         Remove _dbus_messag_unlock and don't set the client serial on a 
486         message if one already exists.
487         
488 2003-01-24  Havoc Pennington  <hp@pobox.com>
489
490         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
491         list_pool
492
493         * bus/driver.c (bus_driver_handle_list_services): fix a leak 
494         on OOM
495
496 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
497
498         * dbus/dbus-list.c: (alloc_link), (free_link):
499         Use a memory pool for the links.
500         
501 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
502
503         * bus/connection.c: (bus_connection_foreach):
504         * bus/connection.h:
505         Add new bus_connection_foreach function.
506         
507         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
508         Add function that broadcasts a message to all clients.
509         
510         (bus_driver_send_service_created), (bus_driver_handle_hello),
511         (bus_driver_send_welcome_message),
512         (bus_driver_handle_list_services), (bus_driver_message_handler):
513         Implement functions that take care of listing services, and notifying
514         clients when new services are created.
515         
516         * bus/services.c: (bus_services_list):
517         * bus/services.h:
518         Add new function that returns an array of strings with the currently
519         registered services.
520         
521         * glib/dbus-glib.h:
522         * glib/dbus-gmain.c:
523         Update copyright year.
524         
525 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
526
527         * dbus/dbus-connection.c: (dbus_connection_send_message):
528         Unlock the message in case it was sent earlier.
529         
530         (dbus_connection_send_message_with_reply_and_block):
531         Remove the reply message from the list.
532         
533         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
534         Set array_len and new_pos correctly.
535         
536         (_dbus_marshal_test):
537         Remove debug output.
538         
539         * dbus/dbus-message-internal.h:
540         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
541         New function that returns the reply serial.
542         
543         (_dbus_message_unlock):
544         New function that unlocks a message and resets its header.
545
546         (dbus_message_append_string_array), 
547         (dbus_message_get_fields_valist),
548         (dbus_message_iter_get_field_type),
549         (dbus_message_iter_get_string_array),   
550         (dbus_message_get_fields),      
551         (dbus_message_append_fields_valist):
552         Handle string arrays.
553         
554         (dbus_message_set_sender):
555         Make this function public since the bus daemon needs it.
556         
557         (decode_header_data):
558         Set the reply serial to -1 initially.
559
560         * dbus/dbus-message.h:
561         Add dbus_message_set_sender.    
562
563 2003-01-24  Havoc Pennington  <hp@pobox.com>
564
565         * doc/dbus-specification.sgml: add some stuff
566
567 2003-01-22  Havoc Pennington  <hp@pobox.com>
568
569         * doc/dbus-specification.sgml: Start to document the protocol.
570
571 2003-01-22  Havoc Pennington  <hp@pobox.com>
572
573         * dbus/dbus-connection.c
574         (dbus_connection_send_message_with_reply_and_block): add some @todo
575
576         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
577
578 2003-01-21  Havoc Pennington  <hp@pobox.com>
579
580         (patch untested because can't compile)
581         
582         * bus/driver.c (create_unique_client_name): make this function
583         never recycle client names. Also, caller should initialize 
584         the DBusString.
585
586         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
587
588 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
589
590         * dbus/dbus-marshal.c: (_dbus_marshal_double),
591         (_dbus_marshal_int32), (_dbus_marshal_uint32),
592         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
593         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
594         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
595         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
596         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
597         * dbus/dbus-marshal.h:
598         * dbus/dbus-protocol.h:
599         Add support for marshalling and demarshalling integer, double
600         and string arrays.
601         
602 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
603
604         * bus/Makefile.am:
605         Add driver.[ch]
606         
607         * bus/connection.c: (connection_disconnect_handler):
608         Remove the connection from the bus driver's list.
609         
610         (connection_watch_callback): Dispatch messages.
611
612         (free_connection_data): Free connection name.
613         
614         (bus_connection_setup): Add connection to the bus driver's list.
615         (bus_connection_remove_owned_service): 
616         (bus_connection_set_name), (bus_connection_get_name):
617         Add functions for setting and getting the connection's name.
618         
619         * bus/connection.h:
620         Add function headers.
621         
622         * bus/driver.c: (create_unique_client_name),
623         (bus_driver_handle_hello_message),
624         (bus_driver_send_welcome_message), (bus_driver_message_handler),
625         (bus_driver_add_connection), (bus_driver_remove_connection):
626         * bus/driver.h:
627         * bus/main.c:
628         * bus/services.c: (bus_service_free):
629         * bus/services.h:
630         New file that handles communication and registreation with the bus
631         itself. 
632         
633 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
634
635         * dbus/dbus-connection.c: (dbus_connection_send_message):
636         Add a new client_serial parameter.
637         
638         (dbus_connection_send_message_with_reply):
639         Remove a @todo since we've implemented the blocking function.
640         
641         (dbus_connection_send_message_with_reply_and_block):
642         New function that sends a message and waits for a reply and
643         then returns the reply.
644         
645         * dbus/dbus-connection.h:
646         Add new functions.
647         
648         * dbus/dbus-errors.c: (dbus_result_to_string):
649         * dbus/dbus-errors.h:
650         Add new DBUS_RESULT.
651         
652         * dbus/dbus-message-internal.h:
653         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
654         (_dbus_message_set_sender), (dbus_message_write_header),
655         (dbus_message_new_reply), (decode_header_data),
656         (_dbus_message_loader_return_buffer), (_dbus_message_test):
657         * dbus/dbus-message.h:
658         Add new functions that set the reply serial and sender.
659         Also marshal and demarshal them correctly and add test.
660         
661         * dbus/dbus-protocol.h:
662         Add new DBUS_MESSAGE_TYPE_SENDER.
663         
664         * glib/dbus-glib.h:
665         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
666         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
667         (dbus_connection_hookup_with_g_main):
668         * glib/test-dbus-glib.c: (main):
669         Rewrite to use GIOChannel and remove the GSource crack.
670         
671         * test/echo-client.c: (main):
672         * test/watch.c: (check_messages):
673         Update for changed APIs
674         
675 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
676
677         * dbus/Makefile.am: Add dbus-timeout.[cħ]
678         
679         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
680         Create a DBusTimeoutList.       
681         (dbus_connection_set_timeout_functions): Add new function to
682         set timeout callbacks
683         
684         * dbus/dbus-connection.h: Add public DBusTimeout API.
685         
686         * dbus/dbus-message.c: (dbus_message_get_service):
687         * dbus/dbus-message.h:  New function.
688
689         * dbus/dbus-server.c: Fix small doc typo.
690         
691         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
692
693 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
694
695         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
696         of the string, just as long as specified.
697
698 2003-01-19  Havoc Pennington  <hp@pobox.com>
699
700         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
701         new function
702
703         * dbus/dbus-server.c (dbus_server_set_max_connections)
704         (dbus_server_get_max_connections, dbus_server_get_n_connections):
705         keep track of current number of connections, and add API for
706         setting a max (but haven't implemented enforcing the max yet)
707
708 2003-01-18  Havoc Pennington  <hp@pobox.com>
709
710         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
711         reading/writing if read_watch != NULL or write_watch != NULL.
712
713         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
714         the message loader code to actually load message->header and
715         message->body into the newly-created message.
716
717         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
718         in OOM case
719
720         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
721         (dbus_connection_get_max_message_size) 
722         (dbus_connection_set_max_live_messages_size) 
723         (dbus_connection_get_max_live_messages_size): implement some
724         resource limitation functions
725
726         * dbus/dbus-resources.c: new file implementing some of the
727         resource limits stuff
728
729         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
730         missing docs, add @todo to handle OOM etc.
731
732         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
733         docs
734         
735 2003-01-18  Havoc Pennington  <hp@pobox.com>
736
737         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
738         connection if it hasn't been already.
739
740         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
741         replace with DisconnectFunction.
742
743 2003-01-18  Havoc Pennington  <hp@pobox.com>
744
745         Building --disable-verbose-mode --disable-asserts --disable-tests
746         cuts the library from 112K to 45K or so
747         
748         * configure.in: check for varargs macro support, 
749         add --enable-verbose-mode, --enable-asserts. 
750
751         * dbus/dbus-internals.h (_dbus_assert): support
752         DBUS_DISABLE_ASSERT
753         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
754
755 2003-01-18  Havoc Pennington  <hp@pobox.com>
756
757         * dbus/dbus-test.c: include config.h so that tests actually run
758
759         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
760         so the failure mode when that assumption fails will be plenty
761         obvious.
762
763 2003-01-18  Havoc Pennington  <hp@pobox.com>
764
765         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
766
767         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
768         the distribution
769
770         * test/Makefile.am: don't use special variable "TESTS" for echo-*
771         since we don't want to use those in make check
772
773 2003-01-15  Havoc Pennington  <hp@redhat.com>
774
775         Release 0.2
776         
777         * NEWS: update
778
779 2003-01-15  Havoc Pennington  <hp@redhat.com>
780
781         * test/Makefile.am: fix so that test source code ends up in the
782         distribution on make distcheck
783
784 2003-01-15  Havoc Pennington  <hp@redhat.com>
785
786         Release 0.1.
787         
788         * NEWS: update  
789
790 2003-01-15  Havoc Pennington  <hp@redhat.com>
791
792         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
793         fix build when --disable-tests
794
795         * Makefile.am (EXTRA_DIST): put HACKING in here
796
797         * HACKING: document procedure for making a tarball release.
798
799 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
800
801         * bus/connection.c: (connection_error_handler),
802         (bus_connection_setup):
803         * bus/main.c: (main):
804         Make sure that the DBusConnectionData struct is NULLed
805         out to prevent a segfault.
806         
807         * dbus/dbus-errors.c: (dbus_result_to_string):
808         * dbus/dbus-errors.h:
809         * dbus/dbus-message.c: (dbus_message_get_fields),
810         (dbus_message_get_fields_valist), (_dbus_message_test):
811         * dbus/dbus-message.h:
812         Make dbus_message_get_fields return a result code so we can
813         track invalid fields as well as oom.
814         
815 2003-01-11  Havoc Pennington  <hp@pobox.com>
816
817         * configure.in: change --enable-test/--enable-ansi action-if-given
818         to enable_foo=$enableval instead of enable_foo=yes
819
820 2003-01-08  Havoc Pennington  <hp@pobox.com>
821
822         * dbus/dbus-string.c (_dbus_string_align_length): new function
823
824         * dbus/dbus-test-main.c: move main() for test app here
825         * dbus/dbus-test.c
826         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
827         symbol to run tests, because dbus-test isn't in the main 
828         library
829
830         Code review nitpicks.
831         
832         * dbus/dbus-message.c (dbus_message_write_header): add newlines
833         for people with narrow emacs ;-). Assert client_serial was filled
834         in. Assert message->name != NULL.
835         (dbus_message_append_fields): have "first_field_type" arg separate
836         from va list, needed for C++ binding that also uses varargs IIRC
837         and helps with type safety
838         (dbus_message_new): add @todo about using DBusString to store
839         service/name internally
840         (dbus_message_new): don't leak ->service and ->name on OOM later
841         in the function
842         (dbus_message_unref): free the service name
843         (dbus_message_get_fields): same change to varargs
844         i.e. first_field_type
845         (_dbus_message_loader_return_buffer): assert that the message data
846         is aligned (if not it's a bug in our code). Put in verbose griping
847         about why we set corrupted = TRUE.
848         (decode_header_data): add FIXME that char* is evil.  Was going to
849         add FIXME about evil locale-specific string.h strncmp, but just
850         switched to wacky string-as-uint32 optimization. Move check for
851         "no room for field name" above get_const_data_len() to avoid
852         assertion failure in get_const_data_len if we have trailing 2
853         bytes or the like. Check for service and name fields being
854         provided twice. Don't leak service/name on error. Require field
855         names to be aligned to 4 bytes.
856
857         * dbus/dbus-marshal.c: move byte swap stuff to header
858         (_dbus_pack_int32): uscore-prefix
859         (_dbus_unpack_int32): uscore-prefix
860         (_dbus_unpack_uint32): export
861         (_dbus_demarshal_string): add @todo complaining about use of
862         memcpy()
863         (_dbus_marshal_get_field_end_pos): add @todo about bad error
864         handling allowing corrupt data to go unchecked
865
866 2003-01-08  Havoc Pennington  <hp@redhat.com>
867
868         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
869         to the select() as needed for authentication. (should be using
870         _dbus_poll() not select, but for another day)
871
872         * dbus/dbus.h: include dbus/dbus-protocol.h
873
874 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
875
876         * dbus/Makefile.am (dbusinclude_HEADERS): Install
877         dbus-connection.h
878
879 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
880
881         * dbus/dbus-internals.c: (_dbus_type_to_string):
882         New function that returns a string describing a type.
883         
884         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
885         * dbus/dbus-marshal.h:
886         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
887         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
888         (dbus_message_iter_get_byte_array):
889         * dbus/dbus-message.h:
890         Add new convenience functions for appending and getting message fields.
891         Also add demarshalling routines for byte arrays.
892
893 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
894
895         * dbus/dbus-connection-internal.h:
896         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
897         (_dbus_connection_get_next_client_serial),
898         (dbus_connection_send_message):
899         * dbus/dbus-internals.h:
900         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
901         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
902         (_dbus_marshal_uint32), (_dbus_demarshal_double),
903         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
904         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
905         (_dbus_verbose_bytes), (_dbus_marshal_test):
906         * dbus/dbus-marshal.h:
907         * dbus/dbus-message-internal.h:
908         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
909         (dbus_message_write_header), (_dbus_message_lock),
910         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
911         (dbus_message_get_name), (dbus_message_append_int32),
912         (dbus_message_append_uint32), (dbus_message_append_double),
913         (dbus_message_append_string), (dbus_message_append_byte_array),
914         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
915         (dbus_message_iter_unref), (dbus_message_iter_has_next),
916         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
917         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
918         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
919         (decode_header_data), (_dbus_message_loader_return_buffer),
920         (message_iter_test), (_dbus_message_test):
921         * dbus/dbus-message.h:
922         * dbus/dbus-protocol.h:
923         * dbus/dbus-test.c: (main):
924         * dbus/dbus-test.h:
925         * glib/test-dbus-glib.c: (message_handler), (main):
926         * test/echo-client.c: (main):
927         * test/watch.c: (check_messages):
928         Make messages sendable and receivable for real.
929         
930 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
931
932         * dbus/dbus-marshal.c: (_dbus_marshal_double),
933         (_dbus_marshal_string), (_dbus_marshal_byte_array):
934         * dbus/dbus-message.c: (dbus_message_append_int32),
935         (dbus_message_append_uint32), (dbus_message_append_double),
936         (dbus_message_append_string), (dbus_message_append_byte_array):
937         Handle OOM restoration.
938         
939 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
940
941         * dbus/dbus-marshal.c: (_dbus_marshal_string),
942         (_dbus_demarshal_string), (_dbus_marshal_test):
943         * dbus/dbus-marshal.h:
944         * dbus/dbus-message.c: (dbus_message_get_name),
945         Document these functions.
946         
947         (dbus_message_append_int32), (dbus_message_append_uint32),
948         (dbus_message_append_double), (dbus_message_append_string),
949         (dbus_message_append_byte_array):
950         * dbus/dbus-message.h:
951         Add functions for adding message fields of different types.
952         
953         * dbus/dbus-protocol.h:
954         Add the different types.
955
956 2003-01-05  Havoc Pennington  <hp@pobox.com>
957
958         * bus/connection.c: implement routines for handling connections,
959         first thing is keeping a list of owned services on each connection
960         and setting up watches etc.
961
962         * bus/services.c: implement a mapping from service names to lists
963         of connections
964
965         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
966
967         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
968         to use static mutexes for global data
969
970         * dbus/dbus-connection.c (dbus_connection_set_data): add new
971         collection of functions to set/get application-specific data
972         on the DBusConnection.
973
974 2003-01-04  Havoc Pennington  <hp@pobox.com>
975
976         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
977         (_dbus_poll): new function
978
979         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
980         copied from GLib
981
982         * bus/loop.c: initial code for the daemon main loop
983
984 2003-01-04  Havoc Pennington  <hp@pobox.com>
985
986         * test/watch.c (error_handler): make it safe if the error handler 
987         is called multiple times (if we s/error handler/disconnect
988         handler/ we should just guarantee it's called only once)
989
990         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
991         error handler on disconnect (it's quite possible we should
992         just change the error handler to a "disconnect handler," I'm 
993         not sure we have any other meaningful errors)
994
995         * configure.in: check for getpwnam_r
996
997         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
998         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
999         mechanism as in SASL spec, using socket credentials
1000
1001         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1002         (_dbus_send_credentials_unix_socket): new function
1003
1004         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1005         dbus_accept()
1006         (_dbus_write): only check errno if <0 returned
1007         (_dbus_write_two): ditto
1008
1009 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
1010
1011         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1012         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1013         (_dbus_marshal_test):
1014         * dbus/dbus-marshal.h:
1015         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1016         to _dbus_marshal_utf8_string. Also fix some tests.
1017         
1018 2002-12-28  Harri Porten  <porten@kde.org>
1019
1020         * configure.in: added check for C++ compiler and a very cheesy
1021         check for the Qt integration
1022
1023         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1024
1025         * qt/Makefile.am: added 
1026
1027         * qt/.cvsignore: added  
1028
1029         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1030         latter, added #ifdef QT_THREAD_SUPPORT guard.
1031
1032         * dbus/Makefile.am: added missing headers for make dist
1033
1034 2002-12-28  Kristian Rietveld  <kris@gtk.org>
1035
1036         * dbus/Makefile.am: fixup export-symbols-regex.
1037
1038 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1039
1040         * acinclude.m4: Add this file and put the 
1041         PKG_CHECK_MODULE macro in it.
1042
1043 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1044
1045         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1046         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1047         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1048         (_dbus_marshal_test):
1049         Make the demarshalling routines align the pos argument.
1050         Add string marshalling tests and fix the obvious bugs 
1051         discovered.
1052         
1053 2002-12-26  Havoc Pennington  <hp@pobox.com>
1054
1055         * dbus/dbus-auth.c: fixes fixes fixes
1056
1057         * dbus/dbus-transport-unix.c: wire up support for
1058         encoding/decoding data on the wire
1059
1060         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
1061         (_dbus_auth_decode_data): append to target string 
1062         instead of nuking it.
1063
1064 2002-12-26  Havoc Pennington  <hp@pobox.com>
1065
1066         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1067         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1068         doh
1069
1070         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1071         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
1072         now). Main point is because I wanted unpack_uint32 to implement
1073         _dbus_verbose_bytes
1074         (_dbus_verbose_bytes): new function
1075
1076         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1077
1078         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1079         mechanism to handle a corrupt message stream
1080         (_dbus_message_loader_new): fix preallocation to only prealloc, 
1081         not prelengthen
1082         
1083         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1084         (_dbus_string_test): enhance tests for copy/move and fix the
1085         functions
1086
1087         * dbus/dbus-transport-unix.c: Hold references in more places to 
1088         avoid reentrancy problems
1089
1090         * dbus/dbus-transport.c: ditto
1091
1092         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1093         leak reference count in no-message case
1094
1095         * test/watch.c (do_mainloop): handle adding/removing watches
1096         during iteration over the watches. Also, ref the connection/server
1097         stored on a watch, so we don't try to mangle a destroyed one.
1098
1099         * dbus/dbus-transport-unix.c (do_authentication): perform
1100         authentication
1101
1102         * dbus/dbus-auth.c (get_state): add a state
1103         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1104         (_dbus_auth_get_unused_bytes): append the unused bytes
1105         to the passed in string, rather than prepend
1106
1107         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
1108         the auth conversation DBusAuth
1109
1110         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1111         (_dbus_transport_new_for_domain_socket): when creating a
1112         transport, pass in whether it's a client-side or server-side
1113         transport so we know which DBusAuth to create
1114
1115 2002-12-03  Havoc Pennington  <hp@pobox.com>
1116
1117         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1118         _after_ finalizing the derived members
1119         (unix_connection_set): unref watch if we fail to add it
1120
1121         * dbus/dbus-connection.c (dbus_connection_unref): delete the
1122         transport first, so that the connection owned by the 
1123         transport will be valid as the transport finalizes.
1124
1125         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1126         if necessary, and remove watches from the connection.
1127         
1128         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1129         
1130 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
1131
1132         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1133         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1134         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1135         (_dbus_marshal_test):
1136         * dbus/dbus-marshal.h:
1137         Add string marshal functions and have the demarshal functions
1138         return the new position.
1139         
1140 2002-12-25  Havoc Pennington  <hp@pobox.com>
1141
1142         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
1143         it is a simple protocol that just maps directly to SASL.
1144
1145         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1146         initial implementation, not actually used yet.
1147         
1148         * dbus/dbus-string.c (_dbus_string_find): new function
1149         (_dbus_string_equal): new function
1150         (_dbus_string_base64_encode): new function
1151         (_dbus_string_base64_decode): new function
1152
1153 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
1154
1155         * dbus/Makefile.am:
1156         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1157         (_dbus_marshal_int32), (_dbus_marshal_uint32),
1158         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1159         (_dbus_demarshal_uint32), (_dbus_marshal_test):
1160         * dbus/dbus-marshal.h:
1161         * dbus/dbus-protocol.h:
1162         * dbus/dbus-test.c: (main):
1163         * dbus/dbus-test.h:
1164         Add un-optimized marshalling/demarshalling routines.
1165         
1166 2002-12-25  Harri Porten  <porten@kde.org>
1167
1168         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1169
1170 2002-12-24  Zack Rusin  <zack@kde.org>
1171
1172         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1173         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1174         main loop stuff
1175
1176 2002-12-24  Havoc Pennington  <hp@pobox.com>
1177
1178         * glib/dbus-gthread.c: fix include
1179
1180         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
1181         I think glib API needs to change, though, as you don't 
1182         want to use DBusMessageFunction, you want to use the 
1183         DBusMessageHandler object. Probably 
1184         dbus_connection_open_with_g_main_loop()
1185         and dbus_connection_setup_g_main_loop() or something like that
1186         (but think of better names...) that just create a connection 
1187         that has watch/timeout functions etc. already set up.
1188
1189         * dbus/dbus-connection.c
1190         (dbus_connection_send_message_with_reply): new function just to 
1191         show how the message handler helps us deal with replies.
1192
1193         * dbus/dbus-list.c (_dbus_list_remove_last): new function
1194
1195         * dbus/dbus-string.c (_dbus_string_test): free a string that
1196         wasn't
1197
1198         * dbus/dbus-hash.c: use memory pools for the hash entries
1199         (rebuild_table): be more paranoid about overflow, and 
1200         shrink table when we can
1201         (_dbus_hash_test): reduce number of sprintfs and write
1202         valid C89. Add tests for case where we grow and then 
1203         shrink the hash table.
1204
1205         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1206
1207         * dbus/dbus-connection.c (dbus_connection_register_handler) 
1208         (dbus_connection_unregister_handler): new functions
1209
1210         * dbus/dbus-message.c (dbus_message_get_name): new
1211
1212         * dbus/dbus-list.c: fix docs typo
1213
1214         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1215         an object representing a handler for messages.
1216
1217 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1218
1219         * glib/dbus-glib.h:
1220         * glib/dbus-gthread.c: (dbus_gthread_init):
1221         Don't use the gdbus prefix for public functions.
1222         
1223 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1224
1225         * Makefile.am:
1226         * configure.in:
1227         Add GLib checks and fixup .pc files
1228         
1229         * glib/Makefile.am:
1230         * glib/dbus-glib.h:
1231         * glib/dbus-gmain.c: (gdbus_connection_prepare),
1232         (gdbus_connection_check), (gdbus_connection_dispatch),
1233         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1234         (dbus_connection_gsource_new):
1235         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1236         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1237         * glib/test-dbus-glib.c: (message_handler), (main):
1238         Add GLib support.
1239         
1240 2002-12-15  Harri Porten  <porten@kde.org>
1241
1242         * autogen.sh: check for libtoolize before attempting to use it 
1243         
1244         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1245         struct.
1246         
1247         * .cvsignore: ignore more stamp files
1248
1249         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1250
1251         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1252         without make install.
1253
1254 2002-12-15  Havoc Pennington  <hp@pobox.com>
1255
1256         * dbus/dbus-threads.c: add thread stubs that a higher library
1257         layer can fill in. e.g. the GLib wrapper might fill them in with
1258         GThread stuff. We still need to use this thread API to
1259         thread-safe-ize the library.
1260
1261 2002-12-12  Havoc Pennington  <hp@pobox.com>
1262
1263         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1264         below new interfaces and include fewer system headers.
1265
1266         * dbus/dbus-sysdeps.c (_dbus_read): new function
1267         (_dbus_write): new function
1268         (_dbus_write_two): new function
1269         (_dbus_connect_unix_socket): new function
1270         (_dbus_listen_unix_socket): new function
1271
1272         * dbus/dbus-message-internal.h: change interfaces to use
1273         DBusString
1274
1275 2002-12-11  Havoc Pennington  <hp@pobox.com>
1276
1277         * dbus/dbus-types.h: add dbus_unichar
1278
1279         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1280
1281         * dbus/dbus-connection.c (dbus_connection_send_message): return
1282         TRUE on success
1283
1284         * dbus/dbus-transport.c: include dbus-watch.h   
1285
1286         * dbus/dbus-connection.c: include dbus-message-internal.h
1287
1288         * HACKING: add file with coding guidelines stuff.
1289
1290         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1291         handling here, for security purposes (as in vsftpd). Not actually
1292         using this class yet.
1293
1294         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1295         system/libc usage here, as in vsftpd, for ease of auditing (and
1296         should also simplify portability). Haven't actually moved all the
1297         system/libc usage into here yet.
1298         
1299 2002-11-25  Havoc Pennington  <hp@pobox.com>
1300
1301         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
1302         always print the first verbose message.
1303
1304 2002-11-24  Havoc Pennington  <hp@pobox.com>
1305
1306         * test/echo-client.c, test/echo-server.c: cheesy test 
1307         clients.
1308         
1309         * configure.in (AC_CHECK_FUNCS): check for writev
1310
1311         * dbus/dbus-message.c (_dbus_message_get_network_data): new
1312         function
1313
1314         * dbus/dbus-list.c (_dbus_list_foreach): new function
1315
1316         * dbus/dbus-internals.c (_dbus_verbose): new function
1317
1318         * dbus/dbus-server.c, dbus/dbus-server.h: public object
1319         representing a server that listens for connections.
1320
1321         * dbus/.cvsignore: create
1322
1323         * dbus/dbus-errors.h, dbus/dbus-errors.c:
1324         public API for reporting errors
1325
1326         * dbus/dbus-connection.h, dbus/dbus-connection.c:
1327         public object representing a connection that 
1328         sends/receives messages. (Same object used for 
1329         both client and server.)
1330
1331         * dbus/dbus-transport.h, dbus/dbus-transport.c:
1332         Basic abstraction for different kinds of stream
1333         that we might read/write messages from.
1334
1335 2002-11-23  Havoc Pennington  <hp@pobox.com>
1336
1337         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
1338         _DBUS_INT_MAX
1339
1340         * dbus/dbus-test.c (main): add list test, and include 
1341         dbus-test.h as intended
1342
1343         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
1344         (_dbus_hash_table_remove_int): return value indicates 
1345         whether the entry existed to remove
1346
1347         * dbus/dbus-list.c: add linked list utility class, 
1348         with docs and tests
1349
1350         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
1351         array sometimes.
1352
1353 2002-11-23  Havoc Pennington  <hp@pobox.com>
1354
1355         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1356         DBUS_END_DECLS to nothing, that should fix this once and for all
1357
1358         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1359
1360         * dbus/dbus-message.c, dbus/dbus-hash.c: 
1361         add some missing @brief
1362
1363 2002-11-23  Havoc Pennington  <hp@pobox.com>
1364
1365         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
1366         to avoid confusing Doxygen
1367
1368         * dbus/dbus-hash.c: @} not }@
1369
1370         * dbus/dbus-message.c (struct DBusMessage): split out 
1371         internals docs
1372
1373 2002-11-23  Havoc Pennington  <hp@pobox.com>
1374
1375         * configure.in: pile on more warning flags if using gcc
1376
1377         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
1378         to document static functions
1379
1380         * configure.in: add summary to end of configure so it 
1381         looks nice and attractive
1382
1383         * dbus/dbus-hash.c: finish implementation and write unit 
1384         tests and docs
1385
1386         * configure.in: add --enable-tests to enable unit tests
1387
1388         * dbus/dbus-test.c: test program to run unit tests 
1389         for all files in dbus/*, initially runs a test for 
1390         dbus-hash.c
1391         
1392         * dbus/dbus-internals.h: file to hold some internal utility stuff
1393
1394 2002-11-22  Havoc Pennington  <hp@redhat.com>
1395
1396         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
1397         "ported" away from Tcl
1398
1399         * dbus/dbus-types.h: header for types such as dbus_bool_t
1400
1401 2002-11-22  Havoc Pennington  <hp@redhat.com>
1402
1403         * dbus/dbus.h: fixups for doc warnings
1404
1405         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
1406         macros
1407         (QUIET): make it quiet so we can see warnings
1408
1409         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1410
1411 2002-11-22  Havoc Pennington  <hp@redhat.com>
1412
1413         * Makefile.am: include "Doxyfile" target in all-local
1414
1415         * configure.in: generate the Doxyfile
1416
1417         * Doxyfile.in: move Doxyfile here, so we can use 
1418         configure to generate a Doxyfile with the right 
1419         version number etc.
1420
1421 2002-11-22  Havoc Pennington  <hp@redhat.com>
1422
1423         * dbus/dbus-message.c: move inline docs into .c file
1424
1425         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1426         so all docs are under doc/
1427         (MAN_EXTENSION): generate man pages. Use extension 
1428         ".3dbus" which matches ".3qt" on my system, 
1429         I guess this is OK, I don't know really.
1430         (FILE_PATTERNS): look for .c files not .h, makes sense
1431         for plain C I think
1432
1433 2002-11-22  Havoc Pennington  <hp@pobox.com>
1434
1435         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
1436         because any app can be a server, and any app can be a client, 
1437         the bus is a special kind of server.
1438
1439 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
1440
1441         * Doxyfile : adding. Still needs Makefile rules to be generated
1442         automatically (just run "doxygen" in the toplevel dir for now to
1443         generate docs)
1444         
1445         * dbus/dbus-message.h : Adding sample docs (javadoc since
1446         resembles gtk-doc a little more)
1447
1448         * dbus/dbus.h : Adding sample docs
1449
1450 2002-11-21  Havoc Pennington  <hp@redhat.com>
1451
1452         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
1453         so we can allow ourselves to include files directly, 
1454         instead of having to use dbus.h
1455
1456         * dbus/dbus.h: fill in
1457
1458         * dbus/dbus-message.h: sketch out a sample header file.
1459         Include griping if you include it directly instead of 
1460         via dbus.h
1461
1462         * dbus/dbus-macros.h: new file with macros for extern "C", 
1463         TRUE/FALSE, NULL, etc.
1464
1465         * doc/file-boilerplate.c: put include guards in here
1466
1467 2002-11-21  Havoc Pennington  <hp@redhat.com>
1468
1469         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1470
1471         * COPYING: include the GPL as well, and license code 
1472         under both AFL and GPL.
1473
1474 2002-11-21  Havoc Pennington  <hp@redhat.com>
1475
1476         * acconfig.h: get rid of this
1477
1478         * autogen.sh (run_configure): add --no-configure option
1479
1480         * configure.in: remove AC_ARG_PROGRAM to make
1481         autoconf complain less. add AC_PREREQ. 
1482         add AC_DEFINE third arg.
1483         
1484 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
1485
1486         * doc/Makefile.am:
1487         Fix references so we can distcheck.
1488
1489 2002-11-21  Havoc Pennington  <hp@redhat.com>
1490
1491         * Initial module creation
1492