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