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