1 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3 * bus/driver.c: (bus_driver_send_welcome_message),
4 (bus_driver_handle_list_services),
5 (bus_driver_handle_acquire_service),
6 (bus_driver_handle_service_exists), (bus_driver_handle_message):
7 Update for API changes in libdbus.
9 * dbus/dbus-message.c: (dbus_message_new_reply):
10 * dbus/dbus-message.h:
11 Remove the name argument. The spec states that replies shouldn't
14 2003-02-13 Anders Carlsson <andersca@codefactory.se>
16 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
17 (report_error), (bus_desktop_file_load), (lookup_section),
18 (lookup_line), (bus_desktop_file_get_raw),
19 (bus_desktop_file_get_string):
21 Some fixes, and new functions for getting a key value from a section.
23 2003-02-13 Havoc Pennington <hp@pobox.com>
25 * test/data/auth/fail-after-n-attempts.auth-script: new test
27 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
30 2003-02-13 Havoc Pennington <hp@pobox.com>
32 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
33 dbus_credentials_match were backward
35 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
36 NO_CREDENTIALS and ROOT_CREDENTIALS
38 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
39 into here. Never process more commands after we've reached an
40 end state; store further data as unused bytes.
42 * test/data/auth/*: add more auth tests
44 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
45 command to match exact string and EXPECT_UNUSED to match unused
48 * test/Makefile.am (dist-hook): fix to dist all the test stuff
50 2003-02-12 Havoc Pennington <hp@pobox.com>
52 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
53 \r off of popped lines
55 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
58 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
61 2003-02-12 Havoc Pennington <hp@pobox.com>
63 * dbus/Makefile.am: remove break-loader from the build, since it
66 * configure.in: add --enable-gcov to turn on coverage profiling
67 flags and disable optimization
69 2003-02-10 Havoc Pennington <hp@pobox.com>
71 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
72 initial cut at test framework for DBusAuth from laptop.
73 Doesn't quite work yet but it compiles and I need to get
74 it off the 266mhz laptop. ;-)
76 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
77 fix a memleak in error case
79 2003-02-12 Anders Carlsson <andersca@codefactory.se>
84 Add a desktop file parser.
86 2003-02-11 Zack Rusin <zack@kde.org>
88 * qt/message.[h|cpp]: sample implementation
89 of the KDE wrapper for DBusMessage
91 2003-02-09 Zack Rusin <zack@kde.org>
93 * test/bus-test.c: make_it_compile
94 * doc/dbus-specification.sgml: minimal semantic fix
96 2003-02-06 Anders Carlsson <andersca@codefactory.se>
102 2003-02-06 Anders Carlsson <andersca@codefactory.se>
105 * dbus/dbus-break-loader.c:
107 * test/break-loader.c:
108 Move dbus-break-loader to test/ and rename it to break-loader.
110 2003-02-02 Havoc Pennington <hp@pobox.com>
112 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
113 for code to manage cookies in your home directory
115 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
117 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
118 to authenticate, then disconnect the client.
120 2003-02-03 Alexander Larsson <alexl@redhat.com>
122 * dbus/dbus-message.c (dbus_message_append_fields):
125 2003-02-02 Anders Carlsson <andersca@codefactory.se>
127 * doc/dbus-specification.sgml:
128 Update address format section.
130 2003-02-02 Anders Carlsson <andersca@codefactory.se>
133 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
134 (message_handler), (new_connection_callback), (loop_quit),
138 2003-02-02 Anders Carlsson <andersca@codefactory.se>
140 * bus/driver.c: (bus_driver_handle_service_exists):
141 Simplify the code a bit.
143 * dbus/dbus-bus.c: (dbus_bus_service_exists):
146 2003-02-02 Anders Carlsson <andersca@codefactory.se>
149 Add libdbus-daemon.la and link to it.
151 2003-02-01 James Willcox <jwillcox@gnome.org>
153 * bus/driver.c: (bus_driver_handle_own_service):
154 Actually include the service reply code in the message.
156 2003-02-02 Anders Carlsson <andersca@codefactory.se>
158 * bus/driver.c: (bus_driver_handle_service_exists):
159 Don't unref the incoming message.
161 2003-02-02 Anders Carlsson <andersca@codefactory.se>
163 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
165 2003-02-02 Anders Carlsson <andersca@codefactory.se>
167 * dbus/dbus-server.c: (dbus_server_listen):
168 * dbus/dbus-transport.c: (_dbus_transport_open):
169 ifdef out the calls to the debug transport and server.
171 2003-02-02 Alexander Larsson <alexl@redhat.com>
173 * dbus/dbus-watch.c (dbus_watch_get_flags):
174 Add note in the docs that ERROR or HANGUP won't be returned
175 and are assumed always on.
177 * glib/dbus-gmain.c (add_watch):
178 Always add IO_ERR | IO_HUP
180 * dbus/dbus-message.h:
181 Add semicolon after dbus_message_iter_get_string_array().
182 Makes qt code build again
184 2003-02-01 Anders Carlsson <andersca@codefactory.se>
186 * bus/driver.c: (create_unique_client_name),
187 (bus_driver_handle_hello):
188 Don't take a name, just use a numeric id to identify
192 * dbus/dbus-bus.c: (dbus_bus_register_client),
193 (dbus_bus_acquire_service), (dbus_bus_service_exists):
195 Add new convenience functions for communicating with the bus.
197 * dbus/dbus-message.h:
199 * dbus/dbus-protocol.h:
202 2003-02-01 Alexander Larsson <alexl@redhat.com>
204 * dbus/dbus-message.c (dbus_message_append_fields):
205 Add some more doc comments.
207 2003-02-01 Havoc Pennington <hp@pobox.com>
209 * dbus/dbus-break-loader.c (randomly_modify_length): change
210 a 4-byte value in the message as if it were a length
212 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
213 execute bit on saved files
215 2003-02-01 Havoc Pennington <hp@pobox.com>
217 * dbus/dbus-break-loader.c (main): new program to find messages
218 that break the loader.
220 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
221 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
223 * dbus/dbus-string.c (_dbus_string_set_byte): new
225 2003-01-31 Havoc Pennington <hp@pobox.com>
227 * dbus/dbus-message.c: refactor the test code to be more general,
228 in preparation for writing a "randomly permute test cases to
229 try to break the loader" program.
231 2003-01-31 Havoc Pennington <hp@pobox.com>
233 * doc/dbus-specification.sgml: work on the specification
235 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
236 the protocol version of the message.
238 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
239 no longer specifies that.
240 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
243 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
244 "break" for DBUS_TYPE_NIL, remove @todo
246 2003-01-31 Havoc Pennington <hp@pobox.com>
248 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
249 just set_is_error/get_is_error as this is a commonly-used
250 function, and write docs.
252 2003-01-31 Anders Carlsson <andersca@codefactory.se>
254 * dbus/dbus-address.c: (dbus_address_entry_free):
255 Free key and value lists.
257 * dbus/dbus-internals.c: (_dbus_type_to_string):
258 Add the types we didn't have.
260 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
261 (_dbus_marshal_validate_arg):
264 * dbus/dbus-message.c: (dbus_message_set_sender):
265 Remove todo about being able to set sender to NULL.
267 (dbus_message_set_is_error_reply),
268 (dbus_message_get_is_error_reply):
269 * dbus/dbus-message.h:
272 * dbus/dbus-protocol.h:
273 Add error reply flag.
275 * test/data/valid-messages/opposite-endian.message:
276 Add NIL type to test.
278 2003-01-31 Havoc Pennington <hp@pobox.com>
280 * doc/dbus-specification.sgml: fully specify the header. Add
281 flags and major protocol version, and change header/body len to
284 * dbus/dbus-message-builder.c (append_saved_length): append length
287 * dbus/dbus-message.c (dbus_message_create_header): change header
288 length and body length to unsigned. Add the new fields from the
290 (_dbus_message_loader_return_buffer): unsigned header/body len
292 2003-01-30 Havoc Pennington <hp@pobox.com>
294 * dbus/dbus-auth.c: rework to use only REJECTED, no
297 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
298 use REJECTED, suggested by Mark McLoughlin
300 2003-01-30 Havoc Pennington <hp@pobox.com>
302 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
303 a better way to report errors here. e.g. "unix address lacks
304 path" or something. also "no such file" when the path doesn't
307 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
309 (dbus_parse_address): add @todo about documenting address format,
310 and allowing , and ; to be escaped
312 2003-01-30 Anders Carlsson <andersca@codefactory.se>
315 Add dbus-address.[ch]
317 * dbus/dbus-address.c: (dbus_address_entry_free),
318 (dbus_address_entries_free), (create_entry),
319 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
320 (dbus_parse_address), (_dbus_address_test):
321 * dbus/dbus-address.h:
322 New files for dealing with address parsing.
324 * dbus/dbus-connection.c:
325 Document timeout functions.
327 * dbus/dbus-message.c:
328 Document dbus_message_new_from_message.
330 * dbus/dbus-server-debug.c:
333 * dbus/dbus-server.c: (dbus_server_listen):
334 Parse address and use correct server implementation.
336 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
337 * dbus/dbus-string.h:
338 New function with test.
340 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
344 * dbus/dbus-transport-debug.c:
347 * dbus/dbus-transport.c: (_dbus_transport_open):
348 Parse address and use correct transport implementation.
350 2003-01-30 Havoc Pennington <hp@pobox.com>
352 * dbus/dbus-message.c: use message->byte_order instead of
353 DBUS_COMPILER_BYTE_ORDER throughout.
354 (dbus_message_create_header): pad header to align the
355 start of the body of the message to 8-byte boundary
357 * dbus/dbus-marshal.h: make all the demarshalers take const
358 DBusString arguments.
360 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
361 validate message args here, so we don't have to do slow validation
362 later, and so we catch bad messages as they are incoming. Also add
363 better checks on header_len and body_len. Also fill in
366 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
367 implemented properly)
368 (_dbus_string_validate_nul): new function to check all-nul
370 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
371 get_arg_end_pos and remove all validation
372 (_dbus_marshal_validate_arg): actually do validation here.
374 2003-01-29 Havoc Pennington <hp@pobox.com>
376 * dbus/dbus-message.c (check_message_handling): fix assertion
377 failure on set_client_serial
379 2003-01-28 Havoc Pennington <hp@pobox.com>
381 * dbus/dbus-server-debug.c: Add doc section comments
383 * dbus/dbus-transport-debug.c: add doc section comments
385 2003-01-28 Havoc Pennington <hp@redhat.com>
387 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
388 the reverse order from how I had it
389 (_dbus_string_base64_encode): reverse encoding order. I was
390 basically byteswapping everything during encoding.
392 2003-01-28 Anders Carlsson <andersca@codefactory.se>
394 * dbus/dbus-connection-internal.h:
395 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
396 (_dbus_connection_remove_timeout):
397 Add functions for adding and removing timeouts.
399 * dbus/dbus-message.c: (dbus_message_new_from_message):
400 Add new function that takes a message and creates an exact
401 copy of it, but with the refcount set to 1.
402 (check_message_handling):
405 * dbus/dbus-server-protected.h:
406 * dbus/dbus-server.c: (_dbus_server_init_base),
407 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
408 (dbus_server_set_timeout_functions):
409 (_dbus_server_remove_timeout):
410 New functions so that a server can add and remove timeouts.
412 (dbus_server_listen):
413 Add commented out call to dbus_server_debug_new.
415 * dbus/dbus-timeout.c: (_dbus_timeout_new):
416 Actually set the handler, doh.
418 * dbus/dbus-transport.c: (_dbus_transport_open):
419 Add commented out call to dbus_transport_debug_client_new.
422 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
424 2003-01-28 Havoc Pennington <hp@pobox.com>
426 * dbus/dbus-message.c (check_message_handling): function to check
427 on the loaded message, iterates over it etc.
429 2003-01-28 Havoc Pennington <hp@pobox.com>
431 * test/Makefile.am (dist-hook): fix make distdir
433 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
435 2003-01-27 Havoc Pennington <hp@pobox.com>
437 * dbus/dbus-mempool.c (time_for_size): replace printf with
440 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
441 empty lines; fix the SAVE_LENGTH stuff to be
442 START_LENGTH/END_LENGTH so it actually works; couple other
445 * test/Makefile.am (dist-hook): add dist-hook for .message files
447 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
448 can be constant or locked.
449 (_dbus_string_free): allow freeing a const string as
452 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
454 * dbus/dbus-test-main.c (main): take an argument which is the
455 directory containing test data
457 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
458 argument to this and load all the messages in test/data/
459 checking that they can be loaded or not loaded as appropriate.
461 2003-01-27 Anders Carlsson <andersca@codefactory.se>
463 * bus/dispatch.c: (bus_dispatch_message_handler):
464 Dispatch messages sent to services.
466 * bus/driver.c: (bus_driver_send_service_deleted),
467 (bus_driver_send_service_created), (bus_driver_send_service_lost),
468 (bus_driver_send_service_acquired):
469 Add helper functions for sending service related messages.
471 (bus_driver_send_welcome_message):
472 Send HELLO_REPLY instead of WELCOME.
474 (bus_driver_handle_list_services):
475 Send LIST_SERVICES_REPLY instead of SERVICES.
477 (bus_driver_handle_own_service),
478 (bus_driver_handle_service_exists):
479 New message handlers.
481 (bus_driver_handle_message):
482 Invoke new message handlers.
484 (bus_driver_remove_connection):
485 Don't remove any services here since that's done automatically
486 by bus_service_remove_owner now.
489 New function signatures.
491 * bus/services.c: (bus_service_add_owner):
492 Send ServiceAcquired message if we're the only primary owner.
494 (bus_service_remove_owner):
495 Send ServiceAcquired/ServiceLost messages.
497 (bus_service_set_prohibit_replacement),
498 (bus_service_get_prohibit_replacement):
499 Functions for setting prohibit replacement.
501 (bus_service_has_owner):
502 New function that checks if a connection is in the owner queue of
506 Add new function signatures.
508 * dbus/dbus-list.c: (_dbus_list_test):
509 Add tests for _dbus_list_remove_last and traversing the list backwards.
512 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
513 go any further, so return NULL then.
515 * dbus/dbus-protocol.h:
516 Add new messages, service flags and service replies.
518 2003-01-26 Havoc Pennington <hp@pobox.com>
520 * dbus/dbus-message-builder.c: implement, completely untested.
522 * test/data/*: add data to be used in testing.
523 ".message" files are our simple loadable text format.
524 ".message-raw" will be binary dumps of messages.
526 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
528 2003-01-26 Havoc Pennington <hp@pobox.com>
530 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
532 * dbus/dbus-errors.c (dbus_result_to_string): add
535 * dbus/dbus-message-builder.c: new file, will contain code to load
536 up messages from files. Not implemented yet.
538 2003-01-26 Havoc Pennington <hp@pobox.com>
540 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
541 the sender by setting to NULL
543 2003-01-26 Havoc Pennington <hp@pobox.com>
545 The unit tests pass, but otherwise untested. If it breaks, the
546 tests should have been better. ;-)
548 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
551 * dbus/dbus-message.c: redo everything so we maintain
552 message->header as the only copy of the various fields.
553 This avoids the possibility of out-of-memory in some cases,
554 for example dbus_message_lock() can't run out of memory anymore,
555 and avoids extra copying. Figured I may as well go ahead and do
556 this since it was busted for dbus_message_lock to not return
557 failure on OOM, and dbus_message_write_header was totally
558 unchecked for OOM. Also fixed some random other bugs.
560 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
561 that strings are nul-terminated. Also, end_pos can be equal
562 to string length just not greater than, I think.
563 (_dbus_marshal_set_int32): new function
564 (_dbus_marshal_set_uint32): new function
565 (_dbus_marshal_set_string): new function
567 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
568 a warning, init timeout_list to NULL
569 (dbus_connection_send_message): don't use uninitialized variable
572 * dbus/dbus-string.c (_dbus_string_replace_len): new function
574 2003-01-26 Anders Carlsson <andersca@codefactory.se>
576 * bus/driver.c: (bus_driver_handle_hello),
577 (bus_driver_send_welcome_message):
580 2003-01-26 Anders Carlsson <andersca@codefactory.se>
582 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
583 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
584 (dbus_connection_unref):
585 * dbus/dbus-marshal.c: (_dbus_marshal_test):
586 * dbus/dbus-message.c: (dbus_message_unref),
589 (dbus_message_get_fields):
590 Remove debugging printout.
592 (_dbus_message_loader_return_buffer):
593 Don't store the header string.
595 (_dbus_message_test):
598 2003-01-26 Richard Hult <rhult@codefactory.se>
600 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
601 the file descriptor list, since it can change under us.
603 2003-01-25 Anders Carlsson <andersca@codefactory.se>
605 * glib/dbus-gmain.c: (dbus_connection_prepare),
606 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
607 (remove_watch), (dbus_connection_hookup_with_g_main):
608 Rewrite the glib handling to use its own GSource instead of a
609 GIOChannel so we can catch messages put in the queue while waiting
612 2003-01-25 Anders Carlsson <andersca@codefactory.se>
615 * bus/connection.c: (connection_disconnect_handler),
616 (connection_watch_callback), (bus_connection_setup):
617 * bus/dispatch.c: (send_one_message),
618 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
619 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
621 * bus/driver.c: (bus_driver_send_service_deleted),
622 (bus_driver_send_service_created), (bus_driver_handle_hello),
623 (bus_driver_send_welcome_message),
624 (bus_driver_handle_list_services), (bus_driver_remove_connection),
625 (bus_driver_handle_message):
627 Refactor code, put the message dispatching in its own file. Use
628 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
631 2003-01-25 Anders Carlsson <andersca@codefactory.se>
633 * dbus/dbus-internals.h:
634 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
636 * dbus/dbus-message.c: (dbus_message_get_sender):
637 * dbus/dbus-message.h:
638 Implement dbus_message_get_sender.
640 * dbus/dbus-protocol.h:
641 Add message and service defines.
643 2003-01-25 Anders Carlsson <andersca@codefactory.se>
645 * dbus/dbus-connection.c: (dbus_connection_send_message):
646 * dbus/dbus-message-internal.h:
647 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
648 (dbus_message_write_header):
649 Remove _dbus_messag_unlock and don't set the client serial on a
650 message if one already exists.
652 2003-01-24 Havoc Pennington <hp@pobox.com>
654 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
657 * bus/driver.c (bus_driver_handle_list_services): fix a leak
660 2003-01-25 Anders Carlsson <andersca@codefactory.se>
662 * dbus/dbus-list.c: (alloc_link), (free_link):
663 Use a memory pool for the links.
665 2003-01-25 Anders Carlsson <andersca@codefactory.se>
667 * bus/connection.c: (bus_connection_foreach):
669 Add new bus_connection_foreach function.
671 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
672 Add function that broadcasts a message to all clients.
674 (bus_driver_send_service_created), (bus_driver_handle_hello),
675 (bus_driver_send_welcome_message),
676 (bus_driver_handle_list_services), (bus_driver_message_handler):
677 Implement functions that take care of listing services, and notifying
678 clients when new services are created.
680 * bus/services.c: (bus_services_list):
682 Add new function that returns an array of strings with the currently
687 Update copyright year.
689 2003-01-25 Anders Carlsson <andersca@codefactory.se>
691 * dbus/dbus-connection.c: (dbus_connection_send_message):
692 Unlock the message in case it was sent earlier.
694 (dbus_connection_send_message_with_reply_and_block):
695 Remove the reply message from the list.
697 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
698 Set array_len and new_pos correctly.
700 (_dbus_marshal_test):
703 * dbus/dbus-message-internal.h:
704 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
705 New function that returns the reply serial.
707 (_dbus_message_unlock):
708 New function that unlocks a message and resets its header.
710 (dbus_message_append_string_array),
711 (dbus_message_get_fields_valist),
712 (dbus_message_iter_get_field_type),
713 (dbus_message_iter_get_string_array),
714 (dbus_message_get_fields),
715 (dbus_message_append_fields_valist):
716 Handle string arrays.
718 (dbus_message_set_sender):
719 Make this function public since the bus daemon needs it.
721 (decode_header_data):
722 Set the reply serial to -1 initially.
724 * dbus/dbus-message.h:
725 Add dbus_message_set_sender.
727 2003-01-24 Havoc Pennington <hp@pobox.com>
729 * doc/dbus-specification.sgml: add some stuff
731 2003-01-22 Havoc Pennington <hp@pobox.com>
733 * doc/dbus-specification.sgml: Start to document the protocol.
735 2003-01-22 Havoc Pennington <hp@pobox.com>
737 * dbus/dbus-connection.c
738 (dbus_connection_send_message_with_reply_and_block): add some @todo
740 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
742 2003-01-21 Havoc Pennington <hp@pobox.com>
744 (patch untested because can't compile)
746 * bus/driver.c (create_unique_client_name): make this function
747 never recycle client names. Also, caller should initialize
750 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
752 2003-01-21 Anders Carlsson <andersca@codefactory.se>
754 * dbus/dbus-marshal.c: (_dbus_marshal_double),
755 (_dbus_marshal_int32), (_dbus_marshal_uint32),
756 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
757 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
758 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
759 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
760 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
761 * dbus/dbus-marshal.h:
762 * dbus/dbus-protocol.h:
763 Add support for marshalling and demarshalling integer, double
766 2003-01-21 Anders Carlsson <andersca@codefactory.se>
771 * bus/connection.c: (connection_disconnect_handler):
772 Remove the connection from the bus driver's list.
774 (connection_watch_callback): Dispatch messages.
776 (free_connection_data): Free connection name.
778 (bus_connection_setup): Add connection to the bus driver's list.
779 (bus_connection_remove_owned_service):
780 (bus_connection_set_name), (bus_connection_get_name):
781 Add functions for setting and getting the connection's name.
784 Add function headers.
786 * bus/driver.c: (create_unique_client_name),
787 (bus_driver_handle_hello_message),
788 (bus_driver_send_welcome_message), (bus_driver_message_handler),
789 (bus_driver_add_connection), (bus_driver_remove_connection):
792 * bus/services.c: (bus_service_free):
794 New file that handles communication and registreation with the bus
797 2003-01-21 Anders Carlsson <andersca@codefactory.se>
799 * dbus/dbus-connection.c: (dbus_connection_send_message):
800 Add a new client_serial parameter.
802 (dbus_connection_send_message_with_reply):
803 Remove a @todo since we've implemented the blocking function.
805 (dbus_connection_send_message_with_reply_and_block):
806 New function that sends a message and waits for a reply and
807 then returns the reply.
809 * dbus/dbus-connection.h:
812 * dbus/dbus-errors.c: (dbus_result_to_string):
813 * dbus/dbus-errors.h:
816 * dbus/dbus-message-internal.h:
817 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
818 (_dbus_message_set_sender), (dbus_message_write_header),
819 (dbus_message_new_reply), (decode_header_data),
820 (_dbus_message_loader_return_buffer), (_dbus_message_test):
821 * dbus/dbus-message.h:
822 Add new functions that set the reply serial and sender.
823 Also marshal and demarshal them correctly and add test.
825 * dbus/dbus-protocol.h:
826 Add new DBUS_MESSAGE_TYPE_SENDER.
829 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
830 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
831 (dbus_connection_hookup_with_g_main):
832 * glib/test-dbus-glib.c: (main):
833 Rewrite to use GIOChannel and remove the GSource crack.
835 * test/echo-client.c: (main):
836 * test/watch.c: (check_messages):
837 Update for changed APIs
839 2003-01-19 Anders Carlsson <andersca@codefactory.se>
841 * dbus/Makefile.am: Add dbus-timeout.[cħ]
843 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
844 Create a DBusTimeoutList.
845 (dbus_connection_set_timeout_functions): Add new function to
846 set timeout callbacks
848 * dbus/dbus-connection.h: Add public DBusTimeout API.
850 * dbus/dbus-message.c: (dbus_message_get_service):
851 * dbus/dbus-message.h: New function.
853 * dbus/dbus-server.c: Fix small doc typo.
855 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
857 2003-01-19 Anders Carlsson <andersca@codefactory.se>
859 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
860 of the string, just as long as specified.
862 2003-01-19 Havoc Pennington <hp@pobox.com>
864 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
867 * dbus/dbus-server.c (dbus_server_set_max_connections)
868 (dbus_server_get_max_connections, dbus_server_get_n_connections):
869 keep track of current number of connections, and add API for
870 setting a max (but haven't implemented enforcing the max yet)
872 2003-01-18 Havoc Pennington <hp@pobox.com>
874 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
875 reading/writing if read_watch != NULL or write_watch != NULL.
877 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
878 the message loader code to actually load message->header and
879 message->body into the newly-created message.
881 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
884 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
885 (dbus_connection_get_max_message_size)
886 (dbus_connection_set_max_live_messages_size)
887 (dbus_connection_get_max_live_messages_size): implement some
888 resource limitation functions
890 * dbus/dbus-resources.c: new file implementing some of the
891 resource limits stuff
893 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
894 missing docs, add @todo to handle OOM etc.
896 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
899 2003-01-18 Havoc Pennington <hp@pobox.com>
901 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
902 connection if it hasn't been already.
904 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
905 replace with DisconnectFunction.
907 2003-01-18 Havoc Pennington <hp@pobox.com>
909 Building --disable-verbose-mode --disable-asserts --disable-tests
910 cuts the library from 112K to 45K or so
912 * configure.in: check for varargs macro support,
913 add --enable-verbose-mode, --enable-asserts.
915 * dbus/dbus-internals.h (_dbus_assert): support
917 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
919 2003-01-18 Havoc Pennington <hp@pobox.com>
921 * dbus/dbus-test.c: include config.h so that tests actually run
923 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
924 so the failure mode when that assumption fails will be plenty
927 2003-01-18 Havoc Pennington <hp@pobox.com>
929 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
931 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
934 * test/Makefile.am: don't use special variable "TESTS" for echo-*
935 since we don't want to use those in make check
937 2003-01-15 Havoc Pennington <hp@redhat.com>
943 2003-01-15 Havoc Pennington <hp@redhat.com>
945 * test/Makefile.am: fix so that test source code ends up in the
946 distribution on make distcheck
948 2003-01-15 Havoc Pennington <hp@redhat.com>
954 2003-01-15 Havoc Pennington <hp@redhat.com>
956 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
957 fix build when --disable-tests
959 * Makefile.am (EXTRA_DIST): put HACKING in here
961 * HACKING: document procedure for making a tarball release.
963 2003-01-14 Anders Carlsson <andersca@codefactory.se>
965 * bus/connection.c: (connection_error_handler),
966 (bus_connection_setup):
967 * bus/main.c: (main):
968 Make sure that the DBusConnectionData struct is NULLed
969 out to prevent a segfault.
971 * dbus/dbus-errors.c: (dbus_result_to_string):
972 * dbus/dbus-errors.h:
973 * dbus/dbus-message.c: (dbus_message_get_fields),
974 (dbus_message_get_fields_valist), (_dbus_message_test):
975 * dbus/dbus-message.h:
976 Make dbus_message_get_fields return a result code so we can
977 track invalid fields as well as oom.
979 2003-01-11 Havoc Pennington <hp@pobox.com>
981 * configure.in: change --enable-test/--enable-ansi action-if-given
982 to enable_foo=$enableval instead of enable_foo=yes
984 2003-01-08 Havoc Pennington <hp@pobox.com>
986 * dbus/dbus-string.c (_dbus_string_align_length): new function
988 * dbus/dbus-test-main.c: move main() for test app here
990 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
991 symbol to run tests, because dbus-test isn't in the main
994 Code review nitpicks.
996 * dbus/dbus-message.c (dbus_message_write_header): add newlines
997 for people with narrow emacs ;-). Assert client_serial was filled
998 in. Assert message->name != NULL.
999 (dbus_message_append_fields): have "first_field_type" arg separate
1000 from va list, needed for C++ binding that also uses varargs IIRC
1001 and helps with type safety
1002 (dbus_message_new): add @todo about using DBusString to store
1003 service/name internally
1004 (dbus_message_new): don't leak ->service and ->name on OOM later
1006 (dbus_message_unref): free the service name
1007 (dbus_message_get_fields): same change to varargs
1008 i.e. first_field_type
1009 (_dbus_message_loader_return_buffer): assert that the message data
1010 is aligned (if not it's a bug in our code). Put in verbose griping
1011 about why we set corrupted = TRUE.
1012 (decode_header_data): add FIXME that char* is evil. Was going to
1013 add FIXME about evil locale-specific string.h strncmp, but just
1014 switched to wacky string-as-uint32 optimization. Move check for
1015 "no room for field name" above get_const_data_len() to avoid
1016 assertion failure in get_const_data_len if we have trailing 2
1017 bytes or the like. Check for service and name fields being
1018 provided twice. Don't leak service/name on error. Require field
1019 names to be aligned to 4 bytes.
1021 * dbus/dbus-marshal.c: move byte swap stuff to header
1022 (_dbus_pack_int32): uscore-prefix
1023 (_dbus_unpack_int32): uscore-prefix
1024 (_dbus_unpack_uint32): export
1025 (_dbus_demarshal_string): add @todo complaining about use of
1027 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1028 handling allowing corrupt data to go unchecked
1030 2003-01-08 Havoc Pennington <hp@redhat.com>
1032 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1033 to the select() as needed for authentication. (should be using
1034 _dbus_poll() not select, but for another day)
1036 * dbus/dbus.h: include dbus/dbus-protocol.h
1038 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1040 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1043 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1045 * dbus/dbus-internals.c: (_dbus_type_to_string):
1046 New function that returns a string describing a type.
1048 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1049 * dbus/dbus-marshal.h:
1050 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1051 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1052 (dbus_message_iter_get_byte_array):
1053 * dbus/dbus-message.h:
1054 Add new convenience functions for appending and getting message fields.
1055 Also add demarshalling routines for byte arrays.
1057 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1059 * dbus/dbus-connection-internal.h:
1060 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1061 (_dbus_connection_get_next_client_serial),
1062 (dbus_connection_send_message):
1063 * dbus/dbus-internals.h:
1064 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1065 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1066 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1067 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1068 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1069 (_dbus_verbose_bytes), (_dbus_marshal_test):
1070 * dbus/dbus-marshal.h:
1071 * dbus/dbus-message-internal.h:
1072 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1073 (dbus_message_write_header), (_dbus_message_lock),
1074 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1075 (dbus_message_get_name), (dbus_message_append_int32),
1076 (dbus_message_append_uint32), (dbus_message_append_double),
1077 (dbus_message_append_string), (dbus_message_append_byte_array),
1078 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1079 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1080 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1081 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1082 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1083 (decode_header_data), (_dbus_message_loader_return_buffer),
1084 (message_iter_test), (_dbus_message_test):
1085 * dbus/dbus-message.h:
1086 * dbus/dbus-protocol.h:
1087 * dbus/dbus-test.c: (main):
1089 * glib/test-dbus-glib.c: (message_handler), (main):
1090 * test/echo-client.c: (main):
1091 * test/watch.c: (check_messages):
1092 Make messages sendable and receivable for real.
1094 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1096 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1097 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1098 * dbus/dbus-message.c: (dbus_message_append_int32),
1099 (dbus_message_append_uint32), (dbus_message_append_double),
1100 (dbus_message_append_string), (dbus_message_append_byte_array):
1101 Handle OOM restoration.
1103 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1105 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1106 (_dbus_demarshal_string), (_dbus_marshal_test):
1107 * dbus/dbus-marshal.h:
1108 * dbus/dbus-message.c: (dbus_message_get_name),
1109 Document these functions.
1111 (dbus_message_append_int32), (dbus_message_append_uint32),
1112 (dbus_message_append_double), (dbus_message_append_string),
1113 (dbus_message_append_byte_array):
1114 * dbus/dbus-message.h:
1115 Add functions for adding message fields of different types.
1117 * dbus/dbus-protocol.h:
1118 Add the different types.
1120 2003-01-05 Havoc Pennington <hp@pobox.com>
1122 * bus/connection.c: implement routines for handling connections,
1123 first thing is keeping a list of owned services on each connection
1124 and setting up watches etc.
1126 * bus/services.c: implement a mapping from service names to lists
1129 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1131 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1132 to use static mutexes for global data
1134 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1135 collection of functions to set/get application-specific data
1136 on the DBusConnection.
1138 2003-01-04 Havoc Pennington <hp@pobox.com>
1140 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1141 (_dbus_poll): new function
1143 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1146 * bus/loop.c: initial code for the daemon main loop
1148 2003-01-04 Havoc Pennington <hp@pobox.com>
1150 * test/watch.c (error_handler): make it safe if the error handler
1151 is called multiple times (if we s/error handler/disconnect
1152 handler/ we should just guarantee it's called only once)
1154 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1155 error handler on disconnect (it's quite possible we should
1156 just change the error handler to a "disconnect handler," I'm
1157 not sure we have any other meaningful errors)
1159 * configure.in: check for getpwnam_r
1161 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1162 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1163 mechanism as in SASL spec, using socket credentials
1165 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1166 (_dbus_send_credentials_unix_socket): new function
1168 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1170 (_dbus_write): only check errno if <0 returned
1171 (_dbus_write_two): ditto
1173 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1175 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1176 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1177 (_dbus_marshal_test):
1178 * dbus/dbus-marshal.h:
1179 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1180 to _dbus_marshal_utf8_string. Also fix some tests.
1182 2002-12-28 Harri Porten <porten@kde.org>
1184 * configure.in: added check for C++ compiler and a very cheesy
1185 check for the Qt integration
1187 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1189 * qt/Makefile.am: added
1191 * qt/.cvsignore: added
1193 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1194 latter, added #ifdef QT_THREAD_SUPPORT guard.
1196 * dbus/Makefile.am: added missing headers for make dist
1198 2002-12-28 Kristian Rietveld <kris@gtk.org>
1200 * dbus/Makefile.am: fixup export-symbols-regex.
1202 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1204 * acinclude.m4: Add this file and put the
1205 PKG_CHECK_MODULE macro in it.
1207 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1209 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1210 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1211 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1212 (_dbus_marshal_test):
1213 Make the demarshalling routines align the pos argument.
1214 Add string marshalling tests and fix the obvious bugs
1217 2002-12-26 Havoc Pennington <hp@pobox.com>
1219 * dbus/dbus-auth.c: fixes fixes fixes
1221 * dbus/dbus-transport-unix.c: wire up support for
1222 encoding/decoding data on the wire
1224 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1225 (_dbus_auth_decode_data): append to target string
1226 instead of nuking it.
1228 2002-12-26 Havoc Pennington <hp@pobox.com>
1230 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1231 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1234 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1235 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1236 now). Main point is because I wanted unpack_uint32 to implement
1238 (_dbus_verbose_bytes): new function
1240 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1242 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1243 mechanism to handle a corrupt message stream
1244 (_dbus_message_loader_new): fix preallocation to only prealloc,
1247 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1248 (_dbus_string_test): enhance tests for copy/move and fix the
1251 * dbus/dbus-transport-unix.c: Hold references in more places to
1252 avoid reentrancy problems
1254 * dbus/dbus-transport.c: ditto
1256 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1257 leak reference count in no-message case
1259 * test/watch.c (do_mainloop): handle adding/removing watches
1260 during iteration over the watches. Also, ref the connection/server
1261 stored on a watch, so we don't try to mangle a destroyed one.
1263 * dbus/dbus-transport-unix.c (do_authentication): perform
1266 * dbus/dbus-auth.c (get_state): add a state
1267 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1268 (_dbus_auth_get_unused_bytes): append the unused bytes
1269 to the passed in string, rather than prepend
1271 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1272 the auth conversation DBusAuth
1274 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1275 (_dbus_transport_new_for_domain_socket): when creating a
1276 transport, pass in whether it's a client-side or server-side
1277 transport so we know which DBusAuth to create
1279 2002-12-03 Havoc Pennington <hp@pobox.com>
1281 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1282 _after_ finalizing the derived members
1283 (unix_connection_set): unref watch if we fail to add it
1285 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1286 transport first, so that the connection owned by the
1287 transport will be valid as the transport finalizes.
1289 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1290 if necessary, and remove watches from the connection.
1292 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1294 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1296 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1297 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1298 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1299 (_dbus_marshal_test):
1300 * dbus/dbus-marshal.h:
1301 Add string marshal functions and have the demarshal functions
1302 return the new position.
1304 2002-12-25 Havoc Pennington <hp@pobox.com>
1306 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1307 it is a simple protocol that just maps directly to SASL.
1309 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1310 initial implementation, not actually used yet.
1312 * dbus/dbus-string.c (_dbus_string_find): new function
1313 (_dbus_string_equal): new function
1314 (_dbus_string_base64_encode): new function
1315 (_dbus_string_base64_decode): new function
1317 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1320 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1321 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1322 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1323 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1324 * dbus/dbus-marshal.h:
1325 * dbus/dbus-protocol.h:
1326 * dbus/dbus-test.c: (main):
1328 Add un-optimized marshalling/demarshalling routines.
1330 2002-12-25 Harri Porten <porten@kde.org>
1332 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1334 2002-12-24 Zack Rusin <zack@kde.org>
1336 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1337 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1340 2002-12-24 Havoc Pennington <hp@pobox.com>
1342 * glib/dbus-gthread.c: fix include
1344 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1345 I think glib API needs to change, though, as you don't
1346 want to use DBusMessageFunction, you want to use the
1347 DBusMessageHandler object. Probably
1348 dbus_connection_open_with_g_main_loop()
1349 and dbus_connection_setup_g_main_loop() or something like that
1350 (but think of better names...) that just create a connection
1351 that has watch/timeout functions etc. already set up.
1353 * dbus/dbus-connection.c
1354 (dbus_connection_send_message_with_reply): new function just to
1355 show how the message handler helps us deal with replies.
1357 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1359 * dbus/dbus-string.c (_dbus_string_test): free a string that
1362 * dbus/dbus-hash.c: use memory pools for the hash entries
1363 (rebuild_table): be more paranoid about overflow, and
1364 shrink table when we can
1365 (_dbus_hash_test): reduce number of sprintfs and write
1366 valid C89. Add tests for case where we grow and then
1367 shrink the hash table.
1369 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1371 * dbus/dbus-connection.c (dbus_connection_register_handler)
1372 (dbus_connection_unregister_handler): new functions
1374 * dbus/dbus-message.c (dbus_message_get_name): new
1376 * dbus/dbus-list.c: fix docs typo
1378 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1379 an object representing a handler for messages.
1381 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1384 * glib/dbus-gthread.c: (dbus_gthread_init):
1385 Don't use the gdbus prefix for public functions.
1387 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1391 Add GLib checks and fixup .pc files
1395 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1396 (gdbus_connection_check), (gdbus_connection_dispatch),
1397 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1398 (dbus_connection_gsource_new):
1399 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1400 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1401 * glib/test-dbus-glib.c: (message_handler), (main):
1404 2002-12-15 Harri Porten <porten@kde.org>
1406 * autogen.sh: check for libtoolize before attempting to use it
1408 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1411 * .cvsignore: ignore more stamp files
1413 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1415 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1416 without make install.
1418 2002-12-15 Havoc Pennington <hp@pobox.com>
1420 * dbus/dbus-threads.c: add thread stubs that a higher library
1421 layer can fill in. e.g. the GLib wrapper might fill them in with
1422 GThread stuff. We still need to use this thread API to
1423 thread-safe-ize the library.
1425 2002-12-12 Havoc Pennington <hp@pobox.com>
1427 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1428 below new interfaces and include fewer system headers.
1430 * dbus/dbus-sysdeps.c (_dbus_read): new function
1431 (_dbus_write): new function
1432 (_dbus_write_two): new function
1433 (_dbus_connect_unix_socket): new function
1434 (_dbus_listen_unix_socket): new function
1436 * dbus/dbus-message-internal.h: change interfaces to use
1439 2002-12-11 Havoc Pennington <hp@pobox.com>
1441 * dbus/dbus-types.h: add dbus_unichar
1443 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1445 * dbus/dbus-connection.c (dbus_connection_send_message): return
1448 * dbus/dbus-transport.c: include dbus-watch.h
1450 * dbus/dbus-connection.c: include dbus-message-internal.h
1452 * HACKING: add file with coding guidelines stuff.
1454 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1455 handling here, for security purposes (as in vsftpd). Not actually
1456 using this class yet.
1458 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1459 system/libc usage here, as in vsftpd, for ease of auditing (and
1460 should also simplify portability). Haven't actually moved all the
1461 system/libc usage into here yet.
1463 2002-11-25 Havoc Pennington <hp@pobox.com>
1465 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1466 always print the first verbose message.
1468 2002-11-24 Havoc Pennington <hp@pobox.com>
1470 * test/echo-client.c, test/echo-server.c: cheesy test
1473 * configure.in (AC_CHECK_FUNCS): check for writev
1475 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1478 * dbus/dbus-list.c (_dbus_list_foreach): new function
1480 * dbus/dbus-internals.c (_dbus_verbose): new function
1482 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1483 representing a server that listens for connections.
1485 * dbus/.cvsignore: create
1487 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1488 public API for reporting errors
1490 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1491 public object representing a connection that
1492 sends/receives messages. (Same object used for
1493 both client and server.)
1495 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1496 Basic abstraction for different kinds of stream
1497 that we might read/write messages from.
1499 2002-11-23 Havoc Pennington <hp@pobox.com>
1501 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1504 * dbus/dbus-test.c (main): add list test, and include
1505 dbus-test.h as intended
1507 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1508 (_dbus_hash_table_remove_int): return value indicates
1509 whether the entry existed to remove
1511 * dbus/dbus-list.c: add linked list utility class,
1514 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1517 2002-11-23 Havoc Pennington <hp@pobox.com>
1519 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1520 DBUS_END_DECLS to nothing, that should fix this once and for all
1522 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1524 * dbus/dbus-message.c, dbus/dbus-hash.c:
1525 add some missing @brief
1527 2002-11-23 Havoc Pennington <hp@pobox.com>
1529 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1530 to avoid confusing Doxygen
1532 * dbus/dbus-hash.c: @} not }@
1534 * dbus/dbus-message.c (struct DBusMessage): split out
1537 2002-11-23 Havoc Pennington <hp@pobox.com>
1539 * configure.in: pile on more warning flags if using gcc
1541 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1542 to document static functions
1544 * configure.in: add summary to end of configure so it
1545 looks nice and attractive
1547 * dbus/dbus-hash.c: finish implementation and write unit
1550 * configure.in: add --enable-tests to enable unit tests
1552 * dbus/dbus-test.c: test program to run unit tests
1553 for all files in dbus/*, initially runs a test for
1556 * dbus/dbus-internals.h: file to hold some internal utility stuff
1558 2002-11-22 Havoc Pennington <hp@redhat.com>
1560 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1561 "ported" away from Tcl
1563 * dbus/dbus-types.h: header for types such as dbus_bool_t
1565 2002-11-22 Havoc Pennington <hp@redhat.com>
1567 * dbus/dbus.h: fixups for doc warnings
1569 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1571 (QUIET): make it quiet so we can see warnings
1573 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1575 2002-11-22 Havoc Pennington <hp@redhat.com>
1577 * Makefile.am: include "Doxyfile" target in all-local
1579 * configure.in: generate the Doxyfile
1581 * Doxyfile.in: move Doxyfile here, so we can use
1582 configure to generate a Doxyfile with the right
1585 2002-11-22 Havoc Pennington <hp@redhat.com>
1587 * dbus/dbus-message.c: move inline docs into .c file
1589 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1590 so all docs are under doc/
1591 (MAN_EXTENSION): generate man pages. Use extension
1592 ".3dbus" which matches ".3qt" on my system,
1593 I guess this is OK, I don't know really.
1594 (FILE_PATTERNS): look for .c files not .h, makes sense
1597 2002-11-22 Havoc Pennington <hp@pobox.com>
1599 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1600 because any app can be a server, and any app can be a client,
1601 the bus is a special kind of server.
1603 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1605 * Doxyfile : adding. Still needs Makefile rules to be generated
1606 automatically (just run "doxygen" in the toplevel dir for now to
1609 * dbus/dbus-message.h : Adding sample docs (javadoc since
1610 resembles gtk-doc a little more)
1612 * dbus/dbus.h : Adding sample docs
1614 2002-11-21 Havoc Pennington <hp@redhat.com>
1616 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1617 so we can allow ourselves to include files directly,
1618 instead of having to use dbus.h
1620 * dbus/dbus.h: fill in
1622 * dbus/dbus-message.h: sketch out a sample header file.
1623 Include griping if you include it directly instead of
1626 * dbus/dbus-macros.h: new file with macros for extern "C",
1627 TRUE/FALSE, NULL, etc.
1629 * doc/file-boilerplate.c: put include guards in here
1631 2002-11-21 Havoc Pennington <hp@redhat.com>
1633 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1635 * COPYING: include the GPL as well, and license code
1636 under both AFL and GPL.
1638 2002-11-21 Havoc Pennington <hp@redhat.com>
1640 * acconfig.h: get rid of this
1642 * autogen.sh (run_configure): add --no-configure option
1644 * configure.in: remove AC_ARG_PROGRAM to make
1645 autoconf complain less. add AC_PREREQ.
1646 add AC_DEFINE third arg.
1648 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1651 Fix references so we can distcheck.
1653 2002-11-21 Havoc Pennington <hp@redhat.com>
1655 * Initial module creation