1 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7 2003-02-06 Anders Carlsson <andersca@codefactory.se>
10 * dbus/dbus-break-loader.c:
12 * test/break-loader.c:
13 Move dbus-break-loader to test/ and rename it to break-loader.
15 2003-02-02 Havoc Pennington <hp@pobox.com>
17 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
18 for code to manage cookies in your home directory
20 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
22 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
23 to authenticate, then disconnect the client.
25 2003-02-03 Alexander Larsson <alexl@redhat.com>
27 * dbus/dbus-message.c (dbus_message_append_fields):
30 2003-02-02 Anders Carlsson <andersca@codefactory.se>
32 * doc/dbus-specification.sgml:
33 Update address format section.
35 2003-02-02 Anders Carlsson <andersca@codefactory.se>
38 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
39 (message_handler), (new_connection_callback), (loop_quit),
43 2003-02-02 Anders Carlsson <andersca@codefactory.se>
45 * bus/driver.c: (bus_driver_handle_service_exists):
46 Simplify the code a bit.
48 * dbus/dbus-bus.c: (dbus_bus_service_exists):
51 2003-02-02 Anders Carlsson <andersca@codefactory.se>
54 Add libdbus-daemon.la and link to it.
56 2003-02-01 James Willcox <jwillcox@gnome.org>
58 * bus/driver.c: (bus_driver_handle_own_service):
59 Actually include the service reply code in the message.
61 2003-02-02 Anders Carlsson <andersca@codefactory.se>
63 * bus/driver.c: (bus_driver_handle_service_exists):
64 Don't unref the incoming message.
66 2003-02-02 Anders Carlsson <andersca@codefactory.se>
68 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
70 2003-02-02 Anders Carlsson <andersca@codefactory.se>
72 * dbus/dbus-server.c: (dbus_server_listen):
73 * dbus/dbus-transport.c: (_dbus_transport_open):
74 ifdef out the calls to the debug transport and server.
76 2003-02-02 Alexander Larsson <alexl@redhat.com>
78 * dbus/dbus-watch.c (dbus_watch_get_flags):
79 Add note in the docs that ERROR or HANGUP won't be returned
80 and are assumed always on.
82 * glib/dbus-gmain.c (add_watch):
83 Always add IO_ERR | IO_HUP
85 * dbus/dbus-message.h:
86 Add semicolon after dbus_message_iter_get_string_array().
87 Makes qt code build again
89 2003-02-01 Anders Carlsson <andersca@codefactory.se>
91 * bus/driver.c: (create_unique_client_name),
92 (bus_driver_handle_hello):
93 Don't take a name, just use a numeric id to identify
97 * dbus/dbus-bus.c: (dbus_bus_register_client),
98 (dbus_bus_acquire_service), (dbus_bus_service_exists):
100 Add new convenience functions for communicating with the bus.
102 * dbus/dbus-message.h:
104 * dbus/dbus-protocol.h:
107 2003-02-01 Alexander Larsson <alexl@redhat.com>
109 * dbus/dbus-message.c (dbus_message_append_fields):
110 Add some more doc comments.
112 2003-02-01 Havoc Pennington <hp@pobox.com>
114 * dbus/dbus-break-loader.c (randomly_modify_length): change
115 a 4-byte value in the message as if it were a length
117 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
118 execute bit on saved files
120 2003-02-01 Havoc Pennington <hp@pobox.com>
122 * dbus/dbus-break-loader.c (main): new program to find messages
123 that break the loader.
125 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
126 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
128 * dbus/dbus-string.c (_dbus_string_set_byte): new
130 2003-01-31 Havoc Pennington <hp@pobox.com>
132 * dbus/dbus-message.c: refactor the test code to be more general,
133 in preparation for writing a "randomly permute test cases to
134 try to break the loader" program.
136 2003-01-31 Havoc Pennington <hp@pobox.com>
138 * doc/dbus-specification.sgml: work on the specification
140 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
141 the protocol version of the message.
143 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
144 no longer specifies that.
145 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
148 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
149 "break" for DBUS_TYPE_NIL, remove @todo
151 2003-01-31 Havoc Pennington <hp@pobox.com>
153 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
154 just set_is_error/get_is_error as this is a commonly-used
155 function, and write docs.
157 2003-01-31 Anders Carlsson <andersca@codefactory.se>
159 * dbus/dbus-address.c: (dbus_address_entry_free):
160 Free key and value lists.
162 * dbus/dbus-internals.c: (_dbus_type_to_string):
163 Add the types we didn't have.
165 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
166 (_dbus_marshal_validate_arg):
169 * dbus/dbus-message.c: (dbus_message_set_sender):
170 Remove todo about being able to set sender to NULL.
172 (dbus_message_set_is_error_reply),
173 (dbus_message_get_is_error_reply):
174 * dbus/dbus-message.h:
177 * dbus/dbus-protocol.h:
178 Add error reply flag.
180 * test/data/valid-messages/opposite-endian.message:
181 Add NIL type to test.
183 2003-01-31 Havoc Pennington <hp@pobox.com>
185 * doc/dbus-specification.sgml: fully specify the header. Add
186 flags and major protocol version, and change header/body len to
189 * dbus/dbus-message-builder.c (append_saved_length): append length
192 * dbus/dbus-message.c (dbus_message_create_header): change header
193 length and body length to unsigned. Add the new fields from the
195 (_dbus_message_loader_return_buffer): unsigned header/body len
197 2003-01-30 Havoc Pennington <hp@pobox.com>
199 * dbus/dbus-auth.c: rework to use only REJECTED, no
202 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
203 use REJECTED, suggested by Mark McLoughlin
205 2003-01-30 Havoc Pennington <hp@pobox.com>
207 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
208 a better way to report errors here. e.g. "unix address lacks
209 path" or something. also "no such file" when the path doesn't
212 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
214 (dbus_parse_address): add @todo about documenting address format,
215 and allowing , and ; to be escaped
217 2003-01-30 Anders Carlsson <andersca@codefactory.se>
220 Add dbus-address.[ch]
222 * dbus/dbus-address.c: (dbus_address_entry_free),
223 (dbus_address_entries_free), (create_entry),
224 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
225 (dbus_parse_address), (_dbus_address_test):
226 * dbus/dbus-address.h:
227 New files for dealing with address parsing.
229 * dbus/dbus-connection.c:
230 Document timeout functions.
232 * dbus/dbus-message.c:
233 Document dbus_message_new_from_message.
235 * dbus/dbus-server-debug.c:
238 * dbus/dbus-server.c: (dbus_server_listen):
239 Parse address and use correct server implementation.
241 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
242 * dbus/dbus-string.h:
243 New function with test.
245 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
249 * dbus/dbus-transport-debug.c:
252 * dbus/dbus-transport.c: (_dbus_transport_open):
253 Parse address and use correct transport implementation.
255 2003-01-30 Havoc Pennington <hp@pobox.com>
257 * dbus/dbus-message.c: use message->byte_order instead of
258 DBUS_COMPILER_BYTE_ORDER throughout.
259 (dbus_message_create_header): pad header to align the
260 start of the body of the message to 8-byte boundary
262 * dbus/dbus-marshal.h: make all the demarshalers take const
263 DBusString arguments.
265 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
266 validate message args here, so we don't have to do slow validation
267 later, and so we catch bad messages as they are incoming. Also add
268 better checks on header_len and body_len. Also fill in
271 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
272 implemented properly)
273 (_dbus_string_validate_nul): new function to check all-nul
275 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
276 get_arg_end_pos and remove all validation
277 (_dbus_marshal_validate_arg): actually do validation here.
279 2003-01-29 Havoc Pennington <hp@pobox.com>
281 * dbus/dbus-message.c (check_message_handling): fix assertion
282 failure on set_client_serial
284 2003-01-28 Havoc Pennington <hp@pobox.com>
286 * dbus/dbus-server-debug.c: Add doc section comments
288 * dbus/dbus-transport-debug.c: add doc section comments
290 2003-01-28 Havoc Pennington <hp@redhat.com>
292 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
293 the reverse order from how I had it
294 (_dbus_string_base64_encode): reverse encoding order. I was
295 basically byteswapping everything during encoding.
297 2003-01-28 Anders Carlsson <andersca@codefactory.se>
299 * dbus/dbus-connection-internal.h:
300 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
301 (_dbus_connection_remove_timeout):
302 Add functions for adding and removing timeouts.
304 * dbus/dbus-message.c: (dbus_message_new_from_message):
305 Add new function that takes a message and creates an exact
306 copy of it, but with the refcount set to 1.
307 (check_message_handling):
310 * dbus/dbus-server-protected.h:
311 * dbus/dbus-server.c: (_dbus_server_init_base),
312 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
313 (dbus_server_set_timeout_functions):
314 (_dbus_server_remove_timeout):
315 New functions so that a server can add and remove timeouts.
317 (dbus_server_listen):
318 Add commented out call to dbus_server_debug_new.
320 * dbus/dbus-timeout.c: (_dbus_timeout_new):
321 Actually set the handler, doh.
323 * dbus/dbus-transport.c: (_dbus_transport_open):
324 Add commented out call to dbus_transport_debug_client_new.
327 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
329 2003-01-28 Havoc Pennington <hp@pobox.com>
331 * dbus/dbus-message.c (check_message_handling): function to check
332 on the loaded message, iterates over it etc.
334 2003-01-28 Havoc Pennington <hp@pobox.com>
336 * test/Makefile.am (dist-hook): fix make distdir
338 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
340 2003-01-27 Havoc Pennington <hp@pobox.com>
342 * dbus/dbus-mempool.c (time_for_size): replace printf with
345 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
346 empty lines; fix the SAVE_LENGTH stuff to be
347 START_LENGTH/END_LENGTH so it actually works; couple other
350 * test/Makefile.am (dist-hook): add dist-hook for .message files
352 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
353 can be constant or locked.
354 (_dbus_string_free): allow freeing a const string as
357 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
359 * dbus/dbus-test-main.c (main): take an argument which is the
360 directory containing test data
362 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
363 argument to this and load all the messages in test/data/
364 checking that they can be loaded or not loaded as appropriate.
366 2003-01-27 Anders Carlsson <andersca@codefactory.se>
368 * bus/dispatch.c: (bus_dispatch_message_handler):
369 Dispatch messages sent to services.
371 * bus/driver.c: (bus_driver_send_service_deleted),
372 (bus_driver_send_service_created), (bus_driver_send_service_lost),
373 (bus_driver_send_service_acquired):
374 Add helper functions for sending service related messages.
376 (bus_driver_send_welcome_message):
377 Send HELLO_REPLY instead of WELCOME.
379 (bus_driver_handle_list_services):
380 Send LIST_SERVICES_REPLY instead of SERVICES.
382 (bus_driver_handle_own_service),
383 (bus_driver_handle_service_exists):
384 New message handlers.
386 (bus_driver_handle_message):
387 Invoke new message handlers.
389 (bus_driver_remove_connection):
390 Don't remove any services here since that's done automatically
391 by bus_service_remove_owner now.
394 New function signatures.
396 * bus/services.c: (bus_service_add_owner):
397 Send ServiceAcquired message if we're the only primary owner.
399 (bus_service_remove_owner):
400 Send ServiceAcquired/ServiceLost messages.
402 (bus_service_set_prohibit_replacement),
403 (bus_service_get_prohibit_replacement):
404 Functions for setting prohibit replacement.
406 (bus_service_has_owner):
407 New function that checks if a connection is in the owner queue of
411 Add new function signatures.
413 * dbus/dbus-list.c: (_dbus_list_test):
414 Add tests for _dbus_list_remove_last and traversing the list backwards.
417 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
418 go any further, so return NULL then.
420 * dbus/dbus-protocol.h:
421 Add new messages, service flags and service replies.
423 2003-01-26 Havoc Pennington <hp@pobox.com>
425 * dbus/dbus-message-builder.c: implement, completely untested.
427 * test/data/*: add data to be used in testing.
428 ".message" files are our simple loadable text format.
429 ".message-raw" will be binary dumps of messages.
431 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
433 2003-01-26 Havoc Pennington <hp@pobox.com>
435 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
437 * dbus/dbus-errors.c (dbus_result_to_string): add
440 * dbus/dbus-message-builder.c: new file, will contain code to load
441 up messages from files. Not implemented yet.
443 2003-01-26 Havoc Pennington <hp@pobox.com>
445 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
446 the sender by setting to NULL
448 2003-01-26 Havoc Pennington <hp@pobox.com>
450 The unit tests pass, but otherwise untested. If it breaks, the
451 tests should have been better. ;-)
453 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
456 * dbus/dbus-message.c: redo everything so we maintain
457 message->header as the only copy of the various fields.
458 This avoids the possibility of out-of-memory in some cases,
459 for example dbus_message_lock() can't run out of memory anymore,
460 and avoids extra copying. Figured I may as well go ahead and do
461 this since it was busted for dbus_message_lock to not return
462 failure on OOM, and dbus_message_write_header was totally
463 unchecked for OOM. Also fixed some random other bugs.
465 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
466 that strings are nul-terminated. Also, end_pos can be equal
467 to string length just not greater than, I think.
468 (_dbus_marshal_set_int32): new function
469 (_dbus_marshal_set_uint32): new function
470 (_dbus_marshal_set_string): new function
472 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
473 a warning, init timeout_list to NULL
474 (dbus_connection_send_message): don't use uninitialized variable
477 * dbus/dbus-string.c (_dbus_string_replace_len): new function
479 2003-01-26 Anders Carlsson <andersca@codefactory.se>
481 * bus/driver.c: (bus_driver_handle_hello),
482 (bus_driver_send_welcome_message):
485 2003-01-26 Anders Carlsson <andersca@codefactory.se>
487 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
488 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
489 (dbus_connection_unref):
490 * dbus/dbus-marshal.c: (_dbus_marshal_test):
491 * dbus/dbus-message.c: (dbus_message_unref),
494 (dbus_message_get_fields):
495 Remove debugging printout.
497 (_dbus_message_loader_return_buffer):
498 Don't store the header string.
500 (_dbus_message_test):
503 2003-01-26 Richard Hult <rhult@codefactory.se>
505 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
506 the file descriptor list, since it can change under us.
508 2003-01-25 Anders Carlsson <andersca@codefactory.se>
510 * glib/dbus-gmain.c: (dbus_connection_prepare),
511 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
512 (remove_watch), (dbus_connection_hookup_with_g_main):
513 Rewrite the glib handling to use its own GSource instead of a
514 GIOChannel so we can catch messages put in the queue while waiting
517 2003-01-25 Anders Carlsson <andersca@codefactory.se>
520 * bus/connection.c: (connection_disconnect_handler),
521 (connection_watch_callback), (bus_connection_setup):
522 * bus/dispatch.c: (send_one_message),
523 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
524 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
526 * bus/driver.c: (bus_driver_send_service_deleted),
527 (bus_driver_send_service_created), (bus_driver_handle_hello),
528 (bus_driver_send_welcome_message),
529 (bus_driver_handle_list_services), (bus_driver_remove_connection),
530 (bus_driver_handle_message):
532 Refactor code, put the message dispatching in its own file. Use
533 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
536 2003-01-25 Anders Carlsson <andersca@codefactory.se>
538 * dbus/dbus-internals.h:
539 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
541 * dbus/dbus-message.c: (dbus_message_get_sender):
542 * dbus/dbus-message.h:
543 Implement dbus_message_get_sender.
545 * dbus/dbus-protocol.h:
546 Add message and service defines.
548 2003-01-25 Anders Carlsson <andersca@codefactory.se>
550 * dbus/dbus-connection.c: (dbus_connection_send_message):
551 * dbus/dbus-message-internal.h:
552 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
553 (dbus_message_write_header):
554 Remove _dbus_messag_unlock and don't set the client serial on a
555 message if one already exists.
557 2003-01-24 Havoc Pennington <hp@pobox.com>
559 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
562 * bus/driver.c (bus_driver_handle_list_services): fix a leak
565 2003-01-25 Anders Carlsson <andersca@codefactory.se>
567 * dbus/dbus-list.c: (alloc_link), (free_link):
568 Use a memory pool for the links.
570 2003-01-25 Anders Carlsson <andersca@codefactory.se>
572 * bus/connection.c: (bus_connection_foreach):
574 Add new bus_connection_foreach function.
576 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
577 Add function that broadcasts a message to all clients.
579 (bus_driver_send_service_created), (bus_driver_handle_hello),
580 (bus_driver_send_welcome_message),
581 (bus_driver_handle_list_services), (bus_driver_message_handler):
582 Implement functions that take care of listing services, and notifying
583 clients when new services are created.
585 * bus/services.c: (bus_services_list):
587 Add new function that returns an array of strings with the currently
592 Update copyright year.
594 2003-01-25 Anders Carlsson <andersca@codefactory.se>
596 * dbus/dbus-connection.c: (dbus_connection_send_message):
597 Unlock the message in case it was sent earlier.
599 (dbus_connection_send_message_with_reply_and_block):
600 Remove the reply message from the list.
602 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
603 Set array_len and new_pos correctly.
605 (_dbus_marshal_test):
608 * dbus/dbus-message-internal.h:
609 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
610 New function that returns the reply serial.
612 (_dbus_message_unlock):
613 New function that unlocks a message and resets its header.
615 (dbus_message_append_string_array),
616 (dbus_message_get_fields_valist),
617 (dbus_message_iter_get_field_type),
618 (dbus_message_iter_get_string_array),
619 (dbus_message_get_fields),
620 (dbus_message_append_fields_valist):
621 Handle string arrays.
623 (dbus_message_set_sender):
624 Make this function public since the bus daemon needs it.
626 (decode_header_data):
627 Set the reply serial to -1 initially.
629 * dbus/dbus-message.h:
630 Add dbus_message_set_sender.
632 2003-01-24 Havoc Pennington <hp@pobox.com>
634 * doc/dbus-specification.sgml: add some stuff
636 2003-01-22 Havoc Pennington <hp@pobox.com>
638 * doc/dbus-specification.sgml: Start to document the protocol.
640 2003-01-22 Havoc Pennington <hp@pobox.com>
642 * dbus/dbus-connection.c
643 (dbus_connection_send_message_with_reply_and_block): add some @todo
645 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
647 2003-01-21 Havoc Pennington <hp@pobox.com>
649 (patch untested because can't compile)
651 * bus/driver.c (create_unique_client_name): make this function
652 never recycle client names. Also, caller should initialize
655 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
657 2003-01-21 Anders Carlsson <andersca@codefactory.se>
659 * dbus/dbus-marshal.c: (_dbus_marshal_double),
660 (_dbus_marshal_int32), (_dbus_marshal_uint32),
661 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
662 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
663 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
664 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
665 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
666 * dbus/dbus-marshal.h:
667 * dbus/dbus-protocol.h:
668 Add support for marshalling and demarshalling integer, double
671 2003-01-21 Anders Carlsson <andersca@codefactory.se>
676 * bus/connection.c: (connection_disconnect_handler):
677 Remove the connection from the bus driver's list.
679 (connection_watch_callback): Dispatch messages.
681 (free_connection_data): Free connection name.
683 (bus_connection_setup): Add connection to the bus driver's list.
684 (bus_connection_remove_owned_service):
685 (bus_connection_set_name), (bus_connection_get_name):
686 Add functions for setting and getting the connection's name.
689 Add function headers.
691 * bus/driver.c: (create_unique_client_name),
692 (bus_driver_handle_hello_message),
693 (bus_driver_send_welcome_message), (bus_driver_message_handler),
694 (bus_driver_add_connection), (bus_driver_remove_connection):
697 * bus/services.c: (bus_service_free):
699 New file that handles communication and registreation with the bus
702 2003-01-21 Anders Carlsson <andersca@codefactory.se>
704 * dbus/dbus-connection.c: (dbus_connection_send_message):
705 Add a new client_serial parameter.
707 (dbus_connection_send_message_with_reply):
708 Remove a @todo since we've implemented the blocking function.
710 (dbus_connection_send_message_with_reply_and_block):
711 New function that sends a message and waits for a reply and
712 then returns the reply.
714 * dbus/dbus-connection.h:
717 * dbus/dbus-errors.c: (dbus_result_to_string):
718 * dbus/dbus-errors.h:
721 * dbus/dbus-message-internal.h:
722 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
723 (_dbus_message_set_sender), (dbus_message_write_header),
724 (dbus_message_new_reply), (decode_header_data),
725 (_dbus_message_loader_return_buffer), (_dbus_message_test):
726 * dbus/dbus-message.h:
727 Add new functions that set the reply serial and sender.
728 Also marshal and demarshal them correctly and add test.
730 * dbus/dbus-protocol.h:
731 Add new DBUS_MESSAGE_TYPE_SENDER.
734 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
735 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
736 (dbus_connection_hookup_with_g_main):
737 * glib/test-dbus-glib.c: (main):
738 Rewrite to use GIOChannel and remove the GSource crack.
740 * test/echo-client.c: (main):
741 * test/watch.c: (check_messages):
742 Update for changed APIs
744 2003-01-19 Anders Carlsson <andersca@codefactory.se>
746 * dbus/Makefile.am: Add dbus-timeout.[cħ]
748 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
749 Create a DBusTimeoutList.
750 (dbus_connection_set_timeout_functions): Add new function to
751 set timeout callbacks
753 * dbus/dbus-connection.h: Add public DBusTimeout API.
755 * dbus/dbus-message.c: (dbus_message_get_service):
756 * dbus/dbus-message.h: New function.
758 * dbus/dbus-server.c: Fix small doc typo.
760 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
762 2003-01-19 Anders Carlsson <andersca@codefactory.se>
764 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
765 of the string, just as long as specified.
767 2003-01-19 Havoc Pennington <hp@pobox.com>
769 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
772 * dbus/dbus-server.c (dbus_server_set_max_connections)
773 (dbus_server_get_max_connections, dbus_server_get_n_connections):
774 keep track of current number of connections, and add API for
775 setting a max (but haven't implemented enforcing the max yet)
777 2003-01-18 Havoc Pennington <hp@pobox.com>
779 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
780 reading/writing if read_watch != NULL or write_watch != NULL.
782 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
783 the message loader code to actually load message->header and
784 message->body into the newly-created message.
786 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
789 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
790 (dbus_connection_get_max_message_size)
791 (dbus_connection_set_max_live_messages_size)
792 (dbus_connection_get_max_live_messages_size): implement some
793 resource limitation functions
795 * dbus/dbus-resources.c: new file implementing some of the
796 resource limits stuff
798 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
799 missing docs, add @todo to handle OOM etc.
801 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
804 2003-01-18 Havoc Pennington <hp@pobox.com>
806 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
807 connection if it hasn't been already.
809 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
810 replace with DisconnectFunction.
812 2003-01-18 Havoc Pennington <hp@pobox.com>
814 Building --disable-verbose-mode --disable-asserts --disable-tests
815 cuts the library from 112K to 45K or so
817 * configure.in: check for varargs macro support,
818 add --enable-verbose-mode, --enable-asserts.
820 * dbus/dbus-internals.h (_dbus_assert): support
822 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
824 2003-01-18 Havoc Pennington <hp@pobox.com>
826 * dbus/dbus-test.c: include config.h so that tests actually run
828 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
829 so the failure mode when that assumption fails will be plenty
832 2003-01-18 Havoc Pennington <hp@pobox.com>
834 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
836 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
839 * test/Makefile.am: don't use special variable "TESTS" for echo-*
840 since we don't want to use those in make check
842 2003-01-15 Havoc Pennington <hp@redhat.com>
848 2003-01-15 Havoc Pennington <hp@redhat.com>
850 * test/Makefile.am: fix so that test source code ends up in the
851 distribution on make distcheck
853 2003-01-15 Havoc Pennington <hp@redhat.com>
859 2003-01-15 Havoc Pennington <hp@redhat.com>
861 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
862 fix build when --disable-tests
864 * Makefile.am (EXTRA_DIST): put HACKING in here
866 * HACKING: document procedure for making a tarball release.
868 2003-01-14 Anders Carlsson <andersca@codefactory.se>
870 * bus/connection.c: (connection_error_handler),
871 (bus_connection_setup):
872 * bus/main.c: (main):
873 Make sure that the DBusConnectionData struct is NULLed
874 out to prevent a segfault.
876 * dbus/dbus-errors.c: (dbus_result_to_string):
877 * dbus/dbus-errors.h:
878 * dbus/dbus-message.c: (dbus_message_get_fields),
879 (dbus_message_get_fields_valist), (_dbus_message_test):
880 * dbus/dbus-message.h:
881 Make dbus_message_get_fields return a result code so we can
882 track invalid fields as well as oom.
884 2003-01-11 Havoc Pennington <hp@pobox.com>
886 * configure.in: change --enable-test/--enable-ansi action-if-given
887 to enable_foo=$enableval instead of enable_foo=yes
889 2003-01-08 Havoc Pennington <hp@pobox.com>
891 * dbus/dbus-string.c (_dbus_string_align_length): new function
893 * dbus/dbus-test-main.c: move main() for test app here
895 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
896 symbol to run tests, because dbus-test isn't in the main
899 Code review nitpicks.
901 * dbus/dbus-message.c (dbus_message_write_header): add newlines
902 for people with narrow emacs ;-). Assert client_serial was filled
903 in. Assert message->name != NULL.
904 (dbus_message_append_fields): have "first_field_type" arg separate
905 from va list, needed for C++ binding that also uses varargs IIRC
906 and helps with type safety
907 (dbus_message_new): add @todo about using DBusString to store
908 service/name internally
909 (dbus_message_new): don't leak ->service and ->name on OOM later
911 (dbus_message_unref): free the service name
912 (dbus_message_get_fields): same change to varargs
913 i.e. first_field_type
914 (_dbus_message_loader_return_buffer): assert that the message data
915 is aligned (if not it's a bug in our code). Put in verbose griping
916 about why we set corrupted = TRUE.
917 (decode_header_data): add FIXME that char* is evil. Was going to
918 add FIXME about evil locale-specific string.h strncmp, but just
919 switched to wacky string-as-uint32 optimization. Move check for
920 "no room for field name" above get_const_data_len() to avoid
921 assertion failure in get_const_data_len if we have trailing 2
922 bytes or the like. Check for service and name fields being
923 provided twice. Don't leak service/name on error. Require field
924 names to be aligned to 4 bytes.
926 * dbus/dbus-marshal.c: move byte swap stuff to header
927 (_dbus_pack_int32): uscore-prefix
928 (_dbus_unpack_int32): uscore-prefix
929 (_dbus_unpack_uint32): export
930 (_dbus_demarshal_string): add @todo complaining about use of
932 (_dbus_marshal_get_field_end_pos): add @todo about bad error
933 handling allowing corrupt data to go unchecked
935 2003-01-08 Havoc Pennington <hp@redhat.com>
937 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
938 to the select() as needed for authentication. (should be using
939 _dbus_poll() not select, but for another day)
941 * dbus/dbus.h: include dbus/dbus-protocol.h
943 2003-01-08 Anders Carlsson <andersca@codefactory.se>
945 * dbus/Makefile.am (dbusinclude_HEADERS): Install
948 2003-01-08 Anders Carlsson <andersca@codefactory.se>
950 * dbus/dbus-internals.c: (_dbus_type_to_string):
951 New function that returns a string describing a type.
953 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
954 * dbus/dbus-marshal.h:
955 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
956 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
957 (dbus_message_iter_get_byte_array):
958 * dbus/dbus-message.h:
959 Add new convenience functions for appending and getting message fields.
960 Also add demarshalling routines for byte arrays.
962 2003-01-07 Anders Carlsson <andersca@codefactory.se>
964 * dbus/dbus-connection-internal.h:
965 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
966 (_dbus_connection_get_next_client_serial),
967 (dbus_connection_send_message):
968 * dbus/dbus-internals.h:
969 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
970 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
971 (_dbus_marshal_uint32), (_dbus_demarshal_double),
972 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
973 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
974 (_dbus_verbose_bytes), (_dbus_marshal_test):
975 * dbus/dbus-marshal.h:
976 * dbus/dbus-message-internal.h:
977 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
978 (dbus_message_write_header), (_dbus_message_lock),
979 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
980 (dbus_message_get_name), (dbus_message_append_int32),
981 (dbus_message_append_uint32), (dbus_message_append_double),
982 (dbus_message_append_string), (dbus_message_append_byte_array),
983 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
984 (dbus_message_iter_unref), (dbus_message_iter_has_next),
985 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
986 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
987 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
988 (decode_header_data), (_dbus_message_loader_return_buffer),
989 (message_iter_test), (_dbus_message_test):
990 * dbus/dbus-message.h:
991 * dbus/dbus-protocol.h:
992 * dbus/dbus-test.c: (main):
994 * glib/test-dbus-glib.c: (message_handler), (main):
995 * test/echo-client.c: (main):
996 * test/watch.c: (check_messages):
997 Make messages sendable and receivable for real.
999 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1001 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1002 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1003 * dbus/dbus-message.c: (dbus_message_append_int32),
1004 (dbus_message_append_uint32), (dbus_message_append_double),
1005 (dbus_message_append_string), (dbus_message_append_byte_array):
1006 Handle OOM restoration.
1008 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1010 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1011 (_dbus_demarshal_string), (_dbus_marshal_test):
1012 * dbus/dbus-marshal.h:
1013 * dbus/dbus-message.c: (dbus_message_get_name),
1014 Document these functions.
1016 (dbus_message_append_int32), (dbus_message_append_uint32),
1017 (dbus_message_append_double), (dbus_message_append_string),
1018 (dbus_message_append_byte_array):
1019 * dbus/dbus-message.h:
1020 Add functions for adding message fields of different types.
1022 * dbus/dbus-protocol.h:
1023 Add the different types.
1025 2003-01-05 Havoc Pennington <hp@pobox.com>
1027 * bus/connection.c: implement routines for handling connections,
1028 first thing is keeping a list of owned services on each connection
1029 and setting up watches etc.
1031 * bus/services.c: implement a mapping from service names to lists
1034 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1036 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1037 to use static mutexes for global data
1039 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1040 collection of functions to set/get application-specific data
1041 on the DBusConnection.
1043 2003-01-04 Havoc Pennington <hp@pobox.com>
1045 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1046 (_dbus_poll): new function
1048 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1051 * bus/loop.c: initial code for the daemon main loop
1053 2003-01-04 Havoc Pennington <hp@pobox.com>
1055 * test/watch.c (error_handler): make it safe if the error handler
1056 is called multiple times (if we s/error handler/disconnect
1057 handler/ we should just guarantee it's called only once)
1059 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1060 error handler on disconnect (it's quite possible we should
1061 just change the error handler to a "disconnect handler," I'm
1062 not sure we have any other meaningful errors)
1064 * configure.in: check for getpwnam_r
1066 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1067 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1068 mechanism as in SASL spec, using socket credentials
1070 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1071 (_dbus_send_credentials_unix_socket): new function
1073 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1075 (_dbus_write): only check errno if <0 returned
1076 (_dbus_write_two): ditto
1078 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1080 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1081 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1082 (_dbus_marshal_test):
1083 * dbus/dbus-marshal.h:
1084 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1085 to _dbus_marshal_utf8_string. Also fix some tests.
1087 2002-12-28 Harri Porten <porten@kde.org>
1089 * configure.in: added check for C++ compiler and a very cheesy
1090 check for the Qt integration
1092 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1094 * qt/Makefile.am: added
1096 * qt/.cvsignore: added
1098 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1099 latter, added #ifdef QT_THREAD_SUPPORT guard.
1101 * dbus/Makefile.am: added missing headers for make dist
1103 2002-12-28 Kristian Rietveld <kris@gtk.org>
1105 * dbus/Makefile.am: fixup export-symbols-regex.
1107 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1109 * acinclude.m4: Add this file and put the
1110 PKG_CHECK_MODULE macro in it.
1112 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1114 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1115 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1116 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1117 (_dbus_marshal_test):
1118 Make the demarshalling routines align the pos argument.
1119 Add string marshalling tests and fix the obvious bugs
1122 2002-12-26 Havoc Pennington <hp@pobox.com>
1124 * dbus/dbus-auth.c: fixes fixes fixes
1126 * dbus/dbus-transport-unix.c: wire up support for
1127 encoding/decoding data on the wire
1129 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1130 (_dbus_auth_decode_data): append to target string
1131 instead of nuking it.
1133 2002-12-26 Havoc Pennington <hp@pobox.com>
1135 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1136 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1139 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1140 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1141 now). Main point is because I wanted unpack_uint32 to implement
1143 (_dbus_verbose_bytes): new function
1145 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1147 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1148 mechanism to handle a corrupt message stream
1149 (_dbus_message_loader_new): fix preallocation to only prealloc,
1152 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1153 (_dbus_string_test): enhance tests for copy/move and fix the
1156 * dbus/dbus-transport-unix.c: Hold references in more places to
1157 avoid reentrancy problems
1159 * dbus/dbus-transport.c: ditto
1161 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1162 leak reference count in no-message case
1164 * test/watch.c (do_mainloop): handle adding/removing watches
1165 during iteration over the watches. Also, ref the connection/server
1166 stored on a watch, so we don't try to mangle a destroyed one.
1168 * dbus/dbus-transport-unix.c (do_authentication): perform
1171 * dbus/dbus-auth.c (get_state): add a state
1172 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1173 (_dbus_auth_get_unused_bytes): append the unused bytes
1174 to the passed in string, rather than prepend
1176 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1177 the auth conversation DBusAuth
1179 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1180 (_dbus_transport_new_for_domain_socket): when creating a
1181 transport, pass in whether it's a client-side or server-side
1182 transport so we know which DBusAuth to create
1184 2002-12-03 Havoc Pennington <hp@pobox.com>
1186 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1187 _after_ finalizing the derived members
1188 (unix_connection_set): unref watch if we fail to add it
1190 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1191 transport first, so that the connection owned by the
1192 transport will be valid as the transport finalizes.
1194 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1195 if necessary, and remove watches from the connection.
1197 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1199 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1201 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1202 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1203 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1204 (_dbus_marshal_test):
1205 * dbus/dbus-marshal.h:
1206 Add string marshal functions and have the demarshal functions
1207 return the new position.
1209 2002-12-25 Havoc Pennington <hp@pobox.com>
1211 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1212 it is a simple protocol that just maps directly to SASL.
1214 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1215 initial implementation, not actually used yet.
1217 * dbus/dbus-string.c (_dbus_string_find): new function
1218 (_dbus_string_equal): new function
1219 (_dbus_string_base64_encode): new function
1220 (_dbus_string_base64_decode): new function
1222 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1225 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1226 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1227 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1228 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1229 * dbus/dbus-marshal.h:
1230 * dbus/dbus-protocol.h:
1231 * dbus/dbus-test.c: (main):
1233 Add un-optimized marshalling/demarshalling routines.
1235 2002-12-25 Harri Porten <porten@kde.org>
1237 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1239 2002-12-24 Zack Rusin <zack@kde.org>
1241 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1242 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1245 2002-12-24 Havoc Pennington <hp@pobox.com>
1247 * glib/dbus-gthread.c: fix include
1249 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1250 I think glib API needs to change, though, as you don't
1251 want to use DBusMessageFunction, you want to use the
1252 DBusMessageHandler object. Probably
1253 dbus_connection_open_with_g_main_loop()
1254 and dbus_connection_setup_g_main_loop() or something like that
1255 (but think of better names...) that just create a connection
1256 that has watch/timeout functions etc. already set up.
1258 * dbus/dbus-connection.c
1259 (dbus_connection_send_message_with_reply): new function just to
1260 show how the message handler helps us deal with replies.
1262 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1264 * dbus/dbus-string.c (_dbus_string_test): free a string that
1267 * dbus/dbus-hash.c: use memory pools for the hash entries
1268 (rebuild_table): be more paranoid about overflow, and
1269 shrink table when we can
1270 (_dbus_hash_test): reduce number of sprintfs and write
1271 valid C89. Add tests for case where we grow and then
1272 shrink the hash table.
1274 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1276 * dbus/dbus-connection.c (dbus_connection_register_handler)
1277 (dbus_connection_unregister_handler): new functions
1279 * dbus/dbus-message.c (dbus_message_get_name): new
1281 * dbus/dbus-list.c: fix docs typo
1283 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1284 an object representing a handler for messages.
1286 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1289 * glib/dbus-gthread.c: (dbus_gthread_init):
1290 Don't use the gdbus prefix for public functions.
1292 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1296 Add GLib checks and fixup .pc files
1300 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1301 (gdbus_connection_check), (gdbus_connection_dispatch),
1302 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1303 (dbus_connection_gsource_new):
1304 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1305 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1306 * glib/test-dbus-glib.c: (message_handler), (main):
1309 2002-12-15 Harri Porten <porten@kde.org>
1311 * autogen.sh: check for libtoolize before attempting to use it
1313 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1316 * .cvsignore: ignore more stamp files
1318 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1320 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1321 without make install.
1323 2002-12-15 Havoc Pennington <hp@pobox.com>
1325 * dbus/dbus-threads.c: add thread stubs that a higher library
1326 layer can fill in. e.g. the GLib wrapper might fill them in with
1327 GThread stuff. We still need to use this thread API to
1328 thread-safe-ize the library.
1330 2002-12-12 Havoc Pennington <hp@pobox.com>
1332 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1333 below new interfaces and include fewer system headers.
1335 * dbus/dbus-sysdeps.c (_dbus_read): new function
1336 (_dbus_write): new function
1337 (_dbus_write_two): new function
1338 (_dbus_connect_unix_socket): new function
1339 (_dbus_listen_unix_socket): new function
1341 * dbus/dbus-message-internal.h: change interfaces to use
1344 2002-12-11 Havoc Pennington <hp@pobox.com>
1346 * dbus/dbus-types.h: add dbus_unichar
1348 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1350 * dbus/dbus-connection.c (dbus_connection_send_message): return
1353 * dbus/dbus-transport.c: include dbus-watch.h
1355 * dbus/dbus-connection.c: include dbus-message-internal.h
1357 * HACKING: add file with coding guidelines stuff.
1359 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1360 handling here, for security purposes (as in vsftpd). Not actually
1361 using this class yet.
1363 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1364 system/libc usage here, as in vsftpd, for ease of auditing (and
1365 should also simplify portability). Haven't actually moved all the
1366 system/libc usage into here yet.
1368 2002-11-25 Havoc Pennington <hp@pobox.com>
1370 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1371 always print the first verbose message.
1373 2002-11-24 Havoc Pennington <hp@pobox.com>
1375 * test/echo-client.c, test/echo-server.c: cheesy test
1378 * configure.in (AC_CHECK_FUNCS): check for writev
1380 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1383 * dbus/dbus-list.c (_dbus_list_foreach): new function
1385 * dbus/dbus-internals.c (_dbus_verbose): new function
1387 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1388 representing a server that listens for connections.
1390 * dbus/.cvsignore: create
1392 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1393 public API for reporting errors
1395 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1396 public object representing a connection that
1397 sends/receives messages. (Same object used for
1398 both client and server.)
1400 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1401 Basic abstraction for different kinds of stream
1402 that we might read/write messages from.
1404 2002-11-23 Havoc Pennington <hp@pobox.com>
1406 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1409 * dbus/dbus-test.c (main): add list test, and include
1410 dbus-test.h as intended
1412 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1413 (_dbus_hash_table_remove_int): return value indicates
1414 whether the entry existed to remove
1416 * dbus/dbus-list.c: add linked list utility class,
1419 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1422 2002-11-23 Havoc Pennington <hp@pobox.com>
1424 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1425 DBUS_END_DECLS to nothing, that should fix this once and for all
1427 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1429 * dbus/dbus-message.c, dbus/dbus-hash.c:
1430 add some missing @brief
1432 2002-11-23 Havoc Pennington <hp@pobox.com>
1434 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1435 to avoid confusing Doxygen
1437 * dbus/dbus-hash.c: @} not }@
1439 * dbus/dbus-message.c (struct DBusMessage): split out
1442 2002-11-23 Havoc Pennington <hp@pobox.com>
1444 * configure.in: pile on more warning flags if using gcc
1446 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1447 to document static functions
1449 * configure.in: add summary to end of configure so it
1450 looks nice and attractive
1452 * dbus/dbus-hash.c: finish implementation and write unit
1455 * configure.in: add --enable-tests to enable unit tests
1457 * dbus/dbus-test.c: test program to run unit tests
1458 for all files in dbus/*, initially runs a test for
1461 * dbus/dbus-internals.h: file to hold some internal utility stuff
1463 2002-11-22 Havoc Pennington <hp@redhat.com>
1465 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1466 "ported" away from Tcl
1468 * dbus/dbus-types.h: header for types such as dbus_bool_t
1470 2002-11-22 Havoc Pennington <hp@redhat.com>
1472 * dbus/dbus.h: fixups for doc warnings
1474 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1476 (QUIET): make it quiet so we can see warnings
1478 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1480 2002-11-22 Havoc Pennington <hp@redhat.com>
1482 * Makefile.am: include "Doxyfile" target in all-local
1484 * configure.in: generate the Doxyfile
1486 * Doxyfile.in: move Doxyfile here, so we can use
1487 configure to generate a Doxyfile with the right
1490 2002-11-22 Havoc Pennington <hp@redhat.com>
1492 * dbus/dbus-message.c: move inline docs into .c file
1494 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1495 so all docs are under doc/
1496 (MAN_EXTENSION): generate man pages. Use extension
1497 ".3dbus" which matches ".3qt" on my system,
1498 I guess this is OK, I don't know really.
1499 (FILE_PATTERNS): look for .c files not .h, makes sense
1502 2002-11-22 Havoc Pennington <hp@pobox.com>
1504 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1505 because any app can be a server, and any app can be a client,
1506 the bus is a special kind of server.
1508 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1510 * Doxyfile : adding. Still needs Makefile rules to be generated
1511 automatically (just run "doxygen" in the toplevel dir for now to
1514 * dbus/dbus-message.h : Adding sample docs (javadoc since
1515 resembles gtk-doc a little more)
1517 * dbus/dbus.h : Adding sample docs
1519 2002-11-21 Havoc Pennington <hp@redhat.com>
1521 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1522 so we can allow ourselves to include files directly,
1523 instead of having to use dbus.h
1525 * dbus/dbus.h: fill in
1527 * dbus/dbus-message.h: sketch out a sample header file.
1528 Include griping if you include it directly instead of
1531 * dbus/dbus-macros.h: new file with macros for extern "C",
1532 TRUE/FALSE, NULL, etc.
1534 * doc/file-boilerplate.c: put include guards in here
1536 2002-11-21 Havoc Pennington <hp@redhat.com>
1538 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1540 * COPYING: include the GPL as well, and license code
1541 under both AFL and GPL.
1543 2002-11-21 Havoc Pennington <hp@redhat.com>
1545 * acconfig.h: get rid of this
1547 * autogen.sh (run_configure): add --no-configure option
1549 * configure.in: remove AC_ARG_PROGRAM to make
1550 autoconf complain less. add AC_PREREQ.
1551 add AC_DEFINE third arg.
1553 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1556 Fix references so we can distcheck.
1558 2002-11-21 Havoc Pennington <hp@redhat.com>
1560 * Initial module creation