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