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