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