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